Re: [PATCH] btrfs: Fix potential null pointer deref

2020-09-24 Thread David Sterba
On Mon, Sep 21, 2020 at 08:12:44PM +0100, Alex Dewar wrote: > In btrfs_destroy_inode(), the variable root may be NULL, but the check > for this takes place after its value has already been dereferenced to > access its fs_info member. Move the dereference operation to later in > the function. > > F

Re: [PATCH] btrfs: Fix potential null pointer deref

2020-09-21 Thread Josef Bacik
On 9/21/20 3:12 PM, Alex Dewar wrote: In btrfs_destroy_inode(), the variable root may be NULL, but the check for this takes place after its value has already been dereferenced to access its fs_info member. Move the dereference operation to later in the function. Fixes: a6dbd429d8dd ("Btrfs: fix

[PATCH] btrfs: Fix potential null pointer deref

2020-09-21 Thread Alex Dewar
In btrfs_destroy_inode(), the variable root may be NULL, but the check for this takes place after its value has already been dereferenced to access its fs_info member. Move the dereference operation to later in the function. Fixes: a6dbd429d8dd ("Btrfs: fix panic when trying to destroy a newly al