public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Remove extra unlock for the mutex
@ 2023-10-10 22:46 Abhinav Singh
  2023-10-10 22:51 ` Florian Fainelli
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Abhinav Singh @ 2023-10-10 22:46 UTC (permalink / raw)
  To: davem, dsahern, edumazet, kuba, pabeni
  Cc: netdev, linux-kernel, linux-kernel-mentees, Abhinav Singh

There is a double unlock on mutex. This can cause undefined behaviour.

Signed-off-by: Abhinav Singh <singhabhinav9051571833@gmail.com>
---
 net/ipv4/inet_connection_sock.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
index aeebe8816689..f11fe8c727a4 100644
--- a/net/ipv4/inet_connection_sock.c
+++ b/net/ipv4/inet_connection_sock.c
@@ -597,7 +597,6 @@ int inet_csk_get_port(struct sock *sk, unsigned short snum)
 	}
 	if (head2_lock_acquired)
 		spin_unlock(&head2->lock);
-	spin_unlock_bh(&head->lock);
 	return ret;
 }
 EXPORT_SYMBOL_GPL(inet_csk_get_port);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-10-16 14:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-10 22:46 [PATCH] Remove extra unlock for the mutex Abhinav Singh
2023-10-10 22:51 ` Florian Fainelli
2023-10-11  0:28   ` Kuniyuki Iwashima
2023-10-11 15:47     ` Florian Fainelli
2023-10-11  6:30 ` Greg KH
2023-10-11 15:49   ` Abhinav Singh
2023-10-11 17:43     ` Eric Dumazet
2023-10-11 19:07       ` Abhinav Singh
2023-10-16 14:08 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox