mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* drivers/usb/gadget/udc/max3420_udc.c:975 max3420_nuke() error: double unlocked 'ep->lock' (orig line 970)
@ 2020-08-07 11:24 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-08-07 11:24 UTC (permalink / raw)
  To: Jassi Brar; +Cc: kbuild-all, linux-kernel, Felipe Balbi

[-- Attachment #1: Type: text/plain, Size: 2176 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   86cfccb66937dd6cbf26ed619958b9e587e6a115
commit: 48ba02b2e2b1a1c80718e93fefe99c8319597c4a usb: gadget: add udc driver for max3420
date:   5 months ago
config: parisc-randconfig-m031-20200807 (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

smatch warnings:
drivers/usb/gadget/udc/max3420_udc.c:975 max3420_nuke() error: double unlocked 'ep->lock' (orig line 970)
drivers/usb/gadget/udc/max3420_udc.c:1002 max3420_ep_disable() error: double unlocked 'ep->lock' (orig line 1000)

vim +975 drivers/usb/gadget/udc/max3420_udc.c

   959	
   960	static void max3420_nuke(struct max3420_ep *ep, int status)
   961	{
   962		struct max3420_req *req, *r;
   963		unsigned long flags;
   964	
   965		spin_lock_irqsave(&ep->lock, flags);
   966	
   967		list_for_each_entry_safe(req, r, &ep->queue, queue) {
   968			list_del_init(&req->queue);
   969	
 > 970			spin_unlock_irqrestore(&ep->lock, flags);
   971			max3420_req_done(req, status);
   972			spin_lock_irqsave(&ep->lock, flags);
   973		}
   974	
 > 975		spin_unlock_irqrestore(&ep->lock, flags);
   976	}
   977	
   978	static void __max3420_ep_disable(struct max3420_ep *ep)
   979	{
   980		struct max3420_udc *udc = ep->udc;
   981		unsigned long flags;
   982	
   983		spin_lock_irqsave(&ep->lock, flags);
   984	
   985		ep->ep_usb.desc = NULL;
   986	
   987		ep->todo &= ~ENABLE_EP;
   988		ep->todo |= DISABLE;
   989	
   990		spin_unlock_irqrestore(&ep->lock, flags);
   991	
   992		dev_dbg(udc->dev, "Disabled %s\n", ep->name);
   993	}
   994	
   995	static int max3420_ep_disable(struct usb_ep *_ep)
   996	{
   997		struct max3420_ep *ep = to_max3420_ep(_ep);
   998		struct max3420_udc *udc = ep->udc;
   999	
> 1000		max3420_nuke(ep, -ESHUTDOWN);
  1001	
> 1002		__max3420_ep_disable(ep);
  1003	
  1004		wake_up_process(udc->thread_task);
  1005	
  1006		return 0;
  1007	}
  1008	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 25733 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-08-07 11:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-07 11:24 drivers/usb/gadget/udc/max3420_udc.c:975 max3420_nuke() error: double unlocked 'ep->lock' (orig line 970) kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®