aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/async-thread.c
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2017-09-11 16:15:28 +0100
committerDavid Sterba <dsterba@suse.com>2017-10-30 12:27:56 +0100
commit3993b112dac968612b0b213ed59cb30f50b0015b (patch)
tree6c686b1a0fb68a9ae28512e893d882b77b1615c4 /fs/btrfs/async-thread.c
parentfa0d0888bda13bc96d99024cba40ae3a135de385 (diff)
downloadlinux-3993b112dac968612b0b213ed59cb30f50b0015b.tar.gz
linux-3993b112dac968612b0b213ed59cb30f50b0015b.tar.bz2
linux-3993b112dac968612b0b213ed59cb30f50b0015b.zip
btrfs: avoid null pointer dereference on fs_info when calling btrfs_crit
There are checks on fs_info in __btrfs_panic to avoid dereferencing a null fs_info, however, there is a call to btrfs_crit that may also dereference a null fs_info. Fix this by adding a check to see if fs_info is null and only print the s_id if fs_info is non-null. Detected by CoverityScan CID#401973 ("Dereference after null check") Fixes: efe120a067c8 ("Btrfs: convert printk to btrfs_ and fix BTRFS prefix") Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/async-thread.c')
0 files changed, 0 insertions, 0 deletions