Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'vfs-6.16-rc7.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs

Pull vfs fixes from Christian Brauner:

- Fix a memory leak in fcntl_dirnotify()

- Raise SB_I_NOEXEC on secrement superblock instead of messing with
flags on the mount

- Add fsdevel and block mailing lists to uio entry. We had a few
instances were very questionable stuff was added without either block
or the VFS being aware of it

- Fix netfs copy-to-cache so that it performs collection with
ceph+fscache

- Fix netfs race between cache write completion and ALL_QUEUED being
set

- Verify the inode mode when loading entries from disk in isofs

- Avoid state_lock in iomap_set_range_uptodate()

- Fix PIDFD_INFO_COREDUMP check in PIDFD_GET_INFO ioctl

- Fix the incorrect return value in __cachefiles_write()

* tag 'vfs-6.16-rc7.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs:
MAINTAINERS: add block and fsdevel lists to iov_iter
netfs: Fix race between cache write completion and ALL_QUEUED being set
netfs: Fix copy-to-cache so that it performs collection with ceph+fscache
fix a leak in fcntl_dirnotify()
iomap: avoid unnecessary ifs_set_range_uptodate() with locks
isofs: Verify inode mode when loading from disk
cachefiles: Fix the incorrect return value in __cachefiles_write()
secretmem: use SB_I_NOEXEC
coredump: fix PIDFD_INFO_COREDUMP ioctl check

+63 -15
+2
MAINTAINERS
··· 25902 25902 25903 25903 USERSPACE COPYIN/COPYOUT (UIOVEC) 25904 25904 M: Alexander Viro <viro@zeniv.linux.org.uk> 25905 + L: linux-block@vger.kernel.org 25906 + L: linux-fsdevel@vger.kernel.org 25905 25907 S: Maintained 25906 25908 F: include/linux/uio.h 25907 25909 F: lib/iov_iter.c
-2
fs/cachefiles/io.c
··· 347 347 default: 348 348 ki->was_async = false; 349 349 cachefiles_write_complete(&ki->iocb, ret); 350 - if (ret > 0) 351 - ret = 0; 352 350 break; 353 351 } 354 352
+1 -3
fs/cachefiles/ondemand.c
··· 83 83 84 84 trace_cachefiles_ondemand_fd_write(object, file_inode(file), pos, len); 85 85 ret = __cachefiles_write(object, file, pos, iter, NULL, NULL); 86 - if (!ret) { 87 - ret = len; 86 + if (ret > 0) 88 87 kiocb->ki_pos += ret; 89 - } 90 88 91 89 out: 92 90 fput(file);
+3
fs/iomap/buffered-io.c
··· 71 71 unsigned long flags; 72 72 bool uptodate = true; 73 73 74 + if (folio_test_uptodate(folio)) 75 + return; 76 + 74 77 if (ifs) { 75 78 spin_lock_irqsave(&ifs->state_lock, flags); 76 79 uptodate = ifs_set_range_uptodate(folio, ifs, off, len);
+8 -1
fs/isofs/inode.c
··· 1440 1440 inode->i_op = &page_symlink_inode_operations; 1441 1441 inode_nohighmem(inode); 1442 1442 inode->i_data.a_ops = &isofs_symlink_aops; 1443 - } else 1443 + } else if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode) || 1444 + S_ISFIFO(inode->i_mode) || S_ISSOCK(inode->i_mode)) { 1444 1445 /* XXX - parse_rock_ridge_inode() had already set i_rdev. */ 1445 1446 init_special_inode(inode, inode->i_mode, inode->i_rdev); 1447 + } else { 1448 + printk(KERN_DEBUG "ISOFS: Invalid file type 0%04o for inode %lu.\n", 1449 + inode->i_mode, inode->i_ino); 1450 + ret = -EIO; 1451 + goto fail; 1452 + } 1446 1453 1447 1454 ret = 0; 1448 1455 out:
+5
fs/netfs/read_pgpriv2.c
··· 110 110 if (!creq->io_streams[1].avail) 111 111 goto cancel_put; 112 112 113 + __set_bit(NETFS_RREQ_OFFLOAD_COLLECTION, &creq->flags); 114 + trace_netfs_copy2cache(rreq, creq); 113 115 trace_netfs_write(creq, netfs_write_trace_copy_to_cache); 114 116 netfs_stat(&netfs_n_wh_copy_to_cache); 115 117 rreq->copy_to_cache = creq; ··· 156 154 netfs_issue_write(creq, &creq->io_streams[1]); 157 155 smp_wmb(); /* Write lists before ALL_QUEUED. */ 158 156 set_bit(NETFS_RREQ_ALL_QUEUED, &creq->flags); 157 + trace_netfs_rreq(rreq, netfs_rreq_trace_end_copy_to_cache); 158 + if (list_empty_careful(&creq->io_streams[1].subrequests)) 159 + netfs_wake_collector(creq); 159 160 160 161 netfs_put_request(creq, netfs_rreq_trace_put_return); 161 162 creq->copy_to_cache = NULL;
+4 -4
fs/notify/dnotify/dnotify.c
··· 308 308 goto out_err; 309 309 } 310 310 311 + error = file_f_owner_allocate(filp); 312 + if (error) 313 + goto out_err; 314 + 311 315 /* new fsnotify mark, we expect most fcntl calls to add a new mark */ 312 316 new_dn_mark = kmem_cache_alloc(dnotify_mark_cache, GFP_KERNEL); 313 317 if (!new_dn_mark) { 314 318 error = -ENOMEM; 315 319 goto out_err; 316 320 } 317 - 318 - error = file_f_owner_allocate(filp); 319 - if (error) 320 - goto out_err; 321 321 322 322 /* set up the new_fsn_mark and new_dn_mark */ 323 323 new_fsn_mark = &new_dn_mark->fsn_mark;
+1 -1
fs/pidfs.c
··· 319 319 if (!c) 320 320 return -ESRCH; 321 321 322 - if (!(kinfo.mask & PIDFD_INFO_COREDUMP)) { 322 + if ((kinfo.mask & PIDFD_INFO_COREDUMP) && !(kinfo.coredump_mask)) { 323 323 task_lock(task); 324 324 if (task->mm) 325 325 kinfo.coredump_mask = pidfs_coredump_mask(task->mm->flags);
+30
include/trace/events/netfs.h
··· 55 55 EM(netfs_rreq_trace_copy, "COPY ") \ 56 56 EM(netfs_rreq_trace_dirty, "DIRTY ") \ 57 57 EM(netfs_rreq_trace_done, "DONE ") \ 58 + EM(netfs_rreq_trace_end_copy_to_cache, "END-C2C") \ 58 59 EM(netfs_rreq_trace_free, "FREE ") \ 59 60 EM(netfs_rreq_trace_ki_complete, "KI-CMPL") \ 60 61 EM(netfs_rreq_trace_recollect, "RECLLCT") \ ··· 558 557 __entry->cookie, 559 558 __entry->ino, 560 559 __entry->start, __entry->start + __entry->len - 1) 560 + ); 561 + 562 + TRACE_EVENT(netfs_copy2cache, 563 + TP_PROTO(const struct netfs_io_request *rreq, 564 + const struct netfs_io_request *creq), 565 + 566 + TP_ARGS(rreq, creq), 567 + 568 + TP_STRUCT__entry( 569 + __field(unsigned int, rreq) 570 + __field(unsigned int, creq) 571 + __field(unsigned int, cookie) 572 + __field(unsigned int, ino) 573 + ), 574 + 575 + TP_fast_assign( 576 + struct netfs_inode *__ctx = netfs_inode(rreq->inode); 577 + struct fscache_cookie *__cookie = netfs_i_cookie(__ctx); 578 + __entry->rreq = rreq->debug_id; 579 + __entry->creq = creq->debug_id; 580 + __entry->cookie = __cookie ? __cookie->debug_id : 0; 581 + __entry->ino = rreq->inode->i_ino; 582 + ), 583 + 584 + TP_printk("R=%08x CR=%08x c=%08x i=%x ", 585 + __entry->rreq, 586 + __entry->creq, 587 + __entry->cookie, 588 + __entry->ino) 561 589 ); 562 590 563 591 TRACE_EVENT(netfs_collect,
+9 -4
mm/secretmem.c
··· 261 261 262 262 static int secretmem_init_fs_context(struct fs_context *fc) 263 263 { 264 - return init_pseudo(fc, SECRETMEM_MAGIC) ? 0 : -ENOMEM; 264 + struct pseudo_fs_context *ctx; 265 + 266 + ctx = init_pseudo(fc, SECRETMEM_MAGIC); 267 + if (!ctx) 268 + return -ENOMEM; 269 + 270 + fc->s_iflags |= SB_I_NOEXEC; 271 + fc->s_iflags |= SB_I_NODEV; 272 + return 0; 265 273 } 266 274 267 275 static struct file_system_type secretmem_fs = { ··· 286 278 secretmem_mnt = kern_mount(&secretmem_fs); 287 279 if (IS_ERR(secretmem_mnt)) 288 280 return PTR_ERR(secretmem_mnt); 289 - 290 - /* prevent secretmem mappings from ever getting PROT_EXEC */ 291 - secretmem_mnt->mnt_flags |= MNT_NOEXEC; 292 281 293 282 return 0; 294 283 }