summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2026-10-20fat: remove cluster allocation size limitMatheus Alves de Almeida
Patch series "fat: allocate multiple clusters in fallocate", v2. This series adds support for allocating multiple clusters in a single fat_add_clusters() call in fat_fallocate(). The multi-cluster TODO in inode.c is not implemented, as doing so would require speculative preallocation or an iomap conversion. This patch (of 3): fat_alloc_clusters() currently BUG()s when asked to allocate more than MAX_BUF_PER_PAGE / 2 clusters. This limit comes from the buffer_head array used to defer syncing and mirroring. Remove the allocation size limit by doing buffer_head batching like fat_free_clusters() does. Link: https://lore.kernel.org/20261012171106.146243-1-matheus.aalmeida@inf.ufrgs.br Link: https://lore.kernel.org/20261012171106.146243-2-matheus.aalmeida@inf.ufrgs.br Signed-off-by: Matheus Alves de Almeida <matheus.aalmeida@inf.ufrgs.br> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
2026-10-20fat: roll back the new entry when create/mkdir fails to build the inodezhoumin
vfat_create(), vfat_mkdir(), msdos_create() and msdos_mkdir() add the on-disk entry before calling fat_build_inode() to set up the VFS inode. If fat_build_inode() fails, the error is returned but the entry stays on disk and the file or directory shows up after remount. Remove the entry in that case. For mkdir, also free the directory cluster and decrement the parent's link count. [akpm@linux-foundation.org" export _fat_msg() to modules] Link: https://lore.kernel.org/tencent_4EDD66523CED299DB0C99498B4D8C939A009@qq.com Signed-off-by: zhoumin <teczm@foxmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
2026-10-20lib: kstrtox: use isdigit() in _parse_integer_limit()Thorsten Blum
Use isdigit() to replace the open-coded implementation. Link: https://lore.kernel.org/20261013072108.4407-3-blum@kernel.org Signed-off-by: Thorsten Blum <blum@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
2026-10-20ocfs2: publish the filecheck owner before adding sysfs attributesCen Zhang
ocfs2_filecheck_create_sysfs() initializes the filecheck allocation before calling kobject_init_and_add(), but assigns entry->fs_fcheck only after that call returns. The default attribute group can already be visible while registration is in progress. A concurrent read can therefore enter ocfs2_filecheck_attr_show() with a NULL fs_fcheck and try to lock its fc_lock. Assign the initialized owner before adding the kobject, so every activated attribute has valid state. Clear the pointer when addition fails, preserving the existing teardown guard and error cleanup. A controlled probe-instrumented test kernel with the original OCFS2 registration ordering produced this Oops during a concurrent sysfs read: KASAN: null-ptr-deref in range [0x0000000000000028-0x000000000000002f] RIP: 0010:kasan_byte_accessible+0x15/0x30 Call Trace: <TASK> __kasan_check_byte+0x13/0x50 lock_acquire+0x113/0x300 _raw_spin_lock+0x31/0x40 ocfs2_filecheck_attr_show+0x138/0x5f0 ocfs2_filecheck_show+0x5d/0x90 sysfs_kf_seq_show+0x1d3/0x360 seq_read_iter+0x480/0x1110 kernfs_fop_read_iter+0x419/0x5a0 vfs_read+0x7d2/0xc20 ksys_read+0x111/0x200 do_syscall_64+0x114/0x620 entry_SYSCALL_64_after_hwframe+0x77/0x7f </TASK> Modules linked in: Link: https://lore.kernel.org/pm-ocfs2-objects-candidate-0086-v4-1b3a3c5fd05c1fb41df9@gmail.com Fixes: 5f483c4abb50 ("ocfs2: add kobject for online file check") Signed-off-by: Cen Zhang <zzzccc427@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Heming Zhao <heming.zhao@suse.com> Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com> Assisted-by: LLM Cc: Mark Fasheh <mark@fasheh.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: Gang He <ghe@suse.com> Cc: Jia-Ju Bai <baijiaju1990@gmail.com> Cc: <jjzuming@gmail.com> Cc: <stable@vger.kernel.org>
2026-10-20ocfs2: initialize status waiters before publishing themCen Zhang
o2net_prep_nsw() publishes its stack waiter in nn_status_idr and nn_status_list under nn_lock, then initializes the wait queue and completion status after releasing the lock. A concurrent disconnect can find that waiter through o2net_complete_nodes_nsw() and call wake_up() before the wait queue has a valid lock and list head. The sender can also overwrite a completion status with its initial value. Initialize the wait queue and status before publishing the waiter. nn_lock then orders publication against completion, and no reader can observe a partially initialized object. Leave the IDR allocation and its failure handling unchanged. A controlled case-modified test kernel used a synthetic connection to enter the real send path and overlap publication with disconnect. The candidate completion and wake-up code were unchanged. Its Oops includes: KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] RIP: 0010:__wake_up_common+0xa0/0x1f0 Call Trace: <TASK> __wake_up+0x36/0x60 o2net_complete_nsw_locked+0x222/0x370 o2net_set_nn_state+0x917/0xea0 o2net_disconnect_node+0xd0/0x190 o2net_validate_control_write+0x454/0x500 full_proxy_write+0x11f/0x180 vfs_write+0x25a/0x1010 ksys_write+0x111/0x200 do_syscall_64+0x114/0x620 entry_SYSCALL_64_after_hwframe+0x77/0x7f </TASK> Modules linked in: Link: https://lore.kernel.org/pm-ocfs2-objects-candidate-0066-v1-437a0422801b292a2879@gmail.com Fixes: 98211489d414 ("[PATCH] OCFS2: The Second Oracle Cluster Filesystem") Signed-off-by: Cen Zhang <zzzccc427@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com> Assisted-by: LLM Cc: Mark Fasheh <mark@fasheh.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: Kees Cook <kees@kernel.org> Cc: Jakub Kicinski <kuba@kernel.org> Cc: Kurt Hackel <kurt.hackel@oracle.com> Cc: Jia-Ju Bai <baijiaju1990@gmail.com> Cc: <jjzuming@gmail.com>
2026-10-20ocfs2: deal with legacy signed xattr name hash valuesJoseph Qi
Commit 3bc753c06dd0 ("kbuild: treat char as always unsigned") set -funsigned-char globally, which changed the result of the naked 'char' load in ocfs2_xattr_name_hash(): hash = (hash << OCFS2_HASH_SHIFT) ^ (hash >> (8*sizeof(hash) - OCFS2_HASH_SHIFT)) ^ *name++; A name byte >= 0x80 used to sign-extend and now zero-extends, so the hash no longer matches the xe_name_hash an older kernel stored. An indexed xattr tree is searched by that hash alone, and both the bucket binary search and the entry scan within it stop as soon as the wanted hash falls below an entry's, so the entry is never reached: getxattr, setxattr and removexattr return -ENODATA for a name that listxattr still lists. Search with the current unsigned hash and, on a miss, retry with the legacy signed one, as ext4 does in commit f3bbac32475b2 ("ext4: deal with legacy signed xattr name hash values"). New entries are always stored under the unsigned hash. Skip the retry when the two hashes are equal, so that a miss on an ASCII name does not walk the tree twice. A miss is not empty handed: ocfs2_xattr_bucket_find() leaves xs->bucket holding the bucket a new entry would go into. So after a double miss drop it and search once more with the unsigned hash, otherwise a new entry would be placed by its legacy hash and stored under its unsigned one, breaking the ordering the search relies on. Only indexed trees are affected; inline xattrs and non-indexed xattr blocks compare names with memcmp and never look at the hash. Also spell out the signedness instead of leaving the current hash to -funsigned-char, as commit 854f0912f813 ("ext4: make xattr char unsignedness in hash explicit") did, so that both variants stay correct if this is backported to a kernel without the flag. Link: https://lore.kernel.org/20261009083002.2621201-4-joseph.qi@linux.alibaba.com Fixes: 3bc753c06dd0 ("kbuild: treat char as always unsigned") Signed-off-by: Joseph Qi <joseph.qi@linux.alibaba.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Heming Zhao <heming.zhao@suse.com> Cc: Anderson Ferneda <anderson.ferneda@braza.com.br> Cc: Mark Fasheh <mark@fasheh.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: <stable@vger.kernel.org> # 6.2+
2026-10-20ocfs2: use the stored hash when checking xattr bucket collisionJoseph Qi
ocfs2_check_xattr_bucket_collision() decides whether splitting a full bucket can make room for the entry being set by recomputing the hash of the name: u32 name_hash = ocfs2_xattr_name_hash(inode, name, strlen(name)); if (name_hash != le32_to_cpu(xh->xh_entries[0].xe_name_hash)) return 0; For a new entry that is the hash it will be stored under, so comparing it is correct. An existing entry keeps the hash it already has: an update never rewrites xe_name_hash, since ocfs2_xa_add_entry() is the only writer of that field for a real entry and ocfs2_xa_prepare_entry() calls it only when loc->xl_entry is NULL. An entry stored by a kernel that sign-extended the name bytes when hashing can still be updated, because ocfs2_xattr_find_entry() searches a non-indexed xattr block by memcmp on the name and never looks at xe_name_hash. Growing it past the space left in the block converts the block into a tree, ocfs2_cp_xattr_block_to_bucket() fills the bucket in stored hash order, and the update runs out of room in the bucket too. The collision check then compares the unsigned hash against the legacy hashes in the bucket and reports no collision. ocfs2_xattr_set_entry_index_block() goes on to allocate a bucket that ocfs2_divide_xattr_bucket() cannot fill: a bucket whose entries all share one hash has no divide position, so all it does is append an empty bucket with a sentinel hash one above the last entry's. The re-search that follows depends on where the unsigned hash sorts. Below the legacy ones, it comes back to the full bucket and the set fails with -ENOSPC, having grown the tree for nothing. Above them, it lands on the new empty bucket, which ocfs2_xattr_bucket_find() handles explicitly and ocfs2_find_xe_in_bucket() scans zero times, so the set stores a second copy of the entry under the unsigned hash and returns success. The original stays in the full bucket, listxattr reports the name twice and getxattr returns the new copy. Pass the hash the entry is stored under instead: the stored one for an existing entry, the unsigned one for a new entry. A tree whose entries are all stored under the unsigned hash sees no change, since there the two are the same value. Link: https://lore.kernel.org/20261009083002.2621201-3-joseph.qi@linux.alibaba.com Fixes: 3bc753c06dd0 ("kbuild: treat char as always unsigned") Signed-off-by: Joseph Qi <joseph.qi@linux.alibaba.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Heming Zhao <heming.zhao@suse.com> Cc: Anderson Ferneda <anderson.ferneda@braza.com.br> Cc: Mark Fasheh <mark@fasheh.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: <stable@vger.kernel.org> # 6.2+
2026-10-20ocfs2: deal with legacy signed dir index name hash valuesJoseph Qi
Patch series "ocfs2: deal with legacy signed name hash values", v2. Commit 3bc753c06dd0 ("kbuild: treat char as always unsigned") turned on -funsigned-char globally, which changed the result of two naked 'char' loads in ocfs2 hashing code: str2hashbuf() val = msg[i] + (val << 8); ocfs2_xattr_name_hash() hash = (hash << 5) ^ (hash >> 27) ^ *name++; A name byte >= 0x80 used to sign-extend and now zero-extends. Both results are written to disk, the first into the dx leaf when a directory entry is indexed and the second into xe_name_hash when an xattr is stored, so anything written by a pre-6.2 kernel is looked up under a different hash and is no longer found. readdir and listxattr still list those names because neither of them hashes, which makes this look like the filesystem losing entries rather than like a lookup bug. Anderson Ferneda reported it that way for directories with non-ASCII names [1]. Patches 1 and 3 do what ext4 did in commit f3bbac32475b2 ("ext4: deal with legacy signed xattr name hash values"): look up with the current unsigned hash, retry with the legacy signed one on a miss, and always store new entries under the unsigned hash. The retry is skipped when the two hashes come out equal, so an ASCII name does not walk the index twice. Both hash functions now spell out the signedness instead of leaving it to -funsigned-char, as commit 854f0912f813 ("ext4: make xattr char unsignedness in hash explicit") did, so a backport to a kernel without the flag still computes both variants correctly. Patch 2 is a separate fix, placed before patch 3 so that every commit in the series is correct on its own. ocfs2_check_xattr_bucket_collision() recomputes the hash of the name to decide whether splitting a full bucket can make room for the entry being set. That is right for a new entry and wrong for one that already exists, since an update leaves xe_name_hash alone. Against a bucket holding legacy hashes the comparison does not match, so the split goes ahead and cannot help: a bucket whose entries all share one hash has no divide position. How that ends depends on where the unsigned hash sorts. Below the legacy ones, the set fails with -ENOSPC after growing the tree for nothing. Above them, it lands in the empty bucket the split just appended and stores a second copy of the entry there while the original stays behind, so listxattr reports the name twice. Using the stored hash closes both. Nothing retires a legacy hash at runtime. Deleting or updating an entry does not rewrite it, and the only code that rehashes existing dirents is ocfs2_expand_inline_dir() on the inline to extent conversion, so the retry stays for as long as the legacy entries do. Rebuilding the index offline is what removes it for good. This patch (of 3): Commit 3bc753c06dd0 ("kbuild: treat char as always unsigned") set -funsigned-char globally, which changed the result of the naked 'char' load in str2hashbuf(): val = msg[i] + (val << 8); A name byte >= 0x80 used to sign-extend and now zero-extends, so ocfs2_dx_dir_name_hash() computes a different hash pair for every name containing one. The pair is written into the dx leaf when the entry is created, so an index built by an older kernel no longer matches and ocfs2_dx_dir_search() returns -ENOENT for a name that readdir still lists. Search with the current unsigned hash and, on a miss, retry with the legacy signed one, as ext4 does in commit f3bbac32475b2 ("ext4: deal with legacy signed xattr name hash values"). New entries are always indexed under the unsigned hash. Skip the retry when the two hashes are equal, so that a miss on an ASCII name does not walk the index twice. The retry costs a second walk of the dx tree, so a negative lookup of a name containing a byte >= 0x80 does twice the work. That is bounded and worth it, and directories whose dx root is still inline pay nothing extra, since there the retry only rescans the root block that is already loaded. Nothing retires it at runtime: a legacy entry keeps its legacy hash, because neither deleting nor updating an entry rewrites the dx hash, and the only code that rehashes existing dirents is ocfs2_expand_inline_dir() on the inline to extent conversion. Rebuilding the index offline is what removes the cost for good. Also spell out the signedness in str2hashbuf() instead of leaving the current hash to -funsigned-char, as commit 854f0912f813 ("ext4: make xattr char unsignedness in hash explicit") did, so that both variants stay correct if this is backported to a kernel without the flag. Link: https://lore.kernel.org/20261009083002.2621201-1-joseph.qi@linux.alibaba.com Link: https://lore.kernel.org/20261009083002.2621201-2-joseph.qi@linux.alibaba.com Fixes: 3bc753c06dd0 ("kbuild: treat char as always unsigned") Signed-off-by: Joseph Qi <joseph.qi@linux.alibaba.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reported-by: Anderson Ferneda <anderson.ferneda@braza.com.br> Closes: https://lore.kernel.org/ocfs2-devel/CP5P284MB2780AC2C3C2AB2CF2B6CB7AFBE942@CP5P284MB2780.BRAP284.PROD.OUTLOOK.COM/ Reviewed-by: Heming Zhao <heming.zhao@suse.com> Cc: Mark Fasheh <mark@fasheh.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: <stable@vger.kernel.org> # 6.2+
2026-10-20lib/cmdline: fix get_options() count and overflow with large rangesArmaan Sandhu
get_range() stops writing once the array is full, but get_options() still advances its index by the whole range. So "1-100" parsed into four ints reports 99 numbers, and a range like "0-2147483647" wraps the index negative and writes outside the array. Stop once a range fills the array, bail out in validation mode before the count overflows, and saturate the range length in get_range(). Add KUnit cases; without the fix "0-2147483647" panics the test kernel. Only root can supply this input, so this is a robustness fix. [akpm@linux-foundation.org: add additional test case from Leizhen] Link: https://lore.kernel.org/20261005213945.359905-1-armaan.sandhu0504@gmail.com Fixes: 22f2e2801799 ("[PATCH] get_options to allow a hypenated range for isolcpus") Signed-off-by: Armaan Sandhu <armaan.sandhu0504@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reported-by: Leizhen Zhang <lzsx618@gmail.com> Reviewed-by: Leizhen Zhang <lzsx618@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@intel.com> Cc: <stable@vger.kernel.org>
2026-10-20ocfs2/heartbeat: unlink live slots when their node is missingCen Zhang
o2hb_shutdown_slot() returns immediately when its node is no longer in the configfs registry. A slot can still be linked in o2hb_live_slots when that lookup fails. Region teardown or startup-error cleanup then frees the slot array without removing its embedded list member. With the same peer live in another region, the next list update can follow a predecessor into the freed array. Reusing the node number can also make a later insertion encounter that stale member. Always remove the slot under o2hb_live_lock, even when node lookup fails. Preserve aggregate membership accounting and the last-region DOWN callback: the existing callback interface explicitly permits a NULL node for DOWN events. Only drop the node reference when lookup returned one. This closes both normal release and startup-abort paths without changing the publication or callback locking protocol. Also require a configured node before admitting a new live slot in o2hb_check_slot(). The early live-bitmap check is not held through admission: the last live slot in another region can be removed in between. Without a node, admission can then queue an UP event with a NULL argument and hit the event helper's BUG_ON. Existing live slots can still leave and generate NULL-node DOWN events. A controlled probe-instrumented test reproduced this while stopping one of two regions after removing the peer from configfs. Its KASAN report includes: BUG: KASAN: slab-use-after-free in __list_del_entry_valid_or_report+0x1e0/0x210 Read of size 8 at addr ffff888106a4ac60 by task o2hb-pmbd0058_b/497 Call Trace: <TASK> dump_stack_lvl+0x93/0xd0 print_report+0xce/0x630 kasan_report+0xe0/0x110 __list_del_entry_valid_or_report+0x1e0/0x210 o2hb_do_disk_heartbeat+0x1591/0x2c50 o2hb_thread+0x1ed/0xe70 kthread+0x351/0x460 ret_from_fork+0x659/0x940 ret_from_fork_asm+0x1a/0x30 </TASK> Allocated by task 491: kasan_save_stack+0x33/0x60 kasan_save_track+0x14/0x30 __kasan_kmalloc+0xaa/0xb0 __kmalloc_noprof+0x2de/0x780 o2hb_region_dev_store+0x7c2/0x1b60 configfs_write_iter+0x2f9/0x4f0 vfs_write+0x639/0x1010 ksys_write+0x111/0x200 do_syscall_64+0x114/0x620 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 491: kasan_save_stack+0x33/0x60 kasan_save_track+0x14/0x30 kasan_save_free_info+0x3b/0x60 __kasan_slab_free+0x5f/0x80 kfree+0x308/0x580 o2hb_unmap_slot_data+0x1db/0x330 o2hb_region_release+0x14b/0x4f0 config_item_cleanup+0x14b/0x230 config_item_put+0x79/0x90 configfs_rmdir+0x58a/0x910 vfs_rmdir+0x2e8/0x820 filename_rmdir+0x3b1/0x520 __x64_sys_rmdir+0x4b/0x70 do_syscall_64+0x114/0x620 entry_SYSCALL_64_after_hwframe+0x77/0x7f Link: https://lore.kernel.org/pm-ocfs2-objects-candidate-0058-v2-9446113c2b16c817c538@gmail.com Fixes: a7f6a5fb4bde ("[PATCH] OCFS2: The Second Oracle Cluster Filesystem") Signed-off-by: Cen Zhang <zzzccc427@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com> Assisted-by: LLM Cc: Mark Fasheh <mark@fasheh.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: Yufan Chen <ericterminal@gmail.com> Cc: Kees Cook <kees@kernel.org> Cc: Jia-Ju Bai <baijiaju1990@gmail.com> Cc: <jjzuming@gmail.com> Cc: <stable@vger.kernel.org>
2026-10-20ocfs2: reserve xattr value tree metadata only onceJoseph Qi
ocfs2_calc_xattr_set_need() asks for the new value's extent tree twice when it replaces an inline value smaller than a value root with one large enough to be stored outside. The "stored outside" branch reserves the tree and then falls through to meta_guess instead of going out: if (!ocfs2_xattr_is_local(xe)) { ... xv = (struct ocfs2_xattr_value_root *) (base + name_offset + name_len); value_size = OCFS2_XATTR_ROOT_SIZE; } else xv = &def_xv.xv; if (old_clusters >= new_clusters) { ... goto out; } else { meta_add += ocfs2_extend_meta_needed(&xv->xr_list); ... if (value_size >= OCFS2_XATTR_ROOT_SIZE) goto out; } On the fall-through xv is def_xv, so what gets added here is the two blocks ocfs2_extend_meta_needed() wants for an empty value root -- and both sides of meta_guess reserve that same tree again. The create side has done so since commit 3ed2be719eb9 ("ocfs2: allow for more than one data extent when creating xattr"), which ported this reservation to the create case without noticing it was already on the way in, and the existing-block side since commit 0cdc7dde00ec ("ocfs2: fix missing metadata reservation for large xattrs"). Both were chasing the same RESTART_META failure in ocfs2_xattr_extend_allocation(), for xattr create and then for xattr update. ocfs2_init_xattr_set_ctxt() hands the total straight to ocfs2_reserve_new_metadata_blocks(), so the surplus is two blocks held for the whole transaction. A setxattr that would otherwise fit can come back -ENOSPC on a filesystem whose metadata allocator is nearly exhausted. Move the reservation into the branch that stops there, leaving meta_guess as the only place that reserves for a value tree the fall through is about to create. The paths that do go out keep reserving against the value root they already have, which for an external old value is the on-disk one and so can legitimately ask for more than two blocks. Both sides of meta_guess have to come out even on their own now that the copy covering for them is gone. The existing-block side only started reserving the value tree in the commit this one is tagged against. The create side has reserved the tree since 3ed2be719eb9, but only the tree: the block ocfs2_create_xattr_block() claims came out of the same two, and on the fall-through it was the duplicate removed here that made up the difference. So "ocfs2: reserve metadata for a new xattr block and its value tree" has to land first -- without it the create side reserves 2 where 3 are needed and the value tree is back to RESTART_META. That one fixes a shortfall of its own on the path that reaches meta_guess directly, where there was never a duplicate to cover it, so it is worth taking alone; this patch is not. Link: https://lore.kernel.org/20261010113454.1420939-4-joseph.qi@linux.alibaba.com Fixes: 0cdc7dde00ec ("ocfs2: fix missing metadata reservation for large xattrs") Signed-off-by: Joseph Qi <joseph.qi@linux.alibaba.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Cc: Heming Zhao <heming.zhao@suse.com> Cc: Mark Fasheh <mark@fasheh.com> Cc: Joel Becker <jlbec@evilplan.org>
2026-10-20ocfs2: reserve value tree metadata when moving an xattr into the inodeJoseph Qi
ocfs2_calc_xattr_set_need() charges no metadata for the case where an xattr living in an xattr block or bucket moves back into the inode: if (old_in_xb) { if (ocfs2_xattr_can_be_in_inode(inode, xi, xis)) { clusters_add += new_clusters; credits += ...; if (!ocfs2_xattr_is_local(xe)) credits += ocfs2_calc_extend_credits(...); goto out; } } The credits for extending a value tree are there but the matching blocks are not, so meta_add stays 0, ocfs2_init_xattr_set_ctxt() skips ocfs2_reserve_new_metadata_blocks() and ctxt->meta_ac is left NULL. This is the shape commit 0cdc7dde00ec ("ocfs2: fix missing metadata reservation for large xattrs") fixed for the xattr block case, and it is reached the same way: namevalue_size() charges a value larger than OCFS2_XATTR_INLINE_SIZE as only OCFS2_XATTR_ROOT_SIZE, so ocfs2_xattr_can_be_in_inode() accepts a new value that will be stored outside. ocfs2_xa_prepare_entry() installs a value root from def_xv and grows it, and once the cluster allocator is fragmented enough to need a second extent ocfs2_add_clusters_in_btree() finds the root full with no meta_ac at all and answers RESTART_META. ocfs2_xattr_extend_allocation() turns that into -ENOSPC, or into a BUG_ON() without that commit, and ocfs2_xa_cleanup_value_truncate() takes its !orig_clusters arm, dropping the entry and leaking the clusters already handed out until fsck.ocfs2 reclaims them. Reserve for the value tree here too. The entry moves back into the inode rather than into a new xattr block, so unlike the create side of meta_guess this needs no block of its own. Link: https://lore.kernel.org/20261010113454.1420939-3-joseph.qi@linux.alibaba.com Fixes: 78f30c314a74 ("ocfs2/xattr: Reserve meta/data at the beginning of ocfs2_xattr_set.") Signed-off-by: Joseph Qi <joseph.qi@linux.alibaba.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Cc: Heming Zhao <heming.zhao@suse.com> Cc: Mark Fasheh <mark@fasheh.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: <stable@vger.kernel.org>
2026-10-20ocfs2: reserve metadata for a new xattr block and its value treeJoseph Qi
Patch series "ocfs2: fix metadata reservation for xattr value trees". ocfs2_calc_xattr_set_need() reserves too little metadata for a new xattr value's extent tree on three paths. The reservation cannot be topped up once the transaction has started, so ocfs2_add_clusters_in_btree() gives up with RESTART_META when the value root fills and nothing is left. ocfs2_xattr_extend_allocation() turns that into -ENOSPC, after ocfs2_xa_cleanup_value_truncate() has dropped the entry and leaked the clusters already handed out; before commit 0cdc7dde00ec ("ocfs2: fix missing metadata reservation for large xattrs") it was a BUG_ON() instead. It takes a fragmented cluster allocator to get there, since the first extent always fits in the root. Patch 1 fixes the create side of meta_guess: commit 3ed2be719eb9 ("ocfs2: allow for more than one data extent when creating xattr") replaced the block reserved for the new xattr block with the two the value tree needs instead of adding them together. Patch 2 fixes the arm that moves an xattr back into the inode, which charges credits for a value tree but no metadata for one. Patch 3 drops a second copy of the same reservation on the path that falls through to meta_guess. That one is cleanup rather than a fix and is not for stable, and it must not be backported without patch 1: the duplicate it removes is what currently covers the shortfall patch 1 fixes. This patch (of 3): The create side of meta_guess in ocfs2_calc_xattr_set_need() reserves metadata for the new value's extent tree and nothing for the xattr block that will hold it: } else { credits += OCFS2_XATTR_BLOCK_CREATE_CREDITS; if (xi->xi_value_len > OCFS2_XATTR_INLINE_SIZE) { struct ocfs2_extent_list *el = &def_xv.xv.xr_list; meta_add += ocfs2_extend_meta_needed(el); ... Commit 3ed2be719eb9 ("ocfs2: allow for more than one data extent when creating xattr") meant to add that tree on top of the meta_add += 1 the branch already had, but it moved the 1 into the else arm instead, so the external-value case lost it. The 1 is not optional: it is what ocfs2_create_xattr_block() takes from meta_ac through ocfs2_claim_metadata(), and it is spent before the value tree exists. ocfs2_extend_meta_needed() on the empty def_xv list returns 2, so the branch reserves 2 where 3 are needed. The xattr block consumes one, and when the cluster allocator is fragmented enough that the value needs more than one extent, ocfs2_add_clusters_in_btree() comes back around with a full value root and ocfs2_alloc_context_bits_left() of 1 against a threshold of 2. It answers RESTART_META, which ocfs2_xattr_extend_allocation() turns into a BUG_ON(). Commit 0cdc7dde00ec ("ocfs2: fix missing metadata reservation for large xattrs") downgraded that to -ENOSPC, at the cost of leaking the clusters already handed out: ocfs2_xa_cleanup_value_truncate() takes its !orig_clusters arm, drops the entry and leaves the clusters for fsck.ocfs2 to reclaim. Reserve for the block and the tree separately. Link: https://lore.kernel.org/20261010113454.1420939-1-joseph.qi@linux.alibaba.com Link: https://lore.kernel.org/20261010113454.1420939-2-joseph.qi@linux.alibaba.com Fixes: 3ed2be719eb9 ("ocfs2: allow for more than one data extent when creating xattr") Signed-off-by: Joseph Qi <joseph.qi@linux.alibaba.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Cc: Heming Zhao <heming.zhao@suse.com> Cc: Mark Fasheh <mark@fasheh.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: <stable@vger.kernel.org>
2026-10-20smb client: fix mis-merge with fileattr_set taking a const idmapLinus Torvalds
The danger of doing the merge window while on vacation and traveling with just the laptop: I only do full builds a couple of times a day because they are so slow on my poor little laptop. As a result, I missed the conflict between the newly added smb client fileattr_set function (commit 273913b7c33a: "smb: client: implement fileattr_set for compression flags") and the vfs layer having in the meantime made the idmap argument 'const' (commit 025756ee7b47: "fs: port mnt_idmap() and file_mnt_idmap() to const mnt_idmap") Mea culpa. Fixes: 32543b09681a ("Merge tag 'cifs-for-7.4' of https://git.manguebit.org/linux") Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2026-10-20Merge branch 'selftests-drv-net-introduce-flow-control-selftest'Jakub Kicinski
Maxime Chevallier says: ==================== selftests: drv-net: Introduce flow-control selftest This test aims at validating the flow control implementation in drivers, using the ethtool API. The test can run in various conditions : DUT <-----> Anything that has link up (not controllable) DUT <-----> A directly connected device It enumerates the local and remote device's capabilities, to test as much as possibly testable. I've run it on 17 different boards connected to other boards through various means : Usb to Eth dongles, direct connection to the board, connection through a switch. Some of the ports tested were user ports of DSA switches too. Contrary to V2, on V3 we really only have a collection of actual failures that show during tests, as one of the peer's I'm running these on has a v6.18 kernel that pre-dates the realtek phylink port and show actual bugs in the driver. ==================== Link: https://patch.msgid.link/20261015134350.629593-1-maxime.chevallier@bootlin.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-20selftests: drv-net: pause: Validate pause autoneg interactions with link autonegMaxime Chevallier (Netdev Foundation)
Pause autonegotiation happens with the link partner using the same words as the link negotiation, used for speed and duplex exchanges. However, pause and link autonegotiation can be separately toggled : ethtool -s eth0 autoneg on # Enable link negotiation ethtool -A eth0 autoneg on # Enable Pause negotiation Pause can't be negotiated if the link autoneg isn't enabled. Pause autoneg and link autoneg settings must not interfere with one another when user is configuring them : - If Pause autoneg is on, it must stay on when link autoneg is disabled (even though Pause won't actually be negotiated) - If Pause autoneg is off, it must stay off when link autoneg is enabled Introduce a set of tests to verify that pause and link autoneg are behaving correctly, in particular that the user intent is correctly cached when toggling link autoneg. Signed-off-by: Maxime Chevallier (Netdev Foundation) <maxime.chevallier@bootlin.com> Link: https://patch.msgid.link/20261015134350.629593-4-maxime.chevallier@bootlin.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-20selftests: drv-net: pause: Validate the pause autonegotiation with a partnerMaxime Chevallier (Netdev Foundation)
Pause autonegotiation behaves differently than the regular link params autonegotiation, in that the user intention may differ from the negotiated pause parameters. Introduce a test that validates we're correctly resolving pause parameters according to 802.3. The validation is done based on what the local interface reports in terms of advertised and lp_advertised linkmodes. If the remote can express what it sees in terms of its own advertised and lp_advertised modes, validate the autoneg results on the peer as well. Signed-off-by: Maxime Chevallier (Netdev Foundation) <maxime.chevallier@bootlin.com> Link: https://patch.msgid.link/20261015134350.629593-3-maxime.chevallier@bootlin.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-20selftests: drv-net: Introduce a selftest for ethtool flow controlMaxime Chevallier (Netdev Foundation)
Ethernet flow control is a tricky thing to get right, especially when it comes to correctly handling the negotiation of the parameters with a link partner. On one hand, the userspace API talks in terms of the device's ability to send Pause frames when the device is overwhelmed by ingress traffic (TX pause) and the ability to stop sending traffic upon receiving Pause frames (RX pause). On the other hand, 802.3 explains that devices can exchange their abilities over link negotiation, but instead of echanging TX and RX abilities, they exchange Pause and Asymmetric Pause capabilities : RX unable TX unable => None RX able TX unable => Pause + Asymmetric RX unable TX able => Asymmetric RX able TX able => Pause The reported Pause and Asym abilities depend both on the MAC, that eventually sends and processes these frames, and the PHY, that advertises these to the partner. Both MAC and PHYs can have their own limitations, and getting the correct set of supported Pause/Asym parameters is non-trivial, unless the MAC uses phylink, which deals with the complexity. Introduce a set of Pause selftests that verify that the local interface's supported pause parameters reported from ethtool (in terms of Pause + Asym ) match the accepted parameters from "ethtool -A", corresponding to ethtool's .set_pauseparams() ops, expressed in TX and RX abilities. Signed-off-by: Maxime Chevallier (Netdev Foundation) <maxime.chevallier@bootlin.com> Link: https://patch.msgid.link/20261015134350.629593-2-maxime.chevallier@bootlin.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-20Revert "enetc: Increase eMDIO MDC rate to 2.5 MHz"Marek Vasut
This reverts commit 587acb86d6465efdc03f6d8524461e6e725597b7. While the i.MX95 MDIO MDC clock is improved by the commit 587acb86d646 ("enetc: Increase eMDIO MDC rate to 2.5 MHz"), other SoCs use different base clock for their MDIO and the MDC clock on those SoCs is set out of specification by the aforementioned commit. The fix for the i.MX95 MDIO MDC has to be done differently, and will be done so in a follow up change. Until that is done, revert the commit to fix the other SoCs. Fixes: 587acb86d646 ("enetc: Increase eMDIO MDC rate to 2.5 MHz") Signed-off-by: Marek Vasut <marex@nabladev.com> Link: https://patch.msgid.link/20261016185817.54096-1-marex@nabladev.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-20Merge tag 'dlm-7.4' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm Pull dlm updates from David Teigland: "This contains several fixes for bugs found by static analysis, fuzzing and code review. They mostly involve invalid input, e.g. from userspace, configfs or remote nodes, and are unlikely to be seen in normal usage" * tag 'dlm-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm: dlm: fix typos in comments dlm: clean up a type in waiters_read() dlm: validate node weights before building member array dlm: wait for outstanding SRCU callbacks to complete in exit paths dlm: fix variable key length lookup dlm: fix NULL pointer dereference in dlm_dump_rsb_name() dlm: validate lock modes in recovery messages dlm: fix buffer overflow from negative len in dlm_search_rsb_tree dlm: validate userspace lock resource name length dlm: require CAP_SYS_ADMIN for dlm-monitor device dlm: gate dlm_plock device on CAP_SYS_ADMIN
2026-10-20Merge tag 'erofs-for-7.4-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs Pull erofs updates from Gao Xiang: "The most notable change is to support superblock sharing for composefs, thanks to Giuseppe again. Another one switches to iomap for file-backed mounts on unencoded inodes, which enables efficient sub-folio I/Os. The others are all random ones. Summary: - Support superblock sharing for file-backed mounts - Use iomap for file-backed mounts on unencoded inodes - Minor fixes and cleanups" * tag 'erofs-for-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs: erofs: enable iomap for file-backed mounts on unencoded inodes erofs: use on-disk blkszbits for lz4 max pcluster bound mailmap: update entry for Gao Xiang MAINTAINERS: erofs: update my email address erofs: reuse superblock for file-backed mounts MAINTAINERS: erofs: add dev branch to git tree entry erofs: fix xattrs handling when metadata compression is used
2026-10-20Merge tag 'xfs-merge-7.4' of git://git.kernel.org:/pub/scm/fs/xfs/xfs-linuxLinus Torvalds
Pull xfs updates from Carlos Maiolino: "The bulk of this are bug fixes, cleanups and code refactoring, lots of them. Majority of those bug fixes are targeting scrub and online repair code. There are no real new features here but lots of prep code for future work. There are also some small performance optimizations but nothing major" * tag 'xfs-merge-7.4' of git://git.kernel.org:/pub/scm/fs/xfs/xfs-linux: (168 commits) xfs: don't limit software atomic writes by the group alignment xfs: add missing cursor stat checks after xfs_btree_delete xfs: add missing cursor status check after xfs_inobt_get_rec xfs: handle NULL open_zone for merged ioends in xfs_end_ioend_write_zoned xfs: refactor inode forkoff to byte conversions xfs: drop unnecessary sr parameter from xchk_rtgroup init functions xfs: drop unnecessary sa parameter from xchk_ag init functions xfs: drop unnecessary sr parameter from xrep_rtgroup init functions xfs: drop unnecessary sa parameter from the xrep_ag init functions xfs: improve dirent bounds checking in scrub and repair xfs: refactor directory data block walking loops in scrub xfs: update quota flags on secondary supers when metadir enabled xfs: don't try to repair rtsummary if the summary file isn't computed xfs: rescan the AGs if incore delalloc counter is negative xfs: don't rescan ifree and icount when frozen xfs: don't set a metadata directory's parent to sb_rootino xfs: don't scan across metadata/regular directory trees for dirents xfs: always report scrub errors in tracepoints xfs: opportunistically skip btree block checks xfs: clear set[ug]id mode bits when zapping attr fork ...
2026-10-20Merge branch 'net-pse-pd-plain-i2c-transport-for-realtek-gen1'Jakub Kicinski
Sander Vanheule says: ==================== net: pse-pd: Plain I2C transport for Realtek Gen1 While for the Gen2 protocol both a plain I2C transport and an SMBus transport were provided, Gen1 only got SMBus. The Unifi Switch Lite 16 PoE uses the Gen1 protocol to manage a single BCM59121, but does to using plain I2C. These patches simply add a new compatible for the plain I2C transport and the associated match data. This is sufficient to let the existing code talk to the management MCU. ==================== Link: https://patch.msgid.link/20261018161248.376205-1-sander@svanheule.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-20net: pse-pd: realtek-pse-mcu: add gen1 I2C transportSander Vanheule
Provide the required data for the gen1 raw I2C binding, which like for gen2 is simply the gen1 protocol data with the native_i2c flag set. Signed-off-by: Sander Vanheule <sander@svanheule.net> Reviewed-by: Kory Maincent <kory.maincent@bootlin.com> Acked-by: Oleksij Rempel <o.rempel@pengutronix.de> Acked-by: Jonas Jelonek <jonas@jonasjelonek.de> Link: https://patch.msgid.link/20261018161248.376205-3-sander@svanheule.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-20dt-bindings: net: pse-pd: realtek,pse: add gen1 I2C transportSander Vanheule
Like the gen2 protocol, the gen1 protocol can also be used over both a raw I2C transport and an SMBUs transport. Add a compatible for the former and the compatible for the Ubiquiti Unifi Switch Lite 16 PoE device that uses it. Signed-off-by: Sander Vanheule <sander@svanheule.net> Reviewed-by: Kory Maincent <kory.maincent@bootlin.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Link: https://patch.msgid.link/20261018161248.376205-2-sander@svanheule.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-20Merge tag 'gfs2-for-7.4' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull gfs2 updates from Andreas Gruenbacher: - Two journaled data inode fixes (fix journaled truncate range end offset, fix the escaped block copy in gfs2_before_commit) - When reading a new resource group from disk, validate its boundaries - To eliminate lock contention, get rid of the per-filesystem sd_async_glock_wait queue and wait for the individual glock locking events instead - Shut up sparse RCU warnings by marking ip->i_gl as __rcu. Accessing it through gfs2_inode_glock() -> rcu_dereference_protected() where we know that the pointer cannot change - Some more minor fixes and cleanups * tag 'gfs2-for-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: gfs2: remove unnecessary check in gfs2_freeze_lock_shared gfs2: fix the escaped block copy in gfs2_before_commit() gfs2: gfs2_create_inode excl cleanup gfs2: Fix the return value in gfs2_get_link() kernel-doc gfs2: fix NULL deref in gfs2_quota_lock() for meta inodes gfs2: fix typos in comments gfs2: Fix journaled truncate range end offset gfs2: missing whitespace in error message gfs2: Get rid of sd_async_glock_wait gfs2: reject invalid inode sizes gfs2: No quotas for meta inodes gfs2: move brelse() after buffer head accesses gfs2: Improve resource group validation and error handling gfs2: Silence sparse signedness warning gfs2: annotate i_gl with __rcu gfs2: Introduce gfs2_inode_glock gfs2: Add inode variables gfs2: Get to super block from inode in tracepoints gfs2: Avoid ip->i_gl dereferences in gfs2_inode_lookup and gfs2_create_inode
2026-10-20netlink: specs: Add a spec for nexthops in rtnetlinkDemos Ra
Add a YNL spec for nexthop objects and nexthop buckets in rtnetlink. ./tools/net/ynl/pyynl/cli.py \ --spec Documentation/netlink/specs/rt-nexthop.yaml \ --dump getnexthop Exclude newnexthopbucket-ntf from the C code generation. ynl_gen_c.py looks up a classic notification by the request of the same message type, and no request uses RTM_NEWNEXTHOPBUCKET. The spec keeps the notification, so the Python tools can still subscribe to it. Signed-off-by: Demos Ra <demosthenes.ra@gmail.com> Link: https://patch.msgid.link/20261019-rt-nexthop-spec-v1-1-9c586edf86ab@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-20tcp_bpf: propagate error code in tcp_bpf_sendmsg()Dmitry Antipov
In tcp_bpf_sendmsg(), the value returned by sk_msg_memcopy_from_iter() is checked for error but not propagated to 'out_err' label, so error handling may not work as expected. Fix this by assigning error value to 'err', thus making sure that error won't be silently ignored. Reported-by: Sashiko <shodan.ai@mcst.ru> Fixes: 5153a75ef34b ("tcp_bpf: Fix copied value in tcp_bpf_sendmsg") Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com> Reviewed-by: Jason Xing <kerneljasonxing@gmail.com> Reviewed-by: Eric Dumazet <edumazet@kernel.org> Link: https://patch.msgid.link/20261019082214.102398-1-dmantipov@yandex.ru Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-20Merge tag 'fs_for_v7.4-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull ext2, isofs, udf and quota updates from Jan Kara: - ext2 changes to support clang context tracking - multiple isofs hardenings and cleanups - several udf hardening fixes - block use of fs-specific quota formats with incorrect filesystem * tag 'fs_for_v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: (26 commits) udf: fix return value for non-recorded-allocated extents in udf_map_block() isofs: shrink the name conversion buffer isofs: pass the name buffer size to get_rock_ridge_filename() isofs: report the Joliet name length in statfs isofs: return long Joliet names whole isofs: Simplify isofs_read_level3_size() isofs: bound empty directory blocks in isofs_read_level3_size() quota: fix shrinker scan budget accounting in dqcache_shrink_scan() ext2: drain in-flight DIO before buffered write fallback isofs: validate directory records in isofs_read_level3_size() once_lite: Simplify condition handling and fix context analysis isofs: convert the zisofs read path to use folios isofs: fix Rock Ridge CE extent validation on multisession media shmem: Refuse to enable tmpfs format for another filesystem ocfs2: Refuse to enable ocfs2 format for another filesystem ext2: enable context analysis support for ext2 filesystem ext2: annotate s_rsv_window_root as requiring s_rsv_window_lock ext2: annotate block-mapping helpers as requiring truncate_mutex ext2: annotate ext2_init_block_alloc_info() as requiring truncate_mutex ext2: mark s_mount_state as guarded by s_lock ...
2026-10-20Merge tag 'fsnotify_for_v7.4-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull fsnotify updates from Jan Kara: "A couple of smaller changes for fsnotify" * tag 'fsnotify_for_v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: fanotify: report names longer than NAME_MAX fanotify: Re-add Matt Bobrowski as a reviewer fsnotify: fix typo "anonynous" in comment
2026-10-20Merge tag 'configfs-7.4-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/leitao/linux Pull configfs updates from Breno Leitao: - Attribute structures can now be const (Thomas Weißschuh) - The first selftests for the configfs userspace interface, plus a sample subsystem that accepts symlinks to test against. They include a race of symlink(2) against rmdir of the target, which exercises the use-after-free fixed in v7.3-rc3. - Rust bindings, merged from Andreas Hindborg's signed tag: fix the data offset calculation in subsystem callbacks (marked for stable), add the missing Send and Sync bounds, and correct a safety comment. * tag 'configfs-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/leitao/linux: samples: configfs: constify the configfs_attribute structures configfs: Allow the registration of const struct configfs_attribute configfs: Constify configfs_bin_attribute configfs: Treat attribute structures as const internally configfs: Constify is_visible/is_visible_bin in configfs_group_operations rust: configfs: remove mutability from some field initializers selftests/configfs: race symlink against rmdir of the target selftests/configfs: cover symlink and unlink samples/configfs: add a subsystem that accepts symlinks selftests/configfs: add tests for the userspace interface rust: configfs: fix data offset calculation for subsystem callbacks rust: configfs: require thread-safe callback data rust: configfs: fix release safety documentation
2026-10-20Merge tag 'cifs-for-7.4' of https://git.manguebit.org/linuxLinus Torvalds
Pull smb client updates from Paulo Alcantara: - Implement ->fileattr_set so chattr(1) compression changes (chattr +c/-c) go through the generic VFS fileattr path and its permission and serialization checks instead of the raw FS_IOC_SETFLAGS fallback and remove the now-unreachable file flags ioctl handlers - Require stable pages when the connection is signed or SMB compression is enabled, so a buffered write can no longer modify a folio that is still in flight and corrupt its signature (surfaced as -EIO) or, with compression, silently corrupt the data stored on the server - Stop breaking a file's just-granted lease while probing it for a Minshall+French symlink, by reusing an already open handle or opening with the inode's lease key - Fix several out-of-bounds reads and use-after-free bug in SMB1 - Fix an use-after-free bug in cifs_ses_add_channel() - Fix a NULL pointer dereference in the demultiplex thread when an encrypted read response matches no outstanding request and reclaim the credits granted on such responses to avoid starving the connection of credits - Fail sends fast when the connection needs to reconnect - Drop the redundant nls_table argument threaded through the session setup, tree connect and path-based call paths, allocate the session setup state on the stack and remove the internal CIFS version number along with a batch of write-only fields and commented-out code * tag 'cifs-for-7.4' of https://git.manguebit.org/linux: (61 commits) smb: client: reclaim credits for decrypted reads with no matching mid smb: client: do not pass a NULL buf to is_oplock_break() smb: client: require stable pages for SMB compression smb: client: allocate struct SMB2_sess_data on the stack smb: client: allocate struct sess_data on the stack smb: client: drop redundant nls_table arg from CIFSSMBRenameOpenFile() smb: client: drop redundant nls_table arg from SMBLegacyOpen() smb: client: drop redundant nls_table arg from CIFSPOSIXCreate() smb: client: drop redundant nls_table arg from CIFSPOSIXDelFile() smb: client: drop redundant nls_table arg from ->tree_connect() smb: client: drop redundant nls_table arg from cifs_setup_session() smb: client: drop redundant nls_table arg from ->sess_setup() smb: client: drop unused nls_table arg from decode_ascii_ssetup() smb: client: drop redundant nls_table arg from decode_unicode_ssetup() smb: client: drop unused nls_table arg from ascii_ssetup_strings() smb: client: drop redundant nls_table arg from unicode_ssetup_strings() smb: client: drop unused nls_table arg from ascii_domain_string() smb: client: drop redundant nls_table arg from unicode_domain_string() smb: client: drop unused nls_table arg from ascii_oslm_strings() smb: client: drop redundant nls_table arg from build_ntlmssp_auth_blob() ...
2026-10-20selftests: tc-testing: keep IPv6 autoconf out of exact-counter checksVictor Nogueira
Several tc-testing cases assert an exact bytes/packets value from a single injected frame, but count every frame that traverses an egress qdisc (or match with "protocol all"). Every case creates a fresh veth pair (and, for the gso_skb cases, a netdevsim device) and brings it up with IPv6 enabled; a device whose link-local autoconfiguration runs then emits neighbour solicitations, MLD reports and router solicitations for a few seconds. Those are ordinary Ethernet frames (0x86DD) and are counted too, so the exact assertions race with the autoconf burst and fail intermittently. The $DEV0 peer of the veth pair lives in the init netns, so its frames follow the init-netns IPv6 sysctls. Conditions to recreate the bug: Run the affected cases with IPv6 enabled (the tdc default) on net-next (7.3.0-rc6+). 4e6b fails intermittently (4/6 here); the four netdevsim "gso_skb" cases fail intermittently too (fb6c 1/25, 0235 4/15, 476f 4/8). 1922 did not trip in the sampled runs but shares the same setup and is fixed for uniformity. Each failure carries a stray autoconf frame, e.g. "bytes: 98 != 188". The Fix: Fix the affected cases: - actions/ife.json 4e6b injects only an 0xED3E frame but matches with "protocol all"; scope the filter to that ethertype. - The four netdevsim "gso_skb" cases (fb6c, 1922, 476f, 0235) create $ETH from within the case and bring it up immediately before installing the qdiscs, so the autoconf burst overlaps the measurement. Set "addrgenmode none" before the link is brought up, so the device generates no link-local address and the counter holds only the injected packet. IPv6 stays usable (a manually added address still works), so cases that exercise IPv6 are unaffected. On a kernel without IPv6 (CONFIG_IPV6=n, or booted with ipv6.disable=1) the attribute is not available, so the line is made non-fatal like every neighbouring setup line. With this change the affected cases pass 20/20, and the whole ife.json (51/51) and infra/qdiscs.json (48/48) suites pass, as do the protocol-ipv6 matchall cases (filters/matchall.json 0596, 41df, 8bd2, 2a4a). Reviewed-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: Victor Nogueira <victor@mojatatu.com> Link: https://patch.msgid.link/QDISC-L9J8.v1.r0.20261014162217-1@mojatatu.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-20Merge branch 'net-stmmac-qcom-ethqos-add-support-for-scmi-power-domains'Jakub Kicinski
Bartosz Golaszewski says: ==================== net: stmmac: qcom-ethqos: add support for SCMI power domains Add support for the firmware-managed variant of the DesignWare MAC on the sa8255p platform. This series contains new DT bindings and driver changes required to support the MAC in the STMMAC driver. It also reorganizes the ethqos code quite a bit to make the introduction of power domains into the driver a bit easier on the eye. The DTS changes will go in separately. ==================== Link: https://patch.msgid.link/20261014-qcom-sa8255p-emac-v16-0-0266c2ead980@oss.qualcomm.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-20net: stmmac: qcom-ethqos: add support for sa8255pBartosz Golaszewski
Extend the driver to support a new model - sa8255p. Unlike the previously supported variants, this one's power management is done in the firmware over SCMI. This is modeled in linux using power domains so add a new emac data variant and a separate setup callback. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Link: https://patch.msgid.link/20261014-qcom-sa8255p-emac-v16-7-0266c2ead980@oss.qualcomm.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-20net: stmmac: qcom-ethqos: factor out linux-level setup into a separate functionBartosz Golaszewski
Ahead of adding support for firmware-controlled EMAC variants, extend the ethqos_emac_driver_data structure with a setup() callback, implement it for the existing models and move all operations not required in SCMI mode into it. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Reviewed-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com> Link: https://patch.msgid.link/20261014-qcom-sa8255p-emac-v16-6-0266c2ead980@oss.qualcomm.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-20net: stmmac: qcom-ethqos: reuse the address of ethqos_emac_driver_dataBartosz Golaszewski
Instead of needlessly copying the fields of ethqos_emac_driver_data into struct qcom_ethqos, just use the address of the former as a reference. It's .rodata after all. This is done in order to avoid having either two calls to of_device_get_match_data() or having to extend the latter with another field when adding support for SCMI. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Reviewed-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com> Link: https://patch.msgid.link/20261014-qcom-sa8255p-emac-v16-5-0266c2ead980@oss.qualcomm.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-20net: stmmac: qcom-ethqos: update phy_mode to the resolved interface in ↵Bartosz Golaszewski
mac_finish() ethqos->phy_mode is read by serdes_powerup() and qcom_ethqos_set_sgmii_loopback() to configure the SerDes and its wrapper for the correct interface. It is set once at probe from the DT phy-mode property and never updated. phylink resolves the actual runtime interface and passes it to the mac_finish() callback. On platforms that only ever operate at one speed these two values are always the same, but when the interface changes at runtime - for example switching between SGMII and 2500BASE-X - the stored value becomes stale. The next serdes_powerup() call, on a subsequent link cycle, then reinitializes the SerDes to the wrong mode. Update ethqos->phy_mode from the interface argument in ethqos_mac_finish_serdes() so that it always reflects the last resolved interface. With that, we now update the phy_mode to the runtime-resolved interface, so any subsequent resume with a 1G SGMII link skips the loopback setup and the DMA reset hangs. To remedy this, extend the guard to include PHY_INTERFACE_MODE_SGMII. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Reviewed-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com> Link: https://patch.msgid.link/20261014-qcom-sa8255p-emac-v16-4-0266c2ead980@oss.qualcomm.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-20net: stmmac: qcom-ethqos: set serdes mode before powerupBartosz Golaszewski
Call phy_set_mode_ext() before phy_power_on() in qcom_ethqos_serdes_powerup(). This is harmless for existing users but on SCMI systems this is required for the PHY driver to select the right performance level - which translates to the link speed. This is done ahead of adding support for the firmware-managed EMAC on Qualcomm sa8255p. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Reviewed-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com> Link: https://patch.msgid.link/20261014-qcom-sa8255p-emac-v16-3-0266c2ead980@oss.qualcomm.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-20dt-bindings: net: qcom: document the ethqos device for SCMI-based systemsBartosz Golaszewski
Describe the firmware-managed variant of the QCom DesignWare MAC. As the properties here differ a lot from the HLOS-managed variant, lets put it in a separate file. Since we need to update the maximum number of power domains, let's update existing bindings referencing the top-level snps,dwmac.yaml and limit their maxItems for power-domains to 1. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Romain Gantois <romain.gantois@bootlin.com> # For RZ/N1 Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Link: https://patch.msgid.link/20261014-qcom-sa8255p-emac-v16-2-0266c2ead980@oss.qualcomm.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-20net: stmmac: dwmac4: don't program the 1us tick counter without a CSR clockBartosz Golaszewski
dwmac4_core_init() derives the TIC counter value from the rate of the CSR clock. If no such clock is available (for instance because clocks are managed by firmware and not described in DT), the rate is 0 and (0 / 1000000) - 1 underflows to 0xffffffff, which is then written to the register and can break the LPI timers that count in microseconds. Leave the register at its reset value when the CSR clock rate is unknown. The RX watchdog conversion helpers already cope with a missing clock by falling back to clk_ref_rate or returning 0, so nothing else needs to change. This is first hit with the Qualcomm sa8255p ethernet, whose DT has no clocks. Reported-by: Sashiko <sashiko-bot@kernel.org> Closes: https://lore.kernel.org/all/179052656185.2160803.1751830002645522416@kernel.org/ Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Link: https://patch.msgid.link/20261014-qcom-sa8255p-emac-v16-1-0266c2ead980@oss.qualcomm.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-20Merge tag 'hfs-v7.4-tag1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/vdubeyko/hfs Pull hfs/hfsplus updates from Viacheslav Dubeyko: "Fix {hfs,hfsplus}_btree_close() (Bruno Produit): - B-tree nodes with a zero reference count remain in the node hash until folio reclaim or tree teardown frees them. The folio release callbacks remove nodes while holding hash_lock, but hfs_btree_close() walks and frees the same hash without that lock. Reclaim can therefore unhash and free a node after close has loaded its pointer, causing a use-after-free or double-free. Detach each node with hfs_bnode_unhash() while holding hash_lock before inspecting and freeing it. Drop the lock before hfs_bnode_free() so a large tree is not freed while holding a spinlock. Fix hfs_inode_setattr() and hfs_brec_insert() (Davy Felipe): - hfs_inode_setattr() rejects unsupported UID, GID and mode changes, but returns the value stored in error when the filesystem is not mounted with the quiet option. At this point error is zero, as execution has already passed a successful setattr_prepare() call. As a result, unsupported attribute changes are incorrectly reported to userspace as successful even though the inode remains unchanged. Return -EPERM for these operations while preserving the existing behavior for quiet mounts. - hfs_brec_insert() may fail while inserting a new extent record, but __hfs_ext_write_extent() currently ignores its return value and clears HFS_FLG_EXT_DIRTY and HFS_FLG_EXT_NEW as if the insertion had succeeded. Use a reusable B-tree node range helper that takes the find data and the expected record size. The helper validates the bnode and tree pointers, entry offset and entry length, and ensures that the write range fits within the node. Fix failure in xfstests generic/339 (Viacheslav Dubeyko): - The test left an HFS+ volume corrupted and, as a result, fsck.hfsplus reported a long run of "Illegal name". The root cause is that fs/hfsplus/unicode.c's decomposition table (Apple Technote #1150) decomposes each source character entirely on its own and never does anything further with the result. Real fsck_hfs has carried a permanent "FixDecomps" fixup in CatalogCheck.c for exactly what that leaves unhandled. The fix makes hfsplus store, hash and compare names the same way current macOS does" * tag 'hfs-v7.4-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/vdubeyko/hfs: hfs: handle extent B-tree write errors hfsplus: add KUnit coverage for canonical reordering and legacy fixups hfsplus: canonicalize decomposed catalog names like fsck_hfs expects hfsplus: add Unicode combining-class and legacy decomposition data hfs/hfsplus: serialize B-tree close against folio release hfs: return -EPERM for unsupported setattr changes
2026-10-20Merge tag 'nilfs2-v7.4-tag1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/vdubeyko/nilfs2 Pull nilfs2 updates from Viacheslav Dubeyko: "Fix issues in nilfs_sufile_get_suinfo(), nilfs_scan_dsync_log(), and nilfs_find_or_create_root() (Aldo Ariel Panzardo): - If the requested segment number is greater than the total number of segments, the function may process segment numbers outside the filesystem. - nilfs_scan_dsync_log() trusts the block counts in each on-disk file information entry. If fi_ndatablk is greater than fi_nblocks, the data block loop can consume excessive summary entries and the later subtraction used to derive the number of node blocks underflows. - nilfs_find_or_create_root() links a new checkpoint root into the checkpoint tree and drops ns_cptree_lock before creating the root's sysfs group. If nilfs_sysfs_create_snapshot_group() then fails, the root is freed while it is still reachable from ns_cptree, so a concurrent nilfs_lookup_root() can dereference freed memory. Fix typos in comments, reported by scripts/checkpatch.pl using the misspelling list in scripts/spelling.txt (Hemanth Selam) Fix issues in nilfs_recover_dsync_blocks() and nilfs_readdir() (Jake Labelle): - During roll-forward recovery, nilfs_recover_dsync_blocks() obtains the inode designated by fi_ino of a dsync log without checking its type. Regular files, directories, and symlinks are the only inode types with data blocks to recover; reject anything else before touching its block mapping. - nilfs_readdir() uses ctx->pos, which userspace can set to an arbitrary value via llseek, as an offset into the directory folio and parses whatever bytes sit there as a directory entry. Snap unaligned positions onto a valid entry boundary by walking the rec_len chain from the chunk start before parsing. Fix issue in logic of clearing the dirty folios. When garbage collection fails, nilfs2 rolls the DAT metadata file's page cache back to a shadow copy taken before GC started. nilfs_clear_dirty_pages() drops the dirty state of the folios in the DAT cache, then nilfs_copy_back_pages() overwrites them with the saved contents and warns if one is still dirty. Add a force flag to nilfs_clear_dirty_pages() and nilfs_clear_folio_dirty() that skips the busy buffer check, and set it in the two calls from nilfs_mdt_restore_from_shadow_map() (Jiaming Zhang) Remove dead code and comment code sections in nilfs_new_inode(), nilfs_read_inode_common(), and nilfs_setup_super() (Joshua Crofts) Multiple fixes (Ryusuke Konishi): - While the recent out-of-bounds memory access issue in nilfs_direct_propagate() has already been fixed, adds extra checks to catch and gracefully handle similar potential bugs. - Fix syzbot reported deadlock between nilfs_evict_inode() and find_inode() by removing the synchronous log writer trigger from nilfs_evict_inode(). - Fix an omitted clear of the dirty flag on backing device buffers, which could cause an abnormal buffer state and potential block overwriting data corruption. - Improve stability by preventing errors caused by user interrupts while waiting for log writes, which are triggered by synchronous write flags following operations such as rename(). - Refactor the metadata file writeback callback function, restructuring an inefficient legacy function organization rooted in the era of aops->writepage() to align with aops->writepages(). - Fix a link count underflow during rmdir on a directory with a corrupted link count (an issue recently reported by syzbot). Eliminate blockdev_direct_IO() from nilfs2 entirely. Add iomap.h with declaration of iomap operations and iomap.c with implementation of nilfs_iomap_begin(). The nilfs_direct_IO() and the .direct_IO callback on nilfs_aops are removed. The nilfs_file_read_iter() dispatches O_DIRECT reads to iomap_dio_rw() using nilfs_iomap_ops. Everything else still goes through generic_file_read_iter() (Viacheslav Dubeyko)" * tag 'nilfs2-v7.4-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/vdubeyko/nilfs2: nilfs2: validate directory position after llseek in readdir nilfs2: reject non-regular inodes in dsync recovery nilfs2: fix link count underflow when removing corrupted directory nilfs2: simplify nilfs_mdt_writeback() nilfs2: ignore non-fatal signals during synchronous log write wait nilfs2: clear dirty flag on bdev buffers on log write failure nilfs2: fix deadlock between nilfs_evict_inode() and find_inode() nilfs2: fix checkpoint root lifetime on sysfs errors nilfs2: switch O_DIRECT to iomap based operations nilfs2: add iomap operations for direct I/O nilfs2: validate file block counts during recovery nilfs2: force clear dirty state when restoring from the shadow map nilfs2: validate segment number in nilfs_sufile_get_suinfo() nilfs2: fix typos in comments nilfs2: remove '#if 0' code blocks nilfs2: strengthen consistency checks in nilfs_direct_propagate()
2026-10-20Merge tag 'affs-for-7.4' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull affs updates from David Sterba: "AFFS has attracted the AI security scanners but there's probably little real impact. A few fixes, more will come in the future, but it's low priority" * tag 'affs-for-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: affs: validate blocks before freeing them affs: split hash-lock subclass and reject self-referencing dir entry affs: don't instantiate dentry if affs_insert_hash failed
2026-10-20Merge tag 'nf-26-10-19' of ↵Jakub Kicinski
git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf Pablo Neira Ayuso says: ==================== Netfilter/IPVS fixes for net The following patchset contains Netfilter/IPVS for net: 1) Fix IPv6 nexthdr offset truncation in fragment reassembly, this has been uncovered by LLM, from Jeremy Jean. 2) Restrict checksums in nfqueue to known protocols and offset, after this patch the plan is to re-enable nfqueue in userns, this came via LLM report. from Florian Westhphal. 3) Fix races when handling overload flag in IPVS, this patch is not perfect but Julian considers this improves the situation. This was uncovered by LLM. From Julian Anastasov. 4) Error handling for IPVS sync_threshold sysctl, from Joel Granados. 5) Use skb_vlan_tag_get_id() to retrieve the VLAN id, discard tci bits, when handling VLAN in the flowtable, from Shuangfeng He. 6) Initialize IPCB for inet/ingress reject, uncovered by LLM. 7) Restrict completion of binary search array to anonymous set. 8) Restrict DCCP option matching to avoid out-of-bound read, from Sung Byeongchan. 9) Reset transport header offset in flowtable after tunnel decapsulation to fix issue with qdisc xmit path, from Lorenzo Bianconi. 10) Fix inverted matching in ctnetlink dump filtering, from Liu Chao. * tag 'nf-26-10-19' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf: netfilter: nf_conntrack_netlink: fix inverted IPv6 tuple filter netfilter: flowtable: reset transport header after nf_flow_encap_pop() netfilter: xt_dccp: handle reserved options as single-byte netfilter: nft_set_rbtree: narrow down range completion to anonymous sets netfilter: nf_reject: initialize IPCB at inet ingress netfilter: flowtable: use the vlan id, not the full tci, in the tuple key ipvs: skip committing sync_threshold when proc_dointvec fails ipvs: fix more races around the overload flag netfilter: nft_payload: restrict checksum offsets to known values netfilter: nf_conntrack: avoid truncating IPv6 nexthdr offset ==================== Link: https://patch.msgid.link/20261019150249.1879516-1-pablo@netfilter.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-20Merge tag 'for-7.4-tag' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs updates from David Sterba: "User visible changes: - remove tweakable sysfs way to enable features, used only for extent-irefs which has been default since 3.12; the sysfs interface makes it complicated due to locking and context, unlike ioctl - change which backup superblock does mount option 'rescue=usebackuproot' choose, skip the last one due to rotation, for more fine grained control add options selecting a specific backup superblock by index (usebackuproot_N) Notable fixes: - syslog message fixup of error state description, duplicate 'E' renamed to 'H' (emergency shutdown), added 'I 'when delayed iputs are blocked - use kvmalloc for b-tree buffer allocations, as we're using more contig ranges because of large folios, the allocations started to warn on fragmented memory - handle unknown commands for the /dev/btrfs-control ioctls - tune timing of transaction commit when the space is getting low - in raid56, skip verifications if data checksums are not available Performance improvements: - reflink speedup, reorder locking and flushing to optimize for more common cases where the reflinked ranges are accessed, avoid unnecessary contention - minor speedup in zstd decompression (+8MB/s) - reduced contention of inode extent map lock, improves e.g. when shrinker processes inodes without extent maps, measured time reduction 10-20% Core changes: - move allocation errors out of some contexts (new inode/dentry/rename) to avoid transaction aborts - allocate system new chunks earlier, e.g. when consumed by fallocate, and tune deleting unused block groups if the system space is low - tree checker: reject extents for special files - many qgroup fixes regarding enabling/disabling, other state changes and qgroup relation updates - error handling fixes - refactoring, cleanups: - page to folio cleanups - transaction state macros/enums simplification - parameter simplifications" * tag 'for-7.4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: (92 commits) btrfs: fix use-after-free on quota enable allocation failure btrfs: prevent use-after-free in btrfs_transaction::switch_commits btrfs: return -ENOTTY for unknown ioctls on the control device btrfs: defrag: fix check to see if next extent can be defragged too btrfs: defrag: fix key comparison with max defrag key in btrfs_defrag_leaves() btrfs: use READ_ONCE() to read the chunk size from the data space_info btrfs: qgroup: make btrfs_record_squota_delta() return void btrfs: fix lost error return value in btrfs_alloc_logged_file_extent() btrfs: qgroup: fix off-by-one max level check in qgroup_trace_new_subtree_blocks() btrfs: abort transaction on qgroup failures in create_pending_snapshot() btrfs: qgroup: merge error labels in btrfs_quota_enable() btrfs: qgroup: fix leak of qgroups in rb tree after failure to enable quotas btrfs: qgroup: abort transaction on failure to add qgroup relation btrfs: qgroup: fix swapped blocks existence check when tracing after COW btrfs: introduce more accurate usebackuproot options btrfs: always use the second newest slot for rescue=usebackuproot btrfs: raid56: do not verify the content if there is no data checksum btrfs: qgroup: do not leak -ENOENT from btrfs_remove_qgroup() btrfs: qgroup: use qgroup_mark_inconsistent() in quick_update_accounting() btrfs: qgroup: do not treat "ret > 0" as error when deleting a qgroup ...
2026-10-20net: skbuff: don't copy alloc_cpu in skb header copiesCarolina Jubran
Commit 68822bdf76f1 ("net: generalize skb freeing deferral to per-cpu lists") added alloc_cpu to struct sk_buff and placed it in the headers group copied by __copy_skb_header(). This is wrong for newly allocated skbs. For example, skb_segment() allocates a new skb and records the current CPU in alloc_cpu, but __copy_skb_header() overwrites it with the value from the original skb. If the original skb was allocated on another CPU, the segment may later be treated as remotely allocated and unnecessarily deferred there when it is freed. Move alloc_cpu out of the headers group so it is preserved across header copies. Copy it explicitly in skb_clone(), which allocates the skb object directly instead of going through __alloc_skb(). This was discovered while investigating a throughput regression with software IPsec. The load used 512 IPsec tunnels carrying traffic over VXLAN, with 512 parallel iperf3 flows and an MTU of 4500. Before the fix: 16.09% queued_spin_lock_slowpath | --15.90%--_raw_spin_lock_irqsave | --9.37%--__slab_free kfree skb_release_data napi_consume_skb mlx5e_poll_tx_cq After the fix: 6.84% queued_spin_lock_slowpath | --6.57%--_raw_spin_lock_irqsave | --5.00%--__slab_free kfree skb_release_data napi_consume_skb mlx5e_poll_tx_cq Fixes: 68822bdf76f1 ("net: generalize skb freeing deferral to per-cpu lists") Signed-off-by: Carolina Jubran <cjubran@nvidia.com> Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com> Reviewed-by: Björn Töpel <bjorn@kernel.org> Reviewed-by: Jason Xing <kerneljasonxing@gmail.com> Reviewed-by: Eric Dumazet <edumazet@kernel.org> Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com> Link: https://patch.msgid.link/20261019174152.2932829-1-cjubran@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-20Merge tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fsverity/linuxLinus Torvalds
Pull fsverity updates from Eric Biggers: "Patches from Andrey Albershteyn to prepare for XFS fsverity support: - Report verification errors through fserror, instead of only through an unstructured log message and generic I/O error return - Move the reporting of STATX_ATTR_VERITY into the VFS, so that each fsverity-capable filesystem doesn't need to do it. This also fixes a bug where btrfs didn't return STATX_ATTR_VERITY in attributes_mask - Make the VFS prevent enabling DAX on fsverity files, so that it will be handled in a single place for ext4 and XFS - Move ext4 and f2fs's code to read verity metadata from the pagecache into shared code, so that XFS will be able to use it too - Export fsverity_ensure_verity_info() for XFS scrub to use - Pass all-zeroes hash to ->write_merkle_tree_block() so that XFS will be able to implement an optimization for sparse files" * tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fsverity/linux: fsverity: hoist statx reporting of fs-verity flag fsverity: don't allow setting DAX file attribute on fsverity files fsverity: hoist pagecache_read from f2fs/ext4 to fsverity fsverity: pass digest size and hash of the all-zeroes block to ->write fsverity: expose ensure_fsverity_info() fsverity: report validation errors through fserror to fsnotify MAINTAINERS: List the fsverity branches
2026-10-20Merge tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/linuxLinus Torvalds
Pull fscrypt updates from Eric Biggers: "A few minor cleanups for fs/crypto/" * tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/linux: MAINTAINERS: List the fscrypt branches fscrypt: Move several items from fscrypt_private.h to .c files fscrypt: Use aes_ecb_encrypt() for v1 key derivation
2026-10-20Merge tag 'libcrypto-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux Pull crypto library updates from Eric Biggers: - Migrate the x86 and riscv optimized implementations of various AES modes (ECB, CBC, CBC-CTS, CTR, XCTR, XTS) into lib/crypto/. This makes the library APIs be properly accelerated on these architectures, while still accelerating crypto_skcipher as well. It removes a lot of redundant glue code, since the crypto API boilerplate no longer needs to be duplicated for these architectures. It also fixes the longstanding issue where optimizations for these AES modes were disabled by default on these architectures. - Optimize AES-XTS on SPARC64 using the SPARC crypto opcodes - Move the SipHash code into lib/crypto/ - Update the ChaCha and Poly1305 functions to take size_t lengths, resolving issues where lengths over INT_MAX were mishandled - Make frame pointer unwinding work properly in some of the x86 assembly functions, by following the standard %rbp convention - Add helper functions for zeroizing structs - Make a few documentation improvements * tag 'libcrypto-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux: (49 commits) lib/crypto: md5: remove unused header lib/crypto: mips/chacha: Handle lengths of 2 GiB or more lib/crypto: arm/chacha: Handle lengths of 2 GiB or more in scalar code lib/crypto: chacha: Use size_t length lib/crypto: poly1305: Use size_t length lib/crypto: x86/sha512: Follow the normal %rbp convention lib/crypto: x86/sha256: Follow the normal %rbp convention lib/crypto: x86/sha1: Follow the normal %rbp convention lib/crypto: chacha20poly1305: zeroize state in __chacha20poly1305_decrypt lib/crypto: sparc/aes-xts: Add optimization using the AES opcodes lib: Move SipHash into lib/crypto/ lib/crypto: x86/aes-ctr: Remove some unreachable code crypto: x86/aesni-intel - Add transitional selections crypto: aes - Boost priority of encryption modes further lib/crypto: x86/aes: Set RNDKEY in aes_cbc_encrypt_aesni() lib/crypto: riscv/aes-xts: Migrate optimized code into library lib/crypto: riscv/aes-ctr: Migrate optimized code into library lib/crypto: riscv/aes-cbc: Migrate optimized code into library lib/crypto: riscv/aes-ecb: Migrate optimized code into library lib/crypto: riscv/aes: Pass key struct to assembly code ...