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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200429100529.19645-2-jbi.octave@gmail.com>
Date:   Wed, 29 Apr 2020 11:05:23 +0100
From:   Jules Irenge <jbi.octave@...il.com>
To:     linux-kernel@...r.kernel.org
Cc:     Felipe Balbi <balbi@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Michal Simek <michal.simek@...inx.com>,
        Stephen Boyd <swboyd@...omium.org>,
        linux-usb@...r.kernel.org (open list:USB GADGET/PERIPHERAL SUBSYSTEM),
        linux-arm-kernel@...ts.infradead.org (moderated list:ARM/ZYNQ
        ARCHITECTURE)
Subject: [PATCH 1/6] usb: gadget: Add missing annotation for xudc_handle_setup()

Sparse reports a warning at xudc_handle_setup()

warning: context imbalance in xudc_handle_setup() - unexpected unlock

The root cause is the missing annotation at xudc_handle_setup()

Add the missing __must_hold(&udc->lock) annotation

Signed-off-by: Jules Irenge <jbi.octave@...il.com>
---
 drivers/usb/gadget/udc/udc-xilinx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/gadget/udc/udc-xilinx.c b/drivers/usb/gadget/udc/udc-xilinx.c
index 29d8e5f8bb58..ae22882dba6a 100644
--- a/drivers/usb/gadget/udc/udc-xilinx.c
+++ b/drivers/usb/gadget/udc/udc-xilinx.c
@@ -1733,6 +1733,7 @@ static void xudc_set_clear_feature(struct xusb_udc *udc)
  * Process setup packet and delegate to gadget layer.
  */
 static void xudc_handle_setup(struct xusb_udc *udc)
+	__must_hold(&udc->lock)
 {
 	struct xusb_ep *ep0 = &udc->ep[0];
 	struct usb_ctrlrequest setup;
-- 
2.25.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ