Skip to contentSkip to conversation

7.0.10-rc1 review

PATCH In review Greg Kroah-Hartman 20 participants 1,172 messages May 20 – May 22 Page 1 of 9

Subsystems (6)
lore
Share & tools
lore
author maintainer
#1 lore raw

PATCH 1/1146 blk-cgroup: wait for blkcg cleanup before initializing new disk

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Ming Lei <[email protected]>

[ Upstream commit 3dbaacf6ab68f81e3375fe769a2ecdbd3ce386fd ]

When a queue is shared across disk rebind (e.g., SCSI unbind/bind), the previous disk's blkcg state is cleaned up asynchronously via disk_release() -> blkcg_exit_disk(). If the new disk's blkcg_init_disk() runs before that cleanup finishes, we may overwrite q->root_blkg while the old one is still alive, and radix_tree_insert() in blkg_create() fails with -EEXIST because the old blkg entries still occupy the same queue id slot in blkcg->blkg_tree. This causes the sd probe to fail with -ENOMEM.

Fix it by waiting in blkcg_init_disk() for root_blkg to become NULL, which indicates the previous disk's blkcg cleanup has completed.

Fixes 1059699f87eb ("block: move blkcg initialization/destroy into disk allocation/release handler")
Cc Yi Zhang <[email protected]>
---
 block/blk-cgroup.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
block/blk-cgroup.c +15 -0
index b70096497d389..2d7b18eb72915 100644
@@ -24,6 +24,7 @@
 #include <linux/backing-dev.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
+#include <linux/wait_bit.h>
 #include <linux/atomic.h>
 #include <linux/ctype.h>
 #include <linux/resume_user_mode.h>
@@ -611,6 +612,8 @@ static void blkg_destroy_all(struct gendisk *disk)
 
 	q->root_blkg = NULL;
 	spin_unlock_irq(&q->queue_lock);
+
+	wake_up_var(&q->root_blkg);
 }
 
 static void blkg_iostat_set(struct blkg_iostat *dst, struct blkg_iostat *src)
@@ -1498,6 +1501,18 @@ int blkcg_init_disk(struct gendisk *disk)
 	struct blkcg_gq *new_blkg, *blkg;
 	bool preloaded;
 
+	/*
+	 * If the queue is shared across disk rebind (e.g., SCSI), the
+	 * previous disk's blkcg state is cleaned up asynchronously via
+	 * disk_release() -> blkcg_exit_disk(). Wait for that cleanup to
+	 * finish (indicated by root_blkg becoming NULL) before setting up
+	 * new blkcg state. Otherwise, we may overwrite q->root_blkg while
+	 * the old one is still alive, and radix_tree_insert() in
+	 * blkg_create() will fail with -EEXIST because the old entries
+	 * still occupy the same queue id slot in blkcg->blkg_tree.
+	 */
+	wait_var_event(&q->root_blkg, !READ_ONCE(q->root_blkg));
+
 	new_blkg = blkg_alloc(&blkcg_root, disk, GFP_KERNEL);
 	if (!new_blkg)
 		return -ENOMEM;
Signature · 1 line
2.53.0
author maintainer
#11 lore raw

PATCH 10/1146 nilfs2: reject zero bd_oblocknr in nilfs_ioctl_mark_blocks_dirty()

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Deepanshu Kartikey <[email protected]>

[ Upstream commit be3e5d10643d3be1cbac9d9939f220a99253f980 ]

nilfs_ioctl_mark_blocks_dirty() uses bd_oblocknr to detect dead blocks by comparing it with the current block number bd_blocknr. If they differ, the block is considered dead and skipped.

However, bd_oblocknr should never be 0 since block 0 typically stores the primary superblock and is never a valid GC target block. A corrupted ioctl request with bd_oblocknr set to 0 causes the comparison to incorrectly match when the lookup returns -ENOENT and sets bd_blocknr to 0, bypassing the dead block check and calling nilfs_bmap_mark() on a non-existent block. This causes nilfs_btree_do_lookup() to return -ENOENT, triggering the WARN_ON(ret == -ENOENT).

Fix this by rejecting ioctl requests with bd_oblocknr set to 0 at the beginning of each iteration.

[ryusuke: slightly modified the commit message and comments for accuracy]

---
 fs/nilfs2/ioctl.c | 6 ++++++
 1 file changed, 6 insertions(+)
fs/nilfs2/ioctl.c +6 -0
index e17b8da664913..e0a606643e879 100644
@@ -736,6 +736,12 @@ static int nilfs_ioctl_mark_blocks_dirty(struct the_nilfs *nilfs,
 	int ret, i;
 
 	for (i = 0; i < nmembs; i++) {
+		/*
+		 * bd_oblocknr must never be 0 as block 0
+		 * is never a valid GC target block
+		 */
+		if (unlikely(!bdescs[i].bd_oblocknr))
+			return -EINVAL;
 		/* XXX: use macro or inline func to check liveness */
 		ret = nilfs_bmap_lookup_at_level(bmap,
 						 bdescs[i].bd_offset,
Signature · 1 line
2.53.0
author maintainer
#12 lore raw

PATCH 11/1146 blk-cgroup: fix disk reference leak in blkcg_maybe_throttle_current()

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Jackie Liu <[email protected]>

[ Upstream commit 23308af722fefed00af5f238024c11710938fba3 ]

Add the missing put_disk() on the error path in blkcg_maybe_throttle_current(). When blkcg lookup, blkg lookup, or blkg_tryget() fails, the function jumps to the out label which only calls rcu_read_unlock() but does not release the disk reference acquired by blkcg_schedule_throttle() via get_device(). Since current->throttle_disk is already set to NULL before the lookup, blkcg_exit() cannot release this reference either, causing the disk to never be freed.

Restore the reference release that was present as blk_put_queue() in the original code but was inadvertently dropped during the conversion from request_queue to gendisk.

Fixes f05837ed73d0 ("blk-cgroup: store a gendisk to throttle in struct task_struct")
---
 block/blk-cgroup.c | 1 +
 1 file changed, 1 insertion(+)
block/blk-cgroup.c +1 -0
index 2d7b18eb72915..554c87bb4a865 100644
@@ -2037,6 +2037,7 @@ void blkcg_maybe_throttle_current(void)
 	return;
 out:
 	rcu_read_unlock();
+	put_disk(disk);
 }
 
 /**
Signature · 1 line
2.53.0
author maintainer
#13 lore raw

PATCH 12/1146 pstore/ram: fix resource leak when ioremap() fails

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Cole Leavitt <[email protected]>

[ Upstream commit 2ddb69f686ef7a621645e97fc7329c50edf5d0e5 ]

In persistent_ram_iomap(), ioremap() or ioremap_wc() may return NULL on failure. Currently, if this happens, the function returns NULL without releasing the memory region acquired by request_mem_region().

This leads to a resource leak where the memory region remains reserved but unusable.

Additionally, the caller persistent_ram_buffer_map() handles NULL correctly by returning -ENOMEM, but without this check, a NULL return combined with request_mem_region() succeeding leaves resources in an inconsistent state.

This is the ioremap() counterpart to commit 05363abc7625 ("pstore:
ram_core: fix incorrect success return when vmap() fails") which fixed a similar issue in the vmap() path.

Fixes 404a6043385d ("staging: android: persistent_ram: handle reserving and mapping memory")
---
 fs/pstore/ram_core.c | 4 ++++
 1 file changed, 4 insertions(+)
fs/pstore/ram_core.c +4 -0
index ed97494abf60f..0713ef986c204 100644
@@ -488,6 +488,10 @@ static void *persistent_ram_iomap(phys_addr_t start, size_t size,
 	else
 		va = ioremap_wc(start, size);
 
+	/* We must release the mem region if ioremap fails. */
+	if (!va)
+		release_mem_region(start, size);
+
 	/*
 	 * Since request_mem_region() and ioremap() are byte-granularity
 	 * there is no need handle anything special like we do when the
Signature · 1 line
2.53.0
author maintainer
#14 lore raw

PATCH 13/1146 erofs: verify metadata accesses for file-backed mounts

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Gao Xiang <[email protected]>

[ Upstream commit 307210c262a29f41d7177851295ea1703bd04175 ]

For file-backed mounts, metadata is fetched via the page cache of backing inodes to avoid double caching and redundant copy ops out of RO uptodate folios, which is used by Android APEXes, ComposeFS, containerd. However, rw_verify_area() was missing prior to metadata accesses.

Similar to vfs_iocb_iter_read(), fix this by:
- Enabling fanotify pre-content hooks on metadata accesses;
- security_file_permission() for security modules.

Verified that fanotify pre-content hooks now works correctly.

Fixes fb176750266a ("erofs: add file-backed mount support")
---
 fs/erofs/data.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
fs/erofs/data.c +14 -0
index f79ee80627d95..132a27deb2f3b 100644
@@ -30,6 +30,20 @@ void *erofs_bread(struct erofs_buf *buf, erofs_off_t offset, bool need_kmap)
 {
 	pgoff_t index = (buf->off + offset) >> PAGE_SHIFT;
 	struct folio *folio = NULL;
+	loff_t fpos;
+	int err;
+
+	/*
+	 * Metadata access for file-backed mounts reuses page cache of backing
+	 * fs inodes (only folio data will be needed) to prevent double caching.
+	 * However, the data access range must be verified here in advance.
+	 */
+	if (buf->file) {
+		fpos = index << PAGE_SHIFT;
+		err = rw_verify_area(READ, buf->file, &fpos, PAGE_SIZE);
+		if (err < 0)
+			return ERR_PTR(err);
+	}
 
 	if (buf->page) {
 		folio = page_folio(buf->page);
Signature · 1 line
2.53.0
author maintainer
#18 lore raw

PATCH 14/1146 erofs: include the trailing NUL in FS_IOC_GETFSLABEL

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Zhan Xusheng <[email protected]>

[ Upstream commit d6250d49da4d8f11afc0d8991c84e0307949f92e ]

erofs_ioctl_get_volume_label() passes strlen(sbi->volume_name) as the length to copy_to_user(), which copies the label string without the trailing NUL byte. Since FS_IOC_GETFSLABEL callers expect a NUL-terminated string in the FSLABEL_MAX-sized buffer and may not pre-zero the buffer, this can cause userspace to read past the label into uninitialised stack memory.

Fix this by using strlen() + 1 to include the NUL terminator, consistent with how ext4 and xfs implement FS_IOC_GETFSLABEL.

Fixes 1cf12c717741 ("erofs: Add support for FS_IOC_GETFSLABEL")
---
 fs/erofs/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/erofs/inode.c +1 -1
index 4b3d21402e101..a188c570087ae 100644
@@ -351,7 +351,7 @@ static int erofs_ioctl_get_volume_label(struct inode *inode, void __user *arg)
 		ret = clear_user(arg, 1);
 	else
 		ret = copy_to_user(arg, sbi->volume_name,
-				   strlen(sbi->volume_name));
+				   strlen(sbi->volume_name) + 1);
 	return ret ? -EFAULT : 0;
 }
 
Signature · 1 line
2.53.0
author maintainer
#19 lore raw

PATCH 15/1146 md: fix array_state=clear sysfs deadlock

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Yu Kuai <[email protected]>

[ Upstream commit 2aa72276fab9851dbd59c2daeb4b590c5a113908 ]

When "clear" is written to array_state, md_attr_store() breaks sysfs active protection so the array can delete itself from its own sysfs store method.

However, md_attr_store() currently drops the mddev reference before calling sysfs_unbreak_active_protection(). Once do_md_stop(..., 0) has made the mddev eligible for delayed deletion, the temporary kobject reference taken by sysfs_break_active_protection() can become the last kobject reference protecting the md kobject.

That allows sysfs_unbreak_active_protection() to drop the last kobject reference from the current sysfs writer context. kobject teardown then recurses into kernfs removal while the current sysfs node is still being unwound, and lockdep reports recursive locking on kn->active with kernfs_drain() in the call chain.

Reproducer on an existing level:
1. Create an md0 linear array and activate it:
mknod /dev/md0 b 9 0
echo none > /sys/block/md0/md/metadata_version
echo linear > /sys/block/md0/md/level
echo 1 > /sys/block/md0/md/raid_disks
echo "$(cat /sys/class/block/sdb/dev)" > /sys/block/md0/md/new_dev

   echo "$(($(cat /sys/class/block/sdb/size) / 2))" > \
	/sys/block/md0/md/dev-sdb/size

echo 0 > /sys/block/md0/md/dev-sdb/slot echo active > /sys/block/md0/md/array_state
2. Wait briefly for the array to settle, then clear it:
sleep 2
echo clear > /sys/block/md0/md/array_state

The warning looks like:

WARNING: possible recursive locking detected bash/588 is trying to acquire lock:
(kn->active#65) at __kernfs_remove+0x157/0x1d0
but task is already holding lock:
(kn->active#65) at sysfs_unbreak_active_protection+0x1f/0x40
...

  Call Trace:
   kernfs_drain
   __kernfs_remove
   kernfs_remove_by_name_ns
   sysfs_remove_group
   sysfs_remove_groups
   __kobject_del
   kobject_put
   md_attr_store
   kernfs_fop_write_iter
   vfs_write
   ksys_write

Restore active protection before mddev_put() so the extra sysfs kobject reference is dropped while the mddev is still held alive. The actual md kobject deletion is then deferred until after the sysfs write path has fully returned.

Fixes 9e59d609763f ("md: call del_gendisk in control path")
---
 drivers/md/md.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/md/md.c +7 -1
index c2cc2302d727d..ecb9bd0e1b8f7 100644
@@ -6130,10 +6130,16 @@ md_attr_store(struct kobject *kobj, struct attribute *attr,
 	}
 	spin_unlock(&all_mddevs_lock);
 	rv = entry->store(mddev, page, length);
-	mddev_put(mddev);
 
+	/*
+	 * For "array_state=clear", dropping the extra kobject reference from
+	 * sysfs_break_active_protection() can trigger md kobject deletion.
+	 * Restore active protection before mddev_put() so deletion happens
+	 * after the sysfs write path fully unwinds.
+	 */
 	if (kn)
 		sysfs_unbreak_active_protection(kn);
+	mddev_put(mddev);
 
 	return rv;
 }
Signature · 1 line
2.53.0
author maintainer
#20 lore raw

PATCH 16/1146 ublk: reset per-IO canceled flag on each fetch

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Uday Shankar <[email protected]>

[ Upstream commit 0842186d2c4e67d2f8c8c2d1d779e8acffd41b5b ]

If a ublk server starts recovering devices but dies before issuing fetch commands for all IOs, cancellation of the fetch commands that were successfully issued may never complete. This is because the per-IO canceled flag can remain set even after the fetch for that IO has been submitted - the per-IO canceled flags for all IOs in a queue are reset together only once all IOs for that queue have been fetched. So if a nonempty proper subset of the IOs for a queue are fetched when the ublk server dies, the IOs in that subset will never successfully be canceled, as their canceled flags remain set, and this prevents ublk_cancel_cmd from actually calling io_uring_cmd_done on the commands, despite the fact that they are outstanding.

Fix this by resetting the per-IO cancel flags immediately when each IO is fetched instead of waiting for all IOs for the queue (which may never happen).

---
 drivers/block/ublk_drv.c | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)
drivers/block/ublk_drv.c +13 -8
index 63aeb7a76a8c9..0bdb804fca839 100644
@@ -2910,22 +2910,26 @@ static void ublk_stop_dev(struct ublk_device *ub)
 	ublk_cancel_dev(ub);
 }
 
+static void ublk_reset_io_flags(struct ublk_queue *ubq, struct ublk_io *io)
+{
+	/* UBLK_IO_FLAG_CANCELED can be cleared now */
+	spin_lock(&ubq->cancel_lock);
+	io->flags &= ~UBLK_IO_FLAG_CANCELED;
+	spin_unlock(&ubq->cancel_lock);
+}
+
 /* reset per-queue io flags */
 static void ublk_queue_reset_io_flags(struct ublk_queue *ubq)
 {
-	int j;
-
-	/* UBLK_IO_FLAG_CANCELED can be cleared now */
 	spin_lock(&ubq->cancel_lock);
-	for (j = 0; j < ubq->q_depth; j++)
-		ubq->ios[j].flags &= ~UBLK_IO_FLAG_CANCELED;
 	ubq->canceling = false;
 	spin_unlock(&ubq->cancel_lock);
 	ubq->fail_io = false;
 }
 
 /* device can only be started after all IOs are ready */
-static void ublk_mark_io_ready(struct ublk_device *ub, u16 q_id)
+static void ublk_mark_io_ready(struct ublk_device *ub, u16 q_id,
+	struct ublk_io *io)
 	__must_hold(&ub->mutex)
 {
 	struct ublk_queue *ubq = ublk_get_queue(ub, q_id);
@@ -2934,6 +2938,7 @@ static void ublk_mark_io_ready(struct ublk_device *ub, u16 q_id)
 		ub->unprivileged_daemons = true;
 
 	ubq->nr_io_ready++;
+	ublk_reset_io_flags(ubq, io);
 
 	/* Check if this specific queue is now fully ready */
 	if (ublk_queue_ready(ubq)) {
@@ -3196,7 +3201,7 @@ static int ublk_fetch(struct io_uring_cmd *cmd, struct ublk_device *ub,
 	if (!ret)
 		ret = ublk_config_io_buf(ub, io, cmd, buf_addr, NULL);
 	if (!ret)
-		ublk_mark_io_ready(ub, q_id);
+		ublk_mark_io_ready(ub, q_id, io);
 	mutex_unlock(&ub->mutex);
 	return ret;
 }
@@ -3604,7 +3609,7 @@ static int ublk_batch_prep_io(struct ublk_queue *ubq,
 	ublk_io_unlock(io);
 
 	if (!ret)
-		ublk_mark_io_ready(data->ub, ubq->q_id);
+		ublk_mark_io_ready(data->ub, ubq->q_id, io);
 
 	return ret;
 }
Signature · 1 line
2.53.0
author maintainer
#21 lore raw

PATCH 17/1146 blk-wbt: remove WARN_ON_ONCE from wbt_init_enable_default()

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Yuto Ohnuki <[email protected]>

[ Upstream commit e9b004ff83067cdf96774b45aea4b239ace99a2f ]

wbt_init_enable_default() uses WARN_ON_ONCE to check for failures from wbt_alloc() and wbt_init(). However, both are expected failure paths:

- wbt_alloc() can return NULL under memory pressure (-ENOMEM)
- wbt_init() can fail with -EBUSY if wbt is already registered

syzbot triggers this by injecting memory allocation failures during MTD partition creation via ioctl(BLKPG), causing a spurious warning.

wbt_init_enable_default() is a best-effort initialization called from blk_register_queue() with a void return type. Failure simply means the disk operates without writeback throttling, which is harmless.

Replace WARN_ON_ONCE with plain if-checks, consistent with how wbt_set_lat() in the same file already handles these failures. Add a pr_warn() for the wbt_init() failure to retain diagnostic information without triggering a full stack trace.

Reported-by [email protected]
Fixes 41afaeeda509 ("blk-wbt: fix possible deadlock to nest pcpu_alloc_mutex under q_usage_counter")
---
 block/blk-wbt.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
block/blk-wbt.c +3 -2
index 33006edfccd44..dcc2438ca16dc 100644
@@ -782,10 +782,11 @@ void wbt_init_enable_default(struct gendisk *disk)
 		return;
 
 	rwb = wbt_alloc();
-	if (WARN_ON_ONCE(!rwb))
+	if (!rwb)
 		return;
 
-	if (WARN_ON_ONCE(wbt_init(disk, rwb))) {
+	if (wbt_init(disk, rwb)) {
+		pr_warn("%s: failed to enable wbt\n", disk->disk_name);
 		wbt_free(rwb);
 		return;
 	}
Signature · 1 line
2.53.0
author maintainer
#22 lore raw

PATCH 18/1146 erofs: handle 48-bit blocks/uniaddr for extra devices

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Zhan Xusheng <[email protected]>

[ Upstream commit 63c2f06198ca7513433f1c92f2c654869d72417e ]

erofs_init_device() only reads blocks_lo and uniaddr_lo from the on-disk device slot, ignoring blocks_hi and uniaddr_hi that were introduced alongside the 48-bit block addressing feature.

For the primary device (dif0), erofs_read_superblock() already handles this correctly by combining blocks_lo with blocks_hi when 48-bit layout is enabled. But the same logic was not applied to extra devices.

With a 48-bit EROFS image using extra devices whose uniaddr or blocks exceed 32-bit range, the truncated values cause erofs_map_dev() to compute wrong physical addresses, leading to silent data corruption.

Fix this by reading blocks_hi and uniaddr_hi in erofs_init_device() when 48-bit layout is enabled, consistent with the primary device handling. Also fix the erofs_deviceslot on-disk definition where blocks_hi was incorrectly declared as __le32 instead of __le16.

Fixes 61ba89b57905 ("erofs: add 48-bit block addressing on-disk support")
---
 fs/erofs/erofs_fs.h | 4 ++--
 fs/erofs/super.c    | 8 ++++++--
 2 files changed, 8 insertions(+), 4 deletions(-)
fs/erofs/erofs_fs.h +2 -2
index b80c6bb33a58c..7871b16c1d333 100644
@@ -44,9 +44,9 @@ struct erofs_deviceslot {
 	u8 tag[64];		/* digest(sha256), etc. */
 	__le32 blocks_lo;	/* total blocks count of this device */
 	__le32 uniaddr_lo;	/* unified starting block of this device */
-	__le32 blocks_hi;	/* total blocks count MSB */
+	__le16 blocks_hi;	/* total blocks count MSB */
 	__le16 uniaddr_hi;	/* unified starting block MSB */
-	u8 reserved[50];
+	u8 reserved[52];
 };
 #define EROFS_DEVT_SLOT_SIZE	sizeof(struct erofs_deviceslot)
 
fs/erofs/super.c +6 -2
index 972a0c82198d7..802add6652fda 100644
@@ -129,6 +129,7 @@ static int erofs_init_device(struct erofs_buf *buf, struct super_block *sb,
 	struct erofs_fscache *fscache;
 	struct erofs_deviceslot *dis;
 	struct file *file;
+	bool _48bit;
 
 	dis = erofs_read_metabuf(buf, sb, *pos, false);
 	if (IS_ERR(dis))
@@ -175,8 +176,11 @@ static int erofs_init_device(struct erofs_buf *buf, struct super_block *sb,
 		dif->file = file;
 	}
 
-	dif->blocks = le32_to_cpu(dis->blocks_lo);
-	dif->uniaddr = le32_to_cpu(dis->uniaddr_lo);
+	_48bit = erofs_sb_has_48bit(sbi);
+	dif->blocks = le32_to_cpu(dis->blocks_lo) |
+		(_48bit ? (u64)le16_to_cpu(dis->blocks_hi) << 32 : 0);
+	dif->uniaddr = le32_to_cpu(dis->uniaddr_lo) |
+		(_48bit ? (u64)le16_to_cpu(dis->uniaddr_hi) << 32 : 0);
 	sbi->total_blocks += dif->blocks;
 	*pos += EROFS_DEVT_SLOT_SIZE;
 	return 0;
Signature · 1 line
2.53.0
author maintainer
#23 lore raw

PATCH 19/1146 md: remove unused static md_wq workqueue

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Abd-Alrhman Masalkhi <[email protected]>

[ Upstream commit e4979f4fac4d6bbe757be50441b45e28e6bf7360 ]

The md_wq workqueue is defined as static and initialized in md_init(), but it is not used anywhere within md.c.

All asynchronous and deferred work in this file is handled via md_misc_wq or dedicated md threads.

---
 drivers/md/md.c | 8 --------
 1 file changed, 8 deletions(-)
drivers/md/md.c +0 -8
index ecb9bd0e1b8f7..159af8d7ccf0b 100644
@@ -84,7 +84,6 @@ static DEFINE_XARRAY(md_submodule);
 static const struct kobj_type md_ktype;
 
 static DECLARE_WAIT_QUEUE_HEAD(resync_wait);
-static struct workqueue_struct *md_wq;
 
 /*
  * This workqueue is used for sync_work to register new sync_thread, and for
@@ -10511,10 +10510,6 @@ static int __init md_init(void)
 		goto err_bitmap;
 
 	ret = -ENOMEM;
-	md_wq = alloc_workqueue("md", WQ_MEM_RECLAIM | WQ_PERCPU, 0);
-	if (!md_wq)
-		goto err_wq;
-
 	md_misc_wq = alloc_workqueue("md_misc", WQ_PERCPU, 0);
 	if (!md_misc_wq)
 		goto err_misc_wq;
@@ -10539,8 +10534,6 @@ static int __init md_init(void)
 err_md:
 	destroy_workqueue(md_misc_wq);
 err_misc_wq:
-	destroy_workqueue(md_wq);
-err_wq:
 	md_llbitmap_exit();
 err_bitmap:
 	md_bitmap_exit();
@@ -10849,7 +10842,6 @@ static __exit void md_exit(void)
 	spin_unlock(&all_mddevs_lock);
 
 	destroy_workqueue(md_misc_wq);
-	destroy_workqueue(md_wq);
 	md_bitmap_exit();
 }
 
Signature · 1 line
2.53.0
author maintainer
#2 lore raw

PATCH 2/1146 md: suppress spurious superblock update error message for dm-raid

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Chen Cheng <[email protected]>

[ Upstream commit eff0d74c6c8fd358bc9474c05002e51fa5aa56ad ]

dm-raid has external metadata management (mddev->external = 1) and no persistent superblock (mddev->persistent = 0). For these arrays, there's no superblock to update, so the error message is spurious.

The error appears as:
md_update_sb: can't update sb for read-only array md0

---
 drivers/md/md.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/md/md.c +3 -1
index 3ce6f9e9d38e6..c2cc2302d727d 100644
@@ -2788,7 +2788,9 @@ void md_update_sb(struct mddev *mddev, int force_change)
 	if (!md_is_rdwr(mddev)) {
 		if (force_change)
 			set_bit(MD_SB_CHANGE_DEVS, &mddev->sb_flags);
-		pr_err("%s: can't update sb for read-only array %s\n", __func__, mdname(mddev));
+		if (!mddev_is_dm(mddev))
+			pr_err_ratelimited("%s: can't update sb for read-only array %s\n",
+					   __func__, mdname(mddev));
 		return;
 	}
 
Signature · 1 line
2.53.0
author maintainer
#24 lore raw

PATCH 20/1146 md: wake raid456 reshape waiters before suspend

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Yu Kuai <[email protected]>

[ Upstream commit cf86bb53b9c92354904a328e947a05ffbfdd1840 ]

During raid456 reshape, direct IO across the reshape position can sleep in raid5_make_request() waiting for reshape progress while still holding an active_io reference. If userspace then freezes reshape and writes md/suspend_lo or md/suspend_hi, mddev_suspend() kills active_io and waits for all in-flight IO to drain.

This can deadlock: the IO needs reshape progress to continue, but the reshape thread is already frozen, so the active_io reference is never dropped and suspend never completes.

raid5_prepare_suspend() already wakes wait_for_reshape for dm-raid. Do the same for normal md suspend when reshape is already interrupted, so waiting raid456 IO can abort, drop its reference, and let suspend finish.

The mdadm test tests/25raid456-reshape-deadlock reproduces the hang.

Fixes 714d20150ed8 ("md: add new helpers to suspend/resume array")
---
 drivers/md/md.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
drivers/md/md.c +11 -0
index 159af8d7ccf0b..9c552904a5ddc 100644
@@ -488,6 +488,17 @@ int mddev_suspend(struct mddev *mddev, bool interruptible)
 	}
 
 	percpu_ref_kill(&mddev->active_io);
+
+	/*
+	 * RAID456 IO can sleep in wait_for_reshape while still holding an
+	 * active_io reference. If reshape is already interrupted or frozen,
+	 * wake those waiters so they can abort and drop the reference instead
+	 * of deadlocking suspend.
+	 */
+	if (mddev->pers && mddev->pers->prepare_suspend &&
+	    reshape_interrupted(mddev))
+		mddev->pers->prepare_suspend(mddev);
+
 	if (interruptible)
 		err = wait_event_interruptible(mddev->sb_wait,
 				percpu_ref_is_zero(&mddev->active_io));
Signature · 1 line
2.53.0
author maintainer
#25 lore raw

PATCH 21/1146 dcache: permit dynamic_dname()s up to NAME_MAX

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Aleksa Sarai <[email protected]>

[ Upstream commit 97b67e64affb0e709eeecc50f6a9222fc20bd14b ]

dynamic_dname() has had an implicit limit of 64 characters since it was introduced in commit c23fbb6bcb3e ("VFS: delay the dentry name generation on sockets and pipes"), however it seems that this was a fairly arbitrary number (suspiciously it was double the previously hardcoded buffer size).

NAME_MAX seems like a more reasonable and consistent limit for d_name lengths. While we're at it, we can also remove the unnecessary stack-allocated array and just memmove() the formatted string to the end of the buffer.

It should also be noted that at least one driver (in particular, liveupdate's usage of anon_inode for session files) already exceeded this limit without noticing that readlink(/proc/self/fd/$n) always returns -ENAMETOOLONG, so this fixes those drivers as well.

Fixes 0153094d03df ("liveupdate: luo_session: add sessions support")
Fixes c23fbb6bcb3e ("VFS: delay the dentry name generation on sockets and pipes")
---
 fs/d_path.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
fs/d_path.c +6 -5
index bb365511066b2..a48957c0971ef 100644
@@ -301,18 +301,19 @@ EXPORT_SYMBOL(d_path);
 char *dynamic_dname(char *buffer, int buflen, const char *fmt, ...)
 {
 	va_list args;
-	char temp[64];
+	char *start;
 	int sz;
 
 	va_start(args, fmt);
-	sz = vsnprintf(temp, sizeof(temp), fmt, args) + 1;
+	sz = vsnprintf(buffer, buflen, fmt, args) + 1;
 	va_end(args);
 
-	if (sz > sizeof(temp) || sz > buflen)
+	if (sz > NAME_MAX || sz > buflen)
 		return ERR_PTR(-ENAMETOOLONG);
 
-	buffer += buflen - sz;
-	return memcpy(buffer, temp, sz);
+	/* Move the formatted d_name to the end of the buffer. */
+	start = buffer + (buflen - sz);
+	return memmove(start, buffer, sz);
 }
 
 char *simple_dname(struct dentry *dentry, char *buffer, int buflen)
Signature · 1 line
2.53.0
author maintainer
#26 lore raw

PATCH 22/1146 btrfs: fix the inline compressed extent check in inode_need_compress()

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Qu Wenruo <[email protected]>

[ Upstream commit 883adb6dcff0f96dbbdb6488842a38b121ebd68c ]

[BUG]
Since commit 59615e2c1f63 ("btrfs: reject single block sized compression early"), the following script will result the inode to have NOCOMPRESS flag, meanwhile old kernels don't:

  # mkfs.btrfs -f $dev
  # mount $dev $mnt -o max_inline=2k,compress=zstd
  # truncate -s 8k $mnt/foobar
  # xfs_io -f -c "pwrite 0 2k" $mnt/foobar
  # sync

Before that commit, the inode will not have NOCOMPRESS flag:

	item 4 key (257 INODE_ITEM 0) itemoff 15879 itemsize 160
		generation 9 transid 9 size 8192 nbytes 4096
		block group 0 mode 100644 links 1 uid 0 gid 0 rdev 0
		sequence 3 flags 0x0(none)

But after that commit, the inode will have NOCOMPRESS flag:

	item 4 key (257 INODE_ITEM 0) itemoff 15879 itemsize 160
		generation 9 transid 10 size 8192 nbytes 4096
		block group 0 mode 100644 links 1 uid 0 gid 0 rdev 0
		sequence 3 flags 0x8(NOCOMPRESS)

This will make a lot of files no longer to be compressed.

[CAUSE]
The old compressed inline check looks like this:

	if (total_compressed <= blocksize &&
	   (start > 0 || end + 1 < inode->disk_i_size))
		goto cleanup_and_bail_uncompressed;

That inline part check is equal to "!(start == 0 && end + 1 >= inode->disk_i_size)", but the new check no longer has that disk_i_size check.

Thus it means any single block sized write at file offset 0 will pass the inline check, which is wrong.

Furthermore, since we have merged the old check into inode_need_compress(), there is no disk_i_size based inline check anymore, we will always try compressing that single block at file offset 0, then later find out it's not a net win and go to the mark_incompressible tag.

This results the inode to have NOCOMPRESS flag.

[FIX]
Add back the missing disk_i_size based check into inode_need_compress().

Now the same script will no longer cause NOCOMPRESS flag.

---
 fs/btrfs/inode.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
fs/btrfs/inode.c +2 -1
index 2ad2d503e79af..c5b291ddb4776 100644
@@ -811,7 +811,8 @@ static inline int inode_need_compress(struct btrfs_inode *inode, u64 start,
 	 * do not even bother try compression, as there will be no space saving
 	 * and will always fallback to regular write later.
 	 */
-	if (start != 0 && end + 1 - start <= fs_info->sectorsize)
+	if (end + 1 - start <= fs_info->sectorsize &&
+	    (start > 0 || end + 1 < inode->disk_i_size))
 		return 0;
 	/* Defrag ioctl takes precedence over mount options and properties. */
 	if (inode->defrag_compress == BTRFS_DEFRAG_DONT_COMPRESS)
Signature · 1 line
2.53.0
author maintainer
#27 lore raw

PATCH 23/1146 btrfs: fix deadlock between reflink and transaction commit when using flushoncommit

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Filipe Manana <[email protected]>

[ Upstream commit b48c980b6a7e409050bb3067165db31cc6205e3e ]

When using the flushoncommit mount option, we can have a deadlock between a transaction commit and a reflink operation that copied an inline extent to an offset beyond the current i_size of the destination node.

The deadlock happens like this:

1) Task A clones an inline extent from inode X to an offset of inode Y that is beyond Y's current i_size. This means we copied the inline extent's data to a folio of inode Y that is beyond its EOF, using a call to copy_inline_to_page();

2) Task B starts a transaction commit and calls btrfs_start_delalloc_flush() to flush delalloc;

3) The delalloc flushing sees the new dirty folio of inode Y and when it attempts to flush it, it ends up at extent_writepage() and sees that the offset of the folio is beyond the i_size of inode Y, so it attempts to invalidate the folio by calling folio_invalidate(), which ends up at btrfs' folio invalidate callback - btrfs_invalidate_folio(). There it tries to lock the folio's range in inode Y's extent io tree, but it blocks since it's currently locked by task A - during a reflink we lock the inodes and the source and destination ranges after flushing all delalloc and waiting for ordered extent completion - after that we don't expect to have dirty folios in the ranges, the exception is if we have to copy an inline extent's data (because the destination offset is not zero);

4) Task A then attempts to start a transaction to update the inode item, and then it's blocked since the current transaction is in the TRANS_STATE_COMMIT_START state. Therefore task A has to wait for the current transaction to become unblocked (its state >= TRANS_STATE_UNBLOCKED).

So task A is waiting for the transaction commit done by task B, and the later waiting on the extent lock of inode Y that is currently held by task A.

Syzbot recently reported this with the following stack traces:

  INFO: task kworker/u8:7:1053 blocked for more than 143 seconds.
        Not tainted syzkaller #0
  "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
  task:kworker/u8:7    state:D stack:23520 pid:1053  tgid:1053  ppid:2      task_flags:0x4208060 flags:0x00080000
  Workqueue: writeback wb_workfn (flush-btrfs-46)
  Call Trace:
   <TASK>
   context_switch kernel/sched/core.c:5298 [inline]
   __schedule+0x1553/0x5240 kernel/sched/core.c:6911
   __schedule_loop kernel/sched/core.c:6993 [inline]
   schedule+0x164/0x360 kernel/sched/core.c:7008
   wait_extent_bit fs/btrfs/extent-io-tree.c:811 [inline]
   btrfs_lock_extent_bits+0x59c/0x700 fs/btrfs/extent-io-tree.c:1914
   btrfs_lock_extent fs/btrfs/extent-io-tree.h:152 [inline]
   btrfs_invalidate_folio+0x43d/0xc40 fs/btrfs/inode.c:7704
   extent_writepage fs/btrfs/extent_io.c:1852 [inline]
   extent_write_cache_pages fs/btrfs/extent_io.c:2580 [inline]
   btrfs_writepages+0x12ff/0x2440 fs/btrfs/extent_io.c:2713
   do_writepages+0x32e/0x550 mm/page-writeback.c:2554
   __writeback_single_inode+0x133/0x11a0 fs/fs-writeback.c:1750
   writeback_sb_inodes+0x995/0x19d0 fs/fs-writeback.c:2042
   wb_writeback+0x456/0xb70 fs/fs-writeback.c:2227
   wb_do_writeback fs/fs-writeback.c:2374 [inline]
   wb_workfn+0x41a/0xf60 fs/fs-writeback.c:2414
   process_one_work kernel/workqueue.c:3276 [inline]
   process_scheduled_works+0xb6e/0x18c0 kernel/workqueue.c:3359
   worker_thread+0xa53/0xfc0 kernel/workqueue.c:3440
   kthread+0x388/0x470 kernel/kthread.c:436
   ret_from_fork+0x51e/0xb90 arch/x86/kernel/process.c:158
   ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
   </TASK>
  INFO: task syz.4.64:6910 blocked for more than 143 seconds.
        Not tainted syzkaller #0
  "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
  task:syz.4.64        state:D stack:22752 pid:6910  tgid:6905  ppid:5944   task_flags:0x400140 flags:0x00080002
  Call Trace:
   <TASK>
   context_switch kernel/sched/core.c:5298 [inline]
   __schedule+0x1553/0x5240 kernel/sched/core.c:6911
   __schedule_loop kernel/sched/core.c:6993 [inline]
   schedule+0x164/0x360 kernel/sched/core.c:7008
   wait_current_trans+0x39f/0x590 fs/btrfs/transaction.c:535
   start_transaction+0x6a7/0x1650 fs/btrfs/transaction.c:705
   clone_copy_inline_extent fs/btrfs/reflink.c:299 [inline]
   btrfs_clone+0x128a/0x24d0 fs/btrfs/reflink.c:529
   btrfs_clone_files+0x271/0x3f0 fs/btrfs/reflink.c:750
   btrfs_remap_file_range+0x76b/0x1320 fs/btrfs/reflink.c:903
   vfs_copy_file_range+0xda7/0x1390 fs/read_write.c:1600
   __do_sys_copy_file_range fs/read_write.c:1683 [inline]
   __se_sys_copy_file_range+0x2fb/0x480 fs/read_write.c:1650
   do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
   do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94
   entry_SYSCALL_64_after_hwframe+0x77/0x7f
  RIP: 0033:0x7f5f73afc799
  RSP: 002b:00007f5f7315e028 EFLAGS: 00000246 ORIG_RAX: 0000000000000146
  RAX: ffffffffffffffda RBX: 00007f5f73d75fa0 RCX: 00007f5f73afc799
  RDX: 0000000000000005 RSI: 0000000000000000 RDI: 0000000000000005
  RBP: 00007f5f73b92c99 R08: 0000000000000863 R09: 0000000000000000
  R10: 00002000000000c0 R11: 0000000000000246 R12: 0000000000000000
  R13: 00007f5f73d76038 R14: 00007f5f73d75fa0 R15: 00007fff138a5068
   </TASK>
  INFO: task syz.4.64:6975 blocked for more than 143 seconds.
        Not tainted syzkaller #0
  "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
  task:syz.4.64        state:D stack:24736 pid:6975  tgid:6905  ppid:5944   task_flags:0x400040 flags:0x00080002
  Call Trace:
   <TASK>
   context_switch kernel/sched/core.c:5298 [inline]
   __schedule+0x1553/0x5240 kernel/sched/core.c:6911
   __schedule_loop kernel/sched/core.c:6993 [inline]
   schedule+0x164/0x360 kernel/sched/core.c:7008
   wb_wait_for_completion+0x3e8/0x790 fs/fs-writeback.c:227
   __writeback_inodes_sb_nr+0x24c/0x2d0 fs/fs-writeback.c:2838
   try_to_writeback_inodes_sb+0x9a/0xc0 fs/fs-writeback.c:2886
   btrfs_start_delalloc_flush fs/btrfs/transaction.c:2175 [inline]
   btrfs_commit_transaction+0x82e/0x31a0 fs/btrfs/transaction.c:2364
   btrfs_ioctl+0xca7/0xd00 fs/btrfs/ioctl.c:5206
   vfs_ioctl fs/ioctl.c:51 [inline]
   __do_sys_ioctl fs/ioctl.c:597 [inline]
   __se_sys_ioctl+0xff/0x170 fs/ioctl.c:583
   do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
   do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94
   entry_SYSCALL_64_after_hwframe+0x77/0x7f
  RIP: 0033:0x7f5f73afc799
  RSP: 002b:00007f5f7313d028 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
  RAX: ffffffffffffffda RBX: 00007f5f73d76090 RCX: 00007f5f73afc799
  RDX: 0000000000000000 RSI: 0000000000009408 RDI: 0000000000000004
  RBP: 00007f5f73b92c99 R08: 0000000000000000 R09: 0000000000000000
  R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
  R13: 00007f5f73d76128 R14: 00007f5f73d76090 R15: 00007fff138a5068
   </TASK>

Fix this by updating the i_size of the destination inode of a reflink operation after we copy an inline extent's data to an offset beyond the i_size and before attempting to start a transaction to update the inode's item.

Reported-by [email protected]
Fixes 05a5a7621ce6 ("Btrfs: implement full reflink support for inline extents")
---
 fs/btrfs/reflink.c | 45 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)
fs/btrfs/reflink.c +45 -0
index 314cb95ba846d..55d8d238e5862 100644
@@ -322,6 +322,51 @@ static int clone_copy_inline_extent(struct btrfs_inode *inode,
 
 	ret = copy_inline_to_page(inode, new_key->offset,
 				  inline_data, size, datal, comp_type);
+
+	/*
+	 * If we copied the inline extent data to a page/folio beyond the i_size
+	 * of the destination inode, then we need to increase the i_size before
+	 * we start a transaction to update the inode item. This is to prevent a
+	 * deadlock when the flushoncommit mount option is used, which happens
+	 * like this:
+	 *
+	 * 1) Task A clones an inline extent from inode X to an offset of inode
+	 *    Y that is beyond Y's current i_size. This means we copied the
+	 *    inline extent's data to a folio of inode Y that is beyond its EOF,
+	 *    using the call above to copy_inline_to_page();
+	 *
+	 * 2) Task B starts a transaction commit and calls
+	 *    btrfs_start_delalloc_flush() to flush delalloc;
+	 *
+	 * 3) The delalloc flushing sees the new dirty folio of inode Y and when
+	 *    it attempts to flush it, it ends up at extent_writepage() and sees
+	 *    that the offset of the folio is beyond the i_size of inode Y, so
+	 *    it attempts to invalidate the folio by calling folio_invalidate(),
+	 *    which ends up at btrfs' folio invalidate callback -
+	 *    btrfs_invalidate_folio(). There it tries to lock the folio's range
+	 *    in inode Y's extent io tree, but it blocks since it's currently
+	 *    locked by task A - during reflink we lock the inodes and the
+	 *    source and destination ranges after flushing all delalloc and
+	 *    waiting for ordered extent completion - after that we don't expect
+	 *    to have dirty folios in the ranges, the exception is if we have to
+	 *    copy an inline extent's data (because the destination offset is
+	 *    not zero);
+	 *
+	 * 4) Task A then does the 'goto out' below and attempts to start a
+	 *    transaction to update the inode item, and then it's blocked since
+	 *    the current transaction is in the TRANS_STATE_COMMIT_START state.
+	 *    Therefore task A has to wait for the current transaction to become
+	 *    unblocked (its state >= TRANS_STATE_UNBLOCKED).
+	 *
+	 * This leads to a deadlock - the task committing the transaction
+	 * waiting for the delalloc flushing which is blocked during folio
+	 * invalidation on the inode's extent lock and the reflink task waiting
+	 * for the current transaction to be unblocked so that it can start a
+	 * a new one to update the inode item (while holding the extent lock).
+	 */
+	if (ret == 0 && new_key->offset + datal > i_size_read(&inode->vfs_inode))
+		i_size_write(&inode->vfs_inode, new_key->offset + datal);
+
 	goto out;
 }
 
Signature · 1 line
2.53.0
author maintainer
#28 lore raw

PATCH 24/1146 btrfs: do not reject a valid running dev-replace

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Qu Wenruo <[email protected]>

[ Upstream commit 3c0c45a4dff73845ba93d41365fc14e45ee32bd7 ]

[BUG]
There is a bug report that a btrfs with running dev-replace got rejected with the following messages:

BTRFS error (device sdk1): devid 0 path /dev/sdk1 is registered but not found in chunk tree
BTRFS error (device sdk1): remove the above devices or use 'btrfs device scan --forget <dev>' to unregister them before mount BTRFS error (device sdk1): open_ctree failed: -117

[CAUSE]
The tree and super block dumps show the fs is completely sane, except one thing, there is no dev item for devid 0 in chunk tree.

However this is not a bug, as we do not insert dev item for devid 0 in the first place.
Since the devid 0 is only there temporarily we do not really need to insert a dev item for it and then later remove it again.

It is the commit 34308187395f ("btrfs: add extra device item checks at mount") adding a overly strict check that triggers a false alert and rejected the valid filesystem.

[FIX]
Add a special handling for devid 0, and doesn't require devid 0 to have a device item in chunk tree.

---
 fs/btrfs/volumes.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
fs/btrfs/volumes.c +6 -1
index 6b8e810a35ce1..fd400fbc654d9 100644
@@ -8457,7 +8457,12 @@ bool btrfs_verify_dev_items(const struct btrfs_fs_info *fs_info)
 
 	mutex_lock(&uuid_mutex);
 	list_for_each_entry(dev, &fs_info->fs_devices->devices, dev_list) {
-		if (!test_bit(BTRFS_DEV_STATE_ITEM_FOUND, &dev->dev_state)) {
+		/*
+		 * Replace target dev item (devid 0) is not inserted into chunk tree.
+		 * So skip the DEV_STATE_ITEM check.
+		 */
+		if (dev->devid != BTRFS_DEV_REPLACE_DEVID &&
+		    !test_bit(BTRFS_DEV_STATE_ITEM_FOUND, &dev->dev_state)) {
 			btrfs_err(fs_info,
 			"devid %llu path %s is registered but not found in chunk tree",
 				  dev->devid, btrfs_dev_name(dev));
Signature · 1 line
2.53.0
author maintainer
#29 lore raw

PATCH 25/1146 OPP: debugfs: Use performance level if available to distinguish between rates

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Manivannan Sadhasivam <[email protected]>

[ Upstream commit e560083c0467f86b72aecac377b27bd1e7d16c49 ]

Some OPP tables have entries with same rate and different performance level. For these entries, using only the rate as the debugfs directory name causes below error:

debugfs: 'opp:5000000' already exists in '[email protected]'

Fix it by appending the performance level to the dir name if available.

---
 drivers/opp/debugfs.c | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)
drivers/opp/debugfs.c +11 -9
index 8fc6238b17284..61506d30d5ff0 100644
@@ -130,22 +130,24 @@ void opp_debug_create_one(struct dev_pm_opp *opp, struct opp_table *opp_table)
 {
 	struct dentry *pdentry = opp_table->dentry;
 	struct dentry *d;
-	unsigned long id;
-	char name[25];	/* 20 chars for 64 bit value + 5 (opp:\0) */
+	char name[36];	/* "opp:"(4) + u64(20) + "-" (1) + u32(10) + NULL(1) */
 
 	/*
 	 * Get directory name for OPP.
 	 *
-	 * - Normally rate is unique to each OPP, use it to get unique opp-name.
+	 * - Normally rate is unique to each OPP, use it to get unique opp-name,
+	 *   together with performance level if available.
 	 * - For some devices rate isn't available or there are multiple, use
 	 *   index instead for them.
 	 */
-	if (likely(opp_table->clk_count == 1 && opp->rates[0]))
-		id = opp->rates[0];
-	else
-		id = _get_opp_count(opp_table);
-
-	snprintf(name, sizeof(name), "opp:%lu", id);
+	if (likely(opp_table->clk_count == 1 && opp->rates[0])) {
+		if (opp->level == OPP_LEVEL_UNSET)
+			snprintf(name, sizeof(name), "opp:%lu", opp->rates[0]);
+		else
+			snprintf(name, sizeof(name), "opp:%lu-%u", opp->rates[0], opp->level);
+	} else {
+		snprintf(name, sizeof(name), "opp:%u", _get_opp_count(opp_table));
+	}
 
 	/* Create per-opp directory */
 	d = debugfs_create_dir(name, pdentry);
Signature · 1 line
2.53.0
author maintainer
#30 lore raw

PATCH 26/1146 OPP: Move break out of scoped_guard in dev_pm_opp_xlate_required_opp()

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Viresh Kumar <[email protected]>

[ Upstream commit 3d2398f44a2d48fb1c575a6e0bc6b38f3e689e22 ]

The commit ff9c512041f2 ("OPP: Use mutex locking guards") unintentionally made the for loop run longer than required.

scoped_guard() is implemented as a for loop. The break statement now breaks out out the scoped_guard() and not out of the outer for loop. The outer loop always iterates to completion.

Fix it.

Fixes ff9c512041f2 ("OPP: Use mutex locking guards")
---
 drivers/opp/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/opp/core.c +1 -1
index 866641666e410..da3f5eba43419 100644
@@ -2742,8 +2742,8 @@ struct dev_pm_opp *dev_pm_opp_xlate_required_opp(struct opp_table *src_table,
 					break;
 				}
 			}
-			break;
 		}
+		break;
 	}
 
 	if (IS_ERR(dest_opp)) {
Signature · 1 line
2.53.0
author maintainer
#31 lore raw

PATCH 27/1146 ACPI: x86: cmos_rtc: Clean up address space handler driver

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Rafael J. Wysocki <[email protected]>

[ Upstream commit ba0b236736dde4059bdcb8e99beaa50d6e5b6e7e ]

Make multiple changes that do not alter functionality to the CMOS RTC ACPI address space handler driver, including the following:

- Drop the unused .detach() callback from cmos_rtc_handler.

- Rename acpi_cmos_rtc_attach_handler() to acpi_cmos_rtc_attach().

- Rearrange acpi_cmos_rtc_space_handler() to reduce the number of redundant checks and make white space follow the coding style.

- Adjust an error message in acpi_install_cmos_rtc_space_handler() and make the white space follow the coding style.

- Rearrange acpi_remove_cmos_rtc_space_handler() and adjust an error message in it.

No intentional functional impact.

Stable-dep-of: 6cee29ad9d7e ("ACPI: x86: cmos_rtc: Improve coordination with ACPI TAD driver")

---
 drivers/acpi/x86/cmos_rtc.c | 61 +++++++++++++++++++------------------
 1 file changed, 32 insertions(+), 29 deletions(-)
drivers/acpi/x86/cmos_rtc.c +32 -29
index 51643ff6fe5fc..977234da9fc11 100644
@@ -24,31 +24,35 @@ static const struct acpi_device_id acpi_cmos_rtc_ids[] = {
 	{}
 };
 
-static acpi_status
-acpi_cmos_rtc_space_handler(u32 function, acpi_physical_address address,
-		      u32 bits, u64 *value64,
-		      void *handler_context, void *region_context)
+static acpi_status acpi_cmos_rtc_space_handler(u32 function,
+					       acpi_physical_address address,
+					       u32 bits, u64 *value64,
+					       void *handler_context,
+					       void *region_context)
 {
-	int i;
+	unsigned int i, bytes = DIV_ROUND_UP(bits, 8);
 	u8 *value = (u8 *)value64;
 
 	if (address > 0xff || !value64)
 		return AE_BAD_PARAMETER;
 
-	if (function != ACPI_WRITE && function != ACPI_READ)
-		return AE_BAD_PARAMETER;
+	guard(spinlock_irq)(&rtc_lock);
+
+	if (function == ACPI_WRITE) {
+		for (i = 0; i < bytes; i++, address++, value++)
+			CMOS_WRITE(*value, address);
 
-	spin_lock_irq(&rtc_lock);
+		return AE_OK;
+	}
 
-	for (i = 0; i < DIV_ROUND_UP(bits, 8); ++i, ++address, ++value)
-		if (function == ACPI_READ)
+	if (function == ACPI_READ) {
+		for (i = 0; i < bytes; i++, address++, value++)
 			*value = CMOS_READ(address);
-		else
-			CMOS_WRITE(*value, address);
 
-	spin_unlock_irq(&rtc_lock);
+		return AE_OK;
+	}
 
-	return AE_OK;
+	return AE_BAD_PARAMETER;
 }
 
 int acpi_install_cmos_rtc_space_handler(acpi_handle handle)
@@ -56,11 +60,11 @@ int acpi_install_cmos_rtc_space_handler(acpi_handle handle)
 	acpi_status status;
 
 	status = acpi_install_address_space_handler(handle,
-			ACPI_ADR_SPACE_CMOS,
-			&acpi_cmos_rtc_space_handler,
-			NULL, NULL);
+						    ACPI_ADR_SPACE_CMOS,
+						    acpi_cmos_rtc_space_handler,
+						    NULL, NULL);
 	if (ACPI_FAILURE(status)) {
-		pr_err("Error installing CMOS-RTC region handler\n");
+		pr_err("Failed to install CMOS-RTC address space handler\n");
 		return -ENODEV;
 	}
 
@@ -70,26 +74,25 @@ EXPORT_SYMBOL_GPL(acpi_install_cmos_rtc_space_handler);
 
 void acpi_remove_cmos_rtc_space_handler(acpi_handle handle)
 {
-	if (ACPI_FAILURE(acpi_remove_address_space_handler(handle,
-			ACPI_ADR_SPACE_CMOS, &acpi_cmos_rtc_space_handler)))
-		pr_err("Error removing CMOS-RTC region handler\n");
+	acpi_status status;
+
+	status = acpi_remove_address_space_handler(handle,
+						   ACPI_ADR_SPACE_CMOS,
+						   acpi_cmos_rtc_space_handler);
+	if (ACPI_FAILURE(status))
+		pr_err("Failed to remove CMOS-RTC address space handler\n");
 }
 EXPORT_SYMBOL_GPL(acpi_remove_cmos_rtc_space_handler);
 
-static int acpi_cmos_rtc_attach_handler(struct acpi_device *adev, const struct acpi_device_id *id)
+static int acpi_cmos_rtc_attach(struct acpi_device *adev,
+				const struct acpi_device_id *id)
 {
 	return acpi_install_cmos_rtc_space_handler(adev->handle);
 }
 
-static void acpi_cmos_rtc_detach_handler(struct acpi_device *adev)
-{
-	acpi_remove_cmos_rtc_space_handler(adev->handle);
-}
-
 static struct acpi_scan_handler cmos_rtc_handler = {
 	.ids = acpi_cmos_rtc_ids,
-	.attach = acpi_cmos_rtc_attach_handler,
-	.detach = acpi_cmos_rtc_detach_handler,
+	.attach = acpi_cmos_rtc_attach,
 };
 
 void __init acpi_cmos_rtc_init(void)
Signature · 1 line
2.53.0
author maintainer
#32 lore raw

PATCH 28/1146 ACPI: x86: cmos_rtc: Improve coordination with ACPI TAD driver

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Rafael J. Wysocki <[email protected]>

[ Upstream commit 6cee29ad9d7e400d39ae0b1a54447fedcb62eecd ]

If a CMOS RTC (PNP0B00/PNP0B01/PNP0B02) device coexists with an ACPI TAD (timer and event alarm device, ACPI000E), the ACPI TAD driver will attempt to install the CMOS RTC address space hanlder that has been installed already and the TAD probing will fail.

Avoid that by changing acpi_install_cmos_rtc_space_handler() to return zero and acpi_remove_cmos_rtc_space_handler() to do nothing if the CMOS RTC address space handler has been installed already.

Fixes 596ca52a56da ("ACPI: TAD: Install SystemCMOS address space handler for ACPI000E")
---
 drivers/acpi/x86/cmos_rtc.c | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)
drivers/acpi/x86/cmos_rtc.c +17 -1
index 977234da9fc11..45db7e51cbe60 100644
@@ -24,6 +24,8 @@ static const struct acpi_device_id acpi_cmos_rtc_ids[] = {
 	{}
 };
 
+static bool cmos_rtc_space_handler_present __read_mostly;
+
 static acpi_status acpi_cmos_rtc_space_handler(u32 function,
 					       acpi_physical_address address,
 					       u32 bits, u64 *value64,
@@ -59,6 +61,9 @@ int acpi_install_cmos_rtc_space_handler(acpi_handle handle)
 {
 	acpi_status status;
 
+	if (cmos_rtc_space_handler_present)
+		return 0;
+
 	status = acpi_install_address_space_handler(handle,
 						    ACPI_ADR_SPACE_CMOS,
 						    acpi_cmos_rtc_space_handler,
@@ -68,6 +73,8 @@ int acpi_install_cmos_rtc_space_handler(acpi_handle handle)
 		return -ENODEV;
 	}
 
+	cmos_rtc_space_handler_present = true;
+
 	return 1;
 }
 EXPORT_SYMBOL_GPL(acpi_install_cmos_rtc_space_handler);
@@ -76,6 +83,9 @@ void acpi_remove_cmos_rtc_space_handler(acpi_handle handle)
 {
 	acpi_status status;
 
+	if (cmos_rtc_space_handler_present)
+		return;
+
 	status = acpi_remove_address_space_handler(handle,
 						   ACPI_ADR_SPACE_CMOS,
 						   acpi_cmos_rtc_space_handler);
@@ -87,7 +97,13 @@ EXPORT_SYMBOL_GPL(acpi_remove_cmos_rtc_space_handler);
 static int acpi_cmos_rtc_attach(struct acpi_device *adev,
 				const struct acpi_device_id *id)
 {
-	return acpi_install_cmos_rtc_space_handler(adev->handle);
+	int ret;
+
+	ret = acpi_install_cmos_rtc_space_handler(adev->handle);
+	if (ret < 0)
+		return ret;
+
+	return 1;
 }
 
 static struct acpi_scan_handler cmos_rtc_handler = {
Signature · 1 line
2.53.0
author maintainer
#33 lore raw

PATCH 29/1146 devres: fix missing node debug info in devm_krealloc()

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Danilo Krummrich <[email protected]>

[ Upstream commit f813ec9e84b4d0ca81ec1da94ab07bfb4a29266c ]

Fix missing call to set_node_dbginfo() for new devres nodes created by devm_krealloc().

---
 drivers/base/devres.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/base/devres.c +2 -0
index 171750c1f6918..ce519b98a1898 100644
@@ -940,6 +940,8 @@ void *devm_krealloc(struct device *dev, void *ptr, size_t new_size, gfp_t gfp)
 	if (!new_dr)
 		return NULL;
 
+	set_node_dbginfo(&new_dr->node, "devm_krealloc_release", new_size);
+
 	/*
 	 * The spinlock protects the linked list against concurrent
 	 * modifications but not the resource itself.
Signature · 1 line
2.53.0
author maintainer
#4 lore raw

PATCH 3/1146 fs/omfs: reject s_sys_blocksize smaller than OMFS_DIR_START

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: HyungJung Joo <[email protected]>

[ Upstream commit 0621c385fda1376e967f37ccd534c26c3e511d14 ]

omfs_fill_super() rejects oversized s_sys_blocksize values (> PAGE_SIZE), but it does not reject values smaller than OMFS_DIR_START (0x1b8 = 440).

Later, omfs_make_empty() uses

    sbi->s_sys_blocksize - OMFS_DIR_START

as the length argument to memset(). Since s_sys_blocksize is u32, a crafted filesystem image with s_sys_blocksize < OMFS_DIR_START causes an unsigned underflow there, wrapping to a value near 2^32. That drives a ~4 GiB memset() from bh->b_data + OMFS_DIR_START and overwrites kernel memory far beyond the backing block buffer.

Add the corresponding lower-bound check alongside the existing upper-bound check in omfs_fill_super(), so that malformed images are rejected during superblock validation before any filesystem data is processed.

---
 fs/omfs/inode.c | 6 ++++++
 1 file changed, 6 insertions(+)
fs/omfs/inode.c +6 -0
index 90ae07c69349e..834cae1e62233 100644
@@ -513,6 +513,12 @@ static int omfs_fill_super(struct super_block *sb, struct fs_context *fc)
 		goto out_brelse_bh;
 	}
 
+	if (sbi->s_sys_blocksize < OMFS_DIR_START) {
+		printk(KERN_ERR "omfs: sysblock size (%d) is too small\n",
+			sbi->s_sys_blocksize);
+		goto out_brelse_bh;
+	}
+
 	if (sbi->s_blocksize < sbi->s_sys_blocksize ||
 	    sbi->s_blocksize > OMFS_MAX_BLOCK_SIZE) {
 		printk(KERN_ERR "omfs: block size (%d) is out of range\n",
Signature · 1 line
2.53.0
author maintainer
#34 lore raw

PATCH 30/1146 thermal/drivers/spear: Fix error condition for reading st,thermal-flags

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Gopi Krishna Menon <[email protected]>

[ Upstream commit da2c4f332a0504d9c284e7626a561d343c8d6f57 ]

of_property_read_u32 returns 0 on success. The current check returns -EINVAL if the property is read successfully.

Fix the check by removing ! from of_property_read_u32

Fixes b9c7aff481f1 ("drivers/thermal/spear_thermal.c: add Device Tree probing capability")
---
 drivers/thermal/spear_thermal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thermal/spear_thermal.c +1 -1
index 603dadcd3df58..5e3e9c1f32f8e 100644
@@ -93,7 +93,7 @@ static int spear_thermal_probe(struct platform_device *pdev)
 	struct device_node *np = pdev->dev.of_node;
 	int ret = 0, val;
 
-	if (!np || !of_property_read_u32(np, "st,thermal-flags", &val)) {
+	if (!np || of_property_read_u32(np, "st,thermal-flags", &val)) {
 		dev_err(&pdev->dev, "Failed: DT Pdata not passed\n");
 		return -EINVAL;
 	}
Signature · 1 line
2.53.0
author maintainer
#35 lore raw

PATCH 31/1146 debugfs: check for NULL pointer in debugfs_create_str()

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Gui-Dong Han <[email protected]>

[ Upstream commit 31de83980d3764d784f79ff1bc93c42b324f4013 ]

Passing a NULL pointer to debugfs_create_str() leads to a NULL pointer dereference when the debugfs file is read. Following upstream discussions, forbid the creation of debugfs string files with NULL pointers. Add a WARN_ON() to expose offending callers and return early.

---
 fs/debugfs/file.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
fs/debugfs/file.c +4 -1
index 3376ab6a519d1..a941d73251b06 100644
@@ -1127,7 +1127,7 @@ static const struct file_operations fops_str_wo = {
  *          directory dentry if set.  If this parameter is %NULL, then the
  *          file will be created in the root of the debugfs filesystem.
  * @value: a pointer to the variable that the file should read to and write
- *         from.
+ *         from. This pointer and the string it points to must not be %NULL.
  *
  * This function creates a file in debugfs with the given name that
  * contains the value of the variable @value.  If the @mode variable is so
@@ -1136,6 +1136,9 @@ static const struct file_operations fops_str_wo = {
 void debugfs_create_str(const char *name, umode_t mode,
 			struct dentry *parent, char **value)
 {
+	if (WARN_ON(!value || !*value))
+		return;
+
 	debugfs_create_mode_unsafe(name, mode, parent, value, &fops_str,
 				   &fops_str_ro, &fops_str_wo);
 }
Signature · 1 line
2.53.0
author maintainer
#36 lore raw

PATCH 32/1146 debugfs: fix placement of EXPORT_SYMBOL_GPL for debugfs_create_str()

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Gui-Dong Han <[email protected]>

[ Upstream commit 4afc929c0f74c4f22b055a82b371d50586da58ca ]

The EXPORT_SYMBOL_GPL() for debugfs_create_str was placed incorrectly away from the function definition. Move it immediately below the debugfs_create_str() function where it belongs.

Fixes d60b59b96795 ("debugfs: Export debugfs_create_str symbol")
---
 fs/debugfs/file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/debugfs/file.c +1 -1
index a941d73251b06..edd6aafbfbaaf 100644
@@ -1047,7 +1047,6 @@ ssize_t debugfs_read_file_str(struct file *file, char __user *user_buf,
 
 	return ret;
 }
-EXPORT_SYMBOL_GPL(debugfs_create_str);
 
 static ssize_t debugfs_write_file_str(struct file *file, const char __user *user_buf,
 				      size_t count, loff_t *ppos)
@@ -1142,6 +1141,7 @@ void debugfs_create_str(const char *name, umode_t mode,
 	debugfs_create_mode_unsafe(name, mode, parent, value, &fops_str,
 				   &fops_str_ro, &fops_str_wo);
 }
+EXPORT_SYMBOL_GPL(debugfs_create_str);
 
 static ssize_t read_file_blob(struct file *file, char __user *user_buf,
 			      size_t count, loff_t *ppos)
Signature · 1 line
2.53.0
author maintainer
#37 lore raw

PATCH 33/1146 soundwire: debugfs: initialize firmware_file to empty string

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Gui-Dong Han <[email protected]>

[ Upstream commit 7215e4552f31e53595eae56a834f7e286beecccc ]

Passing NULL to debugfs_create_str() causes a NULL pointer dereference, and creating debugfs nodes with NULL string pointers is no longer permitted.

Additionally, firmware_file is a global pointer. Previously, adding every new slave blindly overwrote it with NULL.

Fix these issues by initializing firmware_file to an allocated empty string once in the subsystem init path (sdw_debugfs_init), and freeing it in the exit path. Existing driver code handles empty strings correctly.

---
 drivers/soundwire/debugfs.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/soundwire/debugfs.c +7 -2
index ccc9670ef77ce..2905ec19b8384 100644
@@ -358,8 +358,8 @@ void sdw_slave_debugfs_init(struct sdw_slave *slave)
 	debugfs_create_file("go", 0200, d, slave, &cmd_go_fops);
 
 	debugfs_create_file("read_buffer", 0400, d, slave, &read_buffer_fops);
-	firmware_file = NULL;
-	debugfs_create_str("firmware_file", 0200, d, &firmware_file);
+	if (firmware_file)
+		debugfs_create_str("firmware_file", 0200, d, &firmware_file);
 
 	slave->debugfs = d;
 }
@@ -371,10 +371,15 @@ void sdw_slave_debugfs_exit(struct sdw_slave *slave)
 
 void sdw_debugfs_init(void)
 {
+	if (!firmware_file)
+		firmware_file = kstrdup("", GFP_KERNEL);
+
 	sdw_debugfs_root = debugfs_create_dir("soundwire", NULL);
 }
 
 void sdw_debugfs_exit(void)
 {
 	debugfs_remove_recursive(sdw_debugfs_root);
+	kfree(firmware_file);
+	firmware_file = NULL;
 }
Signature · 1 line
2.53.0
author maintainer
#38 lore raw

PATCH 34/1146 amd-pstate: Fix memory leak in amd_pstate_epp_cpu_init()

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Gautham R. Shenoy <[email protected]>

[ Upstream commit beda3b363546a423e4e29a7395e04c0ac4ff677e ]

On failure to set the epp, the function amd_pstate_epp_cpu_init() returns with an error code without freeing the cpudata object that was allocated at the beginning of the function.

Ensure that the cpudata object is freed before returning from the function.

This memory leak was discovered by Claude Opus 4.6 with the aid of Chris Mason's AI review-prompts
(https://github.com/masoncl/review-prompts/tree/main/kernel).

Assisted-by Claude:claude-opus-4.6 review-prompts/linux
Fixes f9a378ff6443 ("cpufreq/amd-pstate: Set different default EPP policy for Epyc and Ryzen")
---
 drivers/cpufreq/amd-pstate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cpufreq/amd-pstate.c +1 -1
index 5aa9fcd80cf51..d57969c72c9dc 100644
@@ -1533,7 +1533,7 @@ static int amd_pstate_epp_cpu_init(struct cpufreq_policy *policy)
 
 	ret = amd_pstate_set_epp(policy, cpudata->epp_default);
 	if (ret)
-		return ret;
+		goto free_cpudata1;
 
 	current_pstate_driver->adjust_perf = NULL;
 
Signature · 1 line
2.53.0
author maintainer
#5 lore raw

PATCH 4/1146 fs/mbcache: cancel shrink work before destroying the cache

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: HyungJung Joo <[email protected]>

[ Upstream commit d227786ab1119669df4dc333a61510c52047cce4 ]

mb_cache_destroy() calls shrinker_free() and then frees all cache entries and the cache itself, but it does not cancel the pending c_shrink_work work item first.

If mb_cache_entry_create() schedules c_shrink_work via schedule_work() and the work item is still pending or running when mb_cache_destroy() runs, mb_cache_shrink_worker() will access the cache after its memory has been freed, causing a use-after-free.

This is only reachable by a privileged user (root or CAP_SYS_ADMIN) who can trigger the last put of a mounted ext2/ext4/ocfs2 filesystem.

Cancel the work item with cancel_work_sync() before calling shrinker_free(), ensuring the worker has finished and will not be rescheduled before the cache is torn down.

---
 fs/mbcache.c | 1 +
 1 file changed, 1 insertion(+)
fs/mbcache.c +1 -0
index 480d02d6ebf03..2a6319b4072cc 100644
@@ -406,6 +406,7 @@ void mb_cache_destroy(struct mb_cache *cache)
 {
 	struct mb_cache_entry *entry, *next;
 
+	cancel_work_sync(&cache->c_shrink_work);
 	shrinker_free(cache->c_shrink);
 
 	/*
Signature · 1 line
2.53.0
author maintainer
#6 lore raw

PATCH 5/1146 md/raid1: fix the comparing region of interval tree

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Xiao Ni <[email protected]>

[ Upstream commit de3544d2e5ea99064498de3c21ba490155864657 ]

Interval tree uses [start, end] as a region which stores in the tree. In raid1, it uses the wrong end value. For example:
bio(A,B) is too big and needs to be split to bio1(A,C-1), bio2(C,B). The region of bio1 is [A,C] and the region of bio2 is [C,B]. So bio1 and bio2 overlap which is not right.

Fix this problem by using right end value of the region.

Fixes d0d2d8ba0494 ("md/raid1: introduce wait_for_serialization")
---
 drivers/md/raid1.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/md/raid1.c +2 -2
index 181400e147c0d..be2565dee4202 100644
@@ -62,7 +62,7 @@ static int check_and_add_serial(struct md_rdev *rdev, struct r1bio *r1_bio,
 	unsigned long flags;
 	int ret = 0;
 	sector_t lo = r1_bio->sector;
-	sector_t hi = lo + r1_bio->sectors;
+	sector_t hi = lo + r1_bio->sectors - 1;
 	struct serial_in_rdev *serial = &rdev->serial[idx];
 
 	spin_lock_irqsave(&serial->serial_lock, flags);
@@ -452,7 +452,7 @@ static void raid1_end_write_request(struct bio *bio)
 	int mirror = find_bio_disk(r1_bio, bio);
 	struct md_rdev *rdev = conf->mirrors[mirror].rdev;
 	sector_t lo = r1_bio->sector;
-	sector_t hi = r1_bio->sector + r1_bio->sectors;
+	sector_t hi = r1_bio->sector + r1_bio->sectors - 1;
 	bool ignore_error = !raid1_should_handle_error(bio) ||
 		(bio->bi_status && bio_op(bio) == REQ_OP_DISCARD);
 
Signature · 1 line
2.53.0
author maintainer
#7 lore raw

PATCH 6/1146 fs: fix archiecture-specific compat_ftruncate64

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Christoph Hellwig <[email protected]>

[ Upstream commit e43dce8a0bc09083ea1145a1a0c61d83cbe72d97 ]

The "small" argument to do_sys_ftruncate indicates if > 32-bit size should be reject, but all the arch-specific compat ftruncate64 implementations get this wrong. Merge do_sys_ftruncate and ksys_ftruncate, replace the integer as boolean small flag with a descriptive one about LFS semantics, and use it correctly in the architecture-specific ftruncate64 implementations.

Fixes 1da177e4c3f4 ("Linux-2.6.12-rc2")
Fixes 3dd681d944f6 ("arm64: 32-bit (compat) applications support")
---
 arch/arm64/kernel/sys32.c       |  2 +-
 arch/mips/kernel/linux32.c      |  2 +-
 arch/parisc/kernel/sys_parisc.c |  4 ++--
 arch/powerpc/kernel/sys_ppc32.c |  2 +-
 arch/sparc/kernel/sys_sparc32.c |  2 +-
 arch/x86/kernel/sys_ia32.c      |  3 ++-
 fs/internal.h                   |  1 -
 fs/open.c                       | 12 ++++++------
 include/linux/syscalls.h        |  8 ++------
 9 files changed, 16 insertions(+), 20 deletions(-)
arch/arm64/kernel/sys32.c +1 -1
index 96bcfb9074430..12a948f3a5043 100644
@@ -89,7 +89,7 @@ COMPAT_SYSCALL_DEFINE4(aarch32_truncate64, const char __user *, pathname,
 COMPAT_SYSCALL_DEFINE4(aarch32_ftruncate64, unsigned int, fd, u32, __pad,
 		       arg_u32p(length))
 {
-	return ksys_ftruncate(fd, arg_u64(length));
+	return ksys_ftruncate(fd, arg_u64(length), FTRUNCATE_LFS);
 }
 
 COMPAT_SYSCALL_DEFINE5(aarch32_readahead, int, fd, u32, __pad,
arch/mips/kernel/linux32.c +1 -1
index a0c0a7a654e94..fe9a787db5694 100644
@@ -60,7 +60,7 @@ SYSCALL_DEFINE4(32_truncate64, const char __user *, path,
 SYSCALL_DEFINE4(32_ftruncate64, unsigned long, fd, unsigned long, __dummy,
 	unsigned long, a2, unsigned long, a3)
 {
-	return ksys_ftruncate(fd, merge_64(a2, a3));
+	return ksys_ftruncate(fd, merge_64(a2, a3), FTRUNCATE_LFS);
 }
 
 SYSCALL_DEFINE5(32_llseek, unsigned int, fd, unsigned int, offset_high,
arch/parisc/kernel/sys_parisc.c +2 -2
index b2cdbb8a12b16..fcb0d80691392 100644
@@ -216,7 +216,7 @@ asmlinkage long parisc_truncate64(const char __user * path,
 asmlinkage long parisc_ftruncate64(unsigned int fd,
 					unsigned int high, unsigned int low)
 {
-	return ksys_ftruncate(fd, (long)high << 32 | low);
+	return ksys_ftruncate(fd, (long)high << 32 | low, FTRUNCATE_LFS);
 }
 
 /* stubs for the benefit of the syscall_table since truncate64 and truncate 
@@ -227,7 +227,7 @@ asmlinkage long sys_truncate64(const char __user * path, unsigned long length)
 }
 asmlinkage long sys_ftruncate64(unsigned int fd, unsigned long length)
 {
-	return ksys_ftruncate(fd, length);
+	return ksys_ftruncate(fd, length, FTRUNCATE_LFS);
 }
 asmlinkage long sys_fcntl64(unsigned int fd, unsigned int cmd, unsigned long arg)
 {
arch/powerpc/kernel/sys_ppc32.c +1 -1
index d451a8229223a..03fa487f26147 100644
@@ -101,7 +101,7 @@ PPC32_SYSCALL_DEFINE4(ppc_ftruncate64,
 		       unsigned int, fd, u32, reg4,
 		       unsigned long, len1, unsigned long, len2)
 {
-	return ksys_ftruncate(fd, merge_64(len1, len2));
+	return ksys_ftruncate(fd, merge_64(len1, len2), FTRUNCATE_LFS);
 }
 
 PPC32_SYSCALL_DEFINE6(ppc32_fadvise64,
arch/sparc/kernel/sys_sparc32.c +1 -1
index f84a02ab6bf90..04432b82b9e3e 100644
@@ -58,7 +58,7 @@ COMPAT_SYSCALL_DEFINE3(truncate64, const char __user *, path, u32, high, u32, lo
 
 COMPAT_SYSCALL_DEFINE3(ftruncate64, unsigned int, fd, u32, high, u32, low)
 {
-	return ksys_ftruncate(fd, ((u64)high << 32) | low);
+	return ksys_ftruncate(fd, ((u64)high << 32) | low, FTRUNCATE_LFS);
 }
 
 static int cp_compat_stat64(struct kstat *stat,
arch/x86/kernel/sys_ia32.c +2 -1
index 6cf65397d2257..610a1c2f45191 100644
@@ -61,7 +61,8 @@ SYSCALL_DEFINE3(ia32_truncate64, const char __user *, filename,
 SYSCALL_DEFINE3(ia32_ftruncate64, unsigned int, fd,
 		unsigned long, offset_low, unsigned long, offset_high)
 {
-	return ksys_ftruncate(fd, ((loff_t) offset_high << 32) | offset_low);
+	return ksys_ftruncate(fd, ((loff_t) offset_high << 32) | offset_low,
+			FTRUNCATE_LFS);
 }
 
 /* warning: next two assume little endian */
fs/internal.h +0 -1
index 77e90e4124e09..8c1f6c548dbfd 100644
@@ -200,7 +200,6 @@ extern int build_open_flags(const struct open_how *how, struct open_flags *op);
 struct file *file_close_fd_locked(struct files_struct *files, unsigned fd);
 
 int do_ftruncate(struct file *file, loff_t length, int small);
-int do_sys_ftruncate(unsigned int fd, loff_t length, int small);
 int chmod_common(const struct path *path, umode_t mode);
 int do_fchownat(int dfd, const char __user *filename, uid_t user, gid_t group,
 		int flag);
fs/open.c +6 -6
index 91f1139591abe..412d0d6fbaa75 100644
@@ -197,7 +197,7 @@ int do_ftruncate(struct file *file, loff_t length, int small)
 				   ATTR_MTIME | ATTR_CTIME, file);
 }
 
-int do_sys_ftruncate(unsigned int fd, loff_t length, int small)
+int ksys_ftruncate(unsigned int fd, loff_t length, unsigned int flags)
 {
 	if (length < 0)
 		return -EINVAL;
@@ -205,18 +205,18 @@ int do_sys_ftruncate(unsigned int fd, loff_t length, int small)
 	if (fd_empty(f))
 		return -EBADF;
 
-	return do_ftruncate(fd_file(f), length, small);
+	return do_ftruncate(fd_file(f), length, !(flags & FTRUNCATE_LFS));
 }
 
 SYSCALL_DEFINE2(ftruncate, unsigned int, fd, off_t, length)
 {
-	return do_sys_ftruncate(fd, length, 1);
+	return ksys_ftruncate(fd, length, 0);
 }
 
 #ifdef CONFIG_COMPAT
 COMPAT_SYSCALL_DEFINE2(ftruncate, unsigned int, fd, compat_off_t, length)
 {
-	return do_sys_ftruncate(fd, length, 1);
+	return ksys_ftruncate(fd, length, 0);
 }
 #endif
 
@@ -229,7 +229,7 @@ SYSCALL_DEFINE2(truncate64, const char __user *, path, loff_t, length)
 
 SYSCALL_DEFINE2(ftruncate64, unsigned int, fd, loff_t, length)
 {
-	return do_sys_ftruncate(fd, length, 0);
+	return ksys_ftruncate(fd, length, FTRUNCATE_LFS);
 }
 #endif /* BITS_PER_LONG == 32 */
 
@@ -245,7 +245,7 @@ COMPAT_SYSCALL_DEFINE3(truncate64, const char __user *, pathname,
 COMPAT_SYSCALL_DEFINE3(ftruncate64, unsigned int, fd,
 		       compat_arg_u64_dual(length))
 {
-	return ksys_ftruncate(fd, compat_arg_u64_glue(length));
+	return ksys_ftruncate(fd, compat_arg_u64_glue(length), FTRUNCATE_LFS);
 }
 #endif
 
include/linux/syscalls.h +2 -6
index 02bd6ddb62782..8787b3511c86c 100644
@@ -1283,12 +1283,8 @@ static inline long ksys_lchown(const char __user *filename, uid_t user,
 			     AT_SYMLINK_NOFOLLOW);
 }
 
-int do_sys_ftruncate(unsigned int fd, loff_t length, int small);
-
-static inline long ksys_ftruncate(unsigned int fd, loff_t length)
-{
-	return do_sys_ftruncate(fd, length, 1);
-}
+#define FTRUNCATE_LFS	(1u << 0)	/* allow truncating > 32-bit */
+int ksys_ftruncate(unsigned int fd, loff_t length, unsigned int flags);
 
 int do_sys_truncate(const char __user *pathname, loff_t length);
 
Signature · 1 line
2.53.0
author maintainer
#8 lore raw

PATCH 7/1146 drbd: Balance RCU calls in drbd_adm_dump_devices()

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Bart Van Assche <[email protected]>

[ Upstream commit 2b31e86387e60b3689339f0f0fbb4d3623d9d494 ]

Make drbd_adm_dump_devices() call rcu_read_lock() before rcu_read_unlock() is called. This has been detected by the Clang thread-safety analyzer.

---
 drivers/block/drbd/drbd_nl.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/block/drbd/drbd_nl.c +6 -2
index e201f0087a0f7..728ecc431b38d 100644
@@ -3378,8 +3378,10 @@ int drbd_adm_dump_devices(struct sk_buff *skb, struct netlink_callback *cb)
 		if (resource_filter) {
 			retcode = ERR_RES_NOT_KNOWN;
 			resource = drbd_find_resource(nla_data(resource_filter));
-			if (!resource)
+			if (!resource) {
+				rcu_read_lock();
 				goto put_result;
+			}
 			cb->args[0] = (long)resource;
 		}
 	}
@@ -3628,8 +3630,10 @@ int drbd_adm_dump_peer_devices(struct sk_buff *skb, struct netlink_callback *cb)
 		if (resource_filter) {
 			retcode = ERR_RES_NOT_KNOWN;
 			resource = drbd_find_resource(nla_data(resource_filter));
-			if (!resource)
+			if (!resource) {
+				rcu_read_lock();
 				goto put_result;
+			}
 		}
 		cb->args[0] = (long)resource;
 	}
Signature · 1 line
2.53.0
author maintainer
#9 lore raw

PATCH 8/1146 loop: fix partition scan race between udev and loop_reread_partitions()

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Daan De Meyer <[email protected]>

[ Upstream commit 267ec4d7223a783f029a980f41b93c39b17996da ]

When LOOP_CONFIGURE is called with LO_FLAGS_PARTSCAN, the following sequence occurs:

1. disk_force_media_change() sets GD_NEED_PART_SCAN
2. Uevent suppression is lifted and a KOBJ_CHANGE uevent is sent
3. loop_global_unlock() releases the lock
4. loop_reread_partitions() calls bdev_disk_changed() to scan

There is a race between steps 2 and 4: when udev receives the uevent and opens the device before loop_reread_partitions() runs, blkdev_get_whole() in bdev.c sees GD_NEED_PART_SCAN set and calls bdev_disk_changed() for a first scan. Then loop_reread_partitions() does a second scan. The open_mutex serializes these two scans, but does not prevent both from running.

The second scan in bdev_disk_changed() drops all partition devices from the first scan (via blk_drop_partitions()) before re-adding them, causing partition block devices to briefly disappear. This breaks any systemd unit with BindsTo= on the partition device: systemd observes the device going dead, fails the dependent units, and does not retry them when the device reappears.

Fix this by removing the GD_NEED_PART_SCAN set from disk_force_media_change() entirely. None of the current callers need the lazy on-open partition scan triggered by this flag:

- floppy: sets GENHD_FL_NO_PART, so disk_has_partscan() is always false and GD_NEED_PART_SCAN has no effect.
- loop (loop_configure, loop_change_fd): when LO_FLAGS_PARTSCAN is set, loop_reread_partitions() performs an explicit scan. When not set, GD_SUPPRESS_PART_SCAN prevents the lazy scan path.
- loop (__loop_clr_fd): calls bdev_disk_changed() explicitly if LO_FLAGS_PARTSCAN is set.
- nbd (nbd_clear_sock_ioctl): capacity is set to zero immediately after; nbd manages GD_NEED_PART_SCAN explicitly elsewhere.

With GD_NEED_PART_SCAN no longer set by disk_force_media_change(), udev opening the loop device after the uevent no longer triggers a redundant scan in blkdev_get_whole(), and only the single explicit scan from loop_reread_partitions() runs.

A regression test for this bug has been submitted to blktests:
https://github.com/linux-blktests/blktests/pull/240.

---
 block/disk-events.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
block/disk-events.c +2 -1
index 9f9f9f8a2d6b1..074731ecc3d25 100644
@@ -290,13 +290,14 @@ EXPORT_SYMBOL(disk_check_media_change);
  * Should be called when the media changes for @disk.  Generates a uevent
  * and attempts to free all dentries and inodes and invalidates all block
  * device page cache entries in that case.
+ *
+ * Callers that need a partition re-scan should arrange for one explicitly.
  */
 void disk_force_media_change(struct gendisk *disk)
 {
 	disk_event_uevent(disk, DISK_EVENT_MEDIA_CHANGE);
 	inc_diskseq(disk);
 	bdev_mark_dead(disk->part0, true);
-	set_bit(GD_NEED_PART_SCAN, &disk->state);
 }
 EXPORT_SYMBOL_GPL(disk_force_media_change);
 
Signature · 1 line
2.53.0
author maintainer
#10 lore raw

PATCH 9/1146 block: fix zones_cond memory leak on zone revalidation error paths

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Jackie Liu <[email protected]>

[ Upstream commit 2a2f520fda824b5a25c93f2249578ea150c24e06 ]

When blk_revalidate_disk_zones() fails after disk_revalidate_zone_resources() has allocated args.zones_cond, the memory is leaked because no error path frees it.

Fixes 6e945ffb6555 ("block: use zone condition to determine conventional zones")
---
 block/blk-zoned.c | 26 ++++++++++++++++++++------
 1 file changed, 20 insertions(+), 6 deletions(-)
block/blk-zoned.c +20 -6
index 7aae3c236cad6..a4d82342e37ac 100644
@@ -1877,6 +1877,7 @@ static int disk_revalidate_zone_resources(struct gendisk *disk,
 {
 	struct queue_limits *lim = &disk->queue->limits;
 	unsigned int pool_size;
+	int ret = 0;
 
 	args->disk = disk;
 	args->nr_zones =
@@ -1899,10 +1900,13 @@ static int disk_revalidate_zone_resources(struct gendisk *disk,
 		pool_size =
 			min(BLK_ZONE_WPLUG_DEFAULT_POOL_SIZE, args->nr_zones);
 
-	if (!disk->zone_wplugs_hash)
-		return disk_alloc_zone_resources(disk, pool_size);
+	if (!disk->zone_wplugs_hash) {
+		ret = disk_alloc_zone_resources(disk, pool_size);
+		if (ret)
+			kfree(args->zones_cond);
+	}
 
-	return 0;
+	return ret;
 }
 
 /*
@@ -1934,6 +1938,7 @@ static int disk_update_zone_resources(struct gendisk *disk,
 	disk->zone_capacity = args->zone_capacity;
 	disk->last_zone_capacity = args->last_zone_capacity;
 	disk_set_zones_cond_array(disk, args->zones_cond);
+	args->zones_cond = NULL;
 
 	/*
 	 * Some devices can advertise zone resource limits that are larger than
@@ -2216,21 +2221,30 @@ int blk_revalidate_disk_zones(struct gendisk *disk)
 	}
 	memalloc_noio_restore(noio_flag);
 
+	if (ret <= 0)
+		goto free_resources;
+
 	/*
 	 * If zones where reported, make sure that the entire disk capacity
 	 * has been checked.
 	 */
-	if (ret > 0 && args.sector != capacity) {
+	if (args.sector != capacity) {
 		pr_warn("%s: Missing zones from sector %llu\n",
 			disk->disk_name, args.sector);
 		ret = -ENODEV;
+		goto free_resources;
 	}
 
-	if (ret > 0)
-		return disk_update_zone_resources(disk, &args);
+	ret = disk_update_zone_resources(disk, &args);
+	if (ret)
+		goto free_resources;
+
+	return 0;
 
+free_resources:
 	pr_warn("%s: failed to revalidate zones\n", disk->disk_name);
 
+	kfree(args.zones_cond);
 	memflags = blk_mq_freeze_queue(q);
 	disk_free_zone_resources(disk);
 	blk_mq_unfreeze_queue(q, memflags);
Signature · 1 line
2.53.0

Greg Kroah-Hartman

author maintainer
#0 lore raw

cover 7.0.10-rc1 review

This is the start of the stable review cycle for the 7.0.10 release. There are 1146 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 Fri, 22 May 2026 16:20:16 +0000. Anything received after that time might be too late.

The whole patch series can be found in one patch at:

	https://www.kernel.org/pub/linux/kernel/v7.x/stable-review/patch-7.0.10-rc1.gz

or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-7.0.y
and the diffstat can be found below.

thanks,

greg k-h

-------------
Pseudo-Shortlog of commits:

Greg Kroah-Hartman <[email protected]>

    Linux 7.0.10-rc1

Johan Hovold <[email protected]>
spi: sifive: fix controller deregistration

Pei Xiao <[email protected]>
spi: sifive: Simplify clock handling with devm_clk_get_enabled()

Piyush Sachdeva <[email protected]>
smb: client: Use FullSessionKey for AES-256 encryption key derivation

David Carlier <[email protected]>
eventfs: Use list_add_tail_rcu() for SRCU-protected children list

Steven Rostedt <[email protected]>
eventfs: Simplify code using guard()s

James Morse <[email protected]>
arm_mpam: Check whether the config array is allocated before destroying it

James Morse <[email protected]>
arm_mpam: Fix false positive assert failure during mpam_disable()

Ben Horgan <[email protected]>
arm_mpam: Improve check for whether or not NRDY is hardware managed

Ben Horgan <[email protected]>
arm_mpam: Pretend that NRDY is always hardware managed

Ben Horgan <[email protected]>
arm_mpam: Fix monitor instance selection when checking for hardware NRDY

Johan Hovold <[email protected]>
drm/gma500/oaktrail_lvds: fix i2c adapter leaks on init

Johan Hovold <[email protected]>
drm/gma500/oaktrail_lvds: fix hang on init failure

Johan Hovold <[email protected]>
drm/gma500/oaktrail_hdmi: fix i2c adapter leak on setup

Thomas Hellström <[email protected]>
drm/ttm: Convert -EAGAIN from dmem_cgroup_try_charge to -ENOSPC

Thomas Hellström <[email protected]>
drm/ttm: Fix ttm_bo_shrink() infinite LRU walk on backup failure

Matthew Auld <[email protected]>
drm/xe/dma-buf: fix UAF with retry loop

Matthew Auld <[email protected]>
drm/xe/dma-buf: handle empty bo and UAF races

Gyeyoung Baek <[email protected]>
drm/panfrost: Fix wait_bo ioctl leaking positive return from dma_resv_wait_timeout()

Sebastian Brzezinka <[email protected]>
drm/i915: skip __i915_request_skip() for already signaled requests

Nicolin Chen <[email protected]>
iommu: Fix ATS invalidation timeouts during __iommu_remove_group_pasid()

Nicolin Chen <[email protected]>
iommu: Fix nested pci_dev_reset_iommu_prepare/done()

Nicolin Chen <[email protected]>
iommu: Fix pasid attach in pci_dev_reset_iommu_prepare/done()

Nicolin Chen <[email protected]>
iommu: Fix WARN_ON in __iommu_group_set_domain_nofail() due to reset

Nicolin Chen <[email protected]>
iommu: Replace per-group resetting_domain with per-gdev blocked flag

Nicolin Chen <[email protected]>

    iommu: Fix NULL group->domain dereference in pci_dev_reset_iommu_done()

Zhenzhong Duan <[email protected]>
iommu/vt-d: Avoid NULL pointer dereference or refcount corruption

Zhenzhong Duan <[email protected]>
iommu/vt-d: Fix oops due to out of scope access

Naval Alcalá <[email protected]>
iommu/vt-d: Disable DMAR for Intel Q35 IGFX

Raphael Zimmer <[email protected]>
libceph: handle rbtree insertion error in decode_choose_args()

Raphael Zimmer <[email protected]>
libceph: Fix potential out-of-bounds access in crush_decode()

Raphael Zimmer <[email protected]>
libceph: Fix potential out-of-bounds access in __ceph_x_decrypt()

Raphael Zimmer <[email protected]>
libceph: Fix potential null-ptr-deref in decode_choose_args()

Raphael Zimmer <[email protected]>
libceph: Fix potential out-of-bounds access in osdmap_decode()

Sascha Bischoff <[email protected]>
irqchip/gic-v5: Allocate ITS parent LPIs as a range

Sascha Bischoff <[email protected]>
irqchip/gic-v5: Support range allocation for LPIs

Sascha Bischoff <[email protected]>
irqchip/gic-v5: Move LPI allocation into the LPI domain

Xianwei Zhao <[email protected]>
irqchip/meson-gpio: Use the correct register in meson_s4_gpio_irq_set_type()

Yong-Xuan Wang <[email protected]>
irqchip/riscv-imsic: Clear interrupt move state during CPU offlining

Olga Kornievskaia <[email protected]>
nfsd: update mtime/ctime on COPY in presence of delegated attributes

Olga Kornievskaia <[email protected]>
nfsd: update mtime/ctime on CLONE in presense of delegated attributes

Scott Mayhew <[email protected]>
nfsd: fix file change detection in CB_GETATTR

Olga Kornievskaia <[email protected]>
nfsd: fix GET_DIR_DELEGATION when VFS leases are disabled

Paulo Alcantara <[email protected]>
netfs: fix error handling in netfs_extract_user_iter()

Ma Ke <[email protected]>
powerpc/warp: Fix error handling in pika_dtm_thread

Vivian Wang <[email protected]>
riscv: misaligned: Make enabling delegation depend on NONPORTABLE

Carlos López <[email protected]>
virt: sev-guest: Do not use host-controlled page order in cleanup path

Wilfred Mallawa <[email protected]>
xfs: fix memory leak on error in xfs_alloc_zone_info()

David Woodhouse <[email protected]>
x86/kexec: Push kjump return address even for non-kjump kexec

Jose Fernandez (Anthropic) <[email protected]>
iommu/amd: Bounds-check devid in __rlookup_amd_iommu()

Nicholas Carlini <[email protected]>
io-wq: check that the predecessor is hashed in io_wq_remove_pending()

Hristo Venev <[email protected]>
ceph: put folios not suitable for writeback

Viacheslav Dubeyko <[email protected]>
ceph: fix BUG_ON in __ceph_build_xattrs_blob() due to stale blob size

Viacheslav Dubeyko <[email protected]>
ceph: fix a buffer leak in __ceph_setxattr()

Qu Wenruo <[email protected]>
btrfs: only release the dirty pages io tree after successful writes

Cássio Gabriel <[email protected]>
ALSA: usb-audio: qcom: Check offload mapping failures

Cássio Gabriel <[email protected]>
ALSA: usb-audio: Bound MIDI endpoint descriptor scans

Cássio Gabriel <[email protected]>
ALSA: usb-audio: Bound MIDI 2.0 endpoint descriptor scans

Markus Kramer <[email protected]>
ALSA: hda/realtek: Add quirk for Samsung Galaxy Book5 360 headphone

Adrien Burnett <[email protected]>

    ALSA: hda/realtek: Add mute LED quirk for HP Pavilion Laptop 16-ag0xxx

Gyeyoung Baek <[email protected]>
accel/rocket: Fix prep_bo ioctl leaking positive return from dma_resv_wait_timeout()

Derek J. Clark <[email protected]>
platform/x86: lenovo-wmi-other: Limit adding attributes to supported devices

Derek J. Clark <[email protected]>
platform/x86: lenovo-wmi-other: Add Attribute ID helper functions

Derek J. Clark <[email protected]>
platform/x86: lenovo-wmi-other: Fix tunable_attr_01 struct members

Derek J. Clark <[email protected]>
platform/x86: lenovo-wmi-other: Zero initialize WMI arguments

Rong Zhang <[email protected]>
platform/x86: lenovo-wmi-other: Balance component bind and unbind

Rong Zhang <[email protected]>
platform/x86: lenovo-wmi-other: Balance IDA id allocation and free

Rong Zhang <[email protected]>
platform/x86: lenovo-wmi-helpers: Fix memory leak in lwmi_dev_evaluate_int()

Derek J. Clark <[email protected]>
platform/x86: lenovo-wmi-helpers: Move gamezone enums to wmi-helpers

Srinivas Pandruvada <[email protected]>
platform/x86: intel: Move debugfs register before creating devices

Thomas Hellström <[email protected]>
drm/ttm: Fix ttm_bo_swapout() infinite LRU walk on swapout failure

Mikhail Gavrilov <[email protected]>
drm/amd/display: Wrap DCN32 phantom-plane allocation in DC_RUN_WITH_PREEMPTION_ENABLED

Chaitanya Kumar Borah <[email protected]>
drm/i915/dp: Fix VSC dynamic range signaling for RGB formats

Guangshuo Li <[email protected]>
drm/bridge: imx8qxp-pxl2dpi: avoid ERR_PTR with device_node cleanup

Edward Adam Davis <[email protected]>
drm: Replace old pointer to new idr

Myeonghun Pak <[email protected]>
drm/loongson: Use managed KMS polling

Ye Bin <[email protected]>
smb/client: fix possible infinite loop and oob read in symlink_data()

Nick Chan <[email protected]>

    nvme-apple: Reset q->sq_tail during queue init

Pauli Virtanen <[email protected]>
Bluetooth: btmtk: accept too short WMT FUNC_CTRL events

Michael Tretter <[email protected]>
media: staging: imx: configure src_mux in csi_start

Igor Pylypiv <[email protected]>
ata: libata-scsi: fix requeue of deferred ATA PASS-THROUGH commands

Nathan Chancellor <[email protected]>
HID: core: Fix size_t specifier in hid_report_raw_event()

Thomas Gleixner <[email protected]>
rseq: Reenable performance optimizations conditionally

Thomas Gleixner <[email protected]>
rseq: Implement read only ABI enforcement for optimized RSEQ V2 mode

Thomas Gleixner <[email protected]>
rseq: Revert to historical performance killing behaviour

Benjamin Tissoires <[email protected]>
HID: core: introduce hid_safe_input_report()

Benjamin Tissoires <[email protected]>
HID: pass the buffer size to hid_report_raw_event

Qiang Ma <[email protected]>
KVM: x86: Fix Xen hypercall tracepoint argument assignment

Junrui Luo <[email protected]>
KVM: s390: pci: fix GAIT table indexing due to double-scaling pointer arithmetic

Aaron Sacks <[email protected]>
KVM: Reject wrapped offset in kvm_reset_dirty_gfn()

Sean Christopherson <[email protected]>
KVM: x86: Swap the dst and src operand for MOVNTDQA

sunshaojie <[email protected]>
cgroup/cpuset: Return only actually allocated CPUs during partition invalidation

Sergio Correia <[email protected]>
audit: enforce AUDIT_LOCKED for AUDIT_TRIM and AUDIT_MAKE_EQUIV

Zoran Ilievski <[email protected]>
net: atlantic: preserve PCI wake-from-D3 on shutdown when WOL enabled

Li Xiasong <[email protected]>
netfilter: nft_ct: fix missing expect put in obj eval

Mario Limonciello <[email protected]>
Revert "ACPI: CPPC: Adjust debug messages in amd_set_max_freq_ratio() to warn"

Guopeng Zhang <[email protected]>
cgroup/cpuset: Reserve DL bandwidth only for root-domain moves

Greg Kroah-Hartman <[email protected]>
idpf: fix double free and use-after-free in aux device error paths

Guopeng Zhang <[email protected]>
cgroup/dmem: Return -ENOMEM on failed pool preallocation

Arthur Kiyanovski <[email protected]>
net: ena: PHC: Check return code before setting timestamp output

Sergio Correia <[email protected]>
audit: fix incorrect inheritable capability in CAPSET records

Li Xiasong <[email protected]>
netfilter: nf_conntrack_sip: get helper before allocating expectation

Guopeng Zhang <[email protected]>
cgroup/cpuset: Reset DL migration state on can_attach() failure

Arthur Kiyanovski <[email protected]>
net: ena: PHC: Fix potential use-after-free in get_timestamp

Breno Leitao <[email protected]>

    workqueue: Fix wq->cpu_pwq leak in alloc_and_link_pwqs() WQ_UNBOUND path

Matt Vollrath <[email protected]>
i40e: Cleanup PTP pins on probe failure

Herbert Xu <[email protected]>

    crypto: af_alg - Cap AEAD AD length to 0x80000000

Vincent Guittot <[email protected]>
sched/fair: Fix wakeup_preempt_fair() for not waking up task

Eric Dumazet <[email protected]>
net/sched: sch_pie: annotate more data-races in pie_dump_stats()

Breno Leitao <[email protected]>
workqueue: fix devm_alloc_workqueue() va_list misuse

Samiullah Khawaja <[email protected]>
PCI: Initialize temporary device in new_id_store()

Davidlohr Bueso <[email protected]>
futex: Drop CLONE_THREAD requirement for private default hash alloc

Zhaoyang Huang <[email protected]>
arm64: Reserve an extra page for early kernel mapping

Leo Yan <[email protected]>
kselftest/arm64: Include <asm/ptrace.h> for user_gcs definition

Paolo Abeni <[email protected]>
net/sched: cls_flower: revert unintended changes

Dan Carpenter <[email protected]>
sfc: fix error code in efx_devlink_info_running_versions()

Jakub Kicinski <[email protected]>
net: tls: fix strparser anchor skb leak on offload RX setup failure

Petr Oros <[email protected]>
ice: add dpll peer notification for paired SMA and U.FL pins

Ivan Vecera <[email protected]>
dpll: export __dpll_pin_change_ntf() for use under dpll_lock

Petr Oros <[email protected]>
ice: fix missing dpll notifications for SW pins

Petr Oros <[email protected]>
ice: fix SMA and U.FL pin state changes affecting paired pin

Petr Oros <[email protected]>
ice: fix missing SMA pin initialization in DPLL subsystem

Petr Oros <[email protected]>
ice: fix infinite recursion in ice_cfg_tx_topo via ice_init_dev_hw

Petr Oros <[email protected]>
ice: fix NULL pointer dereference in ice_reset_all_vfs()

Petr Oros <[email protected]>
iavf: add VIRTCHNL_OP_ADD_VLAN to success completion handler

Petr Oros <[email protected]>
iavf: wait for PF confirmation before removing VLAN filters

Petr Oros <[email protected]>
iavf: stop removing VLAN filters from PF on interface down

Petr Oros <[email protected]>
iavf: rename IAVF_VLAN_IS_NEW to IAVF_VLAN_ADDING

Hasan Basbunar <[email protected]>
page_pool: fix memory-provider leak in page_pool_create_percpu() error path

Eric Dumazet <[email protected]>

    bonding: 3ad: implement proper RCU rules for port->aggregator

Hangbin Liu <[email protected]>
bonding: print churn state via netlink

Lorenzo Bianconi <[email protected]>
net: airoha: Do not return err in ndo_stop() callback

Tvrtko Ursulin <[email protected]>

    drm/xe/xelp: Fix Wa_18022495364

Shuicheng Lin <[email protected]>
drm/xe/gsc: Fix BO leak on error in query_compatibility_version()

Shuicheng Lin <[email protected]>
drm/xe/eustall: Fix drm_dev_put called before stream disable in close

Shuicheng Lin <[email protected]>
drm/xe: Fix error cleanup in xe_exec_queue_create_ioctl()

Shuicheng Lin <[email protected]>
drm/xe: Fix potential NULL deref in xe_exec_queue_tlb_inval_last_fence_put_unlocked

Matt Roper <[email protected]>
drm/xe/debugfs: Correct printing of register whitelist ranges

Matthew Brost <[email protected]>
drm/xe: Drop registration of guc_submit_wedged_fini from xe_guc_submit_wedge()

Zhanjun Dong <[email protected]>
drm/xe: Use XE_WEDGED_MODE_UPON_ANY_HANG_NO_RESET enum instead of magic number

Timur Kristóf <[email protected]>
drm/amd/display: Use EDID from VBIOS embedded panel info

Timur Kristóf <[email protected]>
drm/amd/display: Read EDID from VBIOS embedded panel info

Timur Kristóf <[email protected]>
drm/amd/display: Allow constructing DCE8 link encoder without DDC

Timur Kristóf <[email protected]>
drm/amd/display: Allow constructing DCE6 link encoder without DDC

Timur Kristóf <[email protected]>
drm/amd/display: Allow DCE link encoder without AUX registers

Timur Kristóf <[email protected]>
drm/amd/display: Allow embedded connectors without DDC

Sebastian Andrzej Siewior <[email protected]>
futex: Prevent lockup in requeue-PI during signal/ timeout wakeup

Shenghao Ding <[email protected]>
ALSA: hda/tas2781: Fix incorrect bit update for non-book-zero or book 0 pages >1

Richard Fitzgerald <[email protected]>
ALSA: hda: cs35l56: Fix uninitialized value in cs35l56_hda_read_acpi()

wangdicheng <[email protected]>
ALSA: hda/conexant: Fix missing error check for jack detection

Breno Leitao <[email protected]>
netconsole: restore userdatum value on update_userdata() failure

Breno Leitao <[email protected]>
netconsole: propagate device name truncation in dev_name_store()

Breno Leitao <[email protected]>
netconsole: avoid clobbering userdatum value on truncated write

Breno Leitao <[email protected]>
netconsole: return count instead of strnlen(buf, count) from store callbacks

Eric Dumazet <[email protected]>
net/sched: sch_cake: annotate data-races in cake_dump_stats() (V)

Eric Dumazet <[email protected]>
net/sched: sch_cake: annotate data-races in cake_dump_stats() (IV)

Eric Dumazet <[email protected]>
net/sched: sch_cake: annotate data-races in cake_dump_stats() (III)

Eric Dumazet <[email protected]>
net/sched: sch_cake: annotate data-races in cake_dump_stats() (II)

Eric Dumazet <[email protected]>
net/sched: sch_cake: annotate data-races in cake_dump_stats() (I)

Weiming Shi <[email protected]>
bareudp: fix NULL pointer dereference in bareudp_fill_metadata_dst()

Xin Long <[email protected]>
sctp: discard stale INIT after handshake completion

Xin Long <[email protected]>
netfilter: skip recording stale or retransmitted INIT

Christian A. Ehrhardt <[email protected]>
ASoC: codecs: ab8500: Fix casting of private data

Jakub Kicinski <[email protected]>
net: psp: require admin permission for dev-set and key-rotate

Jakub Kicinski <[email protected]>
net: psp: check for device unregister when creating assoc

Richard Fitzgerald <[email protected]>
ASoC: cs35l56: Fix illegal writes to OTP_MEM registers

Jens Axboe <[email protected]>
io_uring/napi: cap busy_poll_to 10 msec

Lijo Lazar <[email protected]>
drm/amd/pm: Add fine grained flag to SMU v13.0.6

Yinjie Yao <[email protected]>
drm/amdgpu/jpeg: set no_user_fence for JPEG v5.3.0 ring

Yinjie Yao <[email protected]>
drm/amdgpu/jpeg: set no_user_fence for JPEG v5.0.1 ring

Yinjie Yao <[email protected]>
drm/amdgpu/jpeg: set no_user_fence for JPEG v5.0.0 ring

Yinjie Yao <[email protected]>
drm/amdgpu/jpeg: set no_user_fence for JPEG v4.0.5 ring

Yinjie Yao <[email protected]>
drm/amdgpu/jpeg: set no_user_fence for JPEG v4.0.3 ring

Yinjie Yao <[email protected]>
drm/amdgpu/jpeg: set no_user_fence for JPEG v4.0 ring

Yinjie Yao <[email protected]>
drm/amdgpu/jpeg: set no_user_fence for JPEG v3.0 ring

Yinjie Yao <[email protected]>
drm/amdgpu/jpeg: set no_user_fence for JPEG v2.5 ring

Yinjie Yao <[email protected]>
drm/amdgpu/jpeg: set no_user_fence for JPEG v2.0 ring

Yinjie Yao <[email protected]>
drm/amdgpu/vcn: set no_user_fence for VCN v5.0.1 enc ring

Yinjie Yao <[email protected]>
drm/amdgpu/vcn: set no_user_fence for VCN v5.0.0 enc ring

Yinjie Yao <[email protected]>
drm/amdgpu/vcn: set no_user_fence for VCN v4.0.5 enc ring

Yinjie Yao <[email protected]>
drm/amdgpu/vcn: set no_user_fence for VCN v4.0.3 enc ring

Yinjie Yao <[email protected]>
drm/amdgpu/vcn: set no_user_fence for VCN v4.0 enc ring

Yinjie Yao <[email protected]>
drm/amdgpu/vcn: set no_user_fence for VCN v3.0 enc/dec rings

Yinjie Yao <[email protected]>
drm/amdgpu/vcn: set no_user_fence for VCN v2.5 enc/dec rings

Yinjie Yao <[email protected]>
drm/amdgpu/vcn: set no_user_fence for VCN v2.0 enc/dec rings

Alex Deucher <[email protected]>
drm/amd/display: properly handle family setting for early GC 11.5.4

Heiko Schocher <[email protected]>
net: phy: dp83869: fix setting CLK_O_SEL field.

Heiko Carstens <[email protected]>
s390/mm: Fix phys_to_folio() usage in do_secure_storage_access()

Yu Kuai <[email protected]>
md/md-bitmap: add a none backend for bitmap grow

Yu Kuai <[email protected]>
md/md-bitmap: split bitmap sysfs groups

Yu Kuai <[email protected]>
md: factor bitmap creation away from sysfs handling

Yu Kuai <[email protected]>
md: add fallback to correct bitmap_ops on version mismatch

Keith Busch <[email protected]>
md/raid1,raid10: don't fail devices for invalid IO errors

William A. Kennington III <[email protected]>
net: mctp i2c: check length before marking flow active

Zicheng Qu <[email protected]>
sched/fair: Clear rel_deadline when initializing forked entities

Vincent Guittot <[email protected]>
sched/fair: Fix wakeup_preempt_fair() vs delayed dequeue

Takashi Iwai <[email protected]>
ALSA: usb-audio: Fix potential leak of pd at parsing UAC3 streams

Breno Leitao <[email protected]>
netpoll: fix IPv6 local-address corruption

Altan Hacigumus <[email protected]>
tcp: make probe0 timer handle expired user timeout

Florian Westphal <[email protected]>
neigh: let neigh_xmit take skb ownership

Morduan Zang <[email protected]>
net: phonet: do not BUG_ON() in pn_socket_autobind() on failed bind

Weiming Shi <[email protected]>
net/sched: taprio: fix NULL pointer dereference in class dump

Paul Geurts <[email protected]>
NFC: trf7970a: Ignore antenna noise when checking for RF field

Felix Gu <[email protected]>
spi: amlogic-spisg: initialize completion before requesting IRQ

Morduan Zang <[email protected]>
net: usb: rtl8150: free skb on usb_submit_urb() failure in xmit

Zhan Jun <[email protected]>

    net: usb: rtl8150: fix use-after-free in rtl8150_start_xmit()

Ido Schimmel <[email protected]>
vrf: Fix a potential NPD when removing a port from a VRF

Eric Dumazet <[email protected]>
net/sched: sch_fq_pie: annotate data-races in fq_pie_dump_stats()

Eric Dumazet <[email protected]>
net/sched: sch_choke: annotate data-races in choke_dump_stats()

Lorenzo Bianconi <[email protected]>
net: airoha: Do not read uninitialized fragment address in airoha_dev_xmit()

Lorenzo Bianconi <[email protected]>
net: airoha: Do not wake all netdev TX queues in airoha_qdma_wake_netdev_txqs()

Zhengping Zhang <[email protected]>
net: airoha: fix typo in function name

Lorenzo Bianconi <[email protected]>
net: airoha: stop net_device TX queue before updating CPU index

Lorenzo Bianconi <[email protected]>
net: airoha: fix BQL imbalance in TX path

Stephen Hemminger <[email protected]>
net/sched: netem: check for negative latency and jitter

Stephen Hemminger <[email protected]>
net/sched: netem: fix slot delay calculation overflow

Stephen Hemminger <[email protected]>
net/sched: netem: validate slot configuration

Stephen Hemminger <[email protected]>
net/sched: netem: only reseed PRNG when seed is explicitly provided

Stephen Hemminger <[email protected]>
net/sched: netem: fix queue limit check to include reordered packets

Stephen Hemminger <[email protected]>
net/sched: netem: fix probability gaps in 4-state loss model

Nikola Z. Ivanov <[email protected]>
netdevsim: zero initialize struct iphdr in dummy sk_buff

Felix Gu <[email protected]>
spi: axiado: replace usleep_range() with udelay() in IRQ path

Daan De Meyer <[email protected]>
cdrom, scsi: sr: propagate read-only status to block layer via set_disk_ro()

Tony Luck <[email protected]>
ACPI: APEI: EINJ: Fix EINJV2 memory error injection

Tony Luck <[email protected]>
ACPICA: Provide #defines for EINJV2 error types

Miquel Raynal <[email protected]>
mtd: spinand: winbond: Fix ODTR write VCR on W35NxxJW

Miquel Raynal <[email protected]>
mtd: spinand: winbond: Set the packed page read flag to W35N02/04JW

Miquel Raynal <[email protected]>
mtd: spinand: Add support for packed read data ODTR commands

Miquel Raynal <[email protected]>
spi: spi-mem: Add a packed command operation

Wentao Guan <[email protected]>
arm64/scs: Fix potential sign extension issue of advance_loc4

Geert Uytterhoeven <[email protected]>

    drm/color-mgmt: Typo s/R332/RGB332/

Yuho Choi <[email protected]>
drm/sysfb: ofdrm: fix PCI device reference leaks

James Calligeros <[email protected]>
ASoC: tas2770: Fix order of operations for temperature calculation

James Calligeros <[email protected]>
ASoC: tas2764: Mark die temp register as volatile

John Madieu <[email protected]>
spi: rockchip: Read ISR, not IMR, to detect cs-inactive IRQ

Bard Liao <[email protected]>
ASoC: SOF: Intel: add an empty adr_link

Guilherme G. Piccoli <[email protected]>
ASoC: amd: acp: Add DMI quirk for Valve Steam Deck OLED

John Madieu <[email protected]>
spi: rzv2h-rspi: Fix silent failure in clock setup error path

Florian Westphal <[email protected]>
netfilter: nf_conntrack_sip: don't use simple_strtoul

Jiexun Wang <[email protected]>
netfilter: xt_policy: fix strict mode inbound policy matching

Kent Russell <[email protected]>
drm/amdgpu: Only send RMA CPER when threshold is exceeded

Timur Kristóf <[email protected]>
drm/amdgpu/gfx6: Support harvested SI chips with disabled TCCs (v2)

Timur Kristóf <[email protected]>
drm/amdgpu/uvd3.1: Don't validate the firmware when already validated

Christian König <[email protected]>
drm/amdgpu: fix AMDGPU_INFO_READ_MMR_REG

Yang Wang <[email protected]>
drm/amd/pm: fix missing fine-grained dpm table flag on aldebaran

Timur Kristóf <[email protected]>
drm/amdgpu/gmc: Fix AMDGPU_GART_PLACEMENT_LOW to not overlap with VRAM

Hongyan Xu <[email protected]>
drm/amdgpu: avoid double drm_exec_fini() in userq validate

Keith Busch <[email protected]>
nvme-pci: fix missed admin queue sq doorbell write

Pablo Neira Ayuso <[email protected]>
netfilter: nf_tables: add hook transactions for device deletions

Pablo Neira Ayuso <[email protected]>
netfilter: nf_tables: join hook list via splice_list_rcu() in commit phase

Pablo Neira Ayuso <[email protected]>
rculist: add list_splice_rcu() for private lists

Florian Westphal <[email protected]>
netfilter: nf_tables: use list_del_rcu for netlink hooks

Pablo Neira Ayuso <[email protected]>
netfilter: arp_tables: fix IEEE1394 ARP payload parsing

Maurizio Lombardi <[email protected]>
nvmet-tcp: propagate nvmet_tcp_build_pdu_iovec() errors to its callers

Breno Leitao <[email protected]>
tracing: branch: Fix inverted check on stat tracer registration

Mark Harmstone <[email protected]>
btrfs: fix double-decrement of bytes_may_use in submit_one_async_extent()

Mark Harmstone <[email protected]>
btrfs: don't clobber errors in add_remap_tree_entries()

Mark Harmstone <[email protected]>
btrfs: fix bytes_may_use leak in do_remap_reloc_trans()

Mark Harmstone <[email protected]>
btrfs: fix bytes_may_use leak in move_existing_remap()

Amir Goldstein <[email protected]>
fsnotify: fix inode reference leak in fsnotify_recalc_mask()

Wolfram Sang <[email protected]>
mailbox: mailbox-test: make data_ready a per-instance variable

Wolfram Sang <[email protected]>
mailbox: mailbox-test: initialize struct earlier

Wolfram Sang <[email protected]>
mailbox: mailbox-test: don't free the reused channel

Wolfram Sang <[email protected]>
mailbox: mailbox-test: handle channel errors consistently

Wolfram Sang <[email protected]>
mailbox: add sanity check for channel array

Guopeng Zhang <[email protected]>
cgroup/cpuset: record DL BW alloc CPU for attach rollback

cuitao <[email protected]>
cgroup/rdma: fix integer overflow in rdmacg_try_charge()

Edward Adam Davis <[email protected]>
sched/psi: fix race between file release and pressure write

Wolfram Sang <[email protected]>
mailbox: mailbox-test: free channels on probe error

Jason-JH Lin <[email protected]>
mailbox: mtk-cmdq: Fix CURR and END addr for task insert case

Felix Gu <[email protected]>
mailbox: mtk-vcp-mailbox: Fix the return value in mtk_vcp_mbox_xlate()

Thomas Weißschuh <[email protected]>
kbuild: Never respect CONFIG_WERROR / W=e to fixdep

Len Brown <[email protected]>
tools/power turbostat: Fix --cpu-set 1 regression on HT systems

Len Brown <[email protected]>
tools/power turbostat: Fix --cpu-set 0 regression on HT systems

David Arcari <[email protected]>
tools/power turbostat: Fix unrecognized option '-P'

Yuho Choi <[email protected]>
fbdev: offb: fix PCI device reference leak on probe failure

Len Brown <[email protected]>
tools/power turbostat: Fix AMD RAPL regression on big systems

Mathias Krause <[email protected]>
kbuild: builddeb - avoid recompiles for non-cross-compiles

Anthony Pighin (Nokia) <[email protected]>

    rtc: abx80x: Disable alarm feature if no interrupt attached

Bae Yeonju <[email protected]>
fs/adfs: validate nzones in adfs_validate_bblk()

Christian Brauner <[email protected]>
eventpoll: fix ep_remove struct eventpoll / struct file UAF

Christian Brauner <[email protected]>
eventpoll: move epi_fget() up

Christian Brauner <[email protected]>
eventpoll: drop vestigial __ prefix from ep_remove_{file,epi}()

Christian Brauner <[email protected]>
eventpoll: kill __ep_remove()

Christian Brauner <[email protected]>
eventpoll: split __ep_remove()

Christian Brauner <[email protected]>
eventpoll: use hlist_is_singular_node() in __ep_remove()

Randy Dunlap <[email protected]>
nstree: fix func. parameter kernel-doc warnings

Kohei Enju <[email protected]>
vhost_net: fix sleeping with preempt-disabled in vhost_net_busy_poll()

Lee Jones <[email protected]>
tipc: fix double-free in tipc_buf_append()

Jiayuan Chen <[email protected]>
tcp: send a challenge ACK on SEG.ACK > SND.NXT

Alexey Kodanev <[email protected]>
nfp: fix swapped arguments in nfp_encode_basic_qdr() calls

Brett Creeley <[email protected]>
virtio_net: sync rss_trailer.max_tx_vq on queue_pairs change via VQ_PAIRS_SET

Stefano Garzarella <[email protected]>
vsock/virtio: fix MSG_ZEROCOPY pinned-pages accounting

Erni Sri Satya Vennela <[email protected]>
net: mana: Fix EQ leak in mana_remove on NULL port

Erni Sri Satya Vennela <[email protected]>
net: mana: Don't overwrite port probe error with add_adev result

Erni Sri Satya Vennela <[email protected]>
net: mana: Guard mana_remove against double invocation

Erni Sri Satya Vennela <[email protected]>
net: mana: Init gf_stats_work before potential error paths in probe

Erni Sri Satya Vennela <[email protected]>
net: mana: Init link_change_work before potential error paths in probe

Lorenzo Bianconi <[email protected]>
net: airoha: Add size check for TX NAPIs in airoha_qdma_cleanup()

Lorenzo Bianconi <[email protected]>
net: airoha: Rework the code flow in airoha_remove() and in airoha_probe() error path

Lorenzo Bianconi <[email protected]>
net: airoha: Move ndesc initialization at end of airoha_qdma_init_rx_queue()

Mieczyslaw Nalewaj <[email protected]>
net: dsa: realtek: rtl8365mb: fix mode mask calculation

Lorenzo Bianconi <[email protected]>
net: airoha: Add missing bits in airoha_qdma_cleanup_tx_queue()

Lorenzo Bianconi <[email protected]>
net: airoha: Move ndesc initialization at end of airoha_qdma_init_tx()

Eric Dumazet <[email protected]>
net/sched: sch_sfb: annotate data-races in sfb_dump_stats()

Eric Dumazet <[email protected]>
net/sched: sch_red: annotate data-races in red_dump_stats()

Eric Dumazet <[email protected]>
net/sched: sch_fq_codel: remove data-races from fq_codel_dump_stats()

Eric Dumazet <[email protected]>
net/sched: sch_pie: annotate data-races in pie_dump_stats()

Eric Dumazet <[email protected]>
net_sched: sch_hhf: annotate data-races in hhf_dump_stats()

Jacob Keller <[email protected]>
ice: fix ice_ptp_read_tx_hwtstamp_status_eth56g

Jacob Keller <[email protected]>
ice: fix ready bitmap check for non-E822 devices

Grzegorz Nitka <[email protected]>
ice: perform PHY soft reset for E825C ports at initialization

Grzegorz Nitka <[email protected]>
ice: fix timestamp interrupt configuration for E825C

Michael Bommarito <[email protected]>
net/rds: zero per-item info buffer before handing it to visitors

Xin Long <[email protected]>
sctp: fix sockets_allocated imbalance after sk_clone()

Vikas Gupta <[email protected]>
bnge: remove unsupported backing store type

Vikas Gupta <[email protected]>
bnge: fix initial HWRM sequence

Kohei Enju <[email protected]>

    net: validate skb->napi_id in RX tracepoints

Hyunwoo Kim <[email protected]>

    ksmbd: scope conn->binding slowpath to bound sessions only

DaeMyung Kang <[email protected]>
ksmbd: fix durable fd leak on ClientGUID mismatch in durable v2 open

DaeMyung Kang <[email protected]>
ksmbd: destroy async_ida in ksmbd_conn_free()

DaeMyung Kang <[email protected]>
ksmbd: destroy tree_conn_ida in ksmbd_session_destroy()

Sangyun Kim <[email protected]>
pwm: atmel-tcb: Cache clock rates and mark chip as atomic

Matt Evans <[email protected]>
vfio/pci: Clean up DMABUFs before disabling function

Jun Yan <[email protected]>
arm64: dts: meson-gxl-p230: fix ethernet PHY interrupt number

Anand Moon <[email protected]>
arm64: dts: amlogic: meson-axg: Add missing cache information to cpu0

Chia-Yu Chang <[email protected]>
net/sched: sch_dualpi2: drain both C-queue and L-queue in dualpi2_change()

Weiming Shi <[email protected]>
slip: bound decode() reads against the compressed packet length

Weiming Shi <[email protected]>
slip: reject VJ receive packets on instances with no rstate array

Fernando Fernandez Mancera <[email protected]>
netfilter: nfnetlink_osf: fix potential NULL dereference in ttl check

Fernando Fernandez Mancera <[email protected]>
netfilter: nfnetlink_osf: fix out-of-bounds read on option matching

Yingnan Zhang <[email protected]>
ipvs: fix MTU check for GSO packets in tunnel mode

Pablo Neira Ayuso <[email protected]>
netfilter: nat: use kfree_rcu to release ops

Pablo Neira Ayuso <[email protected]>
netfilter: xtables: restrict several matches to inet family

Florian Westphal <[email protected]>
netfilter: conntrack: remove sprintf usage

Xiang Mei <[email protected]>
netfilter: nfnetlink_osf: fix divide-by-zero in OSF_WSS_MODULO

Pablo Neira Ayuso <[email protected]>
netfilter: nft_osf: restrict it to ipv4

Lorenzo Bianconi <[email protected]>
net: airoha: Fix possible TX queue stall in airoha_qdma_tx_napi_poll()

Weiming Shi <[email protected]>
openvswitch: cap upcall PID array size and pre-size vport replies

Prathamesh Deshpande <[email protected]>
net/mlx5: Fix HCA caps leak on notifier init failure

Qingfang Deng <[email protected]>
pppoe: drop PFC frames

Michael Bommarito <[email protected]>
sctp: fix OOB write to userspace in sctp_getsockopt_peer_auth_chunks

Kuniyuki Iwashima <[email protected]>
af_unix: Drop all SCM attributes for SOCKMAP.

Eric Dumazet <[email protected]>
ipv6: fix possible UAF in icmpv6_rcv()

Matt Vollrath <[email protected]>
e1000e: Unroll PTP in probe error handling

Petr Oros <[email protected]>
iavf: fix wrong VLAN mask for legacy Rx descriptors L2TAG2

Kohei Enju <[email protected]>
i40e: don't advertise IFF_SUPP_NOFCS

Kohei Enju <[email protected]>
ice: fix potential NULL pointer deref in error path of ice_set_ringparam()

Keita Morisaki <[email protected]>
ice: fix race condition in TX timestamp ring cleanup

Paul Greenwalt <[email protected]>
ice: fix ICE_AQ_LINK_SPEED_M for 200G

Paul Greenwalt <[email protected]>
ice: fix PHY config on media change with link-down-on-close

Michal Schmidt <[email protected]>
ice: fix double-free of tx_buf skb

Grzegorz Nitka <[email protected]>
ice: update PCS latency settings for E825 10G/25Gb modes

Grzegorz Nitka <[email protected]>
ice: fix 'adjust' timer programming for E830 devices

Eric Dumazet <[email protected]>

    tcp: annotate data-races around tp->plb_rehash

Eric Dumazet <[email protected]>

    tcp: annotate data-races around (tp->write_seq - tp->snd_nxt)

Eric Dumazet <[email protected]>

    tcp: annotate data-races around tp->timeout_rehash

Eric Dumazet <[email protected]>

    tcp: annotate data-races around tp->srtt_us

Eric Dumazet <[email protected]>

    tcp: annotate data-races around tp->reord_seen

Eric Dumazet <[email protected]>

    tcp: annotate data-races around tp->dsack_dups

Eric Dumazet <[email protected]>

    tcp: annotate data-races around tp->bytes_retrans

Eric Dumazet <[email protected]>

    tcp: annotate data-races around tp->bytes_sent

Eric Dumazet <[email protected]>
tcp: add data-race annotations for TCP_NLA_SNDQ_SIZE

Eric Dumazet <[email protected]>

    tcp: annotate data-races around tp->delivered and tp->delivered_ce

Eric Dumazet <[email protected]>

    tcp: annotate data-races around tp->snd_ssthresh

Eric Dumazet <[email protected]>

    tcp: add data-races annotations around tp->reordering, tp->snd_cwnd

Eric Dumazet <[email protected]>

    tcp: add data-race annotations around tp->data_segs_out and tp->total_retrans

Eric Dumazet <[email protected]>
tcp: annotate data-races in tcp_get_info_chrono_stats()

Eric Dumazet <[email protected]>
tcp: inline tcp_chrono_start()

Eric Dumazet <[email protected]>

    tcp: move tp->chrono_type next tp->chrono_stat[]

Akif <[email protected]>
ksmbd: fix use-after-free in smb2_open during durable reconnect

Wei Fang <[email protected]>
net: enetc: fix NTMP DMA use-after-free issue

Wei Fang <[email protected]>
net: enetc: correct the command BD ring consumer index

Stanislav Fomichev <[email protected]>
net: dsa: remove redundant netdev_lock_ops() from conduit ethtool ops

Vinicius Costa Gomes <[email protected]>
net/sched: taprio: fix use-after-free in advance_sched() on schedule switch

Lorenzo Bianconi <[email protected]>
net: airoha: Wait for NPU PPE configuration to complete in airoha_ppe_offload_setup()

Jiayuan Chen <[email protected]>
nexthop: fix IPv6 route referencing IPv4 nexthop

Dudu Lu <[email protected]>
net/sched: sch_cake: fix NAT destination port not being updated in cake_update_flowkeys

Dudu Lu <[email protected]>
macvlan: fix macvlan_get_size() not reserving space for IFLA_MACVLAN_BC_CUTOFF

Dudu Lu <[email protected]>
net/sched: act_mirred: fix wrong device for mac_header_xmit check in tcf_blockcast_redir

Uwe Kleine-König <[email protected]>
pwm: stm32: Fix rounding issue for requests with inverted polarity

Gabor Juhos <[email protected]>
arm64: dts: marvell: armada-37xx: use 'usb2-phy' in USB3 controller's phy-names

Peng Fan <[email protected]>
arm64: dts: imx8mm-tqma8mqml: Correct PAD settings for PMIC_nINT

Peng Fan <[email protected]>
arm64: dts: imx8mn-tqma8mqnl: Correct PAD settings for PMIC_nINT

Peng Fan <[email protected]>
arm64: dts: imx8mm-emtop-som: Correct PAD settings for PMIC_nINT

Ronald Claveau <[email protected]>
reset: amlogic: t7: Fix null reset ops

René Rebe <[email protected]>
PCMCIA: Fix garbled log messages for KERN_CONT

Peng Fan <[email protected]>
arm64: dts: imx8mp-data-modul-edm-sbc: Correct PAD settings for PMIC_nINT

Peng Fan <[email protected]>
arm64: dts: imx8mp-dhcom-som: Correct PAD settings for PMIC_nINT

Peng Fan <[email protected]>
arm64: dts: imx8mp-ultra-mach-sbc: Correct PAD settings for PMIC_nINT

Peng Fan <[email protected]>
arm64: dts: imx8mp-sr-som: Correct PAD settings for PMIC_nINT

Peng Fan <[email protected]>
arm64: dts: imx8mp-nitrogen-som: Correct PAD settings for PMIC_nINT

Peng Fan <[email protected]>
arm64: dts: imx8mp-aristainetos3a-som-v1: Correct PAD settings for PMIC_nINT

Peng Fan <[email protected]>
arm64: dts: imx8mp-edm-g: Correct PAD settings for PMIC_nINT

Peng Fan <[email protected]>
arm64: dts: imx8mp-icore-mx8mp: Correct PAD settings for PMIC_nINT

Peng Fan <[email protected]>
arm64: dts: imx8mp-navqp: Correct PAD settings for PMIC_nINT

Peng Fan <[email protected]>
arm64: dts: imx8mp-debix-som-a: Correct PAD settings for PMIC_nINT

Peng Fan <[email protected]>
arm64: dts: imx8mp-debix-model-a: Correct PAD settings for PMIC_nINT

Jork Loeser <[email protected]>
Drivers: hv: vmbus: fix hyperv_cpuhp_online variable shadowing

Aditya Garg <[email protected]>
tools: hv: Fix cross-compilation

Gao Xiang <[email protected]>
erofs: unify lcn as u64 for 32-bit platforms

Gao Xiang <[email protected]>
erofs: fix offset truncation when shifting pgoff on 32-bit platforms

Thomas Zimmermann <[email protected]>
sh: Include <linux/io.h> in dac.h

Paul Moses <[email protected]>
crypto: ccp - copy IV using skcipher ivsize

T Pratham <[email protected]>
crypto: sa2ul - Fix AEAD fallback algorithm names

Aleksander Jan Bajkowski <[email protected]>
crypto: eip93 - fix hmac setkey algo selection

Sami Mujawar <[email protected]>
virt: arm-cca-guest: fix error check for RSI_INCOMPLETE

Ville Syrjälä <[email protected]>
drm/i915/wm: Verify the correct plane DDB entry

Yongpeng Yang <[email protected]>
f2fs: protect extension_list reading with sb_lock in f2fs_sbi_show()

Jaegeuk Kim <[email protected]>
f2fs: allow empty mount string for Opt_usr|grp|projjquota

Brian Masney <[email protected]>
clk: visconti: pll: initialize clk_init_data to zero

Jagadeesh Kona <[email protected]>
clk: qcom: gcc-x1e80100: Keep GCC USB QTB clock always ON

Srinivasan Shanmugam <[email protected]>
drm/amd/display: Fix parameter mismatch in panel self-refresh helper

Pengpeng Hou <[email protected]>
scsi: hpsa: Enlarge controller and IRQ name buffers

Zhiguo Niu <[email protected]>
f2fs: fix to preserve previous reserve_{blocks,node} value when remount

Yongpeng Yang <[email protected]>
f2fs: fix data loss caused by incorrect use of nat_entry flag

Geert Uytterhoeven <[email protected]>
lib/hexdump: print_hex_dump_bytes() calls print_hex_dump_debug()

Vladimir Zapolskiy <[email protected]>
clk: qcom: gdsc: Fix error path on registration of multiple pm subdomains

John Ogness <[email protected]>
printk_ringbuffer: Fix get_data() size sanity check

Jianan Huang <[email protected]>
f2fs: avoid reading already updated pages during GC

Shuwei Wu <[email protected]>
clk: spacemit: ccu_mix: fix inverted condition in ccu_mix_trigger_fc()

Geert Uytterhoeven <[email protected]>
clk: xgene: Fix mapping leak in xgene_pllclk_init()

Arnd Bergmann <[email protected]>
clk: qoriq: avoid format string warning

Thomas Weißschuh <[email protected]>
x86/um: fix vDSO installation

Tiwei Bie <[email protected]>
um: Fix potential race condition in TLB sync

Sebastian Krzyszkowiak <[email protected]>
clk: imx8mq: Correct the CSI PHY sels

Felix Gu <[email protected]>
clk: imx: imx6q: Fix device node reference leak in of_assigned_ldb_sels()

Felix Gu <[email protected]>
clk: imx: imx6q: Fix device node reference leak in pll6_bypassed()

Val Packett <[email protected]>
clk: qcom: dispcc-sm8250: Enable parents for pixel clocks

Val Packett <[email protected]>
clk: qcom: dispcc-sm8250: Use shared ops on the mdss vsync clk

Val Packett <[email protected]>

    clk: qcom: gcc-sc8180x: Use retention for PCIe power domains

Val Packett <[email protected]>

    clk: qcom: gcc-sc8180x: Use retention for USB power domains

Val Packett <[email protected]>

    clk: qcom: gcc-sc8180x: Add missing GDSCs

Val Packett <[email protected]>

    dt-bindings: clock: qcom,gcc-sc8180x: Add missing GDSCs

Shawn Lin <[email protected]>
scsi: ufs: rockchip,rk3576-ufshc: dt-bindings: Add new mphy reset item

Junrui Luo <[email protected]>
scsi: target: core: Fix integer overflow in UNMAP bounds check

Nilesh Javali <[email protected]>
scsi: qla2xxx: Add support to report MPI FW state

Fabrizio Castro <[email protected]>

    clk: renesas: r9a09g057: Remove entries for WDT{0,2,3}

Konrad Dybcio <[email protected]>
clk: qcom: dispcc[01]-sa8775p: Fix DSI byte clock rate setting

Konrad Dybcio <[email protected]>
clk: qcom: dispcc-sm4450: Fix DSI byte clock rate setting

Konrad Dybcio <[email protected]>
clk: qcom: dispcc-milos: Fix DSI byte clock rate setting

Konrad Dybcio <[email protected]>
clk: qcom: dispcc-kaanapali: Fix DSI byte clock rate setting

Konrad Dybcio <[email protected]>
clk: qcom: dispcc-glymur: Fix DSI byte clock rate setting

White Lewis <[email protected]>

    clk: qcom: dispcc-sc8280xp: remove CLK_SET_RATE_PARENT from byte_div_clk_src dividers

Yang Erkun <[email protected]>
scsi: sg: Resolve soft lockup issue when opening /dev/sgX

Yang Erkun <[email protected]>
scsi: sg: Fix sysctl sg-big-buff register during sg_init()

Chen-Yu Tsai <[email protected]>
clk: sunxi-ng: sun55i-a523-r: Add missing r-spi module clock

Ovidiu Panait <[email protected]>
clk: renesas: r9a09g056: Fix ordering of module clocks array

Ovidiu Panait <[email protected]>
clk: renesas: r9a09g057: Fix ordering of module clocks array

Dmitry Baryshkov <[email protected]>
clk: qcom: dispcc-sm8450: use RCG2 ops for DPTX1 AUX clock source

Dmitry Baryshkov <[email protected]>
clk: qcom: dispcc-glymur: use RCG2 ops for DPTX1 AUX clock source

Taniya Das <[email protected]>
clk: qcom: gcc-glymur: Add video axi clock resets for glymur

Taniya Das <[email protected]>
dt-bindings: clock: qcom: Add GCC video axi reset clock for Glymur

Krishna Chomal <[email protected]>
platform/x86: hp-wmi: fix fan table parsing

Florian Westphal <[email protected]>
RDMA/core: Prefer NLA_NUL_STRING

Pengpeng Hou <[email protected]>
platform/x86: dell-wmi-sysman: bound enumeration string aggregation

Fedor Pchelkin <[email protected]>
platform/x86: dell_rbu: avoid uninit value usage in packet_size_write()

Emre Cecanpunar <[email protected]>
platform/x86: hp-wmi: add locking for concurrent hwmon access

Emre Cecanpunar <[email protected]>
platform/x86: hp-wmi: fix u8 underflow in gpu_delta calculation

Emre Cecanpunar <[email protected]>
platform/x86: hp-wmi: use mod_delayed_work to reset keep-alive timer

Emre Cecanpunar <[email protected]>
platform/x86: hp-wmi: avoid cancel_delayed_work_sync from work handler

Emre Cecanpunar <[email protected]>
platform/x86: hp-wmi: fix ignored return values in fan settings

Pengpeng Hou <[email protected]>
fs/ntfs3: terminate the cached volume label after UTF-8 conversion

Thomas Bogendoerfer <[email protected]>
tty: serial: ip22zilog: Fix section mispatch warning

Denis Benato <[email protected]>
platform/x86: asus-wmi: fix screenpad brightness range

Denis Benato <[email protected]>
platform/x86: asus-wmi: adjust screenpad power/brightness handling

Damien Riégel <[email protected]>
greybus: raw: fix use-after-free if write is called after disconnect

Damien Riégel <[email protected]>
greybus: raw: fix use-after-free on cdev close

Leon Romanovsky <[email protected]>
RDMA/umem: Use consistent DMA attributes when unmapping entries

Chuck Lever <[email protected]>
nfsd: use dynamic allocation for oversized NFSv4.0 replay cache

Dai Ngo <[email protected]>
NFSD: fix nfs4_file access extra count in nfsd4_add_rdaccess_to_wrdeleg

Andy Shevchenko <[email protected]>
sunrpc: Fix compilation error (make W=1) when dprintk() is no-op

Andy Shevchenko <[email protected]>
sunrpc: Kill RPC_IFDEBUG()

Andy Shevchenko <[email protected]>
nfs/blocklayout: Fix compilation error (make W=1) in bl_write_pagelist()

Abdun Nihaal <[email protected]>
mfd: mc13xxx-core: Fix memory leak in mc13xxx_add_subdevice_pdata()

Deepanshu Kartikey <[email protected]>
fs/ntfs3: fix missing run load for vcn0 in attr_data_get_block_locked()

Dmitry Torokhov <[email protected]>
platform/x86: barco-p50-gpio: normalize return value of gpio_get

Rafael J. Wysocki <[email protected]>
platform/x86: panasonic-laptop: Fix OPTD notifier registration and cleanup

Mostafa Saleh <[email protected]>
usb: typec: ps883x: Fix Oops at unbind

Randy Dunlap <[email protected]>
tty: hvc_iucv: fix off-by-one in number of supported devices

Ethan Tidmore <[email protected]>
usb: typec: Fix error pointer dereference

Chen Ni <[email protected]>

    leds: lgm-sso: Remove duplicate assignments for priv->mmap

Rafael J. Wysocki <[email protected]>
platform/surface: surfacepro3_button: Drop wakeup source on remove

Chen Ni <[email protected]>
backlight: sky81452-backlight: Check return value of devm_gpiod_get_optional() in sky81452_bl_parse_dt()

Edward Adam Davis <[email protected]>
fs/ntfs3: prevent uninitialized lcn caused by zero len

Billy Tsai <[email protected]>
i3c: mipi-i3c-hci: fix IBI payload length calculation for final status

Jorge Marques <[email protected]>
i3c: master: adi: Fix error propagation for CCCs

Jorge Marques <[email protected]>
i3c: master: Fix error codes at send_ccc_cmd

Felix Gu <[email protected]>
i3c: dw: Fix memory leak in dw_i3c_master_i3c_xfers()

Felix Gu <[email protected]>
i3c: master: renesas: Fix memory leak in renesas_i3c_i3c_xfers()

Felix Gu <[email protected]>
i3c: master: dw-i3c: Balance PM runtime usage count on probe failure

Felix Gu <[email protected]>
i3c: master: dw-i3c: Fix missing reset assertion in remove() callback

Arnaldo Carvalho de Melo <[email protected]>
perf util: Kill die() prototype, dead for a long time

Ian Rogers <[email protected]>
perf maps: Fix copy_from that can break sorted by name order

Ian Rogers <[email protected]>
perf maps: Fix fixup_overlap_and_insert that can break sorted by name order

Inochi Amaoto <[email protected]>
pinctrl: sophgo: pinctrl-sg2044: Fix wrong module description

Inochi Amaoto <[email protected]>
pinctrl: sophgo: pinctrl-sg2042: Fix wrong module description

Ian Rogers <[email protected]>
perf cgroup: Update metric leader in evlist__expand_cgroup

Jian Zhang <[email protected]>
ipmi: ssif_bmc: change log level to dbg in irq callback

Jian Zhang <[email protected]>
ipmi: ssif_bmc: fix message desynchronization after truncated response

Jian Zhang <[email protected]>
ipmi: ssif_bmc: fix missing check for copy_to_user() partial failure

Ian Rogers <[email protected]>
perf metrics: Make common stalled metrics conditional on having the event

Leo Yan <[email protected]>
perf expr: Return -EINVAL for syntax error in expr__find_ids()

Thomas Richter <[email protected]>
perf test: Skip perf data type profiling tests for s390

Thomas Falcon <[email protected]>
perf test: Fix ratio_to_prev event parsing test

Chuck Lever <[email protected]>
perf tools: Fix module symbol resolution for non-zero .text sh_addr

Breno Leitao <[email protected]>
perf stat: Fix crash on arm64

Mike Rapoport (Microsoft) <[email protected]>
memblock: reserve_mem: fix end caclulation in reserve_mem_release_by_name()

Ian Rogers <[email protected]>

    perf stat: Fix opt->value type for parse_cache_level

Ian Rogers <[email protected]>
perf lock: Fix option value type in parse_max_stack

Leo Yan <[email protected]>
tools build: Correct link flags for libopenssl

Biju Das <[email protected]>
pinctrl: renesas: rzg2l: Fix save/restore of {IOLH,IEN,PUPD,SMT} registers

Yu-Chun Lin <[email protected]>
pinctrl: abx500: Fix type of 'argument' variable

Yu-Chun Lin <[email protected]>
pinctrl: realtek: Fix function signature for config argument

Andy Shevchenko <[email protected]>
pinctrl: pinconf-generic: Fully validate 'pinmux' property

Mike Leach <[email protected]>
perf: tools: cs-etm: Fix print issue for Coresight debug in ETE/TRBE trace

Ian Rogers <[email protected]>
perf branch: Avoid incrementing NULL

Andy Shevchenko <[email protected]>
pinctrl: cy8c95x0: Avoid returning positive values to user space

Andy Shevchenko <[email protected]>
pinctrl: cy8c95x0: Unify messages with help of dev_err_probe()

Andy Shevchenko <[email protected]>
pinctrl: cy8c95x0: remove duplicate error message

Ian Rogers <[email protected]>
perf test type profiling: Remote typedef on struct

Felix Gu <[email protected]>
pinctrl: microchip-mssio: Fix missing return in probe

Ian Rogers <[email protected]>
perf trace: Avoid an ERR_PTR in syscall_stats

Ethan Tidmore <[email protected]>
pinctrl: pinctrl-pic32: Fix resource leak

Gabor Juhos <[email protected]>
dt-bindings: pinctrl: marvell,armada3710-xb-pinctrl: add missing items keyword

wangguangju <[email protected]>
perf trace: Fix IS_ERR() vs NULL check bug

Puranjay Mohan <[email protected]>
bpf, arm32: Reject BPF-to-BPF calls and callbacks in the JIT

Puranjay Mohan <[email protected]>
bpf: Validate node_id in arena_alloc_pages()

Jiri Olsa <[email protected]>
libbpf: Prevent double close and leak of btf objects

Yihan Ding <[email protected]>
bpf: allow UTF-8 literals in bpf_bprintf_prepare()

Mykyta Yatsenko <[email protected]>
bpf: Fix NULL deref in map_kptr_match_type for scalar regs

Daniel Borkmann <[email protected]>
bpf: Fix precedence bug in convert_bpf_ld_abs alignment check

Michal Luczaj <[email protected]>
bpf, sockmap: Take state lock for af_unix iter

Michal Luczaj <[email protected]>
bpf, sockmap: Fix af_unix null-ptr-deref in proto update

Michal Luczaj <[email protected]>
bpf, sockmap: Fix af_unix iter deadlock

Puranjay Mohan <[email protected]>
bpf, riscv: Remove redundant bpf_flush_icache() after pack allocator finalize

Puranjay Mohan <[email protected]>
bpf, arm64: Remove redundant bpf_flush_icache() after pack allocator finalize

Daniel Borkmann <[email protected]>
bpf, arm64: Fix off-by-one in check_imm signed range check

Daniel Borkmann <[email protected]>
bpf, arm64: Reject out-of-range B.cond targets

Ye Bin <[email protected]>
ext4: fix possible null-ptr-deref in mbt_kunit_exit()

Ye Bin <[email protected]>
ext4: fix possible null-ptr-deref in extents_kunit_exit()

Ye Bin <[email protected]>
ext4: fix the error handling process in extents_kunit_init).

Ye Bin <[email protected]>
ext4: call deactivate_super() in extents_kunit_exit()

Ye Bin <[email protected]>

    ext4: fix miss unlock 'sb->s_umount' in extents_kunit_init()

Oliver Neukum <[email protected]>
HID: usbhid: fix deadlock in hid_post_reset()

Miquel Raynal <[email protected]>
mtd: spinand: winbond: Clarify when to enable the HS bit

Richard Genoud <[email protected]>
mtd: rawnand: sunxi: fix sunxi_nfc_hw_ecc_read_extra_oob

Li Ming <[email protected]>
cxl/pci: Check memdev driver binding status in cxl_reset_done()

Cosmin Tanislav <[email protected]>
mtd: parsers: ofpart: call of_node_get() for dedicated subpartitions

Cosmin Tanislav <[email protected]>
mtd: parsers: ofpart: call of_node_put() only in ofpart_fail path

Shiji Yang <[email protected]>
mtd: spi-nor: swp: check SR_TB flag when getting tb_mask

Haibo Chen <[email protected]>
mtd: spi-nor: micron-st: add SNOR_CMD_PP_8_8_8_DTR sfdp fixup for mt35xu512aba

Jonas Gorski <[email protected]>
mtd: spi-nor: update spi_nor_fixups::post_sfdp() documentation

Haibo Chen <[email protected]>
mtd: spi-nor: core: correct the op.dummy.nbytes when check read operations

Geert Uytterhoeven <[email protected]>
dt-bindings: interrupt-controller: arm,gic-v3: Fix EPPI range

Dmitry Safonov <[email protected]>
ima_fs: Correctly create securityfs files for unsupported hash algos

Chen Ni <[email protected]>
mtd: physmap_of_gemini: Fix disabled pinctrl state check

Krzysztof Kozlowski <[email protected]>
power: supply: max77705: Free allocated workqueue and fix removal order

Krzysztof Kozlowski <[email protected]>
power: supply: max77705: Drop duplicated IRQ error message

Krzysztof Kozlowski <[email protected]>
workqueue: devres: Add device-managed allocate workqueue

Denis Benato <[email protected]>
HID: asus: do not abort probe when not necessary

Denis Benato <[email protected]>
HID: asus: make asus_resume adhere to linux kernel coding standards

Daniel Hodges <[email protected]>
ima: check return value of crypto_shash_final() in boot aggregate

Chen Ni <[email protected]>
remoteproc: imx_rproc: Check return value of regmap_attach_dev() in imx_rproc_mmio_detect_mode()

Thomas Weißschuh <[email protected]>
stop_machine: Fix the documentation for a NULL cpus argument

Tim Michals <[email protected]>
remoteproc: xlnx: Fix sram property parsing

Francesco Lavra <[email protected]>
hte: tegra194: remove Kconfig dependency on Tegra194 SoC

Pengpeng Hou <[email protected]>
tracing: Rebuild full_name on each hist_field_name() call

Arnd Bergmann <[email protected]>
tracing: move __printf() attribute on __ftrace_vbprintk()

Richard Fitzgerald <[email protected]>
soundwire: cadence: Clear message complete before signaling waiting thread

Frank Li <[email protected]>
dmaengine: mxs-dma: Fix missing return value from of_dma_controller_register()

Bard Liao <[email protected]>
soundwire: Intel: test bus.bpt_stream before assigning it

Cole Leavitt <[email protected]>
soundwire: bus: demote UNATTACHED state warnings to dev_dbg()

Janne Grunau <[email protected]>
phy: apple: apple: Use local variable for ioremap return value

Khairul Anuar Romli <[email protected]>
dmaengine: dw-axi-dmac: Remove unnecessary return statement from void function

Khairul Anuar Romli <[email protected]>
dmaengine: dw-axi-dmac: fix Alignment should match open parenthesis

ZhengYuan Huang <[email protected]>
ocfs2: validate group add input before caching

ZhengYuan Huang <[email protected]>
ocfs2: validate bg_bits during freefrag scan

ZhengYuan Huang <[email protected]>
ocfs2: fix listxattr handling when the buffer is full

Richard Cheng <[email protected]>
fwctl: Fix class init ordering to avoid NULL pointer dereference on device removal

Sebastian Ene <[email protected]>
firmware: arm_ffa: Use the correct buffer size during RXTX_MAP

Frank Li <[email protected]>
ARM: dts: imx27-eukrea: replace interrupts with interrupts-extended

Christian A. Ehrhardt <[email protected]>
lib: kunit_iov_iter: fix memory leaks

Christoph Hellwig <[email protected]>
arm64/xor: fix conflicting attributes for xor_block_template

Aaro Koskinen <[email protected]>
ARM: OMAP1: Fix DEBUG_LL and earlyprintk on OMAP16XX

Alexander Koskovich <[email protected]>

    arm64: dts: qcom: sm8250: Add missing CPU7 3.09GHz OPP

Abel Vesa <[email protected]>
arm64: dts: qcom: milos: Add missing CX power domain to GCC

Alok Tiwari <[email protected]>
soc: qcom: aoss: compare against normalized cooling state

Alok Tiwari <[email protected]>
soc: qcom: llcc: fix v1 SB syndrome register offset

Junrui Luo <[email protected]>
ocfs2/dlm: fix off-by-one in dlm_match_regions() region comparison

Junrui Luo <[email protected]>
ocfs2/dlm: validate qr_numregions in dlm_match_regions()

Michal Grzedzicki <[email protected]>
unshare: fix nsproxy leak in ksys_unshare() on set_cred_ucounts() failure

Jon Hunter <[email protected]>
soc/tegra: pmc: Add kerneldoc for wake-up variables

Jon Hunter <[email protected]>
soc/tegra: pmc: Correct function names in kerneldoc

Jon Hunter <[email protected]>
soc/tegra: pmc: Add kerneldoc for reboot notifier

Jon Hunter <[email protected]>
arm64: tegra: Fix RTC aliases

Sumit Gupta <[email protected]>
soc/tegra: cbb: Fix cross-fabric target timeout lookup

Sumit Gupta <[email protected]>
soc/tegra: cbb: Fix incorrect ARRAY_SIZE in fabric lookup tables

Sumit Gupta <[email protected]>
soc/tegra: cbb: Set ERD on resume for err interrupt

Xu Yang <[email protected]>
arm64: dts: imx8qxp-mek: switch Type-C connector power-role to dual

Xu Yang <[email protected]>
arm64: dts: imx8qm-mek: switch Type-C connector power-role to dual

Josua Mayer <[email protected]>
arm64: dts: lx2160a: complete pinmux for rcwsr12 configuration word

Josua Mayer <[email protected]>
arm64: dts: lx2160a: change zeros to hexadecimal in pinmux nodes

Josua Mayer <[email protected]>
arm64: dts: lx2160a: add sda gpio references for i2c bus recovery

Josua Mayer <[email protected]>
arm64: dts: lx2160a: rename pinmux nodes for readability

Josua Mayer <[email protected]>
arm64: dts: lx2160a: remove duplicate pinmux nodes

Josua Mayer <[email protected]>
arm64: dts: lx2160a: change i2c0 (iic1) pinmux mask to one bit

Liu Ying <[email protected]>
arm64: dts: imx8mp-evk: Specify ADV7535 register addresses

Shengjiu Wang <[email protected]>

    arm64: dts: imx8dxl-evk: Use audio-graph-card2 for wm8960-2 and wm8960-3

Annette Kobou <[email protected]>
arm64: dts: imx8mp-kontron: Fix boot order for PMIC and RTC

Alexander Stein <[email protected]>
arm64: dts: imx91: Remove TMU's superfluous sensor ID

Nora Schiffer <[email protected]>
arm64: dts: freescale: imx8mp-tqma8mpql-mba8mp-ras314: fix UART1 RTS/CTS muxing

Francesco Dolcini <[email protected]>
arm64: dts: ti: k3-am62-verdin: Fix SPI_1 GPIO CS pinctrl label

Judith Mendez <[email protected]>
arm64: dts: ti: k3-am62-lp-sk: Enable internal pulls for MMC0 data pins

Judith Mendez <[email protected]>
arm64: dts: ti: k3-am62l3-evm: Disable MMC1 internal pulls on data pins

Judith Mendez <[email protected]>
arm64: dts: ti: k3-am62p5-sk: Disable MMC1 internal pulls on data pins

Barnabás Czémán <[email protected]>
arm64: dts: qcom: msm8917-xiaomi-riva: Fix board-id for all bootloader

David Heidelberg <[email protected]>
arm64: dts: qcom: sdm845-xiaomi-beryllium: Mark l1a regulator as powered during boot

Luca Weiss <[email protected]>
arm64: dts: qcom: sm7225-fairphone-fp4: Fix conflicting bias pinctrl

Vladimir Zapolskiy <[email protected]>
arm64: dts: qcom: sm8650: Enable UHS-I SDR50 and SDR104 SD card modes

Vladimir Zapolskiy <[email protected]>
arm64: dts: qcom: sm8550: Enable UHS-I SDR50 and SDR104 SD card modes

Vladimir Zapolskiy <[email protected]>
arm64: dts: qcom: sm8450: Enable UHS-I SDR50 and SDR104 SD card modes

Vladimir Zapolskiy <[email protected]>
arm64: dts: qcom: hamoa: Fix xo clock supply of platform SD host controller

Vladimir Zapolskiy <[email protected]>
arm64: dts: qcom: sm8650: Fix xo clock supply of SD host controller

Vladimir Zapolskiy <[email protected]>
arm64: dts: qcom: sm8550: Fix xo clock supply of platform SD host controller

Konrad Dybcio <[email protected]>
arm64: dts: qcom: sm8750: Fix GIC_ITS range length

Konrad Dybcio <[email protected]>
arm64: dts: qcom: sm8650: Fix GIC_ITS range length

Konrad Dybcio <[email protected]>
arm64: dts: qcom: sm8550: Fix GIC_ITS range length

Konrad Dybcio <[email protected]>
arm64: dts: qcom: sm8450: Fix GIC_ITS range length

Konrad Dybcio <[email protected]>
arm64: dts: qcom: milos: Fix GIC_ITS range length

Konrad Dybcio <[email protected]>
arm64: dts: qcom: kaanapali: Fix GIC_ITS range length

Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: sm8750: correct Iris corners for the MXC rail

Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: sm8650: correct Iris corners for the MXC rail

Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: sm8550: correct Iris corners for the MXC rail

Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: monaco: correct Iris corners for the MXC rail

Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: lemans: correct Iris corners for the MXC rail

Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: hamoa: correct Iris corners for the MXC rail

Tobias Heider <[email protected]>
arm64: dts: qcom: add missing denali-oled.dtb to Makefile

Riccardo Mereu <[email protected]>
arm64: dts: qcom: arduino-imola: fix faulty spidev node

Gatien Chevallier <[email protected]>
bus: rifsc: fix RIF configuration check for peripherals

Shawn Lin <[email protected]>
arm64: dts: rockchip: Add mphy reset to ufshc node

谢致邦 (XIE Zhibang) <[email protected]>
arm64: dts: rockchip: Fix RK3562 EVB2 model name

Aurelien Jarno <[email protected]>
riscv: dts: spacemit: drop incorrect pinctrl for combo PHY

Dmitry Baryshkov <[email protected]>
soc: qcom: ocmem: return -EPROBE_DEFER is ocmem is not available

Dmitry Baryshkov <[email protected]>
soc: qcom: ocmem: register reasons for probe deferrals

Dmitry Baryshkov <[email protected]>
soc: qcom: ocmem: make the core clock optional

Chris Morgan <[email protected]>
arm64: dts: rockchip: Correct Joystick Axes on Gameforce Ace

Chris Morgan <[email protected]>
arm64: dts: rockchip: Correct Fan Supply for Gameforce Ace

Robin Murphy <[email protected]>
Revert "arm64: dts: rockchip: add SPDIF audio to Beelink A1"

Ming Wang <[email protected]>
arm64: dts: rockchip: Fix Bluetooth stability on LCKFB TaiShan Pi

Dmitry Baryshkov <[email protected]>
soc: qcom: ubwc: disable bank swizzling for Glymur platform

Mukesh Ojha <[email protected]>
firmware: qcom_scm: don't opencode kmemdup

Barnabás Czémán <[email protected]>
arm64: dts: qcom: msm8953-xiaomi-daisy: fix backlight

Barnabás Czémán <[email protected]>
arm64: dts: qcom: msm8937-xiaomi-land: correct wled ovp value

Barnabás Czémán <[email protected]>
arm64: dts: qcom: msm8953-xiaomi-vince: correct wled ovp value

Miquel Raynal <[email protected]>
ARM: dts: BCM5301X: Drop extra NAND controller compatible

Josua Mayer <[email protected]>
arm64: dts: imx8mp-hummingboard-pulse: fix mini-hdmi dsi port reference

Josua Mayer <[email protected]>
arm64: dts: imx8mp-hummingboard-pulse/cubox-m: fix vmmc gpio polarity

Frieder Schrempf <[email protected]>
arm64: dts: imx8mp-kontron: Drop vmmc-supply to fix SD card on SMARC eval carrier

Frieder Schrempf <[email protected]>
arm64: dts: imx8mp-kontron: Fix touch reset configuration on DL devices

Thorsten Blum <[email protected]>

    iommufd/selftest: Fix page leaks in mock_viommu_{init,destroy}

Akari Tsuyukusa <[email protected]>
arm64: dts: mediatek: mt7986a: Fix gpio-ranges pin count

Akari Tsuyukusa <[email protected]>
arm64: dts: mediatek: mt7981b: Fix gpio-ranges pin count

Akari Tsuyukusa <[email protected]>
arm64: dts: mediatek: mt6795: Fix gpio-ranges pin count

Kendall Willis <[email protected]>
arm64: dts: ti: k3-am62l: include WKUP_UART0 in wakeup peripheral window

Konrad Dybcio <[email protected]>
arm64: dts: qcom: talos: Add missing clock-names to GCC

Hongyang Zhao <[email protected]>

    arm64: dts: qcom: qcs6490-rubikpi3: Use lt9611 DSI Port B

Barnabás Czémán <[email protected]>
arm64: dts: qcom: sm6125-xiaomi-ginkgo: Fix reserved gpio ranges

Barnabás Czémán <[email protected]>
arm64: dts: qcom: sm6125-xiaomi-ginkgo: Remove extcon

Barnabás Czémán <[email protected]>
arm64: dts: qcom: sm6125-xiaomi-ginkgo: Correct reserved memory ranges

Barnabás Czémán <[email protected]>
arm64: dts: qcom: sm6125-xiaomi-ginkgo: Remove board-id

Jacob Pan <[email protected]>
iommufd: vfio compatibility extension check for noiommu mode

Sherry Sun <[email protected]>
arm64: dts: imx8mp-evk: Enable pull select bit for PCIe regulator GPIO (M.2 W_DISABLE1)

Heiko Stuebner <[email protected]>
arm64: dts: rockchip: Make Jaguar PCIe-refclk pin use pull-up config

Frank Wunderlich <[email protected]>
arm64: dts: mediatek: mt7988a-bpi-r4pro: fix model string

Yixun Lan <[email protected]>
riscv: dts: spacemit: pcie: fix missing power regulator

Luke Wang <[email protected]>
arm64: dts: imx91-11x11-evk: change usdhc tuning step for eMMC and SD

Francesco Dolcini <[email protected]>
arm64: dts: imx8-apalis: Fix LEDs name collision

Mikko Perttunen <[email protected]>
memory: tegra30-emc: Fix dll_change check

Mikko Perttunen <[email protected]>
memory: tegra124-emc: Fix dll_change check

Rafał Miłecki <[email protected]>
ARM: dts: mediatek: mt7623: fix efuse fallback compatible

Nícolas F. R. A. Prado <[email protected]>
arm64: dts: mediatek: mt8365: Describe infracfg-nao as a pure syscon

Joshua Klinesmith <[email protected]>
ksmbd: fix use-after-free from async crypto on Qualcomm crypto engine

Thomas Huth <[email protected]>
efi/capsule-loader: fix incorrect sizeof in phys array reallocation

Andreas Gruenbacher <[email protected]>
gfs2: prevent NULL pointer dereference during unmount

Andreas Gruenbacher <[email protected]>
gfs2: add some missing log locking

Arnd Bergmann <[email protected]>

    vfio: unhide vdev->debug_root

Jan Kara <[email protected]>
quota: Fix race of dquot_scan_active() with quota deactivation

Andreas Gruenbacher <[email protected]>
gfs2: less aggressive low-memory log flushing

Ted Logan <[email protected]>
vfio: selftests: Build tests on aarch64

Tomas Glozar <[email protected]>
rtla: Fix segfault on multiple SIGINTs

Costa Shulyupin <[email protected]>
tools/rtla: Generate optstring from long options

Wander Lairson Costa <[email protected]>
rtla/utils: Fix resource leak in set_comm_sched_attr()

Wander Lairson Costa <[email protected]>
rtla/trace: Fix write loop in trace_event_save_hist()

Wander Lairson Costa <[email protected]>
rtla: Use str_has_prefix() for prefix checks

Wander Lairson Costa <[email protected]>
rtla: Simplify code by caching string lengths

Alex Mastro <[email protected]>
vfio: selftests: fix crash in vfio_dma_mapping_mmio_test

Ricardo B. Marlière <[email protected]>
ktest: Run POST_KTEST hooks on failure and cancellation

Ricardo B. Marlière <[email protected]>
ktest: Honor empty per-test option overrides

Ricardo B. Marlière <[email protected]>
ktest: Avoid undef warning when WARNINGS_FILE is unset

Luis Henriques <[email protected]>
fuse: fix uninit-value in fuse_dentry_revalidate()

Jingbo Xu <[email protected]>
fuse: fix premature writetrhough request for large folio

Ondrej Mosnacek <[email protected]>
fanotify: call fanotify_events_supported() before path_permission() and security_path_notify()

Ondrej Mosnacek <[email protected]>
fanotify: avoid/silence premature LSM capability checks

Andreas Gruenbacher <[email protected]>
gfs2: Call unlock_new_inode before d_instantiate

Kailang Yang <[email protected]>
ALSA: hda/realtek - fixed speaker no sound update

Geoffrey D. Bennett <[email protected]>
ALSA: usb-audio: Exclude Scarlett 18i20 1st Gen from SKIP_IFACE_SETUP

Haixin Xu <[email protected]>
crypto: jitterentropy - replace long-held spinlock with mutex

Miquel Raynal <[email protected]>
spi: cadence-qspi: Revert the filtering of certain opcodes in ODTR

Tejun Heo <[email protected]>
sched_ext: Fix ops.cgroup_move() invocation kf_mask and rq tracking

Tejun Heo <[email protected]>

    sched_ext: Track @p's rq lock across set_cpus_allowed_scx -> ops.set_cpumask

Ming-Hung Tsai <[email protected]>
dm cache: fix missing return in invalidate_committed's error path

Cássio Gabriel <[email protected]>
ALSA: sc6000: Keep the programmed board state in card-private data

Pei Xiao <[email protected]>
spi: mtk-snfi: unregister ECC engine on probe failure and remove() callback

Lad Prabhakar <[email protected]>
spi: rzv2h-rspi: Fix invalid SPR=0/BRDV=0 clock configuration

Richard Fitzgerald <[email protected]>
ASoC: SDCA: Fix cleanup inversion in class driver

Yao Zi <[email protected]>
PCI: sg2042: Avoid L0s and L1 on Sophgo 2042 PCIe Root Ports

Yao Zi <[email protected]>
PCI: cadence: Add flags for disabling ASPM capability for broken Root Ports

Bart Van Assche <[email protected]>
drm/fb-helper: Fix a locking bug in an error path

Manikanta Maddireddy <[email protected]>
PCI: tegra194: Fix CBB timeout caused by DBI access before core power-on

Vidya Sagar <[email protected]>
PCI: tegra194: Disable L1.2 capability of Tegra234 EP

Manikanta Maddireddy <[email protected]>
PCI: dwc: Apply ECRC workaround to DesignWare 5.00a as well

Manikanta Maddireddy <[email protected]>
PCI: tegra194: Use DWC IP core version

Vidya Sagar <[email protected]>
PCI: tegra194: Free up Endpoint resources during remove()

Vidya Sagar <[email protected]>
PCI: tegra194: Allow system suspend when the Endpoint link is not up

Vidya Sagar <[email protected]>
PCI: tegra194: Set LTR message request before PCIe link up in Endpoint mode

Vidya Sagar <[email protected]>
PCI: tegra194: Disable direct speed change for Endpoint mode

Vidya Sagar <[email protected]>
PCI: tegra194: Use devm_gpiod_get_optional() to parse "nvidia,refclk-select"

Manikanta Maddireddy <[email protected]>
PCI: tegra194: Disable PERST# IRQ only in Endpoint mode

Vidya Sagar <[email protected]>
PCI: tegra194: Don't force the device into the D0 state before L2

Manikanta Maddireddy <[email protected]>
PCI: tegra194: Disable LTSSM after transition to Detect on surprise link down

Manikanta Maddireddy <[email protected]>
PCI: tegra194: Increase LTSSM poll time on surprise link down

Vidya Sagar <[email protected]>
PCI: tegra194: Fix polling delay for L2 state

songxiebing <[email protected]>
ALSA: usb-audio: qcom: Fix incorrect type in enable_audio_stream

Syed Saba Kareem <[email protected]>
ASoC: amd: ps: fix the pcm device numbering for acp pdm dmic

Kuninori Morimoto <[email protected]>
ASoC: amd: name back to pcm_new()/pcm_free()

Kuninori Morimoto <[email protected]>
ASoC: soc-component: re-add pcm_new()/pcm_free()

Cheng-Yang Chou <[email protected]>
tools/sched_ext: Fix off-by-one in scx_sdt payload zeroing

Richard Cheng <[email protected]>
PCI/NPEM: Set LED_HW_PLUGGABLE for hotplug-capable ports

Cássio Gabriel <[email protected]>
ASoC: SOF: compress: return the configured codec from get_params

Ravi Hothi <[email protected]>
ASoC: qcom: audioreach: explicitly enable speaker protection modules

Panagiotis Petrakopoulos <[email protected]>
ALSA: scarlett2: Add missing sentinel initializer field

David Carlier <[email protected]>
gpu: nova-core: fix missing colon in SEC2 boot debug message

Gary Guo <[email protected]>
gpu: nova-core: remove redundant .as_ref() for dev_* print

Waiman Long <[email protected]>
selftest: memcg: skip memcg_sock test if address family not supported

Sergey Senozhatsky <[email protected]>
zram: do not permit params change after init

SeongJae Park <[email protected]>

    Docs/mm/damon/index: fix typo: autoamted -> automated

SeongJae Park <[email protected]>
Docs/admin-guide/mm/damn/lru_sort: fix intervals autotune parameter name

Jane Chu <[email protected]>
Documentation: fix a hugetlbfs reservation statement

AnishMulay <[email protected]>
selftests/mm: skip migration tests if NUMA is unavailable

Eliot Courtney <[email protected]>
gpu: nova-core: bitfield: fix broken Default implementation

Chen-Yu Tsai <[email protected]>
PCI: mediatek-gen3: Prevent leaking IRQ domains when IRQ not found

Richard Zhu <[email protected]>
dt-bindings: PCI: imx6q-pcie: Fix maxItems of clocks and clock-names

Felix Gu <[email protected]>
PCI: aspeed: Fix IRQ domain leak on platform_get_irq() failure

Richard Zhu <[email protected]>
PCI: imx6: Keep Root Port MSI capability with iMSI-RX to work around hardware bug

Gerd Bayer <[email protected]>
PCI: Enable AtomicOps only if Root Port supports them

Denis Rastyogin <[email protected]>

    ASoC: rsnd: Fix potential out-of-bounds access of component_dais[]

Cássio Gabriel <[email protected]>
ALSA: hda: Notify IEC958 Default PCM switch state changes

Giovanni Cabiddu <[email protected]>
crypto: qat - use swab32 macro

Giovanni Cabiddu <[email protected]>
crypto: iaa - fix per-node CPU counter reset in rebalance_wq_table()

Giovanni Cabiddu <[email protected]>
crypto: qat - fix type mismatch in RAS sysfs show functions

Giovanni Cabiddu <[email protected]>
crypto: qat - fix compression instance leak

Ahsan Atta <[email protected]>

    crypto: qat - disable 420xx AE cluster when lead engine is fused off

Ahsan Atta <[email protected]>
crypto: qat - disable 4xxx AE cluster when lead engine is fused off

Hans Zhang <[email protected]>
PCI: dwc: Fix type mismatch for kstrtou32_from_user() return value

Srinivas Kandagatla <[email protected]>
ASoC: qcom: qdsp6: topology: check widget type before accessing data

Jason Gunthorpe <[email protected]>
iommu/riscv: Remove overflows on the invalidation path

Vasant Hegde <[email protected]>
iommu/amd: Fix clone_alias() to use the original device's devid

Shengjiu Wang <[email protected]>
ASoC: fsl_easrc: Change the type for iec958 channel status controls

Shengjiu Wang <[email protected]>
ASoC: fsl_easrc: Fix value type in fsl_easrc_iec958_get_bits()

Shengjiu Wang <[email protected]>
ASoC: fsl_easrc: Check the variable range in fsl_easrc_iec958_put_bits()

Shengjiu Wang <[email protected]>
ASoC: fsl_xcvr: Fix event generation in fsl_xcvr_mode_put()

Shengjiu Wang <[email protected]>
ASoC: fsl_xcvr: Fix event generation in fsl_xcvr_arc_mode_put()

Shengjiu Wang <[email protected]>
ASoC: fsl_micfil: Fix event generation in micfil_quality_set()

Shengjiu Wang <[email protected]>
ASoC: fsl_micfil: Fix event generation in micfil_put_dc_remover_state()

Shengjiu Wang <[email protected]>
ASoC: fsl_micfil: Fix event generation in micfil_range_set()

Shengjiu Wang <[email protected]>
ASoC: fsl_micfil: Fix event generation in hwvad_put_init_mode()

Shengjiu Wang <[email protected]>
ASoC: fsl_micfil: Fix event generation in hwvad_put_enable()

Shengjiu Wang <[email protected]>
ASoC: fsl_micfil: Add access property for "VAD Detected"

Dmitry Baryshkov <[email protected]>

    drm/msm/dpu: drop INTF_0 on MSM8953

Dmitry Baryshkov <[email protected]>
PM: domains: De-constify fields in struct dev_pm_domain_attach_data

Felix Gu <[email protected]>

    pmdomain: imx: scu-pd: Fix device_node reference leak during ->probe()

Felix Gu <[email protected]>
pmdomain: ti: omap_prm: Fix a reference leak on device node

wangdicheng <[email protected]>
ALSA: hda/cmedia: Remove duplicate pin configuration parsing

Akhil P Oommen <[email protected]>
drm/msm/a6xx: Fix gpu init from secure world

Akhil P Oommen <[email protected]>
drm/msm/adreno: Implement gx_is_on() for A8x

Akhil P Oommen <[email protected]>
drm/msm/a6xx: Correct OOB usage

Akhil P Oommen <[email protected]>
drm/msm/a6xx: Switch to preemption safe AO counter

Akhil P Oommen <[email protected]>
drm/msm/a8xx: Fix the ticks used in submit traces

Akhil P Oommen <[email protected]>
drm/msm/a6xx: Use barriers while updating HFI Q headers

Connor Abbott <[email protected]>
drm/msm/a6xx: Fix dumping A650+ debugbus blocks

Rob Clark <[email protected]>
drm/msm/shrinker: Fix can_block() logic

Rob Clark <[email protected]>
drm/msm/a6xx: Fix HLSQ register dumping

Rob Clark <[email protected]>
drm/msm: Fix VM_BIND UNMAP locking

Rob Clark <[email protected]>
drm/msm: Reject fb creation from _NO_SHARE objs

Rob Clark <[email protected]>
drm/msm/a6xx: Add missing aperture_lock init

Rob Clark <[email protected]>
drm/msm/vma: Avoid lock in VM_BIND fence signaling path

Ethan Tidmore <[email protected]>
ASoC: SOF: Intel: hda: Place check before dereference

Lei Huang <[email protected]>
ALSA: hda/realtek: fix code style (ERROR: else should follow close brace '}')

Lei Huang <[email protected]>
ALSA: hda/realtek: fix bad indentation for alc269

Billy Tsai <[email protected]>
hwmon: (aspeed-g6-pwm-tach): remove redundant driver remove callback

Kuppuswamy Sathyanarayanan <[email protected]>
PCI/DPC: Log AER error info for DPC/EDR uncorrectable errors

Timur Kristóf <[email protected]>
drm/amdgpu/uvd4.2: Don't initialize UVD 4.2 when DPM is disabled

Timur Kristóf <[email protected]>
drm/amd/pm/smu7: Add SCLK cap for quirky Hawaii board

Timur Kristóf <[email protected]>
drm/amd/pm/ci: Fill DW8 fields from SMC

Timur Kristóf <[email protected]>
drm/amd/pm/ci: Clear EnabledForActivity field for memory levels

Timur Kristóf <[email protected]>

    drm/amd/pm/ci: Fix powertune defaults for Hawaii 0x67B0

Timur Kristóf <[email protected]>
drm/amd/pm/smu7: Fix SMU7 voltage dependency on display clock

Timur Kristóf <[email protected]>
drm/amd/pm/ci: Disable MCLK DPM on problematic CI ASICs

Timur Kristóf <[email protected]>
drm/amd/pm/ci: Use highest MCLK on CI when MCLK DPM is disabled

Vijendar Mukunda <[email protected]>
ASoC: amd: acp: update dmic_num logic for acp pdm dmic

Srinivasan Shanmugam <[email protected]>
drm/amd/display: Avoid NULL dereference in dc_dmub_srv error paths

Cássio Gabriel <[email protected]>
ALSA: core: Validate compress device numbers without dynamic minors

Ethan Tidmore <[email protected]>
iommu/riscv: Fix signedness bug

Ilpo Järvinen <[email protected]>
PCI: Fix alignment calculation for resource size larger than align

Wenkai Lin <[email protected]>
crypto: hisilicon/sec2 - prevent req used-after-free for sec

Ilpo Järvinen <[email protected]>
PCI: Fix premature removal from realloc_head list during resource assignment

Ilpo Järvinen <[email protected]>
PCI: Prevent shrinking bridge window from its required size

Krishna Chaitanya Chundru <[email protected]>
PCI: qcom: Advertise Hotplug Slot Capability with no Command Completion support

Sebastian Reichel <[email protected]>
drm/panel: simple: Correct G190EAN01 prepare timing

Dmitry Baryshkov <[email protected]>
drm/panel: sharp-ls043t1le01: make use of prepare_prev_first

Zhao Mengmeng <[email protected]>
tools/sched_ext: scx_pair: fix pair_ctx indexing for CPU pairs

Alexey Charkov <[email protected]>
ASoC: rockchip: rockchip_sai: Set slot width for non-TDM mode

Alexander Koskovich <[email protected]>

    drm/msm/dsi: rename MSM8998 DSI version from V2_2_0 to V2_0_0

Pengyu Luo <[email protected]>
drm/msm/dsi: fix hdisplay calculation for CMD mode panel

Pengyu Luo <[email protected]>
drm/msm/dsi: fix bits_per_pclk

Dmitry Baryshkov <[email protected]>
drm/msm/dpu: don't try using 2 LMs if only one DSC is available

Pengyu Luo <[email protected]>
drm/msm/dsi: add the missing parameter description

Yuanjie Yang <[email protected]>
drm/msm/dpu: fix mismatch between power and frequency

Dmitry Baryshkov <[email protected]>
drm/msm: add missing MODULE_DEVICE_ID definitions

Nicolin Chen <[email protected]>
iommu/tegra241-cmdqv: Update uAPI to clarify HYP_OWN requirement

Nicolin Chen <[email protected]>
iommu/tegra241-cmdqv: Set supports_cmd op in tegra241_vcmdq_hw_init()

Alexandru Dadu <[email protected]>
drm/imagination: Switch reset_reason fields from enum to u32

Felix Gu <[email protected]>
PCI: sky1: Fix missing cleanup of ECAM config on probe failure

Pei Xiao <[email protected]>
spi: hisi-kunpeng: prevent infinite while() loop in hisi_spi_flush_fifo

Alex Deucher <[email protected]>
drm/amdgpu/gfx11: look at the right prop for gfx queue priority

Alex Deucher <[email protected]>
drm/amdgpu/gfx10: look at the right prop for gfx queue priority

Srinivasan Shanmugam <[email protected]>
drm/amd/ras: Remove redundant NULL check in pending bad-bank list iteration

haoyu.lu <[email protected]>
accel/amdxdna: fix missing newline in pr_err message

Koichiro Den <[email protected]>
PCI: dwc: rcar-gen4: Change EPC BAR alignment to 4K as per the documentation

Daniel Jordan <[email protected]>
padata: Put CPU offline callback in ONLINE section to allow failure

Chuyi Zhou <[email protected]>
padata: Remove cpu online check from cpu add and removal

Thorsten Blum <[email protected]>
crypto: atmel-aes - guard unregister on error in atmel_aes_register_algs

Herbert Xu <[email protected]>
crypto: tegra - Disable softirqs before finalizing request

Wesley Atwell <[email protected]>
crypto: simd - reject compat registrations without __ prefixes

Andy Shevchenko <[email protected]>
fbdev: matroxfb: Mark variable with __maybe_unused to avoid W=1 build break

Guillaume Gonnet <[email protected]>
dm init: ensure device probing has finished in dm-mod.waitfor=

Srinivasan Shanmugam <[email protected]>
drm/amdgpu: Remove dead negative offset check in amdgpu_virt_init_critical_region()

Srinivasan Shanmugam <[email protected]>
drm/amdgpu: Drop redundant queue NULL check in hang detect worker

Srinivasan Shanmugam <[email protected]>
drm/amd/ras: Fix NULL deref in ras_core_get_utc_second_timestamp()

Robby Cai <[email protected]>
regulator: fp9931: Fix handling of mandatory "vin" supply

Robby Cai <[email protected]>
regulator: dt-bindings: fp9931: Make vin-supply property as required

Srinivasan Shanmugam <[email protected]>
drm/amdgpu: Add default case in DVI mode validation

Srinivasan Shanmugam <[email protected]>
drm/amd/ras: Fix NULL deref in ras_core_ras_interrupt_detected()

Philip Yang <[email protected]>
drm/amdkfd: Update queue properties for metadata ring

Fangyu Yu <[email protected]>
iommu/riscv: Stop polling when CQCSR reports an error

Jason Gunthorpe <[email protected]>
iommu/riscv: Add missing GENERIC_MSI_IRQ

Yaxing Guo <[email protected]>
iommu/riscv: Skip IRQ count check when using MSI interrupts

Fangyu Yu <[email protected]>
iommu/riscv: Add IOTINVAL after updating DDT/PDT entries

John Madieu <[email protected]>
dt-bindings: PCI: renesas,r9a08g045s33-pcie: Fix naming properties

John Madieu <[email protected]>
PCI: rzg3s-host: Reorder reset assertion during suspend

John Madieu <[email protected]>
PCI: rzg3s-host: Fix reset handling in probe error path

Aleksander Jan Bajkowski <[email protected]>
crypto: inside-secure/eip93 - register hash before authenc algorithms

Ethan Tidmore <[email protected]>
drm/sun4i: Fix resource leaks

Maíra Canal <[email protected]>
drm/v3d: Handle error from drm_sched_entity_init()

David Carlier <[email protected]>
selftests/sched_ext: Add missing error check for exit__load()

Pei Xiao <[email protected]>
spi: atcspi200: fix mutex initialization order

Lijo Lazar <[email protected]>
drm/amd/pm: Fix xgmi max speed reporting

Geert Uytterhoeven <[email protected]>
media: synopsys: VIDEO_DW_MIPI_CSI2RX should depend on ARCH_ROCKCHIP

Vladimir Zapolskiy <[email protected]>
media: i2c: og01a1b: Fix V4L2 subdevice data initialization on probe

Felix Gu <[email protected]>
spi: axiado: Remove redundant pm_runtime_mark_last_busy() call

Felix Gu <[email protected]>
spi: fsl-qspi: Use reinit_completion() for repeated operations

Felix Gu <[email protected]>
spi: nxp-fspi: Use reinit_completion() for repeated operations

Felix Gu <[email protected]>
spi: nxp-xspi: Use reinit_completion() for repeated operations

Harikrishna Shenoy <[email protected]>
drm/bridge: cadence: cdns-mhdp8546-core: Handle HDCP state in bridge atomic check

Jayesh Choudhary <[email protected]>
drm/bridge: cadence: cdns-mhdp8546-core: Add mode_valid hook to drm_bridge_funcs

Jayesh Choudhary <[email protected]>
drm/bridge: cadence: cdns-mhdp8546-core: Set the mhdp connector earlier in atomic_enable()

Randy Dunlap <[email protected]>
iopoll: fix function parameter names in read_poll_timeout_atomic()

Junrui Luo <[email protected]>
dm log: fix out-of-bounds write due to region_count overflow

Ming-Hung Tsai <[email protected]>
dm cache metadata: fix memory leak on metadata abort retry

Manivannan Sadhasivam <[email protected]>
PCI: dwc: Perform cleanup in the error path of dw_pcie_resume_noirq()

Aksh Garg <[email protected]>
PCI: dwc: ep: Mirror the max link width and speed fields to all functions

Aksh Garg <[email protected]>
PCI: dwc: ep: Fix MSI-X Table Size configuration in dw_pcie_ep_set_msix()

Alexandre Courbot <[email protected]>
gpu: nova-core: firmware: fix and explain v2 header offsets computations

Alexandre Courbot <[email protected]>
gpu: nova-core: falcon: rename load parameters to reflect DMA dependency

Alexandre Courbot <[email protected]>
gpu: nova-core: create falcon firmware DMA objects lazily

Joel Fernandes <[email protected]>
gpu: nova-core: use checked arithmetic in FWSEC firmware parsing

Rafael J. Wysocki <[email protected]>
platform/chrome: chromeos_tbmc: Drop wakeup source on remove

Philip Yang <[email protected]>
drm/amdgpu: GFX12.1 scratch memory limit up to 57-bit

Huan He <[email protected]>
dt-bindings: mmc: dwcmshc-sdhci: Fix resets array validation

Kees Cook <[email protected]>
drm/amd/ras: Fix type size of remainder argument

Benjamin Marzinski <[email protected]>
dm-mpath: don't stop probing paths at presuspend

Ming-Hung Tsai <[email protected]>
dm cache: fix dirty mapping checking in passthrough mode switching

Ming-Hung Tsai <[email protected]>
dm cache: fix concurrent write failure in passthrough mode

Ming-Hung Tsai <[email protected]>
dm cache policy smq: fix missing locks in invalidating cache blocks

Ming-Hung Tsai <[email protected]>
dm cache: fix write hang in passthrough mode

Ming-Hung Tsai <[email protected]>
dm cache: fix write path cache coherency in passthrough mode

Ming-Hung Tsai <[email protected]>
dm cache: fix null-deref with concurrent writes in passthrough mode

Sander Vanheule <[email protected]>
ASoC: sti: use managed regmap_field allocations

Sander Vanheule <[email protected]>
ASoC: sti: Return errors from regmap_field_alloc()

Aleksander Jan Bajkowski <[email protected]>
crypto: inside-secure/eip93 - fix register definition

Charles Keepax <[email protected]>
ASoC: SDCA: Update counting of SU/GE DAPM routes

Charles Keepax <[email protected]>
ASoC: SDCA: Add default value for mipi-sdca-function-reset-max-delay

Felix Gu <[email protected]>
PCI: imx6: Fix device node reference leak in imx_pcie_probe()

Andrew Martin <[email protected]>
drm/amdkfd: Removed commented line for MQD queue priority

Eliot Courtney <[email protected]>
gpu: nova-core: gsp: fix improper handling of empty slot in cmdq

Eliot Courtney <[email protected]>
gpu: nova-core: gsp: use empty slices instead of [0..0] ranges

Matt Roper <[email protected]>

    drm/xe/xe2_hpg: Drop invalid workaround Wa_15010599737

Matt Roper <[email protected]>
drm/xe: Consolidate workaround entries for Wa_14019386621

Matt Roper <[email protected]>
drm/xe: Consolidate workaround entries for Wa_14019877138

Ethan Tidmore <[email protected]>
drm/sun4i: backend: fix error pointer dereference

Jernej Skrabec <[email protected]>
drm/sun4i: mixer: Fix layer init code

Koichiro Den <[email protected]>
PCI: endpoint: pci-ep-msi: Fix error unwind and prevent double alloc

Koichiro Den <[email protected]>
PCI: endpoint: pci-epf-test: Don't free doorbell IRQ unless requested

Koichiro Den <[email protected]>
PCI: endpoint: pci-epf-vntb: Fix MSI doorbell IRQ unwind

George Abraham P <[email protected]>
PCI/TPH: Allow TPH enable for RCiEPs

Kuninori Morimoto <[email protected]>
ASoC: soc-compress: use function to clear symmetric params

Val Packett <[email protected]>
drm/virtio: Allow importing prime buffers when 3D is enabled

Maciej Patelczyk <[email protected]>
drm/gpusvm: Fix unbalanced unlock in drm_gpusvm_scan_mm()

Tvrtko Ursulin <[email protected]>
dma-fence: Fix sparse warnings due __rcu annotations

Alexander Konyukhov <[email protected]>
drm/komeda: fix integer overflow in AFBC framebuffer size check

Yuwen Chen <[email protected]>
selftests/futex: Fix incorrect result reporting of futex_requeue test item

Maíra Canal <[email protected]>
drm/panel: ilitek-ili9882t: Select DRM_DISPLAY_DSC_HELPER

Lorenzo Bianconi <[email protected]>
net: airoha: Add missing PPE configurations in airoha_ppe_hw_init()

Lorenzo Bianconi <[email protected]>
net: airoha: Fix VIP configuration for AN7583 SoC

Jiayuan Chen <[email protected]>
net, bpf: fix null-ptr-deref in xdp_master_redirect() for down master

Christian Brauner <[email protected]>
selftests/namespaces: remove unused utils.h include from listns_efault_test

Xin Long <[email protected]>
sctp: disable BH before calling udp_tunnel_xmit_skb()

Xin Long <[email protected]>
sctp: fix missing encap_port propagation for GSO fragments

Kuniyuki Iwashima <[email protected]>

    tcp: Don't set treq->req_usec_ts in cookie_tcp_reqsk_init().

Gabriel Krisman Bertazi <[email protected]>
udp: Force compute_score to always inline

Maxime Chevallier <[email protected]>
net: phy: qcom: at803x: Use the correct bit to disable extended next page

Stefan Metzmacher <[email protected]>

    Bluetooth: SCO: check for codecs->num_codecs == 1 before assigning to sco_pi(sk)->codec

Dudu Lu <[email protected]>
Bluetooth: l2cap: Add missing chan lock in l2cap_ecred_reconf_rsp

Pauli Virtanen <[email protected]>
Bluetooth: fix locking in hci_conn_request_evt() with HCI_PROTO_DEFER

Jonathan Rissanen <[email protected]>
Bluetooth: hci_ldisc: Clear HCI_UART_PROTO_INIT on error

Luiz Augusto von Dentz <[email protected]>
Bluetooth: L2CAP: Fix printing wrong information if SDU length exceeds MTU

Sun Jian <[email protected]>
bpf: reject short IPv4/IPv6 inputs in bpf_prog_test_run_skb

Konstantin Khorenko <[email protected]>
net: fix skb_ext_total_length() BUILD_BUG_ON with CONFIG_GCOV_PROFILE_ALL

Daniel Golle <[email protected]>
net: ethernet: mtk_eth_soc: initialize PPE per-tag-layer MTU registers

Gal Pressman <[email protected]>
net/mlx5e: IPsec, fix ASO poll timeout with read_poll_timeout_atomic()

Gal Pressman <[email protected]>
net/mlx5e: Fix features not applied during netdev registration

Charles Perry <[email protected]>
net: phy: fix a return path in get_phy_c45_ids()

Josua Mayer <[email protected]>
dt-bindings: net: dsa: nxp,sja1105: make spi-cpol optional for sja1110

Luca Weiss <[email protected]>
net: ipa: Fix decoding EV_PER_EE for IPA v5.0+

Luca Weiss <[email protected]>
net: ipa: Fix programming of QTIME_TIMESTAMP_CFG

Taegu Ha <[email protected]>
ppp: require CAP_NET_ADMIN in target netns for unattached ioctls

Lang Xu <[email protected]>
bpf: Fix OOB in pcpu_init_value

Greg Jumper <[email protected]>
net/rds: Restrict use of RDS/IB to the initial network namespace

Håkon Bugge <[email protected]>
net/rds: Optimize rds_ib_laddr_check

Paul Chaignon <[email protected]>
selftests/bpf: Fix reg_bounds to match new tnum-based refinement

Emil Tsalapatis <[email protected]>
bpf: Allow instructions with arena source and non-arena dest registers

Jiayuan Chen <[email protected]>
bpf: Fix same-register dst/src OOB read and pointer leak in sock_ops

Fernando Fernandez Mancera <[email protected]>
net_sched: fix skb memory leak in deferred qdisc drops

Lorenzo Bianconi <[email protected]>
net: airoha: Add missing RX_CPU_IDX() configuration in airoha_qdma_cleanup_rx_queue()

Erni Sri Satya Vennela <[email protected]>
net: mana: Move current_speed debugfs file to mana_init_port()

Erni Sri Satya Vennela <[email protected]>
net: mana: Use pci_name() for debugfs directory naming

Florian Westphal <[email protected]>
selftests: netfilter: nft_tproxy.sh: adjust to socat changes

Jamal Hadi Salim <[email protected]>
net/sched: act_ct: Only release RCU read lock after ct_ft

Davide Caratti <[email protected]>
net/sched: cls_fw: fix NULL dereference of "old" filters before change()

Eduard Zingerman <[email protected]>
selftests/bpf: fix __jited_unpriv tag name

Daniel Borkmann <[email protected]>
bpf: Enforce regsafe base id consistency for BPF_ADD_CONST scalars

Lorenzo Bianconi <[email protected]>
net: airoha: Fix FE_PSE_BUF_SET configuration if PPE2 is available

Mashiro Chen <[email protected]>
net: hamradio: 6pack: fix uninit-value in sixpack_receive_buf

Sechang Lim <[email protected]>
bpf: Fix RCU stall in bpf_fd_array_map_clear()

Puranjay Mohan <[email protected]>
bpf: return VMA snapshot from task_vma iterator

Puranjay Mohan <[email protected]>
bpf: switch task_vma iterator from mmap_lock to per-VMA locks

Puranjay Mohan <[email protected]>
bpf: fix mm lifecycle in open-coded task_vma iterator

Florian Westphal <[email protected]>
netfilter: nft_fwd_netdev: check ttl/hl before forwarding

Florian Westphal <[email protected]>
netfilter: xt_socket: enable defrag after all other checks

Mohsin Bashir <[email protected]>
eth: fbnic: Use wake instead of start

Lorenzo Bianconi <[email protected]>
net: airoha: Add dma_rmb() and READ_ONCE() in airoha_qdma_rx_process()

Justin Chen <[email protected]>
net: bcmgenet: fix racing timeout handler

Justin Chen <[email protected]>
net: bcmgenet: fix leaking free_bds

Justin Chen <[email protected]>
net: bcmgenet: fix off-by-one in bcmgenet_put_txcb

Cosmin Ratiu <[email protected]>
macsec: Support VLAN-filtering lower devices

Jiayuan Chen <[email protected]>
bpf: Fix use-after-free in offloaded map/prog info fill

Paolo Abeni <[email protected]>
mptcp: better mptcp-level RTT estimator

Daniel Borkmann <[email protected]>
bpf: Remove static qualifier from local subprog pointer

Daniel Borkmann <[email protected]>
bpf: Fix ld_{abs,ind} failure path analysis in subprogs

Daniel Borkmann <[email protected]>
bpf: Propagate error from visit_tailcall_insn

Wang Wensheng <[email protected]>
arm64: kexec: Remove duplicate allocation for trans_pgd

Haoyu Lu <[email protected]>
ACPI: AGDI: fix missing newline in error message

Mark Rutland <[email protected]>
arm64: entry: Don't preempt with SError or Debug masked

Eric Dumazet <[email protected]>
net: pull headers in qdisc_pkt_len_segs_init()

Eric Dumazet <[email protected]>
net: qdisc_pkt_len_segs_init() cleanup

Eric Dumazet <[email protected]>
net: plumb drop reasons to __dev_queue_xmit()

Eric Dumazet <[email protected]>
net: dropreason: add SKB_DROP_REASON_RECURSION_LIMIT

Daniel Borkmann <[email protected]>

    bpf: Fix linked reg delta tracking when src_reg == dst_reg

Baochen Qiang <[email protected]>
wifi: ath10k: fix station lookup failure during disconnect

Andrey Grodzovsky <[email protected]>
bpf: Prefer vmlinux symbols over module symbols for unqualified kprobes

Weiming Shi <[email protected]>
bpf: reject negative CO-RE accessor indices in bpf_core_parse_spec()

Jiayuan Chen <[email protected]>
bpf: Drop task_to_inode and inet_conn_established from lsm sleepable hooks

Nicolas Escande <[email protected]>
wifi: mac80211: handle VHT EXT NSS in ieee80211_determine_our_sta_mode()

Ethan Tidmore <[email protected]>
wifi: brcmfmac: Fix error pointer dereference

Arnd Bergmann <[email protected]>
net: ethernet: ti-cpsw: fix linking built-in code to modules

Arnd Bergmann <[email protected]>
net: ethernet: ti-cpsw:: rename soft_reset() function

MingTao Huang <[email protected]>

    bpf: Fix stale offload->prog pointer after constant blinding

Weiming Shi <[email protected]>
bpf: fix end-of-list detection in cgroup_storage_get_next_key()

Mykyta Yatsenko <[email protected]>
bpf: Use copy_map_value_locked() in alloc_htab_elem() for BPF_F_LOCK

Eric Dumazet <[email protected]>

    macvlan: annotate data-races around port->bc_queue_len_used

Leon Hwang <[email protected]>
bpf: Fix abuse of kprobe_write_ctx via freplace

Amit Machhiwal <[email protected]>
selftests/powerpc: Suppress -Wmaybe-uninitialized with GCC 15

Sourabh Jain <[email protected]>
powerpc/crash: Update backup region offset in elfcorehdr on memory hotplug

Sourabh Jain <[email protected]>
powerpc/crash: fix backup region offset update to elfcorehdr

Masami Hiramatsu (Google) <[email protected]>
selftests/tracing: Fix to check awk supports non POSIX strtonum()

Masami Hiramatsu (Google) <[email protected]>
selftests/tracing: Fix to make --logdir option work again

Chih Kai Hsu <[email protected]>
r8152: fix incorrect register write to USB_UPHY_XTAL

Ritesh Harjani (IBM) <[email protected]>
drivers/vfio_pci_core: Change PXD_ORDER check from switch case to if/else block

Alexey Velichayshiy <[email protected]>
wifi: rtw89: phy: fix uninitialized variable access in rtw89_phy_cfo_set_crystal_cap()

haoyu.lu <[email protected]>
bpf,arc_jit: Fix missing newline in pr_err messages

Ben Horgan <[email protected]>
arm_mpam: Reset when feature configuration bit unset

Zeng Heng <[email protected]>
arm_mpam: Ensure in_reset_state is false after applying configuration

Alexei Starovoitov <[email protected]>
bpf: Fix variable length stack write over spilled pointers

David Carlier <[email protected]>
bpf: Use RCU-safe iteration in dev_map_redirect_multi() SKB path

Jiayuan Chen <[email protected]>
selftests/bpf: Fix sockmap_multi_channels reliability

Keisuke Nishimura <[email protected]>
bpf: Fix refcount check in check_struct_ops_btf_id()

Peter Chiu <[email protected]>
wifi: mt76: mt7996: fix RRO EMU configuration

Chad Monroe <[email protected]>
wifi: mt76: support upgrading passive scans to active

Chad Monroe <[email protected]>
wifi: mt76: fix multi-radio on-channel scanning

Lorenzo Bianconi <[email protected]>
wifi: mt76: mt7996: Decrement sta counter removing the link in mt7996_mac_reset_sta_iter()

Lorenzo Bianconi <[email protected]>
wifi: mt76: mt7996: Remove link pointer dependency in mt7996_mac_sta_remove_links()

Lorenzo Bianconi <[email protected]>
wifi: mt76: mt7996: Add missing CHANCTX_STA_CSA property

Michael Lo <[email protected]>
wifi: mt76: mt7921: fix 6GHz regulatory update on connection

Duoming Zhou <[email protected]>

    wifi: mt76: mt7996: fix use-after-free bugs in mt7996_mac_dump_work()

Duoming Zhou <[email protected]>

    wifi: mt76: mt7915: fix use-after-free bugs in mt7915_mac_dump_work()

StanleyYP Wang <[email protected]>

    wifi: mt76: mt7996: fix struct mt7996_mcu_uni_event

Shayne Chen <[email protected]>
wifi: mt76: mt7996: fix wrong DMAD length when using MAC TXP

Carlos Llamas <[email protected]>
bpf: Switch CONFIG_CFI_CLANG to CONFIG_CFI

James Clark <[email protected]>
arm64: cpufeature: Make PMUVer and PerfMon unsigned

Allen Ye <[email protected]>
wifi: mt76: fix backoff fields and max_power calculation

Chad Monroe <[email protected]>
wifi: mt76: fix deadlock in remain-on-channel

Sean Wang <[email protected]>
wifi: mt76: mt7921: fix potential deadlock in mt7921_roc_abort_sync

Leon Yen <[email protected]>
wifi: mt76: mt7925: fix tx power setting failure after chip reset

Zilin Guan <[email protected]>
wifi: mt76: Fix memory leak after mt76_connac_mcu_alloc_sta_req()

Sean Wang <[email protected]>
wifi: mt76: mt7925: fix potential deadlock in mt7925_roc_abort_sync

Sean Wang <[email protected]>
wifi: mt76: mt7925: drop puncturing handling from BSS change path

Lorenzo Bianconi <[email protected]>
wifi: mt76: npu: Add missing rx_token_size initialization

Lorenzo Bianconi <[email protected]>
wifi: mt76: mt7996: Fix NPU stop procedure

Lorenzo Bianconi <[email protected]>
wifi: mt76: Fix memory leak destroying device

Rory Little <[email protected]>
wifi: mt76: mt7921: Place upper limit on station AID

Alok Tiwari <[email protected]>
wifi: mt76: mt7996: fix FCS error flag check in RX descriptor

Ming Yen Hsieh <[email protected]>
wifi: mt76: mt7925: prevent NULL vif dereference in mt7925_mac_write_txwi

Ming Yen Hsieh <[email protected]>
wifi: mt76: mt7925: prevent NULL pointer dereference in mt7925_tx_check_aggr()

Ryder Lee <[email protected]>
wifi: mt76: mt7915: fix use_cts_prot support

Ryder Lee <[email protected]>
wifi: mt76: mt7615: fix use_cts_prot support

Leon Yen <[email protected]>
wifi: mt76: mt7925: Fix incorrect MLO mode in firmware control

Sean Wang <[email protected]>
wifi: mt76: mt7921: Reset ampdu_state state in case of failure in mt76_connac2_tx_check_aggr()

Lorenzo Bianconi <[email protected]>
wifi: mt76: mt7996: Reset ampdu_state state in case of failure in mt7996_tx_check_aggr()

Lorenzo Bianconi <[email protected]>

    wifi: mt76: mt7996: Clear wcid pointer in mt7996_mac_sta_deinit_link()

Lorenzo Bianconi <[email protected]>
wifi: mt76: mt7996: Switch to the secondary link if the default one is removed

Lorenzo Bianconi <[email protected]>

    wifi: mt76: mt7996: Reset mtxq->idx if primary link is removed in mt7996_vif_link_remove()

Lorenzo Bianconi <[email protected]>

    wifi: mt76: mt7996: Set mtxq->wcid just for primary link

Shayne Chen <[email protected]>
wifi: mt76: mt7996: fix iface combination for different chipsets

StanleyYP Wang <[email protected]>
wifi: mt76: mt7996: fix the behavior of radar detection

Thomas Weißschuh <[email protected]>
tools/nolibc: avoid -Wundef warning for __STDC_VERSION__

Thomas Weißschuh <[email protected]>
tools/nolibc: MIPS: fix clobbers of 'lo' and 'hi' registers on different ISAs

David Laight <[email protected]>
tools/nolibc/printf: Move snprintf length check to callback

David Laight <[email protected]>

    tools/nolibc/printf: Change variables 'c' to 'ch' and 'tmpbuf[]' to 'outbuf[]'

David Laight <[email protected]>
selftests/nolibc: Fix build with host headers and libc

Thomas Weißschuh <[email protected]>
selftests/nolibc: fix test_file_stream() on musl libc

Amery Hung <[email protected]>
bpf: Do not allow deleting local storage in NMI

Heitor Alves de Siqueira <[email protected]>
wifi: libertas: don't kill URBs in interrupt context

Heitor Alves de Siqueira <[email protected]>
wifi: libertas: use USB anchors for tracking in-flight URBs

Petr Pavlu <[email protected]>
module: Fix freeing of charp module parameters when CONFIG_SYSFS=n

Ritesh Harjani (IBM) <[email protected]>
powerpc/64s: Fix unmap race with PMD migration entries

Ritesh Harjani (IBM) <[email protected]>
powerpc/pgtable-frag: Fix bad page state in pte_frag_destroy

Ilya Leoshkevich <[email protected]>
s390/bpf: Zero-extend bpf prog return values and kfunc arguments

Cai Xinchen <[email protected]>
dpaa2: compile dpaa2 even CONFIG_FSL_DPAA2_ETH=n

Cai Xinchen <[email protected]>
dpaa2: add independent dependencies for FSL_DPAA2_SWITCH

Shayne Chen <[email protected]>
wifi: ieee80211: fix definition of EHT-MCS 15 in MRU

Alan Maguire <[email protected]>
selftests/bpf: Handle !CONFIG_SMC in bpf_smc.c

P Praneesh <[email protected]>
wifi: ath12k: Fix legacy rate mapping for monitor mode capture

Sarika Sharma <[email protected]>
wifi: ath12k: account TX stats only when ACK/BA status is present

Feng Yang <[email protected]>
bpf: test_run: Fix the null pointer dereference issue in bpf_lwt_xmit_push_encap

Duoming Zhou <[email protected]>
wifi: rtlwifi: pci: fix possible use-after-free caused by unfinished irq_prepare_bcn_tasklet

Zilin Guan <[email protected]>
wifi: mwifiex: Fix memory leak in mwifiex_11n_aggregate_pkt()

Zilin Guan <[email protected]>
wifi: ath11k: fix memory leaks in beacon template setup

Michal Koutný <[email protected]>
sched/rt: Skip group schedulable check with rt_group_sched=0

John Stultz <[email protected]>
sched: Make class_schedulers avoid pushing current, and get rid of proxy_tag_curr()

Aaron Tomlin <[email protected]>
fs/resctrl: Report invalid domain ID when parsing io_alloc_cbm

Mario Limonciello (AMD) <[email protected]>
firmware: dmi: Correct an indexing error in dmi.h

Thomas Weißschuh <[email protected]>
x86/vdso: Clean up remnants of VDSO32_NOTE_MASK

Ahmed S. Darwish <[email protected]>
ASoC: Intel: avs: Include CPUID header at file scope

Ahmed S. Darwish <[email protected]>
ASoC: Intel: avs: Check maximum valid CPUID leaf

Biju Das <[email protected]>
irqchip/renesas-rzg2l: Fix error path in rzg2l_irqc_common_probe()

Peter Zijlstra <[email protected]>
sched/topology: Fix sched_domain_span()

Juergen Gross <[email protected]>
x86/irqflags: Preemptively move include paravirt.h directive where it belongs

K Prateek Nayak <[email protected]>
sched/topology: Compute sd_weight considering cpuset partitions

Bart Van Assche <[email protected]>
locking: Fix rwlock support in <linux/spinlock_up.h>

Thomas Weißschuh (Schneider Electric) <[email protected]>
scripts/gdb: timerlist: Adapt to move of tk_core

Thomas Weißschuh <[email protected]>
sparc64: vdso: Link with -z noexecstack

Boqun Feng <[email protected]>
rust: sync: atomic: Remove bound T: Sync for Atomic::from_ptr()

Xiaoyao Li <[email protected]>
x86/tdx: Fix the typo in TDX_ATTR_MIGRTABLE

Ravi Bangoria <[email protected]>
perf/amd/ibs: Avoid calling perf_allow_kernel() from the IBS NMI handler

Ravi Bangoria <[email protected]>
perf/amd/ibs: Preserve PhyAddrVal bit when clearing PhyAddr MSR

Ravi Bangoria <[email protected]>
perf/amd/ibs: Account interrupt for discarded samples

Bart Van Assche <[email protected]>
ww-mutex: Fix the ww_acquire_ctx function annotations

Bart Van Assche <[email protected]>
signal: Fix the lock_task_sighand() annotation

Bart Van Assche <[email protected]>
locking: Fix rwlock and spinlock lock context annotations

Thomas Gleixner <[email protected]>
hrtimer: Reduce trace noise in hrtimer_start()

Peter Zijlstra <[email protected]>
hrtimer: Avoid pointless reprogramming in __hrtimer_start_range_ns()

Brian Masney <[email protected]>
irqchip/irq-pic32-evic: Address warning related to wrong printf() formatter

Davidlohr Bueso <[email protected]>
locking/mutex: Fix wrong comment for CONFIG_DEBUG_LOCK_ALLOC

Davidlohr Bueso <[email protected]>
locking/mutex: Rename mutex_init_lockep()

Danilo Krummrich <[email protected]>
bus: fsl-mc: use generic driver_override infrastructure

Danilo Krummrich <[email protected]>
s390/ap: use generic driver_override infrastructure

Danilo Krummrich <[email protected]>
s390/cio: use generic driver_override infrastructure

Danilo Krummrich <[email protected]>
vdpa: use generic driver_override infrastructure

Danilo Krummrich <[email protected]>
platform/wmi: use generic driver_override infrastructure

Danilo Krummrich <[email protected]>
PCI: use generic driver_override infrastructure

K Prateek Nayak <[email protected]>

    cpufreq: Pass the policy to cpufreq_driver->adjust_perf()

Gautham R. Shenoy <[email protected]>
amd-pstate: Update cppc_req_cached in fast_switch case

Gautham R. Shenoy <[email protected]>
amd-pstate: Fix memory leak in amd_pstate_epp_cpu_init()

Gui-Dong Han <[email protected]>
soundwire: debugfs: initialize firmware_file to empty string

Gui-Dong Han <[email protected]>
debugfs: fix placement of EXPORT_SYMBOL_GPL for debugfs_create_str()

Gui-Dong Han <[email protected]>
debugfs: check for NULL pointer in debugfs_create_str()

Gopi Krishna Menon <[email protected]>
thermal/drivers/spear: Fix error condition for reading st,thermal-flags

Danilo Krummrich <[email protected]>
devres: fix missing node debug info in devm_krealloc()

Rafael J. Wysocki <[email protected]>
ACPI: x86: cmos_rtc: Improve coordination with ACPI TAD driver

Rafael J. Wysocki <[email protected]>
ACPI: x86: cmos_rtc: Clean up address space handler driver

Viresh Kumar <[email protected]>
OPP: Move break out of scoped_guard in dev_pm_opp_xlate_required_opp()

Manivannan Sadhasivam <[email protected]>
OPP: debugfs: Use performance level if available to distinguish between rates

Qu Wenruo <[email protected]>
btrfs: do not reject a valid running dev-replace

Filipe Manana <[email protected]>
btrfs: fix deadlock between reflink and transaction commit when using flushoncommit

Qu Wenruo <[email protected]>
btrfs: fix the inline compressed extent check in inode_need_compress()

Aleksa Sarai <[email protected]>
dcache: permit dynamic_dname()s up to NAME_MAX

Yu Kuai <[email protected]>
md: wake raid456 reshape waiters before suspend

Abd-Alrhman Masalkhi <[email protected]>
md: remove unused static md_wq workqueue

Zhan Xusheng <[email protected]>
erofs: handle 48-bit blocks/uniaddr for extra devices

Yuto Ohnuki <[email protected]>
blk-wbt: remove WARN_ON_ONCE from wbt_init_enable_default()

Uday Shankar <[email protected]>
ublk: reset per-IO canceled flag on each fetch

Yu Kuai <[email protected]>
md: fix array_state=clear sysfs deadlock

Zhan Xusheng <[email protected]>
erofs: include the trailing NUL in FS_IOC_GETFSLABEL

Gao Xiang <[email protected]>
erofs: verify metadata accesses for file-backed mounts

Cole Leavitt <[email protected]>
pstore/ram: fix resource leak when ioremap() fails

Jackie Liu <[email protected]>
blk-cgroup: fix disk reference leak in blkcg_maybe_throttle_current()

Deepanshu Kartikey <[email protected]>
nilfs2: reject zero bd_oblocknr in nilfs_ioctl_mark_blocks_dirty()

Jackie Liu <[email protected]>
block: fix zones_cond memory leak on zone revalidation error paths

Daan De Meyer <[email protected]>
loop: fix partition scan race between udev and loop_reread_partitions()

Bart Van Assche <[email protected]>
drbd: Balance RCU calls in drbd_adm_dump_devices()

Christoph Hellwig <[email protected]>
fs: fix archiecture-specific compat_ftruncate64

Xiao Ni <[email protected]>
md/raid1: fix the comparing region of interval tree

HyungJung Joo <[email protected]>
fs/mbcache: cancel shrink work before destroying the cache

HyungJung Joo <[email protected]>
fs/omfs: reject s_sys_blocksize smaller than OMFS_DIR_START

Chen Cheng <[email protected]>
md: suppress spurious superblock update error message for dm-raid

Ming Lei <[email protected]>
blk-cgroup: wait for blkcg cleanup before initializing new disk

-------------

Diffstat:

 Documentation/admin-guide/mm/damon/lru_sort.rst    |   4 +-
 .../bindings/interrupt-controller/arm,gic-v3.yaml  |   2 +-
 .../bindings/mmc/snps,dwcmshc-sdhci.yaml           |   3 +
 .../devicetree/bindings/net/dsa/nxp,sja1105.yaml   |   2 -
 .../bindings/pci/fsl,imx6q-pcie-common.yaml        |   4 +-
 .../devicetree/bindings/pci/fsl,imx6q-pcie.yaml    |   3 +-
 .../bindings/pci/renesas,r9a08g045-pcie.yaml       |  50 ++--
 .../pinctrl/marvell,armada3710-xb-pinctrl.yaml     |  11 +-
 .../bindings/regulator/fitipower,fp9931.yaml       |   1 +
 .../bindings/ufs/rockchip,rk3576-ufshc.yaml        |   7 +-
 Documentation/driver-api/driver-model/devres.rst   |   4 +
 Documentation/mm/damon/index.rst                   |   2 +-
 Documentation/mm/hugetlbfs_reserv.rst              |   2 +-
 Documentation/netlink/specs/psp.yaml               |   2 +
 Documentation/userspace-api/rseq.rst               |  94 +++++-
 Makefile                                           |   6 +-
 arch/arc/net/bpf_jit_arcv2.c                       |   8 +-
 arch/arm/boot/dts/broadcom/bcm-ns.dtsi             |   2 +-
 arch/arm/boot/dts/mediatek/mt7623.dtsi             |   2 +-
 .../boot/dts/nxp/imx/imx27-eukrea-cpuimx27.dtsi    |   8 +-
 .../nxp/imx/imx27-eukrea-mbimxsd27-baseboard.dts   |   2 +-
 arch/arm/mach-omap1/clock_data.c                   |   4 +-
 arch/arm/net/bpf_jit_32.c                          |   6 +
 arch/arm64/boot/dts/amlogic/meson-axg.dtsi         |   6 +
 .../boot/dts/amlogic/meson-gxl-s905d-p230.dts      |   3 +-
 arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi     | 161 ++++++++---
 .../boot/dts/freescale/imx8-apalis-ixora-v1.1.dtsi |   4 +
 .../boot/dts/freescale/imx8-apalis-ixora-v1.2.dtsi |   4 +
 arch/arm64/boot/dts/freescale/imx8dxl-evk.dts      | 114 ++++++--
 .../arm64/boot/dts/freescale/imx8mm-emtop-som.dtsi |   4 +-
 .../arm64/boot/dts/freescale/imx8mm-tqma8mqml.dtsi |   2 +-
 .../arm64/boot/dts/freescale/imx8mn-tqma8mqnl.dtsi |   2 +-
 .../freescale/imx8mp-aristainetos3a-som-v1.dtsi    |   2 +-
 arch/arm64/boot/dts/freescale/imx8mp-cubox-m.dts   |   2 +-
 .../dts/freescale/imx8mp-data-modul-edm-sbc.dts    |   2 +-
 .../boot/dts/freescale/imx8mp-debix-model-a.dts    |   2 +-
 .../dts/freescale/imx8mp-debix-som-a-bmb-08.dts    |   2 +-
 .../boot/dts/freescale/imx8mp-debix-som-a.dtsi     |   2 +-
 .../arm64/boot/dts/freescale/imx8mp-dhcom-som.dtsi |   2 +-
 arch/arm64/boot/dts/freescale/imx8mp-edm-g.dtsi    |   2 +-
 arch/arm64/boot/dts/freescale/imx8mp-evk.dts       |   5 +-
 .../imx8mp-hummingboard-pulse-common.dtsi          |   2 +-
 .../imx8mp-hummingboard-pulse-mini-hdmi.dtsi       |  11 +-
 .../boot/dts/freescale/imx8mp-icore-mx8mp.dtsi     |   2 +-
 .../boot/dts/freescale/imx8mp-kontron-dl.dtso      |  19 ++
 .../boot/dts/freescale/imx8mp-kontron-osm-s.dtsi   |   6 +
 .../imx8mp-kontron-smarc-eval-carrier.dts          |   1 -
 arch/arm64/boot/dts/freescale/imx8mp-navqp.dts     |   2 +-
 .../boot/dts/freescale/imx8mp-nitrogen-som.dtsi    |   2 +-
 arch/arm64/boot/dts/freescale/imx8mp-sr-som.dtsi   |   4 +-
 .../freescale/imx8mp-tqma8mpql-mba8mp-ras314.dts   |   4 +-
 .../boot/dts/freescale/imx8mp-ultra-mach-sbc.dts   |   4 +-
 arch/arm64/boot/dts/freescale/imx8qm-mek.dts       |  10 +-
 arch/arm64/boot/dts/freescale/imx8qxp-mek.dts      |  10 +-
 arch/arm64/boot/dts/freescale/imx91-11x11-evk.dts  |   2 +
 arch/arm64/boot/dts/freescale/imx91.dtsi           |   2 +-
 arch/arm64/boot/dts/marvell/armada-3720-uDPU.dtsi  |   2 +-
 arch/arm64/boot/dts/marvell/armada-37xx.dtsi       |   2 +-
 arch/arm64/boot/dts/mediatek/mt6795.dtsi           |   2 +-
 arch/arm64/boot/dts/mediatek/mt7981b.dtsi          |   2 +-
 arch/arm64/boot/dts/mediatek/mt7986a.dtsi          |   2 +-
 .../mediatek/mt7988a-bananapi-bpi-r4-pro-4e.dts    |   2 +-
 .../mediatek/mt7988a-bananapi-bpi-r4-pro-8x.dts    |   2 +-
 arch/arm64/boot/dts/mediatek/mt8365.dtsi           |   5 +-
 arch/arm64/boot/dts/nvidia/tegra234-p3701.dtsi     |   1 +
 arch/arm64/boot/dts/nvidia/tegra234-p3767.dtsi     |   1 +
 arch/arm64/boot/dts/qcom/Makefile                  |   2 +
 arch/arm64/boot/dts/qcom/hamoa.dtsi                |  10 +-
 arch/arm64/boot/dts/qcom/kaanapali.dtsi            |   2 +-
 arch/arm64/boot/dts/qcom/lemans.dtsi               |   6 +-
 arch/arm64/boot/dts/qcom/milos.dtsi                |   4 +-
 arch/arm64/boot/dts/qcom/monaco.dtsi               |   6 +-
 arch/arm64/boot/dts/qcom/msm8917-xiaomi-riva.dts   |   2 +-
 arch/arm64/boot/dts/qcom/msm8937-xiaomi-land.dts   |   2 +-
 arch/arm64/boot/dts/qcom/msm8953-xiaomi-daisy.dts  |   2 +-
 arch/arm64/boot/dts/qcom/msm8953-xiaomi-vince.dts  |   2 +-
 .../boot/dts/qcom/qcs6490-thundercomm-rubikpi3.dts |   8 +-
 arch/arm64/boot/dts/qcom/qrb2210-arduino-imola.dts |  12 +-
 .../dts/qcom/sdm845-xiaomi-beryllium-common.dtsi   |   1 +
 arch/arm64/boot/dts/qcom/sm6125-xiaomi-ginkgo.dts  |  58 ++--
 arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts  |   4 +
 arch/arm64/boot/dts/qcom/sm8250.dtsi               |   5 +
 arch/arm64/boot/dts/qcom/sm8450.dtsi               |   5 +-
 arch/arm64/boot/dts/qcom/sm8550.dtsi               |  13 +-
 arch/arm64/boot/dts/qcom/sm8650.dtsi               |  15 +-
 arch/arm64/boot/dts/qcom/sm8750.dtsi               |  14 +-
 arch/arm64/boot/dts/qcom/talos.dtsi                |   3 +
 arch/arm64/boot/dts/rockchip/rk3328-a1.dts         |  23 --
 arch/arm64/boot/dts/rockchip/rk3562-evb2-v10.dts   |   2 +-
 arch/arm64/boot/dts/rockchip/rk3566-lckfb-tspi.dts |   4 +-
 arch/arm64/boot/dts/rockchip/rk3576.dtsi           |   5 +-
 arch/arm64/boot/dts/rockchip/rk3588-jaguar.dts     |   2 +-
 .../boot/dts/rockchip/rk3588s-gameforce-ace.dts    |  12 +-
 arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts           |  14 +-
 arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi         |   2 +-
 arch/arm64/boot/dts/ti/k3-am62l.dtsi               |   4 +-
 arch/arm64/boot/dts/ti/k3-am62l3-evm.dts           |   6 +-
 arch/arm64/boot/dts/ti/k3-am62p5-sk.dts            |   6 +-
 arch/arm64/include/asm/entry-common.h              |  21 +-
 arch/arm64/include/asm/kernel-pgtable.h            |   7 +-
 arch/arm64/include/asm/xor.h                       |   2 +-
 arch/arm64/kernel/cpufeature.c                     |   4 +-
 arch/arm64/kernel/machine_kexec.c                  |   3 -
 arch/arm64/kernel/pi/patch-scs.c                   |   4 +-
 arch/arm64/kernel/sys32.c                          |   2 +-
 arch/arm64/lib/insn.c                              |   2 +
 arch/arm64/net/bpf_jit_comp.c                      |  16 +-
 arch/mips/kernel/linux32.c                         |   2 +-
 arch/parisc/kernel/sys_parisc.c                    |   4 +-
 arch/powerpc/include/asm/book3s/64/pgtable.h       |  15 +
 arch/powerpc/include/asm/kexec.h                   |  14 +-
 arch/powerpc/kernel/sys_ppc32.c                    |   2 +-
 arch/powerpc/kexec/crash.c                         |  64 +++++
 arch/powerpc/kexec/file_load_64.c                  |  29 +-
 arch/powerpc/mm/book3s64/pgtable.c                 |  13 +-
 arch/powerpc/mm/pgtable-frag.c                     |   1 +
 arch/powerpc/platforms/44x/warp.c                  |   2 +
 arch/riscv/Kconfig                                 |  22 ++
 arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts    |   4 +-
 arch/riscv/kernel/traps_misaligned.c               |   2 +-
 arch/riscv/net/bpf_jit.h                           |   6 -
 arch/riscv/net/bpf_jit_core.c                      |   7 -
 arch/s390/kvm/interrupt.c                          |   3 +-
 arch/s390/kvm/pci.c                                |   6 +-
 arch/s390/mm/fault.c                               |   2 +-
 arch/s390/net/bpf_jit_comp.c                       |  39 ++-
 arch/sh/include/cpu-sh3/cpu/dac.h                  |   2 +
 arch/sparc/kernel/sys_sparc32.c                    |   2 +-
 arch/sparc/vdso/Makefile                           |   2 +-
 arch/um/kernel/tlb.c                               |   1 +
 arch/x86/Makefile.um                               |   2 +
 arch/x86/coco/tdx/debug.c                          |   2 +-
 arch/x86/events/amd/ibs.c                          |  15 +-
 arch/x86/events/perf_event_flags.h                 |   1 +
 arch/x86/include/asm/irqflags.h                    |   6 +-
 arch/x86/include/asm/shared/tdx.h                  |   4 +-
 arch/x86/include/asm/vdso.h                        |   1 -
 arch/x86/kernel/acpi/cppc.c                        |   6 +-
 arch/x86/kernel/relocate_kernel_64.S               |   8 +
 arch/x86/kernel/sys_ia32.c                         |   3 +-
 arch/x86/kvm/emulate.c                             |   2 +-
 arch/x86/kvm/trace.h                               |   2 +-
 arch/x86/tools/vdso2c.c                            |   1 -
 arch/x86/um/vdso/Makefile                          |   2 -
 block/blk-cgroup.c                                 |  16 ++
 block/blk-wbt.c                                    |   5 +-
 block/blk-zoned.c                                  |  26 +-
 block/disk-events.c                                |   3 +-
 crypto/af_alg.c                                    |   2 +
 crypto/jitterentropy-kcapi.c                       |  14 +-
 crypto/simd.c                                      |  16 +-
 drivers/accel/amdxdna/amdxdna_mailbox.c            |   2 +-
 drivers/accel/rocket/rocket_gem.c                  |   2 +
 drivers/acpi/apei/einj-core.c                      |  55 ++--
 drivers/acpi/arm64/agdi.c                          |   2 +-
 drivers/acpi/x86/cmos_rtc.c                        |  79 ++++--
 drivers/ata/libata-scsi.c                          |   4 +-
 drivers/base/devres.c                              |   2 +
 drivers/block/drbd/drbd_nl.c                       |   8 +-
 drivers/block/ublk_drv.c                           |  21 +-
 drivers/block/zram/zram_drv.c                      |   4 +
 drivers/bluetooth/btmtk.c                          |   4 +-
 drivers/bluetooth/hci_ldisc.c                      |   3 +
 drivers/bus/fsl-mc/fsl-mc-bus.c                    |  43 +--
 drivers/bus/stm32_rifsc.c                          |  52 ++--
 drivers/cdrom/cdrom.c                              |  73 +++--
 drivers/char/ipmi/ssif_bmc.c                       |  34 ++-
 drivers/clk/clk-qoriq.c                            |  17 +-
 drivers/clk/clk-xgene.c                            |   2 +
 drivers/clk/imx/clk-imx6q.c                        |  12 +-
 drivers/clk/imx/clk-imx8mq.c                       |   4 +-
 drivers/clk/qcom/dispcc-glymur.c                   |   4 +-
 drivers/clk/qcom/dispcc-kaanapali.c                |   2 -
 drivers/clk/qcom/dispcc-milos.c                    |   1 -
 drivers/clk/qcom/dispcc-sc8280xp.c                 |   4 -
 drivers/clk/qcom/dispcc-sm4450.c                   |   1 -
 drivers/clk/qcom/dispcc-sm8250.c                   |   6 +-
 drivers/clk/qcom/dispcc-sm8450.c                   |   2 +-
 drivers/clk/qcom/dispcc0-sa8775p.c                 |   2 -
 drivers/clk/qcom/dispcc1-sa8775p.c                 |   2 -
 drivers/clk/qcom/gcc-glymur.c                      |   1 +
 drivers/clk/qcom/gcc-sc8180x.c                     |  64 ++++-
 drivers/clk/qcom/gcc-x1e80100.c                    |   1 +
 drivers/clk/qcom/gdsc.c                            |  12 +-
 drivers/clk/renesas/r9a09g056-cpg.c                |  36 +--
 drivers/clk/renesas/r9a09g057-cpg.c                |  55 ++--
 drivers/clk/spacemit/ccu_mix.c                     |   2 +-
 drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c           |  17 +-
 drivers/clk/visconti/pll.c                         |   2 +-
 drivers/cpufreq/amd-pstate.c                       |   6 +-
 drivers/cpufreq/cpufreq.c                          |   6 +-
 drivers/cpufreq/intel_pstate.c                     |   4 +-
 drivers/crypto/atmel-aes.c                         |   6 +-
 drivers/crypto/ccp/ccp-crypto-aes.c                |   7 +-
 drivers/crypto/hisilicon/sec2/sec_crypto.c         |   2 +-
 drivers/crypto/inside-secure/eip93/eip93-common.c  |   2 +-
 drivers/crypto/inside-secure/eip93/eip93-main.c    |  16 +-
 drivers/crypto/inside-secure/eip93/eip93-regs.h    |   2 +-
 drivers/crypto/intel/iaa/iaa_crypto_main.c         |   2 +-
 .../crypto/intel/qat/qat_420xx/adf_420xx_hw_data.c |  20 +-
 .../crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c   |  14 +-
 .../intel/qat/qat_common/adf_sysfs_ras_counters.c  |  12 +-
 .../intel/qat/qat_common/icp_qat_hw_20_comp.h      |  10 +-
 .../crypto/intel/qat/qat_common/qat_comp_algs.c    |  10 +-
 drivers/crypto/sa2ul.c                             |   4 +-
 drivers/crypto/tegra/tegra-se-aes.c                |   9 +
 drivers/crypto/tegra/tegra-se-hash.c               |   3 +
 drivers/cxl/pci.c                                  |   3 +
 drivers/dma-buf/dma-fence.c                        |   8 +-
 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c     |  16 +-
 drivers/dma/mxs-dma.c                              |   1 +
 drivers/dpll/dpll_netlink.c                        |  10 +
 drivers/dpll/dpll_netlink.h                        |   2 -
 drivers/firmware/arm_ffa/driver.c                  |   2 +-
 drivers/firmware/efi/capsule-loader.c              |   2 +-
 drivers/firmware/qcom/qcom_scm.c                   |   3 +-
 drivers/fwctl/main.c                               |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c     |   2 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c      |   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c            |   5 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c            |  57 ++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c     |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c          |   5 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c           |   5 -
 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c             |   2 +-
 drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c             |   2 +-
 drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c             |   2 +-
 drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c              |  66 +++++
 drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c             |  10 +-
 drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c             |   1 +
 drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c             |   2 +
 drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c             |   1 +
 drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c             |   1 +
 drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c           |   1 +
 drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_5.c           |   1 +
 drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c           |   1 +
 drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c           |   1 +
 drivers/gpu/drm/amd/amdgpu/jpeg_v5_3_0.c           |   1 +
 drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c              |  10 +
 drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c              |   5 +
 drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c              |   2 +
 drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c              |   2 +
 drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c              |   3 +
 drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c              |   1 +
 drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c            |   1 +
 drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c            |   1 +
 drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c            |   1 +
 drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c            |   1 +
 drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c       |  35 ++-
 drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c   |   1 -
 drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c   |   1 -
 drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v11.c   |   1 -
 drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v12.c   |   1 -
 drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v12_1.c |   1 -
 drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c    |   1 -
 drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c    |   1 -
 .../gpu/drm/amd/amdkfd/kfd_process_queue_manager.c |   3 +-
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c  |   6 +-
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c |  21 +-
 .../drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c  |  44 +++
 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c  |  62 ++++
 drivers/gpu/drm/amd/display/dc/dc.h                |   2 +-
 drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c       |  10 +-
 .../gpu/drm/amd/display/dc/dce/dce_link_encoder.c  |   4 +-
 drivers/gpu/drm/amd/display/dc/gpio/gpio_service.c |   3 +
 drivers/gpu/drm/amd/display/dc/link/link_factory.c |   4 +-
 .../amd/display/dc/resource/dce60/dce60_resource.c |   3 +-
 .../amd/display/dc/resource/dce80/dce80_resource.c |   3 +-
 .../amd/display/dc/resource/dcn32/dcn32_resource.c |   8 +-
 .../amd/display/include/grph_object_ctrl_defs.h    |   4 +
 drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c     |  15 +
 .../gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c    | 118 +++++++-
 .../gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.h    |   1 +
 drivers/gpu/drm/amd/pm/powerplay/inc/hwmgr.h       |   1 +
 .../gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c    |  15 +-
 drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c |   1 +
 .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_12_ppt.c  |   5 +-
 .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c   |   1 +
 drivers/gpu/drm/amd/ras/rascore/ras_core.c         |  17 +-
 drivers/gpu/drm/amd/ras/rascore/ras_umc.c          |   2 +-
 .../drm/arm/display/komeda/komeda_framebuffer.c    |   6 +-
 .../gpu/drm/bridge/cadence/cdns-mhdp8546-core.c    |  72 ++++-
 .../gpu/drm/bridge/cadence/cdns-mhdp8546-core.h    |   1 +
 .../gpu/drm/bridge/cadence/cdns-mhdp8546-hdcp.c    |  18 +-
 drivers/gpu/drm/bridge/imx/imx8qxp-pxl2dpi.c       |  40 +--
 drivers/gpu/drm/drm_color_mgmt.c                   |   2 +-
 drivers/gpu/drm/drm_fb_helper.c                    |   4 +-
 drivers/gpu/drm/drm_gem.c                          |   7 +-
 drivers/gpu/drm/drm_gpusvm.c                       |   4 +-
 drivers/gpu/drm/gma500/oaktrail_hdmi.c             |   1 +
 drivers/gpu/drm/gma500/oaktrail_lvds.c             |   9 +-
 drivers/gpu/drm/i915/display/intel_dp.c            |   9 +-
 drivers/gpu/drm/i915/display/skl_watermark.c       |   4 +-
 drivers/gpu/drm/i915/gt/intel_reset.c              |   3 +-
 drivers/gpu/drm/imagination/pvr_rogue_fwif.h       |   8 +-
 .../gpu/drm/imagination/pvr_rogue_fwif_shared.h    |   6 +-
 drivers/gpu/drm/loongson/lsdc_drv.c                |   2 +-
 drivers/gpu/drm/msm/adreno/a4xx_gpu.c              |   6 +-
 drivers/gpu/drm/msm/adreno/a5xx_gpu.c              |   6 +-
 drivers/gpu/drm/msm/adreno/a6xx_gmu.c              | 140 +++++++--
 drivers/gpu/drm/msm/adreno/a6xx_gmu.h              |   7 +-
 drivers/gpu/drm/msm/adreno/a6xx_gpu.c              | 109 ++-----
 drivers/gpu/drm/msm/adreno/a6xx_gpu.h              |   2 +-
 drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c        |  18 +-
 drivers/gpu/drm/msm/adreno/a6xx_hfi.c              |  14 +-
 drivers/gpu/drm/msm/adreno/a8xx_gpu.c              |  26 +-
 drivers/gpu/drm/msm/adreno/adreno_gpu.c            |   6 +-
 drivers/gpu/drm/msm/adreno/adreno_gpu.h            |   3 +-
 .../drm/msm/disp/dpu1/catalog/dpu_1_16_msm8953.h   |   7 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c           |   3 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c            |   2 -
 drivers/gpu/drm/msm/dp/dp_display.c                |   1 +
 drivers/gpu/drm/msm/dsi/dsi.c                      |   1 +
 drivers/gpu/drm/msm/dsi/dsi_cfg.c                  |   4 +-
 drivers/gpu/drm/msm/dsi/dsi_cfg.h                  |   2 +-
 drivers/gpu/drm/msm/dsi/dsi_host.c                 |  16 +-
 drivers/gpu/drm/msm/dsi/phy/dsi_phy.c              |   1 +
 drivers/gpu/drm/msm/hdmi/hdmi.c                    |   1 +
 drivers/gpu/drm/msm/hdmi/hdmi_phy.c                |   1 +
 drivers/gpu/drm/msm/msm_fb.c                       |   7 +-
 drivers/gpu/drm/msm/msm_gem.c                      |   3 +
 drivers/gpu/drm/msm/msm_gem_shrinker.c             |   5 +-
 drivers/gpu/drm/msm/msm_gem_vma.c                  |  11 +-
 drivers/gpu/drm/msm/registers/adreno/a6xx_gmu.xml  |   6 +-
 drivers/gpu/drm/panel/Kconfig                      |   1 +
 drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c    |   1 +
 drivers/gpu/drm/panel/panel-simple.c               |   2 +-
 drivers/gpu/drm/panfrost/panfrost_drv.c            |   2 +
 drivers/gpu/drm/sun4i/sun4i_backend.c              |   6 +-
 drivers/gpu/drm/sun4i/sun8i_mixer.c                |   2 +-
 drivers/gpu/drm/sysfb/ofdrm.c                      |   2 +
 drivers/gpu/drm/ttm/ttm_bo.c                       |  18 +-
 drivers/gpu/drm/ttm/ttm_bo_util.c                  |  11 +-
 drivers/gpu/drm/ttm/ttm_resource.c                 |  18 +-
 drivers/gpu/drm/v3d/v3d_drv.c                      |  16 +-
 drivers/gpu/drm/virtio/virtgpu_prime.c             |   2 +-
 drivers/gpu/drm/xe/xe_dma_buf.c                    |  52 +---
 drivers/gpu/drm/xe/xe_eu_stall.c                   |   4 +-
 drivers/gpu/drm/xe/xe_exec_queue.c                 |   9 +-
 drivers/gpu/drm/xe/xe_gsc.c                        |   2 +-
 drivers/gpu/drm/xe/xe_guc_submit.c                 |  34 +--
 drivers/gpu/drm/xe/xe_lrc.c                        |   2 +-
 drivers/gpu/drm/xe/xe_reg_whitelist.c              |   2 +-
 drivers/gpu/drm/xe/xe_wa.c                         |  37 +--
 drivers/gpu/nova-core/bitfield.rs                  |   5 +-
 drivers/gpu/nova-core/driver.rs                    |   2 +-
 drivers/gpu/nova-core/falcon.rs                    |  74 +++--
 drivers/gpu/nova-core/firmware.rs                  |  88 +++---
 drivers/gpu/nova-core/firmware/booter.rs           |  59 ++--
 drivers/gpu/nova-core/firmware/fwsec.rs            | 167 +++++------
 drivers/gpu/nova-core/gpu.rs                       |   4 +-
 drivers/gpu/nova-core/gsp/boot.rs                  |  34 +--
 drivers/gpu/nova-core/gsp/cmdq.rs                  |  38 +--
 drivers/hid/bpf/hid_bpf_dispatch.c                 |   6 +-
 drivers/hid/hid-asus.c                             |  28 +-
 drivers/hid/hid-core.c                             |  67 ++++-
 drivers/hid/hid-gfrm.c                             |   4 +-
 drivers/hid/hid-logitech-hidpp.c                   |   2 +-
 drivers/hid/hid-multitouch.c                       |   2 +-
 drivers/hid/hid-primax.c                           |   2 +-
 drivers/hid/hid-vivaldi-common.c                   |   2 +-
 drivers/hid/i2c-hid/i2c-hid-core.c                 |   7 +-
 drivers/hid/usbhid/hid-core.c                      |  13 +-
 drivers/hid/wacom_sys.c                            |   6 +-
 drivers/hte/Kconfig                                |   6 +-
 drivers/hv/vmbus_drv.c                             |   1 -
 drivers/hwmon/aspeed-g6-pwm-tach.c                 |   8 -
 drivers/i3c/master.c                               |  32 +--
 drivers/i3c/master/adi-i3c-master.c                |   2 +-
 drivers/i3c/master/dw-i3c-master.c                 |  18 +-
 drivers/i3c/master/mipi-i3c-hci/dma.c              |   5 +-
 drivers/i3c/master/renesas-i3c.c                   |   4 +-
 drivers/infiniband/core/iwpm_msg.c                 |   6 +-
 drivers/infiniband/core/umem.c                     |  13 +-
 drivers/iommu/amd/iommu.c                          |  15 +-
 drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c     |   7 +-
 drivers/iommu/intel/iommu.c                        |  16 +-
 drivers/iommu/iommu.c                              | 168 ++++++++---
 drivers/iommu/iommufd/selftest.c                   |   4 +-
 drivers/iommu/iommufd/vfio_compat.c                |   2 +-
 drivers/iommu/riscv/Kconfig                        |   1 +
 drivers/iommu/riscv/iommu-platform.c               |  17 +-
 drivers/iommu/riscv/iommu.c                        |  84 +++++-
 drivers/irqchip/irq-gic-v5-its.c                   |  34 +--
 drivers/irqchip/irq-gic-v5.c                       |  98 ++++---
 drivers/irqchip/irq-meson-gpio.c                   |   3 +-
 drivers/irqchip/irq-pic32-evic.c                   |   2 +-
 drivers/irqchip/irq-renesas-rzg2l.c                |   2 +-
 drivers/irqchip/irq-riscv-imsic-early.c            |   2 +
 drivers/leds/blink/leds-lgm-sso.c                  |   2 -
 drivers/mailbox/mailbox-test.c                     |  43 +--
 drivers/mailbox/mailbox.c                          |   3 +-
 drivers/mailbox/mtk-cmdq-mailbox.c                 |   8 +-
 drivers/mailbox/mtk-vcp-mailbox.c                  |   2 +-
 drivers/md/dm-cache-metadata.c                     |  24 +-
 drivers/md/dm-cache-metadata.h                     |   5 -
 drivers/md/dm-cache-policy-smq.c                   |   4 +
 drivers/md/dm-cache-target.c                       |  73 +++--
 drivers/md/dm-init.c                               |   4 +-
 drivers/md/dm-log.c                                |   6 +-
 drivers/md/dm-mpath.c                              |   9 +-
 drivers/md/md-bitmap.c                             | 133 ++++++++-
 drivers/md/md-bitmap.h                             |   2 +-
 drivers/md/md-llbitmap.c                           |   7 +-
 drivers/md/md.c                                    | 259 ++++++++++++++---
 drivers/md/md.h                                    |   3 +
 drivers/md/raid1-10.c                              |   7 +-
 drivers/md/raid1.c                                 |   4 +-
 drivers/media/i2c/og01a1b.c                        |  13 +-
 drivers/media/platform/synopsys/Kconfig            |   1 +
 drivers/memory/tegra/tegra124-emc.c                |   2 +-
 drivers/memory/tegra/tegra30-emc.c                 |   6 +-
 drivers/mfd/mc13xxx-core.c                         |   2 +-
 drivers/mtd/maps/physmap-gemini.c                  |   2 +-
 drivers/mtd/nand/raw/sunxi_nand.c                  |   6 +-
 drivers/mtd/nand/spi/core.c                        |  24 +-
 drivers/mtd/nand/spi/winbond.c                     |  19 +-
 drivers/mtd/parsers/ofpart_core.c                  |   4 +-
 drivers/mtd/spi-nor/core.c                         |   2 +-
 drivers/mtd/spi-nor/core.h                         |   2 +-
 drivers/mtd/spi-nor/micron-st.c                    |  10 +
 drivers/mtd/spi-nor/swp.c                          |   4 +-
 drivers/net/bareudp.c                              |   3 +
 drivers/net/bonding/bond_3ad.c                     | 109 +++----
 drivers/net/bonding/bond_main.c                    |   8 +-
 drivers/net/bonding/bond_netlink.c                 |  21 +-
 drivers/net/bonding/bond_procfs.c                  |   3 +-
 drivers/net/bonding/bond_sysfs_slave.c             |  17 +-
 drivers/net/dsa/realtek/rtl8365mb.c                |   2 +-
 drivers/net/ethernet/airoha/airoha_eth.c           | 312 ++++++++++++++------
 drivers/net/ethernet/airoha/airoha_eth.h           |  10 +-
 drivers/net/ethernet/airoha/airoha_ppe.c           |  44 ++-
 drivers/net/ethernet/amazon/ena/ena_com.c          |   7 +-
 drivers/net/ethernet/amazon/ena/ena_phc.c          |   5 +-
 .../net/ethernet/aquantia/atlantic/aq_pci_func.c   |   2 +-
 drivers/net/ethernet/broadcom/bnge/bnge_core.c     |  30 +-
 drivers/net/ethernet/broadcom/bnge/bnge_rmem.c     |  16 --
 drivers/net/ethernet/broadcom/genet/bcmgenet.c     |  30 +-
 drivers/net/ethernet/freescale/Makefile            |   3 +-
 drivers/net/ethernet/freescale/dpaa2/Kconfig       |   4 +
 drivers/net/ethernet/freescale/enetc/ntmp.c        | 231 +++++++++------
 .../net/ethernet/freescale/enetc/ntmp_private.h    |  10 +-
 drivers/net/ethernet/intel/e1000e/netdev.c         |   1 +
 drivers/net/ethernet/intel/i40e/i40e.h             |   1 +
 drivers/net/ethernet/intel/i40e/i40e_main.c        |   2 +-
 drivers/net/ethernet/intel/i40e/i40e_ptp.c         |   3 +-
 drivers/net/ethernet/intel/iavf/iavf.h             |   9 +-
 drivers/net/ethernet/intel/iavf/iavf_main.c        |  52 +---
 drivers/net/ethernet/intel/iavf/iavf_type.h        |   2 +-
 drivers/net/ethernet/intel/iavf/iavf_virtchnl.c    |  76 +++--
 drivers/net/ethernet/intel/ice/devlink/devlink.c   |   2 +
 drivers/net/ethernet/intel/ice/ice.h               |   4 +-
 drivers/net/ethernet/intel/ice/ice_adminq_cmd.h    |   2 +-
 drivers/net/ethernet/intel/ice/ice_common.c        |   2 -
 drivers/net/ethernet/intel/ice/ice_dcb_lib.c       |   2 +-
 drivers/net/ethernet/intel/ice/ice_dpll.c          | 146 +++++++++-
 drivers/net/ethernet/intel/ice/ice_ethtool.c       |   1 +
 drivers/net/ethernet/intel/ice/ice_lib.c           |   4 +-
 drivers/net/ethernet/intel/ice/ice_main.c          | 123 ++------
 drivers/net/ethernet/intel/ice/ice_ptp.c           |  44 ++-
 drivers/net/ethernet/intel/ice/ice_ptp_consts.h    |  12 +-
 drivers/net/ethernet/intel/ice/ice_ptp_hw.c        | 259 ++++++++++++++++-
 drivers/net/ethernet/intel/ice/ice_ptp_hw.h        |   5 +
 drivers/net/ethernet/intel/ice/ice_txrx.c          |  29 +-
 drivers/net/ethernet/intel/ice/ice_txrx.h          |  16 +-
 drivers/net/ethernet/intel/ice/ice_vf_lib.c        |   7 +-
 drivers/net/ethernet/intel/idpf/idpf_idc.c         |   6 +
 drivers/net/ethernet/mediatek/mtk_eth_soc.c        |  22 +-
 drivers/net/ethernet/mediatek/mtk_ppe.c            |  30 ++
 drivers/net/ethernet/mediatek/mtk_ppe.h            |   1 +
 .../mellanox/mlx5/core/en_accel/ipsec_offload.c    |  12 +-
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c  |   8 +
 drivers/net/ethernet/mellanox/mlx5/core/main.c     |   4 +-
 drivers/net/ethernet/meta/fbnic/fbnic_pci.c        |   2 +-
 drivers/net/ethernet/microsoft/mana/gdma_main.c    |   7 +-
 drivers/net/ethernet/microsoft/mana/mana_en.c      |  39 +--
 .../ethernet/netronome/nfp/nfpcore/nfp_target.c    |  17 +-
 drivers/net/ethernet/sfc/efx_devlink.c             |   2 +-
 drivers/net/ethernet/ti/Makefile                   |  30 +-
 drivers/net/ethernet/ti/cpsw.c                     |   2 +-
 drivers/net/ethernet/ti/cpsw_ale.c                 |  25 ++
 drivers/net/ethernet/ti/cpsw_ethtool.c             |  24 ++
 drivers/net/ethernet/ti/cpsw_new.c                 |   2 +-
 drivers/net/ethernet/ti/cpsw_priv.c                |  39 ++-
 drivers/net/ethernet/ti/cpsw_priv.h                |   2 +-
 drivers/net/ethernet/ti/cpsw_sl.c                  |  11 +
 drivers/net/ethernet/ti/davinci_cpdma.c            |  27 ++
 drivers/net/hamradio/6pack.c                       |   9 +-
 drivers/net/ipa/gsi.c                              |   1 +
 drivers/net/ipa/ipa_main.c                         |   6 +-
 drivers/net/macsec.c                               |  71 ++++-
 drivers/net/macvlan.c                              |   9 +-
 drivers/net/mctp/mctp-i2c.c                        |   4 +-
 drivers/net/netconsole.c                           |  49 ++--
 drivers/net/netdevsim/dev.c                        |   2 +-
 drivers/net/phy/dp83869.c                          |  13 +-
 drivers/net/phy/phy_device.c                       |   4 +-
 drivers/net/phy/qcom/at803x.c                      |   2 +-
 drivers/net/ppp/ppp_generic.c                      |   5 +-
 drivers/net/ppp/pppoe.c                            |   8 +-
 drivers/net/slip/slhc.c                            |  49 ++--
 drivers/net/usb/r8152.c                            |   2 +-
 drivers/net/usb/rtl8150.c                          |  12 +-
 drivers/net/virtio_net.c                           |   6 +
 drivers/net/vrf.c                                  |  15 +-
 drivers/net/wireless/ath/ath10k/wmi-tlv.c          |  26 +-
 drivers/net/wireless/ath/ath11k/mac.c              |  28 +-
 drivers/net/wireless/ath/ath12k/dp_htt.c           |  24 +-
 drivers/net/wireless/ath/ath12k/hal.h              |  31 +-
 drivers/net/wireless/ath/ath12k/mac.c              |  51 ++--
 drivers/net/wireless/ath/ath12k/wifi7/dp_mon.c     |  76 +++--
 .../wireless/broadcom/brcm80211/brcmfmac/chip.c    |  15 +
 drivers/net/wireless/marvell/libertas/if_usb.c     |  32 ++-
 drivers/net/wireless/marvell/libertas/if_usb.h     |   3 +
 drivers/net/wireless/marvell/mwifiex/11n_aggr.c    |   1 +
 drivers/net/wireless/mediatek/mt76/channel.c       |  13 +-
 drivers/net/wireless/mediatek/mt76/dma.c           |  11 +-
 drivers/net/wireless/mediatek/mt76/eeprom.c        | 154 +++++++---
 drivers/net/wireless/mediatek/mt76/mac80211.c      |   1 +
 drivers/net/wireless/mediatek/mt76/mt76.h          |   5 +-
 drivers/net/wireless/mediatek/mt76/mt7615/mac.c    |  15 -
 drivers/net/wireless/mediatek/mt76/mt7615/main.c   |   7 +-
 drivers/net/wireless/mediatek/mt76/mt7615/mcu.c    |  47 +++
 drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h |   5 +-
 drivers/net/wireless/mediatek/mt76/mt7615/regs.h   |   2 -
 .../net/wireless/mediatek/mt76/mt76_connac_mac.c   |   6 +-
 .../net/wireless/mediatek/mt76/mt76_connac_mcu.c   |  16 +-
 drivers/net/wireless/mediatek/mt76/mt7915/init.c   |   1 +
 drivers/net/wireless/mediatek/mt76/mt7915/mac.c    |  13 -
 drivers/net/wireless/mediatek/mt76/mt7915/main.c   |   7 +-
 drivers/net/wireless/mediatek/mt76/mt7915/mcu.c    |  66 ++++-
 drivers/net/wireless/mediatek/mt76/mt7915/mcu.h    |  11 +
 drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h |   4 +
 drivers/net/wireless/mediatek/mt76/mt7921/main.c   |  22 +-
 drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h |   2 +
 drivers/net/wireless/mediatek/mt76/mt7925/init.c   |   2 +
 drivers/net/wireless/mediatek/mt76/mt7925/mac.c    |   9 +-
 drivers/net/wireless/mediatek/mt76/mt7925/main.c   |  22 +-
 drivers/net/wireless/mediatek/mt76/mt7925/mcu.c    |  13 +-
 drivers/net/wireless/mediatek/mt76/mt7925/mt7925.h |   4 +-
 drivers/net/wireless/mediatek/mt76/mt7925/regd.c   |   3 +-
 drivers/net/wireless/mediatek/mt76/mt7996/init.c   |  22 +-
 drivers/net/wireless/mediatek/mt76/mt7996/mac.c    |  44 +--
 drivers/net/wireless/mediatek/mt76/mt7996/main.c   | 121 +++++---
 drivers/net/wireless/mediatek/mt76/mt7996/mcu.c    |  51 +++-
 drivers/net/wireless/mediatek/mt76/mt7996/mcu.h    |   5 +-
 drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h |   2 +
 drivers/net/wireless/mediatek/mt76/mt7996/npu.c    |  23 +-
 drivers/net/wireless/mediatek/mt76/npu.c           |   1 +
 drivers/net/wireless/mediatek/mt76/scan.c          |  66 ++++-
 drivers/net/wireless/realtek/rtlwifi/pci.c         |   1 +
 drivers/net/wireless/realtek/rtw89/phy.c           |   2 +-
 drivers/nfc/trf7970a.c                             |   3 +-
 drivers/nvme/host/apple.c                          |   1 +
 drivers/nvme/host/pci.c                            |   1 +
 drivers/nvme/target/tcp.c                          |  51 ++--
 drivers/opp/core.c                                 |   2 +-
 drivers/opp/debugfs.c                              |  20 +-
 drivers/pci/controller/cadence/pci-sky1.c          |   4 +-
 drivers/pci/controller/cadence/pcie-cadence-host.c |   7 +
 drivers/pci/controller/cadence/pcie-cadence.h      |  19 ++
 drivers/pci/controller/cadence/pcie-sg2042.c       |   2 +
 drivers/pci/controller/dwc/pci-imx6.c              |  11 +-
 .../pci/controller/dwc/pcie-designware-debugfs.c   |  21 +-
 drivers/pci/controller/dwc/pcie-designware-ep.c    |  31 +-
 drivers/pci/controller/dwc/pcie-designware-host.c  |  17 +-
 drivers/pci/controller/dwc/pcie-designware.c       |  16 +-
 drivers/pci/controller/dwc/pcie-designware.h       |   3 +
 drivers/pci/controller/dwc/pcie-qcom.c             |  17 +-
 drivers/pci/controller/dwc/pcie-rcar-gen4.c        |   2 +-
 drivers/pci/controller/dwc/pcie-tegra194.c         | 202 ++++++-------
 drivers/pci/controller/pcie-aspeed.c               |   8 +-
 drivers/pci/controller/pcie-mediatek-gen3.c        |   8 +-
 drivers/pci/controller/pcie-rzg3s-host.c           |  23 +-
 drivers/pci/endpoint/functions/pci-epf-test.c      |   8 +-
 drivers/pci/endpoint/functions/pci-epf-vntb.c      |  12 +-
 drivers/pci/endpoint/pci-ep-msi.c                  |   5 +
 drivers/pci/npem.c                                 |   2 +-
 drivers/pci/pci-driver.c                           |  20 +-
 drivers/pci/pci-sysfs.c                            |  28 --
 drivers/pci/pci.c                                  |  41 ++-
 drivers/pci/pcie/dpc.c                             |   1 +
 drivers/pci/probe.c                                |   1 -
 drivers/pci/setup-bus.c                            |  59 +++-
 drivers/pci/tph.c                                  |   9 +-
 drivers/pcmcia/rsrc_nonstatic.c                    |   6 +-
 drivers/phy/apple/atc.c                            |   8 +-
 drivers/pinctrl/microchip/pinctrl-mpfs-mssio.c     |   2 +-
 drivers/pinctrl/nomadik/pinctrl-abx500.c           |   2 +-
 drivers/pinctrl/pinconf-generic.c                  |   7 +-
 drivers/pinctrl/pinctrl-cy8c95x0.c                 |  27 +-
 drivers/pinctrl/pinctrl-pic32.c                    |  20 +-
 drivers/pinctrl/realtek/pinctrl-rtd.c              |   2 +-
 drivers/pinctrl/renesas/pinctrl-rzg2l.c            |   7 +
 drivers/pinctrl/sophgo/pinctrl-sg2042.c            |   2 +-
 drivers/pinctrl/sophgo/pinctrl-sg2044.c            |   2 +-
 drivers/platform/chrome/chromeos_tbmc.c            |   6 +
 drivers/platform/surface/surfacepro3_button.c      |   1 +
 drivers/platform/wmi/core.c                        |  36 +--
 drivers/platform/x86/asus-wmi.c                    |  50 ++--
 drivers/platform/x86/barco-p50-gpio.c              |   5 +-
 .../x86/dell/dell-wmi-sysman/enum-attributes.c     |  34 ++-
 drivers/platform/x86/dell/dell_rbu.c               |   6 +-
 drivers/platform/x86/hp/hp-wmi.c                   |  93 ++++--
 drivers/platform/x86/intel/vsec_tpmi.c             |  10 +-
 drivers/platform/x86/lenovo/wmi-capdata.c          |   8 +-
 drivers/platform/x86/lenovo/wmi-capdata.h          |  20 ++
 drivers/platform/x86/lenovo/wmi-events.c           |   2 +-
 drivers/platform/x86/lenovo/wmi-gamezone.c         |   3 +-
 drivers/platform/x86/lenovo/wmi-gamezone.h         |  20 --
 drivers/platform/x86/lenovo/wmi-helpers.c          |   4 +-
 drivers/platform/x86/lenovo/wmi-helpers.h          |  13 +
 drivers/platform/x86/lenovo/wmi-other.c            | 190 +++++++++----
 drivers/platform/x86/panasonic-laptop.c            |   5 +-
 drivers/pmdomain/imx/scu-pd.c                      |   1 +
 drivers/pmdomain/ti/omap_prm.c                     |   1 +
 drivers/power/supply/max77705_charger.c            |  36 +--
 drivers/pwm/pwm-atmel-tcb.c                        |  38 ++-
 drivers/pwm/pwm-stm32.c                            |  22 +-
 drivers/regulator/fp9931.c                         |   2 +-
 drivers/remoteproc/imx_rproc.c                     |   6 +-
 drivers/remoteproc/xlnx_r5_remoteproc.c            |   2 +-
 drivers/resctrl/mpam_devices.c                     | 122 ++++----
 drivers/resctrl/mpam_internal.h                    |   6 -
 drivers/reset/amlogic/reset-meson.c                |   1 +
 drivers/rtc/rtc-abx80x.c                           |   2 +
 drivers/s390/cio/cio.h                             |   5 -
 drivers/s390/cio/css.c                             |  34 +--
 drivers/s390/crypto/ap_bus.c                       |  34 +--
 drivers/s390/crypto/ap_bus.h                       |   1 -
 drivers/s390/crypto/ap_queue.c                     |  24 +-
 drivers/scsi/hpsa.h                                |   4 +-
 drivers/scsi/qla2xxx/qla_attr.c                    |  62 +++-
 drivers/scsi/qla2xxx/qla_init.c                    |   2 +-
 drivers/scsi/qla2xxx/qla_mbx.c                     |   9 +
 drivers/scsi/sg.c                                  |  31 +-
 drivers/scsi/sr.c                                  |  11 +-
 drivers/scsi/sr.h                                  |   1 -
 drivers/soc/qcom/llcc-qcom.c                       |   2 +-
 drivers/soc/qcom/ocmem.c                           |  17 +-
 drivers/soc/qcom/qcom_aoss.c                       |   2 +-
 drivers/soc/qcom/ubwc_config.c                     |   3 +-
 drivers/soc/tegra/cbb/tegra234-cbb.c               |  35 ++-
 drivers/soc/tegra/pmc.c                            |   7 +-
 drivers/soundwire/bus.c                            |   8 +-
 drivers/soundwire/cadence_master.c                 |   8 +
 drivers/soundwire/debugfs.c                        |   9 +-
 drivers/soundwire/intel_ace2x.c                    |   5 +
 drivers/spi/spi-amlogic-spisg.c                    |   3 +-
 drivers/spi/spi-atcspi200.c                        |   4 +-
 drivers/spi/spi-axiado.c                           |   3 +-
 drivers/spi/spi-cadence-quadspi.c                  |   4 -
 drivers/spi/spi-fsl-qspi.c                         |   3 +-
 drivers/spi/spi-hisi-kunpeng.c                     |  12 +-
 drivers/spi/spi-mtk-snfi.c                         |  14 +
 drivers/spi/spi-nxp-fspi.c                         |   3 +-
 drivers/spi/spi-nxp-xspi.c                         |   3 +-
 drivers/spi/spi-rockchip.c                         |   3 +-
 drivers/spi/spi-rzv2h-rspi.c                       |  20 +-
 drivers/spi/spi-sifive.c                           |  29 +-
 drivers/staging/greybus/hid.c                      |   2 +-
 drivers/staging/greybus/raw.c                      |  92 +++---
 drivers/staging/media/imx/imx-media-csi.c          |  44 +--
 drivers/target/target_core_sbc.c                   |   3 +-
 drivers/thermal/spear_thermal.c                    |   2 +-
 drivers/tty/hvc/hvc_iucv.c                         |   2 +-
 drivers/tty/serial/ip22zilog.c                     |   2 +-
 drivers/usb/typec/mux/ps883x.c                     |   1 +
 drivers/usb/typec/tipd/core.c                      |   6 +-
 drivers/vdpa/vdpa.c                                |  48 +---
 drivers/vfio/fsl-mc/vfio_fsl_mc.c                  |   4 +-
 drivers/vfio/pci/vfio_pci_core.c                   |  28 +-
 drivers/vhost/net.c                                |   4 +-
 drivers/video/backlight/sky81452-backlight.c       |   3 +
 drivers/video/fbdev/matrox/g450_pll.c              |   2 +-
 drivers/video/fbdev/offb.c                         |   7 +-
 drivers/virt/coco/arm-cca-guest/arm-cca-guest.c    |   3 +-
 drivers/virt/coco/sev-guest/sev-guest.c            |  12 +-
 drivers/xen/xen-pciback/pci_stub.c                 |   6 +-
 fs/adfs/super.c                                    |   3 +
 fs/btrfs/disk-io.c                                 |   1 +
 fs/btrfs/inode.c                                   |   5 +-
 fs/btrfs/reflink.c                                 |  45 +++
 fs/btrfs/relocation.c                              |  14 +-
 fs/btrfs/transaction.c                             |   9 +-
 fs/btrfs/volumes.c                                 |   7 +-
 fs/ceph/addr.c                                     |   2 +
 fs/ceph/xattr.c                                    |  17 ++
 fs/d_path.c                                        |  11 +-
 fs/debugfs/file.c                                  |   7 +-
 fs/erofs/data.c                                    |  14 +
 fs/erofs/erofs_fs.h                                |   4 +-
 fs/erofs/inode.c                                   |   2 +-
 fs/erofs/super.c                                   |   8 +-
 fs/erofs/zdata.c                                   |   2 +-
 fs/erofs/zmap.c                                    |  19 +-
 fs/eventpoll.c                                     | 126 +++++----
 fs/ext4/extents-test.c                             |  64 +++--
 fs/ext4/mballoc-test.c                             |   6 +-
 fs/f2fs/gc.c                                       |   5 +-
 fs/f2fs/node.c                                     |   3 +
 fs/f2fs/super.c                                    |  29 +-
 fs/f2fs/sysfs.c                                    |   7 +-
 fs/fuse/dir.c                                      |   5 +
 fs/fuse/file.c                                     |  10 +-
 fs/gfs2/aops.c                                     |   5 +-
 fs/gfs2/inode.c                                    |   3 +-
 fs/gfs2/log.c                                      |  33 ++-
 fs/internal.h                                      |   1 -
 fs/lockd/svclock.c                                 |   5 +
 fs/mbcache.c                                       |   1 +
 fs/netfs/iterator.c                                |  13 +-
 fs/nfs/blocklayout/blocklayout.c                   |   4 +-
 fs/nfsd/nfs4proc.c                                 |  18 +-
 fs/nfsd/nfs4state.c                                |  77 +++--
 fs/nfsd/nfs4xdr.c                                  |  23 +-
 fs/nfsd/nfsfh.c                                    |   9 +-
 fs/nfsd/state.h                                    |  13 +-
 fs/nfsd/xdr4.h                                     |   1 +
 fs/nilfs2/ioctl.c                                  |   6 +
 fs/notify/fanotify/fanotify_user.c                 |  50 ++--
 fs/notify/mark.c                                   |  39 ++-
 fs/ntfs3/attrib.c                                  |  15 +
 fs/ntfs3/inode.c                                   |  10 +-
 fs/ntfs3/super.c                                   |   7 +-
 fs/ocfs2/dlm/dlmdomain.c                           |  10 +-
 fs/ocfs2/ioctl.c                                   |  18 +-
 fs/ocfs2/resize.c                                  |  12 +-
 fs/ocfs2/xattr.c                                   |   4 +-
 fs/omfs/inode.c                                    |   6 +
 fs/open.c                                          |  12 +-
 fs/pstore/ram_core.c                               |   4 +
 fs/quota/dquot.c                                   |  38 ++-
 fs/resctrl/ctrlmondata.c                           |   1 +
 fs/smb/client/ioctl.c                              |   2 +-
 fs/smb/client/smb2file.c                           |   3 +
 fs/smb/client/smb2transport.c                      |  32 ++-
 fs/smb/server/auth.c                               |  11 +-
 fs/smb/server/connection.c                         |   9 +
 fs/smb/server/mgmt/user_session.c                  |  12 +-
 fs/smb/server/smb2pdu.c                            |  15 +-
 fs/tracefs/event_inode.c                           |  96 +++----
 fs/xfs/xfs_zone_alloc.c                            |   2 +-
 include/acpi/actbl1.h                              |   6 +
 include/drm/ttm/ttm_resource.h                     |   2 +
 include/dt-bindings/clock/qcom,gcc-sc8180x.h       |   5 +
 include/dt-bindings/clock/qcom,glymur-gcc.h        |   1 +
 include/linux/cdrom.h                              |   1 +
 include/linux/cpufreq.h                            |   4 +-
 include/linux/cpuhotplug.h                         |   1 -
 include/linux/dmi.h                                |   5 +
 include/linux/dpll.h                               |   1 +
 include/linux/fsl/mc.h                             |   4 -
 include/linux/fsl/ntmp.h                           |   9 +-
 include/linux/hid.h                                |   6 +-
 include/linux/hid_bpf.h                            |  14 +-
 include/linux/ieee80211-eht.h                      |   4 +-
 include/linux/iopoll.h                             |   8 +-
 include/linux/irqchip/arm-gic-v5.h                 |   3 -
 include/linux/moduleparam.h                        |  11 +-
 include/linux/mtd/spinand.h                        |   7 +
 include/linux/mutex.h                              |   6 +-
 include/linux/nstree.h                             |   6 +-
 include/linux/padata.h                             |   8 +-
 include/linux/pci.h                                |   6 -
 include/linux/pm_domain.h                          |   4 +-
 include/linux/ppp_defs.h                           |  16 ++
 include/linux/printk.h                             |   5 +-
 include/linux/quotaops.h                           |   9 +-
 include/linux/rculist.h                            |  29 ++
 include/linux/rseq.h                               |  35 ++-
 include/linux/rseq_entry.h                         | 122 ++++----
 include/linux/rseq_types.h                         |  13 +-
 include/linux/rwlock.h                             |   4 +-
 include/linux/rwlock_api_smp.h                     |   6 +-
 include/linux/sched/deadline.h                     |   9 +
 include/linux/sched/signal.h                       |   2 +-
 include/linux/sched/topology.h                     |  24 +-
 include/linux/spi/spi-mem.h                        |   8 +
 include/linux/spinlock.h                           |   3 +-
 include/linux/spinlock_up.h                        |  20 +-
 include/linux/stop_machine.h                       |   4 +-
 include/linux/sunrpc/debug.h                       |  10 +-
 include/linux/sunrpc/sched.h                       |   3 -
 include/linux/syscalls.h                           |   8 +-
 include/linux/tcp.h                                |   4 +-
 include/linux/trace_printk.h                       |   1 -
 include/linux/vdpa.h                               |   4 -
 include/linux/vfio.h                               |   2 -
 include/linux/wmi.h                                |   4 -
 include/linux/workqueue.h                          |  24 ++
 include/linux/ww_mutex.h                           |   4 +-
 include/net/bond_3ad.h                             |   2 +-
 include/net/dropreason-core.h                      |   6 +
 include/net/ip6_tunnel.h                           |   2 +-
 include/net/netfilter/nf_tables.h                  |  13 +
 include/net/pie.h                                  |   2 +-
 include/net/sch_generic.h                          |  16 +-
 include/net/tcp.h                                  |  31 +-
 include/net/tcp_ecn.h                              |   2 +-
 include/rdma/ib_umem.h                             |   1 +
 include/sound/soc-component.h                      |   4 +
 include/sound/soc.h                                |   3 +
 include/trace/events/dma_fence.h                   |  35 +--
 include/trace/events/mptcp.h                       |   2 +-
 include/trace/events/net.h                         |   4 +-
 include/trace/events/timer.h                       |  11 +-
 include/uapi/linux/if_link.h                       |   2 +
 include/uapi/linux/iommufd.h                       |   5 +
 include/uapi/linux/mii.h                           |   3 +-
 io_uring/io-wq.c                                   |   3 +-
 io_uring/napi.c                                    |   2 +
 kernel/audit.c                                     |   4 +
 kernel/auditsc.c                                   |   2 +-
 kernel/bpf/arena.c                                 |   4 +
 kernel/bpf/arraymap.c                              |   4 +-
 kernel/bpf/bpf_local_storage.c                     |   3 +
 kernel/bpf/bpf_lsm.c                               |   3 -
 kernel/bpf/btf.c                                   |   2 +-
 kernel/bpf/core.c                                  |   2 +
 kernel/bpf/devmap.c                                |   5 +-
 kernel/bpf/hashtab.c                               |   6 +-
 kernel/bpf/helpers.c                               |  17 +-
 kernel/bpf/local_storage.c                         |   2 +-
 kernel/bpf/offload.c                               |  10 +-
 kernel/bpf/syscall.c                               |  17 ++
 kernel/bpf/task_iter.c                             | 151 +++++++++-
 kernel/bpf/verifier.c                              | 111 ++++++--
 kernel/cgroup/cgroup.c                             |  24 +-
 kernel/cgroup/cpuset-internal.h                    |   6 +
 kernel/cgroup/cpuset.c                             |  53 ++--
 kernel/cgroup/dmem.c                               |   1 +
 kernel/cgroup/rdma.c                               |   2 +-
 kernel/fork.c                                      |  23 +-
 kernel/futex/requeue.c                             |  13 +-
 kernel/locking/mutex.c                             |   4 +-
 kernel/module/main.c                               |   4 +-
 kernel/padata.c                                    | 130 ++++-----
 kernel/params.c                                    |  27 +-
 kernel/printk/printk_ringbuffer.c                  |   8 +-
 kernel/rseq.c                                      | 185 +++++++-----
 kernel/sched/core.c                                |  25 +-
 kernel/sched/cpufreq_schedutil.c                   |   5 +-
 kernel/sched/deadline.c                            |  31 +-
 kernel/sched/ext.c                                 |   4 +-
 kernel/sched/fair.c                                |  30 +-
 kernel/sched/membarrier.c                          |  11 +-
 kernel/sched/rt.c                                  |  20 +-
 kernel/sched/topology.c                            |  14 +-
 kernel/time/hrtimer.c                              |  51 ++--
 kernel/trace/trace_branch.c                        |   8 +-
 kernel/trace/trace_events_hist.c                   |  12 +-
 kernel/trace/trace_kprobe.c                        |   8 +
 kernel/trace/trace_printk.c                        |   1 +
 kernel/workqueue.c                                 |  52 +++-
 lib/tests/kunit_iov_iter.c                         |  14 +-
 mm/Kconfig                                         |   1 +
 mm/memblock.c                                      |   2 +-
 net/bluetooth/hci_event.c                          |   3 -
 net/bluetooth/l2cap_core.c                         |   8 +-
 net/bluetooth/sco.c                                |   3 +-
 net/bpf/test_run.c                                 |  35 ++-
 net/ceph/auth_x.c                                  |   5 +
 net/ceph/crush/crush.c                             |   6 +-
 net/ceph/osdmap.c                                  |  14 +-
 net/core/dev.c                                     | 192 +++++++------
 net/core/filter.c                                  |  12 +-
 net/core/neighbour.c                               |  10 +-
 net/core/netpoll.c                                 |  19 +-
 net/core/page_pool.c                               |  10 +-
 net/core/skbuff.c                                  |   4 +-
 net/dsa/conduit.c                                  |  16 +-
 net/ipv4/ip_tunnel_core.c                          |   2 +-
 net/ipv4/netfilter/arp_tables.c                    |  18 +-
 net/ipv4/netfilter/arpt_mangle.c                   |   8 +
 net/ipv4/netfilter/iptable_nat.c                   |   4 +-
 net/ipv4/nexthop.c                                 |   4 +-
 net/ipv4/syncookies.c                              |   2 +-
 net/ipv4/tcp.c                                     |  62 ++--
 net/ipv4/tcp_bbr.c                                 |   6 +-
 net/ipv4/tcp_bic.c                                 |   2 +-
 net/ipv4/tcp_cdg.c                                 |   4 +-
 net/ipv4/tcp_cubic.c                               |   6 +-
 net/ipv4/tcp_dctcp.c                               |   2 +-
 net/ipv4/tcp_input.c                               |  52 ++--
 net/ipv4/tcp_metrics.c                             |   6 +-
 net/ipv4/tcp_nv.c                                  |   4 +-
 net/ipv4/tcp_output.c                              |  43 +--
 net/ipv4/tcp_plb.c                                 |   2 +-
 net/ipv4/tcp_timer.c                               |   7 +-
 net/ipv4/tcp_vegas.c                               |   9 +-
 net/ipv4/tcp_westwood.c                            |   4 +-
 net/ipv4/tcp_yeah.c                                |   3 +-
 net/ipv4/udp.c                                     |  12 +-
 net/ipv6/icmp.c                                    |  10 +-
 net/ipv6/netfilter/ip6table_nat.c                  |   4 +-
 net/ipv6/udp.c                                     |  13 +-
 net/mac80211/mlme.c                                |   3 +-
 net/mptcp/protocol.c                               |  63 +++--
 net/mptcp/protocol.h                               |  37 ++-
 net/netfilter/ipvs/ip_vs_xmit.c                    |  19 +-
 net/netfilter/nf_conntrack_proto_sctp.c            |  10 +-
 net/netfilter/nf_conntrack_sip.c                   | 160 ++++++++---
 net/netfilter/nf_nat_amanda.c                      |   2 +-
 net/netfilter/nf_nat_core.c                        |  10 +-
 net/netfilter/nf_nat_sip.c                         |  34 ++-
 net/netfilter/nf_tables_api.c                      | 314 +++++++++++++++------
 net/netfilter/nfnetlink_osf.c                      |  45 ++-
 net/netfilter/nft_ct.c                             |   2 +
 net/netfilter/nft_fwd_netdev.c                     |  10 +
 net/netfilter/nft_osf.c                            |   6 +-
 net/netfilter/xt_mac.c                             |  34 ++-
 net/netfilter/xt_owner.c                           |  37 ++-
 net/netfilter/xt_physdev.c                         |  29 +-
 net/netfilter/xt_policy.c                          |   2 +-
 net/netfilter/xt_realm.c                           |   2 +-
 net/netfilter/xt_socket.c                          |  23 +-
 net/openvswitch/datapath.c                         |  35 ++-
 net/openvswitch/vport.c                            |   3 +
 net/phonet/socket.c                                |  10 +-
 net/psp/psp-nl-gen.c                               |   4 +-
 net/psp/psp_nl.c                                   |  10 +-
 net/rds/af_rds.c                                   |  10 +-
 net/rds/connection.c                               |  14 +
 net/rds/ib.c                                       |  24 +-
 net/rds/ib.h                                       |   1 +
 net/rds/ib_rdma.c                                  |   2 +-
 net/sched/act_ct.c                                 |   8 +-
 net/sched/act_mirred.c                             |   2 +-
 net/sched/cls_fw.c                                 |   6 +-
 net/sched/sch_cake.c                               | 219 +++++++-------
 net/sched/sch_choke.c                              |  26 +-
 net/sched/sch_dualpi2.c                            |  32 ++-
 net/sched/sch_fq_codel.c                           |   3 +-
 net/sched/sch_fq_pie.c                             |  19 +-
 net/sched/sch_hhf.c                                |  19 +-
 net/sched/sch_netem.c                              |  76 ++++-
 net/sched/sch_pie.c                                |  52 ++--
 net/sched/sch_red.c                                |  31 +-
 net/sched/sch_sfb.c                                |  54 ++--
 net/sched/sch_taprio.c                             |  22 +-
 net/sctp/inqueue.c                                 |   1 +
 net/sctp/ipv6.c                                    |   2 +
 net/sctp/protocol.c                                |   2 +
 net/sctp/sm_statefuns.c                            |   6 +
 net/sctp/socket.c                                  |   5 +-
 net/sunrpc/xprtrdma/svc_rdma_transport.c           |  27 +-
 net/tipc/msg.c                                     |  14 +-
 net/tls/tls.h                                      |   1 +
 net/tls/tls_strp.c                                 |   6 +
 net/tls/tls_sw.c                                   |   4 +
 net/unix/af_unix.c                                 |  44 ++-
 net/unix/unix_bpf.c                                |   3 +
 net/vmw_vsock/virtio_transport_common.c            |  11 +-
 rust/kernel/cpufreq.rs                             |  13 +-
 rust/kernel/sync/atomic.rs                         |   5 +-
 scripts/gdb/linux/timerlist.py                     |   2 +-
 scripts/package/builddeb                           |   8 +-
 security/integrity/ima/ima_crypto.c                |   2 +-
 security/integrity/ima/ima_fs.c                    |  16 +-
 sound/core/compress_offload.c                      |   7 -
 sound/core/sound.c                                 |   7 +
 sound/hda/codecs/cmedia.c                          |   7 -
 sound/hda/codecs/conexant.c                        |   8 +-
 sound/hda/codecs/realtek/alc269.c                  |  30 +-
 sound/hda/codecs/side-codecs/cs35l56_hda.c         |  12 +-
 sound/hda/codecs/side-codecs/cs35l56_hda.h         |   1 +
 sound/hda/codecs/side-codecs/tas2781_hda_spi.c     |  14 +-
 sound/hda/common/codec.c                           |  46 ++-
 sound/hda/common/hda_local.h                       |   1 +
 sound/isa/sc6000.c                                 | 152 ++++++----
 sound/soc/amd/acp-pcm-dma.c                        |   2 +-
 sound/soc/amd/acp/acp-legacy-mach.c                |   2 +-
 sound/soc/amd/acp/acp-mach-common.c                |  22 +-
 sound/soc/amd/acp/acp-mach.h                       |   4 +
 sound/soc/amd/acp/acp-platform.c                   |   2 +-
 sound/soc/amd/acp/acp-sdw-legacy-mach.c            |   4 +-
 sound/soc/amd/acp/acp-sof-mach.c                   |   2 +-
 sound/soc/amd/ps/ps-pdm-dma.c                      |   3 +-
 sound/soc/amd/ps/ps-sdw-dma.c                      |   2 +-
 sound/soc/amd/raven/acp3x-pcm-dma.c                |   2 +-
 sound/soc/amd/renoir/acp3x-pdm-dma.c               |   2 +-
 sound/soc/amd/vangogh/acp5x-pcm-dma.c              |   2 +-
 sound/soc/amd/yc/acp6x-pdm-dma.c                   |   2 +-
 sound/soc/codecs/ab8500-codec.c                    |   6 +-
 sound/soc/codecs/cs35l56-shared.c                  |   7 +-
 sound/soc/codecs/tas2764.c                         |   1 +
 sound/soc/codecs/tas2770.c                         |   4 +-
 sound/soc/fsl/fsl_easrc.c                          | 123 +++++---
 sound/soc/fsl/fsl_micfil.c                         |  72 ++++-
 sound/soc/fsl/fsl_xcvr.c                           |  22 +-
 sound/soc/generic/audio-graph-card.c               |   1 +
 sound/soc/intel/Kconfig                            |   2 +-
 sound/soc/intel/avs/tgl.c                          |  38 ++-
 sound/soc/qcom/qdsp6/audioreach.c                  |   5 +
 sound/soc/qcom/qdsp6/topology.c                    |   8 +-
 sound/soc/renesas/rcar/core.c                      |   2 +-
 sound/soc/rockchip/rockchip_sai.c                  |   4 +
 sound/soc/sdca/sdca_asoc.c                         |  41 ++-
 sound/soc/sdca/sdca_class.c                        |  34 ++-
 sound/soc/sdca/sdca_fdl.c                          |   5 -
 sound/soc/sdca/sdca_functions.c                    |   6 +-
 sound/soc/soc-component.c                          |  10 +-
 sound/soc/soc-compress.c                           |   4 +-
 sound/soc/soc-pcm.c                                |   4 +-
 sound/soc/sof/compress.c                           |   8 +-
 sound/soc/sof/intel/hda-stream.c                   |  10 +-
 sound/soc/sof/intel/hda.c                          |   3 +-
 sound/soc/sof/sof-priv.h                           |   2 +
 sound/soc/sti/uniperif_player.c                    |   9 +-
 sound/usb/midi.c                                   |  12 +-
 sound/usb/midi2.c                                  |  12 +-
 sound/usb/mixer_scarlett2.c                        |   2 +-
 sound/usb/qcom/qc_audio_offload.c                  |  33 ++-
 sound/usb/quirks.c                                 |   3 +-
 sound/usb/stream.c                                 |  58 ++--
 sound/usb/stream.h                                 |   3 +-
 tools/build/feature/Makefile                       |  10 +-
 tools/hv/Makefile                                  |   4 +-
 tools/include/nolibc/arch-mips.h                   |  15 +-
 tools/include/nolibc/compiler.h                    |   8 +-
 tools/include/nolibc/stdio.h                       | 132 ++++++---
 tools/lib/bpf/libbpf.c                             |  23 +-
 tools/lib/bpf/relo_core.c                          |   2 +
 tools/perf/builtin-lock.c                          |   2 +-
 tools/perf/builtin-stat.c                          |  71 +++--
 tools/perf/builtin-trace.c                         |  12 +-
 .../pmu-events/arch/common/common/metrics.json     |   6 +-
 tools/perf/pmu-events/empty-pmu-events.c           | 108 +++----
 tools/perf/tests/parse-events.c                    |  49 ++--
 tools/perf/tests/shell/data_type_profiling.sh      |   6 +-
 tools/perf/tests/workloads/datasym.c               |   6 +-
 tools/perf/util/branch.h                           |   3 +
 tools/perf/util/cgroup.c                           |  30 +-
 tools/perf/util/cs-etm-decoder/cs-etm-decoder.c    |  51 +---
 tools/perf/util/expr.c                             |   3 +-
 tools/perf/util/maps.c                             |  15 +-
 tools/perf/util/symbol-elf.c                       |   8 +-
 tools/perf/util/util.h                             |   1 -
 tools/power/x86/turbostat/turbostat.c              |  96 +++++--
 tools/sched_ext/scx_pair.c                         |  14 +-
 tools/sched_ext/scx_sdt.bpf.c                      |   3 +-
 tools/testing/ktest/ktest.pl                       |  35 ++-
 tools/testing/selftests/arm64/gcs/gcs-util.h       |   6 -
 tools/testing/selftests/arm64/gcs/libc-gcs.c       |   1 +
 .../testing/selftests/bpf/prog_tests/reg_bounds.c  |  35 +++
 tools/testing/selftests/bpf/prog_tests/snprintf.c  |   3 +-
 .../selftests/bpf/prog_tests/sockmap_basic.c       |  17 +-
 .../selftests/bpf/prog_tests/test_bpf_smc.c        |   6 +-
 tools/testing/selftests/bpf/progs/bpf_misc.h       |   2 +-
 tools/testing/selftests/bpf/progs/bpf_smc.c        |  28 +-
 tools/testing/selftests/cgroup/test_memcontrol.c   |  11 +-
 tools/testing/selftests/ftrace/ftracetest          |  18 +-
 .../ftrace/test.d/00basic/trace_marker_raw.tc      |   2 +
 tools/testing/selftests/ftrace/test.d/functions    |   4 +
 .../selftests/futex/functional/futex_requeue.c     |  49 +---
 tools/testing/selftests/mm/migration.c             |   3 +-
 .../selftests/namespaces/listns_efault_test.c      |   1 -
 .../selftests/net/netfilter/nft_tproxy_udp.sh      |  14 +-
 .../net/packetdrill/tcp_ts_recent_invalid_ack.pkt  |   4 +-
 tools/testing/selftests/nolibc/nolibc-test.c       |  26 +-
 tools/testing/selftests/powerpc/vphn/Makefile      |   2 +-
 tools/testing/selftests/sched_ext/exit.c           |   2 +-
 tools/testing/selftests/vfio/Makefile              |   2 +-
 .../selftests/vfio/vfio_dma_mapping_mmio_test.c    |   1 -
 tools/tracing/rtla/src/common.c                    |  48 +++-
 tools/tracing/rtla/src/common.h                    |   2 +
 tools/tracing/rtla/src/osnoise_hist.c              |   3 +-
 tools/tracing/rtla/src/osnoise_top.c               |   3 +-
 tools/tracing/rtla/src/timerlat_hist.c             |   3 +-
 tools/tracing/rtla/src/timerlat_top.c              |   3 +-
 tools/tracing/rtla/src/trace.c                     |  19 +-
 tools/tracing/rtla/src/utils.c                     |  25 +-
 virt/kvm/dirty_ring.c                              |   3 +-
 1074 files changed, 11781 insertions(+), 6245 deletions(-)
author maintainer
#40 lore raw

PATCH 36/1146 cpufreq: Pass the policy to cpufreq_driver->adjust_perf()

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: K Prateek Nayak <[email protected]>

[ Upstream commit c03791085adcd61fa9b766ab303c7d0941d7378d ]

cpufreq_cpu_get() can sleep on PREEMPT_RT in presence of concurrent writer(s), however amd-pstate depends on fetching the cpudata via the policy's driver data which necessitates grabbing the reference.

Since schedutil governor can call "cpufreq_driver->update_perf()" during sched_tick/enqueue/dequeue with rq_lock held and IRQs disabled, fetching the policy object using the cpufreq_cpu_get() helper in the scheduler fast-path leads to "BUG: scheduling while atomic" on PREEMPT_RT [1].

Pass the cached cpufreq policy object in sg_policy to the update_perf() instead of just the CPU. The CPU can be inferred using "policy->cpu".

The lifetime of cpufreq_policy object outlasts that of the governor and the cpufreq driver (allocated when the CPU is onlined and only reclaimed when the CPU is offlined / the CPU device is removed) which makes it safe to be referenced throughout the governor's lifetime.

---
 drivers/cpufreq/amd-pstate.c     |  3 +--
 drivers/cpufreq/cpufreq.c        |  6 +++---
 drivers/cpufreq/intel_pstate.c   |  4 ++--
 include/linux/cpufreq.h          |  4 ++--
 kernel/sched/cpufreq_schedutil.c |  5 +++--
 rust/kernel/cpufreq.rs           | 13 ++++++-------
 6 files changed, 17 insertions(+), 18 deletions(-)
drivers/cpufreq/amd-pstate.c +1 -2
index 24cdeffbcd40e..78b70bdcb008f 100644
@@ -712,13 +712,12 @@ static unsigned int amd_pstate_fast_switch(struct cpufreq_policy *policy,
 	return policy->cur;
 }
 
-static void amd_pstate_adjust_perf(unsigned int cpu,
+static void amd_pstate_adjust_perf(struct cpufreq_policy *policy,
 				   unsigned long _min_perf,
 				   unsigned long target_perf,
 				   unsigned long capacity)
 {
 	u8 max_perf, min_perf, des_perf, cap_perf;
-	struct cpufreq_policy *policy __free(put_cpufreq_policy) = cpufreq_cpu_get(cpu);
 	struct amd_cpudata *cpudata;
 	union perf_cached perf;
 
drivers/cpufreq/cpufreq.c +3 -3
index 1f794524a1d92..44441ceedb768 100644
@@ -2228,7 +2228,7 @@ EXPORT_SYMBOL_GPL(cpufreq_driver_fast_switch);
 
 /**
  * cpufreq_driver_adjust_perf - Adjust CPU performance level in one go.
- * @cpu: Target CPU.
+ * @policy: cpufreq policy object of the target CPU.
  * @min_perf: Minimum (required) performance level (units of @capacity).
  * @target_perf: Target (desired) performance level (units of @capacity).
  * @capacity: Capacity of the target CPU.
@@ -2247,12 +2247,12 @@ EXPORT_SYMBOL_GPL(cpufreq_driver_fast_switch);
  * parallel with either ->target() or ->target_index() or ->fast_switch() for
  * the same CPU.
  */
-void cpufreq_driver_adjust_perf(unsigned int cpu,
+void cpufreq_driver_adjust_perf(struct cpufreq_policy *policy,
 				 unsigned long min_perf,
 				 unsigned long target_perf,
 				 unsigned long capacity)
 {
-	cpufreq_driver->adjust_perf(cpu, min_perf, target_perf, capacity);
+	cpufreq_driver->adjust_perf(policy, min_perf, target_perf, capacity);
 }
 
 /**
drivers/cpufreq/intel_pstate.c +2 -2
index 11c58af419006..0f50034e4b680 100644
@@ -3239,12 +3239,12 @@ static unsigned int intel_cpufreq_fast_switch(struct cpufreq_policy *policy,
 	return target_pstate * cpu->pstate.scaling;
 }
 
-static void intel_cpufreq_adjust_perf(unsigned int cpunum,
+static void intel_cpufreq_adjust_perf(struct cpufreq_policy *policy,
 				      unsigned long min_perf,
 				      unsigned long target_perf,
 				      unsigned long capacity)
 {
-	struct cpudata *cpu = all_cpu_data[cpunum];
+	struct cpudata *cpu = all_cpu_data[policy->cpu];
 	u64 hwp_cap = READ_ONCE(cpu->hwp_cap_cached);
 	int old_pstate = cpu->pstate.current_pstate;
 	int cap_pstate, min_pstate, max_pstate, target_pstate;
include/linux/cpufreq.h +2 -2
index cc894fc389710..4317c5a312bd1 100644
@@ -372,7 +372,7 @@ struct cpufreq_driver {
 	 * conditions) scale invariance can be disabled, which causes the
 	 * schedutil governor to fall back to the latter.
 	 */
-	void		(*adjust_perf)(unsigned int cpu,
+	void		(*adjust_perf)(struct cpufreq_policy *policy,
 				       unsigned long min_perf,
 				       unsigned long target_perf,
 				       unsigned long capacity);
@@ -617,7 +617,7 @@ struct cpufreq_governor {
 /* Pass a target to the cpufreq driver */
 unsigned int cpufreq_driver_fast_switch(struct cpufreq_policy *policy,
 					unsigned int target_freq);
-void cpufreq_driver_adjust_perf(unsigned int cpu,
+void cpufreq_driver_adjust_perf(struct cpufreq_policy *policy,
 				unsigned long min_perf,
 				unsigned long target_perf,
 				unsigned long capacity);
kernel/sched/cpufreq_schedutil.c +3 -2
index 153232dd8276a..ae9fd211cec1f 100644
@@ -461,6 +461,7 @@ static void sugov_update_single_perf(struct update_util_data *hook, u64 time,
 				     unsigned int flags)
 {
 	struct sugov_cpu *sg_cpu = container_of(hook, struct sugov_cpu, update_util);
+	struct sugov_policy *sg_policy = sg_cpu->sg_policy;
 	unsigned long prev_util = sg_cpu->util;
 	unsigned long max_cap;
 
@@ -482,10 +483,10 @@ static void sugov_update_single_perf(struct update_util_data *hook, u64 time,
 	if (sugov_hold_freq(sg_cpu) && sg_cpu->util < prev_util)
 		sg_cpu->util = prev_util;
 
-	cpufreq_driver_adjust_perf(sg_cpu->cpu, sg_cpu->bw_min,
+	cpufreq_driver_adjust_perf(sg_policy->policy, sg_cpu->bw_min,
 				   sg_cpu->util, max_cap);
 
-	sg_cpu->sg_policy->last_freq_update_time = time;
+	sg_policy->last_freq_update_time = time;
 }
 
 static unsigned int sugov_next_freq_shared(struct sugov_cpu *sg_cpu, u64 time)
rust/kernel/cpufreq.rs +6 -7
index f5adee48d40cb..d8d26870bea2e 100644
@@ -1257,18 +1257,17 @@ impl<T: Driver> Registration<T> {
     /// # Safety
     ///
     /// - This function may only be called from the cpufreq C infrastructure.
+    /// - The pointer arguments must be valid pointers.
     unsafe extern "C" fn adjust_perf_callback(
-        cpu: c_uint,
+        ptr: *mut bindings::cpufreq_policy,
         min_perf: c_ulong,
         target_perf: c_ulong,
         capacity: c_ulong,
     ) {
-        // SAFETY: The C API guarantees that `cpu` refers to a valid CPU number.
-        let cpu_id = unsafe { CpuId::from_u32_unchecked(cpu) };
-
-        if let Ok(mut policy) = PolicyCpu::from_cpu(cpu_id) {
-            T::adjust_perf(&mut policy, min_perf, target_perf, capacity);
-        }
+        // SAFETY: The `ptr` is guaranteed to be valid by the contract with the C code for the
+        // lifetime of `policy`.
+        let policy = unsafe { Policy::from_raw_mut(ptr) };
+        T::adjust_perf(policy, min_perf, target_perf, capacity);
     }
 
     /// Driver's `get_intermediate` callback.
Signature · 1 line
2.53.0
author maintainer
#49 lore raw

PATCH 45/1146 irqchip/irq-pic32-evic: Address warning related to wrong printf() formatter

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Brian Masney <[email protected]>

[ Upstream commit 86be659415b0ddefebc3120e309091aa215a9064 ]

This driver is currently only build on 32 bit MIPS systems. When building it on x86_64, the following warning occurs:

drivers/irqchip/irq-pic32-evic.c: In function ‘pic32_ext_irq_of_init’:
./include/linux/kern_levels.h:5:25: error: format ‘%d’ expects argument of type
‘int’, but argument 2 has type ‘long unsigned int’ [-Werror=format=]

Update the printf() formatter in preparation for allowing this driver to be compiled on all architectures.

Fixes aaa8666ada780 ("IRQCHIP: irq-pic32-evic: Add support for PIC32 interrupt controller")
---
 drivers/irqchip/irq-pic32-evic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/irqchip/irq-pic32-evic.c +1 -1
index e85c3e3007018..325b97a0287f6 100644
@@ -196,7 +196,7 @@ static void __init pic32_ext_irq_of_init(struct irq_domain *domain)
 
 	of_property_for_each_u32(node, pname, hwirq) {
 		if (i >= ARRAY_SIZE(priv->ext_irqs)) {
-			pr_warn("More than %d external irq, skip rest\n",
+			pr_warn("More than %zu external irq, skip rest\n",
 				ARRAY_SIZE(priv->ext_irqs));
 			break;
 		}
Signature · 1 line
2.53.0
author maintainer
#50 lore raw

PATCH 46/1146 hrtimer: Avoid pointless reprogramming in __hrtimer_start_range_ns()

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Peter Zijlstra <[email protected]>

[ Upstream commit d19ff16c11db38f3ee179d72751fb9b340174330 ]

Much like hrtimer_reprogram(), skip programming if the cpu_base is running the hrtimer interrupt.

Stable-dep-of: f2e388a019e4 ("hrtimer: Reduce trace noise in hrtimer_start()")

---
 kernel/time/hrtimer.c | 8 ++++++++
 1 file changed, 8 insertions(+)
kernel/time/hrtimer.c +8 -0
index 1e37142fe52f4..1bbb0a9ff3a23 100644
@@ -1269,6 +1269,14 @@ static int __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim,
 	}
 
 	first = enqueue_hrtimer(timer, new_base, mode);
+
+	/*
+	 * If the hrtimer interrupt is running, then it will reevaluate the
+	 * clock bases and reprogram the clock event device.
+	 */
+	if (new_base->cpu_base->in_hrtirq)
+		return false;
+
 	if (!force_local) {
 		/*
 		 * If the current CPU base is online, then the timer is
Signature · 1 line
2.53.0
author maintainer
#51 lore raw

PATCH 47/1146 hrtimer: Reduce trace noise in hrtimer_start()

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Thomas Gleixner <[email protected]>

[ Upstream commit f2e388a019e4cf83a15883a3d1f1384298e9a6aa ]

hrtimer_start() when invoked with an already armed timer traces like:

<comm>-.. [032] d.h2. 5.002263: hrtimer_cancel: hrtimer= ....
<comm>-.. [032] d.h1. 5.002263: hrtimer_start: hrtimer= ....

Which is incorrect as the timer doesn't get canceled. Just the expiry time changes. The internal dequeue operation which is required for that is not really interesting for trace analysis. But it makes it tedious to keep real cancellations and the above case apart.

Remove the cancel tracing in hrtimer_start() and add a 'was_armed' indicator to the hrtimer start tracepoint, which clearly indicates what the state of the hrtimer is when hrtimer_start() is invoked:

<comm>-.. [032] d.h1. 6.200103: hrtimer_start: hrtimer= .... was_armed=0
<comm>-.. [032] d.h1. 6.200558: hrtimer_start: hrtimer= .... was_armed=1

---
 include/trace/events/timer.h | 11 +++++----
 kernel/time/hrtimer.c        | 43 +++++++++++++++++-------------------
 2 files changed, 27 insertions(+), 27 deletions(-)
include/trace/events/timer.h +7 -4
index 1641ae3e6ca06..ab9a9386f7b65 100644
@@ -218,12 +218,13 @@ TRACE_EVENT(hrtimer_setup,
  * hrtimer_start - called when the hrtimer is started
  * @hrtimer:	pointer to struct hrtimer
  * @mode:	the hrtimers mode
+ * @was_armed:	Was armed when hrtimer_start*() was invoked
  */
 TRACE_EVENT(hrtimer_start,
 
-	TP_PROTO(struct hrtimer *hrtimer, enum hrtimer_mode mode),
+	TP_PROTO(struct hrtimer *hrtimer, enum hrtimer_mode mode, bool was_armed),
 
-	TP_ARGS(hrtimer, mode),
+	TP_ARGS(hrtimer, mode, was_armed),
 
 	TP_STRUCT__entry(
 		__field( void *,	hrtimer		)
@@ -231,6 +232,7 @@ TRACE_EVENT(hrtimer_start,
 		__field( s64,		expires		)
 		__field( s64,		softexpires	)
 		__field( enum hrtimer_mode,	mode	)
+		__field( bool,		was_armed	)
 	),
 
 	TP_fast_assign(
@@ -239,13 +241,14 @@ TRACE_EVENT(hrtimer_start,
 		__entry->expires	= hrtimer_get_expires(hrtimer);
 		__entry->softexpires	= hrtimer_get_softexpires(hrtimer);
 		__entry->mode		= mode;
+		__entry->was_armed	= was_armed;
 	),
 
 	TP_printk("hrtimer=%p function=%ps expires=%llu softexpires=%llu "
-		  "mode=%s", __entry->hrtimer, __entry->function,
+		  "mode=%s was_armed=%d", __entry->hrtimer, __entry->function,
 		  (unsigned long long) __entry->expires,
 		  (unsigned long long) __entry->softexpires,
-		  decode_hrtimer_mode(__entry->mode))
+		  decode_hrtimer_mode(__entry->mode), __entry->was_armed)
 );
 
 /**
kernel/time/hrtimer.c +20 -23

117 lines not on this page · raw message

Signature · 1 line
2.53.0
author maintainer
#52 lore raw

PATCH 48/1146 locking: Fix rwlock and spinlock lock context annotations

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Bart Van Assche <[email protected]>

[ Upstream commit 38e18d825f7281fdc16d3241df5115ce6eaeaf79 ]

Fix two incorrect rwlock_t lock context annotations. Add the raw_spinlock_t lock context annotations that are missing.

Fixes f16a802d402d ("locking/rwlock, spinlock: Support Clang's context analysis")
---
 include/linux/rwlock.h         | 4 ++--
 include/linux/rwlock_api_smp.h | 6 ++++--
 include/linux/spinlock.h       | 3 ++-
 3 files changed, 8 insertions(+), 5 deletions(-)
include/linux/rwlock.h +2 -2
index 3390d21c95dd1..21ceefc4a49f2 100644
@@ -30,10 +30,10 @@ do {								\
 
 #ifdef CONFIG_DEBUG_SPINLOCK
  extern void do_raw_read_lock(rwlock_t *lock) __acquires_shared(lock);
- extern int do_raw_read_trylock(rwlock_t *lock);
+ extern int do_raw_read_trylock(rwlock_t *lock) __cond_acquires_shared(true, lock);
  extern void do_raw_read_unlock(rwlock_t *lock) __releases_shared(lock);
  extern void do_raw_write_lock(rwlock_t *lock) __acquires(lock);
- extern int do_raw_write_trylock(rwlock_t *lock);
+extern int do_raw_write_trylock(rwlock_t *lock) __cond_acquires(true, lock);
  extern void do_raw_write_unlock(rwlock_t *lock) __releases(lock);
 #else
 # define do_raw_read_lock(rwlock)	do {__acquire_shared(lock); arch_read_lock(&(rwlock)->raw_lock); } while (0)
include/linux/rwlock_api_smp.h +4 -2
index 61a852609eab4..9e02a5f28cd1d 100644
@@ -23,7 +23,7 @@ void __lockfunc _raw_write_lock_bh(rwlock_t *lock)	__acquires(lock);
 void __lockfunc _raw_read_lock_irq(rwlock_t *lock)	__acquires_shared(lock);
 void __lockfunc _raw_write_lock_irq(rwlock_t *lock)	__acquires(lock);
 unsigned long __lockfunc _raw_read_lock_irqsave(rwlock_t *lock)
-							__acquires(lock);
+							__acquires_shared(lock);
 unsigned long __lockfunc _raw_write_lock_irqsave(rwlock_t *lock)
 							__acquires(lock);
 int __lockfunc _raw_read_trylock(rwlock_t *lock)	__cond_acquires_shared(true, lock);
@@ -36,7 +36,7 @@ void __lockfunc _raw_read_unlock_irq(rwlock_t *lock)	__releases_shared(lock);
 void __lockfunc _raw_write_unlock_irq(rwlock_t *lock)	__releases(lock);
 void __lockfunc
 _raw_read_unlock_irqrestore(rwlock_t *lock, unsigned long flags)
-							__releases(lock);
+							__releases_shared(lock);
 void __lockfunc
 _raw_write_unlock_irqrestore(rwlock_t *lock, unsigned long flags)
 							__releases(lock);
@@ -116,6 +116,7 @@ _raw_write_unlock_irqrestore(rwlock_t *lock, unsigned long flags)
 #endif
 
 static inline int __raw_read_trylock(rwlock_t *lock)
+	__cond_acquires_shared(true, lock)
 {
 	preempt_disable();
 	if (do_raw_read_trylock(lock)) {
@@ -127,6 +128,7 @@ static inline int __raw_read_trylock(rwlock_t *lock)
 }
 
 static inline int __raw_write_trylock(rwlock_t *lock)
+	__cond_acquires(true, lock)
 {
 	preempt_disable();
 	if (do_raw_write_trylock(lock)) {
include/linux/spinlock.h +2 -1
index e1e2f144af9b4..241277cd34cf3 100644
@@ -178,7 +178,7 @@ do {									\
 
 #ifdef CONFIG_DEBUG_SPINLOCK
  extern void do_raw_spin_lock(raw_spinlock_t *lock) __acquires(lock);
- extern int do_raw_spin_trylock(raw_spinlock_t *lock);
+ extern int do_raw_spin_trylock(raw_spinlock_t *lock) __cond_acquires(true, lock);
  extern void do_raw_spin_unlock(raw_spinlock_t *lock) __releases(lock);
 #else
 static inline void do_raw_spin_lock(raw_spinlock_t *lock) __acquires(lock)
@@ -189,6 +189,7 @@ static inline void do_raw_spin_lock(raw_spinlock_t *lock) __acquires(lock)
 }
 
 static inline int do_raw_spin_trylock(raw_spinlock_t *lock)
+	__cond_acquires(true, lock)
 {
 	int ret = arch_spin_trylock(&(lock)->raw_lock);
 
Signature · 1 line
2.53.0
author maintainer
#53 lore raw

PATCH 49/1146 signal: Fix the lock_task_sighand() annotation

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Bart Van Assche <[email protected]>

[ Upstream commit 39be7b21af24d1d2ed3b18caac57dd219fef226e ]

lock_task_sighand() may return NULL. Make this clear in its lock context annotation.

Fixes 04e49d926f43 ("sched: Enable context analysis for core.c and fair.c")
---
 include/linux/sched/signal.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/sched/signal.h +1 -1
index a22248aebcf90..a4835a7de07ee 100644
@@ -739,7 +739,7 @@ static inline int thread_group_empty(struct task_struct *p)
 
 extern struct sighand_struct *lock_task_sighand(struct task_struct *task,
 						unsigned long *flags)
-	__acquires(&task->sighand->siglock);
+	__cond_acquires(nonnull, &task->sighand->siglock);
 
 static inline void unlock_task_sighand(struct task_struct *task,
 						unsigned long *flags)
Signature · 1 line
2.53.0
author maintainer
#54 lore raw

PATCH 50/1146 ww-mutex: Fix the ww_acquire_ctx function annotations

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Bart Van Assche <[email protected]>

[ Upstream commit 3dcef70e41ab13483803c536ddea8d5f1803ee25 ]

The ww_acquire_done() call is optional. Reflect this in the annotations of ww_acquire_done().

---
 include/linux/ww_mutex.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/linux/ww_mutex.h +2 -2
index 85b1fff02fde9..0c95ead5a2977 100644
@@ -181,7 +181,7 @@ static inline void ww_acquire_init(struct ww_acquire_ctx *ctx,
  * data structures.
  */
 static inline void ww_acquire_done(struct ww_acquire_ctx *ctx)
-	__releases(ctx) __acquires_shared(ctx) __no_context_analysis
+	__must_hold(ctx)
 {
 #ifdef DEBUG_WW_MUTEXES
 	lockdep_assert_held(ctx);
@@ -199,7 +199,7 @@ static inline void ww_acquire_done(struct ww_acquire_ctx *ctx)
  * mutexes have been released with ww_mutex_unlock.
  */
 static inline void ww_acquire_fini(struct ww_acquire_ctx *ctx)
-	__releases_shared(ctx) __no_context_analysis
+	__releases(ctx) __no_context_analysis
 {
 #ifdef CONFIG_DEBUG_LOCK_ALLOC
 	mutex_release(&ctx->first_lock_dep_map, _THIS_IP_);
Signature · 1 line
2.53.0
author maintainer
#55 lore raw

PATCH 51/1146 perf/amd/ibs: Account interrupt for discarded samples

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Ravi Bangoria <[email protected]>

[ Upstream commit 01336b5559785a136de1cac49705f63a70a755bc ]

Add interrupt throttling accounting for below cases:

o IBS Op PMU: A software filter (in addition to the hardware filter) drops samples whose load latency is below the user-specified threshold.

o IBS Fetch PMU: Samples discarded due to the zero-RIP erratum (#1197).

Although these samples are discarded, the NMI cost is still incurred, so they should be counted for interrupt throttling.

Fixes 26db2e0c51fe83e1dd852c1321407835b481806e ("perf/x86/amd/ibs: Work around erratum #1197")
Fixes d20610c19b4a22bc69085b7eb7a02741d51de30e ("perf/amd/ibs: Add support for OP Load Latency Filtering")
---
 arch/x86/events/amd/ibs.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
arch/x86/events/amd/ibs.c +6 -2
index aca89f23d2e00..705ef43325be3 100644
@@ -1293,8 +1293,10 @@ static int perf_ibs_handle_irq(struct perf_ibs *perf_ibs, struct pt_regs *iregs)
 		 * within [128, 2048] range.
 		 */
 		if (!op_data3.ld_op || !op_data3.dc_miss ||
-		    op_data3.dc_miss_lat <= (event->attr.config1 & 0xFFF))
+		    op_data3.dc_miss_lat <= (event->attr.config1 & 0xFFF)) {
+			throttle = perf_event_account_interrupt(event);
 			goto out;
+		}
 	}
 
 	/*
@@ -1326,8 +1328,10 @@ static int perf_ibs_handle_irq(struct perf_ibs *perf_ibs, struct pt_regs *iregs)
 		regs.flags &= ~PERF_EFLAGS_EXACT;
 	} else {
 		/* Workaround for erratum #1197 */
-		if (perf_ibs->fetch_ignore_if_zero_rip && !(ibs_data.regs[1]))
+		if (perf_ibs->fetch_ignore_if_zero_rip && !(ibs_data.regs[1])) {
+			throttle = perf_event_account_interrupt(event);
 			goto out;
+		}
 
 		set_linear_ip(&regs, ibs_data.regs[1]);
 		regs.flags |= PERF_EFLAGS_EXACT;
Signature · 1 line
2.53.0
author maintainer
#56 lore raw

PATCH 52/1146 perf/amd/ibs: Preserve PhyAddrVal bit when clearing PhyAddr MSR

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Ravi Bangoria <[email protected]>

[ Upstream commit 723a290326e015b07931eabc603d3735999377be ]

Commit 50a53b60e141 ("perf/amd/ibs: Prevent leaking sensitive data to userspace") zeroed the physical address and also cleared the PhyAddrVal flag before copying the value into a perf sample to avoid exposing physical addresses to unprivileged users.

Clearing PhyAddrVal, however, has an unintended side-effect: several other IBS fields are considered valid only when this bit is set. As a result, those otherwise correct fields are discarded, reducing IBS functionality.

Continue to zero the physical address, but keep the PhyAddrVal bit intact so the related fields remain usable while still preventing any address leak.

Fixes 50a53b60e141 ("perf/amd/ibs: Prevent leaking sensitive data to userspace")
---
 arch/x86/events/amd/ibs.c | 2 --
 1 file changed, 2 deletions(-)
arch/x86/events/amd/ibs.c +0 -2
index 705ef43325be3..ddd74eff3faef 100644
@@ -1214,12 +1214,10 @@ static void perf_ibs_phyaddr_clear(struct perf_ibs *perf_ibs,
 				   struct perf_ibs_data *ibs_data)
 {
 	if (perf_ibs == &perf_ibs_op) {
-		ibs_data->regs[ibs_op_msr_idx(MSR_AMD64_IBSOPDATA3)] &= ~(1ULL << 18);
 		ibs_data->regs[ibs_op_msr_idx(MSR_AMD64_IBSDCPHYSAD)] = 0;
 		return;
 	}
 
-	ibs_data->regs[ibs_fetch_msr_idx(MSR_AMD64_IBSFETCHCTL)] &= ~(1ULL << 52);
 	ibs_data->regs[ibs_fetch_msr_idx(MSR_AMD64_IBSFETCHPHYSAD)] = 0;
 }
 
Signature · 1 line
2.53.0
author maintainer
#57 lore raw

PATCH 53/1146 perf/amd/ibs: Avoid calling perf_allow_kernel() from the IBS NMI handler

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Ravi Bangoria <[email protected]>

[ Upstream commit b0a09142622a994c4f4088c3f61db5da87cfc711 ]

Calling perf_allow_kernel() from the NMI context is unsafe and could be fatal. Capture the permission at event-initialization time by storing it in event->hw.flags, and have the NMI handler rely on that cached flag instead of making the call directly.

---
 arch/x86/events/amd/ibs.c          | 5 ++++-
 arch/x86/events/perf_event_flags.h | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)
arch/x86/events/amd/ibs.c +4 -1
index ddd74eff3faef..7b8eea1d75c10 100644
@@ -313,6 +313,9 @@ static int perf_ibs_init(struct perf_event *event)
 	if (ret)
 		return ret;
 
+	if (perf_allow_kernel())
+		hwc->flags |= PERF_X86_EVENT_UNPRIVILEGED;
+
 	if (hwc->sample_period) {
 		if (config & perf_ibs->cnt_mask)
 			/* raw max_cnt may not be set */
@@ -1346,7 +1349,7 @@ static int perf_ibs_handle_irq(struct perf_ibs *perf_ibs, struct pt_regs *iregs)
 	 * unprivileged users.
 	 */
 	if ((event->attr.sample_type & PERF_SAMPLE_RAW) &&
-	    perf_allow_kernel()) {
+	    (hwc->flags & PERF_X86_EVENT_UNPRIVILEGED)) {
 		perf_ibs_phyaddr_clear(perf_ibs, &ibs_data);
 	}
 
arch/x86/events/perf_event_flags.h +1 -0
index 70078334e4a33..47f84ee8f5409 100644
@@ -23,3 +23,4 @@ PERF_ARCH(PEBS_LAT_HYBRID,	0x0020000) /* ld and st lat for hybrid */
 PERF_ARCH(NEEDS_BRANCH_STACK,	0x0040000) /* require branch stack setup */
 PERF_ARCH(BRANCH_COUNTERS,	0x0080000) /* logs the counters in the extra space of each branch */
 PERF_ARCH(ACR,			0x0100000) /* Auto counter reload */
+PERF_ARCH(UNPRIVILEGED,		0x0200000) /* Unprivileged event (wrt perf_allow_kernel()) */
Signature · 1 line
2.53.0
author maintainer
#58 lore raw

PATCH 54/1146 x86/tdx: Fix the typo in TDX_ATTR_MIGRTABLE

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Xiaoyao Li <[email protected]>

[ Upstream commit 3aecb2e7b948400354399b26f3f1653bd2c1bae0 ]

The TD scoped TDCS attributes are defined by bit positions. In the guest side of the TDX code, the 'tdx_attributes' string array holds pretty print names for these attributes, which are generated via macros and defines. Today these pretty print names are only used to print the attribute names to dmesg.

Unfortunately there is a typo in the define for the migratable bit. Change the defines TDX_ATTR_MIGRTABLE* to TDX_ATTR_MIGRATABLE*. Update the sole user, the tdx_attributes array, to use the fixed name.

Since these defines control the string printed to dmesg, the change is user visible. But the risk of breakage is almost zero since it is not exposed in any interface expected to be consumed programmatically.

---
 arch/x86/coco/tdx/debug.c         | 2 +-
 arch/x86/include/asm/shared/tdx.h | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
arch/x86/coco/tdx/debug.c +1 -1
index cef847c8bb67f..28990c2ab0a14 100644
@@ -17,7 +17,7 @@ static __initdata const char *tdx_attributes[] = {
 	DEF_TDX_ATTR_NAME(ICSSD),
 	DEF_TDX_ATTR_NAME(LASS),
 	DEF_TDX_ATTR_NAME(SEPT_VE_DISABLE),
-	DEF_TDX_ATTR_NAME(MIGRTABLE),
+	DEF_TDX_ATTR_NAME(MIGRATABLE),
 	DEF_TDX_ATTR_NAME(PKS),
 	DEF_TDX_ATTR_NAME(KL),
 	DEF_TDX_ATTR_NAME(TPA),
arch/x86/include/asm/shared/tdx.h +2 -2
index 8bc074c8d7c6a..11f3cf30b1ac8 100644
@@ -35,8 +35,8 @@
 #define TDX_ATTR_LASS			BIT_ULL(TDX_ATTR_LASS_BIT)
 #define TDX_ATTR_SEPT_VE_DISABLE_BIT	28
 #define TDX_ATTR_SEPT_VE_DISABLE	BIT_ULL(TDX_ATTR_SEPT_VE_DISABLE_BIT)
-#define TDX_ATTR_MIGRTABLE_BIT		29
-#define TDX_ATTR_MIGRTABLE		BIT_ULL(TDX_ATTR_MIGRTABLE_BIT)
+#define TDX_ATTR_MIGRATABLE_BIT		29
+#define TDX_ATTR_MIGRATABLE		BIT_ULL(TDX_ATTR_MIGRATABLE_BIT)
 #define TDX_ATTR_PKS_BIT		30
 #define TDX_ATTR_PKS			BIT_ULL(TDX_ATTR_PKS_BIT)
 #define TDX_ATTR_KL_BIT			31
Signature · 1 line
2.53.0
author maintainer
#41 lore raw

PATCH 37/1146 PCI: use generic driver_override infrastructure

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Danilo Krummrich <[email protected]>

[ Upstream commit 10a4206a24013be4d558d476010cbf2eb4c9fa64 ]

When a driver is probed through __driver_attach(), the bus' match() callback is called without the device lock held, thus accessing the driver_override field without a lock, which can cause a UAF.

Fix this by using the driver-core driver_override infrastructure taking care of proper locking internally.

Note that calling match() from __driver_attach() without the device lock held is intentional. [1]

---
 drivers/pci/pci-driver.c           | 11 +++++++----
 drivers/pci/pci-sysfs.c            | 28 ----------------------------
 drivers/pci/probe.c                |  1 -
 drivers/vfio/pci/vfio_pci_core.c   |  5 ++---
 drivers/xen/xen-pciback/pci_stub.c |  6 ++++--
 include/linux/pci.h                |  6 ------
 6 files changed, 13 insertions(+), 44 deletions(-)
drivers/pci/pci-driver.c +7 -4
index dd9075403987d..d10ece0889f0f 100644
@@ -138,9 +138,11 @@ static const struct pci_device_id *pci_match_device(struct pci_driver *drv,
 {
 	struct pci_dynid *dynid;
 	const struct pci_device_id *found_id = NULL, *ids;
+	int ret;
 
 	/* When driver_override is set, only bind to the matching driver */
-	if (dev->driver_override && strcmp(dev->driver_override, drv->name))
+	ret = device_match_driver_override(&dev->dev, &drv->driver);
+	if (ret == 0)
 		return NULL;
 
 	/* Look at the dynamic ids first, before the static ones */
@@ -164,7 +166,7 @@ static const struct pci_device_id *pci_match_device(struct pci_driver *drv,
 		 * matching.
 		 */
 		if (found_id->override_only) {
-			if (dev->driver_override)
+			if (ret > 0)
 				return found_id;
 		} else {
 			return found_id;
@@ -172,7 +174,7 @@ static const struct pci_device_id *pci_match_device(struct pci_driver *drv,
 	}
 
 	/* driver_override will always match, send a dummy id */
-	if (dev->driver_override)
+	if (ret > 0)
 		return &pci_device_id_any;
 	return NULL;
 }
@@ -452,7 +454,7 @@ static int __pci_device_probe(struct pci_driver *drv, struct pci_dev *pci_dev)
 static inline bool pci_device_can_probe(struct pci_dev *pdev)
 {
 	return (!pdev->is_virtfn || pdev->physfn->sriov->drivers_autoprobe ||
-		pdev->driver_override);
+		device_has_driver_override(&pdev->dev));
 }
 #else
 static inline bool pci_device_can_probe(struct pci_dev *pdev)
@@ -1722,6 +1724,7 @@ static const struct cpumask *pci_device_irq_get_affinity(struct device *dev,
 
 const struct bus_type pci_bus_type = {
 	.name		= "pci",
+	.driver_override = true,
 	.match		= pci_bus_match,
 	.uevent		= pci_uevent,
 	.probe		= pci_device_probe,
drivers/pci/pci-sysfs.c +0 -28
index 16eaaf749ba97..a9006cf4e9c85 100644
@@ -615,33 +615,6 @@ static ssize_t devspec_show(struct device *dev,
 static DEVICE_ATTR_RO(devspec);
 #endif
 
-static ssize_t driver_override_store(struct device *dev,
-				     struct device_attribute *attr,
-				     const char *buf, size_t count)
-{
-	struct pci_dev *pdev = to_pci_dev(dev);
-	int ret;
-
-	ret = driver_set_override(dev, &pdev->driver_override, buf, count);
-	if (ret)
-		return ret;
-
-	return count;
-}
-
-static ssize_t driver_override_show(struct device *dev,
-				    struct device_attribute *attr, char *buf)
-{
-	struct pci_dev *pdev = to_pci_dev(dev);
-	ssize_t len;
-
-	device_lock(dev);
-	len = sysfs_emit(buf, "%s\n", pdev->driver_override);
-	device_unlock(dev);
-	return len;
-}
-static DEVICE_ATTR_RW(driver_override);
-
 static struct attribute *pci_dev_attrs[] = {
 	&dev_attr_power_state.attr,
 	&dev_attr_resource.attr,
@@ -669,7 +642,6 @@ static struct attribute *pci_dev_attrs[] = {
 #ifdef CONFIG_OF
 	&dev_attr_devspec.attr,
 #endif
-	&dev_attr_driver_override.attr,
 	&dev_attr_ari_enabled.attr,
 	NULL,
 };
drivers/pci/probe.c +0 -1
index bccc7a4bdd794..b4707640e1021 100644
@@ -2488,7 +2488,6 @@ static void pci_release_dev(struct device *dev)
 	pci_release_of_node(pci_dev);
 	pcibios_release_device(pci_dev);
 	pci_bus_put(pci_dev->bus);
-	kfree(pci_dev->driver_override);
 	bitmap_free(pci_dev->dma_alias_mask);
 	dev_dbg(dev, "device released\n");
 	kfree(pci_dev);
drivers/vfio/pci/vfio_pci_core.c +2 -3
index d43745fe4c843..460852f79f29b 100644
@@ -1987,9 +1987,8 @@ static int vfio_pci_bus_notifier(struct notifier_block *nb,
 	    pdev->is_virtfn && physfn == vdev->pdev) {
 		pci_info(vdev->pdev, "Captured SR-IOV VF %s driver_override\n",
 			 pci_name(pdev));
-		pdev->driver_override = kasprintf(GFP_KERNEL, "%s",
-						  vdev->vdev.ops->name);
-		WARN_ON(!pdev->driver_override);
+		WARN_ON(device_set_driver_override(&pdev->dev,
+						   vdev->vdev.ops->name));
 	} else if (action == BUS_NOTIFY_BOUND_DRIVER &&
 		   pdev->is_virtfn && physfn == vdev->pdev) {
 		struct pci_driver *drv = pci_dev_driver(pdev);
drivers/xen/xen-pciback/pci_stub.c +4 -2
index e4b27aecbf059..79a2b5dfd6941 100644
@@ -598,6 +598,8 @@ static int pcistub_seize(struct pci_dev *dev,
 	return err;
 }
 
+static struct pci_driver xen_pcibk_pci_driver;
+
 /* Called when 'bind'. This means we must _NOT_ call pci_reset_function or
  * other functions that take the sysfs lock. */
 static int pcistub_probe(struct pci_dev *dev, const struct pci_device_id *id)
@@ -609,8 +611,8 @@ static int pcistub_probe(struct pci_dev *dev, const struct pci_device_id *id)
 
 	match = pcistub_match(dev);
 
-	if ((dev->driver_override &&
-	     !strcmp(dev->driver_override, PCISTUB_DRIVER_NAME)) ||
+	if (device_match_driver_override(&dev->dev,
+					 &xen_pcibk_pci_driver.driver) > 0 ||
 	    match) {
 
 		if (dev->hdr_type != PCI_HEADER_TYPE_NORMAL
include/linux/pci.h +0 -6
index 1c270f1d51230..57e9463e4347b 100644
@@ -575,12 +575,6 @@ struct pci_dev {
 	u8		supported_speeds; /* Supported Link Speeds Vector */
 	phys_addr_t	rom;		/* Physical address if not from BAR */
 	size_t		romlen;		/* Length if not from BAR */
-	/*
-	 * Driver name to force a match.  Do not set directly, because core
-	 * frees it.  Use driver_set_override() to set or clear it.
-	 */
-	const char	*driver_override;
-
 	unsigned long	priv_flags;	/* Private flags for the PCI driver */
 
 	/* These methods index pci_reset_fn_methods[] */
Signature · 1 line
2.53.0
author maintainer
#59 lore raw

PATCH 55/1146 rust: sync: atomic: Remove bound `T: Sync` for `Atomic::from_ptr()`

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Boqun Feng <[email protected]>

[ Upstream commit 4a5dc632e0b603ec1cbbf87b78de86b4b6359cff ]

Originally, Atomic::from_ptr() requires T being a Sync because I thought having the ability to do from_ptr() meant multiplle &Atomic<T>s shared by different threads, which was identical (or similar) to multiple &Ts shared by different threads. Hence T was required to be Sync. However this is not true, since &Atomic<T> is not the same at &T. Moreover, having this bound makes Atomic::<*mut T>::from_ptr() impossible, which is definitely not intended. Therefore remove the T: Sync bound.

[boqun: Fix title typo spotted by Alice & Gary]

---
 rust/kernel/sync/atomic.rs | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
rust/kernel/sync/atomic.rs +1 -4
index 4aebeacb961a2..296b25e83bbb9 100644
@@ -204,10 +204,7 @@ impl<T: AtomicType> Atomic<T> {
     /// // no data race.
     /// unsafe { Atomic::from_ptr(foo_a_ptr) }.store(2, Release);
     /// ```
-    pub unsafe fn from_ptr<'a>(ptr: *mut T) -> &'a Self
-    where
-        T: Sync,
-    {
+    pub unsafe fn from_ptr<'a>(ptr: *mut T) -> &'a Self {
         // CAST: `T` and `Atomic<T>` have the same size, alignment and bit validity.
         // SAFETY: Per function safety requirement, `ptr` is a valid pointer and the object will
         // live long enough. It's safe to return a `&Atomic<T>` because function safety requirement
Signature · 1 line
2.53.0
author maintainer
#60 lore raw

PATCH 56/1146 sparc64: vdso: Link with -z noexecstack

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Thomas Weißschuh <[email protected]>

[ Upstream commit acc4f131d5d57c2aa89db914aeb6f7bb0ab4eb4a ]

The vDSO stack does not need to be executable. Prevent the linker from creating executable. For more background see commit ffcf9c5700e4 ("x86:
link vdso and boot with -z noexecstack --no-warn-rwx-segments").

Also prevent the following warning from the linker:
sparc64-linux-ld: warning: arch/sparc/vdso/vdso-note.o: missing .note.GNU-stack section implies executable stack
sparc64-linux-ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker

---
 arch/sparc/vdso/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/sparc/vdso/Makefile +1 -1
index 683b2d4082244..400529acd1c10 100644
@@ -104,4 +104,4 @@ quiet_cmd_vdso = VDSO    $@
 		       $(VDSO_LDFLAGS) $(VDSO_LDFLAGS_$(filter %.lds,$(^F))) \
 		       -T $(filter %.lds,$^) $(filter %.o,$^)
 
-VDSO_LDFLAGS = -shared --hash-style=both --build-id=sha1 -Bsymbolic --no-undefined
+VDSO_LDFLAGS = -shared --hash-style=both --build-id=sha1 -Bsymbolic --no-undefined -z noexecstack
Signature · 1 line
2.53.0
author maintainer
#61 lore raw

PATCH 57/1146 scripts/gdb: timerlist: Adapt to move of tk_core

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Thomas Weißschuh (Schneider Electric) <[email protected]>

[ Upstream commit 5aa9383813aca45b914d4a7481ca417ef13114df ]

tk_core is a macro today which cannot be resolved by gdb.

Use the correct symbol expression to reference tk_core.

---
 scripts/gdb/linux/timerlist.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/gdb/linux/timerlist.py +1 -1
index ccc24d30de806..9fb3436a217cc 100644
@@ -20,7 +20,7 @@ def ktime_get():
     We can't read the hardware timer itself to add any nanoseconds
     that need to be added since we last stored the time in the
     timekeeper. But this is probably good enough for debug purposes."""
-    tk_core = gdb.parse_and_eval("&tk_core")
+    tk_core = gdb.parse_and_eval("&timekeeper_data[TIMEKEEPER_CORE]")
 
     return tk_core['timekeeper']['tkr_mono']['base']
 
Signature · 1 line
2.53.0
author maintainer
#62 lore raw

PATCH 58/1146 locking: Fix rwlock support in <linux/spinlock_up.h>

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Bart Van Assche <[email protected]>

[ Upstream commit 756a0e011cfca0b45a48464aa25b05d9a9c2fb0b ]

Architecture support for rwlocks must be available whether or not CONFIG_DEBUG_SPINLOCK has been defined. Move the definitions of the arch_{read,write}_{lock,trylock,unlock}() macros such that these become visbile if CONFIG_DEBUG_SPINLOCK=n.

This patch prepares for converting do_raw_{read,write}_trylock() into inline functions. Without this patch that conversion triggers a build failure for UP architectures, e.g. arm-ep93xx. I used the following kernel configuration to build the kernel for that architecture:

CONFIG_ARCH_MULTIPLATFORM=y
CONFIG_ARCH_MULTI_V7=n
CONFIG_ATAGS=y
CONFIG_MMU=y
CONFIG_ARCH_MULTI_V4T=y
CONFIG_CPU_LITTLE_ENDIAN=y
CONFIG_ARCH_EP93XX=y

---
 include/linux/spinlock_up.h | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
include/linux/spinlock_up.h +10 -10
index 1e84e71ca495e..3a50976471d71 100644
@@ -48,16 +48,6 @@ static inline void arch_spin_unlock(arch_spinlock_t *lock)
 	lock->slock = 1;
 }
 
-/*
- * Read-write spinlocks. No debug version.
- */
-#define arch_read_lock(lock)		do { barrier(); (void)(lock); } while (0)
-#define arch_write_lock(lock)		do { barrier(); (void)(lock); } while (0)
-#define arch_read_trylock(lock)	({ barrier(); (void)(lock); 1; })
-#define arch_write_trylock(lock)	({ barrier(); (void)(lock); 1; })
-#define arch_read_unlock(lock)		do { barrier(); (void)(lock); } while (0)
-#define arch_write_unlock(lock)	do { barrier(); (void)(lock); } while (0)
-
 #else /* DEBUG_SPINLOCK */
 #define arch_spin_is_locked(lock)	((void)(lock), 0)
 /* for sched/core.c and kernel_lock.c: */
@@ -68,4 +58,14 @@ static inline void arch_spin_unlock(arch_spinlock_t *lock)
 
 #define arch_spin_is_contended(lock)	(((void)(lock), 0))
 
+/*
+ * Read-write spinlocks. No debug version.
+ */
+#define arch_read_lock(lock)		do { barrier(); (void)(lock); } while (0)
+#define arch_write_lock(lock)		do { barrier(); (void)(lock); } while (0)
+#define arch_read_trylock(lock)	({ barrier(); (void)(lock); 1; })
+#define arch_write_trylock(lock)	({ barrier(); (void)(lock); 1; })
+#define arch_read_unlock(lock)		do { barrier(); (void)(lock); } while (0)
+#define arch_write_unlock(lock)	do { barrier(); (void)(lock); } while (0)
+
 #endif /* __LINUX_SPINLOCK_UP_H */
Signature · 1 line
2.53.0
author maintainer
#63 lore raw

PATCH 59/1146 sched/topology: Compute sd_weight considering cpuset partitions

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: K Prateek Nayak <[email protected]>

[ Upstream commit 8e8e23dea43e64ddafbd1246644c3219209be113 ]

The "sd_weight" used for calculating the load balancing interval, and its limits, considers the span weight of the entire topology level without accounting for cpuset partitions.

For example, consider a large system of 128CPUs divided into 8 * 16CPUs partition which is typical when deploying virtual machines:

[ PKG Domain: 128CPUs ]

[Partition0: 16CPUs][Partition1: 16CPUs] ... [Partition7: 16CPUs]

Although each partition only contains 16CPUs, the load balancing interval is set to a minimum of 128 jiffies considering the span of the entire domain with 128CPUs which can lead to longer imbalances within the partition although balancing within is cheaper with 16CPUs.

Compute the "sd_weight" after computing the "sd_span" considering the cpu_map covered by the partition, and set the load balancing interval, and its limits accordingly.

For the above example, the balancing intervals for the partitions PKG domain changes as follows:

before after

balance_interval   128      16
min_interval       128      16
max_interval       256      32

Intervals are now proportional to the CPUs in the partitioned domain as was intended by the original formula.

---
 kernel/sched/topology.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)
kernel/sched/topology.c +6 -8
index 32dcddaead82d..2864f43bff6df 100644
@@ -1643,13 +1643,17 @@ sd_init(struct sched_domain_topology_level *tl,
 	int sd_id, sd_weight, sd_flags = 0;
 	struct cpumask *sd_span;
 
-	sd_weight = cpumask_weight(tl->mask(tl, cpu));
+	sd_span = sched_domain_span(sd);
+	cpumask_and(sd_span, cpu_map, tl->mask(tl, cpu));
+	sd_weight = cpumask_weight(sd_span);
+	sd_id = cpumask_first(sd_span);
 
 	if (tl->sd_flags)
 		sd_flags = (*tl->sd_flags)();
 	if (WARN_ONCE(sd_flags & ~TOPOLOGY_SD_FLAGS,
-			"wrong sd_flags in topology description\n"))
+		      "wrong sd_flags in topology description\n"))
 		sd_flags &= TOPOLOGY_SD_FLAGS;
+	sd_flags |= asym_cpu_capacity_classify(sd_span, cpu_map);
 
 	*sd = (struct sched_domain){
 		.min_interval		= sd_weight,
@@ -1686,12 +1690,6 @@ sd_init(struct sched_domain_topology_level *tl,
 		.name			= tl->name,
 	};
 
-	sd_span = sched_domain_span(sd);
-	cpumask_and(sd_span, cpu_map, tl->mask(tl, cpu));
-	sd_id = cpumask_first(sd_span);
-
-	sd->flags |= asym_cpu_capacity_classify(sd_span, cpu_map);
-
 	WARN_ONCE((sd->flags & (SD_SHARE_CPUCAPACITY | SD_ASYM_CPUCAPACITY)) ==
 		  (SD_SHARE_CPUCAPACITY | SD_ASYM_CPUCAPACITY),
 		  "CPU capacity asymmetry not supported on SMT\n");
Signature · 1 line
2.53.0
author maintainer
#64 lore raw

PATCH 60/1146 x86/irqflags: Preemptively move include paravirt.h directive where it belongs

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Juergen Gross <[email protected]>

[ Upstream commit 36c1eb9531e0c9bdcb3494142123f1c1e128367b ]

Commit

22cc5ca5de52 ("x86/paravirt: Move halt paravirt calls under CONFIG_PARAVIRT")

moved some paravirt hooks from the CONFIG_PARAVIRT_XXL umbrella to CONFIG_PARAVIRT, but missed to move the associated "#include <asm/paravirt.h>" in irqflags.h from CONFIG_PARAVIRT_XXL to CONFIG_PARAVIRT.

This hasn't resulted in build failures yet, as all use cases of irqflags.h had paravirt.h included via other header files, even without CONFIG_PARAVIRT_XXL being set.

In order to allow changing those other header files, e.g. by no longer including paravirt.h, fix irqflags.h by moving inclusion of paravirt.h under the CONFIG_PARAVIRT umbrella.

[ bp: Massage commit message. ]

---
 arch/x86/include/asm/irqflags.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/x86/include/asm/irqflags.h +3 -3
index 462754b0bf8ac..6f25de05ed58f 100644
@@ -96,11 +96,11 @@ static __always_inline void halt(void)
 	native_halt();
 }
 #endif /* __ASSEMBLER__ */
+#else
+#include <asm/paravirt.h>
 #endif /* CONFIG_PARAVIRT */
 
-#ifdef CONFIG_PARAVIRT_XXL
-#include <asm/paravirt.h>
-#else
+#ifndef CONFIG_PARAVIRT_XXL
 #ifndef __ASSEMBLER__
 #include <linux/types.h>
 
Signature · 1 line
2.53.0
author maintainer
#65 lore raw

PATCH 61/1146 sched/topology: Fix sched_domain_span()

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Peter Zijlstra <[email protected]>

[ Upstream commit e379dce8af11d8d6040b4348316a499bfd174bfb ]

Commit 8e8e23dea43e ("sched/topology: Compute sd_weight considering cpuset partitions") ends up relying on the fact that structure initialization should not touch the flexible array.

However, the official GCC specification for "Arrays of Length Zero" [*] says:

Although the size of a zero-length array is zero, an array member of this kind may increase the size of the enclosing type as a result of tail padding.

Additionally, structure initialization will zero tail padding. With the end result that since offsetof(*type, member) < sizeof(*type), array initialization will clobber the flex array.

Luckily, the way flexible array sizes are calculated is:

sizeof(*type) + count * sizeof(*type->member)

This means we have the complete size of the flex array *outside* of sizeof(*type), so use that instead of relying on the broken flex array definition.

[*] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html

---
 include/linux/sched/topology.h | 24 ++++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)
include/linux/sched/topology.h +18 -6
index 45c0022b91ced..6f8a4ae860da8 100644
@@ -141,18 +141,30 @@ struct sched_domain {
 
 	unsigned int span_weight;
 	/*
-	 * Span of all CPUs in this domain.
+	 * See sched_domain_span(), on why flex arrays are broken.
 	 *
-	 * NOTE: this field is variable length. (Allocated dynamically
-	 * by attaching extra space to the end of the structure,
-	 * depending on how many CPUs the kernel has booted up with)
-	 */
 	unsigned long span[];
+	 */
 };
 
 static inline struct cpumask *sched_domain_span(struct sched_domain *sd)
 {
-	return to_cpumask(sd->span);
+	/*
+	 * Turns out that C flexible arrays are fundamentally broken since it
+	 * is allowed for offsetof(*sd, span) < sizeof(*sd), this means that
+	 * structure initialzation *sd = { ... }; which writes every byte
+	 * inside sizeof(*type), will over-write the start of the flexible
+	 * array.
+	 *
+	 * Luckily, the way we allocate sched_domain is by:
+	 *
+	 *   sizeof(*sd) + cpumask_size()
+	 *
+	 * this means that we have sufficient space for the whole flex array
+	 * *outside* of sizeof(*sd). So use that, and avoid using sd->span.
+	 */
+	unsigned long *bitmap = (void *)sd + sizeof(*sd);
+	return to_cpumask(bitmap);
 }
 
 extern void partition_sched_domains(int ndoms_new, cpumask_var_t doms_new[],
Signature · 1 line
2.53.0
author maintainer
#66 lore raw

PATCH 62/1146 irqchip/renesas-rzg2l: Fix error path in rzg2l_irqc_common_probe()

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Biju Das <[email protected]>

[ Upstream commit fb74e35f78105efd8635c89b39f4389f567edbdc ]

Replace pm_runtime_put() with pm_runtime_put_sync() when irq_domain_create_hierarchy() fails to ensure the device suspends synchronously before devres cleanup disables runtime PM via pm_runtime_disable().

[ tglx: Fix up subject and change log to be precise ]

Fixes 7de11369ef30 ("irqchip/renesas-rzg2l: Use devm_pm_runtime_enable()")
---
 drivers/irqchip/irq-renesas-rzg2l.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/irqchip/irq-renesas-rzg2l.c +1 -1
index e73d426cea6d3..eb01d4c5aca75 100644
@@ -577,7 +577,7 @@ static int rzg2l_irqc_common_probe(struct platform_device *pdev, struct device_n
 	irq_domain = irq_domain_create_hierarchy(parent_domain, 0, IRQC_NUM_IRQ, dev_fwnode(dev),
 						 &rzg2l_irqc_domain_ops, rzg2l_irqc_data);
 	if (!irq_domain) {
-		pm_runtime_put(dev);
+		pm_runtime_put_sync(dev);
 		return -ENOMEM;
 	}
 
Signature · 1 line
2.53.0
author maintainer
#67 lore raw

PATCH 63/1146 ASoC: Intel: avs: Check maximum valid CPUID leaf

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Ahmed S. Darwish <[email protected]>

[ Upstream commit 93a1f0e61329f538cfc7122d7fa0e7a1803e326d ]

The Intel AVS driver queries CPUID(0x15) before checking if the CPUID leaf is available. Check the maximum-valid CPU standard leaf beforehand.

Use the CPUID_LEAF_TSC macro instead of the custom local one for the CPUID(0x15) leaf number.

Fixes cbe37a4d2b3c ("ASoC: Intel: avs: Configure basefw on TGL-based platforms")
---
 sound/soc/intel/avs/tgl.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
sound/soc/intel/avs/tgl.c +6 -3
index afb0665161010..4649d749b41e0 100644
@@ -11,8 +11,6 @@
 #include "debug.h"
 #include "messages.h"
 
-#define CPUID_TSC_LEAF 0x15
-
 static int avs_tgl_dsp_core_power(struct avs_dev *adev, u32 core_mask, bool power)
 {
 	core_mask &= AVS_MAIN_CORE_MASK;
@@ -49,7 +47,11 @@ static int avs_tgl_config_basefw(struct avs_dev *adev)
 	unsigned int ecx;
 
 #include <asm/cpuid/api.h>
-	ecx = cpuid_ecx(CPUID_TSC_LEAF);
+
+	if (boot_cpu_data.cpuid_level < CPUID_LEAF_TSC)
+		goto no_cpuid;
+
+	ecx = cpuid_ecx(CPUID_LEAF_TSC);
 	if (ecx) {
 		ret = avs_ipc_set_fw_config(adev, 1, AVS_FW_CFG_XTAL_FREQ_HZ, sizeof(ecx), &ecx);
 		if (ret)
@@ -57,6 +59,7 @@ static int avs_tgl_config_basefw(struct avs_dev *adev)
 	}
 #endif
 
+no_cpuid:
 	hwid.device = pci->device;
 	hwid.subsystem = pci->subsystem_vendor | (pci->subsystem_device << 16);
 	hwid.revision = pci->revision;
Signature · 1 line
2.53.0
author maintainer
#68 lore raw

PATCH 64/1146 ASoC: Intel: avs: Include CPUID header at file scope

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Ahmed S. Darwish <[email protected]>

[ Upstream commit 7f78e0b46e9984e955cb73ffada8dace8b4dd059 ]

Commit

cbe37a4d2b3c ("ASoC: Intel: avs: Configure basefw on TGL-based platforms")

includes the main CPUID header from within a C function. This works by luck and forbids valid refactoring inside that header.

Include the CPUID header at file scope instead.

Remove the COMPILE_TEST build flag so that the CONFIG_X86 conditionals can be removed. The driver gets enough compilation testing already on x86.

For clarity, refactor the CPUID(0x15) code into its own function without changing any of the driver's logic.

---
 sound/soc/intel/Kconfig   |  2 +-
 sound/soc/intel/avs/tgl.c | 37 ++++++++++++++++++++++++-------------
 2 files changed, 25 insertions(+), 14 deletions(-)
sound/soc/intel/Kconfig +1 -1
index 412555e626b81..63367364916ae 100644
@@ -95,7 +95,7 @@ config SND_SOC_INTEL_KEEMBAY
 
 config SND_SOC_INTEL_AVS
 	tristate "Intel AVS driver"
-	depends on X86 || COMPILE_TEST
+	depends on X86
 	depends on PCI
 	depends on COMMON_CLK
 	select ACPI_NHLT if ACPI
sound/soc/intel/avs/tgl.c +24 -13
index 4649d749b41e0..a7123639de431 100644
@@ -7,6 +7,7 @@
 //
 
 #include <linux/pci.h>
+#include <asm/cpuid/api.h>
 #include "avs.h"
 #include "debug.h"
 #include "messages.h"
@@ -38,28 +39,38 @@ static int avs_tgl_dsp_core_stall(struct avs_dev *adev, u32 core_mask, bool stal
 	return avs_dsp_core_stall(adev, core_mask, stall);
 }
 
-static int avs_tgl_config_basefw(struct avs_dev *adev)
+/*
+ * Succeed if CPUID(0x15) is not available, or if the nominal core crystal clock
+ * frequency cannot be enumerated from it.  There is nothing to do in both cases.
+ */
+static int avs_tgl_set_xtal_freq(struct avs_dev *adev)
 {
-	struct pci_dev *pci = adev->base.pci;
-	struct avs_bus_hwid hwid;
+	unsigned int freq;
 	int ret;
-#ifdef CONFIG_X86
-	unsigned int ecx;
-
-#include <asm/cpuid/api.h>
 
 	if (boot_cpu_data.cpuid_level < CPUID_LEAF_TSC)
-		goto no_cpuid;
+		return 0;
 
-	ecx = cpuid_ecx(CPUID_LEAF_TSC);
-	if (ecx) {
-		ret = avs_ipc_set_fw_config(adev, 1, AVS_FW_CFG_XTAL_FREQ_HZ, sizeof(ecx), &ecx);
+	freq = cpuid_ecx(CPUID_LEAF_TSC);
+	if (freq) {
+		ret = avs_ipc_set_fw_config(adev, 1, AVS_FW_CFG_XTAL_FREQ_HZ, sizeof(freq), &freq);
 		if (ret)
 			return AVS_IPC_RET(ret);
 	}
-#endif
 
-no_cpuid:
+	return 0;
+}
+
+static int avs_tgl_config_basefw(struct avs_dev *adev)
+{
+	struct pci_dev *pci = adev->base.pci;
+	struct avs_bus_hwid hwid;
+	int ret;
+
+	ret = avs_tgl_set_xtal_freq(adev);
+	if (ret)
+		return ret;
+
 	hwid.device = pci->device;
 	hwid.subsystem = pci->subsystem_vendor | (pci->subsystem_device << 16);
 	hwid.revision = pci->revision;
Signature · 1 line
2.53.0
author maintainer
#42 lore raw

PATCH 38/1146 platform/wmi: use generic driver_override infrastructure

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Danilo Krummrich <[email protected]>

[ Upstream commit 8a700b1fc94df4d847a04f14ebc7f8532592b367 ]

When a driver is probed through __driver_attach(), the bus' match() callback is called without the device lock held, thus accessing the driver_override field without a lock, which can cause a UAF.

Fix this by using the driver-core driver_override infrastructure taking care of proper locking internally.

Note that calling match() from __driver_attach() without the device lock held is intentional. [1]

---
 drivers/platform/wmi/core.c | 36 +++++-------------------------------
 include/linux/wmi.h         |  4 ----
 2 files changed, 5 insertions(+), 35 deletions(-)
drivers/platform/wmi/core.c +5 -31
index b8e6b9a421c62..750e3619724e0 100644
@@ -842,39 +842,11 @@ static ssize_t expensive_show(struct device *dev,
 }
 static DEVICE_ATTR_RO(expensive);
 
-static ssize_t driver_override_show(struct device *dev, struct device_attribute *attr,
-				    char *buf)
-{
-	struct wmi_device *wdev = to_wmi_device(dev);
-	ssize_t ret;
-
-	device_lock(dev);
-	ret = sysfs_emit(buf, "%s\n", wdev->driver_override);
-	device_unlock(dev);
-
-	return ret;
-}
-
-static ssize_t driver_override_store(struct device *dev, struct device_attribute *attr,
-				     const char *buf, size_t count)
-{
-	struct wmi_device *wdev = to_wmi_device(dev);
-	int ret;
-
-	ret = driver_set_override(dev, &wdev->driver_override, buf, count);
-	if (ret < 0)
-		return ret;
-
-	return count;
-}
-static DEVICE_ATTR_RW(driver_override);
-
 static struct attribute *wmi_attrs[] = {
 	&dev_attr_modalias.attr,
 	&dev_attr_guid.attr,
 	&dev_attr_instance_count.attr,
 	&dev_attr_expensive.attr,
-	&dev_attr_driver_override.attr,
 	NULL
 };
 ATTRIBUTE_GROUPS(wmi);
@@ -943,7 +915,6 @@ static void wmi_dev_release(struct device *dev)
 {
 	struct wmi_block *wblock = dev_to_wblock(dev);
 
-	kfree(wblock->dev.driver_override);
 	kfree(wblock);
 }
 
@@ -952,10 +923,12 @@ static int wmi_dev_match(struct device *dev, const struct device_driver *driver)
 	const struct wmi_driver *wmi_driver = to_wmi_driver(driver);
 	struct wmi_block *wblock = dev_to_wblock(dev);
 	const struct wmi_device_id *id = wmi_driver->id_table;
+	int ret;
 
 	/* When driver_override is set, only bind to the matching driver */
-	if (wblock->dev.driver_override)
-		return !strcmp(wblock->dev.driver_override, driver->name);
+	ret = device_match_driver_override(dev, driver);
+	if (ret >= 0)
+		return ret;
 
 	if (id == NULL)
 		return 0;
@@ -1076,6 +1049,7 @@ static struct class wmi_bus_class = {
 static const struct bus_type wmi_bus_type = {
 	.name = "wmi",
 	.dev_groups = wmi_groups,
+	.driver_override = true,
 	.match = wmi_dev_match,
 	.uevent = wmi_dev_uevent,
 	.probe = wmi_dev_probe,
include/linux/wmi.h +0 -4
index 75cb0c7cfe571..14fb644e1701c 100644
@@ -18,16 +18,12 @@
  * struct wmi_device - WMI device structure
  * @dev: Device associated with this WMI device
  * @setable: True for devices implementing the Set Control Method
- * @driver_override: Driver name to force a match; do not set directly,
- *		     because core frees it; use driver_set_override() to
- *		     set or clear it.
  *
  * This represents WMI devices discovered by the WMI driver core.
  */
 struct wmi_device {
 	struct device dev;
 	bool setable;
-	const char *driver_override;
 };
 
 /**
Signature · 1 line
2.53.0
author maintainer
#69 lore raw

PATCH 65/1146 x86/vdso: Clean up remnants of VDSO32_NOTE_MASK

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Thomas Weißschuh <[email protected]>

[ Upstream commit 6517f293b2c6774d21b6e7e26a55fae60c6ec4cf ]

VDSO32_NOTE_MASK is not used or provided anymore, remove it.

Fixes a13f2ef168cb ("x86/xen: remove 32-bit Xen PV guest support")
Cc H. Peter Anvin <[email protected]>
Cc Boris Ostrovsky <[email protected]>
Cc Juergen Gross <[email protected]>
---
 arch/x86/include/asm/vdso.h | 1 -
 arch/x86/tools/vdso2c.c     | 1 -
 2 files changed, 2 deletions(-)
arch/x86/include/asm/vdso.h +0 -1
index e8afbe9faa5b9..f2d49212ae902 100644
@@ -18,7 +18,6 @@ struct vdso_image {
 	unsigned long extable_base, extable_len;
 	const void *extable;
 
-	long sym_VDSO32_NOTE_MASK;
 	long sym___kernel_sigreturn;
 	long sym___kernel_rt_sigreturn;
 	long sym___kernel_vsyscall;
arch/x86/tools/vdso2c.c +0 -1
index f84e8f8fa5fe6..b8a555763f437 100644
@@ -75,7 +75,6 @@ struct vdso_sym {
 };
 
 struct vdso_sym required_syms[] = {
-	{"VDSO32_NOTE_MASK", true},
 	{"__kernel_vsyscall", true},
 	{"__kernel_sigreturn", true},
 	{"__kernel_rt_sigreturn", true},
Signature · 1 line
2.53.0
author maintainer
#70 lore raw

PATCH 66/1146 firmware: dmi: Correct an indexing error in dmi.h

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Mario Limonciello (AMD) <[email protected]>

[ Upstream commit c064abc68e009d2cc18416e7132d9c25e03125b6 ]

The entries later in enum dmi_entry_type don't match the SMBIOS specification¹.

The entry for type 33: 64-Bit Memory Error Information is not present and thus the index for all later entries is incorrect.

Add it.

Also, add missing entry types 43-46, while at it.

¹ Search for "System Management BIOS (SMBIOS) Reference Specification"

[ bp: Drop the flaky SMBIOS spec URL. ]

---
 include/linux/dmi.h | 5 +++++
 1 file changed, 5 insertions(+)
include/linux/dmi.h +5 -0
index 927f8a8b7a1dd..2eedf44e68012 100644
@@ -60,6 +60,7 @@ enum dmi_entry_type {
 	DMI_ENTRY_OOB_REMOTE_ACCESS,
 	DMI_ENTRY_BIS_ENTRY,
 	DMI_ENTRY_SYSTEM_BOOT,
+	DMI_ENTRY_64_MEM_ERROR,
 	DMI_ENTRY_MGMT_DEV,
 	DMI_ENTRY_MGMT_DEV_COMPONENT,
 	DMI_ENTRY_MGMT_DEV_THRES,
@@ -69,6 +70,10 @@ enum dmi_entry_type {
 	DMI_ENTRY_ADDITIONAL,
 	DMI_ENTRY_ONBOARD_DEV_EXT,
 	DMI_ENTRY_MGMT_CONTROLLER_HOST,
+	DMI_ENTRY_TPM_DEVICE,
+	DMI_ENTRY_PROCESSOR_ADDITIONAL,
+	DMI_ENTRY_FIRMWARE_INVENTORY,
+	DMI_ENTRY_STRING_PROPERTY,
 	DMI_ENTRY_INACTIVE = 126,
 	DMI_ENTRY_END_OF_TABLE = 127,
 };
Signature · 1 line
2.53.0
author maintainer
#71 lore raw

PATCH 67/1146 fs/resctrl: Report invalid domain ID when parsing io_alloc_cbm

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Aaron Tomlin <[email protected]>

[ Upstream commit d06b8e7c97c3290e61006e30b32beb9e715fab82 ]

The last_cmd_status file is intended to report details about the most recent resctrl filesystem operation, specifically to aid in diagnosing failures.

However, when parsing io_alloc_cbm, if a user provides a domain ID that does not exist in the resource, the operation fails with -EINVAL without updating last_cmd_status. This results in inconsistent behaviour where the system call returns an error, but last_cmd_status misleadingly reports "ok", leaving the user unaware that the failure was caused by an invalid domain ID.

Write an error message to last_cmd_status when the target domain ID cannot be found.

---
 fs/resctrl/ctrlmondata.c | 1 +
 1 file changed, 1 insertion(+)
fs/resctrl/ctrlmondata.c +1 -0
index cc4237c57cbe4..2ef53161ce119 100644
@@ -992,6 +992,7 @@ static int resctrl_io_alloc_parse_line(char *line,  struct rdt_resource *r,
 		}
 	}
 
+	rdt_last_cmd_printf("Invalid domain %lu\n", dom_id);
 	return -EINVAL;
 }
 
Signature · 1 line
2.53.0
author maintainer
#72 lore raw

PATCH 68/1146 sched: Make class_schedulers avoid pushing current, and get rid of proxy_tag_curr()

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: John Stultz <[email protected]>

[ Upstream commit e0ca8991b2de6c9dfe6fcd8a0364951b2bd56797 ]

With proxy-execution, the scheduler selects the donor, but for blocked donors, we end up running the lock owner.

This caused some complexity, because the class schedulers make sure to remove the task they pick from their pushable task lists, which prevents the donor from being migrated, but there wasn't then anything to prevent rq->curr from being migrated if rq->curr != rq->donor.

This was sort of hacked around by calling proxy_tag_curr() on the rq->curr task if we were running something other then the donor. proxy_tag_curr() did a dequeue/enqueue pair on the rq->curr task, allowing the class schedulers to remove it from their pushable list.

The dequeue/enqueue pair was wasteful, and additonally K Prateek highlighted that we didn't properly undo things when we stopped proxying, leaving the lock owner off the pushable list.

After some alternative approaches were considered, Peter suggested just having the RT/DL classes just avoid migrating when task_on_cpu().

So rework pick_next_pushable_dl_task() and the rt pick_next_pushable_task() functions so that they skip over the first pushable task if it is on_cpu.

Then just drop all of the proxy_tag_curr() logic.

---
 kernel/sched/core.c     | 24 ------------------------
 kernel/sched/deadline.c | 18 ++++++++++++++++--
 kernel/sched/rt.c       | 15 ++++++++++++---
 3 files changed, 28 insertions(+), 29 deletions(-)
kernel/sched/core.c +0 -24
index 14e947bcb3e5c..d5d0099d5ebf9 100644
@@ -6705,23 +6705,6 @@ find_proxy_task(struct rq *rq, struct task_struct *donor, struct rq_flags *rf)
 }
 #endif /* SCHED_PROXY_EXEC */
 
-static inline void proxy_tag_curr(struct rq *rq, struct task_struct *owner)
-{
-	if (!sched_proxy_exec())
-		return;
-	/*
-	 * pick_next_task() calls set_next_task() on the chosen task
-	 * at some point, which ensures it is not push/pullable.
-	 * However, the chosen/donor task *and* the mutex owner form an
-	 * atomic pair wrt push/pull.
-	 *
-	 * Make sure owner we run is not pushable. Unfortunately we can
-	 * only deal with that by means of a dequeue/enqueue cycle. :-/
-	 */
-	dequeue_task(rq, owner, DEQUEUE_NOCLOCK | DEQUEUE_SAVE);
-	enqueue_task(rq, owner, ENQUEUE_NOCLOCK | ENQUEUE_RESTORE);
-}
-
 /*
  * __schedule() is the main scheduler function.
  *
@@ -6874,9 +6857,6 @@ static void __sched notrace __schedule(int sched_mode)
 		 */
 		RCU_INIT_POINTER(rq->curr, next);
 
-		if (!task_current_donor(rq, next))
-			proxy_tag_curr(rq, next);
-
 		/*
 		 * The membarrier system call requires each architecture
 		 * to have a full memory barrier after updating
@@ -6910,10 +6890,6 @@ static void __sched notrace __schedule(int sched_mode)
 		/* Also unlocks the rq: */
 		rq = context_switch(rq, prev, next, &rf);
 	} else {
-		/* In case next was already curr but just got blocked_donor */
-		if (!task_current_donor(rq, next))
-			proxy_tag_curr(rq, next);
-
 		rq_unpin_lock(rq, &rf);
 		__balance_callbacks(rq, NULL);
 		raw_spin_rq_unlock_irq(rq);
kernel/sched/deadline.c +16 -2
index 674de6a48551b..b8145ccd94daf 100644
@@ -2801,12 +2801,26 @@ static int find_later_rq(struct task_struct *task)
 
 static struct task_struct *pick_next_pushable_dl_task(struct rq *rq)
 {
-	struct task_struct *p;
+	struct task_struct *i, *p = NULL;
+	struct rb_node *next_node;
 
 	if (!has_pushable_dl_tasks(rq))
 		return NULL;
 
-	p = __node_2_pdl(rb_first_cached(&rq->dl.pushable_dl_tasks_root));
+	next_node = rb_first_cached(&rq->dl.pushable_dl_tasks_root);
+	while (next_node) {
+		i = __node_2_pdl(next_node);
+		/* make sure task isn't on_cpu (possible with proxy-exec) */
+		if (!task_on_cpu(rq, i)) {
+			p = i;
+			break;
+		}
+
+		next_node = rb_next(next_node);
+	}
+
+	if (!p)
+		return NULL;
 
 	WARN_ON_ONCE(rq->cpu != task_cpu(p));
 	WARN_ON_ONCE(task_current(rq, p));
kernel/sched/rt.c +12 -3
index 906f6c656c2e9..87462d889f199 100644
@@ -1853,13 +1853,22 @@ static int find_lowest_rq(struct task_struct *task)
 
 static struct task_struct *pick_next_pushable_task(struct rq *rq)
 {
-	struct task_struct *p;
+	struct plist_head *head = &rq->rt.pushable_tasks;
+	struct task_struct *i, *p = NULL;
 
 	if (!has_pushable_tasks(rq))
 		return NULL;
 
-	p = plist_first_entry(&rq->rt.pushable_tasks,
-			      struct task_struct, pushable_tasks);
+	plist_for_each_entry(i, head, pushable_tasks) {
+		/* make sure task isn't on_cpu (possible with proxy-exec) */
+		if (!task_on_cpu(rq, i)) {
+			p = i;
+			break;
+		}
+	}
+
+	if (!p)
+		return NULL;
 
 	BUG_ON(rq->cpu != task_cpu(p));
 	BUG_ON(task_current(rq, p));
Signature · 1 line
2.53.0
author maintainer
#73 lore raw

PATCH 69/1146 sched/rt: Skip group schedulable check with rt_group_sched=0

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Michal Koutný <[email protected]>

[ Upstream commit 8b016dcec9365675be81d26be88f2c09cf983bd4 ]

The warning from the commit 87f1fb77d87a6 ("sched: Add RT_GROUP WARN checks for non-root task_groups") is wrong -- it assumes that only task_groups with rt_rq are traversed, however, the schedulability check would iterate all task_groups even when rt_group_sched=0 is disabled at boot time but some non-root task_groups exist.

The schedulability check is supposed to validate:
a) that children don't overcommit its parent,
b) no RT task group overcommits global RT limit.
but with rt_group_sched=0 there is no (non-trivial) hierarchy of RT groups, therefore skip the validation altogether. Otherwise, writes to the global sched_rt_runtime_us knob will be rejected with incorrect validation error.

This fix is immaterial with CONFIG_RT_GROUP_SCHED=n.

Fixes 87f1fb77d87a6 ("sched: Add RT_GROUP WARN checks for non-root task_groups")
---
 kernel/sched/rt.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
kernel/sched/rt.c +2 -3
index 87462d889f199..0cbee031858a5 100644
@@ -2685,9 +2685,6 @@ static int tg_rt_schedulable(struct task_group *tg, void *data)
 	    tg->rt_bandwidth.rt_runtime && tg_has_rt_tasks(tg))
 		return -EBUSY;
 
-	if (WARN_ON(!rt_group_sched_enabled() && tg != &root_task_group))
-		return -EBUSY;
-
 	total = to_ratio(period, runtime);
 
 	/*
@@ -2831,6 +2828,8 @@ long sched_group_rt_period(struct task_group *tg)
 static int sched_rt_global_constraints(void)
 {
 	int ret = 0;
+	if (!rt_group_sched_enabled())
+		return ret;
 
 	mutex_lock(&rt_constraints_mutex);
 	ret = __rt_schedulable(NULL, 0, 0);
Signature · 1 line
2.53.0
author maintainer
#74 lore raw

PATCH 70/1146 wifi: ath11k: fix memory leaks in beacon template setup

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Zilin Guan <[email protected]>

[ Upstream commit ff49eba595df500e4ddccc593088c8a4ab5f2c27 ]

The functions ath11k_mac_setup_bcn_tmpl_ema() and ath11k_mac_setup_bcn_tmpl_mbssid() allocate memory for beacon templates but fail to free it when parameter setup returns an error.

Since beacon templates must be released during normal execution, they must also be released in the error handling paths to prevent memory leaks.

Fix this by using unified exit paths with proper cleanup in the respective error paths.

Compile tested only. Issue found using a prototype static analysis tool and code review.

Fixes 3a415daa3e8b ("wifi: ath11k: add P2P IE in beacon template")
Fixes 335a92765d30 ("wifi: ath11k: MBSSID beacon support")
---
 drivers/net/wireless/ath/ath11k/mac.c | 28 ++++++++++++++++-----------
 1 file changed, 17 insertions(+), 11 deletions(-)
drivers/net/wireless/ath/ath11k/mac.c +17 -11
index e4ee2ba1f669e..c06ee110a90f0 100644
@@ -1557,12 +1557,15 @@ static int ath11k_mac_setup_bcn_tmpl_ema(struct ath11k_vif *arvif,
 	if (!beacons || !beacons->cnt) {
 		ath11k_warn(arvif->ar->ab,
 			    "failed to get ema beacon templates from mac80211\n");
-		return -EPERM;
+		ret = -EPERM;
+		goto free;
 	}
 
 	if (tx_arvif == arvif) {
-		if (ath11k_mac_set_vif_params(tx_arvif, beacons->bcn[0].skb))
-			return -EINVAL;
+		if (ath11k_mac_set_vif_params(tx_arvif, beacons->bcn[0].skb)) {
+			ret = -EINVAL;
+			goto free;
+		}
 	} else {
 		arvif->wpaie_present = tx_arvif->wpaie_present;
 	}
@@ -1589,11 +1592,11 @@ static int ath11k_mac_setup_bcn_tmpl_ema(struct ath11k_vif *arvif,
 		}
 	}
 
-	ieee80211_beacon_free_ema_list(beacons);
-
 	if (tx_arvif != arvif && !nontx_vif_params_set)
-		return -EINVAL; /* Profile not found in the beacons */
+		ret = -EINVAL; /* Profile not found in the beacons */
 
+free:
+	ieee80211_beacon_free_ema_list(beacons);
 	return ret;
 }
 
@@ -1622,19 +1625,22 @@ static int ath11k_mac_setup_bcn_tmpl_mbssid(struct ath11k_vif *arvif,
 	}
 
 	if (tx_arvif == arvif) {
-		if (ath11k_mac_set_vif_params(tx_arvif, bcn))
-			return -EINVAL;
+		if (ath11k_mac_set_vif_params(tx_arvif, bcn)) {
+			ret = -EINVAL;
+			goto free;
+		}
 	} else if (!ath11k_mac_set_nontx_vif_params(tx_arvif, arvif, bcn)) {
-		return -EINVAL;
+		ret = -EINVAL;
+		goto free;
 	}
 
 	ret = ath11k_wmi_bcn_tmpl(ar, arvif->vdev_id, &offs, bcn, 0);
-	kfree_skb(bcn);
-
 	if (ret)
 		ath11k_warn(ab, "failed to submit beacon template command: %d\n",
 			    ret);
 
+free:
+	kfree_skb(bcn);
 	return ret;
 }
 
Signature · 1 line
2.53.0
author maintainer
#75 lore raw

PATCH 71/1146 wifi: mwifiex: Fix memory leak in mwifiex_11n_aggregate_pkt()

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Zilin Guan <[email protected]>

[ Upstream commit 990a73dec3fdc145fef6c827c29205437d533ece ]

In mwifiex_11n_aggregate_pkt(), skb_aggr is allocated via mwifiex_alloc_dma_align_buf(). If mwifiex_is_ralist_valid() returns false, the function currently returns -1 immediately without freeing the previously allocated skb_aggr, causing a memory leak.

Since skb_aggr has not yet been queued via skb_queue_tail(), no other references to this memory exist. Therefore, it has to be freed locally before returning the error.

Fix this by calling mwifiex_write_data_complete() to free skb_aggr before returning the error status.

Compile tested only. Issue found using a prototype static analysis tool and code review.

Fixes 5e6e3a92b9a4 ("wireless: mwifiex: initial commit for Marvell mwifiex driver")
---
 drivers/net/wireless/marvell/mwifiex/11n_aggr.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/wireless/marvell/mwifiex/11n_aggr.c +1 -0
index 34b4b34276d6d..042b1fe5f0d67 100644
@@ -203,6 +203,7 @@ mwifiex_11n_aggregate_pkt(struct mwifiex_private *priv,
 
 		if (!mwifiex_is_ralist_valid(priv, pra_list, ptrindex)) {
 			spin_unlock_bh(&priv->wmm.ra_list_spinlock);
+			mwifiex_write_data_complete(adapter, skb_aggr, 1, -1);
 			return -1;
 		}
 
Signature · 1 line
2.53.0
author maintainer
#76 lore raw

PATCH 72/1146 wifi: rtlwifi: pci: fix possible use-after-free caused by unfinished irq_prepare_bcn_tasklet

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Duoming Zhou <[email protected]>

[ Upstream commit 039cd522dc70151da13329a5e3ae19b1736f468a ]

The irq_prepare_bcn_tasklet is initialized in rtl_pci_init() and scheduled when RTL_IMR_BCNINT interrupt is triggered by hardware. But it is never killed in rtl_pci_deinit(). When the rtlwifi card probe fails or is being detached, the ieee80211_hw is deallocated. However, irq_prepare_bcn_tasklet may still be running or pending, leading to use-after-free when the freed ieee80211_hw is accessed in _rtl_pci_prepare_bcn_tasklet().

Similar to irq_tasklet, add tasklet_kill() in rtl_pci_deinit() to ensure that irq_prepare_bcn_tasklet is properly terminated before the ieee80211_hw is released.

The issue was identified through static analysis.

---
 drivers/net/wireless/realtek/rtlwifi/pci.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/wireless/realtek/rtlwifi/pci.c +1 -0
index d080469264cf8..f0010336e78c1 100644
@@ -1674,6 +1674,7 @@ static void rtl_pci_deinit(struct ieee80211_hw *hw)
 
 	synchronize_irq(rtlpci->pdev->irq);
 	tasklet_kill(&rtlpriv->works.irq_tasklet);
+	tasklet_kill(&rtlpriv->works.irq_prepare_bcn_tasklet);
 	cancel_work_sync(&rtlpriv->works.lps_change_work);
 }
 
Signature · 1 line
2.53.0
author maintainer
#77 lore raw

PATCH 73/1146 bpf: test_run: Fix the null pointer dereference issue in bpf_lwt_xmit_push_encap

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Feng Yang <[email protected]>

[ Upstream commit 972787479ee73006fddb5e59ab5c8e733810ff42 ]

The bpf_lwt_xmit_push_encap helper needs to access skb_dst(skb)->dev to calculate the needed headroom:

	err = skb_cow_head(skb,
			   len + LL_RESERVED_SPACE(skb_dst(skb)->dev));

But skb->_skb_refdst may not be initialized when the skb is set up by bpf_prog_test_run_skb function. Executing bpf_lwt_push_ip_encap function in this scenario will trigger null pointer dereference, causing a kernel crash as Yinhao reported:

[  105.186365] BUG: kernel NULL pointer dereference, address: 0000000000000000
[  105.186382] #PF: supervisor read access in kernel mode
[  105.186388] #PF: error_code(0x0000) - not-present page
[  105.186393] PGD 121d3d067 P4D 121d3d067 PUD 106c83067 PMD 0
[  105.186404] Oops: 0000 [#1] PREEMPT SMP NOPTI
[  105.186412] CPU: 3 PID: 3250 Comm: poc Kdump: loaded Not tainted 6.19.0-rc5 #1
[  105.186423] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[  105.186427] RIP: 0010:bpf_lwt_push_ip_encap+0x1eb/0x520
[  105.186443] Code: 0f 84 de 01 00 00 0f b7 4a 04 66 85 c9 0f 85 47 01 00 00 31 c0 5b 5d 41 5c 41 5d 41 5e c3 cc cc cc cc 48 8b 73 58 48 83 e6 fe <48> 8b 36 0f b7 be ec 00 00 00 0f b7 b6 e6 00 00 00 01 fe 83 e6 f0
[  105.186449] RSP: 0018:ffffbb0e0387bc50 EFLAGS: 00010246
[  105.186455] RAX: 000000000000004e RBX: ffff94c74e036500 RCX: ffff94c74874da00
[  105.186460] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff94c74e036500
[  105.186463] RBP: 0000000000000001 R08: 0000000000000002 R09: 0000000000000000
[  105.186467] R10: ffffbb0e0387bd50 R11: 0000000000000000 R12: ffffbb0e0387bc98
[  105.186471] R13: 0000000000000014 R14: 0000000000000000 R15: 0000000000000002
[  105.186484] FS:  00007f166aa4d680(0000) GS:ffff94c8b7780000(0000) knlGS:0000000000000000
[  105.186490] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  105.186494] CR2: 0000000000000000 CR3: 000000015eade001 CR4: 0000000000770ee0
[  105.186499] PKRU: 55555554
[  105.186502] Call Trace:
[  105.186507]  <TASK>
[  105.186513]  bpf_lwt_xmit_push_encap+0x2b/0x40
[  105.186522]  bpf_prog_a75eaad51e517912+0x41/0x49
[  105.186536]  ? kvm_clock_get_cycles+0x18/0x30
[  105.186547]  ? ktime_get+0x3c/0xa0
[  105.186554]  bpf_test_run+0x195/0x320
[  105.186563]  ? bpf_test_run+0x10f/0x320
[  105.186579]  bpf_prog_test_run_skb+0x2f5/0x4f0
[  105.186590]  __sys_bpf+0x69c/0xa40
[  105.186603]  __x64_sys_bpf+0x1e/0x30
[  105.186611]  do_syscall_64+0x59/0x110
[  105.186620]  entry_SYSCALL_64_after_hwframe+0x76/0xe0
[  105.186649] RIP: 0033:0x7f166a97455d

Temporarily add the setting of skb->_skb_refdst before bpf_test_run to resolve the issue.

---
 net/bpf/test_run.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
net/bpf/test_run.c +15 -0
index 178c4738e63be..56bc8dc1e2811 100644
@@ -1156,6 +1156,21 @@ int bpf_prog_test_run_skb(struct bpf_prog *prog, const union bpf_attr *kattr,
 		skb->ip_summed = CHECKSUM_COMPLETE;
 	}
 
+	if (prog->type == BPF_PROG_TYPE_LWT_XMIT) {
+		if (!ipv6_bpf_stub) {
+			pr_warn_once("Please test this program with the IPv6 module loaded\n");
+			ret = -EOPNOTSUPP;
+			goto out;
+		}
+#if IS_ENABLED(CONFIG_IPV6)
+		/* For CONFIG_IPV6=n, ipv6_bpf_stub is NULL which is
+		 * handled by the above if statement.
+		 */
+		dst_hold(&net->ipv6.ip6_null_entry->dst);
+		skb_dst_set(skb, &net->ipv6.ip6_null_entry->dst);
+#endif
+	}
+
 	ret = bpf_test_run(prog, skb, repeat, &retval, &duration, false);
 	if (ret)
 		goto out;
Signature · 1 line
2.53.0
author maintainer
#78 lore raw

PATCH 74/1146 wifi: ath12k: account TX stats only when ACK/BA status is present

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Sarika Sharma <[email protected]>

[ Upstream commit 1635ecc61a24597f893d057d004051a535c1c643 ]

The fields tx_retry_failed, tx_retry_count, and tx_duration are currently updated outside the HTT_PPDU_STATS_TAG_USR_COMPLTN_ACK_BA_STATUS flag check. In certain scenarios, firmware delivers multiple PPDU statistics for the same PPDU, first without BA/ACK information, and later with BA/ACK status once it becomes available. As the same PPDU is processed again, these counters are updated a second time, resulting in duplicate TX statistics.

To address this, move the accounting of tx_retry_failed and tx_retry_count under the ACK/BA status flag check, and similarly gate tx_duration on the same path. This ensures that each PPDU contributes to these counters exactly once, avoids double counting, and provides consistent reporting in userspace tools such as station dump.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01243-QCAHKSWPL_SILICONZ-1

Fixes a0b963e1da5b ("wifi: ath12k: fetch tx_retry and tx_failed from htt_ppdu_stats_user_cmpltn_common_tlv")
---
 drivers/net/wireless/ath/ath12k/dp_htt.c | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)
drivers/net/wireless/ath/ath12k/dp_htt.c +13 -11
index e71bb71a6020e..9c19d9707abfb 100644
@@ -205,16 +205,9 @@ ath12k_update_per_peer_tx_stats(struct ath12k_pdev_dp *dp_pdev,
 	if (!(usr_stats->tlv_flags & BIT(HTT_PPDU_STATS_TAG_USR_RATE)))
 		return;
 
-	if (usr_stats->tlv_flags & BIT(HTT_PPDU_STATS_TAG_USR_COMPLTN_COMMON)) {
+	if (usr_stats->tlv_flags & BIT(HTT_PPDU_STATS_TAG_USR_COMPLTN_COMMON))
 		is_ampdu =
 			HTT_USR_CMPLTN_IS_AMPDU(usr_stats->cmpltn_cmn.flags);
-		tx_retry_failed =
-			__le16_to_cpu(usr_stats->cmpltn_cmn.mpdu_tried) -
-			__le16_to_cpu(usr_stats->cmpltn_cmn.mpdu_success);
-		tx_retry_count =
-			HTT_USR_CMPLTN_LONG_RETRY(usr_stats->cmpltn_cmn.flags) +
-			HTT_USR_CMPLTN_SHORT_RETRY(usr_stats->cmpltn_cmn.flags);
-	}
 
 	if (usr_stats->tlv_flags &
 	    BIT(HTT_PPDU_STATS_TAG_USR_COMPLTN_ACK_BA_STATUS)) {
@@ -223,10 +216,19 @@ ath12k_update_per_peer_tx_stats(struct ath12k_pdev_dp *dp_pdev,
 					  HTT_PPDU_STATS_ACK_BA_INFO_NUM_MSDU_M);
 		tid = le32_get_bits(usr_stats->ack_ba.info,
 				    HTT_PPDU_STATS_ACK_BA_INFO_TID_NUM);
-	}
 
-	if (common->fes_duration_us)
-		tx_duration = le32_to_cpu(common->fes_duration_us);
+		if (usr_stats->tlv_flags & BIT(HTT_PPDU_STATS_TAG_USR_COMPLTN_COMMON)) {
+			tx_retry_failed =
+				__le16_to_cpu(usr_stats->cmpltn_cmn.mpdu_tried) -
+				__le16_to_cpu(usr_stats->cmpltn_cmn.mpdu_success);
+			tx_retry_count =
+				HTT_USR_CMPLTN_LONG_RETRY(usr_stats->cmpltn_cmn.flags) +
+				HTT_USR_CMPLTN_SHORT_RETRY(usr_stats->cmpltn_cmn.flags);
+		}
+
+		if (common->fes_duration_us)
+			tx_duration = le32_to_cpu(common->fes_duration_us);
+	}
 
 	user_rate = &usr_stats->rate;
 	flags = HTT_USR_RATE_PREAMBLE(user_rate->rate_flags);
Signature · 1 line
2.53.0
author maintainer
#43 lore raw

PATCH 39/1146 vdpa: use generic driver_override infrastructure

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Danilo Krummrich <[email protected]>

[ Upstream commit 85bb534ff12aab6916058897b39c748940a7a4c6 ]

When a driver is probed through __driver_attach(), the bus' match() callback is called without the device lock held, thus accessing the driver_override field without a lock, which can cause a UAF.

Fix this by using the driver-core driver_override infrastructure taking care of proper locking internally.

Note that calling match() from __driver_attach() without the device lock held is intentional. [1]

---
 drivers/vdpa/vdpa.c  | 48 +++++---------------------------------------
 include/linux/vdpa.h |  4 ----
 2 files changed, 5 insertions(+), 47 deletions(-)
drivers/vdpa/vdpa.c +5 -43
index 34874beb0152e..caf0ee5d6856c 100644
@@ -67,57 +67,20 @@ static void vdpa_dev_remove(struct device *d)
 
 static int vdpa_dev_match(struct device *dev, const struct device_driver *drv)
 {
-	struct vdpa_device *vdev = dev_to_vdpa(dev);
+	int ret;
 
 	/* Check override first, and if set, only use the named driver */
-	if (vdev->driver_override)
-		return strcmp(vdev->driver_override, drv->name) == 0;
+	ret = device_match_driver_override(dev, drv);
+	if (ret >= 0)
+		return ret;
 
 	/* Currently devices must be supported by all vDPA bus drivers */
 	return 1;
 }
 
-static ssize_t driver_override_store(struct device *dev,
-				     struct device_attribute *attr,
-				     const char *buf, size_t count)
-{
-	struct vdpa_device *vdev = dev_to_vdpa(dev);
-	int ret;
-
-	ret = driver_set_override(dev, &vdev->driver_override, buf, count);
-	if (ret)
-		return ret;
-
-	return count;
-}
-
-static ssize_t driver_override_show(struct device *dev,
-				    struct device_attribute *attr, char *buf)
-{
-	struct vdpa_device *vdev = dev_to_vdpa(dev);
-	ssize_t len;
-
-	device_lock(dev);
-	len = sysfs_emit(buf, "%s\n", vdev->driver_override);
-	device_unlock(dev);
-
-	return len;
-}
-static DEVICE_ATTR_RW(driver_override);
-
-static struct attribute *vdpa_dev_attrs[] = {
-	&dev_attr_driver_override.attr,
-	NULL,
-};
-
-static const struct attribute_group vdpa_dev_group = {
-	.attrs  = vdpa_dev_attrs,
-};
-__ATTRIBUTE_GROUPS(vdpa_dev);
-
 static const struct bus_type vdpa_bus = {
 	.name  = "vdpa",
-	.dev_groups = vdpa_dev_groups,
+	.driver_override = true,
 	.match = vdpa_dev_match,
 	.probe = vdpa_dev_probe,
 	.remove = vdpa_dev_remove,
@@ -132,7 +95,6 @@ static void vdpa_release_dev(struct device *d)
 		ops->free(vdev);
 
 	ida_free(&vdpa_index_ida, vdev->index);
-	kfree(vdev->driver_override);
 	kfree(vdev);
 }
 
include/linux/vdpa.h +0 -4
index 2bfe3baa63f42..782c42d25db16 100644
@@ -72,9 +72,6 @@ struct vdpa_mgmt_dev;
  * struct vdpa_device - representation of a vDPA device
  * @dev: underlying device
  * @vmap: the metadata passed to upper layer to be used for mapping
- * @driver_override: driver name to force a match; do not set directly,
- *                   because core frees it; use driver_set_override() to
- *                   set or clear it.
  * @config: the configuration ops for this device.
  * @map: the map ops for this device
  * @cf_lock: Protects get and set access to configuration layout.
@@ -90,7 +87,6 @@ struct vdpa_mgmt_dev;
 struct vdpa_device {
 	struct device dev;
 	union virtio_map vmap;
-	const char *driver_override;
 	const struct vdpa_config_ops *config;
 	const struct virtio_map_ops *map;
 	struct rw_semaphore cf_lock; /* Protects get/set config */
Signature · 1 line
2.53.0
author maintainer
#79 lore raw

PATCH 75/1146 wifi: ath12k: Fix legacy rate mapping for monitor mode capture

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: P Praneesh <[email protected]>

[ Upstream commit 616217a989e09c55398db8555e5ef0c64504cb66 ]

The current implementation incorrectly reports legacy CCK and OFDM rates in monitor mode radiotap headers. The rate field displays wrong values, for example showing 11 Mbps when the actual rate is 1 Mbps. This occurs because the HAL layer uses a unified enum for both CCK and OFDM rates without distinguishing between long/short preamble variants and proper rate mapping to hardware rate indices.

The root cause is threefold:

1. The hal_rx_legacy_rate enum conflates CCK and OFDM rates into a single enumeration, making it impossible to differentiate between 802.11b CCK rates (with long/short preamble variants) and 802.11a/g OFDM rates.

2. The L-SIG-B parsing function maps hardware rate values to the wrong enum values. For CCK rates, it incorrectly combines long and short preamble cases (e.g., cases 2 and 5 both map to 2 Mbps), losing preamble information critical for proper rate identification.

3. The mac layer's rate-to-index conversion function does not properly handle the precedence between long preamble, short preamble, and OFDM rates when matching hardware rate values.

Split the hal_rx_legacy_rate enum into two separate enumerations:
hal_rx_legacy_rate for CCK rates with explicit long preamble (LP) and short preamble (SP) variants, and hal_rx_legacy_rates_ofdm for OFDM rates. This separation allows proper identification of rate types and preamble modes.

Introduce a new mapping ath12k_wifi7_hal_mon_map_legacy_rate_to_hw_rate() that converts HAL CCK rate enums to hardware rate indices defined in ath12k_hw_rate_cck. This ensures the rate field in ppdu_info contains the correct hardware rate index that matches the mac layer's expectations.

Update the L-SIG-B parsing to map each hardware rate value (1-7) to its corresponding CCK rate enum with proper preamble designation:
- Cases 1-4: Long preamble (1, 2, 5.5, 11 Mbps)
- Cases 5-7: Short preamble (2, 5.5, 11 Mbps)

Update the L-SIG-A parsing to use the new OFDM-specific enum values, maintaining the existing rate mapping for 802.11a/g OFDM rates.

Refactor the mac layer's ath12k_mac_hw_rate_to_idx() function to implement proper matching precedence:
1. First match OFDM rates using the IEEE80211_RATE_MANDATORY_A flag
2. Then match CCK short preamble rates
3. Finally match CCK long preamble rates as fallback

Add helper macros ATH12K_MAC_RATE_A_M and ATH12K_MAC_RATE_B to improve readability of the rate table initialization and ensure the mandatory flag is set for OFDM rates.

This fix ensures monitor mode captures display accurate rate information in the radiotap header, correctly distinguishing between 1 Mbps and 11 Mbps, and properly identifying preamble types for CCK rates.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01181-QCAHKSWPL_SILICONZ-1

---
 drivers/net/wireless/ath/ath12k/hal.h         | 31 +++++---
 drivers/net/wireless/ath/ath12k/mac.c         | 51 +++++++------
 .../net/wireless/ath/ath12k/wifi7/dp_mon.c    | 76 +++++++++++++++----
 3 files changed, 108 insertions(+), 50 deletions(-)
drivers/net/wireless/ath/ath12k/hal.h +19 -12
index 43e3880f82579..bf4f7dbae8669 100644
@@ -268,21 +268,28 @@ enum hal_rx_reception_type {
 };
 
 enum hal_rx_legacy_rate {
-	HAL_RX_LEGACY_RATE_1_MBPS,
-	HAL_RX_LEGACY_RATE_2_MBPS,
-	HAL_RX_LEGACY_RATE_5_5_MBPS,
-	HAL_RX_LEGACY_RATE_6_MBPS,
-	HAL_RX_LEGACY_RATE_9_MBPS,
-	HAL_RX_LEGACY_RATE_11_MBPS,
-	HAL_RX_LEGACY_RATE_12_MBPS,
-	HAL_RX_LEGACY_RATE_18_MBPS,
-	HAL_RX_LEGACY_RATE_24_MBPS,
-	HAL_RX_LEGACY_RATE_36_MBPS,
-	HAL_RX_LEGACY_RATE_48_MBPS,
-	HAL_RX_LEGACY_RATE_54_MBPS,
+	HAL_RX_LEGACY_RATE_LP_1_MBPS,
+	HAL_RX_LEGACY_RATE_LP_2_MBPS,
+	HAL_RX_LEGACY_RATE_LP_5_5_MBPS,
+	HAL_RX_LEGACY_RATE_LP_11_MBPS,
+	HAL_RX_LEGACY_RATE_SP_2_MBPS,
+	HAL_RX_LEGACY_RATE_SP_5_5_MBPS,
+	HAL_RX_LEGACY_RATE_SP_11_MBPS,
 	HAL_RX_LEGACY_RATE_INVALID,
 };
 
+enum hal_rx_legacy_rates_ofdm {
+	HAL_RX_LEGACY_RATE_OFDM_48_MBPS,
+	HAL_RX_LEGACY_RATE_OFDM_24_MBPS,
+	HAL_RX_LEGACY_RATE_OFDM_12_MBPS,
+	HAL_RX_LEGACY_RATE_OFDM_6_MBPS,
+	HAL_RX_LEGACY_RATE_OFDM_54_MBPS,
+	HAL_RX_LEGACY_RATE_OFDM_36_MBPS,
+	HAL_RX_LEGACY_RATE_OFDM_18_MBPS,
+	HAL_RX_LEGACY_RATE_OFDM_9_MBPS,
+	HAL_RX_LEGACY_RATE_OFDM_INVALID,
+};
+
 enum hal_ring_type {
 	HAL_REO_DST,
 	HAL_REO_EXCEPTION,
drivers/net/wireless/ath/ath12k/mac.c +29 -22

70 lines not on this page · raw message

drivers/net/wireless/ath/ath12k/wifi7/dp_mon.c +60 -16

122 lines not on this page · raw message

Signature · 1 line
2.53.0
author maintainer
#80 lore raw

PATCH 76/1146 selftests/bpf: Handle !CONFIG_SMC in bpf_smc.c

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Alan Maguire <[email protected]>

[ Upstream commit e95e85b8914be1c951a1ead34b1353592719e26e ]

Currently BPF selftests will fail to compile if CONFIG_SMC is not set.

Use BPF CO-RE to work around the case where CONFIG_SMC is not set; use ___local variants of relevant structures and utilize bpf_core_field_exists() for net->smc.

The test continues to pass where

CONFIG_SMC=y
CONFIG_SMC_HS_CTRL_BPF=y

but these changes allow the selftests to build in the absence of CONFIG_SMC=y.

Also ensure that we get a pure skip rather than a skip+fail by removing the SMC is unsupported part from the ASSERT_FALSE() in get_smc_nl_family(); doing this means we get a skip without a fail when CONFIG_SMC is not set:

$ sudo ./test_progs -t bpf_smc
Summary: 1/0 PASSED, 1 SKIPPED, 0 FAILED
---
 .../selftests/bpf/prog_tests/test_bpf_smc.c   |  6 ++--
 tools/testing/selftests/bpf/progs/bpf_smc.c   | 28 +++++++++++++++++--
 2 files changed, 30 insertions(+), 4 deletions(-)
tools/testing/selftests/bpf/prog_tests/test_bpf_smc.c +4 -2
index de22734abc4d2..40d38280c091e 100644
@@ -131,8 +131,10 @@ static bool get_smc_nl_family_id(void)
 		goto fail;
 
 	ret = recv(fd, &msg, sizeof(msg), 0);
-	if (!ASSERT_FALSE(msg.n.nlmsg_type == NLMSG_ERROR || ret < 0 ||
-			  !NLMSG_OK(&msg.n, ret), "nl_family response"))
+	if (msg.n.nlmsg_type == NLMSG_ERROR)
+		goto fail;
+	if (!ASSERT_FALSE(ret < 0 || !NLMSG_OK(&msg.n, ret),
+			  "nl_family response"))
 		goto fail;
 
 	nl = (struct nlattr *)GENLMSG_DATA(&msg);
tools/testing/selftests/bpf/progs/bpf_smc.c +26 -2
index 70d8b08f59140..6263a45bf0066 100644
@@ -8,6 +8,10 @@
 
 char _license[] SEC("license") = "GPL";
 
+#ifndef SMC_HS_CTRL_NAME_MAX
+#define SMC_HS_CTRL_NAME_MAX 16
+#endif
+
 enum {
 	BPF_SMC_LISTEN	= 10,
 };
@@ -18,6 +22,20 @@ struct smc_sock___local {
 	bool use_fallback;
 } __attribute__((preserve_access_index));
 
+struct smc_hs_ctrl___local {
+	char name[SMC_HS_CTRL_NAME_MAX];
+	int (*syn_option)(struct tcp_sock *);
+	int (*synack_option)(const struct tcp_sock  *, struct inet_request_sock *);
+} __attribute__((preserve_access_index));
+
+struct netns_smc___local {
+	struct smc_hs_ctrl___local *hs_ctrl;
+} __attribute__((preserve_access_index));
+
+struct net___local {
+	struct netns_smc___local smc;
+} __attribute__((preserve_access_index));
+
 int smc_cnt = 0;
 int fallback_cnt = 0;
 
@@ -88,8 +106,14 @@ int BPF_PROG(smc_run, int family, int type, int protocol)
 
 	task = bpf_get_current_task_btf();
 	/* Prevent from affecting other tests */
-	if (!task || !task->nsproxy->net_ns->smc.hs_ctrl)
+	if (!task) {
 		return protocol;
+	} else {
+		struct net___local *net = (struct net___local *)task->nsproxy->net_ns;
+
+		if (!bpf_core_field_exists(struct net___local, smc) || !net->smc.hs_ctrl)
+			return protocol;
+	}
 
 	return IPPROTO_SMC;
 }
@@ -110,7 +134,7 @@ int BPF_PROG(bpf_smc_set_tcp_option, struct tcp_sock *tp)
 }
 
 SEC(".struct_ops")
-struct smc_hs_ctrl  linkcheck = {
+struct smc_hs_ctrl___local  linkcheck = {
 	.name		= "linkcheck",
 	.syn_option	= (void *)bpf_smc_set_tcp_option,
 	.synack_option	= (void *)bpf_smc_set_tcp_option_cond,
Signature · 1 line
2.53.0
author maintainer
#81 lore raw

PATCH 77/1146 wifi: ieee80211: fix definition of EHT-MCS 15 in MRU

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Shayne Chen <[email protected]>

[ Upstream commit cb0caadb64ca0894c4a24e1a34841f260d462f90 ]

According to the definition in IEEE Std 802.11be-2024, Table 9-417r, each bit indicates support for the transmission and reception of EHT-MCS 15 in:
- B0: 52+26-tone and 106+26-tone MRUs.
- B1: a 484+242-tone MRU if 80 MHz is supported.
- B2: a 996+484-tone MRU and a 996+484+242-tone MRU if 160 MHz is supported.
- B3: a 3×996-tone MRU if 320 MHz is supported.

Fixes 6239da18d2f9 ("wifi: mac80211: adjust EHT capa when lowering bandwidth")
---
 include/linux/ieee80211-eht.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/linux/ieee80211-eht.h +2 -2
index f8e9f5d36d2a2..a97b1d01f3acf 100644
@@ -251,8 +251,8 @@ struct ieee80211_eht_operation_info {
 #define IEEE80211_EHT_PHY_CAP5_SUPP_EXTRA_EHT_LTF		0x40
 #define IEEE80211_EHT_PHY_CAP6_MAX_NUM_SUPP_EHT_LTF_MASK	0x07
 
-#define IEEE80211_EHT_PHY_CAP6_MCS15_SUPP_80MHZ			0x08
-#define IEEE80211_EHT_PHY_CAP6_MCS15_SUPP_160MHZ		0x30
+#define IEEE80211_EHT_PHY_CAP6_MCS15_SUPP_80MHZ			0x10
+#define IEEE80211_EHT_PHY_CAP6_MCS15_SUPP_160MHZ		0x20
 #define IEEE80211_EHT_PHY_CAP6_MCS15_SUPP_320MHZ		0x40
 #define IEEE80211_EHT_PHY_CAP6_MCS15_SUPP_MASK			0x78
 #define IEEE80211_EHT_PHY_CAP6_EHT_DUP_6GHZ_SUPP		0x80
Signature · 1 line
2.53.0
author maintainer
#82 lore raw

PATCH 78/1146 dpaa2: add independent dependencies for FSL_DPAA2_SWITCH

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Cai Xinchen <[email protected]>

[ Upstream commit 12589892f41c4c645c80ef9f036f7451a6045624 ]

Since the commit 84cba72956fd ("dpaa2-switch: integrate the MAC endpoint support") included dpaa2-mac.o in the driver, but it didn't select PCS_LYNX, PHYLINK and FSL_XGMAC_MDIO. it will lead to link error, such as
undefined reference to phylink_ethtool_ksettings_set' undefined reference to lynx_pcs_create_fwnode'

And the same reason as the commit d2624e70a2f53 ("dpaa2-eth: select XGMAC_MDIO for MDIO bus support"), enable the FSL_XGMAC_MDIO Kconfig option in order to have MDIO access to internal and external PHYs.

Because dpaa2-switch uses fsl_mc_driver APIs, add depends on FSL_MC_BUS && FSL_MC_DPIO as FSL_DPAA2_SWITCH do.

FSL_XGMAC_MDIO and FSL_MC_BUS depend on OF, thus the dependence of FSL_MC_BUS can satisfy FSL_XGMAC_MDIO's OF requirement.

Fixes 84cba72956fd ("dpaa2-switch: integrate the MAC endpoint support")
---
 drivers/net/ethernet/freescale/dpaa2/Kconfig | 4 ++++
 1 file changed, 4 insertions(+)
drivers/net/ethernet/freescale/dpaa2/Kconfig +4 -0
index d029b69c3f183..36280e5d99e1f 100644
@@ -34,6 +34,10 @@ config FSL_DPAA2_SWITCH
 	tristate "Freescale DPAA2 Ethernet Switch"
 	depends on BRIDGE || BRIDGE=n
 	depends on NET_SWITCHDEV
+	depends on FSL_MC_BUS && FSL_MC_DPIO
+	select PHYLINK
+	select PCS_LYNX
+	select FSL_XGMAC_MDIO
 	help
 	  Driver for Freescale DPAA2 Ethernet Switch. This driver manages
 	  switch objects discovered on the Freeescale MC bus.
Signature · 1 line
2.53.0
author maintainer
#44 lore raw

PATCH 40/1146 s390/cio: use generic driver_override infrastructure

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Danilo Krummrich <[email protected]>

[ Upstream commit ac4d8bb6e2e13e8684a76ea48d13ebaaaf5c24c4 ]

When a driver is probed through __driver_attach(), the bus' match() callback is called without the device lock held, thus accessing the driver_override field without a lock, which can cause a UAF.

Fix this by using the driver-core driver_override infrastructure taking care of proper locking internally.

Note that calling match() from __driver_attach() without the device lock held is intentional. [1]

---
 drivers/s390/cio/cio.h |  5 -----
 drivers/s390/cio/css.c | 34 ++++------------------------------
 2 files changed, 4 insertions(+), 35 deletions(-)
drivers/s390/cio/cio.h +0 -5
index 08a5e9380e75a..bad142c536e1e 100644
@@ -103,11 +103,6 @@ struct subchannel {
 	struct work_struct todo_work;
 	struct schib_config config;
 	u64 dma_mask;
-	/*
-	 * Driver name to force a match.  Do not set directly, because core
-	 * frees it.  Use driver_set_override() to set or clear it.
-	 */
-	const char *driver_override;
 } __attribute__ ((aligned(8)));
 
 DECLARE_PER_CPU_ALIGNED(struct irb, cio_irb);
drivers/s390/cio/css.c +4 -30
index 5ab239f38588f..e5a0ec6b4e3e7 100644
@@ -159,7 +159,6 @@ static void css_subchannel_release(struct device *dev)
 
 	sch->config.intparm = 0;
 	cio_commit_config(sch);
-	kfree(sch->driver_override);
 	kfree(sch);
 }
 
@@ -323,37 +322,9 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
 
 static DEVICE_ATTR_RO(modalias);
 
-static ssize_t driver_override_store(struct device *dev,
-				     struct device_attribute *attr,
-				     const char *buf, size_t count)
-{
-	struct subchannel *sch = to_subchannel(dev);
-	int ret;
-
-	ret = driver_set_override(dev, &sch->driver_override, buf, count);
-	if (ret)
-		return ret;
-
-	return count;
-}
-
-static ssize_t driver_override_show(struct device *dev,
-				    struct device_attribute *attr, char *buf)
-{
-	struct subchannel *sch = to_subchannel(dev);
-	ssize_t len;
-
-	device_lock(dev);
-	len = sysfs_emit(buf, "%s\n", sch->driver_override);
-	device_unlock(dev);
-	return len;
-}
-static DEVICE_ATTR_RW(driver_override);
-
 static struct attribute *subch_attrs[] = {
 	&dev_attr_type.attr,
 	&dev_attr_modalias.attr,
-	&dev_attr_driver_override.attr,
 	NULL,
 };
 
@@ -1356,9 +1327,11 @@ static int css_bus_match(struct device *dev, const struct device_driver *drv)
 	struct subchannel *sch = to_subchannel(dev);
 	const struct css_driver *driver = to_cssdriver(drv);
 	struct css_device_id *id;
+	int ret;
 
 	/* When driver_override is set, only bind to the matching driver */
-	if (sch->driver_override && strcmp(sch->driver_override, drv->name))
+	ret = device_match_driver_override(dev, drv);
+	if (ret == 0)
 		return 0;
 
 	for (id = driver->subchannel_type; id->match_flags; id++) {
@@ -1415,6 +1388,7 @@ static int css_uevent(const struct device *dev, struct kobj_uevent_env *env)
 
 static const struct bus_type css_bus_type = {
 	.name     = "css",
+	.driver_override = true,
 	.match    = css_bus_match,
 	.probe    = css_probe,
 	.remove   = css_remove,
Signature · 1 line
2.53.0
author maintainer
#45 lore raw

PATCH 41/1146 s390/ap: use generic driver_override infrastructure

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Danilo Krummrich <[email protected]>

[ Upstream commit 81d6f7c3a70b10ff757ee8b5f8114a190871cf1e ]

When the AP masks are updated via apmask_store() or aqmask_store(), ap_bus_revise_bindings() is called after ap_attr_mutex has been released.

This calls __ap_revise_reserved(), which accesses the driver_override field without holding any lock, racing against a concurrent driver_override_store() that may free the old string, resulting in a potential UAF.

Fix this by using the driver-core driver_override infrastructure, which protects all accesses with an internal spinlock.

Note that unlike most other buses, the AP bus does not check driver_override in its match() callback; the override is checked in ap_device_probe() and __ap_revise_reserved() instead.

Also note that we do not enable the driver_override feature of struct bus_type, as AP - in contrast to most other buses - passes "" to sysfs_emit() when the driver_override pointer is NULL. Thus, printing "\n" instead of "(null)\n".

Additionally, AP has a custom counter that is modified in the corresponding custom driver_override_store().

---
 drivers/s390/crypto/ap_bus.c   | 34 +++++++++++++++++-----------------
 drivers/s390/crypto/ap_bus.h   |  1 -
 drivers/s390/crypto/ap_queue.c | 24 ++++++------------------
 3 files changed, 23 insertions(+), 36 deletions(-)
drivers/s390/crypto/ap_bus.c +17 -17
index d652df96a5078..f24e27add721d 100644
@@ -859,25 +859,24 @@ static int __ap_queue_devices_with_id_unregister(struct device *dev, void *data)
 
 static int __ap_revise_reserved(struct device *dev, void *dummy)
 {
-	int rc, card, queue, devres, drvres;
+	int rc, card, queue, devres, drvres, ovrd;
 
 	if (is_queue_dev(dev)) {
 		struct ap_driver *ap_drv = to_ap_drv(dev->driver);
 		struct ap_queue *aq = to_ap_queue(dev);
-		struct ap_device *ap_dev = &aq->ap_dev;
 
 		card = AP_QID_CARD(aq->qid);
 		queue = AP_QID_QUEUE(aq->qid);
 
-		if (ap_dev->driver_override) {
-			if (strcmp(ap_dev->driver_override,
-				   ap_drv->driver.name)) {
-				pr_debug("reprobing queue=%02x.%04x\n", card, queue);
-				rc = device_reprobe(dev);
-				if (rc) {
-					AP_DBF_WARN("%s reprobing queue=%02x.%04x failed\n",
-						    __func__, card, queue);
-				}
+		ovrd = device_match_driver_override(dev, &ap_drv->driver);
+		if (ovrd > 0) {
+			/* override set and matches, nothing to do */
+		} else if (ovrd == 0) {
+			pr_debug("reprobing queue=%02x.%04x\n", card, queue);
+			rc = device_reprobe(dev);
+			if (rc) {
+				AP_DBF_WARN("%s reprobing queue=%02x.%04x failed\n",
+					    __func__, card, queue);
 			}
 		} else {
 			mutex_lock(&ap_attr_mutex);
@@ -928,7 +927,7 @@ int ap_owned_by_def_drv(int card, int queue)
 	if (aq) {
 		const struct device_driver *drv = aq->ap_dev.device.driver;
 		const struct ap_driver *ap_drv = to_ap_drv(drv);
-		bool override = !!aq->ap_dev.driver_override;
+		bool override = device_has_driver_override(&aq->ap_dev.device);
 
 		if (override && drv && ap_drv->flags & AP_DRIVER_FLAG_DEFAULT)
 			rc = 1;
@@ -977,7 +976,7 @@ static int ap_device_probe(struct device *dev)
 {
 	struct ap_device *ap_dev = to_ap_dev(dev);
 	struct ap_driver *ap_drv = to_ap_drv(dev->driver);
-	int card, queue, devres, drvres, rc = -ENODEV;
+	int card, queue, devres, drvres, rc = -ENODEV, ovrd;
 
 	if (!get_device(dev))
 		return rc;
@@ -991,10 +990,11 @@ static int ap_device_probe(struct device *dev)
 		 */
 		card = AP_QID_CARD(to_ap_queue(dev)->qid);
 		queue = AP_QID_QUEUE(to_ap_queue(dev)->qid);
-		if (ap_dev->driver_override) {
-			if (strcmp(ap_dev->driver_override,
-				   ap_drv->driver.name))
-				goto out;
+		ovrd = device_match_driver_override(dev, &ap_drv->driver);
+		if (ovrd > 0) {
+			/* override set and matches, nothing to do */
+		} else if (ovrd == 0) {
+			goto out;
 		} else {
 			mutex_lock(&ap_attr_mutex);
 			devres = test_bit_inv(card, ap_perms.apm) &&
drivers/s390/crypto/ap_bus.h +0 -1
index 51e08f27bd75e..04ea256ecf919 100644
@@ -166,7 +166,6 @@ void ap_driver_unregister(struct ap_driver *);
 struct ap_device {
 	struct device device;
 	int device_type;		/* AP device type. */
-	const char *driver_override;
 };
 
 #define to_ap_dev(x) container_of((x), struct ap_device, device)
drivers/s390/crypto/ap_queue.c +6 -18
index 3fe2e41c5c6b1..ca9819e6f7e76 100644
@@ -734,26 +734,14 @@ static ssize_t driver_override_show(struct device *dev,
 				    struct device_attribute *attr,
 				    char *buf)
 {
-	struct ap_queue *aq = to_ap_queue(dev);
-	struct ap_device *ap_dev = &aq->ap_dev;
-	int rc;
-
-	device_lock(dev);
-	if (ap_dev->driver_override)
-		rc = sysfs_emit(buf, "%s\n", ap_dev->driver_override);
-	else
-		rc = sysfs_emit(buf, "\n");
-	device_unlock(dev);
-
-	return rc;
+	guard(spinlock)(&dev->driver_override.lock);
+	return sysfs_emit(buf, "%s\n", dev->driver_override.name ?: "");
 }
 
 static ssize_t driver_override_store(struct device *dev,
 				     struct device_attribute *attr,
 				     const char *buf, size_t count)
 {
-	struct ap_queue *aq = to_ap_queue(dev);
-	struct ap_device *ap_dev = &aq->ap_dev;
 	int rc = -EINVAL;
 	bool old_value;
 
@@ -764,13 +752,13 @@ static ssize_t driver_override_store(struct device *dev,
 	if (ap_apmask_aqmask_in_use)
 		goto out;
 
-	old_value = ap_dev->driver_override ? true : false;
-	rc = driver_set_override(dev, &ap_dev->driver_override, buf, count);
+	old_value = device_has_driver_override(dev);
+	rc = __device_set_driver_override(dev, buf, count);
 	if (rc)
 		goto out;
-	if (old_value && !ap_dev->driver_override)
+	if (old_value && !device_has_driver_override(dev))
 		--ap_driver_override_ctr;
-	else if (!old_value && ap_dev->driver_override)
+	else if (!old_value && device_has_driver_override(dev))
 		++ap_driver_override_ctr;
 
 	rc = count;
Signature · 1 line
2.53.0
author maintainer
#46 lore raw

PATCH 42/1146 bus: fsl-mc: use generic driver_override infrastructure

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Danilo Krummrich <[email protected]>

[ Upstream commit 6c8dfb0362732bf1e4829867a2a5239fedc592d0 ]

When a driver is probed through __driver_attach(), the bus' match() callback is called without the device lock held, thus accessing the driver_override field without a lock, which can cause a UAF.

Fix this by using the driver-core driver_override infrastructure taking care of proper locking internally.

Note that calling match() from __driver_attach() without the device lock held is intentional. [1]

---
 drivers/bus/fsl-mc/fsl-mc-bus.c   | 43 +++++--------------------------
 drivers/vfio/fsl-mc/vfio_fsl_mc.c |  4 +--
 include/linux/fsl/mc.h            |  4 ---
 3 files changed, 8 insertions(+), 43 deletions(-)
drivers/bus/fsl-mc/fsl-mc-bus.c +7 -36
index c117745cf2065..221146e4860be 100644
@@ -86,12 +86,16 @@ static int fsl_mc_bus_match(struct device *dev, const struct device_driver *drv)
 	struct fsl_mc_device *mc_dev = to_fsl_mc_device(dev);
 	const struct fsl_mc_driver *mc_drv = to_fsl_mc_driver(drv);
 	bool found = false;
+	int ret;
 
 	/* When driver_override is set, only bind to the matching driver */
-	if (mc_dev->driver_override) {
-		found = !strcmp(mc_dev->driver_override, mc_drv->driver.name);
+	ret = device_match_driver_override(dev, drv);
+	if (ret > 0) {
+		found = true;
 		goto out;
 	}
+	if (ret == 0)
+		goto out;
 
 	if (!mc_drv->match_id_table)
 		goto out;
@@ -210,39 +214,8 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
 }
 static DEVICE_ATTR_RO(modalias);
 
-static ssize_t driver_override_store(struct device *dev,
-				     struct device_attribute *attr,
-				     const char *buf, size_t count)
-{
-	struct fsl_mc_device *mc_dev = to_fsl_mc_device(dev);
-	int ret;
-
-	if (WARN_ON(dev->bus != &fsl_mc_bus_type))
-		return -EINVAL;
-
-	ret = driver_set_override(dev, &mc_dev->driver_override, buf, count);
-	if (ret)
-		return ret;
-
-	return count;
-}
-
-static ssize_t driver_override_show(struct device *dev,
-				    struct device_attribute *attr, char *buf)
-{
-	struct fsl_mc_device *mc_dev = to_fsl_mc_device(dev);
-	ssize_t len;
-
-	device_lock(dev);
-	len = sysfs_emit(buf, "%s\n", mc_dev->driver_override);
-	device_unlock(dev);
-	return len;
-}
-static DEVICE_ATTR_RW(driver_override);
-
 static struct attribute *fsl_mc_dev_attrs[] = {
 	&dev_attr_modalias.attr,
-	&dev_attr_driver_override.attr,
 	NULL,
 };
 
@@ -345,6 +318,7 @@ ATTRIBUTE_GROUPS(fsl_mc_bus);
 
 const struct bus_type fsl_mc_bus_type = {
 	.name = "fsl-mc",
+	.driver_override = true,
 	.match = fsl_mc_bus_match,
 	.uevent = fsl_mc_bus_uevent,
 	.probe = fsl_mc_probe,
@@ -910,9 +884,6 @@ static struct notifier_block fsl_mc_nb;
  */
 void fsl_mc_device_remove(struct fsl_mc_device *mc_dev)
 {
-	kfree(mc_dev->driver_override);
-	mc_dev->driver_override = NULL;
-
 	/*
 	 * The device-specific remove callback will get invoked by device_del()
 	 */
drivers/vfio/fsl-mc/vfio_fsl_mc.c +1 -3
index 462fae1aa5385..b4c3958201b25 100644
@@ -424,9 +424,7 @@ static int vfio_fsl_mc_bus_notifier(struct notifier_block *nb,
 
 	if (action == BUS_NOTIFY_ADD_DEVICE &&
 	    vdev->mc_dev == mc_cont) {
-		mc_dev->driver_override = kasprintf(GFP_KERNEL, "%s",
-						    vfio_fsl_mc_ops.name);
-		if (!mc_dev->driver_override)
+		if (device_set_driver_override(dev, vfio_fsl_mc_ops.name))
 			dev_warn(dev, "VFIO_FSL_MC: Setting driver override for device in dprc %s failed\n",
 				 dev_name(&mc_cont->dev));
 		else
include/linux/fsl/mc.h +0 -4
index 897d6211c1635..1da63f2d70401 100644
@@ -178,9 +178,6 @@ struct fsl_mc_obj_desc {
  * @regions: pointer to array of MMIO region entries
  * @irqs: pointer to array of pointers to interrupts allocated to this device
  * @resource: generic resource associated with this MC object device, if any.
- * @driver_override: driver name to force a match; do not set directly,
- *                   because core frees it; use driver_set_override() to
- *                   set or clear it.
  *
  * Generic device object for MC object devices that are "attached" to a
  * MC bus.
@@ -214,7 +211,6 @@ struct fsl_mc_device {
 	struct fsl_mc_device_irq **irqs;
 	struct fsl_mc_resource *resource;
 	struct device_link *consumer_link;
-	const char *driver_override;
 };
 
 #define to_fsl_mc_device(_dev) \
Signature · 1 line
2.53.0
author maintainer
#47 lore raw

PATCH 43/1146 locking/mutex: Rename mutex_init_lockep()

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Davidlohr Bueso <[email protected]>

[ Upstream commit 8b65eb52d93e4e496bd26e6867152344554eb39e ]

Typo, this wants to be _lockdep().

Fixes 51d7a054521d ("locking/mutex: Redo __mutex_init() to reduce generated code size")
---
 include/linux/mutex.h  | 4 ++--
 kernel/locking/mutex.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
include/linux/mutex.h +2 -2
index ecaa0440f6ec4..8126da9590886 100644
@@ -87,12 +87,12 @@ do {									\
 	struct mutex mutexname = __MUTEX_INITIALIZER(mutexname)
 
 #ifdef CONFIG_DEBUG_LOCK_ALLOC
-void mutex_init_lockep(struct mutex *lock, const char *name, struct lock_class_key *key);
+void mutex_init_lockdep(struct mutex *lock, const char *name, struct lock_class_key *key);
 
 static inline void __mutex_init(struct mutex *lock, const char *name,
 				struct lock_class_key *key)
 {
-	mutex_init_lockep(lock, name, key);
+	mutex_init_lockdep(lock, name, key);
 }
 #else
 extern void mutex_init_generic(struct mutex *lock);
kernel/locking/mutex.c +2 -2
index 2a1d165b3167e..c867f6c15530d 100644
@@ -171,7 +171,7 @@ static __always_inline bool __mutex_unlock_fast(struct mutex *lock)
 
 #else /* !CONFIG_DEBUG_LOCK_ALLOC */
 
-void mutex_init_lockep(struct mutex *lock, const char *name, struct lock_class_key *key)
+void mutex_init_lockdep(struct mutex *lock, const char *name, struct lock_class_key *key)
 {
 	__mutex_init_generic(lock);
 
@@ -181,7 +181,7 @@ void mutex_init_lockep(struct mutex *lock, const char *name, struct lock_class_k
 	debug_check_no_locks_freed((void *)lock, sizeof(*lock));
 	lockdep_init_map_wait(&lock->dep_map, name, key, 0, LD_WAIT_SLEEP);
 }
-EXPORT_SYMBOL(mutex_init_lockep);
+EXPORT_SYMBOL(mutex_init_lockdep);
 #endif /* !CONFIG_DEBUG_LOCK_ALLOC */
 
 static inline void __mutex_set_flag(struct mutex *lock, unsigned long flag)
Signature · 1 line
2.53.0
author maintainer
#48 lore raw

PATCH 44/1146 locking/mutex: Fix wrong comment for CONFIG_DEBUG_LOCK_ALLOC

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Davidlohr Bueso <[email protected]>

[ Upstream commit babcde3be8c9148aa60a14b17831e8f249854963 ]

... that endif block should be CONFIG_DEBUG_LOCK_ALLOC, not CONFIG_LOCKDEP.

Fixes 51d7a054521d ("locking/mutex: Redo __mutex_init() to reduce generated code size")
---
 include/linux/mutex.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/mutex.h +1 -1
index 8126da9590886..f57d2a97da57f 100644
@@ -146,7 +146,7 @@ static inline void __mutex_init(struct mutex *lock, const char *name,
 {
 	mutex_rt_init_generic(lock);
 }
-#endif /* !CONFIG_LOCKDEP */
+#endif /* !CONFIG_DEBUG_LOCK_ALLOC */
 #endif /* CONFIG_PREEMPT_RT */
 
 #ifdef CONFIG_DEBUG_MUTEXES
Signature · 1 line
2.53.0
author maintainer
#39 lore raw

PATCH 35/1146 amd-pstate: Update cppc_req_cached in fast_switch case

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Gautham R. Shenoy <[email protected]>

[ Upstream commit fcc25a291fbdca2c06c2c6602532050873f0c9de ]

The function msr_update_perf() does not cache the new value that is written to MSR_AMD_CPPC_REQ into the variable cpudata->cppc_req_cached when the update is happening from the fast path.

Fix that by caching the value everytime the MSR_AMD_CPPC_REQ gets updated.

This issue was discovered by Claude Opus 4.6 with the aid of Chris Mason's AI review-prompts
(https://github.com/masoncl/review-prompts/tree/main/kernel).

Assisted-by Claude:claude-opus-4.6 review-prompts/linux
Fixes fff395796917 ("cpufreq/amd-pstate: Always write EPP value when updating perf")
---
 drivers/cpufreq/amd-pstate.c | 1 -
 1 file changed, 1 deletion(-)
drivers/cpufreq/amd-pstate.c +0 -1
index d57969c72c9dc..24cdeffbcd40e 100644
@@ -261,7 +261,6 @@ static int msr_update_perf(struct cpufreq_policy *policy, u8 min_perf,
 
 	if (fast_switch) {
 		wrmsrq(MSR_AMD_CPPC_REQ, value);
-		return 0;
 	} else {
 		int ret = wrmsrq_on_cpu(cpudata->cpu, MSR_AMD_CPPC_REQ, value);
 
Signature · 1 line
2.53.0
author maintainer
#84 lore raw

PATCH 80/1146 s390/bpf: Zero-extend bpf prog return values and kfunc arguments

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Ilya Leoshkevich <[email protected]>

[ Upstream commit 202e42e4aa890172366354b233c42c73107a3f59 ]

s390x ABI requires callers to zero-extend unsigned arguments and sign-extend signed arguments, and callees to zero-extend unsigned return values and sign-extend signed return values.

s390 BPF JIT currently implements only sign extension. Fix this omission and implement zero extension too.

---
 arch/s390/net/bpf_jit_comp.c | 39 ++++++++++++++++++++++--------------
 1 file changed, 24 insertions(+), 15 deletions(-)
arch/s390/net/bpf_jit_comp.c +24 -15
index bf92964246eb1..10ab247e1994c 100644
@@ -830,25 +830,34 @@ static int bpf_jit_probe_post(struct bpf_jit *jit, struct bpf_prog *fp,
 }
 
 /*
- * Sign-extend the register if necessary
+ * Sign- or zero-extend the register if necessary
  */
-static int sign_extend(struct bpf_jit *jit, int r, u8 size, u8 flags)
+static int sign_zero_extend(struct bpf_jit *jit, int r, u8 size, u8 flags)
 {
-	if (!(flags & BTF_FMODEL_SIGNED_ARG))
-		return 0;
-
 	switch (size) {
 	case 1:
-		/* lgbr %r,%r */
-		EMIT4(0xb9060000, r, r);
+		if (flags & BTF_FMODEL_SIGNED_ARG)
+			/* lgbr %r,%r */
+			EMIT4(0xb9060000, r, r);
+		else
+			/* llgcr %r,%r */
+			EMIT4(0xb9840000, r, r);
 		return 0;
 	case 2:
-		/* lghr %r,%r */
-		EMIT4(0xb9070000, r, r);
+		if (flags & BTF_FMODEL_SIGNED_ARG)
+			/* lghr %r,%r */
+			EMIT4(0xb9070000, r, r);
+		else
+			/* llghr %r,%r */
+			EMIT4(0xb9850000, r, r);
 		return 0;
 	case 4:
-		/* lgfr %r,%r */
-		EMIT4(0xb9140000, r, r);
+		if (flags & BTF_FMODEL_SIGNED_ARG)
+			/* lgfr %r,%r */
+			EMIT4(0xb9140000, r, r);
+		else
+			/* llgfr %r,%r */
+			EMIT4(0xb9160000, r, r);
 		return 0;
 	case 8:
 		return 0;
@@ -1798,9 +1807,9 @@ static noinline int bpf_jit_insn(struct bpf_jit *jit, struct bpf_prog *fp,
 				return -1;
 
 			for (j = 0; j < m->nr_args; j++) {
-				if (sign_extend(jit, BPF_REG_1 + j,
-						m->arg_size[j],
-						m->arg_flags[j]))
+				if (sign_zero_extend(jit, BPF_REG_1 + j,
+						     m->arg_size[j],
+						     m->arg_flags[j]))
 					return -1;
 			}
 		}
@@ -2555,7 +2564,7 @@ static int invoke_bpf_prog(struct bpf_tramp_jit *tjit,
 	EMIT6_PCREL_RILB_PTR(0xc0050000, REG_14, p->bpf_func);
 	/* stg %r2,retval_off(%r15) */
 	if (save_ret) {
-		if (sign_extend(jit, REG_2, m->ret_size, m->ret_flags))
+		if (sign_zero_extend(jit, REG_2, m->ret_size, m->ret_flags))
 			return -1;
 		EMIT6_DISP_LH(0xe3000000, 0x0024, REG_2, REG_0, REG_15,
 			      tjit->retval_off);
Signature · 1 line
2.53.0
author maintainer
#93 lore raw

PATCH 89/1146 tools/nolibc/printf: Change variables c to ch and tmpbuf[] to outbuf[]

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: David Laight <[email protected]>

[ Upstream commit f675ae28fcdf7db93a8c1a6964f062725b1e06a0 ]

Changing 'c' makes the code slightly easier to read because the variable stands out from the single character literals (especially 'c').

Change tmpbuf[] to outbuf[] because 'out' points into it.

The following patches pretty much rewrite the function so the churn is limited.

Stable-dep-of: 4045e7b19bbf ("tools/nolibc/printf: Move snprintf length check to callback")

---
 tools/include/nolibc/stdio.h | 38 ++++++++++++++++++------------------
 1 file changed, 19 insertions(+), 19 deletions(-)
tools/include/nolibc/stdio.h +19 -19
index 233318b0d0f01..77d7669cdb806 100644
@@ -301,16 +301,16 @@ typedef int (*__nolibc_printf_cb)(intptr_t state, const char *buf, size_t size);
 static __attribute__((unused, format(printf, 4, 0)))
 int __nolibc_printf(__nolibc_printf_cb cb, intptr_t state, size_t n, const char *fmt, va_list args)
 {
-	char escape, lpref, c;
+	char escape, lpref, ch;
 	unsigned long long v;
 	unsigned int written, width;
 	size_t len, ofs, w;
-	char tmpbuf[21];
+	char outbuf[21];
 	const char *outstr;
 
 	written = ofs = escape = lpref = 0;
 	while (1) {
-		c = fmt[ofs++];
+		ch = fmt[ofs++];
 		width = 0;
 
 		if (escape) {
@@ -318,17 +318,17 @@ int __nolibc_printf(__nolibc_printf_cb cb, intptr_t state, size_t n, const char
 			escape = 0;
 
 			/* width */
-			while (c >= '0' && c <= '9') {
+			while (ch >= '0' && ch <= '9') {
 				width *= 10;
-				width += c - '0';
+				width += ch - '0';
 
-				c = fmt[ofs++];
+				ch = fmt[ofs++];
 			}
 
-			if (c == 'c' || c == 'd' || c == 'u' || c == 'x' || c == 'p') {
-				char *out = tmpbuf;
+			if (ch == 'c' || ch == 'd' || ch == 'u' || ch == 'x' || ch == 'p') {
+				char *out = outbuf;
 
-				if (c == 'p')
+				if (ch == 'p')
 					v = va_arg(args, unsigned long);
 				else if (lpref) {
 					if (lpref > 1)
@@ -338,7 +338,7 @@ int __nolibc_printf(__nolibc_printf_cb cb, intptr_t state, size_t n, const char
 				} else
 					v = va_arg(args, unsigned int);
 
-				if (c == 'd') {
+				if (ch == 'd') {
 					/* sign-extend the value */
 					if (lpref == 0)
 						v = (long long)(int)v;
@@ -346,7 +346,7 @@ int __nolibc_printf(__nolibc_printf_cb cb, intptr_t state, size_t n, const char
 						v = (long long)(long)v;
 				}
 
-				switch (c) {
+				switch (ch) {
 				case 'c':
 					out[0] = v;
 					out[1] = 0;
@@ -365,30 +365,30 @@ int __nolibc_printf(__nolibc_printf_cb cb, intptr_t state, size_t n, const char
 					u64toh_r(v, out);
 					break;
 				}
-				outstr = tmpbuf;
+				outstr = outbuf;
 			}
-			else if (c == 's') {
+			else if (ch == 's') {
 				outstr = va_arg(args, char *);
 				if (!outstr)
 					outstr="(null)";
 			}
-			else if (c == 'm') {
+			else if (ch == 'm') {
 #ifdef NOLIBC_IGNORE_ERRNO
 				outstr = "unknown error";
 #else
 				outstr = strerror(errno);
 #endif /* NOLIBC_IGNORE_ERRNO */
 			}
-			else if (c == '%') {
+			else if (ch == '%') {
 				/* queue it verbatim */
 				continue;
 			}
 			else {
 				/* modifiers or final 0 */
-				if (c == 'l') {
+				if (ch == 'l') {
 					/* long format prefix, maintain the escape */
 					lpref++;
-				} else if (c == 'j') {
+				} else if (ch == 'j') {
 					lpref = 2;
 				}
 				escape = 1;
@@ -399,7 +399,7 @@ int __nolibc_printf(__nolibc_printf_cb cb, intptr_t state, size_t n, const char
 		}
 
 		/* not an escape sequence */
-		if (c == 0 || c == '%') {
+		if (ch == 0 || ch == '%') {
 			/* flush pending data on escape or end */
 			escape = 1;
 			lpref = 0;
@@ -420,7 +420,7 @@ int __nolibc_printf(__nolibc_printf_cb cb, intptr_t state, size_t n, const char
 
 			written += len;
 		do_escape:
-			if (c == 0)
+			if (ch == 0)
 				break;
 			fmt += ofs;
 			ofs = 0;
Signature · 1 line
2.53.0
author maintainer
#94 lore raw

PATCH 90/1146 tools/nolibc/printf: Move snprintf length check to callback

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: David Laight <[email protected]>

[ Upstream commit 4045e7b19bbf7338452cda11e64cfe7ae3361964 ]

Move output truncation to the snprintf() callback.
This simplifies the main code and fixes truncation of padded fields.

Add a zero length callback to 'finalise' the buffer rather than doing it in snprintf() itself.

Fixes e90ce42e81381 ("tools/nolibc: implement width padding in printf()")
[Thomas: clean up Fixes trailer]
---
 tools/include/nolibc/stdio.h | 94 +++++++++++++++++++++++++-----------
 1 file changed, 67 insertions(+), 27 deletions(-)
tools/include/nolibc/stdio.h +67 -27
index 77d7669cdb806..a4df72d9a2d37 100644
@@ -295,16 +295,25 @@ int fseek(FILE *stream, long offset, int whence)
  *  - %[l*]{d,u,c,x,p}
  *  - %s
  *  - unknown modifiers are ignored.
+ *
+ * Called by vfprintf() and snprintf() to do the actual formatting.
+ * The callers provide a callback function to save the formatted data.
+ * The callback function is called multiple times:
+ *  - for each group of literal characters in the format string.
+ *  - for field padding.
+ *  - for each conversion specifier.
+ *  - with (NULL, 0) at the end of the __nolibc_printf.
+ * If the callback returns non-zero __nolibc_printf() immediately returns -1.
  */
-typedef int (*__nolibc_printf_cb)(intptr_t state, const char *buf, size_t size);
+typedef int (*__nolibc_printf_cb)(void *state, const char *buf, size_t size);
 
-static __attribute__((unused, format(printf, 4, 0)))
-int __nolibc_printf(__nolibc_printf_cb cb, intptr_t state, size_t n, const char *fmt, va_list args)
+static __attribute__((unused, format(printf, 3, 0)))
+int __nolibc_printf(__nolibc_printf_cb cb, void *state, const char *fmt, va_list args)
 {
 	char escape, lpref, ch;
 	unsigned long long v;
 	unsigned int written, width;
-	size_t len, ofs, w;
+	size_t len, ofs;
 	char outbuf[21];
 	const char *outstr;
 
@@ -406,17 +415,13 @@ int __nolibc_printf(__nolibc_printf_cb cb, intptr_t state, size_t n, const char
 			outstr = fmt;
 			len = ofs - 1;
 		flush_str:
-			if (n) {
-				w = len < n ? len : n;
-				n -= w;
-				while (width-- > w) {
-					if (cb(state, " ", 1) != 0)
-						return -1;
-					written += 1;
-				}
-				if (cb(state, outstr, w) != 0)
+			while (width-- > len) {
+				if (cb(state, " ", 1) != 0)
 					return -1;
+				written += 1;
 			}
+			if (cb(state, outstr, len) != 0)
+				return -1;
 
 			written += len;
 		do_escape:
@@ -429,18 +434,25 @@ int __nolibc_printf(__nolibc_printf_cb cb, intptr_t state, size_t n, const char
 
 		/* literal char, just queue it */
 	}
+
+	/* Request a final '\0' be added to the snprintf() output.
+	 * This may be the only call of the cb() function.
+	 */
+	if (cb(state, NULL, 0) != 0)
+		return -1;
+
 	return written;
 }
 
-static int __nolibc_fprintf_cb(intptr_t state, const char *buf, size_t size)
+static int __nolibc_fprintf_cb(void *stream, const char *buf, size_t size)
 {
-	return _fwrite(buf, size, (FILE *)state);
+	return _fwrite(buf, size, stream);
 }
 
 static __attribute__((unused, format(printf, 2, 0)))
 int vfprintf(FILE *stream, const char *fmt, va_list args)
 {
-	return __nolibc_printf(__nolibc_fprintf_cb, (intptr_t)stream, SIZE_MAX, fmt, args);
+	return __nolibc_printf(__nolibc_fprintf_cb, stream, fmt, args);
 }
 
 static __attribute__((unused, format(printf, 1, 0)))
@@ -498,26 +510,54 @@ int dprintf(int fd, const char *fmt, ...)
 	return ret;
 }
 
-static int __nolibc_sprintf_cb(intptr_t _state, const char *buf, size_t size)
+struct __nolibc_sprintf_cb_state {
+	char *buf;
+	size_t space;
+};
+
+static int __nolibc_sprintf_cb(void *v_state, const char *buf, size_t size)
 {
-	char **state = (char **)_state;
+	struct __nolibc_sprintf_cb_state *state = v_state;
+	size_t space = state->space;
+	char *tgt;
+
+	/* Truncate the request to fit in the output buffer space.
+	 * The last byte is reserved for the terminating '\0'.
+	 * state->space can only be zero for snprintf(NULL, 0, fmt, args)
+	 * so this normally lets through calls with 'size == 0'.
+	 */
+	if (size >= space) {
+		if (space <= 1)
+			return 0;
+		size = space - 1;
+	}
+	tgt = state->buf;
+
+	/* __nolibc_printf() ends with cb(state, NULL, 0) to request the output
+	 * buffer be '\0' terminated.
+	 * That will be the only cb() call for, eg, snprintf(buf, sz, "").
+	 * Zero lengths can occur at other times (eg "%s" for an empty string).
+	 * Unconditionally write the '\0' byte to reduce code size, it is
+	 * normally overwritten by the data being output.
+	 * There is no point adding a '\0' after copied data - there is always
+	 * another call.
+	 */
+	*tgt = '\0';
+	if (size) {
+		state->space = space - size;
+		state->buf = tgt + size;
+		memcpy(tgt, buf, size);
+	}
 
-	memcpy(*state, buf, size);
-	*state += size;
 	return 0;
 }
 
 static __attribute__((unused, format(printf, 3, 0)))
 int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
 {
-	char *state = buf;
-	int ret;
+	struct __nolibc_sprintf_cb_state state = { .buf = buf, .space = size };
 
-	ret = __nolibc_printf(__nolibc_sprintf_cb, (intptr_t)&state, size, fmt, args);
-	if (ret < 0)
-		return ret;
-	buf[(size_t)ret < size ? (size_t)ret : size - 1] = '\0';
-	return ret;
+	return __nolibc_printf(__nolibc_sprintf_cb, &state, fmt, args);
 }
 
 static __attribute__((unused, format(printf, 3, 4)))
Signature · 1 line
2.53.0
author maintainer
#95 lore raw

PATCH 91/1146 tools/nolibc: MIPS: fix clobbers of lo and hi registers on different ISAs

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Thomas Weißschuh <[email protected]>

[ Upstream commit e83b07dc8c05a55d02057b1484724a0b188f6f8d ]

All MIPS ISAs before r6 use the 'lo' and 'hi' special registers. These are clobbered by system calls and need to be marked as such to avoid miscompilations. Currently nolibc ties the clobbers to the ABI. But this is wrong and leads to ISA<->ABI combinations which are not handled correctly, leading to compiler errors or miscompilations.

Handle all different combinations of ABI and ISA.

Fixes a6a2a8a42972 ("tools/nolibc: MIPS: add support for N64 and N32 ABIs")
Fixes 66b6f755ad45 ("rcutorture: Import a copy of nolibc")
---
 tools/include/nolibc/arch-mips.h | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)
tools/include/nolibc/arch-mips.h +12 -3
index a72506ceec6bd..0c5818149f17e 100644
@@ -39,11 +39,19 @@
  *   - stack is 16-byte aligned
  */
 
+#if !defined(__mips_isa_rev) || __mips_isa_rev < 6
+#define _NOLIBC_SYSCALL_CLOBBER_HI_LO "hi", "lo"
+#else
+#define _NOLIBC_SYSCALL_CLOBBER_HI_LO "$0"
+#endif
+
 #if defined(_ABIO32)
 
 #define _NOLIBC_SYSCALL_CLOBBERLIST \
-	"memory", "cc", "at", "v1", "hi", "lo", \
-	"t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7", "t8", "t9"
+	"memory", "cc", "at", "v1", \
+	"t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7", "t8", "t9", \
+	_NOLIBC_SYSCALL_CLOBBER_HI_LO
+
 #define _NOLIBC_SYSCALL_STACK_RESERVE "addiu $sp, $sp, -32\n"
 #define _NOLIBC_SYSCALL_STACK_UNRESERVE "addiu $sp, $sp, 32\n"
 
@@ -52,7 +60,8 @@
 /* binutils, GCC and clang disagree about register aliases, use numbers instead. */
 #define _NOLIBC_SYSCALL_CLOBBERLIST \
 	"memory", "cc", "at", "v1", \
-	"10", "11", "12", "13", "14", "15", "24", "25"
+	"10", "11", "12", "13", "14", "15", "24", "25", \
+	_NOLIBC_SYSCALL_CLOBBER_HI_LO
 
 #define _NOLIBC_SYSCALL_STACK_RESERVE
 #define _NOLIBC_SYSCALL_STACK_UNRESERVE
Signature · 1 line
2.53.0
author maintainer
#96 lore raw

PATCH 92/1146 tools/nolibc: avoid -Wundef warning for __STDC_VERSION__

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Thomas Weißschuh <[email protected]>

[ Upstream commit 3eb97c4cbd4d874e7e327ec512f6169934e12b8a ]

With -std=c89 the macro __STDC_VERSION__ is not defined. While undefined identifiers in '#if' directives are assumed to be '0', with -Wundef a warning is emitted.

Avoid the warning by explicitly falling back to '0' if __STDC_VERSION__ is not provided by the preprocessor.

Fixes 37219aa5b123 ("tools/nolibc: add __nolibc_static_assert()")
---
 tools/include/nolibc/compiler.h | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
tools/include/nolibc/compiler.h +7 -1
index a8c7619dcdde2..a8d5ca58dd632 100644
@@ -47,6 +47,12 @@
 #  define __nolibc_fallthrough do { } while (0)
 #endif /* __nolibc_has_attribute(fallthrough) */
 
+#if defined(__STDC_VERSION__)
+#  define __nolibc_stdc_version __STDC_VERSION__
+#else
+#  define __nolibc_stdc_version 0
+#endif
+
 #define __nolibc_version(_major, _minor, _patch) ((_major) * 10000 + (_minor) * 100 + (_patch))
 
 #ifdef __GNUC__
@@ -63,7 +69,7 @@
 #  define __nolibc_clang_version 0
 #endif /* __clang__ */
 
-#if __STDC_VERSION__ >= 201112L || \
+#if __nolibc_stdc_version >= 201112L || \
 	__nolibc_gnuc_version >= __nolibc_version(4, 6, 0) || \
 	__nolibc_clang_version >= __nolibc_version(3, 0, 0)
 #  define __nolibc_static_assert(_t) _Static_assert(_t, "")
Signature · 1 line
2.53.0
author maintainer
#97 lore raw

PATCH 93/1146 wifi: mt76: mt7996: fix the behavior of radar detection

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: StanleyYP Wang <[email protected]>

[ Upstream commit 45a09251d610f3b8a1fb02039146e42f1f4efe90 ]

RDD_DET_MODE is a firmware command intended for testing and does not pause TX after radar detection, so remove it from the normal flow; instead, use the MAC_ENABLE_CTRL firmware command to resume TX after the radar-triggered channel switch completes.

---
 .../net/wireless/mediatek/mt76/mt7996/mac.c   |  8 +--
 .../net/wireless/mediatek/mt76/mt7996/main.c  | 20 ++++++++
 .../net/wireless/mediatek/mt76/mt7996/mcu.c   | 49 ++++++++++++++++---
 .../net/wireless/mediatek/mt76/mt7996/mcu.h   |  1 +
 .../wireless/mediatek/mt76/mt7996/mt7996.h    |  2 +
 5 files changed, 68 insertions(+), 12 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7996/mac.c +2 -6
index d4f3ee943b472..2fc4513388ab7 100644
@@ -2974,7 +2974,7 @@ static void mt7996_dfs_stop_radar_detector(struct mt7996_phy *phy)
 
 static int mt7996_dfs_start_rdd(struct mt7996_dev *dev, int rdd_idx)
 {
-	int err, region;
+	int region;
 
 	switch (dev->mt76.region) {
 	case NL80211_DFS_ETSI:
@@ -2989,11 +2989,7 @@ static int mt7996_dfs_start_rdd(struct mt7996_dev *dev, int rdd_idx)
 		break;
 	}
 
-	err = mt7996_mcu_rdd_cmd(dev, RDD_START, rdd_idx, region);
-	if (err < 0)
-		return err;
-
-	return mt7996_mcu_rdd_cmd(dev, RDD_DET_MODE, rdd_idx, 1);
+	return mt7996_mcu_rdd_cmd(dev, RDD_START, rdd_idx, region);
 }
 
 static int mt7996_dfs_start_radar_detector(struct mt7996_phy *phy)
drivers/net/wireless/mediatek/mt76/mt7996/main.c +20 -0
index f16135f0b7f94..dfac3b9b28fe9 100644
@@ -79,6 +79,7 @@ static void mt7996_stop_phy(struct mt7996_phy *phy)
 
 	mutex_lock(&dev->mt76.mutex);
 
+	mt7996_mcu_rdd_resume_tx(phy);
 	mt7996_mcu_set_radio_en(phy, false);
 
 	clear_bit(MT76_STATE_RUNNING, &phy->mt76->state);
@@ -933,6 +934,24 @@ mt7996_channel_switch_beacon(struct ieee80211_hw *hw,
 	mutex_unlock(&dev->mt76.mutex);
 }
 
+static int
+mt7996_post_channel_switch(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+			   struct ieee80211_bss_conf *link_conf)
+{
+	struct cfg80211_chan_def *chandef = &link_conf->chanreq.oper;
+	struct mt7996_dev *dev = mt7996_hw_dev(hw);
+	struct mt7996_phy *phy = mt7996_band_phy(dev, chandef->chan->band);
+	int ret;
+
+	mutex_lock(&dev->mt76.mutex);
+
+	ret = mt7996_mcu_rdd_resume_tx(phy);
+
+	mutex_unlock(&dev->mt76.mutex);
+
+	return ret;
+}
+
 static int
 mt7996_mac_sta_init_link(struct mt7996_dev *dev,
 			 struct ieee80211_bss_conf *link_conf,
@@ -2306,6 +2325,7 @@ const struct ieee80211_ops mt7996_ops = {
 	.release_buffered_frames = mt76_release_buffered_frames,
 	.get_txpower = mt7996_get_txpower,
 	.channel_switch_beacon = mt7996_channel_switch_beacon,
+	.post_channel_switch = mt7996_post_channel_switch,
 	.get_stats = mt7996_get_stats,
 	.get_et_sset_count = mt7996_get_et_sset_count,
 	.get_et_stats = mt7996_get_et_stats,
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c +43 -6

73 lines not on this page · raw message

drivers/net/wireless/mediatek/mt76/mt7996/mcu.h +1 -0
index e0b83ac9f5e2a..647f39b7dab52 100644
@@ -837,6 +837,7 @@ enum {
 enum {
 	UNI_BAND_CONFIG_RADIO_ENABLE,
 	UNI_BAND_CONFIG_RTS_THRESHOLD = 0x08,
+	UNI_BAND_CONFIG_MAC_ENABLE_CTRL = 0x0c,
 };
 
 enum {
drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h +2 -0
index 7a884311800ea..d31864f973cce 100644
@@ -377,6 +377,7 @@ struct mt7996_phy {
 
 	bool has_aux_rx;
 	bool counter_reset;
+	bool rdd_tx_paused;
 };
 
 struct mt7996_dev {
@@ -726,6 +727,7 @@ int mt7996_mcu_get_temperature(struct mt7996_phy *phy);
 int mt7996_mcu_set_thermal_throttling(struct mt7996_phy *phy, u8 state);
 int mt7996_mcu_set_thermal_protect(struct mt7996_phy *phy, bool enable);
 int mt7996_mcu_set_txpower_sku(struct mt7996_phy *phy);
+int mt7996_mcu_rdd_resume_tx(struct mt7996_phy *phy);
 int mt7996_mcu_rdd_cmd(struct mt7996_dev *dev, int cmd, u8 rdd_idx, u8 val);
 int mt7996_mcu_rdd_background_enable(struct mt7996_phy *phy,
 				     struct cfg80211_chan_def *chandef);
Signature · 1 line
2.53.0
author maintainer
#98 lore raw

PATCH 94/1146 wifi: mt76: mt7996: fix iface combination for different chipsets

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Shayne Chen <[email protected]>

[ Upstream commit 5ef0e8e2653b1ba325eb883ffb94073f19cb669a ]

MT7992 and MT7990 support up to 19 interfaces per band and 32 in total.

Fixes 8df63a4bbe3d ("wifi: mt76: mt7996: adjust interface num and wtbl size for mt7992")
---
 .../net/wireless/mediatek/mt76/mt7996/init.c    | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt7996/init.c +16 -1
index 00a8286bd1368..20d4c8d5b3e89 100644
@@ -34,6 +34,20 @@ static const struct ieee80211_iface_combination if_comb_global = {
 			       BIT(NL80211_CHAN_WIDTH_40) |
 			       BIT(NL80211_CHAN_WIDTH_80) |
 			       BIT(NL80211_CHAN_WIDTH_160),
+	.beacon_int_min_gcd = 100,
+};
+
+static const struct ieee80211_iface_combination if_comb_global_7992 = {
+	.limits = &if_limits_global,
+	.n_limits = 1,
+	.max_interfaces = 32,
+	.num_different_channels = MT7996_MAX_RADIOS - 1,
+	.radar_detect_widths = BIT(NL80211_CHAN_WIDTH_20_NOHT) |
+			       BIT(NL80211_CHAN_WIDTH_20) |
+			       BIT(NL80211_CHAN_WIDTH_40) |
+			       BIT(NL80211_CHAN_WIDTH_80) |
+			       BIT(NL80211_CHAN_WIDTH_160),
+	.beacon_int_min_gcd = 100,
 };
 
 static const struct ieee80211_iface_limit if_limits[] = {
@@ -485,7 +499,8 @@ mt7996_init_wiphy(struct ieee80211_hw *hw, struct mtk_wed_device *wed)
 	hw->vif_data_size = sizeof(struct mt7996_vif);
 	hw->chanctx_data_size = sizeof(struct mt76_chanctx);
 
-	wiphy->iface_combinations = &if_comb_global;
+	wiphy->iface_combinations = is_mt7996(&dev->mt76) ? &if_comb_global :
+							    &if_comb_global_7992;
 	wiphy->n_iface_combinations = 1;
 
 	wiphy->radio = dev->radios;
Signature · 1 line
2.53.0
author maintainer
#99 lore raw

PATCH 95/1146 wifi: mt76: mt7996: Set mtxq->wcid just for primary link

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Lorenzo Bianconi <[email protected]>

[ Upstream commit 654abcbe4528f74428b69292fad5c4224414fa1b ]

Set WCID index in mt76_txq struct just for the primary link in mt7996_vif_link_add routine.

Fixes 69d54ce7491d0 ("wifi: mt76: mt7996: switch to single multi-radio wiphy")
---
 drivers/net/wireless/mediatek/mt76/mt7996/main.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7996/main.c +6 -8
index dfac3b9b28fe9..d75f48c61ce0f 100644
@@ -301,7 +301,6 @@ int mt7996_vif_link_add(struct mt76_phy *mphy, struct ieee80211_vif *vif,
 		.cmd = SET_KEY,
 		.link_id = link_conf->link_id,
 	};
-	struct mt76_txq *mtxq;
 	int mld_idx, idx, ret;
 
 	mlink->idx = __ffs64(~dev->mt76.vif_mask);
@@ -344,11 +343,6 @@ int mt7996_vif_link_add(struct mt76_phy *mphy, struct ieee80211_vif *vif,
 	mt7996_mac_wtbl_update(dev, idx,
 			       MT_WTBL_UPDATE_ADM_COUNT_CLEAR);
 
-	if (vif->txq) {
-		mtxq = (struct mt76_txq *)vif->txq->drv_priv;
-		mtxq->wcid = idx;
-	}
-
 	if (vif->type != NL80211_IFTYPE_AP &&
 	    (!mlink->omac_idx || mlink->omac_idx > 3))
 		vif->offload_flags = 0;
@@ -371,9 +365,13 @@ int mt7996_vif_link_add(struct mt76_phy *mphy, struct ieee80211_vif *vif,
 
 	ieee80211_iter_keys(mphy->hw, vif, mt7996_key_iter, &it);
 
-	if (!mlink->wcid->offchannel &&
-	    mvif->mt76.deflink_id == IEEE80211_LINK_UNSPECIFIED)
+	if (vif->txq && !mlink->wcid->offchannel &&
+	    mvif->mt76.deflink_id == IEEE80211_LINK_UNSPECIFIED) {
+		struct mt76_txq *mtxq = (struct mt76_txq *)vif->txq->drv_priv;
+
 		mvif->mt76.deflink_id = link_conf->link_id;
+		mtxq->wcid = idx;
+	}
 
 	return 0;
 }
Signature · 1 line
2.53.0
author maintainer
#100 lore raw

PATCH 96/1146 wifi: mt76: mt7996: Reset mtxq->idx if primary link is removed in mt7996_vif_link_remove()

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Lorenzo Bianconi <[email protected]>

[ Upstream commit 751a2679b15e3a0fa8fc9175862f0ec40643db68 ]

Reset WCID index in mt76_txq struct if primary link is removed in mt7996_vif_link_remove routine.

Fixes a3316d2fc669f ("wifi: mt76: mt7996: set vif default link_id adding/removing vif links")
---
 .../net/wireless/mediatek/mt76/mt7996/main.c  | 21 ++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7996/main.c +16 -5
index d75f48c61ce0f..c6204a8673ee7 100644
@@ -402,17 +402,28 @@ void mt7996_vif_link_remove(struct mt76_phy *mphy, struct ieee80211_vif *vif,
 
 	rcu_assign_pointer(dev->mt76.wcid[idx], NULL);
 
-	if (!mlink->wcid->offchannel &&
+	if (vif->txq && !mlink->wcid->offchannel &&
 	    mvif->mt76.deflink_id == link_conf->link_id) {
 		struct ieee80211_bss_conf *iter;
+		struct mt76_txq *mtxq;
 		unsigned int link_id;
 
 		mvif->mt76.deflink_id = IEEE80211_LINK_UNSPECIFIED;
+		mtxq = (struct mt76_txq *)vif->txq->drv_priv;
+		/* Primary link will be removed, look for a new one */
 		for_each_vif_active_link(vif, iter, link_id) {
-			if (link_id != IEEE80211_LINK_UNSPECIFIED) {
-				mvif->mt76.deflink_id = link_id;
-				break;
-			}
+			struct mt7996_vif_link *link;
+
+			if (link_id == link_conf->link_id)
+				continue;
+
+			link = mt7996_vif_link(dev, vif, link_id);
+			if (!link)
+				continue;
+
+			mtxq->wcid = link->msta_link.wcid.idx;
+			mvif->mt76.deflink_id = link_id;
+			break;
 		}
 	}
 
Signature · 1 line
2.53.0
author maintainer
#101 lore raw

PATCH 97/1146 wifi: mt76: mt7996: Switch to the secondary link if the default one is removed

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Lorenzo Bianconi <[email protected]>

[ Upstream commit 5ef44c200618430b004233cbfc1b0929a13d5ac8 ]

Switch to the secondary link if available in mt7996_mac_sta_remove_links routine if the primary one is removed.
Moreover reset secondary link index for single link scenario.

Fixes 85cd5534a3f2e ("wifi: mt76: mt7996: use correct link_id when filling TXD and TXP")
---
 .../net/wireless/mediatek/mt76/mt7996/mac.c   | 12 ++---
 .../net/wireless/mediatek/mt76/mt7996/main.c  | 51 +++++++++++++------
 2 files changed, 41 insertions(+), 22 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7996/mac.c +5 -7
index 2fc4513388ab7..5e0c85066803d 100644
@@ -2404,14 +2404,12 @@ mt7996_mac_reset_sta_iter(void *data, struct ieee80211_sta *sta)
 			continue;
 
 		mt7996_mac_sta_deinit_link(dev, msta_link);
-
-		if (msta->deflink_id == i) {
-			msta->deflink_id = IEEE80211_LINK_UNSPECIFIED;
-			continue;
-		}
-
-		kfree_rcu(msta_link, rcu_head);
+		if (msta_link != &msta->deflink)
+			kfree_rcu(msta_link, rcu_head);
 	}
+
+	msta->deflink_id = IEEE80211_LINK_UNSPECIFIED;
+	msta->seclink_id = msta->deflink_id;
 }
 
 static void
drivers/net/wireless/mediatek/mt76/mt7996/main.c +36 -15

75 lines not on this page · raw message

Signature · 1 line
2.53.0
author maintainer
#102 lore raw

PATCH 98/1146 wifi: mt76: mt7996: Clear wcid pointer in mt7996_mac_sta_deinit_link()

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Lorenzo Bianconi <[email protected]>

[ Upstream commit 88973240dc7c976dd320b36a9e6d925c9be083ae ]

Clear WCID pointer removing the sta link in mt7996_mac_sta_deinit_link routine.

Fixes dd82a9e02c054 ("wifi: mt76: mt7996: Rely on mt7996_sta_link in sta_add/sta_remove callbacks")
---
 drivers/net/wireless/mediatek/mt76/mt7996/main.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/wireless/mediatek/mt76/mt7996/main.c +1 -0
index 50ccfe3e10bad..6b98835269353 100644
@@ -1043,6 +1043,7 @@ void mt7996_mac_sta_deinit_link(struct mt7996_dev *dev,
 		list_del_init(&msta_link->rc_list);
 	spin_unlock_bh(&dev->mt76.sta_poll_lock);
 
+	rcu_assign_pointer(dev->mt76.wcid[msta_link->wcid.idx], NULL);
 	mt76_wcid_cleanup(&dev->mt76, &msta_link->wcid);
 	mt76_wcid_mask_clear(dev->mt76.wcid_mask, msta_link->wcid.idx);
 }
Signature · 1 line
2.53.0
author maintainer
#85 lore raw

PATCH 81/1146 powerpc/pgtable-frag: Fix bad page state in pte_frag_destroy

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Ritesh Harjani (IBM) <[email protected]>

[ Upstream commit fda4d71651f71c44b35829d13f3c8bf920032f77 ]

powerpc uses pt_frag_refcount as a reference counter for tracking it's pte and pmd page table fragments. For PTE table, in case of Hash with 64K pagesize, we have 16 fragments of 4K size in one 64K page.

Patch series [1] "mm: free retracted page table by RCU"
added pte_free_defer() to defer the freeing of PTE tables when retract_page_tables() is called for madvise MADV_COLLAPSE on shmem range.
[1]: https://lore.kernel.org/all/[email protected]/

pte_free_defer() sets the active flag on the corresponding fragment's folio & calls pte_fragment_free(), which reduces the pt_frag_refcount. When pt_frag_refcount reaches 0 (no active fragment using the folio), it checks if the folio active flag is set, if set, it calls call_rcu to free the folio, it the active flag is unset then it calls pte_free_now().

Now, this can lead to following problem in a corner case...

[  265.351553][  T183] BUG: Bad page state in process a.out  pfn:20d62
[  265.353555][  T183] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x20d62
[  265.355457][  T183] flags: 0x3ffff800000100(active|node=0|zone=0|lastcpupid=0x7ffff)
[  265.358719][  T183] raw: 003ffff800000100 0000000000000000 5deadbeef0000122 0000000000000000
[  265.360177][  T183] raw: 0000000000000000 c0000000119caf58 00000000ffffffff 0000000000000000
[  265.361438][  T183] page dumped because: PAGE_FLAGS_CHECK_AT_FREE flag(s) set
[  265.362572][  T183] Modules linked in:
[  265.364622][  T183] CPU: 0 UID: 0 PID: 183 Comm: a.out Not tainted 6.18.0-rc3-00141-g1ddeaaace7ff-dirty #53 VOLUNTARY
[  265.364785][  T183] Hardware name: IBM pSeries (emulated by qemu) POWER10 (architected) 0x801200 0xf000006 of:SLOF,git-ee03ae pSeries
[  265.364908][  T183] Call Trace:
[  265.364955][  T183] [c000000011e6f7c0] [c000000001cfaa18] dump_stack_lvl+0x130/0x148 (unreliable)
[  265.365202][  T183] [c000000011e6f7f0] [c000000000794758] bad_page+0xb4/0x1c8
[  265.365384][  T183] [c000000011e6f890] [c00000000079c020] __free_frozen_pages+0x838/0xd08
[  265.365554][  T183] [c000000011e6f980] [c0000000000a70ac] pte_frag_destroy+0x298/0x310
[  265.365729][  T183] [c000000011e6fa30] [c0000000000aa764] arch_exit_mmap+0x34/0x218
[  265.365912][  T183] [c000000011e6fa80] [c000000000751698] exit_mmap+0xb8/0x820
[  265.366080][  T183] [c000000011e6fc30] [c0000000001b1258] __mmput+0x98/0x300
[  265.366244][  T183] [c000000011e6fc80] [c0000000001c81f8] do_exit+0x470/0x1508
[  265.366421][  T183] [c000000011e6fd70] [c0000000001c95e4] do_group_exit+0x88/0x148
[  265.366602][  T183] [c000000011e6fdc0] [c0000000001c96ec] pid_child_should_wake+0x0/0x178
[  265.366780][  T183] [c000000011e6fdf0] [c00000000003a270] system_call_exception+0x1b0/0x4e0
[  265.366958][  T183] [c000000011e6fe50] [c00000000000d05c] system_call_vectored_common+0x15c/0x2ec

The bad page state error occurs when such a folio gets freed (with active flag set), from do_exit() path in parallel.

... this can happen when the pte fragment was allocated from this folio, but when all the fragments get freed, the pte_frag_refcount still had some unused fragments. Now, if this process exits, with such folio as it's cached pte_frag in mm->context, then during pte_frag_destroy(), we simply call pagetable_dtor() and pagetable_free(), meaning it doesn't clear the active flag. This, can lead to the above bug. Since we are anyway in do_exit() path, then if the refcount is 0, then I guess it should be ok to simply clear the folio active flag before calling pagetable_dtor() & pagetable_free().

---
 arch/powerpc/mm/pgtable-frag.c | 1 +
 1 file changed, 1 insertion(+)
arch/powerpc/mm/pgtable-frag.c +1 -0
index 77e55eac16e42..ae742564a3d56 100644
@@ -25,6 +25,7 @@ void pte_frag_destroy(void *pte_frag)
 	count = ((unsigned long)pte_frag & ~PAGE_MASK) >> PTE_FRAG_SIZE_SHIFT;
 	/* We allow PTE_FRAG_NR fragments from a PTE page */
 	if (atomic_sub_and_test(PTE_FRAG_NR - count, &ptdesc->pt_frag_refcount)) {
+		folio_clear_active(ptdesc_folio(ptdesc));
 		pagetable_dtor(ptdesc);
 		pagetable_free(ptdesc);
 	}
Signature · 1 line
2.53.0
author maintainer
#103 lore raw

PATCH 99/1146 wifi: mt76: mt7996: Reset ampdu_state state in case of failure in mt7996_tx_check_aggr()

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Lorenzo Bianconi <[email protected]>

[ Upstream commit c0747db7c10c2dfbdcff0e8e97021e3df1f1e362 ]

Reset the ampdu_state configured state if ieee80211_start_tx_ba_session routine fails in mt7996_tx_check_aggr()

Fixes 98686cd21624c ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices")
---
 drivers/net/wireless/mediatek/mt76/mt7996/mac.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7996/mac.c +3 -2
index 5e0c85066803d..d6ef2f8003269 100644
@@ -1270,8 +1270,9 @@ mt7996_tx_check_aggr(struct ieee80211_link_sta *link_sta,
 	if (unlikely(fc != (IEEE80211_FTYPE_DATA | IEEE80211_STYPE_QOS_DATA)))
 		return;
 
-	if (!test_and_set_bit(tid, &wcid->ampdu_state))
-		ieee80211_start_tx_ba_session(link_sta->sta, tid, 0);
+	if (!test_and_set_bit(tid, &wcid->ampdu_state) &&
+	    ieee80211_start_tx_ba_session(link_sta->sta, tid, 0))
+		clear_bit(tid, &wcid->ampdu_state);
 }
 
 static void
Signature · 1 line
2.53.0
author maintainer
#104 lore raw

PATCH 100/1146 wifi: mt76: mt7921: Reset ampdu_state state in case of failure in mt76_connac2_tx_check_aggr()

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Sean Wang <[email protected]>

[ Upstream commit 53ffffeb9624ffab6d9a3b1da8635a23f1172b5e ]

Reset ampdu_state if ieee80211_start_tx_ba_session() fails in mt76_connac2_tx_check_aggr(), otherwise the driver may incorrectly assume aggregation is active and skip future BA setup attempts.

Fixes 163f4d22c118 ("mt76: mt7921: add MAC support")
---
 drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c +4 -2
index b41ca1410da92..aab4630570093 100644
@@ -1153,8 +1153,10 @@ void mt76_connac2_tx_check_aggr(struct ieee80211_sta *sta, __le32 *txwi)
 		return;
 
 	wcid = (struct mt76_wcid *)sta->drv_priv;
-	if (!test_and_set_bit(tid, &wcid->ampdu_state))
-		ieee80211_start_tx_ba_session(sta, tid, 0);
+	if (!test_and_set_bit(tid, &wcid->ampdu_state)) {
+		if (ieee80211_start_tx_ba_session(sta, tid, 0))
+			clear_bit(tid, &wcid->ampdu_state);
+	}
 }
 EXPORT_SYMBOL_GPL(mt76_connac2_tx_check_aggr);
 
Signature · 1 line
2.53.0
author maintainer
#105 lore raw

PATCH 101/1146 wifi: mt76: mt7925: Fix incorrect MLO mode in firmware control

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Leon Yen <[email protected]>

[ Upstream commit 1695f662329faa07c860c73453c097823852df28 ]

The selection of MLO mode should depend on the capabilities of the STA rather than those of the peer AP to avoid compatibility issues with certain APs, such as Xiaomi BE5000 WiFi7 router.

Fixes 69acd6d910b0c ("wifi: mt76: mt7925: add mt7925_change_vif_links")
---
 drivers/net/wireless/mediatek/mt76/mt7925/main.c   | 2 +-
 drivers/net/wireless/mediatek/mt76/mt7925/mcu.c    | 9 ++++++---
 drivers/net/wireless/mediatek/mt76/mt7925/mt7925.h | 4 ++--
 3 files changed, 9 insertions(+), 6 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7925/main.c +1 -1
index 2d358a96640c9..d99a60ae063e8 100644
@@ -541,7 +541,7 @@ static int mt7925_set_mlo_roc(struct mt792x_phy *phy,
 
 	phy->roc_grant = false;
 
-	err = mt7925_mcu_set_mlo_roc(mconf, sel_links, 5, ++phy->roc_token_id);
+	err = mt7925_mcu_set_mlo_roc(phy, mconf, sel_links, 5, ++phy->roc_token_id);
 	if (err < 0) {
 		clear_bit(MT76_STATE_ROC, &phy->mt76->state);
 		goto out;
drivers/net/wireless/mediatek/mt76/mt7925/mcu.c +6 -3
index 47f91b9f1b95b..dec8e2de86b69 100644
@@ -1294,8 +1294,8 @@ int mt7925_mcu_add_key(struct mt76_dev *dev, struct ieee80211_vif *vif,
 	return mt76_mcu_skb_send_msg(dev, skb, mcu_cmd, true);
 }
 
-int mt7925_mcu_set_mlo_roc(struct mt792x_bss_conf *mconf, u16 sel_links,
-			   int duration, u8 token_id)
+int mt7925_mcu_set_mlo_roc(struct mt792x_phy *phy, struct mt792x_bss_conf *mconf,
+			   u16 sel_links, int duration, u8 token_id)
 {
 	struct mt792x_vif *mvif = mconf->vif;
 	struct ieee80211_vif *vif = container_of((void *)mvif,
@@ -1330,6 +1330,8 @@ int mt7925_mcu_set_mlo_roc(struct mt792x_bss_conf *mconf, u16 sel_links,
 			.roc[1].len = cpu_to_le16(sizeof(struct roc_acquire_tlv))
 	};
 
+	struct wiphy *wiphy = phy->mt76->hw->wiphy;
+
 	if (!mconf || hweight16(vif->valid_links) < 2 ||
 	    hweight16(sel_links) != 2)
 		return -EPERM;
@@ -1352,7 +1354,8 @@ int mt7925_mcu_set_mlo_roc(struct mt792x_bss_conf *mconf, u16 sel_links,
 		is_AG_band |= links[i].chan->band == NL80211_BAND_2GHZ;
 	}
 
-	if (vif->cfg.eml_cap & IEEE80211_EML_CAP_EMLSR_SUPP)
+	if (!(wiphy->iftype_ext_capab[0].mld_capa_and_ops &
+	      IEEE80211_MLD_CAP_OP_MAX_SIMUL_LINKS))
 		type = is_AG_band ? MT7925_ROC_REQ_MLSR_AG :
 				    MT7925_ROC_REQ_MLSR_AA;
 	else
drivers/net/wireless/mediatek/mt76/mt7925/mt7925.h +2 -2
index 6b9bf1b890320..a1d902ccce6d2 100644
@@ -349,8 +349,8 @@ int mt7925_set_tx_sar_pwr(struct ieee80211_hw *hw,
 int mt7925_mcu_regval(struct mt792x_dev *dev, u32 regidx, u32 *val, bool set);
 int mt7925_mcu_set_clc(struct mt792x_dev *dev, u8 *alpha2,
 		       enum environment_cap env_cap);
-int mt7925_mcu_set_mlo_roc(struct mt792x_bss_conf *mconf, u16 sel_links,
-			   int duration, u8 token_id);
+int mt7925_mcu_set_mlo_roc(struct mt792x_phy *phy, struct mt792x_bss_conf *mconf,
+			   u16 sel_links, int duration, u8 token_id);
 int mt7925_mcu_set_roc(struct mt792x_phy *phy, struct mt792x_bss_conf *mconf,
 		       struct ieee80211_channel *chan, int duration,
 		       enum mt7925_roc_req type, u8 token_id);
Signature · 1 line
2.53.0
author maintainer
#106 lore raw

PATCH 102/1146 wifi: mt76: mt7615: fix use_cts_prot support

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Ryder Lee <[email protected]>

[ Upstream commit 1974a67d9b65c29a0a9426e32e8cd8c056de48b7 ]

Driver should not directly write WTBL to prevent overwritten issues.

With this fix, when driver needs to adjust its behavior for compatibility, especially concerning older 11g/n devices, by enabling or disabling CTS protection frames, often for hidden SSIDs or to manage legacy clients.

---
 .../net/wireless/mediatek/mt76/mt7615/mac.c   | 15 ------
 .../net/wireless/mediatek/mt76/mt7615/main.c  |  7 +--
 .../net/wireless/mediatek/mt76/mt7615/mcu.c   | 47 +++++++++++++++++++
 .../wireless/mediatek/mt76/mt7615/mt7615.h    |  5 +-
 .../net/wireless/mediatek/mt76/mt7615/regs.h  |  2 -
 5 files changed, 53 insertions(+), 23 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7615/mac.c +0 -15
index 45992fdcec60c..ce00514685016 100644
@@ -1167,21 +1167,6 @@ void mt7615_mac_set_rates(struct mt7615_phy *phy, struct mt7615_sta *sta,
 }
 EXPORT_SYMBOL_GPL(mt7615_mac_set_rates);
 
-void mt7615_mac_enable_rtscts(struct mt7615_dev *dev,
-			      struct ieee80211_vif *vif, bool enable)
-{
-	struct mt7615_vif *mvif = (struct mt7615_vif *)vif->drv_priv;
-	u32 addr;
-
-	addr = mt7615_mac_wtbl_addr(dev, mvif->sta.wcid.idx) + 3 * 4;
-
-	if (enable)
-		mt76_set(dev, addr, MT_WTBL_W3_RTS);
-	else
-		mt76_clear(dev, addr, MT_WTBL_W3_RTS);
-}
-EXPORT_SYMBOL_GPL(mt7615_mac_enable_rtscts);
-
 static int
 mt7615_mac_wtbl_update_key(struct mt7615_dev *dev, struct mt76_wcid *wcid,
 			   struct ieee80211_key_conf *key,
drivers/net/wireless/mediatek/mt76/mt7615/main.c +4 -3
index 727266892c3df..fc619acbb40d0 100644
@@ -583,9 +583,6 @@ static void mt7615_bss_info_changed(struct ieee80211_hw *hw,
 		}
 	}
 
-	if (changed & BSS_CHANGED_ERP_CTS_PROT)
-		mt7615_mac_enable_rtscts(dev, vif, info->use_cts_prot);
-
 	if (changed & BSS_CHANGED_BEACON_ENABLED && info->enable_beacon) {
 		mt7615_mcu_add_bss_info(phy, vif, NULL, true);
 		mt7615_mcu_sta_add(phy, vif, NULL, true);
@@ -598,6 +595,10 @@ static void mt7615_bss_info_changed(struct ieee80211_hw *hw,
 		       BSS_CHANGED_BEACON_ENABLED))
 		mt7615_mcu_add_beacon(dev, hw, vif, info->enable_beacon);
 
+	if (changed & BSS_CHANGED_HT || changed & BSS_CHANGED_ERP_CTS_PROT)
+		mt7615_mcu_set_protection(phy, vif, info->ht_operation_mode,
+					  info->use_cts_prot);
+
 	if (changed & BSS_CHANGED_PS)
 		mt76_connac_mcu_set_vif_ps(&dev->mt76, vif);
 
drivers/net/wireless/mediatek/mt76/mt7615/mcu.c +47 -0

50 lines not on this page · raw message

drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h +2 -3
index c93fd245c90fb..391928405f322 100644
@@ -467,8 +467,6 @@ void mt7615_mac_reset_counters(struct mt7615_phy *phy);
 void mt7615_mac_cca_stats_reset(struct mt7615_phy *phy);
 void mt7615_mac_set_scs(struct mt7615_phy *phy, bool enable);
 void mt7615_mac_enable_nf(struct mt7615_dev *dev, bool ext_phy);
-void mt7615_mac_enable_rtscts(struct mt7615_dev *dev,
-			      struct ieee80211_vif *vif, bool enable);
 void mt7615_mac_sta_poll(struct mt7615_dev *dev);
 int mt7615_mac_write_txwi(struct mt7615_dev *dev, __le32 *txwi,
 			  struct sk_buff *skb, struct mt76_wcid *wcid,
@@ -523,7 +521,8 @@ int mt7615_mcu_set_sku_en(struct mt7615_phy *phy, bool enable);
 int mt7615_mcu_apply_rx_dcoc(struct mt7615_phy *phy);
 int mt7615_mcu_apply_tx_dpd(struct mt7615_phy *phy);
 int mt7615_dfs_init_radar_detector(struct mt7615_phy *phy);
-
+int mt7615_mcu_set_protection(struct mt7615_phy *phy, struct ieee80211_vif *vif,
+			      u8 ht_mode, bool use_cts_prot);
 int mt7615_mcu_set_roc(struct mt7615_phy *phy, struct ieee80211_vif *vif,
 		       struct ieee80211_channel *chan, int duration);
 
drivers/net/wireless/mediatek/mt76/mt7615/regs.h +0 -2
index eb3c24d51987d..e4133e9181d0f 100644
@@ -455,8 +455,6 @@ enum mt7615_reg_base {
 #define MT_WTBL_RIUCR3_RATE6		GENMASK(19, 8)
 #define MT_WTBL_RIUCR3_RATE7		GENMASK(31, 20)
 
-#define MT_WTBL_W3_RTS			BIT(22)
-
 #define MT_WTBL_W5_CHANGE_BW_RATE	GENMASK(7, 5)
 #define MT_WTBL_W5_SHORT_GI_20		BIT(8)
 #define MT_WTBL_W5_SHORT_GI_40		BIT(9)
Signature · 1 line
2.53.0
author maintainer
#107 lore raw

PATCH 103/1146 wifi: mt76: mt7915: fix use_cts_prot support

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Ryder Lee <[email protected]>

[ Upstream commit 8b2c26562b95c6397e132d21f2bd3d73aaee0c0a ]

With this fix, when driver needs to adjust its behavior for compatibility, especially concerning older 11g/n devices, by enabling or disabling CTS protection frames, often for hidden SSIDs or to manage legacy clients.

---
 .../net/wireless/mediatek/mt76/mt7915/mac.c   | 13 ----
 .../net/wireless/mediatek/mt76/mt7915/main.c  |  7 ++-
 .../net/wireless/mediatek/mt76/mt7915/mcu.c   | 62 +++++++++++++++++++
 .../net/wireless/mediatek/mt76/mt7915/mcu.h   | 11 ++++
 .../wireless/mediatek/mt76/mt7915/mt7915.h    |  4 ++
 5 files changed, 81 insertions(+), 16 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7915/mac.c +0 -13
index cefe56c05731d..cec2c4208255f 100644
@@ -232,19 +232,6 @@ static void mt7915_mac_sta_poll(struct mt7915_dev *dev)
 	rcu_read_unlock();
 }
 
-void mt7915_mac_enable_rtscts(struct mt7915_dev *dev,
-			      struct ieee80211_vif *vif, bool enable)
-{
-	struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv;
-	u32 addr;
-
-	addr = mt7915_mac_wtbl_lmac_addr(dev, mvif->sta.wcid.idx, 5);
-	if (enable)
-		mt76_set(dev, addr, BIT(5));
-	else
-		mt76_clear(dev, addr, BIT(5));
-}
-
 static void
 mt7915_wed_check_ppe(struct mt7915_dev *dev, struct mt76_queue *q,
 		     struct mt7915_sta *msta, struct sk_buff *skb,
drivers/net/wireless/mediatek/mt76/mt7915/main.c +4 -3
index 90d5e79fbf74d..0892291616ead 100644
@@ -68,7 +68,7 @@ int mt7915_run(struct ieee80211_hw *hw)
 	if (ret)
 		goto out;
 
-	ret = mt76_connac_mcu_set_rts_thresh(&dev->mt76, 0x92b,
+	ret = mt76_connac_mcu_set_rts_thresh(&dev->mt76, MT7915_RTS_LEN_THRES,
 					     phy->mt76->band_idx);
 	if (ret)
 		goto out;
@@ -633,8 +633,9 @@ static void mt7915_bss_info_changed(struct ieee80211_hw *hw,
 	if (set_sta == 1)
 		mt7915_mcu_add_sta(dev, vif, NULL, CONN_STATE_PORT_SECURE, false);
 
-	if (changed & BSS_CHANGED_ERP_CTS_PROT)
-		mt7915_mac_enable_rtscts(dev, vif, info->use_cts_prot);
+	if (changed & BSS_CHANGED_HT || changed & BSS_CHANGED_ERP_CTS_PROT)
+		mt7915_mcu_set_protection(phy, vif, info->ht_operation_mode,
+					  info->use_cts_prot);
 
 	if (changed & BSS_CHANGED_ERP_SLOT) {
 		int slottime = 9;
drivers/net/wireless/mediatek/mt76/mt7915/mcu.c +62 -0

68 lines not on this page · raw message

drivers/net/wireless/mediatek/mt76/mt7915/mcu.h +11 -0
index 3af11a075a2f4..22f73a5ed4259 100644
@@ -399,6 +399,17 @@ struct bss_info_inband_discovery {
 	__le16 prob_rsp_len;
 } __packed __aligned(4);
 
+struct bss_info_prot {
+	__le16 tag;
+	__le16 len;
+	__le32 prot_type;
+	__le32 prot_mode;
+	__le32 rts_len_thres;
+	__le16 he_rts_thres;
+	u8 rts_pkt_thres;
+	u8 rsv[5];
+} __packed;
+
 enum {
 	BSS_INFO_BCN_CSA,
 	BSS_INFO_BCN_BCC,
drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h +4 -0
index b5c06201b7078..bf1d915a3ca23 100644
@@ -84,6 +84,8 @@
 #define MT7915_CRIT_TEMP		110
 #define MT7915_MAX_TEMP			120
 
+#define MT7915_RTS_LEN_THRES		0x92b
+
 struct mt7915_vif;
 struct mt7915_sta;
 struct mt7915_dfs_pulse;
@@ -473,6 +475,8 @@ int mt7915_mcu_add_inband_discov(struct mt7915_dev *dev, struct ieee80211_vif *v
 				 u32 changed);
 int mt7915_mcu_add_beacon(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
 			  int enable, u32 changed);
+int mt7915_mcu_set_protection(struct mt7915_phy *phy, struct ieee80211_vif *vif,
+			      u8 ht_mode, bool use_cts_prot);
 int mt7915_mcu_add_obss_spr(struct mt7915_phy *phy, struct ieee80211_vif *vif,
 			    struct ieee80211_he_obss_pd *he_obss_pd);
 int mt7915_mcu_add_rate_ctrl(struct mt7915_dev *dev, struct ieee80211_vif *vif,
Signature · 1 line
2.53.0
author maintainer
#108 lore raw

PATCH 104/1146 wifi: mt76: mt7925: prevent NULL pointer dereference in mt7925_tx_check_aggr()

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Ming Yen Hsieh <[email protected]>

[ Upstream commit 83ae3a18ba957257b4c406273d2da2caeea2b439 ]

Move the NULL check for 'sta' before dereferencing it to prevent a possible crash.

Fixes 44eb173bdd4f ("wifi: mt76: mt7925: add link handling in mt7925_txwi_free")
---
 drivers/net/wireless/mediatek/mt76/mt7925/mac.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt7925/mac.c +4 -1
index ebe872f58c88f..711daa5f07fab 100644
@@ -846,11 +846,14 @@ static void mt7925_tx_check_aggr(struct ieee80211_sta *sta, struct sk_buff *skb,
 	bool is_8023;
 	u16 fc, tid;
 
+	if (!sta)
+		return;
+
 	link_sta = rcu_dereference(sta->link[wcid->link_id]);
 	if (!link_sta)
 		return;
 
-	if (!sta || !(link_sta->ht_cap.ht_supported || link_sta->he_cap.has_he))
+	if (!(link_sta->ht_cap.ht_supported || link_sta->he_cap.has_he))
 		return;
 
 	tid = skb->priority & IEEE80211_QOS_CTL_TID_MASK;
Signature · 1 line
2.53.0
author maintainer
#109 lore raw

PATCH 105/1146 wifi: mt76: mt7925: prevent NULL vif dereference in mt7925_mac_write_txwi

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Ming Yen Hsieh <[email protected]>

[ Upstream commit 962eb04e67552be406c906c83099c1d736aae3b6 ]

Check for a NULL vif before accessing ieee80211_vif_is_mld(vif) to avoid a potential kernel panic in scenarios where vif might not be initialized.

Fixes ebb1406813c6 ("wifi: mt76: mt7925: add link handling to txwi")
---
 drivers/net/wireless/mediatek/mt76/mt7925/mac.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7925/mac.c +2 -2
index 711daa5f07fab..82eedd80f694d 100644
@@ -804,8 +804,8 @@ mt7925_mac_write_txwi(struct mt76_dev *dev, __le32 *txwi,
 	txwi[5] = cpu_to_le32(val);
 
 	val = MT_TXD6_DAS | FIELD_PREP(MT_TXD6_MSDU_CNT, 1);
-	if (!ieee80211_vif_is_mld(vif) ||
-	    (q_idx >= MT_LMAC_ALTX0 && q_idx <= MT_LMAC_BCN0))
+	if (vif && (!ieee80211_vif_is_mld(vif) ||
+	    (q_idx >= MT_LMAC_ALTX0 && q_idx <= MT_LMAC_BCN0)))
 		val |= MT_TXD6_DIS_MAT;
 	txwi[6] = cpu_to_le32(val);
 	txwi[7] = 0;
Signature · 1 line
2.53.0
author maintainer
#110 lore raw

PATCH 106/1146 wifi: mt76: mt7996: fix FCS error flag check in RX descriptor

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Alok Tiwari <[email protected]>

[ Upstream commit d8db56142e531f060c938fa0b5175ed6c8cabb11 ]

The mt7996 driver currently checks the MT_RXD3_NORMAL_FCS_ERR bit in rxd1 whereas other Connac3-based drivers(mt7925) correctly check this bit in rxd3.

Since the MT_RXD3_NORMAL_FCS_ERR bit is defined in the fourth RX descriptor word (rxd3), update mt7996 to use the proper descriptor field. This change aligns mt7996 with mt7925 and the rest of the Connac3 family.

Fixes 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices")
---
 drivers/net/wireless/mediatek/mt76/mt7996/mac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt7996/mac.c +1 -1
index d6ef2f8003269..ac7f2343076b1 100644
@@ -527,7 +527,7 @@ mt7996_mac_fill_rx(struct mt7996_dev *dev, enum mt76_rxq_id q,
 	    !(csum_status & (BIT(0) | BIT(2) | BIT(3))))
 		skb->ip_summed = CHECKSUM_UNNECESSARY;
 
-	if (rxd1 & MT_RXD3_NORMAL_FCS_ERR)
+	if (rxd3 & MT_RXD3_NORMAL_FCS_ERR)
 		status->flag |= RX_FLAG_FAILED_FCS_CRC;
 
 	if (rxd1 & MT_RXD1_NORMAL_TKIP_MIC_ERR)
Signature · 1 line
2.53.0
author maintainer
#111 lore raw

PATCH 107/1146 wifi: mt76: mt7921: Place upper limit on station AID

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Rory Little <[email protected]>

[ Upstream commit 4d0bf21e3e20619d51d06c0c36207aabab8b712c ]

Any station configured with an AID over 20 causes a firmware crash. This situation occurred in our testing using an AP interface on 7922 hardware, with a modified hostapd, sourced from Mediatek's OpenWRT feeds.

In stock hostapd, station AIDs begin counting at 1, and this configuration is prevented with an upper limit on associated stations. However, the modified hostapd began allocation at 65, which caused the firmware to crash. This fix does not allow these AIDs to work, but will prevent the firmware crash.

This crash was only seen on IFTYPE_AP interfaces, and the fix does not appear to have an effect on IFTYPE_STATION behavior.

Fixes 5c14a5f944b9 ("mt76: mt7921: introduce mt7921e support")
---
 drivers/net/wireless/mediatek/mt76/mt7921/main.c   | 6 ++++++
 drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h | 2 ++
 2 files changed, 8 insertions(+)
drivers/net/wireless/mediatek/mt76/mt7921/main.c +6 -0
index 021335805acb3..f42e40f9663d8 100644
@@ -808,6 +808,9 @@ int mt7921_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
 	struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv;
 	int ret, idx;
 
+	if (sta->aid > MT7921_MAX_AID)
+		return -ENOENT;
+
 	idx = mt76_wcid_alloc(dev->mt76.wcid_mask, MT792x_WTBL_STA - 1);
 	if (idx < 0)
 		return -ENOSPC;
@@ -851,6 +854,9 @@ int mt7921_mac_sta_event(struct mt76_dev *mdev, struct ieee80211_vif *vif,
 	struct mt792x_sta *msta = (struct mt792x_sta *)sta->drv_priv;
 	struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv;
 
+	if (sta->aid > MT7921_MAX_AID)
+		return -ENOENT;
+
 	if (ev != MT76_STA_EVENT_ASSOC)
 	    return 0;
 
drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h +2 -0
index 83fc7f49ff848..ad92af98e3145 100644
@@ -7,6 +7,8 @@
 #include "../mt792x.h"
 #include "regs.h"
 
+#define MT7921_MAX_AID                  20
+
 #define MT7921_TX_RING_SIZE		2048
 #define MT7921_TX_MCU_RING_SIZE		256
 #define MT7921_TX_FWDL_RING_SIZE	128
Signature · 1 line
2.53.0
author maintainer
#112 lore raw

PATCH 108/1146 wifi: mt76: Fix memory leak destroying device

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Lorenzo Bianconi <[email protected]>

[ Upstream commit 6b470f36616e3448d44b0ef4b1de2a3e3a31b5be ]

All MT76 rx queues have an associated page_pool even if the queue is not associated to a NAPI (e.g. WED RRO queues with WED enabled). Destroy the page_pool running mt76_dma_cleanup routine during module unload. Moreover returns pages to the page pool if WED is not enabled for WED RRO queues.

Fixes 950d0abb5cd94 ("wifi: mt76: mt7996: add wed rx support")
---
 drivers/net/wireless/mediatek/mt76/dma.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
drivers/net/wireless/mediatek/mt76/dma.c +6 -5
index f240016ed9f0e..893ac14285cab 100644
@@ -874,7 +874,12 @@ mt76_dma_rx_cleanup(struct mt76_dev *dev, struct mt76_queue *q)
 		if (!buf)
 			break;
 
-		if (!mt76_queue_is_wed_rro(q))
+		if (mtk_wed_device_active(&dev->mmio.wed) &&
+		    mt76_queue_is_wed_rro(q))
+			continue;
+
+		if (!mt76_queue_is_wed_rro_rxdmad_c(q) &&
+		    !mt76_queue_is_wed_rro_ind(q))
 			mt76_put_page_pool_buf(buf, false);
 	} while (1);
 
@@ -1168,10 +1173,6 @@ void mt76_dma_cleanup(struct mt76_dev *dev)
 	mt76_for_each_q_rx(dev, i) {
 		struct mt76_queue *q = &dev->q_rx[i];
 
-		if (mtk_wed_device_active(&dev->mmio.wed) &&
-		    mt76_queue_is_wed_rro(q))
-			continue;
-
 		netif_napi_del(&dev->napi[i]);
 		mt76_dma_rx_cleanup(dev, q);
 
Signature · 1 line
2.53.0
author maintainer
#86 lore raw

PATCH 82/1146 powerpc/64s: Fix unmap race with PMD migration entries

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Ritesh Harjani (IBM) <[email protected]>

[ Upstream commit bbcbf045d6c778e82b47a35fc8728387708e9a3d ]

The following race is possible with migration swap entries or device-private THP entries. e.g. when move_pages is called on a PMD THP page, then there maybe an intermediate state, where PMD entry acts as a migration swap entry (pmd_present() is true). Then if an munmap happens at the same time, then this VM_BUG_ON() can happen in pmdp_huge_get_and_clear_full().

This patch fixes that.

Thread A: move_pages() syscall
add_folio_for_migration()
mmap_read_lock(mm)
folio_isolate_lru(folio)
mmap_read_unlock(mm)

do_move_pages_to_node()
migrate_pages()
try_to_migrate_one()
spin_lock(ptl)
set_pmd_migration_entry()
pmdp_invalidate() # PMD: _PAGE_INVALID | _PAGE_PTE | pfn
set_pmd_at() # PMD: migration swap entry (pmd_present=0)
spin_unlock(ptl)
[page copy phase] # <--- RACE WINDOW -->

Thread B: munmap()
mmap_write_downgrade(mm)
unmap_vmas() -> zap_pmd_range()

    zap_huge_pmd()
      __pmd_trans_huge_lock()
        pmd_is_huge():          # !pmd_present && !pmd_none -> TRUE (swap entry)
        pmd_lock() -> 		# spin_lock(ptl), waits for Thread A to release ptl
      pmdp_huge_get_and_clear_full()
        VM_BUG_ON(!pmd_present(*pmdp))  # HITS!
[  287.738700][ T1867] ------------[ cut here ]------------
[  287.743843][ T1867] kernel BUG at arch/powerpc/mm/book3s64/pgtable.c:187!
cpu 0x0: Vector: 700 (Program Check) at [c00000044037f4f0]
    pc: c000000000094ca4: pmdp_huge_get_and_clear_full+0x6c/0x23c
    lr: c000000000645dec: zap_huge_pmd+0xb0/0x868
    sp: c00000044037f790
   msr: 800000000282b033
  current = 0xc0000004032c1a00
  paca    = 0xc000000004fe0000   irqmask: 0x03   irq_happened: 0x09
    pid   = 1867, comm = a.out

kernel BUG at :187!
Linux version 6.19.0-12136-g14360d4f917c-dirty (powerpc64le-linux-gnu-gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #27 SMP PREEMPT Sun Feb 22 10:38:56 IST 2026 enter ? for help
[link register ] c000000000645dec zap_huge_pmd+0xb0/0x868
[c00000044037f790] c00000044037f7d0 (unreliable)
[c00000044037f7d0] c000000000645dcc zap_huge_pmd+0x90/0x868
[c00000044037f840] c0000000005724cc unmap_page_range+0x176c/0x1f40
[c00000044037fa00] c000000000572ea0 unmap_vmas+0xb0/0x1d8
[c00000044037fa90] c0000000005af254 unmap_region+0xb4/0x128
[c00000044037fb50] c0000000005af400 vms_complete_munmap_vmas+0x138/0x310
[c00000044037fbe0] c0000000005b0f1c do_vmi_align_munmap+0x1ec/0x238
[c00000044037fd30] c0000000005b3688 __vm_munmap+0x170/0x1f8
[c00000044037fdf0] c000000000587f74 sys_munmap+0x2c/0x40
[c00000044037fe10] c000000000032668 system_call_exception+0x128/0x350
[c00000044037fe50] c00000000000d05c system_call_vectored_common+0x15c/0x2ec
---- Exception: 3000 (System Call Vectored) at 0000000010064a2c
SP (7fff9b1ee9c0) is in userspace
0:mon> zh

commit a30b48bf1b24 ("mm/migrate_device: implement THP migration of zone device pages"), enabled migration for device-private PMD entries. Hence this is one
other path where this warning could get trigger from.

 ------------[ cut here ]------------
 WARNING: arch/powerpc/mm/book3s64/hash_pgtable.c:199 at hash__pmd_hugepage_update+0x48/0x284, CPU#3: hmm-tests/1905
 Modules linked in: test_hmm
 CPU: 3 UID: 0 PID: 1905 Comm: hmm-tests Tainted: G    B   W    L   N  7.0.0-rc1-01438-g7e2f0ee7581c #21 PREEMPT
 Tainted: [B]=BAD_PAGE, [W]=WARN, [L]=SOFTLOCKUP, [N]=TEST
 Hardware name: IBM pSeries (emulated by qemu) POWER10 (architected) 0x801200 0xf000006 of:SLOF,git-ee03ae pSeries
 NIP [c000000000096b70] hash__pmd_hugepage_update+0x48/0x284
 LR [c000000000096e7c] hash__pmdp_huge_get_and_clear+0xd0/0xd4
 Call Trace:
 [c000000604707670] [c000000004e102b8] 0xc000000004e102b8 (unreliable)
 [c000000604707700] [c00000000064ec3c] set_pmd_migration_entry+0x414/0x498
 [c000000604707760] [c00000000063e5a4] migrate_vma_collect_pmd+0x12e8/0x16c4
 [c000000604707890] [c00000000059282c] walk_pgd_range+0x7fc/0xd2c
 [c000000604707990] [c000000000592e40] __walk_page_range+0xe4/0x2ac
 [c000000604707a10] [c000000000593534] walk_page_range_mm_unsafe+0x204/0x2a4
 [c000000604707ab0] [c00000000063af10] migrate_vma_setup+0x1dc/0x2e8
 [c000000604707b10] [c008000006a21838] dmirror_migrate_to_system.constprop.0+0x210/0x4b0 [test_hmm]
 [c000000604707c30] [c008000006a245b0] dmirror_fops_unlocked_ioctl+0x454/0xa5c [test_hmm]
 [c000000604707d20] [c0000000006aab84] sys_ioctl+0x4ec/0x1178
 [c000000604707e10] [c0000000000326a8] system_call_exception+0x128/0x350
 [c000000604707e50] [c00000000000d05c] system_call_vectored_common+0x15c/0x2ec
 ---- interrupt: 3000 at 0x7fffbe44f50c
Fixes 75358ea359e7c ("powerpc/mm/book3s64: Fix MADV_DONTNEED and parallel page fault race")
Fixes a30b48bf1b24 ("mm/migrate_device: implement THP migration of zone device pages")
---
 arch/powerpc/include/asm/book3s/64/pgtable.h | 15 +++++++++++++++
 arch/powerpc/mm/book3s64/pgtable.c           | 13 +++++++++----
 2 files changed, 24 insertions(+), 4 deletions(-)
arch/powerpc/include/asm/book3s/64/pgtable.h +15 -0
index 1a91762b455d9..66a953046a49a 100644
@@ -1313,12 +1313,27 @@ static inline pmd_t pmdp_huge_get_and_clear(struct mm_struct *mm,
 {
 	pmd_t old_pmd;
 
+	/*
+	 * Non-present PMDs can be migration entries or device-private THP
+	 * entries. This can happen at 2 places:
+	 * - When the address space is being unmapped zap_huge_pmd(), and we
+	 *   encounter non-present pmds.
+	 * - migrate_vma_collect_huge_pmd() could calls this during migration
+	 *   of device-private pmd entries.
+	 */
+	if (!pmd_present(*pmdp)) {
+		old_pmd = READ_ONCE(*pmdp);
+		pmd_clear(pmdp);
+		goto out;
+	}
+
 	if (radix_enabled()) {
 		old_pmd = radix__pmdp_huge_get_and_clear(mm, addr, pmdp);
 	} else {
 		old_pmd = hash__pmdp_huge_get_and_clear(mm, addr, pmdp);
 	}
 
+out:
 	page_table_check_pmd_clear(mm, addr, old_pmd);
 
 	return old_pmd;
arch/powerpc/mm/book3s64/pgtable.c +9 -4
index 4b09c04654a8f..42c7906d0e436 100644
@@ -209,16 +209,21 @@ pmd_t pmdp_huge_get_and_clear_full(struct vm_area_struct *vma,
 				   unsigned long addr, pmd_t *pmdp, int full)
 {
 	pmd_t pmd;
+	bool was_present = pmd_present(*pmdp);
+
 	VM_BUG_ON(addr & ~HPAGE_PMD_MASK);
-	VM_BUG_ON((pmd_present(*pmdp) && !pmd_trans_huge(*pmdp)) ||
-		   !pmd_present(*pmdp));
+	VM_BUG_ON(was_present && !pmd_trans_huge(*pmdp));
+	/*
+	 * Check pmdp_huge_get_and_clear() for non-present pmd case.
+	 */
 	pmd = pmdp_huge_get_and_clear(vma->vm_mm, addr, pmdp);
 	/*
 	 * if it not a fullmm flush, then we can possibly end up converting
 	 * this PMD pte entry to a regular level 0 PTE by a parallel page fault.
-	 * Make sure we flush the tlb in this case.
+	 * Make sure we flush the tlb in this case. TLB flush not needed for
+	 * non-present case.
 	 */
-	if (!full)
+	if (was_present && !full)
 		flush_pmd_tlb_range(vma, addr, addr + HPAGE_PMD_SIZE);
 	return pmd;
 }
Signature · 1 line
2.53.0
author maintainer
#113 lore raw

PATCH 109/1146 wifi: mt76: mt7996: Fix NPU stop procedure

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Lorenzo Bianconi <[email protected]>

[ Upstream commit 7aed20bd9fe427b192cce80a164429584b298bbe ]

Move mt7996_npu_hw_stop routine before disabling rx NAPIs in order to fix NPU stop procedure used during device L1 SER recovery. Add missing usleep_range in mt7996_npu_hw_stop().

Fixes 377aa17d2aedc ("wifi: mt76: mt7996: Add NPU offload support to MT7996 driver")
---
 .../net/wireless/mediatek/mt76/mt7996/mac.c   |  3 +--
 .../net/wireless/mediatek/mt76/mt7996/npu.c   | 23 +++++++++++--------
 2 files changed, 15 insertions(+), 11 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7996/mac.c +1 -2
index ac7f2343076b1..7fa15b374ed49 100644
@@ -2543,6 +2543,7 @@ void mt7996_mac_reset_work(struct work_struct *work)
 	if (mtk_wed_device_active(&dev->mt76.mmio.wed))
 		mtk_wed_device_stop(&dev->mt76.mmio.wed);
 
+	mt7996_npu_hw_stop(dev);
 	ieee80211_stop_queues(mt76_hw(dev));
 
 	set_bit(MT76_RESET, &dev->mphy.state);
@@ -2569,8 +2570,6 @@ void mt7996_mac_reset_work(struct work_struct *work)
 
 	mutex_lock(&dev->mt76.mutex);
 
-	mt7996_npu_hw_stop(dev);
-
 	mt76_wr(dev, MT_MCU_INT_EVENT, MT_MCU_INT_EVENT_DMA_STOPPED);
 
 	if (mt7996_wait_reset_state(dev, MT_MCU_CMD_RESET_DONE)) {
drivers/net/wireless/mediatek/mt76/mt7996/npu.c +14 -9
index 29bb735da4cb8..067ef647e4040 100644
@@ -320,33 +320,38 @@ int mt7996_npu_hw_init(struct mt7996_dev *dev)
 int mt7996_npu_hw_stop(struct mt7996_dev *dev)
 {
 	struct airoha_npu *npu;
-	int i, err;
+	int i, err = 0;
 	u32 info;
 
+	mutex_lock(&dev->mt76.mutex);
+
 	npu = rcu_dereference_protected(dev->mt76.mmio.npu, &dev->mt76.mutex);
 	if (!npu)
-		return 0;
+		goto unlock;
 
 	err = mt76_npu_send_msg(npu, 4, WLAN_FUNC_SET_WAIT_INODE_TXRX_REG_ADDR,
 				0, GFP_KERNEL);
 	if (err)
-		return err;
+		goto unlock;
 
 	for (i = 0; i < 10; i++) {
 		err = mt76_npu_get_msg(npu, 3, WLAN_FUNC_GET_WAIT_NPU_INFO,
 				       &info, GFP_KERNEL);
-		if (err)
-			continue;
+		if (!err && !info)
+			break;
 
-		if (info) {
-			err = -ETIMEDOUT;
-			continue;
-		}
+		err = -ETIMEDOUT;
+		usleep_range(10000, 15000);
 	}
 
 	if (!err)
 		err = mt76_npu_send_msg(npu, 6,
 					WLAN_FUNC_SET_WAIT_INODE_TXRX_REG_ADDR,
 					0, GFP_KERNEL);
+	else
+		dev_err(dev->mt76.dev, "npu stop failed\n");
+unlock:
+	mutex_unlock(&dev->mt76.mutex);
+
 	return err;
 }
Signature · 1 line
2.53.0
author maintainer
#114 lore raw

PATCH 110/1146 wifi: mt76: npu: Add missing rx_token_size initialization

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Lorenzo Bianconi <[email protected]>

[ Upstream commit 25e3203a2192f2b0d697b2410126bad87e62d4f0 ]

Add missing rx_token_size initialization for NPU offloading.

Fixes 7fb554b1b623 ("wifi: mt76: Introduce the NPU generic layer")
---
 drivers/net/wireless/mediatek/mt76/npu.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/wireless/mediatek/mt76/npu.c +1 -0
index ec36975f6dc94..9679237f73984 100644
@@ -457,6 +457,7 @@ int mt76_npu_init(struct mt76_dev *dev, phys_addr_t phy_addr, int type)
 	dev->mmio.npu_type = type;
 	/* NPU offloading requires HW-RRO for RX packet reordering. */
 	dev->hwrro_mode = MT76_HWRRO_V3_1;
+	dev->rx_token_size = 32768;
 
 	rcu_assign_pointer(dev->mmio.npu, npu);
 	rcu_assign_pointer(dev->mmio.ppe_dev, ppe_dev);
Signature · 1 line
2.53.0
author maintainer
#115 lore raw

PATCH 111/1146 wifi: mt76: mt7925: drop puncturing handling from BSS change path

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Sean Wang <[email protected]>

[ Upstream commit 59a1864509d084a4b34117e693951c06b846b00a ]

IEEE80211_CHANCTX_CHANGE_PUNCTURING is a channel context change flag and should not be checked in the BSS change handler, where the changed mask represents enum ieee80211_bss_change.

Remove the puncturing handling from the BSS path and rely on mt7925_change_chanctx() to update puncturing configuration.

Fixes cadebdad959b ("wifi: mt76: mt7925: add EHT preamble puncturing")
---
 drivers/net/wireless/mediatek/mt76/mt7925/main.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7925/main.c +0 -6
index d99a60ae063e8..3d622c066ac76 100644
@@ -1894,10 +1894,8 @@ static void mt7925_link_info_changed(struct ieee80211_hw *hw,
 	struct mt792x_phy *phy = mt792x_hw_phy(hw);
 	struct mt792x_dev *dev = mt792x_hw_dev(hw);
 	struct mt792x_bss_conf *mconf;
-	struct ieee80211_bss_conf *link_conf;
 
 	mconf = mt792x_vif_to_link(mvif, info->link_id);
-	link_conf = mt792x_vif_to_bss_conf(vif, mconf->link_id);
 
 	mt792x_mutex_acquire(dev);
 
@@ -1939,10 +1937,6 @@ static void mt7925_link_info_changed(struct ieee80211_hw *hw,
 		mvif->mlo_pm_state = MT792x_MLO_CHANGED_PS;
 	}
 
-	if (changed & IEEE80211_CHANCTX_CHANGE_PUNCTURING)
-		mt7925_mcu_set_eht_pp(mvif->phy->mt76, &mconf->mt76,
-				      link_conf, NULL);
-
 	if (changed & BSS_CHANGED_CQM)
 		mt7925_mcu_set_rssimonitor(dev, vif);
 
Signature · 1 line
2.53.0
author maintainer
#116 lore raw

PATCH 112/1146 wifi: mt76: mt7925: fix potential deadlock in mt7925_roc_abort_sync

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Sean Wang <[email protected]>

[ Upstream commit dd08ca3f092f4185ece69ce2a835c23198b1628a ]

roc_abort_sync() can deadlock with roc_work(). roc_work() holds dev->mt76.mutex, while cancel_work_sync() waits for roc_work() to finish. If the caller already owns the same mutex, both sides block and no progress is possible.

This deadlock can occur during station removal when mt76_sta_state() -> mt76_sta_remove() -> mt7925_mac_sta_remove_link() -> mt7925_mac_link_sta_remove() -> mt7925_roc_abort_sync() invokes cancel_work_sync() while roc_work() is still running and holding dev->mt76.mutex.

This avoids the mutex deadlock and preserves exactly-once work ownership.

Fixes 45064d19fd3a ("wifi: mt76: mt7925: fix a potential association failure upon resuming")
---
 drivers/net/wireless/mediatek/mt76/mt7925/main.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7925/main.c +9 -5
index 3d622c066ac76..fec54d5f4eaf1 100644
@@ -457,12 +457,16 @@ void mt7925_roc_abort_sync(struct mt792x_dev *dev)
 {
 	struct mt792x_phy *phy = &dev->phy;
 
+	if (!test_and_clear_bit(MT76_STATE_ROC, &phy->mt76->state))
+		return;
+
 	timer_delete_sync(&phy->roc_timer);
-	cancel_work_sync(&phy->roc_work);
-	if (test_and_clear_bit(MT76_STATE_ROC, &phy->mt76->state))
-		ieee80211_iterate_interfaces(mt76_hw(dev),
-					     IEEE80211_IFACE_ITER_RESUME_ALL,
-					     mt7925_roc_iter, (void *)phy);
+
+	cancel_work(&phy->roc_work);
+
+	ieee80211_iterate_interfaces(mt76_hw(dev),
+				     IEEE80211_IFACE_ITER_RESUME_ALL,
+				     mt7925_roc_iter, (void *)phy);
 }
 EXPORT_SYMBOL_GPL(mt7925_roc_abort_sync);
 
Signature · 1 line
2.53.0
author maintainer
#117 lore raw

PATCH 113/1146 wifi: mt76: Fix memory leak after mt76_connac_mcu_alloc_sta_req()

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Zilin Guan <[email protected]>

[ Upstream commit c41075ce8cf05ed8c0e7b7efef000dce548ffc42 ]

mt76_connac_mcu_alloc_sta_req() allocates an skb which is expected to be freed eventually by mt76_mcu_skb_send_msg(). However, currently if an intermediate function fails before sending, the allocated skb is leaked.

Specifically, mt76_connac_mcu_sta_wed_update() and mt76_connac_mcu_sta_key_tlv() may fail, leading to an immediate memory leak in the error path.

Fix this by explicitly freeing the skb in these error paths. Commit 7c0f63fe37a5 ("wifi: mt76: mt7996: fix memory leak on mt7996_mcu_sta_key_tlv error") made a similar change.

Compile tested only. Issue found using a prototype static analysis tool and code review.

Fixes d1369e515efe ("wifi: mt76: connac: introduce mt76_connac_mcu_sta_wed_update utility routine")
Fixes 6683d988089c ("mt76: connac: move mt76_connac_mcu_add_key in connac module")
Fixes 4f831d18d12d ("wifi: mt76: mt7915: enable WED RX support")
Fixes c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips")
---
 .../net/wireless/mediatek/mt76/mt76_connac_mcu.c | 16 ++++++++++++----
 drivers/net/wireless/mediatek/mt76/mt7915/mcu.c  |  4 +++-
 drivers/net/wireless/mediatek/mt76/mt7925/mcu.c  |  4 +++-
 3 files changed, 18 insertions(+), 6 deletions(-)
drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c +12 -4
index 0457712286d55..3f583e2a1dc12 100644
@@ -1295,8 +1295,10 @@ int mt76_connac_mcu_sta_ba(struct mt76_dev *dev, struct mt76_vif_link *mvif,
 				    wtbl_hdr);
 
 	ret = mt76_connac_mcu_sta_wed_update(dev, skb);
-	if (ret)
+	if (ret) {
+		dev_kfree_skb(skb);
 		return ret;
+	}
 
 	ret = mt76_mcu_skb_send_msg(dev, skb, cmd, true);
 	if (ret)
@@ -1309,8 +1311,10 @@ int mt76_connac_mcu_sta_ba(struct mt76_dev *dev, struct mt76_vif_link *mvif,
 	mt76_connac_mcu_sta_ba_tlv(skb, params, enable, tx);
 
 	ret = mt76_connac_mcu_sta_wed_update(dev, skb);
-	if (ret)
+	if (ret) {
+		dev_kfree_skb(skb);
 		return ret;
+	}
 
 	return mt76_mcu_skb_send_msg(dev, skb, cmd, true);
 }
@@ -2764,12 +2768,16 @@ int mt76_connac_mcu_add_key(struct mt76_dev *dev, struct ieee80211_vif *vif,
 		return PTR_ERR(skb);
 
 	ret = mt76_connac_mcu_sta_key_tlv(sta_key_conf, skb, key, cmd);
-	if (ret)
+	if (ret) {
+		dev_kfree_skb(skb);
 		return ret;
+	}
 
 	ret = mt76_connac_mcu_sta_wed_update(dev, skb);
-	if (ret)
+	if (ret) {
+		dev_kfree_skb(skb);
 		return ret;
+	}
 
 	return mt76_mcu_skb_send_msg(dev, skb, mcu_cmd, true);
 }
drivers/net/wireless/mediatek/mt76/mt7915/mcu.c +3 -1
index 95b8f34a7b1df..023c92dac0648 100644
@@ -1765,8 +1765,10 @@ int mt7915_mcu_add_sta(struct mt7915_dev *dev, struct ieee80211_vif *vif,
 	}
 out:
 	ret = mt76_connac_mcu_sta_wed_update(&dev->mt76, skb);
-	if (ret)
+	if (ret) {
+		dev_kfree_skb(skb);
 		return ret;
+	}
 
 	return mt76_mcu_skb_send_msg(&dev->mt76, skb,
 				     MCU_EXT_CMD(STA_REC_UPDATE), true);
drivers/net/wireless/mediatek/mt76/mt7925/mcu.c +3 -1
index dec8e2de86b69..abcdd0e0b3b5a 100644
@@ -1288,8 +1288,10 @@ int mt7925_mcu_add_key(struct mt76_dev *dev, struct ieee80211_vif *vif,
 		return PTR_ERR(skb);
 
 	ret = mt7925_mcu_sta_key_tlv(wcid, sta_key_conf, skb, key, cmd, msta);
-	if (ret)
+	if (ret) {
+		dev_kfree_skb(skb);
 		return ret;
+	}
 
 	return mt76_mcu_skb_send_msg(dev, skb, mcu_cmd, true);
 }
Signature · 1 line
2.53.0
author maintainer
#118 lore raw

PATCH 114/1146 wifi: mt76: mt7925: fix tx power setting failure after chip reset

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Leon Yen <[email protected]>

[ Upstream commit aae89dc4a1608da9060bada757f650ac94b7f184 ]

After the chip reset, the procedure to set the tx power will not be successful because the previous region setting is still remains. Clear the region setting during MAC initialization and allow it to be reset to finalize the TX power setting.

Fixes 3bc62aa4484d ("wifi: mt76: mt7925: add auto regdomain switch support")
---
 drivers/net/wireless/mediatek/mt76/mt7925/init.c | 2 ++
 drivers/net/wireless/mediatek/mt76/mt7925/regd.c | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt7925/init.c +2 -0
index 3ce5d6fcc69df..c0c5cb9aff75a 100644
@@ -91,6 +91,8 @@ int mt7925_mac_init(struct mt792x_dev *dev)
 
 	mt7925_mac_init_basic_rates(dev);
 
+	memzero_explicit(&dev->mt76.alpha2, sizeof(dev->mt76.alpha2));
+
 	return 0;
 }
 EXPORT_SYMBOL_GPL(mt7925_mac_init);
drivers/net/wireless/mediatek/mt76/mt7925/regd.c +2 -1
index 292087e882d1f..16f56ee879d45 100644
@@ -232,7 +232,8 @@ int mt7925_regd_change(struct mt792x_phy *phy, char *alpha2)
 	    dev->regd_user)
 		return -EINVAL;
 
-	if (mdev->alpha2[0] != '0' && mdev->alpha2[1] != '0')
+	if ((mdev->alpha2[0] && mdev->alpha2[0] != '0') &&
+	    (mdev->alpha2[1] && mdev->alpha2[1] != '0'))
 		return 0;
 
 	/* do not need to update the same country twice */
Signature · 1 line
2.53.0
author maintainer
#119 lore raw

PATCH 115/1146 wifi: mt76: mt7921: fix potential deadlock in mt7921_roc_abort_sync

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Sean Wang <[email protected]>

[ Upstream commit d5059e52fd8bc624ec4255c9fa01a266513d126b ]

roc_abort_sync() can deadlock with roc_work(). roc_work() holds dev->mt76.mutex, while cancel_work_sync() waits for roc_work() to finish. If the caller already owns the same mutex, both sides block and no progress is possible.

This deadlock can occur during station removal when mt76_sta_state() -> mt76_sta_remove() -> mt7921_mac_sta_remove() -> mt7921_roc_abort_sync() invokes cancel_work_sync() while roc_work() is still running and holding dev->mt76.mutex.

This avoids the mutex deadlock and preserves exactly-once work ownership.

Fixes 352d966126e6 ("wifi: mt76: mt7921: fix a potential association failure upon resuming")
---
 drivers/net/wireless/mediatek/mt76/mt7921/main.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7921/main.c +8 -5
index f42e40f9663d8..42b9514e04e71 100644
@@ -371,12 +371,15 @@ void mt7921_roc_abort_sync(struct mt792x_dev *dev)
 {
 	struct mt792x_phy *phy = &dev->phy;
 
+	if (!test_and_clear_bit(MT76_STATE_ROC, &phy->mt76->state))
+		return;
+
 	timer_delete_sync(&phy->roc_timer);
-	cancel_work_sync(&phy->roc_work);
-	if (test_and_clear_bit(MT76_STATE_ROC, &phy->mt76->state))
-		ieee80211_iterate_interfaces(mt76_hw(dev),
-					     IEEE80211_IFACE_ITER_RESUME_ALL,
-					     mt7921_roc_iter, (void *)phy);
+	cancel_work(&phy->roc_work);
+
+	ieee80211_iterate_interfaces(mt76_hw(dev),
+				     IEEE80211_IFACE_ITER_RESUME_ALL,
+				     mt7921_roc_iter, (void *)phy);
 }
 EXPORT_SYMBOL_GPL(mt7921_roc_abort_sync);
 
Signature · 1 line
2.53.0
author maintainer
#120 lore raw

PATCH 116/1146 wifi: mt76: fix deadlock in remain-on-channel

In reply to Greg Kroah-Hartman

7.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Chad Monroe <[email protected]>

[ Upstream commit 6939b97ddad3cf3dfbb3b5a0a12ef79cb886747e ]

mt76_remain_on_channel() and mt76_roc_complete() call mt76_set_channel() while already holding dev->mutex. Since mt76_set_channel() also acquires dev->mutex, this results in a deadlock.

Use __mt76_set_channel() instead of mt76_set_channel().
Add cancel_delayed_work_sync() for mac_work before acquiring the mutex in mt76_remain_on_channel() to prevent a secondary deadlock with the mac_work workqueue.

---
 drivers/net/wireless/mediatek/mt76/channel.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
drivers/net/wireless/mediatek/mt76/channel.c +11 -2
index 2b705bdb7993c..d9f8529db7ed4 100644
@@ -326,7 +326,7 @@ void mt76_roc_complete(struct mt76_phy *phy)
 		mlink->mvif->roc_phy = NULL;
 	if (phy->main_chandef.chan &&
 	    !test_bit(MT76_MCU_RESET, &dev->phy.state))
-		mt76_set_channel(phy, &phy->main_chandef, false);
+		__mt76_set_channel(phy, &phy->main_chandef, false);
 	mt76_put_vif_phy_link(phy, phy->roc_vif, phy->roc_link);
 	phy->roc_vif = NULL;
 	phy->roc_link = NULL;
@@ -370,6 +370,8 @@ int mt76_remain_on_channel(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
 	if (!phy)
 		return -EINVAL;
 
+	cancel_delayed_work_sync(&phy->mac_work);
+
 	mutex_lock(&dev->mutex);
 
 	if (phy->roc_vif || dev->scan.phy == phy ||
@@ -388,7 +390,14 @@ int mt76_remain_on_channel(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
 	phy->roc_vif = vif;
 	phy->roc_link = mlink;
 	cfg80211_chandef_create(&chandef, chan, NL80211_CHAN_HT20);
-	mt76_set_channel(phy, &chandef, true);
+	ret = __mt76_set_channel(phy, &chandef, true);
+	if (ret) {
+		mlink->mvif->roc_phy = NULL;
+		phy->roc_vif = NULL;
+		phy->roc_link = NULL;
+		mt76_put_vif_phy_link(phy, vif, mlink);
+		goto out;
+	}
 	ieee80211_ready_on_channel(hw);
 	ieee80211_queue_delayed_work(phy->hw, &phy->roc_work,
 				     msecs_to_jiffies(duration));
Signature · 1 line
2.53.0