Skip to content

Commit 3b11717

Browse files
committed
Merge tag 'vfs.misc.v6.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping
Pull vfs fixes from Christian Brauner: - When allocating pages for a watch queue failed, we didn't return an error causing userspace to proceed even though all subsequent notifcations would be lost. Make sure to return an error. - Fix a misformed tree entry for the idmapping maintainers entry. - When setting file leases from an idmapped mount via generic_setlease() we need to take the idmapping into account otherwise taking a lease would fail from an idmapped mount. - Remove two redundant assignments, one in splice code and the other in locks code, that static checkers complained about. * tag 'vfs.misc.v6.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping: filelocks: use mount idmapping for setlease permission check fs/locks: Remove redundant assignment to cmd splice: Remove redundant assignment to ret MAINTAINERS: repair a malformed T: entry in IDMAPPED MOUNTS watch_queue: fix IOC_WATCH_QUEUE_SET_SIZE alloc error paths
2 parents 40d0c09 + 42d0c4b commit 3b11717

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

MAINTAINERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9871,10 +9871,10 @@ M: Christian Brauner <brauner@kernel.org>
98719871
M: Seth Forshee <sforshee@kernel.org>
98729872
L: linux-fsdevel@vger.kernel.org
98739873
S: Maintained
9874-
T: git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping.git
9874+
T: git git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping.git
98759875
F: Documentation/filesystems/idmappings.rst
9876-
F: tools/testing/selftests/mount_setattr/
98779876
F: include/linux/mnt_idmapping.*
9877+
F: tools/testing/selftests/mount_setattr/
98789878

98799879
IDT VersaClock 5 CLOCK DRIVER
98809880
M: Luca Ceresoli <luca@lucaceresoli.net>

fs/locks.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1863,9 +1863,10 @@ int generic_setlease(struct file *filp, long arg, struct file_lock **flp,
18631863
void **priv)
18641864
{
18651865
struct inode *inode = file_inode(filp);
1866+
vfsuid_t vfsuid = i_uid_into_vfsuid(file_mnt_idmap(filp), inode);
18661867
int error;
18671868

1868-
if ((!uid_eq(current_fsuid(), inode->i_uid)) && !capable(CAP_LEASE))
1869+
if ((!vfsuid_eq_kuid(vfsuid, current_fsuid())) && !capable(CAP_LEASE))
18691870
return -EACCES;
18701871
if (!S_ISREG(inode->i_mode))
18711872
return -EINVAL;
@@ -2425,7 +2426,6 @@ int fcntl_getlk64(struct file *filp, unsigned int cmd, struct flock64 *flock)
24252426
if (flock->l_pid != 0)
24262427
goto out;
24272428

2428-
cmd = F_GETLK64;
24292429
fl->fl_flags |= FL_OFDLCK;
24302430
fl->fl_owner = filp;
24312431
}

fs/splice.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -937,7 +937,6 @@ ssize_t splice_direct_to_actor(struct file *in, struct splice_desc *sd,
937937
/*
938938
* Do the splice.
939939
*/
940-
ret = 0;
941940
bytes = 0;
942941
len = sd->total_len;
943942
flags = sd->flags;

kernel/watch_queue.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ long watch_queue_set_size(struct pipe_inode_info *pipe, unsigned int nr_notes)
273273
if (ret < 0)
274274
goto error;
275275

276+
ret = -ENOMEM;
276277
pages = kcalloc(sizeof(struct page *), nr_pages, GFP_KERNEL);
277278
if (!pages)
278279
goto error;

0 commit comments

Comments
 (0)