lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202008071900.DVzijV3N%lkp@intel.com>
Date:   Fri, 7 Aug 2020 19:24:04 +0800
From:   kernel test robot <lkp@...el.com>
To:     Jassi Brar <jaswinder.singh@...aro.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Felipe Balbi <balbi@...nel.org>
Subject: drivers/usb/gadget/udc/max3420_udc.c:975 max3420_nuke() error:
 double unlocked 'ep->lock' (orig line 970)

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@...el.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

Download attachment ".config.gz" of type "application/gzip" (25733 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ