Repository navigation
Commit 33e53f2
btrfs: fix potential overflow in cluster_pages_for_defrag on 32bit arch
commit a1fbc67 upstream.
On 32-bit systems, this shift will overflow for files larger than 4GB as
start_index is unsigned long while the calls to btrfs_delalloc_*_space
expect u64.
CC: stable@vger.kernel.org # 4.4+
Fixes: df48063 ("btrfs: extent-tree: Switch to new delalloc space reserve and release")
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: David Sterba <dsterba@suse.com>
[ define the variable instead of repeating the shift ]
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 9de4ffb commit 33e53f2
1 file changed
Lines changed: 4 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1255 | 1255 | | |
1256 | 1256 | | |
1257 | 1257 | | |
| 1258 | + | |
1258 | 1259 | | |
1259 | 1260 | | |
1260 | 1261 | | |
| |||
1271 | 1272 | | |
1272 | 1273 | | |
1273 | 1274 | | |
1274 | | - | |
1275 | | - | |
| 1275 | + | |
1276 | 1276 | | |
1277 | 1277 | | |
1278 | 1278 | | |
| |||
1361 | 1361 | | |
1362 | 1362 | | |
1363 | 1363 | | |
1364 | | - | |
1365 | | - | |
| 1364 | + | |
1366 | 1365 | | |
1367 | 1366 | | |
1368 | 1367 | | |
| |||
1389 | 1388 | | |
1390 | 1389 | | |
1391 | 1390 | | |
1392 | | - | |
1393 | | - | |
| 1391 | + | |
1394 | 1392 | | |
1395 | 1393 | | |
1396 | 1394 | | |
| |||
0 commit comments