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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20200214204741.94112-21-jbi.octave@gmail.com>
Date:   Fri, 14 Feb 2020 20:47:31 +0000
From:   Jules Irenge <jbi.octave@...il.com>
To:     linux-kernel@...r.kernel.org
Cc:     boqun.feng@...il.com, Jules Irenge <jbi.octave@...il.com>,
        Don Fry <pcnet32@...ntier.com>,
        "David S. Miller" <davem@...emloft.net>,
        netdev@...r.kernel.org (open list:PCNET32 NETWORK DRIVER)
Subject: [PATCH 20/30] pcnet32: Add missing annotation for pcnet32_suspend()

Sparse reports a warning at pcnet32_suspend()

warning: context imbalance in pcnet32_suspend() - unexpected unlock

The root cause is the missing annotation at pcnet32_suspend()
Add the missing __must_hold(&lp->lock) annotattion

Signed-off-by: Jules Irenge <jbi.octave@...il.com>
---
 drivers/net/ethernet/amd/pcnet32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/amd/pcnet32.c b/drivers/net/ethernet/amd/pcnet32.c
index dc7d88227e76..ac6c19441932 100644
--- a/drivers/net/ethernet/amd/pcnet32.c
+++ b/drivers/net/ethernet/amd/pcnet32.c
@@ -684,7 +684,7 @@ static void pcnet32_poll_controller(struct net_device *dev)
  * lp->lock must be held.
  */
 static int pcnet32_suspend(struct net_device *dev, unsigned long *flags,
-			   int can_sleep)
+			   int can_sleep) __must_hold(&lp->lock)
 {
 	int csr5;
 	struct pcnet32_private *lp = netdev_priv(dev);
-- 
2.24.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ