From: kernel test robot <lkp@intel.com>
To: Jassi Brar <jaswinder.singh@linaro.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Felipe Balbi <balbi@kernel.org>
Subject: drivers/usb/gadget/udc/max3420_udc.c:975 max3420_nuke() error: double unlocked 'ep->lock' (orig line 970)
Date: Fri, 7 Aug 2020 19:24:04 +0800 [thread overview]
Message-ID: <202008071900.DVzijV3N%lkp@intel.com> (raw)
[-- 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 --]
reply other threads:[~2020-08-07 11:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202008071900.DVzijV3N%lkp@intel.com \
--to=lkp@intel.com \
--cc=balbi@kernel.org \
--cc=jaswinder.singh@linaro.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®