diff options
author | Ross Zwisler <ross.zwisler@linux.intel.com> | 2016-01-23 00:10:59 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-01-23 02:02:18 +0100 |
commit | eab95db69d334745d3034072f4a7204084136c88 (patch) | |
tree | 3d54065f19a096d64caaf90793ceec9d527060a2 /drivers/block/drbd/drbd_bitmap.c | |
parent | xfs: call dax_pfn_mkwrite() for DAX fsync/msync (diff) | |
download | linux-eab95db69d334745d3034072f4a7204084136c88.tar.xz linux-eab95db69d334745d3034072f4a7204084136c88.zip |
dax: never rely on bh.b_dev being set by get_block()
Previously in DAX we assumed that calls to get_block() would set
bh.b_bdev, and we would then use that value even in error cases for
debugging. This caused a NULL pointer dereference in __dax_dbg() which
was fixed by a previous commit, but that commit only changed the one
place where we were hitting an error.
Instead, update dax.c so that we always initialize bh.b_bdev as best we
can based on the information that DAX has. get_block() may or may not
update to a new value, but this at least lets us get something helpful
from bh.b_bdev for error messages and not have to worry about whether it
was set by get_block() or not.
Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Reported-by: Jan Kara <jack@suse.cz>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/block/drbd/drbd_bitmap.c')
0 files changed, 0 insertions, 0 deletions