lkml.org 
[lkml]   [2020]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectdrivers/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@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
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2020-08-07 13:28    [W:0.022 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site