lkml.org 
[lkml]   [2017]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] btrfs: avoid null pointer dereference on fs_info when calling btrfs_crit
On Mon, Sep 11, 2017 at 04:15:28PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> 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>

\
 
 \ /
  Last update: 2017-09-12 13:29    [W:0.030 / U:0.892 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site