lkml.org 
[lkml]   [2022]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] inet: missing lock releases in igmp.c
Date
From: Ryan Cai <ycaibb@gmail.com>

In method igmp_mcf_get_next, the lock state->im->lock is not released when likely(psf) returns true.

Signed-off-by: Ryan Cai <ycaibb@gmail.com>
---
net/ipv4/igmp.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
index d2e2b3d18c66..db6c7bfba1b8 100644
--- a/net/ipv4/igmp.c
+++ b/net/ipv4/igmp.c
@@ -2903,6 +2903,7 @@ static inline struct ip_sf_list *igmp_mcf_get_first(struct seq_file *seq)
if (likely(psf)) {
state->im = im;
state->idev = idev;
+ spin_unlock_bh(&im->lock);
break;
}
spin_unlock_bh(&im->lock);
--
2.33.0
\
 
 \ /
  Last update: 2022-01-21 04:20    [W:0.437 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site