Thread (3 messages) 3 messages, 3 authors, 2021-07-06

Re: [PATCH v3] fs: forbid invalid project ID

From: Christoph Hellwig <hch@infradead.org>
Date: 2021-07-06 14:43:33
Also in: linux-f2fs-devel, linux-fsdevel, linux-xfs

quoted hunk ↗ jump to hunk
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>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help