Commit ebb0f38
committed
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: 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>1 parent d810d4c commit ebb0f38
1 file changed
Lines changed: 6 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2107 | 2107 | | |
2108 | 2108 | | |
2109 | 2109 | | |
2110 | | - | |
| 2110 | + | |
2111 | 2111 | | |
2112 | 2112 | | |
2113 | 2113 | | |
| |||
2124 | 2124 | | |
2125 | 2125 | | |
2126 | 2126 | | |
2127 | | - | |
2128 | | - | |
| 2127 | + | |
2129 | 2128 | | |
2130 | 2129 | | |
2131 | 2130 | | |
| |||
2135 | 2134 | | |
2136 | 2135 | | |
2137 | 2136 | | |
2138 | | - | |
2139 | | - | |
| 2137 | + | |
| 2138 | + | |
2140 | 2139 | | |
2141 | 2140 | | |
2142 | 2141 | | |
| |||
2147 | 2146 | | |
2148 | 2147 | | |
2149 | 2148 | | |
2150 | | - | |
| 2149 | + | |
2151 | 2150 | | |
2152 | 2151 | | |
2153 | | - | |
| 2152 | + | |
2154 | 2153 | | |
2155 | 2154 | | |
2156 | 2155 | | |
| |||
0 commit comments