Re: [PATCH net v1] net/ipv6: mcast: fix circular locking dependency in __ipv6_dev_mc_inc()
From: Jiayuan Chen
Date: Thu Mar 19 2026 - 00:14:21 EST
On 3/19/26 11:26 AM, Jakub Kicinski wrote:
Yeah, using memalloc_noio helpers is simpler. I checked and thereTotally agree that it feels a bit odd that we have to worry about IO,
are about 18 places taking mc_lock, so having a common mc_lock()/mc_unlock()
wrapper that does the noio save/restore covers them all (if necessary).
The only thing that feels a bit odd is using memalloc_noio in the networking
subsystem. It makes sense in block/fs to protect itself from recursion.
but unless we can figure out a way to prevent nbd sockets from getting
here all our solutions are dealing with noio in networking code 🙁
IMHO it's better to acknowledge this with the explicit memalloc_noio
so future developers don't break things again with a mis-placed
allocation.
Makes sense. I checked and there are about 18 mc_lock sites, and more
than 10 of them have GFP_KERNEL allocations under the lock. If we want
to fix the mc_lock + GFP_KERNEL combination properly, it makes sense to
convert all of them to noio helpers.
But if that feels like too much for this fix, I can just focus on the one
reported by syzbot.