Commit 247a725
fs/pipe: fix pipe buffer index use in FUSE
mainline inclusion
from mainline-v6.14-rc4
category: bugfix
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: 3d25216 ("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>
(cherry picked from commit ebb0f38)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
Change-Id: Ic3e35662fcf92645c667f80923a6c3e9a4281d701 parent fc21038 commit 247a725
1 file changed
Lines changed: 6 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1967 | 1967 | | |
1968 | 1968 | | |
1969 | 1969 | | |
1970 | | - | |
| 1970 | + | |
1971 | 1971 | | |
1972 | 1972 | | |
1973 | 1973 | | |
| |||
1984 | 1984 | | |
1985 | 1985 | | |
1986 | 1986 | | |
1987 | | - | |
1988 | | - | |
| 1987 | + | |
1989 | 1988 | | |
1990 | 1989 | | |
1991 | 1990 | | |
| |||
1995 | 1994 | | |
1996 | 1995 | | |
1997 | 1996 | | |
1998 | | - | |
1999 | | - | |
| 1997 | + | |
| 1998 | + | |
2000 | 1999 | | |
2001 | 2000 | | |
2002 | 2001 | | |
| |||
2007 | 2006 | | |
2008 | 2007 | | |
2009 | 2008 | | |
2010 | | - | |
| 2009 | + | |
2011 | 2010 | | |
2012 | 2011 | | |
2013 | | - | |
| 2012 | + | |
2014 | 2013 | | |
2015 | 2014 | | |
2016 | 2015 | | |
| |||
0 commit comments