linux/fs
Daniel Wagner b6139a6abf lib/group_cpus: Let group_cpu_evenly() return the number of initialized masks
group_cpu_evenly() might have allocated less groups then requested:

group_cpu_evenly()
  __group_cpus_evenly()
    alloc_nodes_groups()
      # allocated total groups may be less than numgrps when
      # active total CPU number is less then numgrps

In this case, the caller will do an out of bound access because the
caller assumes the masks returned has numgrps.

Return the number of groups created so the caller can limit the access
range accordingly.

Acked-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Daniel Wagner <wagi@kernel.org>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20250617-isolcpus-queue-counters-v1-1-13923686b54b@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2025-07-01 10:24:11 -06:00
..
9p
adfs
affs
afs
autofs
bcachefs bcachefs: Plumb correct ip to trans_relock_fail tracepoint 2025-06-26 00:01:16 -04:00
befs
bfs
btrfs for-6.16-rc3-tag 2025-06-23 11:16:38 -07:00
cachefiles
ceph
coda
configfs
cramfs
crypto
debugfs
devpts
dlm
ecryptfs
efivarfs
efs
erofs erofs: remove a superfluous check for encoded extents 2025-06-20 23:41:12 +08:00
exfat
exportfs
ext2
ext4
f2fs f2fs: fix to zero post-eof page 2025-06-18 21:35:29 +00:00
fat
freevxfs
fuse lib/group_cpus: Let group_cpu_evenly() return the number of initialized masks 2025-07-01 10:24:11 -06:00
gfs2
hfs
hfsplus
hostfs
hpfs
hugetlbfs
iomap
isofs
jbd2
jffs2
jfs
kernfs
lockd
minix
netfs
nfs
nfs_common
nfsd nfsd-6.16 fixes: 2025-06-21 09:20:15 -07:00
nilfs2
nls
notify
ntfs3
ocfs2
omfs
openpromfs
orangefs
overlayfs vfs-6.16-rc3.fixes 2025-06-16 08:18:43 -07:00
proc fs/proc/task_mmu: fix PAGE_IS_PFNZERO detection for the huge zero folio 2025-06-25 15:55:03 -07:00
pstore
qnx4
qnx6
quota
ramfs
resctrl x86,fs/resctrl: Remove inappropriate references to cacheinfo in the resctrl subsystem 2025-06-16 21:06:12 +02:00
romfs
smb cifs: Fix reading into an ITER_FOLIOQ from the smbdirect code 2025-06-26 11:13:16 -05:00
squashfs
sysfs
tests
tracefs
ubifs
udf
ufs
unicode
vboxsf
verity
xfs
zonefs
Kconfig
Kconfig.binfmt
Makefile
aio.c
anon_inodes.c
attr.c
backing-file.c
bad_inode.c
binfmt_elf.c
binfmt_elf_fdpic.c
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
bpf_fs_kfuncs.c
buffer.c
char_dev.c
compat_binfmt_elf.c
coredump.c
d_path.c
dax.c
dcache.c
direct-io.c
drop_caches.c
eventfd.c
eventpoll.c
exec.c
fcntl.c
fhandle.c
file.c fs: drop assert in file_seek_cur_needs_f_lock 2025-06-16 09:59:24 +02:00
file_table.c
filesystems.c
fs-writeback.c
fs_context.c
fs_parser.c
fs_pin.c
fs_struct.c
fs_types.c
fsopen.c
init.c
inode.c
internal.h
ioctl.c
kernel_read_file.c
libfs.c
locks.c
mbcache.c
mnt_idmapping.c
mount.h
mpage.c
namei.c VFS: change try_lookup_noperm() to skip revalidation 2025-06-11 12:03:42 +02:00
namespace.c userns and mnt_idmap leak in open_tree_attr(2) 2025-06-24 10:25:04 -04:00
nsfs.c
open.c
pidfs.c
pipe.c
pnode.c
pnode.h replace collect_mounts()/drop_collected_mounts() with a safer variant 2025-06-23 14:01:49 -04:00
posix_acl.c
proc_namespace.c
read_write.c
readdir.c
remap_range.c
select.c
seq_file.c
signalfd.c
splice.c
stack.c
stat.c
statfs.c
super.c fs: unlock the superblock during iterate_supers_type 2025-06-12 14:27:39 +02:00
sync.c
sysctls.c
timerfd.c
userfaultfd.c
utimes.c
xattr.c