Re: [PATCH 6.12 163/181] eventfs: Use children field for rcu head and add memory barriers
Sasha Levin <[email protected]>
| Newsgroups | dev.linux.lists.patches,org.kernel.vger.stable |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Aug 19, 2026 at 01:46:51AM +0530, Harshit Mogalapalli wrote:
>The new direct return bypasses srcu_read_unlock(). This leaves the SRCU
>reader counts unbalanced and can prevent eventfs callbacks from
>completing, allowing removed inode objects to accumulate.
Confirmed, thanks. Upstream is fine because eventfs_iterate() there uses
guard(srcu)(&eventfs_srcu) after 4d9b262031ff ("eventfs: Simplify code
using guard()s"), which is only in 7.1. On 6.18, 6.12 and 6.6 the
function still does the manual srcu_read_lock() with a single out: label,
so the new "return -EINVAL" is the one post-lock path that skips
srcu_read_unlock().
>I would suggest adapting the new check to set ret = -EINVAL and goto
>out.
I'd rather not adapt the control flow by hand here, so I've dropped this
from the affected trees: 6.12, plus 6.18 and 6.6, which have the same
problem. 7.1 is correct as-is and keeps the patch.
If a properly adapted backport shows up for the older trees I'm happy to
take it.
--
Thanks,
Sasha