From: Christoph Hellwig <hch@infradead.org>
To: Wang Shilong <wangshilong1991@gmail.com>
Cc: linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org,
linux-ext4@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [PATCH v3] fs: forbid invalid project ID
Date: Tue, 6 Jul 2021 14:52:48 +0100 [thread overview]
Message-ID: <YORgMAtpCBdc59cN@infradead.org> (raw)
In-Reply-To: <20210702140243.3615-1-wangshilong1991@gmail.com>
> diff --git a/fs/ioctl.c b/fs/ioctl.c
> index 1e2204fa9963..d7edc92df473 100644
> --- a/fs/ioctl.c
> +++ b/fs/ioctl.c
> @@ -806,6 +806,8 @@ static int fileattr_set_prepare(struct inode *inode,
> if (err)
> return err;
>
> + if (!projid_valid(make_kprojid(&init_user_ns, fa->fsx_projid)))
> + return -EINVAL;
> /*
And empty line before the comment would be nice for readability.
Otherwise looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@infradead.org>
To: Wang Shilong <wangshilong1991@gmail.com>
Cc: linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org,
linux-ext4@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH v3] fs: forbid invalid project ID
Date: Tue, 6 Jul 2021 14:52:48 +0100 [thread overview]
Message-ID: <YORgMAtpCBdc59cN@infradead.org> (raw)
In-Reply-To: <20210702140243.3615-1-wangshilong1991@gmail.com>
> diff --git a/fs/ioctl.c b/fs/ioctl.c
> index 1e2204fa9963..d7edc92df473 100644
> --- a/fs/ioctl.c
> +++ b/fs/ioctl.c
> @@ -806,6 +806,8 @@ static int fileattr_set_prepare(struct inode *inode,
> if (err)
> return err;
>
> + if (!projid_valid(make_kprojid(&init_user_ns, fa->fsx_projid)))
> + return -EINVAL;
> /*
And empty line before the comment would be nice for readability.
Otherwise looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next prev parent reply other threads:[~2021-07-06 14:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-02 14:02 [PATCH v3] fs: forbid invalid project ID Wang Shilong
2021-07-02 14:02 ` [f2fs-dev] " Wang Shilong
2021-07-06 13:52 ` Christoph Hellwig [this message]
2021-07-06 13:52 ` Christoph Hellwig
2021-07-06 22:06 ` Dave Chinner
2021-07-06 22:06 ` [f2fs-dev] " Dave Chinner
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=YORgMAtpCBdc59cN@infradead.org \
--to=hch@infradead.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=wangshilong1991@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.