Re: [PATCH] watch_queue: keep info_id separate from rcu_head

From: Christian Brauner

Date: Fri Oct 30 2026 - 10:54:37 EST


On Thu, 29 Oct 2026 01:41:36 -0400, Zhiyu Zhang wrote:
> struct watch overlays info_id with rcu_head. A notification poster reads
> info_id under rcu_read_lock(), but a concurrent final put can enqueue the
> watch with call_rcu(). Enqueueing the callback writes rcu_head before the
> grace period has elapsed, so it can corrupt info_id while the object
> remains legally visible to the reader.
>
> __post_watch_notification() then merges that value into the notification
> info word without masking it. Pointer bits can corrupt WATCH_INFO_LENGTH
> and make post_one_notification() copy beyond the posting task's stack
> record.
>
> [...]

Applied to the vfs.fixes branch of the vfs/vfs.git tree.
Patches in the vfs.fixes branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.

tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.fixes

[1/1] watch_queue: keep info_id separate from rcu_head
https://git.kernel.org/vfs/vfs/c/53d72818f9e2