From: Josef Bacik <jbacik@fb.com>
To: Nikolay Borisov <kernel@kyup.com>, <clm@fb.com>, <dsterba@suse.com>
Cc: <linux-btrfs@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<operations@siteground.com>
Subject: Re: [PATCH] btrfs: Handle uninitialised inode eviction
Date: Wed, 29 Jun 2016 10:00:23 -0400 [thread overview]
Message-ID: <107fec56-cd51-257d-771b-5aa00bd0ebb1@fb.com> (raw)
In-Reply-To: <1467182801-16948-1-git-send-email-kernel@kyup.com>
On 06/29/2016 02:46 AM, Nikolay Borisov wrote:
> The code flow in btrfs_new_inode allows for btrfs_evict_inode to be
> called with not fully initialised inode (e.g. ->root member not
> being set). This can happen when btrfs_set_inode_index in
> btrfs_new_inode fails, which in turn would call iput for the newly
> allocated inode. This in turn leads to vfs calling into btrfs_evict_inode.
> This leads to null pointer dereference. To handle this situation check whether
> the passed inode has root set and just free it in case it doesn't.
>
> Signed-off-by: Nikolay Borisov <kernel@kyup.com>
Reviewed-by: Josef Bacik <jbacik@fb.com>
Thanks,
Josef
prev parent reply other threads:[~2016-06-29 14:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-29 6:46 [PATCH] btrfs: Handle uninitialised inode eviction Nikolay Borisov
2016-06-29 14:00 ` Josef Bacik [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=107fec56-cd51-257d-771b-5aa00bd0ebb1@fb.com \
--to=jbacik@fb.com \
--cc=clm@fb.com \
--cc=dsterba@suse.com \
--cc=kernel@kyup.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=operations@siteground.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox