Thread (2 messages) flat view 2 messages, 2 authors, 2022-01-26
STALE1684d

[PATCH] inet: missing lock releases in igmp.c

From: ycaibb <hidden>
Date: 2022-01-21 03:19:20
Also in: lkml
Subsystem: networking [general], networking [ipv4/ipv6], the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, David Ahern, Ido Schimmel, Linus Torvalds

From: Ryan Cai <redacted>

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

Signed-off-by: Ryan Cai <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help