Re: [PATCH v2] btrfs-progs: Fix NULL pointer when receive clone operation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx>
> > 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux