]> www.infradead.org Git - users/dwmw2/linux.git/commit
fs/pipe: fix pipe buffer index use in FUSE
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 6 Mar 2025 17:53:25 +0000 (07:53 -1000)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 6 Mar 2025 17:53:25 +0000 (07:53 -1000)
commitebb0f38bb47f74b29e267babdbcd2c47d5292aa8
tree08d5de22ef643daece4769b36c32ceab024c92c8
parentd810d4c27bf34c719243bab9feb0d843edc09fd7
fs/pipe: fix pipe buffer index use in FUSE

This was another case that Rasmus pointed out where the direct access to
the pipe head and tail pointers broke on 32-bit configurations due to
the type changes.

As with the pipe FIONREAD case, fix it by using the appropriate helper
functions that deal with the right pipe index sizing.

Reported-by: Rasmus Villemoes <ravi@prevas.dk>
Link: https://lore.kernel.org/all/878qpi5wz4.fsf@prevas.dk/
Fixes: 3d252160b818 ("fs/pipe: Read pipe->{head,tail} atomically outside pipe->mutex")Cc: Oleg >
Cc: Mateusz Guzik <mjguzik@gmail.com>
Cc: K Prateek Nayak <kprateek.nayak@amd.com>
Cc: Swapnil Sapkal <swapnil.sapkal@amd.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/fuse/dev.c