From: David Sterba <dsterba@suse.cz>
To: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Cc: Qu Wenruo <quwenruo@cn.fujitsu.com>,
linux-btrfs@vger.kernel.org, dsterba@suse.cz
Subject: Re: [PATCH v2] btrfs-progs: Fix NULL pointer when receive clone operation
Date: Tue, 20 Dec 2016 17:32:39 +0100 [thread overview]
Message-ID: <20161220163239.GP3620@twin.jikos.cz> (raw)
In-Reply-To: <581c4b0a-c7fa-c07a-f656-ee88343fbe85@jp.fujitsu.com>
On Fri, Dec 16, 2016 at 09:37:54AM +0900, Tsutomu Itoh wrote:
> On 2016/12/15 17:37, Qu Wenruo wrote:
> > Regression introduced by:
> > commit a2f7af94abe4a3491ca1280a2ae1d63edc0d62ab
> > Author: Prasanth K S R <prasanth.ksr@dell.com>
> > Date: Sat Dec 10 19:17:43 2016 +0530
> >
> > btrfs-progs: subvol_uuid_search: return error encoded pointer
> >
> > IS_ERR() will only check if it's an error code, won't check if it's
> > NULL.
> > And for all the caller the commit modifies, it can return NULL and makes
> > cause segfault.
> >
> > Fix it by introducing new IS_ERR_OR_NULL() macro, and for NULL pointer
> > and needs to return int case, convert NULL pointer to -ENOENT.
>
> This patch also passed xfstests btrfs/{108,109,117}. Thanks for your work.
Applied, thanks.
prev parent reply other threads:[~2016-12-20 16:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-15 8:37 [PATCH v2] btrfs-progs: Fix NULL pointer when receive clone operation Qu Wenruo
2016-12-16 0:37 ` Tsutomu Itoh
2016-12-20 16:32 ` David Sterba [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=20161220163239.GP3620@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo@cn.fujitsu.com \
--cc=t-itoh@jp.fujitsu.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;
as well as URLs for NNTP newsgroup(s).