netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] inet: missing lock releases in igmp.c
@ 2022-01-21  3:19 ycaibb
  2022-01-26 15:03 ` [inet] 92768196fd: BUG:sleeping_function_called_from_invalid_context_at_lib/iov_iter.c kernel test robot
  0 siblings, 1 reply; 2+ messages in thread
From: ycaibb @ 2022-01-21  3:19 UTC (permalink / raw)
  To: davem, yoshfuji, dsahern, kuba; +Cc: netdev, linux-kernel, ycaibb

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


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

end of thread, other threads:[~2022-01-26 15:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-21  3:19 [PATCH] inet: missing lock releases in igmp.c ycaibb
2022-01-26 15:03 ` [inet] 92768196fd: BUG:sleeping_function_called_from_invalid_context_at_lib/iov_iter.c 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;
as well as URLs for NNTP newsgroup(s).