Commit 2bed0d8
xfs: fix bounds check in xfs_defer_agfl_block()
Need to happen before we allocate and then leak the xefi. Found by
coverity via an xfsprogs libxfs scan.
[djwong: This also fixes the type of the @agbno argument.]
Fixes: 7dfee17 ("xfs: validate block number being freed before adding to xefi")
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>1 parent edd8276 commit 2bed0d8
1 file changed
Lines changed: 6 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2470 | 2470 | | |
2471 | 2471 | | |
2472 | 2472 | | |
2473 | | - | |
| 2473 | + | |
2474 | 2474 | | |
2475 | 2475 | | |
2476 | 2476 | | |
2477 | 2477 | | |
| 2478 | + | |
2478 | 2479 | | |
2479 | 2480 | | |
2480 | 2481 | | |
2481 | 2482 | | |
| 2483 | + | |
| 2484 | + | |
| 2485 | + | |
2482 | 2486 | | |
2483 | 2487 | | |
2484 | | - | |
| 2488 | + | |
2485 | 2489 | | |
2486 | 2490 | | |
2487 | 2491 | | |
2488 | 2492 | | |
2489 | | - | |
2490 | | - | |
2491 | | - | |
2492 | 2493 | | |
2493 | 2494 | | |
2494 | 2495 | | |
| |||
0 commit comments