[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200924141120.GX6756@twin.jikos.cz>
Date: Thu, 24 Sep 2020 16:11:20 +0200
From: David Sterba <dsterba@...e.cz>
To: linux-btrfs@...r.kernel.org
Cc: Chris Mason <clm@...com>, Josef Bacik <josef@...icpanda.com>,
David Sterba <dsterba@...e.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] btrfs: Fix potential null pointer deref
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.
>
> Fixes: a6dbd429d8dd ("Btrfs: fix panic when trying to destroy a newly allocated")
> Addresses-Coverity: CID 1497103: Null pointer dereferences (REVERSE_INULL)
> Signed-off-by: Alex Dewar <a.dewar@...sex.ac.uk>
For some reason my replies did not get to linux-btrfs@, so for the
record the changes has been folded to the patch "btrfs: clean BTRFS_I
usage in btrfs_destroy_inode".
Powered by blists - more mailing lists