diff options
| author | Zhao Lei <[email protected]> | 2016-05-17 09:37:38 +0000 |
|---|---|---|
| committer | David Sterba <[email protected]> | 2016-05-25 20:15:21 +0000 |
| commit | f1fee6534dcfbf468a159789aa202db2bce8c200 (patch) | |
| tree | 4149ed8954a0c344b354769d1c9bbed9a8e54114 /fs/btrfs/dev-replace.c | |
| parent | Btrfs: fix unexpected return value of fiemap (diff) | |
| download | kernel-f1fee6534dcfbf468a159789aa202db2bce8c200.tar.gz kernel-f1fee6534dcfbf468a159789aa202db2bce8c200.zip | |
btrfs: scrub: Set bbio to NULL before calling btrfs_map_block
We usually call btrfs_put_bbio() when btrfs_map_block() failed,
btrfs_put_bbio() works right whether bbio is a valid value, or NULL.
But there is a exception, in some case, btrfs_map_block() will return
fail without touching *bbio(keeping its original value), and if bbio
was not initialized yet, invalid memory accessing will happened.
Above case is in scrub_missing_raid56_pages(), and similar case in
scrub_raid56_parity().
Signed-off-by: Zhao Lei <[email protected]>
Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'fs/btrfs/dev-replace.c')
0 files changed, 0 insertions, 0 deletions
