6.12.40-rc1 review
Greg Kroah-Hartman
maintainerPATCH 157/158 drm/xe: Move page fault init after topology init
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Matthew Brost <[email protected]>
commit 3155ac89251dcb5e35a3ec2f60a74a6ed22c56fd upstream.
We need the topology to determine GT page fault queue size, move page fault init after topology init.
--- drivers/gpu/drm/xe/xe_gt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/xe/xe_gt.c +3 -3
@@ -594,15 +594,15 @@ int xe_gt_init(struct xe_gt *gt)xe_hw_fence_irq_init (>->fence_irq[i]); } - err =xe_gt_pagefault_init (gt); + err =xe_gt_sysfs_init (gt);if (err)return err; - err =xe_gt_sysfs_init (gt); + err =gt_fw_domain_init (gt);if (err)return err; - err =gt_fw_domain_init (gt); + err =xe_gt_pagefault_init (gt);if (err)return err;
Greg Kroah-Hartman
maintainerPATCH 158/158 smb: client: let smbd_post_send_iter() respect the peers max_send_size and transmit all data
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stefan Metzmacher <[email protected]>
commit 1944f6ab4967db7ad8d4db527dceae8c77de76e9 upstream.
We should not send smbdirect_data_transfer messages larger than the negotiated max_send_size, typically 1364 bytes, which means 24 bytes of the smbdirect_data_transfer header + 1340 payload bytes.
This happened when doing an SMB2 write with more than 1340 bytes (which is done inline as it's below rdma_readwrite_threshold).
It means the peer resets the connection.
When testing between cifs.ko and ksmbd.ko something like this is logged:
client:
CIFS: VFS: RDMA transport re-established
siw: got TERMINATE. layer 1, type 2, code 2
siw: got TERMINATE. layer 1, type 2, code 2
siw: got TERMINATE. layer 1, type 2, code 2
siw: got TERMINATE. layer 1, type 2, code 2
siw: got TERMINATE. layer 1, type 2, code 2
siw: got TERMINATE. layer 1, type 2, code 2
siw: got TERMINATE. layer 1, type 2, code 2
siw: got TERMINATE. layer 1, type 2, code 2
siw: got TERMINATE. layer 1, type 2, code 2
CIFS: VFS: \\carina Send error in SessSetup = -11
smb2_reconnect: 12 callbacks suppressed
CIFS: VFS: reconnect tcon failed rc = -11
CIFS: VFS: reconnect tcon failed rc = -11
CIFS: VFS: reconnect tcon failed rc = -11
CIFS: VFS: SMB: Zero rsize calculated, using minimum value 65536
and:
CIFS: VFS: RDMA transport re-established
siw: got TERMINATE. layer 1, type 2, code 2
CIFS: VFS: smbd_recv:1894 disconnected
siw: got TERMINATE. layer 1, type 2, code 2
The ksmbd dmesg is showing things like:
smb_direct: Recv error. status='local length error (1)' opcode=128
smb_direct: disconnected
smb_direct: Recv error. status='local length error (1)' opcode=128
ksmbd: smb_direct: disconnected
ksmbd: sock_read failed: -107
As smbd_post_send_iter() limits the transmitted number of bytes we need loop over it in order to transmit the whole iter.
--- fs/smb/client/smbdirect.c | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-)
fs/smb/client/smbdirect.c +27 -4
@@ -907,8 +907,10 @@ wait_send_queue: .local_dma_lkey = sc->ib.pd->local_dma_lkey, .direction = DMA_TO_DEVICE, }; +size_t payload_len =umin (*_remaining_data_length, + sp->max_send_size -sizeof (*packet)); - rc =smb_extract_iter_to_rdma (iter, *_remaining_data_length, + rc =smb_extract_iter_to_rdma (iter, payload_len, &extract);if (rc <0 ) goto err_dma;
@@ -1013,6 +1015,27 @@ static int smbd_post_send_empty(struct sreturn smbd_post_send_iter (info,NULL , &remaining_data_length); } +static int smbd_post_send_full_iter (struct smbd_connection *info, +struct iov_iter *iter, +int *_remaining_data_length) +{ +int rc =0 ; + +/* +* smbd_post_send_iter() respects the +* negotiated max_send_size, so we need to +* loop until the full iter is posted +*/ + +while (iov_iter_count (iter) >0 ) { + rc =smbd_post_send_iter (info, iter, _remaining_data_length); +if (rc <0 ) +break ; + } + +return rc; +} +/* * Post a receive request to the transport * The remote peer can only send data when a receive request is posted
@@ -1962,14 +1985,14 @@ int smbd_send(struct TCP_Server_Info *se klen += rqst->rq_iov[i].iov_len;iov_iter_kvec (&iter,ITER_SOURCE , rqst->rq_iov, rqst->rq_nvec, klen); - rc =smbd_post_send_iter (info, &iter, &remaining_data_length); + rc =smbd_post_send_full_iter (info, &iter, &remaining_data_length);if (rc <0 )break ;if (iov_iter_count (&rqst->rq_iter) >0 ) {/* And then the data pages if there are any */ - rc =smbd_post_send_iter (info, &rqst->rq_iter, - &remaining_data_length); + rc =smbd_post_send_full_iter (info, &rqst->rq_iter, + &remaining_data_length);if (rc <0 )break ; }
Greg Kroah-Hartman
maintainerPATCH 138/158 libbpf: Fix handling of BPF arena relocations
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andrii Nakryiko <[email protected]>
[ Upstream commit 0238c45fbbf8228f52aa4642f0cdc21c570d1dfe ]
Initial __arena global variable support implementation in libbpf contains a bug: it remembers struct bpf_map pointer for arena, which is used later on to process relocations. Recording this pointer is problematic because map pointers are not stable during ELF relocation collection phase, as an array of struct bpf_map's can be reallocated, invalidating all the pointers. Libbpf is dealing with similar issues by using a stable internal map index, though for BPF arena map specifically this approach wasn't used due to an oversight.
The resulting behavior is non-deterministic issue which depends on exact layout of ELF object file, number of actual maps, etc. We didn't hit this until very recently, when this bug started triggering crash in BPF CI when validating one of sched-ext BPF programs.
The fix is rather straightforward: we just follow an established pattern of remembering map index (just like obj->kconfig_map_idx, for example) instead of struct bpf_map *, and resolving index to a pointer at the point where map information is necessary.
While at it also add debug-level message for arena-related relocation resolution information, which we already have for all other kinds of maps.
--- tools/lib/bpf/libbpf.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-)
tools/lib/bpf/libbpf.c +13 -7
@@ -726,7 +726,7 @@ struct bpf_object {struct usdt_manager *usdt_man; -struct bpf_map *arena_map; +int arena_map_idx;void *arena_data;size_t arena_data_sz;
@@ -1494,6 +1494,7 @@ static struct bpf_object *bpf_object__new(const char *path, obj->efile.obj_buf_sz = obj_buf_sz; obj->efile.btf_maps_shndx =-1 ; obj->kconfig_map_idx =-1 ; + obj->arena_map_idx =-1 ; obj->kern_version =get_kernel_version (); obj->loaded = false;
@@ -2935,7 +2936,7 @@ static int init_arena_map_data(struct bpf_object *obj, struct bpf_map *map,const long page_sz =sysconf (_SC_PAGE_SIZE);size_t mmap_sz; - mmap_sz =bpf_map_mmap_sz (obj->arena_map); + mmap_sz =bpf_map_mmap_sz (map);if (roundup (data_sz, page_sz) > mmap_sz) {pr_warn ("elf: sec '%s': declared ARENA map size (%zu) is too small to hold global __arena variables of size %zu\n" , sec_name, mmap_sz, data_sz);
@@ -3009,12 +3010,12 @@ static int bpf_object__init_user_btf_maps(struct bpf_object *obj, bool strict,if (map->def.type !=BPF_MAP_TYPE_ARENA )continue ; -if (obj->arena_map) { +if (obj->arena_map_idx >=0 ) {pr_warn ("map '%s': only single ARENA map is supported (map '%s' is also ARENA)\n" , - map->name, obj->arena_map->name); + map->name, obj->maps[obj->arena_map_idx].name);return -EINVAL ; } - obj->arena_map = map; + obj->arena_map_idx = i;if (obj->efile.arena_data) { err = init_arena_map_data(obj, map, ARENA_SEC, obj->efile.arena_data_shndx,
@@ -3024,7 +3025,7 @@ static int bpf_object__init_user_btf_maps(struct bpf_object *obj, bool strict,return err; } } -if (obj->efile.arena_data && !obj->arena_map) { +if (obj->efile.arena_data && obj->arena_map_idx <0 ) {pr_warn ("elf: sec '%s': to use global __arena variables the ARENA map should be explicitly declared in SEC(\".maps\")\n" ,ARENA_SEC );return -ENOENT ;
@@ -4547,8 +4548,13 @@ static int bpf_program__record_reloc(struct bpf_program *prog,if (shdr_idx == obj->efile.arena_data_shndx) { reloc_desc->type =RELO_DATA ; reloc_desc->insn_idx = insn_idx; - reloc_desc->map_idx = obj->arena_map - obj->maps; + reloc_desc->map_idx = obj->arena_map_idx; reloc_desc->sym_off = sym->st_value; + + map = &obj->maps[obj->arena_map_idx]; +pr_debug ("prog '%s': found arena map %d (%s, sec %d, off %zu) for insn %u\n" , + prog->name, obj->arena_map_idx, map->name, map->sec_idx, + map->sec_offset, insn_idx);return 0 ; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 139/158 efivarfs: Fix memory leak of efivarfs_fs_info in fs_context error paths
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Breno Leitao <[email protected]>
[ Upstream commit 64e135f1eaba0bbb0cdee859af3328c68d5b9789 ]
When processing mount options, efivarfs allocates efivarfs_fs_info (sfi) early in fs_context initialization. However, sfi is associated with the superblock and typically freed when the superblock is destroyed. If the fs_context is released (final put) before fill_super is called—such as on error paths or during reconfiguration—the sfi structure would leak, as ownership never transfers to the superblock.
Implement the .free callback in efivarfs_context_ops to ensure any allocated sfi is properly freed if the fs_context is torn down before fill_super, preventing this memory leak.
--- fs/efivarfs/super.c | 6 ++++++ 1 file changed, 6 insertions(+)
fs/efivarfs/super.c +6 -0
@@ -354,10 +354,16 @@ static int efivarfs_reconfigure(struct fs_context *fc)return 0 ; } +static void efivarfs_free (struct fs_context *fc) +{ +kfree (fc->s_fs_info); +} +static const struct fs_context_operations efivarfs_context_ops = { .get_tree = efivarfs_get_tree, .parse_param = efivarfs_parse_param, .reconfigure = efivarfs_reconfigure, + .free = efivarfs_free, };static int efivarfs_init_fs_context (struct fs_context *fc)
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 140/158 sched: Change nr_uninterruptible type to unsigned long
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Aruna Ramakrishna <[email protected]>
commit 36569780b0d64de283f9d6c2195fd1a43e221ee8 upstream.
The commit e6fe3f422be1 ("sched: Make multiple runqueue task counters 32-bit") changed nr_uninterruptible to an unsigned int. But the nr_uninterruptible values for each of the CPU runqueues can grow to large numbers, sometimes exceeding INT_MAX. This is valid, if, over time, a large number of tasks are migrated off of one CPU after going into an uninterruptible state. Only the sum of all nr_interruptible values across all CPUs yields the correct result, as explained in a comment in kernel/sched/loadavg.c.
Change the type of nr_uninterruptible back to unsigned long to prevent overflows, and thus the miscalculation of load average.
--- kernel/sched/loadavg.c | 2 +- kernel/sched/sched.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
kernel/sched/loadavg.c +1 -1
@@ -80,7 +80,7 @@ long calc_load_fold_active(struct rq *thlong nr_active, delta =0 ; nr_active = this_rq->nr_running - adjust; - nr_active += (int )this_rq->nr_uninterruptible; + nr_active += (long )this_rq->nr_uninterruptible;if (nr_active != this_rq->calc_load_active) { delta = nr_active - this_rq->calc_load_active;
kernel/sched/sched.h +1 -1
@@ -1156,7 +1156,7 @@ struct rq {* one CPU and if it got migrated afterwards it may decrease * it on another CPU. Always updated under the runqueue lock: */ -unsigned int nr_uninterruptible; +unsigned long nr_uninterruptible;struct task_struct __rcu *curr;struct sched_dl_entity *dl_server;
Greg Kroah-Hartman
maintainerPATCH 141/158 clone_private_mnt(): make sure that caller has CAP_SYS_ADMIN in the right userns
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Al Viro <[email protected]>
commit c28f922c9dcee0e4876a2c095939d77fe7e15116 upstream.
What we want is to verify there is that clone won't expose something hidden by a mount we wouldn't be able to undo. "Wouldn't be able to undo" may be a result of MNT_LOCKED on a child, but it may also come from lacking admin rights in the userns of the namespace mount belongs to.
clone_private_mnt() checks the former, but not the latter.
There's a number of rather confusing CAP_SYS_ADMIN checks in various userns during the mount, especially with the new mount API; they serve different purposes and in case of clone_private_mnt() they usually, but not always end up covering the missing check mentioned above.
[ merge conflict resolution: clone_private_mount() was reworked in
db04662e2f4f ("fs: allow detached mounts in clone_private_mount()"). Tweak the relevant ns_capable check so that it works on older kernels ]
--- fs/namespace.c | 5 +++++ 1 file changed, 5 insertions(+)
fs/namespace.c +5 -0
@@ -2263,6 +2263,11 @@ struct vfsmount *clone_private_mount(conif (!check_mnt (old_mnt)) goto invalid; +if (!ns_capable (old_mnt->mnt_ns->user_ns,CAP_SYS_ADMIN )) { +up_read (&namespace_sem); +return ERR_PTR (-EPERM ); + } +if (has_locked_children (old_mnt, path->dentry)) goto invalid;
Greg Kroah-Hartman
maintainerPATCH 142/158 btrfs: fix block group refcount race in btrfs_create_pending_block_groups()
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Boris Burkov <[email protected]>
commit 2d8e5168d48a91e7a802d3003e72afb4304bebfa upstream.
Block group creation is done in two phases, which results in a slightly unintuitive property: a block group can be allocated/deallocated from after btrfs_make_block_group() adds it to the space_info with btrfs_add_bg_to_space_info(), but before creation is completely completed in btrfs_create_pending_block_groups(). As a result, it is possible for a block group to go unused and have 'btrfs_mark_bg_unused' called on it concurrently with 'btrfs_create_pending_block_groups'. This causes a number of issues, which were fixed with the block group flag 'BLOCK_GROUP_FLAG_NEW'.
However, this fix is not quite complete. Since it does not use the unused_bg_lock, it is possible for the following race to occur:
btrfs_create_pending_block_groups btrfs_mark_bg_unused
if list_empty // false
list_del_init
clear_bit
else if (test_bit) // true
list_move_tail
And we get into the exact same broken ref count and invalid new_bgs state for transaction cleanup that BLOCK_GROUP_FLAG_NEW was designed to prevent.
The broken refcount aspect will result in a warning like:
[1272.943527] refcount_t: underflow; use-after-free. [1272.943967] WARNING: CPU: 1 PID: 61 at lib/refcount.c:28 refcount_warn_saturate+0xba/0x110 [1272.944731] Modules linked in: btrfs virtio_net xor zstd_compress raid6_pq null_blk [last unloaded: btrfs] [1272.945550] CPU: 1 UID: 0 PID: 61 Comm: kworker/u32:1 Kdump: loaded Tainted: G W 6.14.0-rc5+ #108 [1272.946368] Tainted: [W]=WARN [1272.946585] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Arch Linux 1.16.3-1-1 04/01/2014 [1272.947273] Workqueue: btrfs_discard btrfs_discard_workfn [btrfs] [1272.947788] RIP: 0010:refcount_warn_saturate+0xba/0x110 [1272.949532] RSP: 0018:ffffbf1200247df0 EFLAGS: 00010282 [1272.949901] RAX: 0000000000000000 RBX: ffffa14b00e3f800 RCX: 0000000000000000 [1272.950437] RDX: 0000000000000000 RSI: ffffbf1200247c78 RDI: 00000000ffffdfff [1272.950986] RBP: ffffa14b00dc2860 R08: 00000000ffffdfff R09: ffffffff90526268 [1272.951512] R10: ffffffff904762c0 R11: 0000000063666572 R12: ffffa14b00dc28c0 [1272.952024] R13: 0000000000000000 R14: ffffa14b00dc2868 R15: 000001285dcd12c0 [1272.952850] FS: 0000000000000000(0000) GS:ffffa14d33c40000(0000) knlGS:0000000000000000 [1272.953458] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [1272.953931] CR2: 00007f838cbda000 CR3: 000000010104e000 CR4: 00000000000006f0 [1272.954474] Call Trace: [1272.954655] <TASK> [1272.954812] ? refcount_warn_saturate+0xba/0x110 [1272.955173] ? __warn.cold+0x93/0xd7 [1272.955487] ? refcount_warn_saturate+0xba/0x110 [1272.955816] ? report_bug+0xe7/0x120 [1272.956103] ? handle_bug+0x53/0x90 [1272.956424] ? exc_invalid_op+0x13/0x60 [1272.956700] ? asm_exc_invalid_op+0x16/0x20 [1272.957011] ? refcount_warn_saturate+0xba/0x110 [1272.957399] btrfs_discard_cancel_work.cold+0x26/0x2b [btrfs] [1272.957853] btrfs_put_block_group.cold+0x5d/0x8e [btrfs] [1272.958289] btrfs_discard_workfn+0x194/0x380 [btrfs] [1272.958729] process_one_work+0x130/0x290 [1272.959026] worker_thread+0x2ea/0x420 [1272.959335] ? __pfx_worker_thread+0x10/0x10 [1272.959644] kthread+0xd7/0x1c0 [1272.959872] ? __pfx_kthread+0x10/0x10 [1272.960172] ret_from_fork+0x30/0x50 [1272.960474] ? __pfx_kthread+0x10/0x10 [1272.960745] ret_from_fork_asm+0x1a/0x30 [1272.961035] </TASK> [1272.961238] ---[ end trace 0000000000000000 ]---
Though we have seen them in the async discard workfn as well. It is most likely to happen after a relocation finishes which cancels discard, tears down the block group, etc.
Fix this fully by taking the lock around the list_del_init + clear_bit so that the two are done atomically.
--- fs/btrfs/block-group.c | 3 +++ 1 file changed, 3 insertions(+)
fs/btrfs/block-group.c +3 -0
@@ -2780,8 +2780,11 @@ void btrfs_create_pending_block_groups(s/* Already aborted the transaction if it failed. */ next:btrfs_dec_delayed_refs_rsv_bg_inserts (fs_info); + +spin_lock (&fs_info->unused_bgs_lock);list_del_init (&block_group->bg_list);clear_bit (BLOCK_GROUP_FLAG_NEW , &block_group->runtime_flags); +spin_unlock (&fs_info->unused_bgs_lock);/* * If the block group is still unused, add it to the list of
Greg Kroah-Hartman
maintainerPATCH 143/158 usb: hub: fix detection of high tier USB3 devices behind suspended hubs
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mathias Nyman <[email protected]>
commit 8f5b7e2bec1c36578fdaa74a6951833541103e27 upstream.
USB3 devices connected behind several external suspended hubs may not be detected when plugged in due to aggressive hub runtime pm suspend.
The hub driver immediately runtime-suspends hubs if there are no active children or port activity.
There is a delay between the wake signal causing hub resume, and driver visible port activity on the hub downstream facing ports. Most of the LFPS handshake, resume signaling and link training done on the downstream ports is not visible to the hub driver until completed, when device then will appear fully enabled and running on the port.
This delay between wake signal and detectable port change is even more significant with chained suspended hubs where the wake signal will propagate upstream first. Suspended hubs will only start resuming downstream ports after upstream facing port resumes.
The hub driver may resume a USB3 hub, read status of all ports, not yet see any activity, and runtime suspend back the hub before any port activity is visible.
This exact case was seen when conncting USB3 devices to a suspended Thunderbolt dock.
USB3 specification defines a 100ms tU3WakeupRetryDelay, indicating USB3 devices expect to be resumed within 100ms after signaling wake. if not then device will resend the wake signal.
Give the USB3 hubs twice this time (200ms) to detect any port changes after resume, before allowing hub to runtime suspend again.
--- drivers/usb/core/hub.c | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-)
drivers/usb/core/hub.c +32 -1
@@ -67,6 +67,12 @@*/ #define USB_SHORT_SET_ADDRESS_REQ_TIMEOUT 500/* ms */ +/* +* Give SS hubs 200ms time after wake to train downstream links before +* assuming no port activity and allowing hub to runtime suspend back. +*/ +#define USB_SS_PORT_U0_WAKE_TIME 200/* ms */ +/* Protect struct usb_device->state and ->children members * Note: Both are also protected by ->dev.sem, except that ->state can * change to USB_STATE_NOTATTACHED even when the semaphore isn't held. */
@@ -1067,11 +1073,12 @@ int usb_remove_device(struct usb_deviceenum hub_activation_type {HUB_INIT ,HUB_INIT2 ,HUB_INIT3 ,/* INITs must come first */ -HUB_POST_RESET ,HUB_RESUME ,HUB_RESET_RESUME , +HUB_POST_RESET ,HUB_RESUME ,HUB_RESET_RESUME ,HUB_POST_RESUME , };static void hub_init_func2 (struct work_struct *ws);static void hub_init_func3 (struct work_struct *ws); +static void hub_post_resume (struct work_struct *ws);static void hub_activate (struct usb_hub *hub,enum hub_activation_type type) {
@@ -1094,6 +1101,13 @@ static void hub_activate(struct usb_hub goto init2; goto init3; } + +if (type ==HUB_POST_RESUME ) { +usb_autopm_put_interface_async (to_usb_interface (hub->intfdev)); +hub_put (hub); +return ; + } +hub_get (hub);/* The superspeed hub except for root hub has to use Hub Depth
@@ -1342,6 +1356,16 @@ static void hub_activate(struct usb_hubdevice_unlock (&hdev->dev); } +if (type ==HUB_RESUME &&hub_is_superspeed (hub->hdev)) { +/* give usb3 downstream links training time after hub resume */ +INIT_DELAYED_WORK (&hub->init_work, hub_post_resume); +queue_delayed_work (system_power_efficient_wq, &hub->init_work, +msecs_to_jiffies (USB_SS_PORT_U0_WAKE_TIME )); +usb_autopm_get_interface_no_resume ( +to_usb_interface (hub->intfdev)); +return ; + } +hub_put (hub); }
@@ -1360,6 +1384,13 @@ static void hub_init_func3(struct work_shub_activate (hub,HUB_INIT3 ); } +static void hub_post_resume (struct work_struct *ws) +{ + struct usb_hub *hub = container_of(ws, struct usb_hub, init_work.work); + +hub_activate (hub,HUB_POST_RESUME ); +} +enum hub_quiescing_type {HUB_DISCONNECT ,HUB_PRE_RESET ,HUB_SUSPEND };
Greg Kroah-Hartman
maintainerPATCH 144/158 usb: hub: Fix flushing and scheduling of delayed work that tunes runtime pm
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mathias Nyman <[email protected]>
commit a49e1e2e785fb3621f2d748581881b23a364998a upstream.
Delayed work to prevent USB3 hubs from runtime-suspending immediately after resume was added in commit 8f5b7e2bec1c ("usb: hub: fix detection of high tier USB3 devices behind suspended hubs").
This delayed work needs be flushed if system suspends, or hub needs to be quiesced for other reasons right after resume. Not flushing it triggered issues on QC SC8280XP CRD board during suspend/resume testing.
Fix it by flushing the delayed resume work in hub_quiesce()
The delayed work item that allow hub runtime suspend is also scheduled just before calling autopm get. Alan pointed out there is a small risk that work is run before autopm get, which would call autopm put before get, and mess up the runtime pm usage order.
Swap the order of work sheduling and calling autopm get to solve this.
--- drivers/usb/core/hub.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/usb/core/hub.c +4 -2
@@ -1358,11 +1358,12 @@ static void hub_activate(struct usb_hubif (type ==HUB_RESUME &&hub_is_superspeed (hub->hdev)) {/* give usb3 downstream links training time after hub resume */ +usb_autopm_get_interface_no_resume ( +to_usb_interface (hub->intfdev)); +INIT_DELAYED_WORK (&hub->init_work, hub_post_resume);queue_delayed_work (system_power_efficient_wq, &hub->init_work,msecs_to_jiffies (USB_SS_PORT_U0_WAKE_TIME )); -usb_autopm_get_interface_no_resume ( -to_usb_interface (hub->intfdev));return ; }
@@ -1416,6 +1417,7 @@ static void hub_quiesce(struct usb_hub */* Stop hub_wq and related activity */ del_timer_sync (&hub->irq_urb_retry); +flush_delayed_work (&hub->init_work);usb_kill_urb (hub->urb);if (hub->has_indicators)cancel_delayed_work_sync (&hub->leds);
Greg Kroah-Hartman
maintainerPATCH 135/158 Revert "cgroup_freezer: cgroup_freezing: Check if not frozen"
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chen Ridong <[email protected]>
[ Upstream commit 14a67b42cb6f3ab66f41603c062c5056d32ea7dd ]
This reverts commit cff5f49d433fcd0063c8be7dd08fa5bf190c6c37.
Commit cff5f49d433f ("cgroup_freezer: cgroup_freezing: Check if not frozen") modified the cgroup_freezing() logic to verify that the FROZEN flag is not set, affecting the return value of the freezing() function, in order to address a warning in __thaw_task.
A race condition exists that may allow tasks to escape being frozen. The following scenario demonstrates this issue:
CPU 0 (get_signal path) CPU 1 (freezer.state reader)try_to_freeze read freezer.state__refrigerator freezer_read
update_if_frozen
WRITE_ONCE(current->__state, TASK_FROZEN); ... /* Task is now marked frozen */ /* frozen(task) == true */ /* Assuming other tasks are frozen */ freezer->state |= CGROUP_FROZEN;
/* freezing(current) returns false */
/* because cgroup is frozen (not freezing) */ break out__set_current_state(TASK_RUNNING);
/* Bug: Task resumes running when it should remain frozen */
The existing !frozen(p) check in __thaw_task makes the WARN_ON_ONCE(freezing(p)) warning redundant. Removing this warning enables reverting the commit cff5f49d433f ("cgroup_freezer: cgroup_freezing: Check if not frozen") to resolve the issue.
The warning has been removed in the previous patch. This patch revert the commit cff5f49d433f ("cgroup_freezer: cgroup_freezing: Check if not frozen") to complete the fix.
--- kernel/cgroup/legacy_freezer.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
kernel/cgroup/legacy_freezer.c +1 -7
@@ -66,15 +66,9 @@ static struct freezer *parent_freezer(struct freezer *freezer)bool cgroup_freezing (struct task_struct *task) {bool ret; -unsigned int state;rcu_read_lock (); -/* Check if the cgroup is still FREEZING, but not FROZEN. The extra -* !FROZEN check is required, because the FREEZING bit is not cleared -* when the state FROZEN is reached. -*/ - state =task_freezer (task)->state; - ret = (state &CGROUP_FREEZING ) && !(state &CGROUP_FROZEN ); + ret =task_freezer (task)->state &CGROUP_FREEZING ;rcu_read_unlock ();return ret;
Signature · 1 line
2.39.5
Re: [PATCH 6.12 020/158] tools/hv: fcopy: Fix irregularities with size of ring buffer
In reply to Greg Kroah-HartmanQuoted 23 lines · Greg Kroah-Hartman
6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Naman Jain <[email protected]>
commit
a4131a50d072b369bfed0b41e741c41fd8048641upstream.Size of ring buffer, as defined in
uio_hv_genericdriver, is no longer fixed to 16 KB. This creates a problem in fcopy, since this size was hardcoded. With the change in place to make ring sysfs node actually reflect the size of underlying ring buffer, it is safe to get the size of ring sysfs file and use it for ring buffer size in fcopy daemon. Fix the issue of disparity in ring buffer size, by making it dynamic in fcopy uio daemon.Fixes 0315fef2aff9 ("uio_hv_generic: Align ring size to system page")Signed-off-by Naman Jain <[email protected]>Reviewed-by Saurabh Sengar <[email protected]>Reviewed-by Long Li <[email protected]>Signed-off-by Wei Liu <[email protected]>
Quoted 3 lines
Message-ID: <[email protected]>
Signed-off-by Greg Kroah-Hartman <[email protected]>---
Hello Greg,
Please don't pick this change yet. I have shared the reason in the other thread:
"Re: Patch "tools/hv: fcopy: Fix irregularities with size of ring buffer" has been added to the 6.12-stable tree"
Pasting it here:
This patch depends on my older patch [1] which makes sure that the size of the ring sysfs node actually reflects the underlying ring buffer size.
[1] could not be ported on 6.12 and older kernels because of missing dependencies [2] and [3].
With kernel change [4] being backported to 6.12 kernel, FCopy is currently broken which I was trying to address with my patch.
Adding Thomas as well if its possible to port these patches on older kernels.
However for 6.6 and older kernels, fcopy is not working for me even without [4], which I am trying to debug.
------------
[1]65995e97a1ca ("Drivers: hv: Make the sysfs node size for the ring buffer dynamic")
[2]0afcee132bbc ("sysfs: explicitly pass size to sysfs_add_bin_file_mode_ns()")
[3]bebf29b18f34 ("sysfs: introduce callback attribute_group::bin_size")
[4]0315fef2aff9 ("uio_hv_generic: Align ring size to system page")
Regards,
Naman
Quoted 154 lines
tools/hv/hv_fcopy_uio_daemon.c | 91 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 81 insertions(+), 10 deletions(-)tools/hv/hv_fcopy_uio_daemon.c +81
-10@@ -35,7 +35,10 @@#define WIN8_SRV_MINOR 1#define WIN8_SRV_VERSION (WIN8_SRV_MAJOR << 16 | WIN8_SRV_MINOR) -#define FCOPY_UIO "/sys/bus/vmbus/devices/eb765408-105f-49b6-b4aa-c123b64d17d4/uio" +#define FCOPY_DEVICE_PATH (subdir) \ + "/sys/bus/vmbus/devices/eb765408-105f-49b6-b4aa-c123b64d17d4/" #subdir +#define FCOPY_UIO_PATH FCOPY_DEVICE_PATH(uio) +#define FCOPY_CHANNELS_PATH FCOPY_DEVICE_PATH(channels)#define FCOPY_VER_COUNT 1static const int fcopy_versions[] = {@@ -47,9 +50,62 @@ static const int fw_versions[] = {UTIL_FW_VERSION }; -#define HV_RING_SIZE 0x4000/* 16KB ring buffer size */ +static uint32_t get_ring_buffer_size (void ) +{ +char ring_path[PATH_MAX ]; +DIR *dir; +struct dirent *entry; +struct stat st; +uint32_t ring_size =0 ; +int retry_count =0 ; -static unsigned char desc[HV_RING_SIZE ]; +/* Find the channel directory */ + dir =opendir (FCOPY_CHANNELS_PATH ); +if (!dir) { +usleep (100 *1000 );/* Avoid race with kernel, wait 100ms and retry once */ + dir =opendir (FCOPY_CHANNELS_PATH ); +if (!dir) { +syslog (LOG_ERR ,"Failed to open channels directory: %s" ,strerror (errno)); +return 0 ; + } + } + +retry_once: +while ((entry =readdir (dir)) !=NULL ) { +if (entry->d_type ==DT_DIR &&strcmp (entry->d_name,"." ) !=0 && +strcmp (entry->d_name,".." ) !=0 ) { +snprintf (ring_path,sizeof (ring_path),"%s/%s/ring" , +FCOPY_CHANNELS_PATH , entry->d_name); + +if (stat (ring_path, &st) ==0 ) { +/* +* stat returns size of Tx, Rx rings combined, +* so take half of it for individual ring size. +*/ + ring_size = (uint32_t )st.st_size /2 ; +syslog (LOG_INFO ,"Ring buffer size from %s: %u bytes" , + ring_path, ring_size); +break ; + } + } + } + +if (!ring_size && retry_count ==0 ) { + retry_count =1 ; +rewinddir (dir); +usleep (100 *1000 );/* Wait 100ms and retry once */ + goto retry_once; + } + +closedir (dir); + +if (!ring_size) +syslog (LOG_ERR ,"Could not determine ring size" ); + +return ring_size; +} + +static unsigned char *desc;static int target_fd;static char target_fname[PATH_MAX ];@@ -406,7 +462,7 @@ int main(int argc, char *argv[])int daemonize =1 , long_index =0 , opt, ret = -EINVAL ;struct vmbus_br txbr, rxbr;void *ring; -uint32_t len =HV_RING_SIZE ; +uint32_t ring_size, len;char uio_name[NAME_MAX ] = {0 };char uio_dev_path[PATH_MAX ] = {0 };@@ -437,7 +493,20 @@ int main(int argc, char *argv[])openlog ("HV_UIO_FCOPY" ,0 ,LOG_USER );syslog (LOG_INFO ,"starting; pid is:%d" ,getpid ()); -fcopy_get_first_folder (FCOPY_UIO , uio_name); + ring_size =get_ring_buffer_size (); +if (!ring_size) { + ret = -ENODEV ; + goto exit; + } + + desc =malloc (ring_size *sizeof (unsigned char )); +if (!desc) { +syslog (LOG_ERR ,"malloc failed for desc buffer" ); + ret = -ENOMEM ; + goto exit; + } + +fcopy_get_first_folder (FCOPY_UIO_PATH , uio_name);snprintf (uio_dev_path,sizeof (uio_dev_path),"/dev/%s" , uio_name); fcopy_fd =open (uio_dev_path,O_RDWR );@@ -445,17 +514,17 @@ int main(int argc, char *argv[])syslog (LOG_ERR ,"open %s failed; error: %d %s" , uio_dev_path, errno,strerror (errno)); ret = fcopy_fd; - goto exit; + goto free_desc; } - ring =vmbus_uio_map (&fcopy_fd,HV_RING_SIZE ); + ring =vmbus_uio_map (&fcopy_fd, ring_size);if (!ring) { ret = errno;syslog (LOG_ERR ,"mmap ringbuffer failed; error: %d %s" , ret,strerror (ret)); goto close; } -vmbus_br_setup (&txbr, ring,HV_RING_SIZE ); -vmbus_br_setup (&rxbr, (char *)ring +HV_RING_SIZE ,HV_RING_SIZE ); +vmbus_br_setup (&txbr, ring, ring_size); +vmbus_br_setup (&rxbr, (char *)ring + ring_size, ring_size); rxbr.vbr->imask =0 ;@@ -470,7 +539,7 @@ int main(int argc, char *argv[])continue ; } - len =HV_RING_SIZE ; + len = ring_size; ret =rte_vmbus_chan_recv_raw (&rxbr, desc, &len);if (unlikely (ret <=0 )) {/* This indicates a failure to communicate (or worse) */ @@ -490,6 +559,8 @@ int main(int argc, char *argv[]) } close:close (fcopy_fd); +free_desc: +free (desc); exit:return ret; }
Brett A C Sheffield
Tested-by# Librecast Test Results
010/010 [ OK ] libmld
120/120 [ OK ] liblibrecast
CPU/kernel: Linux auntie 6.12.40-rc1-g596aae841edf #31 SMP PREEMPT_DYNAMIC Tue Jul 22 16:04:12 -00 2025 x86_64 AMD Ryzen 9 9950X 16-Core Processor AuthenticAMD GNU/Linux
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.12.40 release. There are 158 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 24 Jul 2025 13:43:10 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.12.40-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.12.y
and the diffstat can be found below.thanks,
greg k-h
With addition to the previous report on the stable-rc 6.15.8-rc1 review While building allyesconfig build for arm64 and x86 with the toolchain clang-nightly version 22.0.0 the following build warnings / errors noticed on the stable-rc 6.12.40-rc1 review.
Regression Analysis:
- New regression? Yes
- Reproducibility? Yes
Build regression: arm64 x86 kcsan_test.c error variable 'dummy' is uninitialized when passed as a const pointer argument here
## Build log
kernel/kcsan/kcsan_test.c:591:41: error: variable 'dummy' is uninitialized when passed as a const pointer argument here [-Werror,-Wuninitialized-const-pointer]
591 | KCSAN_EXPECT_READ_BARRIER(atomic_read(&dummy), false);
| ^~~~~
1 error generated.
## Source
* Git tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
* Git sha: 596aae841edf981aab1df1845e6df012bed94594
* Git describe: v6.12.39-159-g596aae841edf
* Architectures: arm64 x86
* Toolchains: Debian clang version 22.0.0 (++20250721112855+43a829a7e894-1~exp1~20250721112913.1588)
* Kconfigs: allyesconfig
## Build
* Build log: https://regressions.linaro.org/lkft/linux-stable-rc-linux-6.12.y/v6.12.39-159-g596aae841edf/build/clang-nightly-allyesconfig/
* Build run: https://regressions.linaro.org/lkft/linux-stable-rc-linux-6.12.y/v6.12.39-159-g596aae841edf/testruns/1703644/
* Build link: https://storage.tuxsuite.com/public/linaro/lkft/builds/30EXE6Cnct6e7DCgsWWrXlMdO0z/
* Kernel config:
https://storage.tuxsuite.com/public/linaro/lkft/builds/30EXE6Cnct6e7DCgsWWrXlMdO0z/config
## Steps to reproduce
* tuxmake --runtime podman --target-arch arm64 --toolchain clang-nightly --kconfig allyesconfig LLVM=1 LLVM_IAS=1
--
Linaro LKFT
https://lkft.linaro.org
Quoted 35 lines · Naresh Kamboju
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.12.40 release. There are 158 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 24 Jul 2025 13:43:10 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.12.40-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.12.y
and the diffstat can be found below.thanks,
greg k-h
With addition to the previous report on the stable-rc 6.15.8-rc1 review While building allyesconfig build for arm64 and x86 with the toolchain clang-nightly version 22.0.0 the following build warnings / errors noticed on the stable-rc 6.12.40-rc1 review.
Regression Analysis:
- New regression? Yes
- Reproducibility? YesBuild regression: arm64 x86
kcsan_test.cerror variable 'dummy' is uninitialized when passed as a const pointer argument here
Quoted 8 lines
## Build log
kernel/kcsan/kcsan_test.c:591:41: error: variable 'dummy' is uninitialized when passed as a const pointer argument here [-Werror,-Wuninitialized-const-pointer]
591 |KCSAN_EXPECT_READ_BARRIER(atomic_read(&dummy), false);
| ^~~~~
1 error generated.
Thanks for catching this. Newer versions of Clang seem to be getting smarter. We can silence the warning with the below patch:
From 56c920457a4e7077b83aafb0c9c8105fb98b0158 Mon Sep 17 00:00:00 2001
From: Marco Elver <[email protected]>
Date: Tue, 22 Jul 2025 20:19:17 +0200
Subject: [PATCH] kcsan/test: Initialize dummy variable
Newer compiler versions rightfully point out:
kernel/kcsan/kcsan_test.c:591:41: error: variable 'dummy' is uninitialized when passed as a const pointer argument here [-Werror,-Wuninitialized-const-pointer]
591 | KCSAN_EXPECT_READ_BARRIER(atomic_read(&dummy), false);
| ^~~~~
1 error generated.
Although this particular test does not care about the value stored in the dummy atomic variable, let's silence the warning.
--- kernel/kcsan/kcsan_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/kcsan/kcsan_test.c +1 -1
@@ -533,7 +533,7 @@ static void test_barrier_nothreads(struct kunit *test)struct kcsan_scoped_access *reorder_access =NULL ;#endif arch_spinlock_t arch_spinlock = __ARCH_SPIN_LOCK_UNLOCKED; -atomic_t dummy; +atomic_t dummy =ATOMIC_INIT (0 );KCSAN_TEST_REQUIRES (test, reorder_access !=NULL );KCSAN_TEST_REQUIRES (test,IS_ENABLED (CONFIG_SMP ));
Signature · 1 line
2.50.0.727.gbf7dc18ff4-goog
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.12.40 release. There are 158 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 24 Jul 2025 13:43:10 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.12.40-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.12.y
and the diffstat can be found below.thanks,
greg k-h
On ARCH_BRCMSTB using 32-bit and 64-bit ARM kernels, build tested on BMIPS_GENERIC:
Signature · 1 line
Florian
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.12.40 release. There are 158 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 24 Jul 2025 13:43:10 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.12.40-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.12.y
and the diffstat can be found below.thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
thanks,
-- Shuah
Quoted 8 lines · On Tue, 22 Jul 2025 15:43:04 +0200 Greg Kroah-Hartman…
This is the start of the stable review cycle for the 6.12.40 release. There are 158 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 24 Jul 2025 13:43:10 +0000. Anything received after that time might be too late.
Boot-tested under QEMU for Rust x86_64, arm64 and riscv64; built-tested for loongarch64:
Thanks!
Cheers,
Miguel
Greg Kroah-Hartman
maintainerRe: [PATCH 6.12 020/158] tools/hv: fcopy: Fix irregularities with size of ring buffer
In reply to Naman JainQuoted 31 lines · Naman Jain
Quoted 23 lines · Greg Kroah-Hartman
6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Naman Jain <[email protected]>
commit
a4131a50d072b369bfed0b41e741c41fd8048641upstream.Size of ring buffer, as defined in
uio_hv_genericdriver, is no longer fixed to 16 KB. This creates a problem in fcopy, since this size was hardcoded. With the change in place to make ring sysfs node actually reflect the size of underlying ring buffer, it is safe to get the size of ring sysfs file and use it for ring buffer size in fcopy daemon. Fix the issue of disparity in ring buffer size, by making it dynamic in fcopy uio daemon.Fixes 0315fef2aff9 ("uio_hv_generic: Align ring size to system page")Signed-off-by Naman Jain <[email protected]>Reviewed-by Saurabh Sengar <[email protected]>Reviewed-by Long Li <[email protected]>Signed-off-by Wei Liu <[email protected]>Quoted 3 lines
Message-ID: <[email protected]>
Signed-off-by Greg Kroah-Hartman <[email protected]>---
Quoted 5 lines
Hello Greg,
Please don't pick this change yet. I have shared the reason in the other thread:
"Re: Patch "tools/hv: fcopy: Fix irregularities with size of ring buffer" has been added to the 6.12-stable tree"
Ok, I have dropped this from the 6.12.y tree now.
thanks,
greg k-h
Am 22.07.2025 um 15:43 schrieb Greg Kroah-Hartman:
Quoted 4 lines
This is the start of the stable review cycle for the 6.12.40 release. There are 158 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Builds, boots and works on my 2-socket Ivy Bridge Xeon E5-2697 v2 server. No dmesg oddities or regressions found.
Beste Grüße,
Peter Schneider
Signature · 8 lines
Climb the mountain not to plant your flag, but to embrace the challenge, enjoy the air and behold the view. Climb it so you can see the world, not so the world can see you. -- David McCullough Jr. OpenPGP: 0xA3828BD796CCE11A8CADE8866E3A92C92C3FF244 Download: https://www.peters-netzplatz.de/download/pschneider1968_pub.asc https://keys.mailvelope.com/pks/lookup?op=get&[email protected] https://keys.mailvelope.com/pks/lookup?op=get&[email protected]
Quoted 4 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.12.40 release. There are 158 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Hi Greg,
Quoted 4 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.12.40 release. There are 158 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
No problems seen on x86_64 and aarch64 with our testing.
Thanks,
Harshit
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.12.40 release. There are 158 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 24 Jul 2025 13:43:10 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.12.40-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.12.y
and the diffstat can be found below.thanks,
greg k-h
All tests passing for Tegra ...
Test results for stable-v6.12:
10 builds: 10 pass, 0 fail
28 boots: 28 pass, 0 fail
120 tests: 120 pass, 0 failLinux version: 6.12.40-rc1-g596aae841edf
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra186-p3509-0000+p3636-0001, tegra194-p2972-0000,
tegra194-p3509-0000+p3668-0000, tegra20-ventana,
tegra210-p2371-2180, tegra210-p3450-0000,
tegra30-cardhu-a04Jon
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.12.40 release. There are 158 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 24 Jul 2025 13:43:10 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.12.40-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.12.y
and the diffstat can be found below.thanks,
greg k-h
Built and booted successfully on RISC-V RV64 (HiFive Unmatched).
The kernel, bpf tool, and perf tool builds fine for v6.12.40-rc1 on x86 and arm64 Azure VM.
Thanks,
Hardik
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.12.40 release. There are 158 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 24 Jul 2025 13:43:10 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.12.40-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.12.y
and the diffstat can be found below.thanks,
greg k-h
Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.
## Build
* kernel: 6.12.40-rc1
* git: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
* git commit: 596aae841edf981aab1df1845e6df012bed94594
* git describe: v6.12.39-159-g596aae841edf
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.12.y/build/v6.12.39-159-g596aae841edf
## Test Regressions (compared to v6.12.37-168-gd50d16f00292)
## Metric Regressions (compared to v6.12.37-168-gd50d16f00292)
## Test Fixes (compared to v6.12.37-168-gd50d16f00292)
## Metric Fixes (compared to v6.12.37-168-gd50d16f00292)
## Test result summary
total: 322673, pass: 295025, fail: 7381, skip: 19752, xfail: 515
## Build Summary
* arc: 5 total, 5 passed, 0 failed
* arm: 139 total, 137 passed, 2 failed
* arm64: 57 total, 56 passed, 1 failed
* i386: 18 total, 18 passed, 0 failed
* mips: 34 total, 33 passed, 1 failed
* parisc: 4 total, 4 passed, 0 failed
* powerpc: 40 total, 40 passed, 0 failed
* riscv: 25 total, 23 passed, 2 failed
* s390: 22 total, 21 passed, 1 failed
* sh: 5 total, 5 passed, 0 failed
* sparc: 4 total, 3 passed, 1 failed
* x86_64: 49 total, 47 passed, 2 failed
## Test suites summary
* boot
* commands
* kselftest-arm64
* kselftest-breakpoints
* kselftest-capabilities
* kselftest-cgroup
* kselftest-clone3
* kselftest-core
* kselftest-cpu-hotplug
* kselftest-cpufreq
* kselftest-efivarfs
* kselftest-exec
* kselftest-fpu
* kselftest-ftrace
* kselftest-futex
* kselftest-gpio
* kselftest-intel_pstate
* kselftest-ipc
* kselftest-kcmp
* kselftest-kvm
* kselftest-livepatch
* kselftest-membarrier
* kselftest-memfd
* kselftest-mincore
* kselftest-mm
* kselftest-mqueue
* kselftest-net
* kselftest-net-mptcp
* kselftest-openat2
* kselftest-ptrace
* kselftest-rseq
* kselftest-rtc
* kselftest-seccomp
* kselftest-sigaltstack
* kselftest-size
* kselftest-tc-testing
* kselftest-timers
* kselftest-tmpfs
* kselftest-tpm2
* kselftest-user_events
* kselftest-vDSO
* kselftest-x86
* kunit
* kvm-unit-tests
* lava
* libgpiod
* libhugetlbfs
* log-parser-boot
* log-parser-build-clang
* log-parser-build-gcc
* log-parser-test
* ltp-capability
* ltp-commands
* ltp-containers
* ltp-controllers
* ltp-cpuhotplug
* ltp-crypto
* ltp-cve
* ltp-dio
* ltp-fcntl-locktests
* ltp-fs
* ltp-fs_bind
* ltp-fs_perms_simple
* ltp-hugetlb
* ltp-math
* ltp-mm
* ltp-nptl
* ltp-pty
* ltp-sched
* ltp-smoke
* ltp-syscalls
* ltp-tracing
* modules
* perf
* rcutorture
* rt-tests-cyclicdeadline
* rt-tests-pi-stress
* rt-tests-pmqtest
* rt-tests-rt-migrate-test
* rt-tests-signaltest
--
Linaro LKFT
https://lkft.linaro.org
Hi!
Quoted 4 lines
This is the start of the stable review cycle for the 6.12.40 release. There are 158 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
CIP testing did not find any problems here:
https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/-/tree/linux-6.12.y
Best regards,
Pavel
Signature · 2 lines
In cooperation with DENX Software Engineering GmbH, HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Re: [PATCH 6.12 020/158] tools/hv: fcopy: Fix irregularities with size of ring buffer
In reply to Greg Kroah-HartmanQuoted 38 lines · Greg Kroah-Hartman
Quoted 31 lines · Naman Jain
Quoted 23 lines · Greg Kroah-Hartman
6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Naman Jain <[email protected]>
commit
a4131a50d072b369bfed0b41e741c41fd8048641upstream.Size of ring buffer, as defined in
uio_hv_genericdriver, is no longer fixed to 16 KB. This creates a problem in fcopy, since this size was hardcoded. With the change in place to make ring sysfs node actually reflect the size of underlying ring buffer, it is safe to get the size of ring sysfs file and use it for ring buffer size in fcopy daemon. Fix the issue of disparity in ring buffer size, by making it dynamic in fcopy uio daemon.Fixes 0315fef2aff9 ("uio_hv_generic: Align ring size to system page")Signed-off-by Naman Jain <[email protected]>Reviewed-by Saurabh Sengar <[email protected]>Reviewed-by Long Li <[email protected]>Signed-off-by Wei Liu <[email protected]>Quoted 3 lines
Message-ID: <[email protected]>
Signed-off-by Greg Kroah-Hartman <[email protected]>---
Quoted 5 lines
Hello Greg,
Please don't pick this change yet. I have shared the reason in the other thread:
"Re: Patch "tools/hv: fcopy: Fix irregularities with size of ring buffer" has been added to the 6.12-stable tree"
Quoted 5 lines
Ok, I have dropped this from the 6.12.y tree now.
thanks,
greg k-h
Hello Greg,
Can you please consider picking this change for next release of 6.12 kernel. The dependent change [1] is now part of 6.12 kernel, so we need this change to fix fcopy in 6.12 kernel.
[1]: Drivers: hv: Make the sysfs node size for the ring buffer dynamic
Please let me know if you want me to send a patch for back-port separately.
Regards,
Naman
Greg Kroah-Hartman
maintainerRe: [PATCH 6.12 020/158] tools/hv: fcopy: Fix irregularities with size of ring buffer
Quoted 45 lines · Naman Jain
Quoted 42 lines · Greg Kroah-Hartman
Quoted 31 lines · Naman Jain
Quoted 23 lines · Greg Kroah-Hartman
6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Naman Jain <[email protected]>
commit
a4131a50d072b369bfed0b41e741c41fd8048641upstream.Size of ring buffer, as defined in
uio_hv_genericdriver, is no longer fixed to 16 KB. This creates a problem in fcopy, since this size was hardcoded. With the change in place to make ring sysfs node actually reflect the size of underlying ring buffer, it is safe to get the size of ring sysfs file and use it for ring buffer size in fcopy daemon. Fix the issue of disparity in ring buffer size, by making it dynamic in fcopy uio daemon.Fixes 0315fef2aff9 ("uio_hv_generic: Align ring size to system page")Signed-off-by Naman Jain <[email protected]>Reviewed-by Saurabh Sengar <[email protected]>Reviewed-by Long Li <[email protected]>Signed-off-by Wei Liu <[email protected]>Quoted 3 lines
Message-ID: <[email protected]>
Signed-off-by Greg Kroah-Hartman <[email protected]>---
Quoted 5 lines
Hello Greg,
Please don't pick this change yet. I have shared the reason in the other thread:
"Re: Patch "tools/hv: fcopy: Fix irregularities with size of ring buffer" has been added to the 6.12-stable tree"Ok, I have dropped this from the 6.12.y tree now.
thanks,
Quoted 8 lines
Quoted 1 line
greg k-h
Hello Greg,
Can you please consider picking this change for next release of 6.12 kernel. The dependent change [1] is now part of 6.12 kernel, so we need this change to fix fcopy in 6.12 kernel.[1]: Drivers: hv: Make the sysfs node size for the ring buffer dynamic
What are the exact git commit ids you want to have applied here? [1] does not reference much to me :)
thanks,
greg k-h
Re: [PATCH 6.12 020/158] tools/hv: fcopy: Fix irregularities with size of ring buffer
Quoted 53 lines · Greg Kroah-Hartman
Quoted 52 lines · Naman Jain
Quoted 38 lines · Greg Kroah-Hartman
Quoted 31 lines · Naman Jain
Quoted 23 lines · Greg Kroah-Hartman
6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Naman Jain <[email protected]>
commit
a4131a50d072b369bfed0b41e741c41fd8048641upstream.Size of ring buffer, as defined in
uio_hv_genericdriver, is no longer fixed to 16 KB. This creates a problem in fcopy, since this size was hardcoded. With the change in place to make ring sysfs node actually reflect the size of underlying ring buffer, it is safe to get the size of ring sysfs file and use it for ring buffer size in fcopy daemon. Fix the issue of disparity in ring buffer size, by making it dynamic in fcopy uio daemon.Fixes 0315fef2aff9 ("uio_hv_generic: Align ring size to system page")Signed-off-by Naman Jain <[email protected]>Reviewed-by Saurabh Sengar <[email protected]>Reviewed-by Long Li <[email protected]>Signed-off-by Wei Liu <[email protected]>Quoted 3 lines
Message-ID: <[email protected]>
Signed-off-by Greg Kroah-Hartman <[email protected]>---
Quoted 5 lines
Hello Greg,
Please don't pick this change yet. I have shared the reason in the other thread:
"Re: Patch "tools/hv: fcopy: Fix irregularities with size of ring buffer" has been added to the 6.12-stable tree"Quoted 5 lines
Ok, I have dropped this from the 6.12.y tree now.
thanks,
greg k-h
Hello Greg,
Can you please consider picking this change for next release of 6.12 kernel. The dependent change [1] is now part of 6.12 kernel, so we need this change to fix fcopy in 6.12 kernel.
Quoted 8 lines
Quoted 1 line
[1]: Drivers: hv: Make the sysfs node size for the ring buffer dynamic
What are the exact git commit ids you want to have applied here? [1] does not reference much to me :)
thanks,
greg k-h
My bad :)
Please pick the commit a4131a50d072 ("tools/hv: fcopy: Fix irregularities with size of ring buffer") in next 6.12 release, which is supposed to fix fcopy.
The commit which added the missing dependency is now already part of v6.12.42 kernel c7f864d34529 ("Drivers: hv: Make the sysfs node size for the ring buffer dynamic")
Earlier, when I requested you to drop the change from backport list because above change was not part of latest 6.12 kernel.
Regards,
Naman
Greg Kroah-Hartman
maintainerRe: [PATCH 6.12 020/158] tools/hv: fcopy: Fix irregularities with size of ring buffer
Quoted 72 lines · Naman Jain
Quoted 53 lines · Greg Kroah-Hartman
Quoted 52 lines · Naman Jain
Quoted 38 lines · Greg Kroah-Hartman
Quoted 31 lines · Naman Jain
Quoted 23 lines · Greg Kroah-Hartman
6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Naman Jain <[email protected]>
commit
a4131a50d072b369bfed0b41e741c41fd8048641upstream.Size of ring buffer, as defined in
uio_hv_genericdriver, is no longer fixed to 16 KB. This creates a problem in fcopy, since this size was hardcoded. With the change in place to make ring sysfs node actually reflect the size of underlying ring buffer, it is safe to get the size of ring sysfs file and use it for ring buffer size in fcopy daemon. Fix the issue of disparity in ring buffer size, by making it dynamic in fcopy uio daemon.Fixes 0315fef2aff9 ("uio_hv_generic: Align ring size to system page")Signed-off-by Naman Jain <[email protected]>Reviewed-by Saurabh Sengar <[email protected]>Reviewed-by Long Li <[email protected]>Signed-off-by Wei Liu <[email protected]>Quoted 3 lines
Message-ID: <[email protected]>
Signed-off-by Greg Kroah-Hartman <[email protected]>---
Quoted 5 lines
Hello Greg,
Please don't pick this change yet. I have shared the reason in the other thread:
"Re: Patch "tools/hv: fcopy: Fix irregularities with size of ring buffer" has been added to the 6.12-stable tree"Quoted 5 lines
Ok, I have dropped this from the 6.12.y tree now.
thanks,
greg k-h
Hello Greg,
Can you please consider picking this change for next release of 6.12 kernel. The dependent change [1] is now part of 6.12 kernel, so we need this change to fix fcopy in 6.12 kernel.Quoted 8 lines
Quoted 1 line
[1]: Drivers: hv: Make the sysfs node size for the ring buffer dynamic
What are the exact git commit ids you want to have applied here? [1] does not reference much to me :)
thanks,
greg k-h
My bad :)
Please pick the commit
a4131a50d072("tools/hv: fcopy: Fix irregularities with size of ring buffer") in next 6.12 release, which is supposed to fix fcopy.
Quoted 4 lines
The commit which added the missing dependency is now already part of v6.12.42 kernel
c7f864d34529("Drivers: hv: Make the sysfs node size for the ring buffer dynamic")
Now queued up, thanks.
greg k-h