Skip to contentSkip to conversation

vfs fixes

GIT PULL Merged Christian Brauner 2 participants 2 messages Apr 10 VFS

lore
Share & tools
lore

Christian Brauner

author maintainer
#0 lore raw

Hey Linus,

/* Summary */

This contains a batch of late-stage fixes for this cycle. The kernfs rework can also go into during the v7.2 merge window. In which case you can either just cherry-pick the cachefiles and epoll fix.

The kernfs rbtree is keyed by (hash, ns, name) where the hash is seeded with the raw namespace pointer via init_name_hash(ns). The resulting hash values are exposed to userspace through readdir seek positions, and the pointer-based ordering in kernfs_name_compare() is observable through entry order.

Switch from raw pointers to ns_common::ns_id for both hashing and comparison. A preparatory commit first replaces all const void * namespace parameters with const struct ns_common * throughout kernfs/sysfs/kobject so the code can access ns->ns_id. Also compare the ns_id when hashes match in the rbtree to handle crafted collisions.

/* Conflicts */

Merge conflicts with mainline
=============================

No known conflicts.

Merge conflicts with other trees
================================

The following changes since commit d0c3bcd5b8976159d835a897254048e078f447e6:

Merge tag 'libcrypto-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux (2026-03-30 13:40:48 -0700)

are available in the Git repository at:

[email protected]:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-7.0-rc8.fixes

for you to fetch changes up to cb76a81c7cec37bdf525164561b02665cd763421:

kernfs: make directory seek namespace-aware (2026-04-09 14:36:52 +0200)

----------------------------------------------------------------
vfs-7.0-rc8.fixes

Please consider pulling these changes from the signed vfs-7.0-rc8.fixes tag.

Thanks!
Christian

----------------------------------------------------------------
Christian Brauner (3):
kernfs: pass struct ns_common instead of const void * for namespace tags
kernfs: use namespace id instead of pointer for hashing and comparison
kernfs: make directory seek namespace-aware

NeilBrown (1):
cachefiles: fix incorrect dentry refcount in cachefiles_cull()

Nicholas Carlini (1):
eventpoll: defer struct eventpoll free to RCU grace period

 drivers/base/class.c                |  4 +--
 drivers/base/core.c                 |  7 ++--
 drivers/infiniband/core/device.c    |  5 +--
 drivers/infiniband/ulp/srp/ib_srp.c |  7 ++--
 drivers/net/bonding/bond_sysfs.c    |  4 +--
 drivers/net/ipvlan/ipvtap.c         |  5 +--
 drivers/net/macvtap.c               |  5 +--
 fs/cachefiles/namei.c               |  5 +++
 fs/eventpoll.c                      |  6 +++-
 fs/kernfs/dir.c                     | 68 ++++++++++++++++++++++++++-----------
 fs/kernfs/file.c                    |  2 +-
 fs/kernfs/kernfs-internal.h         |  2 +-
 fs/kernfs/mount.c                   |  2 +-
 fs/nfs/sysfs.c                      | 16 +++++----
 fs/sysfs/dir.c                      |  6 ++--
 fs/sysfs/file.c                     |  8 ++---
 fs/sysfs/mount.c                    | 10 +++---
 fs/sysfs/symlink.c                  |  7 ++--
 fs/sysfs/sysfs.h                    |  4 +--
 include/linux/device/class.h        |  6 ++--
 include/linux/kernfs.h              | 40 +++++++++++++---------
 include/linux/kobject.h             |  4 +--
 include/linux/kobject_ns.h          | 13 +++----
 include/linux/netdevice.h           |  4 +--
 include/linux/sysfs.h               | 24 ++++++-------
 include/net/net_namespace.h         |  8 ++---
 lib/kobject.c                       |  8 ++---
 lib/kobject_uevent.c                | 13 ++++---
 net/core/net-sysfs.c                | 50 +++++++++++++--------------
 net/core/net_namespace.c            |  8 ++---
 net/sunrpc/sysfs.c                  | 17 ++++++----
 net/wireless/sysfs.c                |  4 +--
 32 files changed, 216 insertions(+), 156 deletions(-)