All of lore.kernel.org
 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; 3+ messages 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] 3+ messages in thread

* 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; 3+ messages in thread
From: kernel test robot @ 2020-08-07 11:24 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2248 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(a)lists.01.org

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* drivers/usb/gadget/udc/max3420_udc.c:975 max3420_nuke() error: double unlocked 'ep->lock' (orig line 970)
@ 2020-06-24 18:28 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2020-06-24 18:28 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Jassi Brar <jaswinder.singh@linaro.org>
CC: Felipe Balbi <balbi@kernel.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   3e08a95294a4fb3702bb3d35ed08028433c37fe6
commit: 48ba02b2e2b1a1c80718e93fefe99c8319597c4a usb: gadget: add udc driver for max3420
date:   3 months ago
:::::: branch date: 26 hours ago
:::::: commit date: 3 months ago
config: h8300-randconfig-m031-20200624 (attached as .config)
compiler: h8300-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>
Reported-by: Dan Carpenter <dan.carpenter@oracle.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)

# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=48ba02b2e2b1a1c80718e93fefe99c8319597c4a
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git remote update linus
git checkout 48ba02b2e2b1a1c80718e93fefe99c8319597c4a
vim +975 drivers/usb/gadget/udc/max3420_udc.c

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

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

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-08-07 11:27 UTC | newest]

Thread overview: 3+ messages (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
2020-08-07 11:24 ` kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2020-06-24 18:28 kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.