Re: [PATCH net] netfilter: xt_recent: do not call remove_proc_entry() under recent_lock

From: Cen Zhang (Microsoft)

Date: Wed Oct 28 2026 - 18:04:54 EST


Hi,

This was found by LLM-assisted code review.

We confirmed it in QEMU on mainline f0100363d8c3 with a reproducer:

- With DEBUG_ATOMIC_SLEEP enabled, we see the "sleeping function
called from invalid context" warning quoted in the commit message.
- On a non-debug build, we see "scheduling while atomic", followed by an
RCU stall, and the netns workqueue remains stuck.
- After the patch, the same reproducer completes and reads
return -EIO as expected.

We could not find a syzbot report or an earlier public report. The
reproducer is available on request.

Thanks,
Cen