Skip to contentSkip to conversation

6.18.2-rc1 review

PATCH In review Greg Kroah-Hartman 21 participants 649 messages Dec 16, 2025 – Sep 17 Page 5 of 5

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

PATCH 520/614 net: hsr: create an API to get hsr port type

In reply to Greg Kroah-Hartman

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

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

From: Xiaoliang Yang <[email protected]>

[ Upstream commit a0244e76213980f3b9bb5d40b0b6705fcf24230d ]

Since the introduction of HSR_PT_INTERLINK in commit 5055cccfc2d1 ("net:
hsr: Provide RedBox support (HSR-SAN)"), we see that different port types require different settings for hardware offload, which was not the case before when we only had HSR_PT_SLAVE_A and HSR_PT_SLAVE_B. But there is currently no way to know which port is which type, so create the hsr_get_port_type() API function and export it.

When hsr_get_port_type() is called from the device driver, the port can must be found in the HSR port list. An important use case is for this function to work from offloading drivers' NETDEV_CHANGEUPPER handler, which is triggered by hsr_portdev_setup() -> netdev_master_upper_dev_link(). Therefore, we need to move the addition of the hsr_port to the HSR port list prior to calling hsr_portdev_setup(). This makes the error restoration path also more similar to hsr_del_port(), where kfree_rcu(port) is already used.

Stable-dep-of: 30296ac76426 ("net: dsa: xrs700x: reject unsupported HSR configurations")

---
 include/linux/if_hsr.h |  9 +++++++++
 net/hsr/hsr_device.c   | 20 ++++++++++++++++++++
 net/hsr/hsr_slave.c    |  7 ++++---
 3 files changed, 33 insertions(+), 3 deletions(-)
include/linux/if_hsr.h +9 -0
index d7941fd880329..f4cf2dd36d193 100644
@@ -43,6 +43,8 @@ extern bool is_hsr_master(struct net_device *dev);
 extern int hsr_get_version(struct net_device *dev, enum hsr_version *ver);
 struct net_device *hsr_get_port_ndev(struct net_device *ndev,
 				     enum hsr_port_type pt);
+int hsr_get_port_type(struct net_device *hsr_dev, struct net_device *dev,
+		      enum hsr_port_type *type);
 #else
 static inline bool is_hsr_master(struct net_device *dev)
 {
@@ -59,6 +61,13 @@ static inline struct net_device *hsr_get_port_ndev(struct net_device *ndev,
 {
 	return ERR_PTR(-EINVAL);
 }
+
+static inline int hsr_get_port_type(struct net_device *hsr_dev,
+				    struct net_device *dev,
+				    enum hsr_port_type *type)
+{
+	return -EINVAL;
+}
 #endif /* CONFIG_HSR */
 
 #endif /*_LINUX_IF_HSR_H_*/
net/hsr/hsr_device.c +20 -0
index 492cbc78ab75a..d1bfc49b5f017 100644
@@ -690,6 +690,26 @@ struct net_device *hsr_get_port_ndev(struct net_device *ndev,
 }
 EXPORT_SYMBOL(hsr_get_port_ndev);
 
+int hsr_get_port_type(struct net_device *hsr_dev, struct net_device *dev,
+		      enum hsr_port_type *type)
+{
+	struct hsr_priv *hsr = netdev_priv(hsr_dev);
+	struct hsr_port *port;
+
+	rcu_read_lock();
+	hsr_for_each_port(hsr, port) {
+		if (port->dev == dev) {
+			*type = port->type;
+			rcu_read_unlock();
+			return 0;
+		}
+	}
+	rcu_read_unlock();
+
+	return -EINVAL;
+}
+EXPORT_SYMBOL(hsr_get_port_type);
+
 /* Default multicast address for HSR Supervision frames */
 static const unsigned char def_multicast_addr[ETH_ALEN] __aligned(2) = {
 	0x01, 0x15, 0x4e, 0x00, 0x01, 0x00
net/hsr/hsr_slave.c +4 -3
index 8177ac6c2d26d..afe06ba00ea44 100644
@@ -207,14 +207,14 @@ int hsr_add_port(struct hsr_priv *hsr, struct net_device *dev,
 	port->type = type;
 	ether_addr_copy(port->original_macaddress, dev->dev_addr);
 
+	list_add_tail_rcu(&port->port_list, &hsr->ports);
+
 	if (type != HSR_PT_MASTER) {
 		res = hsr_portdev_setup(hsr, dev, port, extack);
 		if (res)
 			goto fail_dev_setup;
 	}
 
-	list_add_tail_rcu(&port->port_list, &hsr->ports);
-
 	master = hsr_port_get_hsr(hsr, HSR_PT_MASTER);
 	netdev_update_features(master->dev);
 	dev_set_mtu(master->dev, hsr_get_max_mtu(hsr));
@@ -222,7 +222,8 @@ int hsr_add_port(struct hsr_priv *hsr, struct net_device *dev,
 	return 0;
 
 fail_dev_setup:
-	kfree(port);
+	list_del_rcu(&port->port_list);
+	kfree_rcu(port, rcu);
 	return res;
 }
 
Signature · 1 line
2.51.0
author maintainer
#532 lore raw

PATCH 521/614 net: dsa: xrs700x: reject unsupported HSR configurations

In reply to Greg Kroah-Hartman

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

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

From: Vladimir Oltean <[email protected]>

[ Upstream commit 30296ac7642652428396222e720718f2661e9425 ]

As discussed here:
https://lore.kernel.org/netdev/20240620090210.drop6jwh7e5qw556@skbuf/

the fact is that the xrs700x.c driver only supports offloading HSR_PT_SLAVE_A and HSR_PT_SLAVE_B (which were the only port types at the time the offload was written, _for this driver_).

Up until now, the API did not explicitly tell offloading drivers what port has what role. So xrs700x can get confused and think that it can support a configuration which it actually can't. There was a table in the attached link which gave an example:

$ ip link add name hsr0 type hsr slave1 swp0 slave2 swp1 \
	interlink swp2 supervision 45 version 1

HSR_PT_SLAVE_A HSR_PT_SLAVE_B HSR_PT_INTERLINK
----------------------------------------------------------------
user
space 0 1 2
requests
----------------------------------------------------------------
XRS700X
driver 1 2 -
understands

The switch would act as if the ring ports were swp1 and swp2.

Now that we have explicit hsr_get_port_type() API, let's use that to work around the unintended semantical changes of the offloading API brought by the introduction of interlink ports in HSR.

Fixes 5055cccfc2d1 ("net: hsr: Provide RedBox support (HSR-SAN)")
Cc Lukasz Majewski <[email protected]>
---
 drivers/net/dsa/xrs700x/xrs700x.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
drivers/net/dsa/xrs700x/xrs700x.c +11 -0
index 4dbcc49a9e526..0a05f4156ef4d 100644
@@ -566,6 +566,7 @@ static int xrs700x_hsr_join(struct dsa_switch *ds, int port,
 	struct xrs700x *priv = ds->priv;
 	struct net_device *user;
 	int ret, i, hsr_pair[2];
+	enum hsr_port_type type;
 	enum hsr_version ver;
 	bool fwd = false;
 
@@ -589,6 +590,16 @@ static int xrs700x_hsr_join(struct dsa_switch *ds, int port,
 		return -EOPNOTSUPP;
 	}
 
+	ret = hsr_get_port_type(hsr, dsa_to_port(ds, port)->user, &type);
+	if (ret)
+		return ret;
+
+	if (type != HSR_PT_SLAVE_A && type != HSR_PT_SLAVE_B) {
+		NL_SET_ERR_MSG_MOD(extack,
+				   "Only HSR slave ports can be offloaded");
+		return -EOPNOTSUPP;
+	}
+
 	dsa_hsr_foreach_port(dp, ds, hsr) {
 		if (dp->index != port) {
 			partner = dp;
Signature · 1 line
2.51.0
author maintainer
#533 lore raw

PATCH 522/614 net/sched: sch_cake: Fix incorrect qlen reduction in cake_drop

In reply to Greg Kroah-Hartman

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

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

From: Xiang Mei <[email protected]>

[ Upstream commit 9fefc78f7f02d71810776fdeb119a05a946a27cc ]

In cake_drop(), qdisc_tree_reduce_backlog() is used to update the qlen and backlog of the qdisc hierarchy. Its caller, cake_enqueue(), assumes that the parent qdisc will enqueue the current packet. However, this assumption breaks when cake_enqueue() returns NET_XMIT_CN: the parent qdisc stops enqueuing current packet, leaving the tree qlen/backlog accounting inconsistent. This mismatch can lead to a NULL dereference (e.g., when the parent Qdisc is qfq_qdisc).

This patch computes the qlen/backlog delta in a more robust way by observing the difference before and after the series of cake_drop() calls, and then compensates the qdisc tree accounting if cake_enqueue() returns NET_XMIT_CN.

To ensure correct compensation when ACK thinning is enabled, a new variable is introduced to keep qlen unchanged.

Fixes 15de71d06a40 ("net/sched: Make cake_enqueue return NET_XMIT_CN when past buffer_limit")
---
 net/sched/sch_cake.c | 58 ++++++++++++++++++++++++--------------------
 1 file changed, 32 insertions(+), 26 deletions(-)
net/sched/sch_cake.c +32 -26
index 32bacfc314c26..d325a90cde9ee 100644
@@ -1597,7 +1597,6 @@ static unsigned int cake_drop(struct Qdisc *sch, struct sk_buff **to_free)
 
 	qdisc_drop_reason(skb, sch, to_free, SKB_DROP_REASON_QDISC_OVERLIMIT);
 	sch->q.qlen--;
-	qdisc_tree_reduce_backlog(sch, 1, len);
 
 	cake_heapify(q, 0);
 
@@ -1743,14 +1742,14 @@ static void cake_reconfigure(struct Qdisc *sch);
 static s32 cake_enqueue(struct sk_buff *skb, struct Qdisc *sch,
 			struct sk_buff **to_free)
 {
+	u32 idx, tin, prev_qlen, prev_backlog, drop_id;
 	struct cake_sched_data *q = qdisc_priv(sch);
-	int len = qdisc_pkt_len(skb);
-	int ret;
+	int len = qdisc_pkt_len(skb), ret;
 	struct sk_buff *ack = NULL;
 	ktime_t now = ktime_get();
 	struct cake_tin_data *b;
 	struct cake_flow *flow;
-	u32 idx, tin;
+	bool same_flow = false;
 
 	/* choose flow to insert into */
 	idx = cake_classify(sch, &b, skb, q->flow_mode, &ret);
@@ -1823,6 +1822,8 @@ static s32 cake_enqueue(struct sk_buff *skb, struct Qdisc *sch,
 		consume_skb(skb);
 	} else {
 		/* not splitting */
+		int ack_pkt_len = 0;
+
 		cobalt_set_enqueue_time(skb, now);
 		get_cobalt_cb(skb)->adjusted_len = cake_overhead(q, skb);
 		flow_queue_add(flow, skb);
@@ -1833,13 +1834,13 @@ static s32 cake_enqueue(struct sk_buff *skb, struct Qdisc *sch,
 		if (ack) {
 			b->ack_drops++;
 			sch->qstats.drops++;
-			b->bytes += qdisc_pkt_len(ack);
-			len -= qdisc_pkt_len(ack);
+			ack_pkt_len = qdisc_pkt_len(ack);
+			b->bytes += ack_pkt_len;
 			q->buffer_used += skb->truesize - ack->truesize;
 			if (q->rate_flags & CAKE_FLAG_INGRESS)
 				cake_advance_shaper(q, b, ack, now, true);
 
-			qdisc_tree_reduce_backlog(sch, 1, qdisc_pkt_len(ack));
+			qdisc_tree_reduce_backlog(sch, 1, ack_pkt_len);
 			consume_skb(ack);
 		} else {
 			sch->q.qlen++;
@@ -1848,11 +1849,11 @@ static s32 cake_enqueue(struct sk_buff *skb, struct Qdisc *sch,
 
 		/* stats */
 		b->packets++;
-		b->bytes	    += len;
-		b->backlogs[idx]    += len;
-		b->tin_backlog      += len;
-		sch->qstats.backlog += len;
-		q->avg_window_bytes += len;
+		b->bytes	    += len - ack_pkt_len;
+		b->backlogs[idx]    += len - ack_pkt_len;
+		b->tin_backlog      += len - ack_pkt_len;
+		sch->qstats.backlog += len - ack_pkt_len;
+		q->avg_window_bytes += len - ack_pkt_len;
 	}
 
 	if (q->overflow_timeout)
@@ -1927,24 +1928,29 @@ static s32 cake_enqueue(struct sk_buff *skb, struct Qdisc *sch,
 	if (q->buffer_used > q->buffer_max_used)
 		q->buffer_max_used = q->buffer_used;
 
-	if (q->buffer_used > q->buffer_limit) {
-		bool same_flow = false;
-		u32 dropped = 0;
-		u32 drop_id;
+	if (q->buffer_used <= q->buffer_limit)
+		return NET_XMIT_SUCCESS;
 
-		while (q->buffer_used > q->buffer_limit) {
-			dropped++;
-			drop_id = cake_drop(sch, to_free);
+	prev_qlen = sch->q.qlen;
+	prev_backlog = sch->qstats.backlog;
 
-			if ((drop_id >> 16) == tin &&
-			    (drop_id & 0xFFFF) == idx)
-				same_flow = true;
-		}
-		b->drop_overlimit += dropped;
+	while (q->buffer_used > q->buffer_limit) {
+		drop_id = cake_drop(sch, to_free);
+		if ((drop_id >> 16) == tin &&
+		    (drop_id & 0xFFFF) == idx)
+			same_flow = true;
+	}
+
+	prev_qlen -= sch->q.qlen;
+	prev_backlog -= sch->qstats.backlog;
+	b->drop_overlimit += prev_qlen;
 
-		if (same_flow)
-			return NET_XMIT_CN;
+	if (same_flow) {
+		qdisc_tree_reduce_backlog(sch, prev_qlen - 1,
+					  prev_backlog - len);
+		return NET_XMIT_CN;
 	}
+	qdisc_tree_reduce_backlog(sch, prev_qlen, prev_backlog);
 	return NET_XMIT_SUCCESS;
 }
 
Signature · 1 line
2.51.0
author maintainer
#534 lore raw

PATCH 523/614 perf jitdump: Add sym/str-tables to build-ID generation

In reply to Greg Kroah-Hartman

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

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

From: Namhyung Kim <[email protected]>

[ Upstream commit 25d498e636d1f8d138d65246cfb5b1fc3069ca56 ]

It was reported that python backtrace with JIT dump was broken after the change to built-in SHA-1 implementation. It seems python generates the same JIT code for each function. They will become separate DSOs but the contents are the same. Only difference is in the symbol name.

But this caused a problem that every JIT'ed DSOs will have the same build-ID which makes perf confused. And it resulted in no python symbols (from JIT) in the output.

Looking back at the original code before the conversion, it used the load_addr as well as the code section to distinguish each DSO. But it'd be better to use contents of symtab and strtab instead as it aligns with some linker behaviors.

This patch adds a buffer to save all the contents in a single place for SHA-1 calculation. Probably we need to add sha1_update() or similar to update the existing hash value with different contents and use it here. But it's out of scope for this change and I'd like something that can be backported to the stable trees easily.

Cc Eric Biggers <[email protected]>
Cc Pablo Galindo <[email protected]>
Cc Fangrui Song <[email protected]>
Fixes e3f612c1d8f3945b ("perf genelf: Remove libcrypto dependency and use built-in sha1()")
---
 tools/perf/util/genelf.c | 32 ++++++++++++++++++++++++++++++--
 1 file changed, 30 insertions(+), 2 deletions(-)
tools/perf/util/genelf.c +30 -2
index 591548b10e34e..a1cd5196f4ec8 100644
@@ -173,6 +173,8 @@ jit_write_elf(int fd, uint64_t load_addr __maybe_unused, const char *sym,
 	Elf_Shdr *shdr;
 	uint64_t eh_frame_base_offset;
 	char *strsym = NULL;
+	void *build_id_data = NULL, *tmp;
+	int build_id_data_len;
 	int symlen;
 	int retval = -1;
 
@@ -251,6 +253,14 @@ jit_write_elf(int fd, uint64_t load_addr __maybe_unused, const char *sym,
 	shdr->sh_flags = SHF_EXECINSTR | SHF_ALLOC;
 	shdr->sh_entsize = 0;
 
+	build_id_data = malloc(csize);
+	if (build_id_data == NULL) {
+		warnx("cannot allocate build-id data");
+		goto error;
+	}
+	memcpy(build_id_data, code, csize);
+	build_id_data_len = csize;
+
 	/*
 	 * Setup .eh_frame_hdr and .eh_frame
 	 */
@@ -334,6 +344,15 @@ jit_write_elf(int fd, uint64_t load_addr __maybe_unused, const char *sym,
 	shdr->sh_entsize = sizeof(Elf_Sym);
 	shdr->sh_link = unwinding ? 6 : 4; /* index of .strtab section */
 
+	tmp = realloc(build_id_data, build_id_data_len + sizeof(symtab));
+	if (tmp == NULL) {
+		warnx("cannot allocate build-id data");
+		goto error;
+	}
+	memcpy(tmp + build_id_data_len, symtab, sizeof(symtab));
+	build_id_data = tmp;
+	build_id_data_len += sizeof(symtab);
+
 	/*
 	 * setup symbols string table
 	 * 2 = 1 for 0 in 1st entry, 1 for the 0 at end of symbol for 2nd entry
@@ -376,6 +395,15 @@ jit_write_elf(int fd, uint64_t load_addr __maybe_unused, const char *sym,
 	shdr->sh_flags = 0;
 	shdr->sh_entsize = 0;
 
+	tmp = realloc(build_id_data, build_id_data_len + symlen);
+	if (tmp == NULL) {
+		warnx("cannot allocate build-id data");
+		goto error;
+	}
+	memcpy(tmp + build_id_data_len, strsym, symlen);
+	build_id_data = tmp;
+	build_id_data_len += symlen;
+
 	/*
 	 * setup build-id section
 	 */
@@ -394,7 +422,7 @@ jit_write_elf(int fd, uint64_t load_addr __maybe_unused, const char *sym,
 	/*
 	 * build-id generation
 	 */
-	sha1(code, csize, bnote.build_id);
+	sha1(build_id_data, build_id_data_len, bnote.build_id);
 	bnote.desc.namesz = sizeof(bnote.name); /* must include 0 termination */
 	bnote.desc.descsz = sizeof(bnote.build_id);
 	bnote.desc.type   = NT_GNU_BUILD_ID;
@@ -439,7 +467,7 @@ jit_write_elf(int fd, uint64_t load_addr __maybe_unused, const char *sym,
 	(void)elf_end(e);
 
 	free(strsym);
-
+	free(build_id_data);
 
 	return retval;
 }
Signature · 1 line
2.51.0
author maintainer
#535 lore raw

PATCH 524/614 exfat: fix refcount leak in exfat_find

In reply to Greg Kroah-Hartman

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

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

From: Shuhao Fu <[email protected]>

[ Upstream commit 9aee8de970f18c2aaaa348e3de86c38e2d956c1d ]

Fix refcount leaks in exfat_find related to exfat_get_dentry_set.

Function exfat_get_dentry_set would increase the reference counter of es->bh on success. Therefore, exfat_put_dentry_set must be called after exfat_get_dentry_set to ensure refcount consistency. This patch relocate two checks to avoid possible leaks.

Fixes 82ebecdc74ff ("exfat: fix improper check of dentry.stream.valid_size")
Fixes 13940cef9549 ("exfat: add a check for invalid data size")
---
 fs/exfat/namei.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
fs/exfat/namei.c +10 -10
index 745dce29ddb53..dfe957493d49e 100644
@@ -645,16 +645,6 @@ static int exfat_find(struct inode *dir, const struct qstr *qname,
 	info->valid_size = le64_to_cpu(ep2->dentry.stream.valid_size);
 	info->size = le64_to_cpu(ep2->dentry.stream.size);
 
-	if (info->valid_size < 0) {
-		exfat_fs_error(sb, "data valid size is invalid(%lld)", info->valid_size);
-		return -EIO;
-	}
-
-	if (unlikely(EXFAT_B_TO_CLU_ROUND_UP(info->size, sbi) > sbi->used_clusters)) {
-		exfat_fs_error(sb, "data size is invalid(%lld)", info->size);
-		return -EIO;
-	}
-
 	info->start_clu = le32_to_cpu(ep2->dentry.stream.start_clu);
 	if (!is_valid_cluster(sbi, info->start_clu) && info->size) {
 		exfat_warn(sb, "start_clu is invalid cluster(0x%x)",
@@ -692,6 +682,16 @@ static int exfat_find(struct inode *dir, const struct qstr *qname,
 			     0);
 	exfat_put_dentry_set(&es, false);
 
+	if (info->valid_size < 0) {
+		exfat_fs_error(sb, "data valid size is invalid(%lld)", info->valid_size);
+		return -EIO;
+	}
+
+	if (unlikely(EXFAT_B_TO_CLU_ROUND_UP(info->size, sbi) > sbi->used_clusters)) {
+		exfat_fs_error(sb, "data size is invalid(%lld)", info->size);
+		return -EIO;
+	}
+
 	if (ei->start_clu == EXFAT_FREE_CLUSTER) {
 		exfat_fs_error(sb,
 			       "non-zero size file starts with zero cluster (size : %llu, p_dir : %u, entry : 0x%08x)",
Signature · 1 line
2.51.0
author maintainer
#536 lore raw

PATCH 525/614 exfat: fix divide-by-zero in exfat_allocate_bitmap

In reply to Greg Kroah-Hartman

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

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

From: Namjae Jeon <[email protected]>

[ Upstream commit d70a5804c563b5e34825353ba9927509df709651 ]

The variable max_ra_count can be 0 in exfat_allocate_bitmap(), which causes a divide-by-zero error in the subsequent modulo operation (i % max_ra_count), leading to a system crash.
When max_ra_count is 0, it means that readahead is not used. This patch load the bitmap without readahead.

Fixes 9fd688678dd8 ("exfat: optimize allocation bitmap loading time")
---
 fs/exfat/balloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/exfat/balloc.c +1 -1
index 2d2d510f2372c..0b6466b3490a0 100644
@@ -106,7 +106,7 @@ static int exfat_allocate_bitmap(struct super_block *sb,
 		(PAGE_SHIFT - sb->s_blocksize_bits);
 	for (i = 0; i < sbi->map_sectors; i++) {
 		/* Trigger the next readahead in advance. */
-		if (0 == (i % max_ra_count)) {
+		if (max_ra_count && 0 == (i % max_ra_count)) {
 			blk_start_plug(&plug);
 			for (j = i; j < min(max_ra_count, sbi->map_sectors - i) + i; j++)
 				sb_breadahead(sb, sector + j);
Signature · 1 line
2.51.0
author maintainer
#537 lore raw

PATCH 526/614 perf tools: Mark split kallsyms DSOs as loaded

In reply to Greg Kroah-Hartman

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

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

From: Namhyung Kim <[email protected]>

[ Upstream commit 7da4d60db33cccd8f4c445ab20bba71531435ee5 ]

The maps__split_kallsyms() will split symbols to module DSOs if it comes from a module. It also handled some unusual kernel symbols after modules by creating new kernel maps like "[kernel].0".

But they are pseudo DSOs to have those unexpected symbols. They should not be considered as unloaded kernel DSOs. Otherwise the dso__load() for them will end up calling dso__load_kallsyms() and then maps__split_kallsyms() again and again.

Fixes 2e538c4a1847291cf ("perf tools: Improve kernel/modules symbol lookup")
---
 tools/perf/util/symbol.c | 1 +
 1 file changed, 1 insertion(+)
tools/perf/util/symbol.c +1 -0
index 948d3e8ad782b..aed65b1abe669 100644
@@ -976,6 +976,7 @@ static int maps__split_kallsyms(struct maps *kmaps, struct dso *dso, u64 delta,
 				return -1;
 
 			dso__set_kernel(ndso, dso__kernel(dso));
+			dso__set_loaded(ndso);
 
 			curr_map = map__new2(pos->start, ndso);
 			if (curr_map == NULL) {
Signature · 1 line
2.51.0
author maintainer
#538 lore raw

PATCH 527/614 perf tools: Fix split kallsyms DSO counting

In reply to Greg Kroah-Hartman

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

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

From: Namhyung Kim <[email protected]>

[ Upstream commit ad0b9c4865b98dc37f4d606d26b1c19808796805 ]

It's counted twice as it's increased after calling maps__insert(). I guess we want to increase it only after it's added properly.

Fixes 2e538c4a1847291cf ("perf tools: Improve kernel/modules symbol lookup")
---
 tools/perf/util/symbol.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/perf/util/symbol.c +2 -2
index aed65b1abe669..f6c268c588a56 100644
@@ -964,11 +964,11 @@ static int maps__split_kallsyms(struct maps *kmaps, struct dso *dso, u64 delta,
 			if (dso__kernel(dso) == DSO_SPACE__KERNEL_GUEST)
 				snprintf(dso_name, sizeof(dso_name),
 					"[guest.kernel].%d",
-					kernel_range++);
+					kernel_range);
 			else
 				snprintf(dso_name, sizeof(dso_name),
 					"[kernel].%d",
-					kernel_range++);
+					kernel_range);
 
 			ndso = dso__new(dso_name);
 			map__zput(curr_map);
Signature · 1 line
2.51.0
author maintainer
#539 lore raw

PATCH 528/614 perf kvm: Fix debug assertion

In reply to Greg Kroah-Hartman

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

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

From: Ian Rogers <[email protected]>

[ Upstream commit 27e711257902475097dea3f79cbdf241fe37ec00 ]

There are 2 slots left for kvm_add_default_arch_event, fix the assertion so that debug builds don't fail the assert and to agree with the comment.

Fixes 45ff39f6e70aa55d0 ("perf tools kvm: Fix the potential out of range memory access issue")
---
 tools/perf/builtin-kvm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/builtin-kvm.c +1 -1
index f0f285763f190..c61369d54dd9d 100644
@@ -2014,7 +2014,7 @@ static int __cmd_record(const char *file_name, int argc, const char **argv)
 	for (j = 1; j < argc; j++, i++)
 		rec_argv[i] = STRDUP_FAIL_EXIT(argv[j]);
 
-	BUG_ON(i != rec_argc);
+	BUG_ON(i + 2 != rec_argc);
 
 	ret = kvm_add_default_arch_event(&i, rec_argv);
 	if (ret)
Signature · 1 line
2.51.0
author maintainer
#540 lore raw

PATCH 529/614 perf hist: In init, ensure mem_info is put on error paths

In reply to Greg Kroah-Hartman

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

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

From: Ian Rogers <[email protected]>

[ Upstream commit f60efb4454b24cc944ff3eac164bb9dce9169f71 ]

Rather than exit the internal map_symbols directly, put the mem-info that does this and also lowers the reference count on the mem-info itself otherwise the mem-info is being leaked.

Fixes 56e144fe98260a0f ("perf mem_info: Add and use map_symbol__exit and addr_map_symbol__exit")
---
 tools/perf/util/hist.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
tools/perf/util/hist.c +2 -4
index 64ff427040c34..ef4b569f7df46 100644
@@ -608,10 +608,8 @@ static int hist_entry__init(struct hist_entry *he,
 		map_symbol__exit(&he->branch_info->to.ms);
 		zfree(&he->branch_info);
 	}
-	if (he->mem_info) {
-		map_symbol__exit(&mem_info__iaddr(he->mem_info)->ms);
-		map_symbol__exit(&mem_info__daddr(he->mem_info)->ms);
-	}
+	if (he->mem_info)
+		mem_info__zput(he->mem_info);
 err:
 	map_symbol__exit(&he->ms);
 	zfree(&he->stat_acc);
Signature · 1 line
2.51.0
author maintainer
#541 lore raw

PATCH 530/614 pinctrl: single: Fix incorrect type for error return variable

In reply to Greg Kroah-Hartman

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

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

From: Haotian Zhang <[email protected]>

[ Upstream commit 61d1bb53547d42c6bdaec9da4496beb3a1a05264 ]

pcs_pinconf_get() and pcs_pinconf_set() declare ret as unsigned int, but assign it the return values of pcs_get_function() that may return negative error codes. This causes negative error codes to be converted to large positive values.

Change ret from unsigned int to int in both functions.

Fixes 9dddb4df90d1 ("pinctrl: single: support generic pinconf")
---
 drivers/pinctrl/pinctrl-single.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/pinctrl/pinctrl-single.c +4 -3
index 6d580aa282ec9..998f23d6c3179 100644
@@ -485,7 +485,8 @@ static int pcs_pinconf_get(struct pinctrl_dev *pctldev,
 	struct pcs_device *pcs = pinctrl_dev_get_drvdata(pctldev);
 	struct pcs_function *func;
 	enum pin_config_param param;
-	unsigned offset = 0, data = 0, i, j, ret;
+	unsigned offset = 0, data = 0, i, j;
+	int ret;
 
 	ret = pcs_get_function(pctldev, pin, &func);
 	if (ret)
@@ -549,9 +550,9 @@ static int pcs_pinconf_set(struct pinctrl_dev *pctldev,
 {
 	struct pcs_device *pcs = pinctrl_dev_get_drvdata(pctldev);
 	struct pcs_function *func;
-	unsigned offset = 0, shift = 0, i, data, ret;
+	unsigned offset = 0, shift = 0, i, data;
 	u32 arg;
-	int j;
+	int j, ret;
 	enum pin_config_param param;
 
 	ret = pcs_get_function(pctldev, pin, &func);
Signature · 1 line
2.51.0
author maintainer
#542 lore raw

PATCH 531/614 perf stat: Allow no events to open if this is a "--null" run

In reply to Greg Kroah-Hartman

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

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

From: Ian Rogers <[email protected]>

[ Upstream commit 6744c0b182c1f371135bc3f4e62b96ad884c9f89 ]

It is intended that a "--null" run doesn't open any events.

Fixes 2cc7aa995ce9 ("perf stat: Refactor retry/skip/fatal error handling")
---
 tools/perf/builtin-stat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/builtin-stat.c +1 -1
index f1c9d6c94fc50..b6533dcf5465b 100644
@@ -856,7 +856,7 @@ static int __run_perf_stat(int argc, const char **argv, int run_idx)
 			goto err_out;
 		}
 	}
-	if (!has_supported_counters) {
+	if (!has_supported_counters && !stat_config.null_run) {
 		evsel__open_strerror(evlist__first(evsel_list), &target, open_err,
 				     msg, sizeof(msg));
 		ui__error("No supported events found.\n%s\n", msg);
Signature · 1 line
2.51.0
author maintainer
#543 lore raw

PATCH 532/614 fbdev: ssd1307fb: fix potential page leak in ssd1307fb_probe()

In reply to Greg Kroah-Hartman

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

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

From: Abdun Nihaal <[email protected]>

[ Upstream commit 164312662ae9764b83b84d97afb25c42eb2be473 ]

The page allocated for vmem using __get_free_pages() is not freed on the error paths after it. Fix that by adding a corresponding __free_pages() call to the error path.

Fixes facd94bc458a ("fbdev: ssd1307fb: Allocate page aligned video memory.")
---
 drivers/video/fbdev/ssd1307fb.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/video/fbdev/ssd1307fb.c +3 -1
index aa6cc0a8151ac..83dd31fa1fab5 100644
@@ -680,7 +680,7 @@ static int ssd1307fb_probe(struct i2c_client *client)
 	if (!ssd1307fb_defio) {
 		dev_err(dev, "Couldn't allocate deferred io.\n");
 		ret = -ENOMEM;
-		goto fb_alloc_error;
+		goto fb_defio_error;
 	}
 
 	ssd1307fb_defio->delay = HZ / refreshrate;
@@ -757,6 +757,8 @@ static int ssd1307fb_probe(struct i2c_client *client)
 		regulator_disable(par->vbat_reg);
 reset_oled_error:
 	fb_deferred_io_cleanup(info);
+fb_defio_error:
+	__free_pages(vmem, get_order(vmem_size));
 fb_alloc_error:
 	framebuffer_release(info);
 	return ret;
Signature · 1 line
2.51.0
author maintainer
#544 lore raw

PATCH 533/614 9p: fix cache/debug options printing in v9fs_show_options

In reply to Greg Kroah-Hartman

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

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

From: Eric Sandeen <[email protected]>

[ Upstream commit f0445613314f474c1a0ec6fa8a5cd153a618f1b6 ]

commit 4eb3117888a92 changed the cache= option to accept either string shortcuts or bitfield values. It also changed /proc/mounts to emit the option as the hexadecimal numeric value rather than the shortcut string.

However, by printing "cache=%x" without the leading 0x, shortcuts such as "cache=loose" will emit "cache=f" and 'f' is not a string that is parseable by kstrtoint(), so remounting may fail if a remount with "cache=f" is attempted.

debug=%x has had the same problem since options have been displayed in c4fac9100456 ("9p: Implement show_options")

Fix these by adding the 0x prefix to the hexadecimal value shown in /proc/mounts.

Fixes 4eb3117888a92 ("fs/9p: Rework cache modes and add new options to Documentation")

Message-ID: <[email protected]>

[Dominique: use %#x at Al Viro's suggestion, also handle debug]
---
 fs/9p/v9fs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/9p/v9fs.c +2 -2
index a020a8f00a1ac..bde3ffb0e319a 100644
@@ -101,7 +101,7 @@ int v9fs_show_options(struct seq_file *m, struct dentry *root)
 	struct v9fs_session_info *v9ses = root->d_sb->s_fs_info;
 
 	if (v9ses->debug)
-		seq_printf(m, ",debug=%x", v9ses->debug);
+		seq_printf(m, ",debug=%#x", v9ses->debug);
 	if (!uid_eq(v9ses->dfltuid, V9FS_DEFUID))
 		seq_printf(m, ",dfltuid=%u",
 			   from_kuid_munged(&init_user_ns, v9ses->dfltuid));
@@ -117,7 +117,7 @@ int v9fs_show_options(struct seq_file *m, struct dentry *root)
 	if (v9ses->nodev)
 		seq_puts(m, ",nodevmap");
 	if (v9ses->cache)
-		seq_printf(m, ",cache=%x", v9ses->cache);
+		seq_printf(m, ",cache=%#x", v9ses->cache);
 #ifdef CONFIG_9P_FSCACHE
 	if (v9ses->cachetag && (v9ses->cache & CACHE_FSCACHE))
 		seq_printf(m, ",cachetag=%s", v9ses->cachetag);
Signature · 1 line
2.51.0
author maintainer
#545 lore raw

PATCH 534/614 sched/fair: Fix unfairness caused by stalled tg_load_avg_contrib when the last task migrates out

In reply to Greg Kroah-Hartman

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

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

From: xupengbo <[email protected]>

[ Upstream commit ca125231dd29fc0678dd3622e9cdea80a51dffe4 ]

When a task is migrated out, there is a probability that the tg->load_avg value will become abnormal. The reason is as follows:

1. Due to the 1ms update period limitation in update_tg_load_avg(), there is a possibility that the reduced load_avg is not updated to tg->load_avg when a task migrates out.

2. Even though __update_blocked_fair() traverses the leaf_cfs_rq_list and calls update_tg_load_avg() for cfs_rqs that are not fully decayed, the key function cfs_rq_is_decayed() does not check whether cfs->tg_load_avg_contrib is null. Consequently, in some cases, __update_blocked_fair() removes cfs_rqs whose avg.load_avg has not been updated to tg->load_avg.

Add a check of cfs_rq->tg_load_avg_contrib in cfs_rq_is_decayed(), which fixes the case (2.) mentioned above.

---
 kernel/sched/fair.c | 3 +++
 1 file changed, 3 insertions(+)
kernel/sched/fair.c +3 -0
index 2a4a1c6e25da0..71d3f4125b0e7 100644
@@ -4059,6 +4059,9 @@ static inline bool cfs_rq_is_decayed(struct cfs_rq *cfs_rq)
 	if (child_cfs_rq_on_list(cfs_rq))
 		return false;
 
+	if (cfs_rq->tg_load_avg_contrib)
+		return false;
+
 	return true;
 }
 
Signature · 1 line
2.51.0
author maintainer
#546 lore raw

PATCH 535/614 sched/core: Fix psi_dequeue() for Proxy Execution

In reply to Greg Kroah-Hartman

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

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

From: John Stultz <[email protected]>

[ Upstream commit c2ae8b0df2d1bb7a063f9e356e4e9a06cd4afe11 ]

Currently, if the sleep flag is set, psi_dequeue() doesn't change any of the psi_flags.

This is because psi_task_switch() will clear TSK_ONCPU as well as other potential flags (TSK_RUNNING), and the assumption is that a voluntary sleep always consists of a task being dequeued followed shortly there after with a psi_sched_switch() call.

Proxy Execution changes this expectation, as mutex-blocked tasks that would normally sleep stay on the runqueue. But in the case where the mutex-owning task goes to sleep, or the owner is on a remote cpu, we will then deactivate the blocked task shortly after.

In that situation, the mutex-blocked task will have had its TSK_ONCPU cleared when it was switched off the cpu, but it will stay TSK_RUNNING. Then if we later dequeue it (as currently done if we hit a case find_proxy_task() can't yet handle, such as the case of the owner being on another rq or a sleeping owner) psi_dequeue() won't change any state (leaving it TSK_RUNNING), as it incorrectly expects a psi_task_switch() call to immediately follow.

Later on when the task get woken/re-enqueued, and psi_flags are set for TSK_RUNNING, we hit an error as the task is already TSK_RUNNING:

psi: inconsistent task state! task=188:kworker/28:0 cpu=28 psi_flags=4 clear=0 set=4

To resolve this, extend the logic in psi_dequeue() so that if the sleep flag is set, we also check if psi_flags have TSK_ONCPU set (meaning the psi_task_switch is imminent) before we do the shortcut return.

If TSK_ONCPU is not set, that means we've already switched away, and this psi_dequeue call needs to clear the flags.

---
 kernel/sched/stats.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
kernel/sched/stats.h +6 -1
index 26f3fd4d34cea..73bd6bca4d310 100644
@@ -180,8 +180,13 @@ static inline void psi_dequeue(struct task_struct *p, int flags)
 	 * avoid walking all ancestors twice, psi_task_switch() handles
 	 * TSK_RUNNING and TSK_IOWAIT for us when it moves TSK_ONCPU.
 	 * Do nothing here.
+	 *
+	 * In the SCHED_PROXY_EXECUTION case we may do sleeping
+	 * dequeues that are not followed by a task switch, so check
+	 * TSK_ONCPU is set to ensure the task switch is imminent.
+	 * Otherwise clear the flags as usual.
 	 */
-	if (flags & DEQUEUE_SLEEP)
+	if ((flags & DEQUEUE_SLEEP) && (p->psi_flags & TSK_ONCPU))
 		return;
 
 	/*
Signature · 1 line
2.51.0
author maintainer
#547 lore raw

PATCH 536/614 platform/x86:intel/pmc: Update Arrow Lake telemetry GUID

In reply to Greg Kroah-Hartman

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

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

From: Xi Pardee <[email protected]>

[ Upstream commit 644ab3bc98ee386f178d5209ae8170b3fac591aa ]

Update ARL_PMT_DMU_GUID value. Arrow Lake PMT DMU GUID has been updated after it was add to the driver. This updates ensures that the die C6 value is available in the debug filesystem.

Bugzilla Link: https://bugzilla.kernel.org/show_bug.cgi?id=220421

Fixes 83f168a1a437 ("platform/x86/intel/pmc: Add Arrow Lake S support to intel_pmc_core driver")
---
 drivers/platform/x86/intel/pmc/core.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/intel/pmc/core.h +1 -1
index f4dadb696a314..d6818bd34768e 100644
@@ -282,7 +282,7 @@ enum ppfear_regs {
 /* Die C6 from PUNIT telemetry */
 #define MTL_PMT_DMU_DIE_C6_OFFSET		15
 #define MTL_PMT_DMU_GUID			0x1A067102
-#define ARL_PMT_DMU_GUID			0x1A06A000
+#define ARL_PMT_DMU_GUID			0x1A06A102
 
 #define LNL_PMC_MMIO_REG_LEN			0x2708
 #define LNL_PMC_LTR_OSSE			0x1B88
Signature · 1 line
2.51.0
author maintainer
#548 lore raw

PATCH 537/614 f2fs: maintain one time GC mode is enabled during whole zoned GC cycle

In reply to Greg Kroah-Hartman

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

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

From: Daeho Jeong <[email protected]>

[ Upstream commit e462fc48ceb8224811c3224650afed05cb7f0872 ]

The current version missed setting one time GC for normal zoned GC cycle. So, valid threshold control is not working. Need to fix it to prevent excessive GC for zoned devices.

Fixes e791d00bd06c ("f2fs: add valid block ratio not to do excessive GC for one time GC")
---
 fs/f2fs/gc.c | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)
fs/f2fs/gc.c +10 -7
index a7708cf80c04e..8abf521530ff3 100644
@@ -38,13 +38,14 @@ static int gc_thread_func(void *data)
 	struct f2fs_gc_control gc_control = {
 		.victim_segno = NULL_SEGNO,
 		.should_migrate_blocks = false,
-		.err_gc_skipped = false };
+		.err_gc_skipped = false,
+		.one_time = false };
 
 	wait_ms = gc_th->min_sleep_time;
 
 	set_freezable();
 	do {
-		bool sync_mode, foreground = false;
+		bool sync_mode, foreground = false, gc_boost = false;
 
 		wait_event_freezable_timeout(*wq,
 				kthread_should_stop() ||
@@ -52,8 +53,12 @@ static int gc_thread_func(void *data)
 				gc_th->gc_wake,
 				msecs_to_jiffies(wait_ms));
 
-		if (test_opt(sbi, GC_MERGE) && waitqueue_active(fggc_wq))
+		if (test_opt(sbi, GC_MERGE) && waitqueue_active(fggc_wq)) {
 			foreground = true;
+			gc_control.one_time = false;
+		} else if (f2fs_sb_has_blkzoned(sbi)) {
+			gc_control.one_time = true;
+		}
 
 		/* give it a try one time */
 		if (gc_th->gc_wake)
@@ -81,8 +86,6 @@ static int gc_thread_func(void *data)
 			continue;
 		}
 
-		gc_control.one_time = false;
-
 		/*
 		 * [GC triggering condition]
 		 * 0. GC is not conducted currently.
@@ -132,7 +135,7 @@ static int gc_thread_func(void *data)
 		if (need_to_boost_gc(sbi)) {
 			decrease_sleep_time(gc_th, &wait_ms);
 			if (f2fs_sb_has_blkzoned(sbi))
-				gc_control.one_time = true;
+				gc_boost = true;
 		} else {
 			increase_sleep_time(gc_th, &wait_ms);
 		}
@@ -141,7 +144,7 @@ static int gc_thread_func(void *data)
 					FOREGROUND : BACKGROUND);
 
 		sync_mode = (F2FS_OPTION(sbi).bggc_mode == BGGC_MODE_SYNC) ||
-			(gc_control.one_time && gc_th->boost_gc_greedy);
+			(gc_boost && gc_th->boost_gc_greedy);
 
 		/* foreground GC was been triggered via f2fs_balance_fs() */
 		if (foreground && !f2fs_sb_has_blkzoned(sbi))
Signature · 1 line
2.51.0
author maintainer
#549 lore raw

PATCH 538/614 rtc: amlogic-a4: fix double free caused by devm

In reply to Greg Kroah-Hartman

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

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

From: Haotian Zhang <[email protected]>

[ Upstream commit 384150d7a5b60c1086790a8ee07b0629f906cca2 ]

The clock obtained via devm_clk_get_enabled() is automatically managed by devres and will be disabled and freed on driver detach. Manually calling clk_disable_unprepare() in error path and remove function causes double free.

Remove the redundant clk_disable_unprepare() calls from the probe error path and aml_rtc_remove(), allowing the devm framework to automatically manage the clock lifecycle.

---
 drivers/rtc/rtc-amlogic-a4.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/rtc/rtc-amlogic-a4.c +0 -4
index 1928b29c10454..a993d35e1d6b0 100644
@@ -390,7 +390,6 @@ static int aml_rtc_probe(struct platform_device *pdev)
 
 	return 0;
 err_clk:
-	clk_disable_unprepare(rtc->sys_clk);
 	device_init_wakeup(dev, false);
 
 	return ret;
@@ -423,9 +422,6 @@ static SIMPLE_DEV_PM_OPS(aml_rtc_pm_ops,
 
 static void aml_rtc_remove(struct platform_device *pdev)
 {
-	struct aml_rtc_data *rtc = dev_get_drvdata(&pdev->dev);
-
-	clk_disable_unprepare(rtc->sys_clk);
 	device_init_wakeup(&pdev->dev, false);
 }
 
Signature · 1 line
2.51.0
author maintainer
#550 lore raw

PATCH 539/614 kbuild: install-extmod-build: Properly fix CC expansion when ccache is used

In reply to Greg Kroah-Hartman

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

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

From: Abel Vesa <[email protected]>

[ Upstream commit 4ab2ee307983548b29ddaab0ecaef82d526cf4c9 ]

Currently, when cross-compiling and ccache is used, the expanding of CC turns out to be without any quotes, leading to the following error:

make[4]: *** No rule to make target 'aarch64-linux-gnu-gcc'. Stop. make[3]: *** [Makefile:2164: run-command] Error 2

And it makes sense, because after expansion it ends up like this:

make run-command KBUILD_RUN_COMMAND=+$(MAKE) \
HOSTCC=ccache aarch64-linux-gnu-gcc VPATH= srcroot=. $(build)= ...

So add another set of double quotes to surround whatever CC expands to to make sure the aarch64-linux-gnu-gcc isn't expanded to something that looks like an entirely separate target.

---
 scripts/package/install-extmod-build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/package/install-extmod-build +1 -1
index 054fdf45cc37a..2576cf7902dbb 100755
@@ -63,7 +63,7 @@ if [ "${CC}" != "${HOSTCC}" ]; then
 	# Clear VPATH and srcroot because the source files reside in the output
 	# directory.
 	# shellcheck disable=SC2016 # $(MAKE) and $(build) will be expanded by Make
-	"${MAKE}" run-command KBUILD_RUN_COMMAND='+$(MAKE) HOSTCC='"${CC}"' VPATH= srcroot=. $(build)='"$(realpath --relative-to=. "${destdir}")"/scripts
+	"${MAKE}" run-command KBUILD_RUN_COMMAND='+$(MAKE) HOSTCC="'"${CC}"'" VPATH= srcroot=. $(build)='"$(realpath --relative-to=. "${destdir}")"/scripts
 
 	rm -f "${destdir}/scripts/Kbuild"
 fi
Signature · 1 line
2.51.0
author maintainer
#551 lore raw

PATCH 540/614 NFS: Avoid changing nlink when file removes and attribute updates race

In reply to Greg Kroah-Hartman

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

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

From: Trond Myklebust <[email protected]>

[ Upstream commit bd4928ec799b31c492eb63f9f4a0c1e0bb4bb3f7 ]

If a file removal races with another operation that updates its attributes, then skip the change to nlink, and just mark the attributes as being stale.

Fixes 59a707b0d42e ("NFS: Ensure we revalidate the inode correctly after remove or rename")
---
 fs/nfs/dir.c | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)
fs/nfs/dir.c +13 -6
index ea9f6ca8f30fa..d557b0443e8b0 100644
@@ -1894,13 +1894,15 @@ static int nfs_dentry_delete(const struct dentry *dentry)
 }
 
 /* Ensure that we revalidate inode->i_nlink */
-static void nfs_drop_nlink(struct inode *inode)
+static void nfs_drop_nlink(struct inode *inode, unsigned long gencount)
 {
+	struct nfs_inode *nfsi = NFS_I(inode);
+
 	spin_lock(&inode->i_lock);
 	/* drop the inode if we're reasonably sure this is the last link */
-	if (inode->i_nlink > 0)
+	if (inode->i_nlink > 0 && gencount == nfsi->attr_gencount)
 		drop_nlink(inode);
-	NFS_I(inode)->attr_gencount = nfs_inc_attr_generation_counter();
+	nfsi->attr_gencount = nfs_inc_attr_generation_counter();
 	nfs_set_cache_invalid(
 		inode, NFS_INO_INVALID_CHANGE | NFS_INO_INVALID_CTIME |
 			       NFS_INO_INVALID_NLINK);
@@ -1914,8 +1916,9 @@ static void nfs_drop_nlink(struct inode *inode)
 static void nfs_dentry_iput(struct dentry *dentry, struct inode *inode)
 {
 	if (dentry->d_flags & DCACHE_NFSFS_RENAMED) {
+		unsigned long gencount = READ_ONCE(NFS_I(inode)->attr_gencount);
 		nfs_complete_unlink(dentry, inode);
-		nfs_drop_nlink(inode);
+		nfs_drop_nlink(inode, gencount);
 	}
 	iput(inode);
 }
@@ -2507,9 +2510,11 @@ static int nfs_safe_remove(struct dentry *dentry)
 
 	trace_nfs_remove_enter(dir, dentry);
 	if (inode != NULL) {
+		unsigned long gencount = READ_ONCE(NFS_I(inode)->attr_gencount);
+
 		error = NFS_PROTO(dir)->remove(dir, dentry);
 		if (error == 0)
-			nfs_drop_nlink(inode);
+			nfs_drop_nlink(inode, gencount);
 	} else
 		error = NFS_PROTO(dir)->remove(dir, dentry);
 	if (error == -ENOENT)
@@ -2709,6 +2714,7 @@ int nfs_rename(struct mnt_idmap *idmap, struct inode *old_dir,
 {
 	struct inode *old_inode = d_inode(old_dentry);
 	struct inode *new_inode = d_inode(new_dentry);
+	unsigned long new_gencount = 0;
 	struct dentry *dentry = NULL;
 	struct rpc_task *task;
 	bool must_unblock = false;
@@ -2761,6 +2767,7 @@ int nfs_rename(struct mnt_idmap *idmap, struct inode *old_dir,
 		} else {
 			block_revalidate(new_dentry);
 			must_unblock = true;
+			new_gencount = NFS_I(new_inode)->attr_gencount;
 			spin_unlock(&new_dentry->d_lock);
 		}
 
@@ -2800,7 +2807,7 @@ int nfs_rename(struct mnt_idmap *idmap, struct inode *old_dir,
 			new_dir, new_dentry, error);
 	if (!error) {
 		if (new_inode != NULL)
-			nfs_drop_nlink(new_inode);
+			nfs_drop_nlink(new_inode, new_gencount);
 		/*
 		 * The d_move() should be here instead of in an async RPC completion
 		 * handler because we need the proper locks to move the dentry.  If
Signature · 1 line
2.51.0
author maintainer
#552 lore raw

PATCH 541/614 fs/nls: Fix utf16 to utf8 conversion

In reply to Greg Kroah-Hartman

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

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

From: Armin Wolf <[email protected]>

[ Upstream commit 25524b6190295577e4918c689644451365e6466d ]

Currently the function responsible for converting between utf16 and utf8 strings will ignore any characters that cannot be converted. This however also includes multi-byte characters that do not fit into the provided string buffer.

This can cause problems if such a multi-byte character is followed by a single-byte character. In such a case the multi-byte character might be ignored when the provided string buffer is too small, but the single-byte character might fit and is thus still copied into the resulting string.

Fix this by stop filling the provided string buffer once a character does not fit. In order to be able to do this extend utf32_to_utf8() to return useful errno codes instead of -1.

---
 fs/nls/nls_base.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)
fs/nls/nls_base.c +12 -4
index 18d597e49a194..d434c4463a8f7 100644
@@ -94,7 +94,7 @@ int utf32_to_utf8(unicode_t u, u8 *s, int maxout)
 
 	l = u;
 	if (l > UNICODE_MAX || (l & SURROGATE_MASK) == SURROGATE_PAIR)
-		return -1;
+		return -EILSEQ;
 
 	nc = 0;
 	for (t = utf8_table; t->cmask && maxout; t++, maxout--) {
@@ -110,7 +110,7 @@ int utf32_to_utf8(unicode_t u, u8 *s, int maxout)
 			return nc;
 		}
 	}
-	return -1;
+	return -EOVERFLOW;
 }
 EXPORT_SYMBOL(utf32_to_utf8);
 
@@ -217,8 +217,16 @@ int utf16s_to_utf8s(const wchar_t *pwcs, int inlen, enum utf16_endian endian,
 				inlen--;
 			}
 			size = utf32_to_utf8(u, op, maxout);
-			if (size == -1) {
-				/* Ignore character and move on */
+			if (size < 0) {
+				if (size == -EILSEQ) {
+					/* Ignore character and move on */
+					continue;
+				}
+				/*
+				 * Stop filling the buffer with data once a character
+				 * does not fit anymore.
+				 */
+				break;
 			} else {
 				op += size;
 				maxout -= size;
Signature · 1 line
2.51.0
author maintainer
#553 lore raw

PATCH 542/614 NFS: Initialise verifiers for visible dentries in readdir and lookup

In reply to Greg Kroah-Hartman

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

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

From: Trond Myklebust <[email protected]>

[ Upstream commit 9bd545539b233725a3416801f7c374bff0327d6e ]

Ensure that the verifiers are initialised before calling d_splice_alias() in both nfs_prime_dcache() and nfs_lookup().

Fixes a1147b8281bd ("NFS: Fix up directory verifier races")
---
 fs/nfs/dir.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
fs/nfs/dir.c +4 -2
index d557b0443e8b0..2eead7e85be5b 100644
@@ -789,16 +789,17 @@ void nfs_prime_dcache(struct dentry *parent, struct nfs_entry *entry,
 		goto out;
 	}
 
+	nfs_set_verifier(dentry, dir_verifier);
 	inode = nfs_fhget(dentry->d_sb, entry->fh, entry->fattr);
 	alias = d_splice_alias(inode, dentry);
 	d_lookup_done(dentry);
 	if (alias) {
 		if (IS_ERR(alias))
 			goto out;
+		nfs_set_verifier(alias, dir_verifier);
 		dput(dentry);
 		dentry = alias;
 	}
-	nfs_set_verifier(dentry, dir_verifier);
 	trace_nfs_readdir_lookup(d_inode(parent), dentry, 0);
 out:
 	dput(dentry);
@@ -1994,13 +1995,14 @@ struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, unsigned in
 	nfs_lookup_advise_force_readdirplus(dir, flags);
 
 no_entry:
+	nfs_set_verifier(dentry, dir_verifier);
 	res = d_splice_alias(inode, dentry);
 	if (res != NULL) {
 		if (IS_ERR(res))
 			goto out;
+		nfs_set_verifier(res, dir_verifier);
 		dentry = res;
 	}
-	nfs_set_verifier(dentry, dir_verifier);
 out:
 	trace_nfs_lookup_exit(dir, dentry, flags, PTR_ERR_OR_ZERO(res));
 	nfs_free_fattr(fattr);
Signature · 1 line
2.51.0
author maintainer
#554 lore raw

PATCH 543/614 NFS: Initialise verifiers for visible dentries in nfs_atomic_open()

In reply to Greg Kroah-Hartman

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

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

From: Trond Myklebust <[email protected]>

[ Upstream commit 518c32a1bc4f8df1a8442ee8cdfea3e2fcff20a0 ]

Ensure that the verifiers are initialised before calling d_splice_alias() in nfs_atomic_open().

Fixes 809fd143de88 ("NFSv4: Ensure nfs_atomic_open set the dentry verifier on ENOENT")
---
 fs/nfs/dir.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfs/dir.c +1 -1
index 2eead7e85be5b..3b8250ee01412 100644
@@ -2144,12 +2144,12 @@ int nfs_atomic_open(struct inode *dir, struct dentry *dentry,
 		d_drop(dentry);
 		switch (err) {
 		case -ENOENT:
-			d_splice_alias(NULL, dentry);
 			if (nfs_server_capable(dir, NFS_CAP_CASE_INSENSITIVE))
 				dir_verifier = inode_peek_iversion_raw(dir);
 			else
 				dir_verifier = nfs_save_change_attribute(dir);
 			nfs_set_verifier(dentry, dir_verifier);
+			d_splice_alias(NULL, dentry);
 			break;
 		case -EISDIR:
 		case -ENOTDIR:
Signature · 1 line
2.51.0
author maintainer
#555 lore raw

PATCH 544/614 NFS: Initialise verifiers for visible dentries in _nfs4_open_and_get_state

In reply to Greg Kroah-Hartman

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

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

From: Trond Myklebust <[email protected]>

[ Upstream commit 0f900f11002ff52391fc2aa4a75e59f26ed1c242 ]

Ensure that the verifiers are initialised before calling d_splice_alias() in _nfs4_open_and_get_state().

Fixes cf5b4059ba71 ("NFSv4: Fix races between open and dentry revalidation")
---
 fs/nfs/nfs4proc.c | 27 ++++++++++++++-------------
 1 file changed, 14 insertions(+), 13 deletions(-)
fs/nfs/nfs4proc.c +14 -13
index 93c6ce04332b8..6f4e14fb7b9b8 100644
@@ -3174,18 +3174,6 @@ static int _nfs4_open_and_get_state(struct nfs4_opendata *opendata,
 	if (opendata->o_res.rflags & NFS4_OPEN_RESULT_PRESERVE_UNLINKED)
 		set_bit(NFS_INO_PRESERVE_UNLINKED, &NFS_I(state->inode)->flags);
 
-	dentry = opendata->dentry;
-	if (d_really_is_negative(dentry)) {
-		struct dentry *alias;
-		d_drop(dentry);
-		alias = d_splice_alias(igrab(state->inode), dentry);
-		/* d_splice_alias() can't fail here - it's a non-directory */
-		if (alias) {
-			dput(ctx->dentry);
-			ctx->dentry = dentry = alias;
-		}
-	}
-
 	switch(opendata->o_arg.claim) {
 	default:
 		break;
@@ -3196,7 +3184,20 @@ static int _nfs4_open_and_get_state(struct nfs4_opendata *opendata,
 			break;
 		if (opendata->o_res.delegation.type != 0)
 			dir_verifier = nfs_save_change_attribute(dir);
-		nfs_set_verifier(dentry, dir_verifier);
+	}
+
+	dentry = opendata->dentry;
+	nfs_set_verifier(dentry, dir_verifier);
+	if (d_really_is_negative(dentry)) {
+		struct dentry *alias;
+		d_drop(dentry);
+		alias = d_splice_alias(igrab(state->inode), dentry);
+		/* d_splice_alias() can't fail here - it's a non-directory */
+		if (alias) {
+			dput(ctx->dentry);
+			nfs_set_verifier(alias, dir_verifier);
+			ctx->dentry = dentry = alias;
+		}
 	}
 
 	/* Parse layoutget results before we check for access */
Signature · 1 line
2.51.0
author maintainer
#556 lore raw

PATCH 545/614 NFSv4/pNFS: Clear NFS_INO_LAYOUTCOMMIT in pnfs_mark_layout_stateid_invalid

In reply to Greg Kroah-Hartman

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

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

From: Jonathan Curley <[email protected]>

[ Upstream commit e0f8058f2cb56de0b7572f51cd563ca5debce746 ]

Fixes a crash when layout is null during this call stack:

write_inode

    -> nfs4_write_inode
        -> pnfs_layoutcommit_inode

pnfs_set_layoutcommit relies on the lseg refcount to keep the layout around. Need to clear NFS_INO_LAYOUTCOMMIT otherwise we might attempt to reference a null layout.

Fixes fe1cf9469d7bc ("pNFS: Clear all layout segment state in pnfs_mark_layout_stateid_invalid")
---
 fs/nfs/pnfs.c | 1 +
 1 file changed, 1 insertion(+)
fs/nfs/pnfs.c +1 -0
index a3135b5af7eec..7ce2e840217cf 100644
@@ -464,6 +464,7 @@ pnfs_mark_layout_stateid_invalid(struct pnfs_layout_hdr *lo,
 	struct pnfs_layout_segment *lseg, *next;
 
 	set_bit(NFS_LAYOUT_INVALID_STID, &lo->plh_flags);
+	clear_bit(NFS_INO_LAYOUTCOMMIT, &NFS_I(lo->plh_inode)->flags);
 	list_for_each_entry_safe(lseg, next, &lo->plh_segs, pls_list)
 		pnfs_clear_lseg_state(lseg, lseg_list);
 	pnfs_clear_layoutreturn_info(lo);
Signature · 1 line
2.51.0
author maintainer
#557 lore raw

PATCH 546/614 drm/panthor: Prevent potential UAF in group creation

In reply to Greg Kroah-Hartman

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

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

From: Akash Goel <[email protected]>

[ Upstream commit eec7e23d848d2194dd8791fcd0f4a54d4378eecd ]

This commit prevents the possibility of a use after free issue in the GROUP_CREATE ioctl function, which arose as pointer to the group is accessed in that ioctl function after storing it in the Xarray. A malicious userspace can second guess the handle of a group and try to call GROUP_DESTROY ioctl from another thread around the same time as GROUP_CREATE ioctl.

To prevent the use after free exploit, this commit uses a mark on an entry of group pool Xarray which is added just before returning from the GROUP_CREATE ioctl function. The mark is checked for all ioctls that specify the group handle and so userspace won't be abe to delete a group that isn't marked yet.

v2: Add R-bs and fixes tags

---
 drivers/gpu/drm/panthor/panthor_sched.c | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)
drivers/gpu/drm/panthor/panthor_sched.c +15 -4
index 0279e19aadae9..881a07ffbabc8 100644
@@ -772,6 +772,12 @@ struct panthor_job_profiling_data {
  */
 #define MAX_GROUPS_PER_POOL 128
 
+/*
+ * Mark added on an entry of group pool Xarray to identify if the group has
+ * been fully initialized and can be accessed elsewhere in the driver code.
+ */
+#define GROUP_REGISTERED XA_MARK_1
+
 /**
  * struct panthor_group_pool - Group pool
  *
@@ -2900,7 +2906,7 @@ void panthor_fdinfo_gather_group_samples(struct panthor_file *pfile)
 		return;
 
 	xa_lock(&gpool->xa);
-	xa_for_each(&gpool->xa, i, group) {
+	xa_for_each_marked(&gpool->xa, i, group, GROUP_REGISTERED) {
 		guard(spinlock)(&group->fdinfo.lock);
 		pfile->stats.cycles += group->fdinfo.data.cycles;
 		pfile->stats.time += group->fdinfo.data.time;
@@ -3575,6 +3581,8 @@ int panthor_group_create(struct panthor_file *pfile,
 
 	group_init_task_info(group);
 
+	xa_set_mark(&gpool->xa, gid, GROUP_REGISTERED);
+
 	return gid;
 
 err_put_group:
@@ -3589,6 +3597,9 @@ int panthor_group_destroy(struct panthor_file *pfile, u32 group_handle)
 	struct panthor_scheduler *sched = ptdev->scheduler;
 	struct panthor_group *group;
 
+	if (!xa_get_mark(&gpool->xa, group_handle, GROUP_REGISTERED))
+		return -EINVAL;
+
 	group = xa_erase(&gpool->xa, group_handle);
 	if (!group)
 		return -EINVAL;
@@ -3614,12 +3625,12 @@ int panthor_group_destroy(struct panthor_file *pfile, u32 group_handle)
 }
 
 static struct panthor_group *group_from_handle(struct panthor_group_pool *pool,
-					       u32 group_handle)
+					       unsigned long group_handle)
 {
 	struct panthor_group *group;
 
 	xa_lock(&pool->xa);
-	group = group_get(xa_load(&pool->xa, group_handle));
+	group = group_get(xa_find(&pool->xa, &group_handle, group_handle, GROUP_REGISTERED));
 	xa_unlock(&pool->xa);
 
 	return group;
@@ -3706,7 +3717,7 @@ panthor_fdinfo_gather_group_mem_info(struct panthor_file *pfile,
 		return;
 
 	xa_lock(&gpool->xa);
-	xa_for_each(&gpool->xa, i, group) {
+	xa_for_each_marked(&gpool->xa, i, group, GROUP_REGISTERED) {
 		stats->resident += group->fdinfo.kbo_sizes;
 		if (group->csg_id >= 0)
 			stats->active += group->fdinfo.kbo_sizes;
Signature · 1 line
2.51.0
author maintainer
#558 lore raw

PATCH 547/614 Revert "nfs: ignore SB_RDONLY when remounting nfs"

In reply to Greg Kroah-Hartman

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

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

From: Trond Myklebust <[email protected]>

[ Upstream commit 400fa37afbb11a601c204b72af0f0e5bc2db695c ]

This reverts commit 80c4de6ab44c14e910117a02f2f8241ffc6ec54a.

Silently ignoring the "ro" and "rw" mount options causes user confusion, and regressions.

Cc Li Lingfeng <[email protected]>
Fixes 80c4de6ab44c ("nfs: ignore SB_RDONLY when remounting nfs")
---
 fs/nfs/super.c | 10 ----------
 1 file changed, 10 deletions(-)
fs/nfs/super.c +0 -10
index 72dee6f3050e6..527000f5d150c 100644
@@ -1051,16 +1051,6 @@ int nfs_reconfigure(struct fs_context *fc)
 
 	sync_filesystem(sb);
 
-	/*
-	 * The SB_RDONLY flag has been removed from the superblock during
-	 * mounts to prevent interference between different filesystems.
-	 * Similarly, it is also necessary to ignore the SB_RDONLY flag
-	 * during reconfiguration; otherwise, it may also result in the
-	 * creation of redundant superblocks when mounting a directory with
-	 * different rw and ro flags multiple times.
-	 */
-	fc->sb_flags_mask &= ~SB_RDONLY;
-
 	/*
 	 * Userspace mount programs that send binary options generally send
 	 * them populated with default values. We have no way to know which
Signature · 1 line
2.51.0
author maintainer
#559 lore raw

PATCH 548/614 Revert "nfs: clear SB_RDONLY before getting superblock"

In reply to Greg Kroah-Hartman

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

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

From: Trond Myklebust <[email protected]>

[ Upstream commit d216b698d44e33417ad4cc796cb04ccddbb8c0ee ]

This reverts commit 8cd9b785943c57a136536250da80ba1eb6f8eb18.

Silently ignoring the "ro" and "rw" mount options causes user confusion, and regressions.

Cc Li Lingfeng <[email protected]>
Fixes 8cd9b785943c ("nfs: clear SB_RDONLY before getting superblock")
---
 fs/nfs/super.c | 9 ---------
 1 file changed, 9 deletions(-)
fs/nfs/super.c +0 -9
index 527000f5d150c..9b9464e70a7f0 100644
@@ -1308,17 +1308,8 @@ int nfs_get_tree_common(struct fs_context *fc)
 	if (IS_ERR(server))
 		return PTR_ERR(server);
 
-	/*
-	 * When NFS_MOUNT_UNSHARED is not set, NFS forces the sharing of a
-	 * superblock among each filesystem that mounts sub-directories
-	 * belonging to a single exported root path.
-	 * To prevent interference between different filesystems, the
-	 * SB_RDONLY flag should be removed from the superblock.
-	 */
 	if (server->flags & NFS_MOUNT_UNSHARED)
 		compare_super = NULL;
-	else
-		fc->sb_flags &= ~SB_RDONLY;
 
 	/* -o noac implies -o sync */
 	if (server->flags & NFS_MOUNT_NOAC)
Signature · 1 line
2.51.0
author maintainer
#560 lore raw

PATCH 549/614 Revert "nfs: ignore SB_RDONLY when mounting nfs"

In reply to Greg Kroah-Hartman

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

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

From: Trond Myklebust <[email protected]>

[ Upstream commit d4a26d34f1946142f9d32e540490e4926ae9a46b ]

This reverts commit 52cb7f8f177878b4f22397b9c4d2c8f743766be3.

Silently ignoring the "ro" and "rw" mount options causes user confusion, and regressions.

Cc Li Lingfeng <[email protected]>
Fixes 52cb7f8f1778 ("nfs: ignore SB_RDONLY when mounting nfs")
---
 fs/nfs/internal.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfs/internal.h +1 -1
index 2ecd38e1d17a8..ffd382aa31ac0 100644
@@ -13,7 +13,7 @@
 #include <linux/nfslocalio.h>
 #include <linux/wait_bit.h>
 
-#define NFS_SB_MASK (SB_NOSUID|SB_NODEV|SB_NOEXEC|SB_SYNCHRONOUS)
+#define NFS_SB_MASK (SB_RDONLY|SB_NOSUID|SB_NODEV|SB_NOEXEC|SB_SYNCHRONOUS)
 
 extern const struct export_operations nfs_export_ops;
 
Signature · 1 line
2.51.0
author maintainer
#561 lore raw

PATCH 550/614 NFS: Automounted filesystems should inherit ro,noexec,nodev,sync flags

In reply to Greg Kroah-Hartman

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

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

From: Trond Myklebust <[email protected]>

[ Upstream commit 8675c69816e4276b979ff475ee5fac4688f80125 ]

When a filesystem is being automounted, it needs to preserve the user-set superblock mount options, such as the "ro" flag.

---
 fs/nfs/namespace.c | 6 ++++++
 fs/nfs/super.c     | 4 ----
 2 files changed, 6 insertions(+), 4 deletions(-)
fs/nfs/namespace.c +6 -0
index 5a4d193da1a98..dca055676c4f3 100644
@@ -149,6 +149,7 @@ struct vfsmount *nfs_d_automount(struct path *path)
 	struct vfsmount *mnt = ERR_PTR(-ENOMEM);
 	struct nfs_server *server = NFS_SB(path->dentry->d_sb);
 	struct nfs_client *client = server->nfs_client;
+	unsigned long s_flags = path->dentry->d_sb->s_flags;
 	int timeout = READ_ONCE(nfs_mountpoint_expiry_timeout);
 	int ret;
 
@@ -174,6 +175,11 @@ struct vfsmount *nfs_d_automount(struct path *path)
 		fc->net_ns = get_net(client->cl_net);
 	}
 
+	/* Inherit the flags covered by NFS_SB_MASK */
+	fc->sb_flags_mask |= NFS_SB_MASK;
+	fc->sb_flags &= ~NFS_SB_MASK;
+	fc->sb_flags |= s_flags & NFS_SB_MASK;
+
 	/* for submounts we want the same server; referrals will reassign */
 	memcpy(&ctx->nfs_server._address, &client->cl_addr, client->cl_addrlen);
 	ctx->nfs_server.addrlen	= client->cl_addrlen;
fs/nfs/super.c +0 -4
index 9b9464e70a7f0..66413133b43e3 100644
@@ -1315,10 +1315,6 @@ int nfs_get_tree_common(struct fs_context *fc)
 	if (server->flags & NFS_MOUNT_NOAC)
 		fc->sb_flags |= SB_SYNCHRONOUS;
 
-	if (ctx->clone_data.sb)
-		if (ctx->clone_data.sb->s_flags & SB_SYNCHRONOUS)
-			fc->sb_flags |= SB_SYNCHRONOUS;
-
 	/* Get a superblock - note that we may end up sharing one that already exists */
 	fc->s_fs_info = server;
 	s = sget_fc(fc, compare_super, nfs_set_super);
Signature · 1 line
2.51.0
author maintainer
#562 lore raw

PATCH 551/614 NFS: Fix inheritance of the block sizes when automounting

In reply to Greg Kroah-Hartman

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

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

From: Trond Myklebust <[email protected]>

[ Upstream commit 2b092175f5e301cdaa935093edfef2be9defb6df ]

Only inherit the block sizes that were actually specified as mount parameters for the parent mount.

Fixes 62a55d088cd8 ("NFS: Additional refactoring for fs_context conversion")
---
 fs/nfs/client.c           | 21 +++++++++++++++++----
 fs/nfs/internal.h         |  1 -
 fs/nfs/namespace.c        |  5 ++++-
 fs/nfs/nfs4client.c       | 18 ++++++++++++++----
 fs/nfs/super.c            | 10 +++-------
 include/linux/nfs_fs_sb.h |  5 +++++
 6 files changed, 43 insertions(+), 17 deletions(-)
fs/nfs/client.c +17 -4
index 54699299d5b16..2aaea9c98c2cd 100644
@@ -784,10 +784,18 @@ static int nfs_init_server(struct nfs_server *server,
 		server->fattr_valid = NFS_ATTR_FATTR_V4;
 	}
 
-	if (ctx->rsize)
+	if (ctx->bsize) {
+		server->bsize = ctx->bsize;
+		server->automount_inherit |= NFS_AUTOMOUNT_INHERIT_BSIZE;
+	}
+	if (ctx->rsize) {
 		server->rsize = nfs_io_size(ctx->rsize, clp->cl_proto);
-	if (ctx->wsize)
+		server->automount_inherit |= NFS_AUTOMOUNT_INHERIT_RSIZE;
+	}
+	if (ctx->wsize) {
 		server->wsize = nfs_io_size(ctx->wsize, clp->cl_proto);
+		server->automount_inherit |= NFS_AUTOMOUNT_INHERIT_WSIZE;
+	}
 
 	server->acregmin = ctx->acregmin * HZ;
 	server->acregmax = ctx->acregmax * HZ;
@@ -977,8 +985,13 @@ EXPORT_SYMBOL_GPL(nfs_probe_server);
 void nfs_server_copy_userdata(struct nfs_server *target, struct nfs_server *source)
 {
 	target->flags = source->flags;
-	target->rsize = source->rsize;
-	target->wsize = source->wsize;
+	target->automount_inherit = source->automount_inherit;
+	if (source->automount_inherit & NFS_AUTOMOUNT_INHERIT_BSIZE)
+		target->bsize = source->bsize;
+	if (source->automount_inherit & NFS_AUTOMOUNT_INHERIT_RSIZE)
+		target->rsize = source->rsize;
+	if (source->automount_inherit & NFS_AUTOMOUNT_INHERIT_WSIZE)
+		target->wsize = source->wsize;
 	target->acregmin = source->acregmin;
 	target->acregmax = source->acregmax;
 	target->acdirmin = source->acdirmin;
fs/nfs/internal.h +0 -1
index ffd382aa31ac0..2e596244799f3 100644
@@ -152,7 +152,6 @@ struct nfs_fs_context {
 		struct super_block	*sb;
 		struct dentry		*dentry;
 		struct nfs_fattr	*fattr;
-		unsigned int		inherited_bsize;
 	} clone_data;
 };
 
fs/nfs/namespace.c +4 -1
index dca055676c4f3..9e4d94f41fc67 100644
@@ -190,6 +190,10 @@ struct vfsmount *nfs_d_automount(struct path *path)
 	ctx->nfs_mod		= client->cl_nfs_mod;
 	get_nfs_version(ctx->nfs_mod);
 
+	/* Inherit block sizes if they were specified as mount parameters */
+	if (server->automount_inherit & NFS_AUTOMOUNT_INHERIT_BSIZE)
+		ctx->bsize = server->bsize;
+
 	ret = client->rpc_ops->submount(fc, server);
 	if (ret < 0) {
 		mnt = ERR_PTR(ret);
@@ -289,7 +293,6 @@ int nfs_do_submount(struct fs_context *fc)
 		return -ENOMEM;
 
 	ctx->internal		= true;
-	ctx->clone_data.inherited_bsize = ctx->clone_data.sb->s_blocksize_bits;
 
 	p = nfs_devname(dentry, buffer, 4096);
 	if (IS_ERR(p)) {
fs/nfs/nfs4client.c +14 -4
index 3a4baed993c96..4ff0e9dd1145e 100644
@@ -1174,10 +1174,20 @@ static int nfs4_init_server(struct nfs_server *server, struct fs_context *fc)
 	if (error < 0)
 		return error;
 
-	if (ctx->rsize)
-		server->rsize = nfs_io_size(ctx->rsize, server->nfs_client->cl_proto);
-	if (ctx->wsize)
-		server->wsize = nfs_io_size(ctx->wsize, server->nfs_client->cl_proto);
+	if (ctx->bsize) {
+		server->bsize = ctx->bsize;
+		server->automount_inherit |= NFS_AUTOMOUNT_INHERIT_BSIZE;
+	}
+	if (ctx->rsize) {
+		server->rsize =
+			nfs_io_size(ctx->rsize, server->nfs_client->cl_proto);
+		server->automount_inherit |= NFS_AUTOMOUNT_INHERIT_RSIZE;
+	}
+	if (ctx->wsize) {
+		server->wsize =
+			nfs_io_size(ctx->wsize, server->nfs_client->cl_proto);
+		server->automount_inherit |= NFS_AUTOMOUNT_INHERIT_WSIZE;
+	}
 
 	server->acregmin = ctx->acregmin * HZ;
 	server->acregmax = ctx->acregmax * HZ;
fs/nfs/super.c +3 -7
index 66413133b43e3..57d372db03b93 100644
@@ -1091,8 +1091,9 @@ static void nfs_fill_super(struct super_block *sb, struct nfs_fs_context *ctx)
 	sb->s_blocksize = 0;
 	sb->s_xattr = server->nfs_client->cl_nfs_mod->xattr;
 	sb->s_op = server->nfs_client->cl_nfs_mod->sops;
-	if (ctx->bsize)
-		sb->s_blocksize = nfs_block_size(ctx->bsize, &sb->s_blocksize_bits);
+	if (server->bsize)
+		sb->s_blocksize =
+			nfs_block_size(server->bsize, &sb->s_blocksize_bits);
 
 	switch (server->nfs_client->rpc_ops->version) {
 	case 2:
@@ -1338,13 +1339,8 @@ int nfs_get_tree_common(struct fs_context *fc)
 	}
 
 	if (!s->s_root) {
-		unsigned bsize = ctx->clone_data.inherited_bsize;
 		/* initial superblock/root creation */
 		nfs_fill_super(s, ctx);
-		if (bsize) {
-			s->s_blocksize_bits = bsize;
-			s->s_blocksize = 1U << bsize;
-		}
 		error = nfs_get_cache_cookie(s, ctx);
 		if (error < 0)
 			goto error_splat_super;
include/linux/nfs_fs_sb.h +5 -0
index d30c0245031c0..30ac384e011a4 100644
@@ -172,6 +172,11 @@ struct nfs_server {
 #define NFS_MOUNT_FORCE_RDIRPLUS	0x20000000
 #define NFS_MOUNT_NETUNREACH_FATAL	0x40000000
 
+	unsigned int		automount_inherit; /* Properties inherited by automount */
+#define NFS_AUTOMOUNT_INHERIT_BSIZE	0x0001
+#define NFS_AUTOMOUNT_INHERIT_RSIZE	0x0002
+#define NFS_AUTOMOUNT_INHERIT_WSIZE	0x0004
+
 	unsigned int		caps;		/* server capabilities */
 	__u64			fattr_valid;	/* Valid attributes */
 	unsigned int		rsize;		/* read size */
Signature · 1 line
2.51.0
author maintainer
#563 lore raw

PATCH 552/614 fs/nls: Fix inconsistency between utf8_to_utf32() and utf32_to_utf8()

In reply to Greg Kroah-Hartman

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

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

From: Armin Wolf <[email protected]>

[ Upstream commit c36f9d7b2869a003a2f7d6ff2c6bac9e62fd7d68 ]

After commit 25524b619029 ("fs/nls: Fix utf16 to utf8 conversion"), the return values of utf8_to_utf32() and utf32_to_utf8() are inconsistent when encountering an error: utf8_to_utf32() returns -1, while utf32_to_utf8() returns errno codes. Fix this inconsistency by modifying utf8_to_utf32() to return errno codes as well.

---
 fs/nls/nls_base.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
fs/nls/nls_base.c +7 -4
index d434c4463a8f7..a5c3a9f1b8dc5 100644
@@ -67,19 +67,22 @@ int utf8_to_utf32(const u8 *s, int inlen, unicode_t *pu)
 			l &= t->lmask;
 			if (l < t->lval || l > UNICODE_MAX ||
 					(l & SURROGATE_MASK) == SURROGATE_PAIR)
-				return -1;
+				return -EILSEQ;
+
 			*pu = (unicode_t) l;
 			return nc;
 		}
 		if (inlen <= nc)
-			return -1;
+			return -EOVERFLOW;
+
 		s++;
 		c = (*s ^ 0x80) & 0xFF;
 		if (c & 0xC0)
-			return -1;
+			return -EILSEQ;
+
 		l = (l << 6) | c;
 	}
-	return -1;
+	return -EILSEQ;
 }
 EXPORT_SYMBOL(utf8_to_utf32);
 
Signature · 1 line
2.51.0
author maintainer
#564 lore raw

PATCH 553/614 platform/x86: asus-wmi: use brightness_set_blocking() for kbd led

In reply to Greg Kroah-Hartman

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

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

From: Anton Khirnov <[email protected]>

[ Upstream commit ccb61a328321ba3f8567e350664c9ca7a42b6c70 ]

kbd_led_set() can sleep, and so may not be used as the brightness_set() callback.

Otherwise using this led with a trigger leads to system hangs accompanied by:

BUG: scheduling while atomic: acpi_fakekeyd/2588/0x00000003
CPU: 4 UID: 0 PID: 2588 Comm: acpi_fakekeyd Not tainted 6.17.9+deb14-amd64 #1 PREEMPT(lazy)  Debian 6.17.9-1
Hardware name: ASUSTeK COMPUTER INC. ASUS EXPERTBOOK B9403CVAR/B9403CVAR, BIOS B9403CVAR.311 12/24/2024
Call Trace:
 <TASK>
 [...]
 schedule_timeout+0xbd/0x100
 __down_common+0x175/0x290
 down_timeout+0x67/0x70
 acpi_os_wait_semaphore+0x57/0x90
 [...]
 asus_wmi_evaluate_method3+0x87/0x190 [asus_wmi]
 led_trigger_event+0x3f/0x60
 [...]
Fixes 9fe44fc98ce4 ("platform/x86: asus-wmi: Simplify the keyboard brightness updating process")
---
 drivers/platform/x86/asus-wmi.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/platform/x86/asus-wmi.c +4 -4
index e72a2b5d158e9..8e3300f5c2943 100644
@@ -1619,14 +1619,14 @@ static void do_kbd_led_set(struct led_classdev *led_cdev, int value)
 	kbd_led_update(asus);
 }
 
-static void kbd_led_set(struct led_classdev *led_cdev,
-			enum led_brightness value)
+static int kbd_led_set(struct led_classdev *led_cdev, enum led_brightness value)
 {
 	/* Prevent disabling keyboard backlight on module unregister */
 	if (led_cdev->flags & LED_UNREGISTERING)
-		return;
+		return 0;
 
 	do_kbd_led_set(led_cdev, value);
+	return 0;
 }
 
 static void kbd_led_set_by_kbd(struct asus_wmi *asus, enum led_brightness value)
@@ -1802,7 +1802,7 @@ static int asus_wmi_led_init(struct asus_wmi *asus)
 		asus->kbd_led_wk = led_val;
 		asus->kbd_led.name = "asus::kbd_backlight";
 		asus->kbd_led.flags = LED_BRIGHT_HW_CHANGED;
-		asus->kbd_led.brightness_set = kbd_led_set;
+		asus->kbd_led.brightness_set_blocking = kbd_led_set;
 		asus->kbd_led.brightness_get = kbd_led_get;
 		asus->kbd_led.max_brightness = 3;
 
Signature · 1 line
2.51.0
author maintainer
#565 lore raw

PATCH 554/614 ASoC: bcm: bcm63xx-pcm-whistler: Check return value of of_dma_configure()

In reply to Greg Kroah-Hartman

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

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

From: Haotian Zhang <[email protected]>

[ Upstream commit 0ebbd45c33d0049ebf5a22c1434567f0c420b333 ]

bcm63xx_soc_pcm_new() does not check the return value of of_dma_configure(), which may fail with -EPROBE_DEFER or other errors, allowing PCM setup to continue with incomplete DMA configuration.

Add error checking for of_dma_configure() and return on failure.

Fixes 88eb404ccc3e ("ASoC: brcm: Add DSL/PON SoC audio driver")
---
 sound/soc/bcm/bcm63xx-pcm-whistler.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
sound/soc/bcm/bcm63xx-pcm-whistler.c +3 -1
index e3a4fcc63a56d..efeb06ddabeb3 100644
@@ -358,7 +358,9 @@ static int bcm63xx_soc_pcm_new(struct snd_soc_component *component,
 
 	i2s_priv = dev_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)->dev);
 
-	of_dma_configure(pcm->card->dev, pcm->card->dev->of_node, 1);
+	ret = of_dma_configure(pcm->card->dev, pcm->card->dev->of_node, 1);
+	if (ret)
+		return ret;
 
 	ret = dma_coerce_mask_and_coherent(pcm->card->dev, DMA_BIT_MASK(32));
 	if (ret)
Signature · 1 line
2.51.0
author maintainer
#566 lore raw

PATCH 555/614 ASoC: amd: acp: Audio is not resuming after s0ix

In reply to Greg Kroah-Hartman

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

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

From: Hemalatha Pinnamreddy <[email protected]>

[ Upstream commit 3ee257aba1d56c3f0f1028669a8ad0f1a477f05b ]

Audio fails to resume after system exits suspend mode due to accessing incorrect ring buffer address during resume. This patch resolves issue by selecting correct address based on the ACP version.

---
 sound/soc/amd/acp/acp-legacy-common.c | 30 +++++++++++++++++++++------
 1 file changed, 24 insertions(+), 6 deletions(-)
sound/soc/amd/acp/acp-legacy-common.c +24 -6
index 3078f459e0050..4e477c48d4bdd 100644
@@ -219,7 +219,10 @@ static int set_acp_i2s_dma_fifo(struct snd_pcm_substream *substream,
 					SP_PB_FIFO_ADDR_OFFSET;
 			reg_fifo_addr = ACP_I2S_TX_FIFOADDR(chip);
 			reg_fifo_size = ACP_I2S_TX_FIFOSIZE(chip);
-			phy_addr = I2S_SP_TX_MEM_WINDOW_START + stream->reg_offset;
+			if (chip->acp_rev >= ACP70_PCI_ID)
+				phy_addr = ACP7x_I2S_SP_TX_MEM_WINDOW_START;
+			else
+				phy_addr = I2S_SP_TX_MEM_WINDOW_START + stream->reg_offset;
 			writel(phy_addr, chip->base + ACP_I2S_TX_RINGBUFADDR(chip));
 		} else {
 			reg_dma_size = ACP_I2S_RX_DMA_SIZE(chip);
@@ -227,7 +230,10 @@ static int set_acp_i2s_dma_fifo(struct snd_pcm_substream *substream,
 					SP_CAPT_FIFO_ADDR_OFFSET;
 			reg_fifo_addr = ACP_I2S_RX_FIFOADDR(chip);
 			reg_fifo_size = ACP_I2S_RX_FIFOSIZE(chip);
-			phy_addr = I2S_SP_RX_MEM_WINDOW_START + stream->reg_offset;
+			if (chip->acp_rev >= ACP70_PCI_ID)
+				phy_addr = ACP7x_I2S_SP_RX_MEM_WINDOW_START;
+			else
+				phy_addr = I2S_SP_RX_MEM_WINDOW_START + stream->reg_offset;
 			writel(phy_addr, chip->base + ACP_I2S_RX_RINGBUFADDR(chip));
 		}
 		break;
@@ -238,7 +244,10 @@ static int set_acp_i2s_dma_fifo(struct snd_pcm_substream *substream,
 					BT_PB_FIFO_ADDR_OFFSET;
 			reg_fifo_addr = ACP_BT_TX_FIFOADDR(chip);
 			reg_fifo_size = ACP_BT_TX_FIFOSIZE(chip);
-			phy_addr = I2S_BT_TX_MEM_WINDOW_START + stream->reg_offset;
+			if (chip->acp_rev >= ACP70_PCI_ID)
+				phy_addr = ACP7x_I2S_BT_TX_MEM_WINDOW_START;
+			else
+				phy_addr = I2S_BT_TX_MEM_WINDOW_START + stream->reg_offset;
 			writel(phy_addr, chip->base + ACP_BT_TX_RINGBUFADDR(chip));
 		} else {
 			reg_dma_size = ACP_BT_RX_DMA_SIZE(chip);
@@ -246,7 +255,10 @@ static int set_acp_i2s_dma_fifo(struct snd_pcm_substream *substream,
 					BT_CAPT_FIFO_ADDR_OFFSET;
 			reg_fifo_addr = ACP_BT_RX_FIFOADDR(chip);
 			reg_fifo_size = ACP_BT_RX_FIFOSIZE(chip);
-			phy_addr = I2S_BT_TX_MEM_WINDOW_START + stream->reg_offset;
+			if (chip->acp_rev >= ACP70_PCI_ID)
+				phy_addr = ACP7x_I2S_BT_RX_MEM_WINDOW_START;
+			else
+				phy_addr = I2S_BT_RX_MEM_WINDOW_START + stream->reg_offset;
 			writel(phy_addr, chip->base + ACP_BT_RX_RINGBUFADDR(chip));
 		}
 		break;
@@ -257,7 +269,10 @@ static int set_acp_i2s_dma_fifo(struct snd_pcm_substream *substream,
 					HS_PB_FIFO_ADDR_OFFSET;
 			reg_fifo_addr = ACP_HS_TX_FIFOADDR;
 			reg_fifo_size = ACP_HS_TX_FIFOSIZE;
-			phy_addr = I2S_HS_TX_MEM_WINDOW_START + stream->reg_offset;
+			if (chip->acp_rev >= ACP70_PCI_ID)
+				phy_addr = ACP7x_I2S_HS_TX_MEM_WINDOW_START;
+			else
+				phy_addr = I2S_HS_TX_MEM_WINDOW_START + stream->reg_offset;
 			writel(phy_addr, chip->base + ACP_HS_TX_RINGBUFADDR);
 		} else {
 			reg_dma_size = ACP_HS_RX_DMA_SIZE;
@@ -265,7 +280,10 @@ static int set_acp_i2s_dma_fifo(struct snd_pcm_substream *substream,
 					HS_CAPT_FIFO_ADDR_OFFSET;
 			reg_fifo_addr = ACP_HS_RX_FIFOADDR;
 			reg_fifo_size = ACP_HS_RX_FIFOSIZE;
-			phy_addr = I2S_HS_RX_MEM_WINDOW_START + stream->reg_offset;
+			if (chip->acp_rev >= ACP70_PCI_ID)
+				phy_addr = ACP7x_I2S_HS_RX_MEM_WINDOW_START;
+			else
+				phy_addr = I2S_HS_RX_MEM_WINDOW_START + stream->reg_offset;
 			writel(phy_addr, chip->base + ACP_HS_RX_RINGBUFADDR);
 		}
 		break;
Signature · 1 line
2.51.0
author maintainer
#567 lore raw

PATCH 556/614 ASoC: ak4458: Disable regulator when error happens

In reply to Greg Kroah-Hartman

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

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

From: Shengjiu Wang <[email protected]>

[ Upstream commit ae585fabb9713a43e358cf606451386757225c95 ]

Disable regulator in runtime resume when error happens to balance the reference count of regulator.

Fixes 7e3096e8f823 ("ASoC: ak4458: Add regulator support")
---
 sound/soc/codecs/ak4458.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
sound/soc/codecs/ak4458.c +9 -1
index 57cf601d3df35..a6c04dd3de3ed 100644
@@ -671,7 +671,15 @@ static int ak4458_runtime_resume(struct device *dev)
 	regcache_cache_only(ak4458->regmap, false);
 	regcache_mark_dirty(ak4458->regmap);
 
-	return regcache_sync(ak4458->regmap);
+	ret = regcache_sync(ak4458->regmap);
+	if (ret)
+		goto err;
+
+	return 0;
+err:
+	regcache_cache_only(ak4458->regmap, true);
+	regulator_bulk_disable(ARRAY_SIZE(ak4458->supplies), ak4458->supplies);
+	return ret;
 }
 
 static const struct snd_soc_component_driver soc_codec_dev_ak4458 = {
Signature · 1 line
2.51.0
author maintainer
#568 lore raw

PATCH 557/614 ASoC: ak5558: Disable regulator when error happens

In reply to Greg Kroah-Hartman

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

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

From: Shengjiu Wang <[email protected]>

[ Upstream commit 1f8f726a2a29c28f65b30880335a1610c5e63594 ]

Disable regulator in runtime resume when error happens to balance the reference count of regulator.

Fixes 2ff6d5a108c6 ("ASoC: ak5558: Add regulator support")
---
 sound/soc/codecs/ak5558.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
sound/soc/codecs/ak5558.c +9 -1
index 683f3e472f500..73684fc5beb1a 100644
@@ -372,7 +372,15 @@ static int ak5558_runtime_resume(struct device *dev)
 	regcache_cache_only(ak5558->regmap, false);
 	regcache_mark_dirty(ak5558->regmap);
 
-	return regcache_sync(ak5558->regmap);
+	ret = regcache_sync(ak5558->regmap);
+	if (ret)
+		goto err;
+
+	return 0;
+err:
+	regcache_cache_only(ak5558->regmap, true);
+	regulator_bulk_disable(ARRAY_SIZE(ak5558->supplies), ak5558->supplies);
+	return ret;
 }
 
 static const struct dev_pm_ops ak5558_pm = {
Signature · 1 line
2.51.0
author maintainer
#569 lore raw

PATCH 558/614 f2fs: revert summary entry count from 2048 to 512 in 16kb block support

In reply to Greg Kroah-Hartman

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

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

From: Daeho Jeong <[email protected]>

[ Upstream commit 7ee8bc3942f20964ad730871b885688ea3a2961a ]

The recent increase in the number of Segment Summary Area (SSA) entries from 512 to 2048 was an unintentional change in logic of 16kb block support. This commit corrects the issue.

To better utilize the space available from the erroneous 2048-entry calculation, we are implementing a solution to share the currently unused SSA space with neighboring segments. This enhances overall SSA utilization without impacting the established 8MB segment size.

Fixes d7e9a9037de2 ("f2fs: Support Block Size == Page Size")
---
 fs/f2fs/f2fs.h          |   2 +
 fs/f2fs/gc.c            | 117 +++++++++++++++++++++++-----------------
 fs/f2fs/recovery.c      |   2 +-
 fs/f2fs/segment.c       |  38 +++++++++----
 fs/f2fs/segment.h       |   8 ++-
 fs/f2fs/super.c         |  14 +++++
 fs/f2fs/sysfs.c         |   7 +++
 include/linux/f2fs_fs.h |   5 +-
 8 files changed, 130 insertions(+), 63 deletions(-)
fs/f2fs/f2fs.h +2 -0
index 5b4e9548a231f..5149f351f03d2 100644
@@ -245,6 +245,7 @@ struct f2fs_mount_info {
 #define F2FS_FEATURE_COMPRESSION		0x00002000
 #define F2FS_FEATURE_RO				0x00004000
 #define F2FS_FEATURE_DEVICE_ALIAS		0x00008000
+#define F2FS_FEATURE_PACKED_SSA			0x00010000
 
 #define __F2FS_HAS_FEATURE(raw_super, mask)				\
 	((raw_super->feature & cpu_to_le32(mask)) != 0)
@@ -4710,6 +4711,7 @@ F2FS_FEATURE_FUNCS(casefold, CASEFOLD);
 F2FS_FEATURE_FUNCS(compression, COMPRESSION);
 F2FS_FEATURE_FUNCS(readonly, RO);
 F2FS_FEATURE_FUNCS(device_alias, DEVICE_ALIAS);
+F2FS_FEATURE_FUNCS(packed_ssa, PACKED_SSA);
 
 #ifdef CONFIG_BLK_DEV_ZONED
 static inline bool f2fs_zone_is_seq(struct f2fs_sb_info *sbi, int devi,
fs/f2fs/gc.c +69 -48

166 lines not on this page · raw message

fs/f2fs/recovery.c +1 -1
index 215e442db72c8..af72309b9bfc6 100644
@@ -519,7 +519,7 @@ static int check_index_in_prev_nodes(struct f2fs_sb_info *sbi,
 	sum_folio = f2fs_get_sum_folio(sbi, segno);
 	if (IS_ERR(sum_folio))
 		return PTR_ERR(sum_folio);
-	sum_node = folio_address(sum_folio);
+	sum_node = SUM_BLK_PAGE_ADDR(sum_folio, segno);
 	sum = sum_node->entries[blkoff];
 	f2fs_folio_put(sum_folio, true);
 got_it:
fs/f2fs/segment.c +28 -10
index b45eace879d74..ac84559dc2693 100644
@@ -2712,7 +2712,15 @@ struct folio *f2fs_get_sum_folio(struct f2fs_sb_info *sbi, unsigned int segno)
 void f2fs_update_meta_page(struct f2fs_sb_info *sbi,
 					void *src, block_t blk_addr)
 {
-	struct folio *folio = f2fs_grab_meta_folio(sbi, blk_addr);
+	struct folio *folio;
+
+	if (SUMS_PER_BLOCK == 1)
+		folio = f2fs_grab_meta_folio(sbi, blk_addr);
+	else
+		folio = f2fs_get_meta_folio_retry(sbi, blk_addr);
+
+	if (IS_ERR(folio))
+		return;
 
 	memcpy(folio_address(folio), src, PAGE_SIZE);
 	folio_mark_dirty(folio);
@@ -2720,9 +2728,21 @@ void f2fs_update_meta_page(struct f2fs_sb_info *sbi,
 }
 
 static void write_sum_page(struct f2fs_sb_info *sbi,
-			struct f2fs_summary_block *sum_blk, block_t blk_addr)
+		struct f2fs_summary_block *sum_blk, unsigned int segno)
 {
-	f2fs_update_meta_page(sbi, (void *)sum_blk, blk_addr);
+	struct folio *folio;
+
+	if (SUMS_PER_BLOCK == 1)
+		return f2fs_update_meta_page(sbi, (void *)sum_blk,
+				GET_SUM_BLOCK(sbi, segno));
+
+	folio = f2fs_get_sum_folio(sbi, segno);
+	if (IS_ERR(folio))
+		return;
+
+	memcpy(SUM_BLK_PAGE_ADDR(folio, segno), sum_blk, sizeof(*sum_blk));
+	folio_mark_dirty(folio);
+	f2fs_folio_put(folio, true);
 }
 
 static void write_current_sum_page(struct f2fs_sb_info *sbi,
@@ -2987,7 +3007,7 @@ static int new_curseg(struct f2fs_sb_info *sbi, int type, bool new_sec)
 	int ret;
 
 	if (curseg->inited)
-		write_sum_page(sbi, curseg->sum_blk, GET_SUM_BLOCK(sbi, segno));
+		write_sum_page(sbi, curseg->sum_blk, segno);
 
 	segno = __get_next_segno(sbi, type);
 	ret = get_new_segment(sbi, &segno, new_sec, pinning);
@@ -3046,7 +3066,7 @@ static int change_curseg(struct f2fs_sb_info *sbi, int type)
 	struct folio *sum_folio;
 
 	if (curseg->inited)
-		write_sum_page(sbi, curseg->sum_blk, GET_SUM_BLOCK(sbi, curseg->segno));
+		write_sum_page(sbi, curseg->sum_blk, curseg->segno);
 
 	__set_test_and_inuse(sbi, new_segno);
 
@@ -3065,7 +3085,7 @@ static int change_curseg(struct f2fs_sb_info *sbi, int type)
 		memset(curseg->sum_blk, 0, SUM_ENTRY_SIZE);
 		return PTR_ERR(sum_folio);
 	}
-	sum_node = folio_address(sum_folio);
+	sum_node = SUM_BLK_PAGE_ADDR(sum_folio, new_segno);
 	memcpy(curseg->sum_blk, sum_node, SUM_ENTRY_SIZE);
 	f2fs_folio_put(sum_folio, true);
 	return 0;
@@ -3154,8 +3174,7 @@ static void __f2fs_save_inmem_curseg(struct f2fs_sb_info *sbi, int type)
 		goto out;
 
 	if (get_valid_blocks(sbi, curseg->segno, false)) {
-		write_sum_page(sbi, curseg->sum_blk,
-				GET_SUM_BLOCK(sbi, curseg->segno));
+		write_sum_page(sbi, curseg->sum_blk, curseg->segno);
 	} else {
 		mutex_lock(&DIRTY_I(sbi)->seglist_lock);
 		__set_test_and_free(sbi, curseg->segno, true);
@@ -3833,8 +3852,7 @@ int f2fs_allocate_data_block(struct f2fs_sb_info *sbi, struct folio *folio,
 	if (segment_full) {
 		if (type == CURSEG_COLD_DATA_PINNED &&
 		    !((curseg->segno + 1) % sbi->segs_per_sec)) {
-			write_sum_page(sbi, curseg->sum_blk,
-					GET_SUM_BLOCK(sbi, curseg->segno));
+			write_sum_page(sbi, curseg->sum_blk, curseg->segno);
 			reset_curseg_fields(curseg);
 			goto skip_new_segment;
 		}
fs/f2fs/segment.h +6 -2
index 1ce2c8abaf488..e883f14c228f2 100644
@@ -85,8 +85,12 @@ static inline void sanity_check_seg_type(struct f2fs_sb_info *sbi,
 #define GET_ZONE_FROM_SEG(sbi, segno)				\
 	GET_ZONE_FROM_SEC(sbi, GET_SEC_FROM_SEG(sbi, segno))
 
-#define GET_SUM_BLOCK(sbi, segno)				\
-	((sbi)->sm_info->ssa_blkaddr + (segno))
+#define SUMS_PER_BLOCK (F2FS_BLKSIZE / F2FS_SUM_BLKSIZE)
+#define GET_SUM_BLOCK(sbi, segno)	\
+	(SM_I(sbi)->ssa_blkaddr + (segno / SUMS_PER_BLOCK))
+#define GET_SUM_BLKOFF(segno) (segno % SUMS_PER_BLOCK)
+#define SUM_BLK_PAGE_ADDR(folio, segno)	\
+	(folio_address(folio) + GET_SUM_BLKOFF(segno) * F2FS_SUM_BLKSIZE)
 
 #define GET_SUM_TYPE(footer) ((footer)->entry_type)
 #define SET_SUM_TYPE(footer, type) ((footer)->entry_type = (type))
fs/f2fs/super.c +14 -0
index db7afb8064115..9085b4a511a48 100644
@@ -4051,6 +4051,20 @@ static int sanity_check_raw_super(struct f2fs_sb_info *sbi,
 	if (sanity_check_area_boundary(sbi, folio, index))
 		return -EFSCORRUPTED;
 
+	/*
+	 * Check for legacy summary layout on 16KB+ block devices.
+	 * Modern f2fs-tools packs multiple 4KB summary areas into one block,
+	 * whereas legacy versions used one block per summary, leading
+	 * to a much larger SSA.
+	 */
+	if (SUMS_PER_BLOCK > 1 &&
+		    !(__F2FS_HAS_FEATURE(raw_super, F2FS_FEATURE_PACKED_SSA))) {
+		f2fs_info(sbi, "Error: Device formatted with a legacy version. "
+			"Please reformat with a tool supporting the packed ssa "
+			"feature for block sizes larger than 4kb.");
+		return -EOPNOTSUPP;
+	}
+
 	return 0;
 }
 
fs/f2fs/sysfs.c +7 -0
index 6d2a4fba68a29..5685b454bfd12 100644
@@ -235,6 +235,9 @@ static ssize_t features_show(struct f2fs_attr *a,
 	if (f2fs_sb_has_compression(sbi))
 		len += sysfs_emit_at(buf, len, "%s%s",
 				len ? ", " : "", "compression");
+	if (f2fs_sb_has_packed_ssa(sbi))
+		len += sysfs_emit_at(buf, len, "%s%s",
+				len ? ", " : "", "packed_ssa");
 	len += sysfs_emit_at(buf, len, "%s%s",
 				len ? ", " : "", "pin_file");
 	len += sysfs_emit_at(buf, len, "\n");
@@ -1296,6 +1299,7 @@ F2FS_FEATURE_RO_ATTR(pin_file);
 #ifdef CONFIG_UNICODE
 F2FS_FEATURE_RO_ATTR(linear_lookup);
 #endif
+F2FS_FEATURE_RO_ATTR(packed_ssa);
 
 #define ATTR_LIST(name) (&f2fs_attr_##name.attr)
 static struct attribute *f2fs_attrs[] = {
@@ -1455,6 +1459,7 @@ static struct attribute *f2fs_feat_attrs[] = {
 #ifdef CONFIG_UNICODE
 	BASE_ATTR_LIST(linear_lookup),
 #endif
+	BASE_ATTR_LIST(packed_ssa),
 	NULL,
 };
 ATTRIBUTE_GROUPS(f2fs_feat);
@@ -1490,6 +1495,7 @@ F2FS_SB_FEATURE_RO_ATTR(casefold, CASEFOLD);
 F2FS_SB_FEATURE_RO_ATTR(compression, COMPRESSION);
 F2FS_SB_FEATURE_RO_ATTR(readonly, RO);
 F2FS_SB_FEATURE_RO_ATTR(device_alias, DEVICE_ALIAS);
+F2FS_SB_FEATURE_RO_ATTR(packed_ssa, PACKED_SSA);
 
 static struct attribute *f2fs_sb_feat_attrs[] = {
 	ATTR_LIST(sb_encryption),
@@ -1507,6 +1513,7 @@ static struct attribute *f2fs_sb_feat_attrs[] = {
 	ATTR_LIST(sb_compression),
 	ATTR_LIST(sb_readonly),
 	ATTR_LIST(sb_device_alias),
+	ATTR_LIST(sb_packed_ssa),
 	NULL,
 };
 ATTRIBUTE_GROUPS(f2fs_sb_feat);
include/linux/f2fs_fs.h +3 -2
index 6afb4a13b81d6..a7880787cad36 100644
@@ -17,6 +17,7 @@
 #define F2FS_LOG_SECTORS_PER_BLOCK	(PAGE_SHIFT - 9) /* log number for sector/blk */
 #define F2FS_BLKSIZE			PAGE_SIZE /* support only block == page */
 #define F2FS_BLKSIZE_BITS		PAGE_SHIFT /* bits for F2FS_BLKSIZE */
+#define F2FS_SUM_BLKSIZE		4096	/* only support 4096 byte sum block */
 #define F2FS_MAX_EXTENSION		64	/* # of extension entries */
 #define F2FS_EXTENSION_LEN		8	/* max size of extension */
 
@@ -441,7 +442,7 @@ struct f2fs_sit_block {
  * from node's page's beginning to get a data block address.
  * ex) data_blkaddr = (block_t)(nodepage_start_address + ofs_in_node)
  */
-#define ENTRIES_IN_SUM		(F2FS_BLKSIZE / 8)
+#define ENTRIES_IN_SUM		(F2FS_SUM_BLKSIZE / 8)
 #define	SUMMARY_SIZE		(7)	/* sizeof(struct f2fs_summary) */
 #define	SUM_FOOTER_SIZE		(5)	/* sizeof(struct summary_footer) */
 #define SUM_ENTRY_SIZE		(SUMMARY_SIZE * ENTRIES_IN_SUM)
@@ -467,7 +468,7 @@ struct summary_footer {
 	__le32 check_sum;		/* summary checksum */
 } __packed;
 
-#define SUM_JOURNAL_SIZE	(F2FS_BLKSIZE - SUM_FOOTER_SIZE -\
+#define SUM_JOURNAL_SIZE	(F2FS_SUM_BLKSIZE - SUM_FOOTER_SIZE -\
 				SUM_ENTRY_SIZE)
 #define NAT_JOURNAL_ENTRIES	((SUM_JOURNAL_SIZE - 2) /\
 				sizeof(struct nat_journal_entry))
Signature · 1 line
2.51.0
author maintainer
#570 lore raw

PATCH 559/614 blk-mq: Abort suspend when wakeup events are pending

In reply to Greg Kroah-Hartman

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

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

From: Cong Zhang <[email protected]>

[ Upstream commit c196bf43d706592d8801a7513603765080e495fb ]

During system suspend, wakeup capable IRQs for block device can be delayed, which can cause blk_mq_hctx_notify_offline() to hang indefinitely while waiting for pending request to complete. Skip the request waiting loop and abort suspend when wakeup events are pending to prevent the deadlock.

Fixes bf0beec0607d ("blk-mq: drain I/O when all CPUs in a hctx are offline")
---
 block/blk-mq.c | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)
block/blk-mq.c +16 -2
index d626d32f6e576..33a0062f9e56d 100644
@@ -23,6 +23,7 @@
 #include <linux/cache.h>
 #include <linux/sched/topology.h>
 #include <linux/sched/signal.h>
+#include <linux/suspend.h>
 #include <linux/delay.h>
 #include <linux/crash_dump.h>
 #include <linux/prefetch.h>
@@ -3707,6 +3708,7 @@ static int blk_mq_hctx_notify_offline(unsigned int cpu, struct hlist_node *node)
 {
 	struct blk_mq_hw_ctx *hctx = hlist_entry_safe(node,
 			struct blk_mq_hw_ctx, cpuhp_online);
+	int ret = 0;
 
 	if (blk_mq_hctx_has_online_cpu(hctx, cpu))
 		return 0;
@@ -3727,12 +3729,24 @@ static int blk_mq_hctx_notify_offline(unsigned int cpu, struct hlist_node *node)
 	 * frozen and there are no requests.
 	 */
 	if (percpu_ref_tryget(&hctx->queue->q_usage_counter)) {
-		while (blk_mq_hctx_has_requests(hctx))
+		while (blk_mq_hctx_has_requests(hctx)) {
+			/*
+			 * The wakeup capable IRQ handler of block device is
+			 * not called during suspend. Skip the loop by checking
+			 * pm_wakeup_pending to prevent the deadlock and improve
+			 * suspend latency.
+			 */
+			if (pm_wakeup_pending()) {
+				clear_bit(BLK_MQ_S_INACTIVE, &hctx->state);
+				ret = -EBUSY;
+				break;
+			}
 			msleep(5);
+		}
 		percpu_ref_put(&hctx->queue->q_usage_counter);
 	}
 
-	return 0;
+	return ret;
 }
 
 /*
Signature · 1 line
2.51.0
author maintainer
#571 lore raw

PATCH 560/614 drm/panel: novatek-nt35560: avoid on-stack device structure

In reply to Greg Kroah-Hartman

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

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

From: Arnd Bergmann <[email protected]>

[ Upstream commit 1a7a7b80a22448dff55e1ad69a4681fd8b760b85 ]

A cleanup patch apparently by accident used a local device structure instead of a pointer to one in the nt35560_read_id() function, causing a warning about stack usage:

drivers/gpu/drm/panel/panel-novatek-nt35560.c: In function 'nt35560_read_id':
drivers/gpu/drm/panel/panel-novatek-nt35560.c:249:1: error: the frame size of 1296 bytes is larger than 1280 bytes [-Werror=frame-larger-than=]

Change this to a pointer as was liley intended here.

---
 drivers/gpu/drm/panel/panel-novatek-nt35560.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/panel/panel-novatek-nt35560.c +4 -4
index 561e6643dcbb6..6e5173f98a226 100644
@@ -213,7 +213,7 @@ static const struct backlight_properties nt35560_bl_props = {
 
 static void nt35560_read_id(struct mipi_dsi_multi_context *dsi_ctx)
 {
-	struct device dev = dsi_ctx->dsi->dev;
+	struct device *dev = &dsi_ctx->dsi->dev;
 	u8 vendor, version, panel;
 	u16 val;
 
@@ -225,7 +225,7 @@ static void nt35560_read_id(struct mipi_dsi_multi_context *dsi_ctx)
 		return;
 
 	if (vendor == 0x00) {
-		dev_err(&dev, "device vendor ID is zero\n");
+		dev_err(dev, "device vendor ID is zero\n");
 		dsi_ctx->accum_err = -ENODEV;
 		return;
 	}
@@ -236,12 +236,12 @@ static void nt35560_read_id(struct mipi_dsi_multi_context *dsi_ctx)
 	case DISPLAY_SONY_ACX424AKP_ID2:
 	case DISPLAY_SONY_ACX424AKP_ID3:
 	case DISPLAY_SONY_ACX424AKP_ID4:
-		dev_info(&dev,
+		dev_info(dev,
 			 "MTP vendor: %02x, version: %02x, panel: %02x\n",
 			 vendor, version, panel);
 		break;
 	default:
-		dev_info(&dev,
+		dev_info(dev,
 			 "unknown vendor: %02x, version: %02x, panel: %02x\n",
 			 vendor, version, panel);
 		break;
Signature · 1 line
2.51.0
author maintainer
#572 lore raw

PATCH 561/614 block: fix comment for op_is_zone_mgmt() to include RESET_ALL

In reply to Greg Kroah-Hartman

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

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

From: shechenglong <[email protected]>

[ Upstream commit 8a32282175c964eb15638e8dfe199fc13c060f67 ]

REQ_OP_ZONE_RESET_ALL is a zone management request, and op_is_zone_mgmt() has returned true for it.

Update the comment to remove the misleading exception note so the documentation matches the implementation.

Fixes 12a1c9353c47 ("block: fix op_is_zone_mgmt() to handle REQ_OP_ZONE_RESET_ALL")
---
 include/linux/blk_types.h | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
include/linux/blk_types.h +1 -4
index 44c30183ecc34..4e2e3aed32f5f 100644
@@ -469,10 +469,7 @@ static inline bool op_is_discard(blk_opf_t op)
 }
 
 /*
- * Check if a bio or request operation is a zone management operation, with
- * the exception of REQ_OP_ZONE_RESET_ALL which is treated as a special case
- * due to its different handling in the block layer and device response in
- * case of command failure.
+ * Check if a bio or request operation is a zone management operation.
  */
 static inline bool op_is_zone_mgmt(enum req_op op)
 {
Signature · 1 line
2.51.0
author maintainer
#573 lore raw

PATCH 562/614 block: fix memory leak in __blkdev_issue_zero_pages

In reply to Greg Kroah-Hartman

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

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

From: Shaurya Rane <[email protected]>

[ Upstream commit f7e3f852a42d7cd8f1af2c330d9d153e30c8adcf ]

Move the fatal signal check before bio_alloc() to prevent a memory leak when BLKDEV_ZERO_KILLABLE is set and a fatal signal is pending.

Previously, the bio was allocated before checking for a fatal signal. If a signal was pending, the code would break out of the loop without freeing or chaining the just-allocated bio, causing a memory leak.

This matches the pattern already used in __blkdev_issue_write_zeroes() where the signal check precedes the allocation.

Fixes bf86bcdb4012 ("blk-lib: check for kill signal in ioctl BLKZEROOUT")
Reported-by [email protected]
---
 block/blk-lib.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
block/blk-lib.c +3 -3
index 3030a772d3aa0..352e3c0f8a7d7 100644
@@ -202,13 +202,13 @@ static void __blkdev_issue_zero_pages(struct block_device *bdev,
 		unsigned int nr_vecs = __blkdev_sectors_to_bio_pages(nr_sects);
 		struct bio *bio;
 
-		bio = bio_alloc(bdev, nr_vecs, REQ_OP_WRITE, gfp_mask);
-		bio->bi_iter.bi_sector = sector;
-
 		if ((flags & BLKDEV_ZERO_KILLABLE) &&
 		    fatal_signal_pending(current))
 			break;
 
+		bio = bio_alloc(bdev, nr_vecs, REQ_OP_WRITE, gfp_mask);
+		bio->bi_iter.bi_sector = sector;
+
 		do {
 			unsigned int len;
 
Signature · 1 line
2.51.0
author maintainer
#574 lore raw

PATCH 563/614 nvme-auth: use kvfree() for memory allocated with kvcalloc()

In reply to Greg Kroah-Hartman

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

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

From: Israel Rukshin <[email protected]>

[ Upstream commit bb9f4cca7c031de6f0e85f7ba24abf0172829f85 ]

Memory allocated by kvcalloc() may come from vmalloc or kmalloc, so use kvfree() instead of kfree() for proper deallocation.

Fixes aa36d711e945 ("nvme-auth: convert dhchap_auth_list to an array")
---
 drivers/nvme/host/auth.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/auth.c +1 -1
index a01178caf15bb..8f3ccb317e4de 100644
@@ -1122,7 +1122,7 @@ void nvme_auth_free(struct nvme_ctrl *ctrl)
 	if (ctrl->dhchap_ctxs) {
 		for (i = 0; i < ctrl_max_dhchaps(ctrl); i++)
 			nvme_auth_free_dhchap(&ctrl->dhchap_ctxs[i]);
-		kfree(ctrl->dhchap_ctxs);
+		kvfree(ctrl->dhchap_ctxs);
 	}
 	if (ctrl->host_key) {
 		nvme_auth_free_key(ctrl->host_key);
Signature · 1 line
2.51.0
author maintainer
#575 lore raw

PATCH 564/614 io_uring/kbuf: use READ_ONCE() for userspace-mapped memory

In reply to Greg Kroah-Hartman

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

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

From: Caleb Sander Mateos <[email protected]>

[ Upstream commit 78385c7299f7514697d196b3233a91bd5e485591 ]

The struct io_uring_buf elements in a buffer ring are in a memory region accessible from userspace. A malicious/buggy userspace program could therefore write to them at any time, so they should be accessed with READ_ONCE() in the kernel. Commit 98b6fa62c84f ("io_uring/kbuf: always use READ_ONCE() to read ring provided buffer lengths") already switched the reads of the len field to READ_ONCE(). Do the same for bid and addr.

Fixes c7fb19428d67 ("io_uring: add support for ring mapped supplied buffers")
Cc Joanne Koong <[email protected]>
---
 io_uring/kbuf.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
io_uring/kbuf.c +5 -5
index a727e020fe036..d974381d93ff7 100644
@@ -44,7 +44,7 @@ static bool io_kbuf_inc_commit(struct io_buffer_list *bl, int len)
 		buf_len -= this_len;
 		/* Stop looping for invalid buffer length of 0 */
 		if (buf_len || !this_len) {
-			buf->addr += this_len;
+			buf->addr = READ_ONCE(buf->addr) + this_len;
 			buf->len = buf_len;
 			return false;
 		}
@@ -198,9 +198,9 @@ static struct io_br_sel io_ring_buffer_select(struct io_kiocb *req, size_t *len,
 	if (*len == 0 || *len > buf_len)
 		*len = buf_len;
 	req->flags |= REQ_F_BUFFER_RING | REQ_F_BUFFERS_COMMIT;
-	req->buf_index = buf->bid;
+	req->buf_index = READ_ONCE(buf->bid);
 	sel.buf_list = bl;
-	sel.addr = u64_to_user_ptr(buf->addr);
+	sel.addr = u64_to_user_ptr(READ_ONCE(buf->addr));
 
 	if (io_should_commit(req, issue_flags)) {
 		io_kbuf_commit(req, sel.buf_list, *len, 1);
@@ -280,7 +280,7 @@ static int io_ring_buffers_peek(struct io_kiocb *req, struct buf_sel_arg *arg,
 	if (!arg->max_len)
 		arg->max_len = INT_MAX;
 
-	req->buf_index = buf->bid;
+	req->buf_index = READ_ONCE(buf->bid);
 	do {
 		u32 len = READ_ONCE(buf->len);
 
@@ -295,7 +295,7 @@ static int io_ring_buffers_peek(struct io_kiocb *req, struct buf_sel_arg *arg,
 			}
 		}
 
-		iov->iov_base = u64_to_user_ptr(buf->addr);
+		iov->iov_base = u64_to_user_ptr(READ_ONCE(buf->addr));
 		iov->iov_len = len;
 		iov++;
 
Signature · 1 line
2.51.0
author maintainer
#576 lore raw

PATCH 565/614 drm/plane: Fix IS_ERR() vs NULL check in drm_plane_create_hotspot_properties()

In reply to Greg Kroah-Hartman

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

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

From: Dan Carpenter <[email protected]>

[ Upstream commit 479acb9db3199cdb70e5478a6f633b5f20c7d8df ]

The drm_property_create_signed_range() function doesn't return error pointers it returns NULL on error. Fix the error checking to match.

---
 drivers/gpu/drm/drm_plane.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/drm_plane.c +4 -4
index a30493ed97157..4cadea997129d 100644
@@ -338,14 +338,14 @@ static int drm_plane_create_hotspot_properties(struct drm_plane *plane)
 
 	prop_x = drm_property_create_signed_range(plane->dev, 0, "HOTSPOT_X",
 						  INT_MIN, INT_MAX);
-	if (IS_ERR(prop_x))
-		return PTR_ERR(prop_x);
+	if (!prop_x)
+		return -ENOMEM;
 
 	prop_y = drm_property_create_signed_range(plane->dev, 0, "HOTSPOT_Y",
 						  INT_MIN, INT_MAX);
-	if (IS_ERR(prop_y)) {
+	if (!prop_y) {
 		drm_property_destroy(plane->dev, prop_x);
-		return PTR_ERR(prop_y);
+		return -ENOMEM;
 	}
 
 	drm_object_attach_property(&plane->base, prop_x, 0);
Signature · 1 line
2.51.0
author maintainer
#577 lore raw

PATCH 566/614 regulator: fixed: Rely on the core freeing the enable GPIO

In reply to Greg Kroah-Hartman

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

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

From: Mark Brown <[email protected]>

[ Upstream commit 79a45ddcdbba330f5139c7c7ff7042d69cf147b2 ]

In order to simplify ownership rules for enable GPIOs supplied by drivers regulator_register() always takes ownership of them, even if it ends up failing for some other reason. We therefore should not free the GPIO if registration fails but just let the core worry about things.

---
 drivers/regulator/fixed.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
drivers/regulator/fixed.c +4 -7
index a2d16e9abfb58..254c0a8a45559 100644
@@ -330,13 +330,10 @@ static int reg_fixed_voltage_probe(struct platform_device *pdev)
 
 	drvdata->dev = devm_regulator_register(&pdev->dev, &drvdata->desc,
 					       &cfg);
-	if (IS_ERR(drvdata->dev)) {
-		ret = dev_err_probe(&pdev->dev, PTR_ERR(drvdata->dev),
-				    "Failed to register regulator: %ld\n",
-				    PTR_ERR(drvdata->dev));
-		gpiod_put(cfg.ena_gpiod);
-		return ret;
-	}
+	if (IS_ERR(drvdata->dev))
+		return dev_err_probe(&pdev->dev, PTR_ERR(drvdata->dev),
+				     "Failed to register regulator: %ld\n",
+				     PTR_ERR(drvdata->dev));
 
 	platform_set_drvdata(pdev, drvdata);
 
Signature · 1 line
2.51.0
author maintainer
#578 lore raw

PATCH 567/614 ALSA: firewire-motu: fix buffer overflow in hwdep read for DSP events

In reply to Greg Kroah-Hartman

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

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

From: Junrui Luo <[email protected]>

[ Upstream commit 210d77cca3d0494ed30a5c628b20c1d95fa04fb1 ]

The DSP event handling code in hwdep_read() could write more bytes to the user buffer than requested, when a user provides a buffer smaller than the event header size (8 bytes).

Fix by using min_t() to clamp the copy size, This ensures we never copy more than the user requested.

---
 sound/firewire/motu/motu-hwdep.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
sound/firewire/motu/motu-hwdep.c +3 -2
index 981c19430cb0f..6675b23aad69e 100644
@@ -83,10 +83,11 @@ static long hwdep_read(struct snd_hwdep *hwdep, char __user *buf, long count,
 		event.motu_register_dsp_change.type = SNDRV_FIREWIRE_EVENT_MOTU_REGISTER_DSP_CHANGE;
 		event.motu_register_dsp_change.count =
 			(consumed - sizeof(event.motu_register_dsp_change)) / 4;
-		if (copy_to_user(buf, &event, sizeof(event.motu_register_dsp_change)))
+		if (copy_to_user(buf, &event,
+				 min_t(long, count, sizeof(event.motu_register_dsp_change))))
 			return -EFAULT;
 
-		count = consumed;
+		count = min_t(long, count, consumed);
 	} else {
 		spin_unlock_irq(&motu->lock);
 
Signature · 1 line
2.51.0
author maintainer
#579 lore raw

PATCH 568/614 drm/nouveau: refactor deprecated strcpy

In reply to Greg Kroah-Hartman

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

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

From: Madhur Kumar <[email protected]>

[ Upstream commit 2bdc2c0e12fac56e41ec05fb771ead986ea6dac0 ]

strcpy() has been deprecated because it performs no bounds checking on the destination buffer, which can lead to buffer overflows. Use the safer strscpy() instead.

Fixes 15a996bbb697 ("drm/nouveau: assign fence_chan->name correctly")
---
 drivers/gpu/drm/nouveau/nouveau_fence.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/nouveau/nouveau_fence.c +3 -3
index 869d4335c0f45..4a193b7d6d9e4 100644
@@ -183,11 +183,11 @@ nouveau_fence_context_new(struct nouveau_channel *chan, struct nouveau_fence_cha
 	fctx->context = drm->runl[chan->runlist].context_base + chan->chid;
 
 	if (chan == drm->cechan)
-		strcpy(fctx->name, "copy engine channel");
+		strscpy(fctx->name, "copy engine channel");
 	else if (chan == drm->channel)
-		strcpy(fctx->name, "generic kernel channel");
+		strscpy(fctx->name, "generic kernel channel");
 	else
-		strcpy(fctx->name, cli->name);
+		strscpy(fctx->name, cli->name);
 
 	kref_init(&fctx->fence_ref);
 	if (!priv->uevent)
Signature · 1 line
2.51.0
author maintainer
#580 lore raw

PATCH 569/614 drm/nouveau: fix circular dep oops from vendored i2c encoder

In reply to Greg Kroah-Hartman

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

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

From: René Rebe <[email protected]>

[ Upstream commit d84e47edf156a953ed340ba6a202dcd3ea39ba0a ]

Since commit a73583107af9 ("drm/nouveau: vendor in drm_encoder_slave API") nouveau appears to be broken for all dispnv04 GPUs (before NV50). Depending on the kernel version, either having no display output and hanging in kernel for a long time, or even oopsing in the cleanup path like:

Hardware name: PowerMac11,2 PPC970MP 0x440101 PowerMac
...
nouveau 0000:0a:00.0: drm: 0x14C5: Parsing digital output script table
BUG: Unable to handle kernel data access on read at 0x00041520
Faulting instruction address: 0xc0003d0001be0844
Oops: Kernel access of bad area, sig: 11 [#1]
BE PAGE_SIZE=4K MMU=Hash  SMP NR_CPUS=8 NUMA PowerMac
Modules linked in: windfarm_cpufreq_clamp windfarm_smu_sensors windfarm_smu_controls windfarm_pm112 snd_aoa_codec_onyx snd_aoa_fabric_layout snd_aoa windfarm_pid jo
 apple_mfi_fastcharge rndis_host cdc_ether usbnet mii snd_aoa_i2sbus snd_aoa_soundbus snd_pcm snd_timer snd soundcore rack_meter windfarm_smu_sat windfarm_max6690_s

m75_sensor windfarm_core gpu_sched drm_gpuvm drm_exec drm_client_lib drm_ttm_helper ttm drm_display_helper drm_kms_helper drm drm_panel_orientation_quirks syscopyar _sys_fops i2c_algo_bit backlight uio_pdrv_genirq uio uninorth_agp agpgart zram dm_mod dax ipv6 nfsv4 dns_resolver nfs lockd grace sunrpc offb cfbfillrect cfbimgblt ont input_leds sr_mod cdrom sd_mod uas ata_generic hid_apple hid_generic usbhid hid usb_storage pata_macio sata_svw libata firewire_ohci scsi_mod firewire_core ohci ehci_pci ehci_hcd tg3 ohci_hcd libphy usbcore usb_common nls_base
led_class

CPU: 0 UID: 0 PID: 245 Comm: (udev-worker) Not tainted 6.14.0-09584-g7d06015d936c #7 PREEMPTLAZY
Hardware name: PowerMac11,2 PPC970MP 0x440101 PowerMac
NIP:  c0003d0001be0844 LR: c0003d0001be0830 CTR: 0000000000000000
REGS: c0000000053f70e0 TRAP: 0300   Not tainted  (6.14.0-09584-g7d06015d936c)
MSR:  9000000000009032 <SF,HV,EE,ME,IR,DR,RI>  CR: 24222220  XER: 00000000
DAR: 0000000000041520 DSISR: 40000000 IRQMASK: 0 \x0aGPR00: c0003d0001be0830 c0000000053f7380 c0003d0000911900 c000000007bc6800 \x0aGPR04: 0000000000000000 0000000000000000 c000000007bc6e70 0000000000000001 \x0aGPR08: 01f3040000000000 0000000000041520 0000000000000000 c0003d0000813958 \x0aGPR12: c000000000071a48 c000000000e28000 0000000000000020 0000000000000000 \x0aGPR16: 0000000000000000 0000000000f52630 0000000000000000 0000000000000000 \x0aGPR20: 0000000000000000 0000000000000000 0000000000000001 c0003d0000928528 \x0aGPR24: c0003d0000928598 0000000000000000 c000000007025480 c000000007025480 \x0aGPR28: c0000000010b4000 0000000000000000 c000000007bc1800 c000000007bc6800
NIP [c0003d0001be0844] nv_crtc_destroy+0x44/0xd4 [nouveau]
LR [c0003d0001be0830] nv_crtc_destroy+0x30/0xd4 [nouveau]
Call Trace:
[c0000000053f7380] [c0003d0001be0830] nv_crtc_destroy+0x30/0xd4 [nouveau] (unreliable)
[c0000000053f73c0] [c0003d00007f7bf4] drm_mode_config_cleanup+0x27c/0x30c [drm]
[c0000000053f7490] [c0003d0001bdea50] nouveau_display_create+0x1cc/0x550 [nouveau]
[c0000000053f7500] [c0003d0001bcc29c] nouveau_drm_device_init+0x1c8/0x844 [nouveau]
[c0000000053f75e0] [c0003d0001bcc9ec] nouveau_drm_probe+0xd4/0x1e0 [nouveau]
[c0000000053f7670] [c000000000557d24] local_pci_probe+0x50/0xa8
[c0000000053f76f0] [c000000000557fa8] pci_device_probe+0x22c/0x240
[c0000000053f7760] [c0000000005fff3c] really_probe+0x188/0x31c
[c0000000053f77e0] [c000000000600204] __driver_probe_device+0x134/0x13c
[c0000000053f7860] [c0000000006002c0] driver_probe_device+0x3c/0xb4
[c0000000053f78a0] [c000000000600534] __driver_attach+0x118/0x128
[c0000000053f78e0] [c0000000005fe038] bus_for_each_dev+0xa8/0xf4
[c0000000053f7950] [c0000000005ff460] driver_attach+0x2c/0x40
[c0000000053f7970] [c0000000005fea68] bus_add_driver+0x130/0x278
[c0000000053f7a00] [c00000000060117c] driver_register+0x9c/0x1a0
[c0000000053f7a80] [c00000000055623c] __pci_register_driver+0x5c/0x70
[c0000000053f7aa0] [c0003d0001c058a0] nouveau_drm_init+0x254/0x278 [nouveau]
[c0000000053f7b10] [c00000000000e9bc] do_one_initcall+0x84/0x268
[c0000000053f7bf0] [c0000000001a0ba0] do_init_module+0x70/0x2d8
[c0000000053f7c70] [c0000000001a42bc] init_module_from_file+0xb4/0x108
[c0000000053f7d50] [c0000000001a4504] sys_finit_module+0x1ac/0x478
[c0000000053f7e10] [c000000000023230] system_call_exception+0x1a4/0x20c
[c0000000053f7e50] [c00000000000c554] system_call_common+0xf4/0x258
 --- interrupt: c00 at 0xfd5f988
NIP:  000000000fd5f988 LR: 000000000ff9b148 CTR: 0000000000000000
REGS: c0000000053f7e80 TRAP: 0c00   Not tainted  (6.14.0-09584-g7d06015d936c)
MSR:  100000000000d032 <HV,EE,PR,ME,IR,DR,RI>  CR: 28222244  XER: 00000000

IRQMASK: 0 \x0aGPR00: 0000000000000161 00000000ffcdc2d0 00000000405db160 0000000000000020 \x0aGPR04: 000000000ffa2c9c 0000000000000000 000000000000001f 0000000000000045 \x0aGPR08: 0000000011a13770 0000000000000000 0000000000000000 0000000000000000 \x0aGPR12: 0000000000000000 0000000010249d8c 0000000000000020 0000000000000000 \x0aGPR16: 0000000000000000 0000000000f52630 0000000000000000 0000000000000000 \x0aGPR20: 0000000000000000 0000000000000000 0000000000000000 0000000011a11a70 \x0aGPR24: 0000000011a13580 0000000011a11950 0000000011a11a70 0000000000020000 \x0aGPR28: 000000000ffa2c9c 0000000000000000 000000000ffafc40 0000000011a11a70 NIP [000000000fd5f988] 0xfd5f988
LR [000000000ff9b148] 0xff9b148
--- interrupt: c00

Code: f821ffc1 418200ac e93f0000 e9290038 e9291468 eba90000 48026c0d e8410018 e93f06aa 3d290001 392982a4 79291f24 <7fdd482a> 2c3e0000 41820030 7fc3f378
 ---[ end trace 0000000000000000 ]---

This is caused by the i2c encoder modules vendored into nouveau/ now depending on the equally vendored nouveau_i2c_encoder_destroy function. Trying to auto-load this modules hangs on nouveau initialization until timeout, and nouveau continues without i2c video encoders.

Fix by avoiding nouveau dependency by __always_inlining that helper functions into those i2c video encoder modules.

Fixes a73583107af9 ("drm/nouveau: vendor in drm_encoder_slave API")
[Lyude: fixed commit reference in description]
---
 .../nouveau/dispnv04/nouveau_i2c_encoder.c    | 20 -------------------
 .../include/dispnv04/i2c/encoder_i2c.h        | 19 +++++++++++++++++-
 2 files changed, 18 insertions(+), 21 deletions(-)
drivers/gpu/drm/nouveau/dispnv04/nouveau_i2c_encoder.c +0 -20
index e2bf99c433366..a60209097a20a 100644
@@ -94,26 +94,6 @@ int nouveau_i2c_encoder_init(struct drm_device *dev,
 	return err;
 }
 
-/**
- * nouveau_i2c_encoder_destroy - Unregister the I2C device backing an encoder
- * @drm_encoder:	Encoder to be unregistered.
- *
- * This should be called from the @destroy method of an I2C slave
- * encoder driver once I2C access is no longer needed.
- */
-void nouveau_i2c_encoder_destroy(struct drm_encoder *drm_encoder)
-{
-	struct nouveau_i2c_encoder *encoder = to_encoder_i2c(drm_encoder);
-	struct i2c_client *client = nouveau_i2c_encoder_get_client(drm_encoder);
-	struct module *module = client->dev.driver->owner;
-
-	i2c_unregister_device(client);
-	encoder->i2c_client = NULL;
-
-	module_put(module);
-}
-EXPORT_SYMBOL(nouveau_i2c_encoder_destroy);
-
 /*
  * Wrapper fxns which can be plugged in to drm_encoder_helper_funcs:
  */
drivers/gpu/drm/nouveau/include/dispnv04/i2c/encoder_i2c.h +18 -1
index 31334aa90781b..869820701a56e 100644
@@ -202,7 +202,24 @@ static inline struct i2c_client *nouveau_i2c_encoder_get_client(struct drm_encod
 	return to_encoder_i2c(encoder)->i2c_client;
 }
 
-void nouveau_i2c_encoder_destroy(struct drm_encoder *encoder);
+/**
+ * nouveau_i2c_encoder_destroy - Unregister the I2C device backing an encoder
+ * @drm_encoder:        Encoder to be unregistered.
+ *
+ * This should be called from the @destroy method of an I2C slave
+ * encoder driver once I2C access is no longer needed.
+ */
+static __always_inline void nouveau_i2c_encoder_destroy(struct drm_encoder *drm_encoder)
+{
+	struct nouveau_i2c_encoder *encoder = to_encoder_i2c(drm_encoder);
+	struct i2c_client *client = nouveau_i2c_encoder_get_client(drm_encoder);
+	struct module *module = client->dev.driver->owner;
+
+	i2c_unregister_device(client);
+	encoder->i2c_client = NULL;
+
+	module_put(module);
+}
 
 /*
  * Wrapper fxns which can be plugged in to drm_encoder_helper_funcs:
Signature · 1 line
2.51.0
author maintainer
#581 lore raw

PATCH 570/614 cifs: Fix handling of a beyond-EOF DIO/unbuffered read over SMB1

In reply to Greg Kroah-Hartman

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

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

From: David Howells <[email protected]>

[ Upstream commit 9d85ac939d52e93d80efb01a299c6f0bedb30487 ]

If a DIO read or an unbuffered read request extends beyond the EOF, the server will return a short read and a status code indicating that EOF was hit, which gets translated to -ENODATA. Note that the client does not cap the request at i_size, but asks for the amount requested in case there's a race on the server with a third party.

Now, on the client side, the request will get split into multiple subrequests if rsize is smaller than the full request size. A subrequest that starts before or at the EOF and returns short data up to the EOF will be correctly handled, with the NETFS_SREQ_HIT_EOF flag being set, indicating to netfslib that we can't read more.

If a subrequest, however, starts after the EOF and not at it, HIT_EOF will not be flagged, its error will be set to -ENODATA and it will be abandoned. This will cause the request as a whole to fail with -ENODATA.

Fix this by setting NETFS_SREQ_HIT_EOF on any subrequest that lies beyond the EOF marker.

This can be reproduced by mounting with "cache=none,sign,vers=1.0" and doing a read of a file that's significantly bigger than the size of the file (e.g. attempting to read 64KiB from a 16KiB file).

Fixes a68c74865f51 ("cifs: Fix SMB1 readv/writev callback in the same way as SMB2/3")
cc Shyam Prasad N <[email protected]>
---
 fs/smb/client/cifssmb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/smb/client/cifssmb.c +1 -1
index dcc50a2bfa4b2..bfc9b1ea76fac 100644
@@ -1374,7 +1374,7 @@ cifs_readv_callback(struct mid_q_entry *mid)
 	} else {
 		size_t trans = rdata->subreq.transferred + rdata->got_bytes;
 		if (trans < rdata->subreq.len &&
-		    rdata->subreq.start + trans == ictx->remote_i_size) {
+		    rdata->subreq.start + trans >= ictx->remote_i_size) {
 			rdata->result = 0;
 			__set_bit(NETFS_SREQ_HIT_EOF, &rdata->subreq.flags);
 		} else if (rdata->got_bytes > 0) {
Signature · 1 line
2.51.0
author maintainer
#582 lore raw

PATCH 571/614 cifs: Fix handling of a beyond-EOF DIO/unbuffered read over SMB2

In reply to Greg Kroah-Hartman

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

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

From: David Howells <[email protected]>

[ Upstream commit 4ae4dde6f34a4124c65468ae4fa1f915fb40f900 ]

If a DIO read or an unbuffered read request extends beyond the EOF, the server will return a short read and a status code indicating that EOF was hit, which gets translated to -ENODATA. Note that the client does not cap the request at i_size, but asks for the amount requested in case there's a race on the server with a third party.

Now, on the client side, the request will get split into multiple subrequests if rsize is smaller than the full request size. A subrequest that starts before or at the EOF and returns short data up to the EOF will be correctly handled, with the NETFS_SREQ_HIT_EOF flag being set, indicating to netfslib that we can't read more.

If a subrequest, however, starts after the EOF and not at it, HIT_EOF will not be flagged, its error will be set to -ENODATA and it will be abandoned. This will cause the request as a whole to fail with -ENODATA.

Fix this by setting NETFS_SREQ_HIT_EOF on any subrequest that lies beyond the EOF marker.

Fixes 1da29f2c39b6 ("netfs, cifs: Fix handling of short DIO read")
cc Shyam Prasad N <[email protected]>
---
 fs/smb/client/smb2pdu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/smb/client/smb2pdu.c +1 -1
index 8b4a4573e9c37..e661d40213eab 100644
@@ -4629,7 +4629,7 @@ smb2_readv_callback(struct mid_q_entry *mid)
 	} else {
 		size_t trans = rdata->subreq.transferred + rdata->got_bytes;
 		if (trans < rdata->subreq.len &&
-		    rdata->subreq.start + trans == ictx->remote_i_size) {
+		    rdata->subreq.start + trans >= ictx->remote_i_size) {
 			__set_bit(NETFS_SREQ_HIT_EOF, &rdata->subreq.flags);
 			rdata->result = 0;
 		}
Signature · 1 line
2.51.0
author maintainer
#583 lore raw

PATCH 572/614 nfs/localio: remove alignment size checking in nfs_is_local_dio_possible

In reply to Greg Kroah-Hartman

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

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

From: Mike Snitzer <[email protected]>

[ Upstream commit f50d0328d02fe38ba196a73c143e5d87e341d4f7 ]

This check to ensure dio_offset_align isn't larger than PAGE_SIZE is no longer relevant (older iterations of NFS Direct was allocating misaligned head and tail pages but no longer does, so this check isn't needed).

Fixes c817248fc831 ("nfs/localio: add proper O_DIRECT support for READ and WRITE")
---
 fs/nfs/localio.c | 2 --
 1 file changed, 2 deletions(-)
fs/nfs/localio.c +0 -2
index 656976b4f42ce..512d9c5ff608a 100644
@@ -339,8 +339,6 @@ nfs_is_local_dio_possible(struct nfs_local_kiocb *iocb, int rw,
 
 	if (unlikely(!nf_dio_mem_align || !nf_dio_offset_align))
 		return false;
-	if (unlikely(nf_dio_offset_align > PAGE_SIZE))
-		return false;
 	if (unlikely(len < nf_dio_offset_align))
 		return false;
 
Signature · 1 line
2.51.0
author maintainer
#584 lore raw

PATCH 573/614 nfs/localio: remove 61 byte hole from needless ____cacheline_aligned

In reply to Greg Kroah-Hartman

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

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

From: Mike Snitzer <[email protected]>

[ Upstream commit 0b873de2c02f9cc655bef6bee0eb9e404126ed6c ]

struct nfs_local_kiocb used ____cacheline_aligned on its iters[] array and as the structure evolved it caused a 61 byte hole to form. Fix this by removing ____cacheline_aligned and reordering iters[] before iter_is_dio_aligned[].

Fixes 6a218b9c3183 ("nfs/localio: do not issue misaligned DIO out-of-order")
---
 fs/nfs/localio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfs/localio.c +1 -1
index 512d9c5ff608a..b98bb292fef0c 100644
@@ -43,8 +43,8 @@ struct nfs_local_kiocb {
 	size_t                  end_len;
 	short int		end_iter_index;
 	atomic_t		n_iters;
+	struct iov_iter		iters[NFSLOCAL_MAX_IOS];
 	bool			iter_is_dio_aligned[NFSLOCAL_MAX_IOS];
-	struct iov_iter		iters[NFSLOCAL_MAX_IOS] ____cacheline_aligned;
 	/* End mostly DIO-specific members */
 };
 
Signature · 1 line
2.51.0
author maintainer
#585 lore raw

PATCH 574/614 gpio: tb10x: fix OF_GPIO dependency

In reply to Greg Kroah-Hartman

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

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

From: Arnd Bergmann <[email protected]>

[ Upstream commit dd44d4d0c55a4ecf5eabf7856f96ed47e0684780 ]

Selecting OF_GPIO is generally not allowed, it always gets enabled when both GPIOLIB and OF are turned on.

The tb10x driver now warns about this after it was enabled for compile-testing:

WARNING: unmet direct dependencies detected for OF_GPIO
Depends on [n]: GPIOLIB [=y] && OF [=n] && HAS_IOMEM [=y]
Selected by [y]:
- GPIO_TB10X [=y] && GPIOLIB [=y] && HAS_IOMEM [=y] && (ARC_PLAT_TB10X || COMPILE_TEST [=y])

OF_GPIO is not required for compile-testing and is already enabled when the driver is usable, so just drop the 'select' line.

Fixes 682fbb18e14c ("gpio: tb10x: allow building the module with COMPILE_TEST=y")
---
 drivers/gpio/Kconfig | 1 -
 1 file changed, 1 deletion(-)
drivers/gpio/Kconfig +0 -1
index 7ee3afbc2b05d..e053524c5e35f 100644
@@ -738,7 +738,6 @@ config GPIO_TB10X
 	depends on ARC_PLAT_TB10X || COMPILE_TEST
 	select GPIO_GENERIC
 	select GENERIC_IRQ_CHIP
-	select OF_GPIO
 
 config GPIO_TEGRA
 	tristate "NVIDIA Tegra GPIO support"
Signature · 1 line
2.51.0
author maintainer
#586 lore raw

PATCH 575/614 docs: hwmon: fix link to g762 devicetree binding

In reply to Greg Kroah-Hartman

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

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

From: Kathara Sasikumar <[email protected]>

[ Upstream commit 08bfcf4ff9d39228150a757803fc02dffce84ab0 ]

The devicetree binding for g762 was converted to YAML to match vendor prefix conventions. Update the reference accordingly.

Fixes 3d8e25372417 ("dt-bindings: hwmon: g762: Convert to yaml schema")
---
 Documentation/hwmon/g762.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/hwmon/g762.rst +1 -1
index 0371b3365c48c..f224552a2d3cc 100644
@@ -17,7 +17,7 @@ done via a userland daemon like fancontrol.
 Note that those entries do not provide ways to setup the specific
 hardware characteristics of the system (reference clock, pulses per
 fan revolution, ...); Those can be modified via devicetree bindings
-documented in Documentation/devicetree/bindings/hwmon/g762.txt or
+documented in Documentation/devicetree/bindings/hwmon/gmt,g762.yaml or
 using a specific platform_data structure in board initialization
 file (see include/linux/platform_data/g762.h).
 
Signature · 1 line
2.51.0
author maintainer
#587 lore raw

PATCH 576/614 i2c: spacemit: fix detect issue

In reply to Greg Kroah-Hartman

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

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

From: Troy Mitchell <[email protected]>

[ Upstream commit 25faa5364638b86ec0d0edb4486daa9d40a0be8f ]

This commit addresses two issues causing i2c detect to fail.

The identified issues are:

1. Incorrect error handling for BED (Bus Error No ACK/NAK):
Before this commit, Both ALD (Arbitration Loss Detected) and BED returned -EAGAIN.
2. Missing interrupt status clear after initialization in xfer():
On the K1 SoC, simply fixing the first issue changed the error from -EAGAIN to -ETIMEOUT. Through tracing, it was determined that this is likely due to MSD (Master Stop Detected) latency issues.

That means the MSD bit in the ISR may still be set on the next transfer. As a result, the controller won't work — we can see from the scope that it doesn't issue any signal.
(This only occurs during rapid consecutive I2C transfers. That explains why the issue only shows up with i2cdetect.)

With these two fixes, i2c device detection now functions correctly on the K1 SoC.

---
 drivers/i2c/busses/i2c-k1.c | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)
drivers/i2c/busses/i2c-k1.c +13 -6
index 6b918770e612e..d42c03ef5db59 100644
@@ -158,11 +158,16 @@ static int spacemit_i2c_handle_err(struct spacemit_i2c_dev *i2c)
 {
 	dev_dbg(i2c->dev, "i2c error status: 0x%08x\n", i2c->status);
 
-	if (i2c->status & (SPACEMIT_SR_BED | SPACEMIT_SR_ALD)) {
+	/* Arbitration Loss Detected */
+	if (i2c->status & SPACEMIT_SR_ALD) {
 		spacemit_i2c_reset(i2c);
 		return -EAGAIN;
 	}
 
+	/* Bus Error No ACK/NAK */
+	if (i2c->status & SPACEMIT_SR_BED)
+		spacemit_i2c_reset(i2c);
+
 	return i2c->status & SPACEMIT_SR_ACKNAK ? -ENXIO : -EIO;
 }
 
@@ -224,6 +229,12 @@ static void spacemit_i2c_check_bus_release(struct spacemit_i2c_dev *i2c)
 	}
 }
 
+static inline void
+spacemit_i2c_clear_int_status(struct spacemit_i2c_dev *i2c, u32 mask)
+{
+	writel(mask & SPACEMIT_I2C_INT_STATUS_MASK, i2c->base + SPACEMIT_ISR);
+}
+
 static void spacemit_i2c_init(struct spacemit_i2c_dev *i2c)
 {
 	u32 val;
@@ -267,12 +278,8 @@ static void spacemit_i2c_init(struct spacemit_i2c_dev *i2c)
 	val = readl(i2c->base + SPACEMIT_IRCR);
 	val |= SPACEMIT_RCR_SDA_GLITCH_NOFIX;
 	writel(val, i2c->base + SPACEMIT_IRCR);
-}
 
-static inline void
-spacemit_i2c_clear_int_status(struct spacemit_i2c_dev *i2c, u32 mask)
-{
-	writel(mask & SPACEMIT_I2C_INT_STATUS_MASK, i2c->base + SPACEMIT_ISR);
+	spacemit_i2c_clear_int_status(i2c, SPACEMIT_I2C_INT_STATUS_MASK);
 }
 
 static void spacemit_i2c_start(struct spacemit_i2c_dev *i2c)
Signature · 1 line
2.51.0
author maintainer
#588 lore raw

PATCH 577/614 dma/pool: eliminate alloc_pages warning in atomic_pool_expand

In reply to Greg Kroah-Hartman

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

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

From: Dave Kleikamp <[email protected]>

[ Upstream commit 463d439becb81383f3a5a5d840800131f265a09c ]

atomic_pool_expand iteratively tries the allocation while decrementing the page order. There is no need to issue a warning if an attempted allocation fails.

Fixes d7e673ec2c8e ("dma-pool: Only allocate from CMA when in same memory zone")
[mszyprow: fixed typo]
---
 kernel/dma/pool.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/dma/pool.c +1 -1
index ee45dee33d491..26392badc36b0 100644
@@ -93,7 +93,7 @@ static int atomic_pool_expand(struct gen_pool *pool, size_t pool_size,
 			page = dma_alloc_from_contiguous(NULL, 1 << order,
 							 order, false);
 		if (!page)
-			page = alloc_pages(gfp, order);
+			page = alloc_pages(gfp | __GFP_NOWARN, order);
 	} while (!page && order-- > 0);
 	if (!page)
 		goto out;
Signature · 1 line
2.51.0
author maintainer
#589 lore raw

PATCH 578/614 ALSA: uapi: Fix typo in asound.h comment

In reply to Greg Kroah-Hartman

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

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

From: Andres J Rosa <[email protected]>

[ Upstream commit 9a97857db0c5655b8932f86b5d18bb959079b0ee ]

Fix 'level-shit' to 'level-shift' in struct snd_cea_861_aud_if comment.

Fixes 7ba1c40b536e ("ALSA: Add definitions for CEA-861 Audio InfoFrames")
---
 include/uapi/sound/asound.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/uapi/sound/asound.h +1 -1
index 5a049eeaeccea..d3ce75ba938a8 100644
@@ -60,7 +60,7 @@ struct snd_cea_861_aud_if {
 	unsigned char db2_sf_ss; /* sample frequency and size */
 	unsigned char db3; /* not used, all zeros */
 	unsigned char db4_ca; /* channel allocation code */
-	unsigned char db5_dminh_lsv; /* downmix inhibit & level-shit values */
+	unsigned char db5_dminh_lsv; /* downmix inhibit & level-shift values */
 };
 
 /****************************************************************************
Signature · 1 line
2.51.0
author maintainer
#590 lore raw

PATCH 579/614 drm/amdkfd: Use huge page size to check split svm range alignment

In reply to Greg Kroah-Hartman

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

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

From: Xiaogang Chen <[email protected]>

[ Upstream commit bf2084a7b1d75d093b6a79df4c10142d49fbaa0e ]

When split svm ranges that have been mapped using huge page should use huge page size(2MB) to check split range alignment, not prange->granularity that means migration granularity.

Fixes 7ef6b2d4b7e5 ("drm/amdkfd: remap unaligned svm ranges that have split")
(cherry picked from commit 448ee45353ef9fb1a34f5f26eb3f48923c6f0898)
---
 drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 46 +++++++++++++++++++---------
 1 file changed, 32 insertions(+), 14 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_svm.c +32 -14
index 74a1d3e1d52be..49dd0a81114e4 100644
@@ -1144,30 +1144,48 @@ static int
 svm_range_split_tail(struct svm_range *prange, uint64_t new_last,
 		     struct list_head *insert_list, struct list_head *remap_list)
 {
+	unsigned long last_align_down = ALIGN_DOWN(prange->last, 512);
+	unsigned long start_align = ALIGN(prange->start, 512);
+	bool huge_page_mapping = last_align_down > start_align;
 	struct svm_range *tail = NULL;
-	int r = svm_range_split(prange, prange->start, new_last, &tail);
+	int r;
 
-	if (!r) {
-		list_add(&tail->list, insert_list);
-		if (!IS_ALIGNED(new_last + 1, 1UL << prange->granularity))
-			list_add(&tail->update_list, remap_list);
-	}
-	return r;
+	r = svm_range_split(prange, prange->start, new_last, &tail);
+
+	if (r)
+		return r;
+
+	list_add(&tail->list, insert_list);
+
+	if (huge_page_mapping && tail->start > start_align &&
+	    tail->start < last_align_down && (!IS_ALIGNED(tail->start, 512)))
+		list_add(&tail->update_list, remap_list);
+
+	return 0;
 }
 
 static int
 svm_range_split_head(struct svm_range *prange, uint64_t new_start,
 		     struct list_head *insert_list, struct list_head *remap_list)
 {
+	unsigned long last_align_down = ALIGN_DOWN(prange->last, 512);
+	unsigned long start_align = ALIGN(prange->start, 512);
+	bool huge_page_mapping = last_align_down > start_align;
 	struct svm_range *head = NULL;
-	int r = svm_range_split(prange, new_start, prange->last, &head);
+	int r;
 
-	if (!r) {
-		list_add(&head->list, insert_list);
-		if (!IS_ALIGNED(new_start, 1UL << prange->granularity))
-			list_add(&head->update_list, remap_list);
-	}
-	return r;
+	r = svm_range_split(prange, new_start, prange->last, &head);
+
+	if (r)
+		return r;
+
+	list_add(&head->list, insert_list);
+
+	if (huge_page_mapping && head->last + 1 > start_align &&
+	    head->last + 1 < last_align_down && (!IS_ALIGNED(head->last, 512)))
+		list_add(&head->update_list, remap_list);
+
+	return 0;
 }
 
 static void
Signature · 1 line
2.51.0
author maintainer
#591 lore raw

PATCH 580/614 rtc: gamecube: Check the return value of ioremap()

In reply to Greg Kroah-Hartman

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

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

From: Haotian Zhang <[email protected]>

[ Upstream commit d1220e47e4bd2be8b84bc158f4dea44f2f88b226 ]

The function ioremap() in gamecube_rtc_read_offset_from_sram() can fail and return NULL, which is dereferenced without checking, leading to a NULL pointer dereference.

Add a check for the return value of ioremap() and return -ENOMEM on failure.

Fixes 86559400b3ef ("rtc: gamecube: Add a RTC driver for the GameCube, Wii and Wii U")
---
 drivers/rtc/rtc-gamecube.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/rtc/rtc-gamecube.c +4 -0
index c828bc8e05b9c..045d5d45ab4b0 100644
@@ -242,6 +242,10 @@ static int gamecube_rtc_read_offset_from_sram(struct priv *d)
 	}
 
 	hw_srnprot = ioremap(res.start, resource_size(&res));
+	if (!hw_srnprot) {
+		pr_err("failed to ioremap hw_srnprot\n");
+		return -ENOMEM;
+	}
 	old = ioread32be(hw_srnprot);
 
 	/* TODO: figure out why we use this magic constant.  I obtained it by
Signature · 1 line
2.51.0
author maintainer
#592 lore raw

PATCH 581/614 rtc: max31335: Fix ignored return value in set_alarm

In reply to Greg Kroah-Hartman

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

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

From: Nuno Sá <[email protected]>

[ Upstream commit f07640f9fb8df2158199da1da1f8282948385a84 ]

Return the result from regmap_update_bits() instead of ignoring it and always returning 0.

Fixes dedaf03b99d6 ("rtc: max31335: add driver support")
---
 drivers/rtc/rtc-max31335.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/rtc/rtc-max31335.c +2 -4
index dfb5bad3a3691..23b7bf16b4cd5 100644
@@ -391,10 +391,8 @@ static int max31335_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
 	if (ret)
 		return ret;
 
-	ret = regmap_update_bits(max31335->regmap, max31335->chip->int_status_reg,
-				 MAX31335_STATUS1_A1F, 0);
-
-	return 0;
+	return regmap_update_bits(max31335->regmap, max31335->chip->int_status_reg,
+				  MAX31335_STATUS1_A1F, 0);
 }
 
 static int max31335_alarm_irq_enable(struct device *dev, unsigned int enabled)
Signature · 1 line
2.51.0
author maintainer
#593 lore raw

PATCH 582/614 regulator: spacemit: Align input supply name with the DT binding

In reply to Greg Kroah-Hartman

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

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

From: Javier Martinez Canillas <[email protected]>

[ Upstream commit 99f0c3a654c4a762aca4fadc8d9f8636b36d570a ]

The Device Tree binding schema for the SpacemiT P1 PMIC defines the main input supply property as "vin-supply", but the driver defines the supply name for BUCK and ALDO regulators as "vcc".

This causes the regulator core to lookup for a non-existent "vcc-supply". Rename the supply from "vcc" to "vin", to match the DT binding and ensure that the regulators input supplies are correctly resolved.

After this change, the regulators supply hierarchy is correctly reported:

  $ cat /sys/kernel/debug/regulator/regulator_summary
   regulator                      use open bypass opmode voltage current     min     max
  ---------------------------------------------------------------------------------------
   regulator-dummy                  1    0      0 unknown     0mV     0mA     0mV     0mV
   dc_in_12v                        2    1      0 unknown 12000mV     0mA 12000mV 12000mV
      vcc_4v                        7   10      0 unknown  4000mV     0mA  4000mV  4000mV
         buck1                      1    0      0 unknown  1050mV     0mA   500mV  3425mV
         buck2                      1    0      0 unknown   900mV     0mA   500mV  3425mV
         buck3                      1    0      0 unknown  1800mV     0mA   500mV  1800mV
         buck4                      1    0      0 unknown  3300mV     0mA   500mV  3300mV
         buck5                      3    7      0 unknown  2100mV     0mA   500mV  3425mV
            dldo1                   0    0      0 unknown  1200mV     0mA   500mV  3125mV
            dldo2                   0    0      0 unknown   500mV     0mA   500mV  3125mV
            dldo3                   0    0      0 unknown   500mV     0mA   500mV  3125mV
            dldo4                   1    0      0 unknown  1800mV     0mA   500mV  3125mV
            dldo5                   0    0      0 unknown   500mV     0mA   500mV  3125mV
            dldo6                   1    0      0 unknown  1800mV     0mA   500mV  3125mV
            dldo7                   0    0      0 unknown   500mV     0mA   500mV  3125mV
         buck6                      1    0      0 unknown  1100mV     0mA   500mV  3425mV
         aldo1                      0    0      0 unknown  1800mV     0mA   500mV  3125mV
         aldo2                      0    0      0 unknown   500mV     0mA   500mV  3125mV
         aldo3                      0    0      0 unknown   500mV     0mA   500mV  3125mV
         aldo4                      0    0      0 unknown   500mV     0mA   500mV  3125mV
Fixes 8b84d712ad84 ("regulator: spacemit: support SpacemiT P1 regulators")
---
 drivers/regulator/spacemit-p1.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/regulator/spacemit-p1.c +2 -2
index d437e6738ea1e..2bf9137e12b1d 100644
@@ -87,10 +87,10 @@ static const struct linear_range p1_ldo_ranges[] = {
 	}
 
 #define P1_BUCK_DESC(_n) \
-	P1_REG_DESC(BUCK, buck, _n, "vcc", 0x47, BUCK_MASK, 254, p1_buck_ranges)
+	P1_REG_DESC(BUCK, buck, _n, "vin", 0x47, BUCK_MASK, 254, p1_buck_ranges)
 
 #define P1_ALDO_DESC(_n) \
-	P1_REG_DESC(ALDO, aldo, _n, "vcc", 0x5b, LDO_MASK, 117, p1_ldo_ranges)
+	P1_REG_DESC(ALDO, aldo, _n, "vin", 0x5b, LDO_MASK, 117, p1_ldo_ranges)
 
 #define P1_DLDO_DESC(_n) \
 	P1_REG_DESC(DLDO, dldo, _n, "buck5", 0x67, LDO_MASK, 117, p1_ldo_ranges)
Signature · 1 line
2.51.0
author maintainer
#594 lore raw

PATCH 583/614 ALSA: firewire-motu: add bounds check in put_user loop for DSP events

In reply to Greg Kroah-Hartman

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

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

From: Junrui Luo <[email protected]>

[ Upstream commit 298e753880b6ea99ac30df34959a7a03b0878eed ]

In the DSP event handling code, a put_user() loop copies event data. When the user buffer size is not aligned to 4 bytes, it could overwrite beyond the buffer boundary.

Fix by adding a bounds check before put_user().

---
 sound/firewire/motu/motu-hwdep.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/firewire/motu/motu-hwdep.c +1 -1
index 6675b23aad69e..89dc436a06529 100644
@@ -75,7 +75,7 @@ static long hwdep_read(struct snd_hwdep *hwdep, char __user *buf, long count,
 		while (consumed < count &&
 		       snd_motu_register_dsp_message_parser_copy_event(motu, &ev)) {
 			ptr = (u32 __user *)(buf + consumed);
-			if (put_user(ev, ptr))
+			if (consumed + sizeof(ev) > count || put_user(ev, ptr))
 				return -EFAULT;
 			consumed += sizeof(ev);
 		}
Signature · 1 line
2.51.0
author maintainer
#595 lore raw

PATCH 584/614 ARM: 9464/1: fix input-only operand modification in load_unaligned_zeropad()

In reply to Greg Kroah-Hartman

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

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

From: Liyuan Pang <[email protected]>

[ Upstream commit edb924a7211c9aa7a4a415e03caee4d875e46b8e ]

In the inline assembly inside load_unaligned_zeropad(), the "addr" is
constrained as input-only operand. The compiler assumes that on exit
from the asm statement these operands contain the same values as they
had before executing the statement, but when kernel page fault happened, the assembly fixup code "bic %2 %2, #0x3" modify the value of "addr", which may lead to an unexpected behavior.

Use a temporary variable "tmp" to handle it, instead of modifying the input-only operand, just like what arm64's load_unaligned_zeropad() does.

Fixes b9a50f74905a ("ARM: 7450/1: dcache: select DCACHE_WORD_ACCESS for little-endian ARMv6+ CPUs")
---
 arch/arm/include/asm/word-at-a-time.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
arch/arm/include/asm/word-at-a-time.h +5 -5
index f9a3897b06e7f..5023f98d8293d 100644
@@ -67,7 +67,7 @@ static inline unsigned long find_zero(unsigned long mask)
  */
 static inline unsigned long load_unaligned_zeropad(const void *addr)
 {
-	unsigned long ret, offset;
+	unsigned long ret, tmp;
 
 	/* Load word from unaligned pointer addr */
 	asm(
@@ -75,9 +75,9 @@ static inline unsigned long load_unaligned_zeropad(const void *addr)
 	"2:\n"
 	"	.pushsection .text.fixup,\"ax\"\n"
 	"	.align 2\n"
-	"3:	and	%1, %2, #0x3\n"
-	"	bic	%2, %2, #0x3\n"
-	"	ldr	%0, [%2]\n"
+	"3:	bic	%1, %2, #0x3\n"
+	"	ldr	%0, [%1]\n"
+	"	and	%1, %2, #0x3\n"
 	"	lsl	%1, %1, #0x3\n"
 #ifndef __ARMEB__
 	"	lsr	%0, %0, %1\n"
@@ -90,7 +90,7 @@ static inline unsigned long load_unaligned_zeropad(const void *addr)
 	"	.align	3\n"
 	"	.long	1b, 3b\n"
 	"	.popsection"
-	: "=&r" (ret), "=&r" (offset)
+	: "=&r" (ret), "=&r" (tmp)
 	: "r" (addr), "Qo" (*(unsigned long *)addr));
 
 	return ret;
Signature · 1 line
2.51.0
author maintainer
#596 lore raw

PATCH 585/614 drm/xe/fbdev: use the same 64-byte stride alignment as i915

In reply to Greg Kroah-Hartman

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

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

From: Jani Nikula <[email protected]>

[ Upstream commit 4a36b339a14ae6f2a366125e3d64f0c165193293 ]

For reasons unknown, xe uses XE_PAGE_SIZE alignment for stride. Presumably it's just a confusion between stride alignment and bo allocation size alignment. Switch to 64 byte alignment to, uh, align with i915.

This will also be helpful in deduplicating and unifying the xe and i915 framebuffer allocation.

Stable-dep-of: 460b31720369 ("drm/i915/fbdev: Hold runtime PM ref during fbdev BO creation")

---
 drivers/gpu/drm/xe/display/intel_fbdev_fb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/xe/display/intel_fbdev_fb.c +1 -1
index 8ea9a472113c4..bce4cb16f6820 100644
@@ -33,7 +33,7 @@ struct intel_framebuffer *intel_fbdev_fb_alloc(struct drm_fb_helper *helper,
 	mode_cmd.height = sizes->surface_height;
 
 	mode_cmd.pitches[0] = ALIGN(mode_cmd.width *
-				    DIV_ROUND_UP(sizes->surface_bpp, 8), XE_PAGE_SIZE);
+				    DIV_ROUND_UP(sizes->surface_bpp, 8), 64);
 	mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp,
 							  sizes->surface_depth);
 
Signature · 1 line
2.51.0
author maintainer
#597 lore raw

PATCH 586/614 drm/i915/fbdev: make intel_framebuffer_create() error return handling explicit

In reply to Greg Kroah-Hartman

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

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

From: Jani Nikula <[email protected]>

[ Upstream commit 6979d2c80c2a5b1f04157c4d6eb038bb32861cfa ]

It's sketchy to pass error pointers via to_intel_framebuffer(). It probably works as long as struct intel_framebuffer embeds struct drm_framebuffer at offset 0, but be explicit about it.

Stable-dep-of: 460b31720369 ("drm/i915/fbdev: Hold runtime PM ref during fbdev BO creation")

---
 drivers/gpu/drm/i915/display/intel_fbdev_fb.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/gpu/drm/i915/display/intel_fbdev_fb.c +7 -0
index 210aee9ae88b8..b9dfd00a7d05b 100644
@@ -67,9 +67,16 @@ struct intel_framebuffer *intel_fbdev_fb_alloc(struct drm_fb_helper *helper,
 							  mode_cmd.pixel_format,
 							  mode_cmd.modifier[0]),
 				      &mode_cmd);
+	if (IS_ERR(fb)) {
+		i915_gem_object_put(obj);
+		goto err;
+	}
+
 	i915_gem_object_put(obj);
 
 	return to_intel_framebuffer(fb);
+err:
+	return ERR_CAST(fb);
 }
 
 int intel_fbdev_fb_fill_info(struct intel_display *display, struct fb_info *info,
Signature · 1 line
2.51.0
author maintainer
#598 lore raw

PATCH 587/614 drm/{i915, xe}/fbdev: pass struct drm_device to intel_fbdev_fb_alloc()

In reply to Greg Kroah-Hartman

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

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

From: Jani Nikula <[email protected]>

[ Upstream commit 9e5cf822a207ee8c9856024c047abaccb4d185e5 ]

The function doesn't actually need struct drm_fb_helper for anything, just pass struct drm_device.

Stable-dep-of: 460b31720369 ("drm/i915/fbdev: Hold runtime PM ref during fbdev BO creation")

---
 drivers/gpu/drm/i915/display/intel_fbdev.c    |  2 +-
 drivers/gpu/drm/i915/display/intel_fbdev_fb.c | 10 +++++-----
 drivers/gpu/drm/i915/display/intel_fbdev_fb.h |  4 ++--
 drivers/gpu/drm/xe/display/intel_fbdev_fb.c   |  7 +++----
 4 files changed, 11 insertions(+), 12 deletions(-)
drivers/gpu/drm/i915/display/intel_fbdev.c +1 -1
index 7c4709d58aa34..46c6de5f60888 100644
@@ -237,7 +237,7 @@ int intel_fbdev_driver_fbdev_probe(struct drm_fb_helper *helper,
 	if (!fb || drm_WARN_ON(display->drm, !intel_fb_bo(&fb->base))) {
 		drm_dbg_kms(display->drm,
 			    "no BIOS fb, allocating a new one\n");
-		fb = intel_fbdev_fb_alloc(helper, sizes);
+		fb = intel_fbdev_fb_alloc(display->drm, sizes);
 		if (IS_ERR(fb))
 			return PTR_ERR(fb);
 	} else {
drivers/gpu/drm/i915/display/intel_fbdev_fb.c +5 -5
index b9dfd00a7d05b..4de13d1a4c7a7 100644
@@ -13,11 +13,11 @@
 #include "intel_fb.h"
 #include "intel_fbdev_fb.h"
 
-struct intel_framebuffer *intel_fbdev_fb_alloc(struct drm_fb_helper *helper,
+struct intel_framebuffer *intel_fbdev_fb_alloc(struct drm_device *drm,
 					       struct drm_fb_helper_surface_size *sizes)
 {
-	struct intel_display *display = to_intel_display(helper->dev);
-	struct drm_i915_private *dev_priv = to_i915(display->drm);
+	struct intel_display *display = to_intel_display(drm);
+	struct drm_i915_private *dev_priv = to_i915(drm);
 	struct drm_framebuffer *fb;
 	struct drm_mode_fb_cmd2 mode_cmd = {};
 	struct drm_i915_gem_object *obj;
@@ -58,12 +58,12 @@ struct intel_framebuffer *intel_fbdev_fb_alloc(struct drm_fb_helper *helper,
 	}
 
 	if (IS_ERR(obj)) {
-		drm_err(display->drm, "failed to allocate framebuffer (%pe)\n", obj);
+		drm_err(drm, "failed to allocate framebuffer (%pe)\n", obj);
 		return ERR_PTR(-ENOMEM);
 	}
 
 	fb = intel_framebuffer_create(intel_bo_to_drm_bo(obj),
-				      drm_get_format_info(display->drm,
+				      drm_get_format_info(drm,
 							  mode_cmd.pixel_format,
 							  mode_cmd.modifier[0]),
 				      &mode_cmd);
drivers/gpu/drm/i915/display/intel_fbdev_fb.h +2 -2
index cb79572727150..668ae355f5e5b 100644
@@ -6,14 +6,14 @@
 #ifndef __INTEL_FBDEV_FB_H__
 #define __INTEL_FBDEV_FB_H__
 
-struct drm_fb_helper;
+struct drm_device;
 struct drm_fb_helper_surface_size;
 struct drm_gem_object;
 struct fb_info;
 struct i915_vma;
 struct intel_display;
 
-struct intel_framebuffer *intel_fbdev_fb_alloc(struct drm_fb_helper *helper,
+struct intel_framebuffer *intel_fbdev_fb_alloc(struct drm_device *drm,
 					       struct drm_fb_helper_surface_size *sizes);
 int intel_fbdev_fb_fill_info(struct intel_display *display, struct fb_info *info,
 			     struct drm_gem_object *obj, struct i915_vma *vma);
drivers/gpu/drm/xe/display/intel_fbdev_fb.c +3 -4
index bce4cb16f6820..5c0874bfa6ab1 100644
@@ -15,12 +15,11 @@
 
 #include <generated/xe_wa_oob.h>
 
-struct intel_framebuffer *intel_fbdev_fb_alloc(struct drm_fb_helper *helper,
+struct intel_framebuffer *intel_fbdev_fb_alloc(struct drm_device *drm,
 					       struct drm_fb_helper_surface_size *sizes)
 {
 	struct drm_framebuffer *fb;
-	struct drm_device *dev = helper->dev;
-	struct xe_device *xe = to_xe_device(dev);
+	struct xe_device *xe = to_xe_device(drm);
 	struct drm_mode_fb_cmd2 mode_cmd = {};
 	struct xe_bo *obj;
 	int size;
@@ -67,7 +66,7 @@ struct intel_framebuffer *intel_fbdev_fb_alloc(struct drm_fb_helper *helper,
 	}
 
 	fb = intel_framebuffer_create(&obj->ttm.base,
-				      drm_get_format_info(dev,
+				      drm_get_format_info(drm,
 							  mode_cmd.pixel_format,
 							  mode_cmd.modifier[0]),
 				      &mode_cmd);
Signature · 1 line
2.51.0
author maintainer
#599 lore raw

PATCH 588/614 drm/{i915, xe}/fbdev: deduplicate struct drm_mode_fb_cmd2 init

In reply to Greg Kroah-Hartman

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

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

From: Jani Nikula <[email protected]>

[ Upstream commit f9ff39f940f5ddd1d4ffcff602de7206aa1ff05d ]

Pull struct drm_mode_fb_cmd2 initialization out of the driver dependent code into shared display code.

v2: Rebase on xe stride alignment change

Stable-dep-of: 460b31720369 ("drm/i915/fbdev: Hold runtime PM ref during fbdev BO creation")

---
 drivers/gpu/drm/i915/display/intel_fbdev.c    | 32 ++++++++++++++++++-
 drivers/gpu/drm/i915/display/intel_fbdev_fb.c | 25 ++++-----------
 drivers/gpu/drm/i915/display/intel_fbdev_fb.h |  4 +--
 drivers/gpu/drm/xe/display/intel_fbdev_fb.c   | 25 ++++-----------
 4 files changed, 45 insertions(+), 41 deletions(-)
drivers/gpu/drm/i915/display/intel_fbdev.c +31 -1
index 46c6de5f60888..e46c08762b847 100644
@@ -207,6 +207,35 @@ static const struct drm_fb_helper_funcs intel_fb_helper_funcs = {
 	.fb_set_suspend = intelfb_set_suspend,
 };
 
+static void intel_fbdev_fill_mode_cmd(struct drm_fb_helper_surface_size *sizes,
+				      struct drm_mode_fb_cmd2 *mode_cmd)
+{
+	/* we don't do packed 24bpp */
+	if (sizes->surface_bpp == 24)
+		sizes->surface_bpp = 32;
+
+	mode_cmd->width = sizes->surface_width;
+	mode_cmd->height = sizes->surface_height;
+
+	mode_cmd->pitches[0] = ALIGN(mode_cmd->width * DIV_ROUND_UP(sizes->surface_bpp, 8), 64);
+	mode_cmd->pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp,
+							   sizes->surface_depth);
+}
+
+static struct intel_framebuffer *
+__intel_fbdev_fb_alloc(struct intel_display *display,
+		       struct drm_fb_helper_surface_size *sizes)
+{
+	struct drm_mode_fb_cmd2 mode_cmd = {};
+	struct intel_framebuffer *fb;
+
+	intel_fbdev_fill_mode_cmd(sizes, &mode_cmd);
+
+	fb = intel_fbdev_fb_alloc(display->drm, &mode_cmd);
+
+	return fb;
+}
+
 int intel_fbdev_driver_fbdev_probe(struct drm_fb_helper *helper,
 				   struct drm_fb_helper_surface_size *sizes)
 {
@@ -237,7 +266,8 @@ int intel_fbdev_driver_fbdev_probe(struct drm_fb_helper *helper,
 	if (!fb || drm_WARN_ON(display->drm, !intel_fb_bo(&fb->base))) {
 		drm_dbg_kms(display->drm,
 			    "no BIOS fb, allocating a new one\n");
-		fb = intel_fbdev_fb_alloc(display->drm, sizes);
+
+		fb = __intel_fbdev_fb_alloc(display, sizes);
 		if (IS_ERR(fb))
 			return PTR_ERR(fb);
 	} else {
drivers/gpu/drm/i915/display/intel_fbdev_fb.c +6 -19
index 4de13d1a4c7a7..685612e6afc53 100644
@@ -3,7 +3,7 @@
  * Copyright © 2023 Intel Corporation
  */
 
-#include <drm/drm_fb_helper.h>
+#include <linux/fb.h>
 
 #include "gem/i915_gem_lmem.h"
 
@@ -14,28 +14,15 @@
 #include "intel_fbdev_fb.h"
 
 struct intel_framebuffer *intel_fbdev_fb_alloc(struct drm_device *drm,
-					       struct drm_fb_helper_surface_size *sizes)
+					       struct drm_mode_fb_cmd2 *mode_cmd)
 {
 	struct intel_display *display = to_intel_display(drm);
 	struct drm_i915_private *dev_priv = to_i915(drm);
 	struct drm_framebuffer *fb;
-	struct drm_mode_fb_cmd2 mode_cmd = {};
 	struct drm_i915_gem_object *obj;
 	int size;
 
-	/* we don't do packed 24bpp */
-	if (sizes->surface_bpp == 24)
-		sizes->surface_bpp = 32;
-
-	mode_cmd.width = sizes->surface_width;
-	mode_cmd.height = sizes->surface_height;
-
-	mode_cmd.pitches[0] = ALIGN(mode_cmd.width *
-				    DIV_ROUND_UP(sizes->surface_bpp, 8), 64);
-	mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp,
-							  sizes->surface_depth);
-
-	size = mode_cmd.pitches[0] * mode_cmd.height;
+	size = mode_cmd->pitches[0] * mode_cmd->height;
 	size = PAGE_ALIGN(size);
 
 	obj = ERR_PTR(-ENODEV);
@@ -64,9 +51,9 @@ struct intel_framebuffer *intel_fbdev_fb_alloc(struct drm_device *drm,
 
 	fb = intel_framebuffer_create(intel_bo_to_drm_bo(obj),
 				      drm_get_format_info(drm,
-							  mode_cmd.pixel_format,
-							  mode_cmd.modifier[0]),
-				      &mode_cmd);
+							  mode_cmd->pixel_format,
+							  mode_cmd->modifier[0]),
+				      mode_cmd);
 	if (IS_ERR(fb)) {
 		i915_gem_object_put(obj);
 		goto err;
drivers/gpu/drm/i915/display/intel_fbdev_fb.h +2 -2
index 668ae355f5e5b..83454ffbf79cd 100644
@@ -7,14 +7,14 @@
 #define __INTEL_FBDEV_FB_H__
 
 struct drm_device;
-struct drm_fb_helper_surface_size;
 struct drm_gem_object;
+struct drm_mode_fb_cmd2;
 struct fb_info;
 struct i915_vma;
 struct intel_display;
 
 struct intel_framebuffer *intel_fbdev_fb_alloc(struct drm_device *drm,
-					       struct drm_fb_helper_surface_size *sizes);
+					       struct drm_mode_fb_cmd2 *mode_cmd);
 int intel_fbdev_fb_fill_info(struct intel_display *display, struct fb_info *info,
 			     struct drm_gem_object *obj, struct i915_vma *vma);
 
drivers/gpu/drm/xe/display/intel_fbdev_fb.c +6 -19
index 5c0874bfa6ab1..8eaf1cc7fdf93 100644
@@ -3,7 +3,7 @@
  * Copyright © 2023 Intel Corporation
  */
 
-#include <drm/drm_fb_helper.h>
+#include <linux/fb.h>
 
 #include "intel_display_core.h"
 #include "intel_display_types.h"
@@ -16,27 +16,14 @@
 #include <generated/xe_wa_oob.h>
 
 struct intel_framebuffer *intel_fbdev_fb_alloc(struct drm_device *drm,
-					       struct drm_fb_helper_surface_size *sizes)
+					       struct drm_mode_fb_cmd2 *mode_cmd)
 {
 	struct drm_framebuffer *fb;
 	struct xe_device *xe = to_xe_device(drm);
-	struct drm_mode_fb_cmd2 mode_cmd = {};
 	struct xe_bo *obj;
 	int size;
 
-	/* we don't do packed 24bpp */
-	if (sizes->surface_bpp == 24)
-		sizes->surface_bpp = 32;
-
-	mode_cmd.width = sizes->surface_width;
-	mode_cmd.height = sizes->surface_height;
-
-	mode_cmd.pitches[0] = ALIGN(mode_cmd.width *
-				    DIV_ROUND_UP(sizes->surface_bpp, 8), 64);
-	mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp,
-							  sizes->surface_depth);
-
-	size = mode_cmd.pitches[0] * mode_cmd.height;
+	size = mode_cmd->pitches[0] * mode_cmd->height;
 	size = PAGE_ALIGN(size);
 	obj = ERR_PTR(-ENODEV);
 
@@ -67,9 +54,9 @@ struct intel_framebuffer *intel_fbdev_fb_alloc(struct drm_device *drm,
 
 	fb = intel_framebuffer_create(&obj->ttm.base,
 				      drm_get_format_info(drm,
-							  mode_cmd.pixel_format,
-							  mode_cmd.modifier[0]),
-				      &mode_cmd);
+							  mode_cmd->pixel_format,
+							  mode_cmd->modifier[0]),
+				      mode_cmd);
 	if (IS_ERR(fb)) {
 		xe_bo_unpin_map_no_vm(obj);
 		goto err;
Signature · 1 line
2.51.0
author maintainer
#600 lore raw

PATCH 589/614 drm/i915/fbdev: Hold runtime PM ref during fbdev BO creation

In reply to Greg Kroah-Hartman

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

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

From: Dibin Moolakadan Subrahmanian <[email protected]>

[ Upstream commit 460b31720369fc77c23301708641cfa1bf2fcb8f ]

During fbdev probe, the xe driver allocates and pins a framebuffer BO (via xe_bo_create_pin_map_novm() → xe_ggtt_insert_bo()).

Without a runtime PM reference, xe_pm_runtime_get_noresume() warns about missing outer PM protection as below:

	xe 0000:03:00.0: [drm] Missing outer runtime PM protection

Acquire a runtime PM reference before framebuffer allocation to ensure xe_ggtt_insert_bo() executes under active runtime PM context.

Changes in v2:
- Update commit message to add Fixes tag (Jani Nikula)

Fixes 44e694958b95 ("drm/xe/display: Implement display support")
Cc Jani Nikula <[email protected]>
(cherry picked from commit 37fc7b7b3ab0e3bb900657199cd3770a4fda03fb)
---
 drivers/gpu/drm/i915/display/intel_fbdev.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/display/intel_fbdev.c +7 -4
index e46c08762b847..7daf72b69bae4 100644
@@ -263,13 +263,18 @@ int intel_fbdev_driver_fbdev_probe(struct drm_fb_helper *helper,
 		drm_framebuffer_put(&fb->base);
 		fb = NULL;
 	}
+
+	wakeref = intel_display_rpm_get(display);
+
 	if (!fb || drm_WARN_ON(display->drm, !intel_fb_bo(&fb->base))) {
 		drm_dbg_kms(display->drm,
 			    "no BIOS fb, allocating a new one\n");
 
 		fb = __intel_fbdev_fb_alloc(display, sizes);
-		if (IS_ERR(fb))
-			return PTR_ERR(fb);
+		if (IS_ERR(fb)) {
+			ret = PTR_ERR(fb);
+			goto out_unlock;
+		}
 	} else {
 		drm_dbg_kms(display->drm, "re-using BIOS fb\n");
 		prealloc = true;
@@ -277,8 +282,6 @@ int intel_fbdev_driver_fbdev_probe(struct drm_fb_helper *helper,
 		sizes->fb_height = fb->base.height;
 	}
 
-	wakeref = intel_display_rpm_get(display);
-
 	/* Pin the GGTT vma for our access via info->screen_base.
 	 * This also validates that any existing fb inherited from the
 	 * BIOS is suitable for own access.
Signature · 1 line
2.51.0
author maintainer
#601 lore raw

PATCH 590/614 block: Use RCU in blk_mq_[un]quiesce_tagset() instead of set->tag_list_lock

In reply to Greg Kroah-Hartman

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

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

From: Mohamed Khalfella <[email protected]>

[ Upstream commit 59e25ef2b413c72da6686d431e7759302cfccafa ]

blk_mq_{add,del}_queue_tag_set() functions add and remove queues from tagset, the functions make sure that tagset and queues are marked as shared when two or more queues are attached to the same tagset. Initially a tagset starts as unshared and when the number of added queues reaches two, blk_mq_add_queue_tag_set() marks it as shared along with all the queues attached to it. When the number of attached queues drops to 1 blk_mq_del_queue_tag_set() need to mark both the tagset and the remaining queues as unshared.

Both functions need to freeze current queues in tagset before setting on unsetting BLK_MQ_F_TAG_QUEUE_SHARED flag. While doing so, both functions hold set->tag_list_lock mutex, which makes sense as we do not want queues to be added or deleted in the process. This used to work fine until commit 98d81f0df70c ("nvme: use blk_mq_[un]quiesce_tagset") made the nvme driver quiesce tagset instead of quiscing individual queues. blk_mq_quiesce_tagset() does the job and quiesce the queues in set->tag_list while holding set->tag_list_lock also.

This results in deadlock between two threads with these stacktraces:

  __schedule+0x47c/0xbb0
  ? timerqueue_add+0x66/0xb0
  schedule+0x1c/0xa0
  schedule_preempt_disabled+0xa/0x10
  __mutex_lock.constprop.0+0x271/0x600
  blk_mq_quiesce_tagset+0x25/0xc0
  nvme_dev_disable+0x9c/0x250
  nvme_timeout+0x1fc/0x520
  blk_mq_handle_expired+0x5c/0x90
  bt_iter+0x7e/0x90
  blk_mq_queue_tag_busy_iter+0x27e/0x550
  ? __blk_mq_complete_request_remote+0x10/0x10
  ? __blk_mq_complete_request_remote+0x10/0x10
  ? __call_rcu_common.constprop.0+0x1c0/0x210
  blk_mq_timeout_work+0x12d/0x170
  process_one_work+0x12e/0x2d0
  worker_thread+0x288/0x3a0
  ? rescuer_thread+0x480/0x480
  kthread+0xb8/0xe0
  ? kthread_park+0x80/0x80
  ret_from_fork+0x2d/0x50
  ? kthread_park+0x80/0x80
  ret_from_fork_asm+0x11/0x20

  __schedule+0x47c/0xbb0
  ? xas_find+0x161/0x1a0
  schedule+0x1c/0xa0
  blk_mq_freeze_queue_wait+0x3d/0x70
  ? destroy_sched_domains_rcu+0x30/0x30
  blk_mq_update_tag_set_shared+0x44/0x80
  blk_mq_exit_queue+0x141/0x150
  del_gendisk+0x25a/0x2d0
  nvme_ns_remove+0xc9/0x170
  nvme_remove_namespaces+0xc7/0x100
  nvme_remove+0x62/0x150
  pci_device_remove+0x23/0x60
  device_release_driver_internal+0x159/0x200
  unbind_store+0x99/0xa0
  kernfs_fop_write_iter+0x112/0x1e0
  vfs_write+0x2b1/0x3d0
  ksys_write+0x4e/0xb0
  do_syscall_64+0x5b/0x160
  entry_SYSCALL_64_after_hwframe+0x4b/0x53

The top stacktrace is showing nvme_timeout() called to handle nvme command timeout. timeout handler is trying to disable the controller and as a first step, it needs to blk_mq_quiesce_tagset() to tell blk-mq not to call queue callback handlers. The thread is stuck waiting for set->tag_list_lock as it tries to walk the queues in set->tag_list.

The lock is held by the second thread in the bottom stack which is waiting for one of queues to be frozen. The queue usage counter will drop to zero after nvme_timeout() finishes, and this will not happen because the thread will wait for this mutex forever.

Given that [un]quiescing queue is an operation that does not need to sleep, update blk_mq_[un]quiesce_tagset() to use RCU instead of taking set->tag_list_lock, update blk_mq_{add,del}_queue_tag_set() to use RCU safe list operations. Also, delete INIT_LIST_HEAD(&q->tag_set_list) in blk_mq_del_queue_tag_set() because we can not re-initialize it while the list is being traversed under RCU. The deleted queue will not be added/deleted to/from a tagset and it will be freed in blk_free_queue() after the end of RCU grace period.

Fixes 98d81f0df70c ("nvme: use blk_mq_[un]quiesce_tagset")
---
 block/blk-mq.c | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)
block/blk-mq.c +8 -9
index 33a0062f9e56d..f901aeba85522 100644
@@ -336,12 +336,12 @@ void blk_mq_quiesce_tagset(struct blk_mq_tag_set *set)
 {
 	struct request_queue *q;
 
-	mutex_lock(&set->tag_list_lock);
-	list_for_each_entry(q, &set->tag_list, tag_set_list) {
+	rcu_read_lock();
+	list_for_each_entry_rcu(q, &set->tag_list, tag_set_list) {
 		if (!blk_queue_skip_tagset_quiesce(q))
 			blk_mq_quiesce_queue_nowait(q);
 	}
-	mutex_unlock(&set->tag_list_lock);
+	rcu_read_unlock();
 
 	blk_mq_wait_quiesce_done(set);
 }
@@ -351,12 +351,12 @@ void blk_mq_unquiesce_tagset(struct blk_mq_tag_set *set)
 {
 	struct request_queue *q;
 
-	mutex_lock(&set->tag_list_lock);
-	list_for_each_entry(q, &set->tag_list, tag_set_list) {
+	rcu_read_lock();
+	list_for_each_entry_rcu(q, &set->tag_list, tag_set_list) {
 		if (!blk_queue_skip_tagset_quiesce(q))
 			blk_mq_unquiesce_queue(q);
 	}
-	mutex_unlock(&set->tag_list_lock);
+	rcu_read_unlock();
 }
 EXPORT_SYMBOL_GPL(blk_mq_unquiesce_tagset);
 
@@ -4308,7 +4308,7 @@ static void blk_mq_del_queue_tag_set(struct request_queue *q)
 	struct blk_mq_tag_set *set = q->tag_set;
 
 	mutex_lock(&set->tag_list_lock);
-	list_del(&q->tag_set_list);
+	list_del_rcu(&q->tag_set_list);
 	if (list_is_singular(&set->tag_list)) {
 		/* just transitioned to unshared */
 		set->flags &= ~BLK_MQ_F_TAG_QUEUE_SHARED;
@@ -4316,7 +4316,6 @@ static void blk_mq_del_queue_tag_set(struct request_queue *q)
 		blk_mq_update_tag_set_shared(set, false);
 	}
 	mutex_unlock(&set->tag_list_lock);
-	INIT_LIST_HEAD(&q->tag_set_list);
 }
 
 static void blk_mq_add_queue_tag_set(struct blk_mq_tag_set *set,
@@ -4335,7 +4334,7 @@ static void blk_mq_add_queue_tag_set(struct blk_mq_tag_set *set,
 	}
 	if (set->flags & BLK_MQ_F_TAG_QUEUE_SHARED)
 		queue_set_hctx_shared(q, true);
-	list_add_tail(&q->tag_set_list, &set->tag_list);
+	list_add_tail_rcu(&q->tag_set_list, &set->tag_list);
 
 	mutex_unlock(&set->tag_list_lock);
 }
Signature · 1 line
2.51.0
author maintainer
#602 lore raw

PATCH 591/614 ASoC: amd: acp: update tdm channels for specific DAI

In reply to Greg Kroah-Hartman

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

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

From: Hemalatha Pinnamreddy <[email protected]>

[ Upstream commit f34836a8ddf9216ff919927cddb705022bf30aab ]

TDM channel updates were applied to all DAIs, causing configurations to overwrite for unrelated streams. The logic is modified to update channels only for targeted DAI. This prevents corruption of other DAI settings and resolves audio issues observed during system suspend and resume cycles.

---
 sound/soc/amd/acp/acp-i2s.c | 2 ++
 1 file changed, 2 insertions(+)
sound/soc/amd/acp/acp-i2s.c +2 -0
index 4ba0a66981ea9..283a674c7e2c3 100644
@@ -157,6 +157,8 @@ static int acp_i2s_set_tdm_slot(struct snd_soc_dai *dai, u32 tx_mask, u32 rx_mas
 
 	spin_lock_irq(&chip->acp_lock);
 	list_for_each_entry(stream, &chip->stream_list, list) {
+		if (dai->id != stream->dai_id)
+			continue;
 		switch (chip->acp_rev) {
 		case ACP_RN_PCI_ID:
 		case ACP_RMB_PCI_ID:
Signature · 1 line
2.51.0
author maintainer
#603 lore raw

PATCH 592/614 dm-raid: fix possible NULL dereference with undefined raid type

In reply to Greg Kroah-Hartman

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

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

From: Alexey Simakov <[email protected]>

[ Upstream commit 2f6cfd6d7cb165a7af8877b838a9f6aab4159324 ]

rs->raid_type is assigned from get_raid_type_by_ll(), which may return NULL. This NULL value could be dereferenced later in the condition 'if (!(rs_is_raid10(rs) && rt_is_raid0(rs->raid_type)))'.

Add a fail-fast check to return early with an error if raid_type is NULL, similar to other uses of this function.

Found by Linux Verification Center (linuxtesting.org) with Svace.

Fixes 33e53f06850f ("dm raid: introduce extended superblock and new raid types to support takeover/reshaping")
---
 drivers/md/dm-raid.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/md/dm-raid.c +2 -0
index c6f7129e43d34..4bacdc499984b 100644
@@ -2287,6 +2287,8 @@ static int super_init_validation(struct raid_set *rs, struct md_rdev *rdev)
 
 			mddev->reshape_position = le64_to_cpu(sb->reshape_position);
 			rs->raid_type = get_raid_type_by_ll(mddev->level, mddev->layout);
+			if (!rs->raid_type)
+				return -EINVAL;
 		}
 
 	} else {
Signature · 1 line
2.51.0
author maintainer
#604 lore raw

PATCH 593/614 dm log-writes: Add missing set_freezable() for freezable kthread

In reply to Greg Kroah-Hartman

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

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

From: Haotian Zhang <[email protected]>

[ Upstream commit ab08f9c8b363297cafaf45475b08f78bf19b88ef ]

The log_writes_kthread() calls try_to_freeze() but lacks set_freezable(), rendering the freeze attempt ineffective since kernel threads are non-freezable by default. This prevents proper thread suspension during system suspend/hibernate.

Add set_freezable() to explicitly mark the thread as freezable.

Fixes 0e9cebe72459 ("dm: add log writes target")
---
 drivers/md/dm-log-writes.c | 1 +
 1 file changed, 1 insertion(+)
drivers/md/dm-log-writes.c +1 -0
index 7bb7174f8f4f8..f0c84e7a5daa6 100644
@@ -432,6 +432,7 @@ static int log_writes_kthread(void *arg)
 	struct log_writes_c *lc = arg;
 	sector_t sector = 0;
 
+	set_freezable();
 	while (!kthread_should_stop()) {
 		bool super = false;
 		bool logging_enabled;
Signature · 1 line
2.51.0
author maintainer
#605 lore raw

PATCH 594/614 scsi: imm: Fix use-after-free bug caused by unfinished delayed work

In reply to Greg Kroah-Hartman

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

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

From: Duoming Zhou <[email protected]>

[ Upstream commit ab58153ec64fa3fc9aea09ca09dc9322e0b54a7c ]

The delayed work item 'imm_tq' is initialized in imm_attach() and scheduled via imm_queuecommand() for processing SCSI commands. When the IMM parallel port SCSI host adapter is detached through imm_detach(), the imm_struct device instance is deallocated.

However, the delayed work might still be pending or executing when imm_detach() is called, leading to use-after-free bugs when the work function imm_interrupt() accesses the already freed imm_struct memory.

The race condition can occur as follows:

CPU 0(detach thread)   | CPU 1
                       | imm_queuecommand()
                       |   imm_queuecommand_lck()
imm_detach()           |     schedule_delayed_work()
  kfree(dev) //FREE    | imm_interrupt()
                       |   dev = container_of(...) //USE
                           dev-> //USE

Add disable_delayed_work_sync() in imm_detach() to guarantee proper cancellation of the delayed work item before imm_struct is deallocated.

---
 drivers/scsi/imm.c | 1 +
 1 file changed, 1 insertion(+)
drivers/scsi/imm.c +1 -0
index 5c602c0577989..45b0e33293a59 100644
@@ -1260,6 +1260,7 @@ static void imm_detach(struct parport *pb)
 	imm_struct *dev;
 	list_for_each_entry(dev, &imm_hosts, list) {
 		if (dev->dev->port == pb) {
+			disable_delayed_work_sync(&dev->imm_tq);
 			list_del_init(&dev->list);
 			scsi_remove_host(dev->host);
 			scsi_host_put(dev->host);
Signature · 1 line
2.51.0
author maintainer
#606 lore raw

PATCH 595/614 scsi: ufs: core: Fix an error handler crash

In reply to Greg Kroah-Hartman

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

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

From: Bart Van Assche <[email protected]>

[ Upstream commit 14be351e5cd07349377010e457a58fac99201832 ]

The UFS error handler may be activated before SCSI scanning has started and hence before hba->ufs_device_wlun has been set. Check the hba->ufs_device_wlun pointer before using it.

Cc Peter Wang <[email protected]>
Cc Nitin Rawat <[email protected]>
Fixes e23ef4f22db3 ("scsi: ufs: core: Fix error handler host_sem issue")
Fixes f966e02ae521 ("scsi: ufs: core: Fix runtime suspend error deadlock")
---
 drivers/ufs/core/ufshcd.c | 25 ++++++++++++++-----------
 1 file changed, 14 insertions(+), 11 deletions(-)
drivers/ufs/core/ufshcd.c +14 -11
index 12f5a7a973128..a921a9098a291 100644
@@ -6670,19 +6670,22 @@ static void ufshcd_err_handler(struct work_struct *work)
 		 hba->saved_uic_err, hba->force_reset,
 		 ufshcd_is_link_broken(hba) ? "; link is broken" : "");
 
-	/*
-	 * Use ufshcd_rpm_get_noresume() here to safely perform link recovery
-	 * even if an error occurs during runtime suspend or runtime resume.
-	 * This avoids potential deadlocks that could happen if we tried to
-	 * resume the device while a PM operation is already in progress.
-	 */
-	ufshcd_rpm_get_noresume(hba);
-	if (hba->pm_op_in_progress) {
-		ufshcd_link_recovery(hba);
+	if (hba->ufs_device_wlun) {
+		/*
+		 * Use ufshcd_rpm_get_noresume() here to safely perform link
+		 * recovery even if an error occurs during runtime suspend or
+		 * runtime resume. This avoids potential deadlocks that could
+		 * happen if we tried to resume the device while a PM operation
+		 * is already in progress.
+		 */
+		ufshcd_rpm_get_noresume(hba);
+		if (hba->pm_op_in_progress) {
+			ufshcd_link_recovery(hba);
+			ufshcd_rpm_put(hba);
+			return;
+		}
 		ufshcd_rpm_put(hba);
-		return;
 	}
-	ufshcd_rpm_put(hba);
 
 	down(&hba->host_sem);
 	spin_lock_irqsave(hba->host->host_lock, flags);
Signature · 1 line
2.51.0
author maintainer
#607 lore raw

PATCH 596/614 perf/core: Fix missing read event generation on task exit

In reply to Greg Kroah-Hartman

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

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

From: Thaumy Cheng <[email protected]>

[ Upstream commit c418d8b4d7a43a86b82ee39cb52ece3034383530 ]

For events with inherit_stat enabled, a "read" event will be generated to collect per task event counts on task exit.

The call chain is as follows:

do_exit
-> perf_event_exit_task

    -> perf_event_exit_task_context
      -> perf_event_exit_event
        -> perf_remove_from_context
          -> perf_child_detach
            -> sync_child_event
              -> perf_event_read_event

However, the child event context detaches the task too early in perf_event_exit_task_context, which causes sync_child_event to never generate the read event in this case, since child_event->ctx->task is always set to TASK_TOMBSTONE. Fix that by moving context lock section backward to ensure ctx->task is not set to TASK_TOMBSTONE before generating the read event.

Because perf_event_free_task calls perf_event_exit_task_context with exit = false to tear down all child events from the context, and the task never lived, accessing the task PID can lead to a use-after-free.

To fix that, let sync_child_event read task from argument and move the call to the only place it should be triggered to avoid the effect of setting ctx->task to TASK_TOMESTONE, and add a task parameter to perf_event_exit_event to trigger the sync_child_event properly when needed.

This bug can be reproduced by running "perf record -s" and attaching to any program that generates perf events in its child tasks. If we check the result with "perf report -T", the last line of the report will leave an empty table like "# PID TID", which is expected to contain the per-task event counts by design.

Fixes ef54c1a476ae ("perf: Rework perf_event_exit_event()")
Cc Adrian Hunter <[email protected]>
Cc Alexander Shishkin <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Ian Rogers <[email protected]>
Cc James Clark <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Namhyung Kim <[email protected]>
---
 kernel/events/core.c | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)
kernel/events/core.c +12 -10
index 2c35acc2722b0..413b88a4e00fb 100644
@@ -2316,8 +2316,6 @@ static void perf_group_detach(struct perf_event *event)
 	perf_event__header_size(leader);
 }
 
-static void sync_child_event(struct perf_event *child_event);
-
 static void perf_child_detach(struct perf_event *event)
 {
 	struct perf_event *parent_event = event->parent;
@@ -2336,7 +2334,6 @@ static void perf_child_detach(struct perf_event *event)
 	lockdep_assert_held(&parent_event->child_mutex);
 	 */
 
-	sync_child_event(event);
 	list_del_init(&event->child_list);
 }
 
@@ -4587,6 +4584,7 @@ static void perf_event_enable_on_exec(struct perf_event_context *ctx)
 static void perf_remove_from_owner(struct perf_event *event);
 static void perf_event_exit_event(struct perf_event *event,
 				  struct perf_event_context *ctx,
+				  struct task_struct *task,
 				  bool revoke);
 
 /*
@@ -4614,7 +4612,7 @@ static void perf_event_remove_on_exec(struct perf_event_context *ctx)
 
 		modified = true;
 
-		perf_event_exit_event(event, ctx, false);
+		perf_event_exit_event(event, ctx, ctx->task, false);
 	}
 
 	raw_spin_lock_irqsave(&ctx->lock, flags);
@@ -12447,7 +12445,7 @@ static void __pmu_detach_event(struct pmu *pmu, struct perf_event *event,
 	/*
 	 * De-schedule the event and mark it REVOKED.
 	 */
-	perf_event_exit_event(event, ctx, true);
+	perf_event_exit_event(event, ctx, ctx->task, true);
 
 	/*
 	 * All _free_event() bits that rely on event->pmu:
@@ -14004,14 +14002,13 @@ void perf_pmu_migrate_context(struct pmu *pmu, int src_cpu, int dst_cpu)
 }
 EXPORT_SYMBOL_GPL(perf_pmu_migrate_context);
 
-static void sync_child_event(struct perf_event *child_event)
+static void sync_child_event(struct perf_event *child_event,
+			     struct task_struct *task)
 {
 	struct perf_event *parent_event = child_event->parent;
 	u64 child_val;
 
 	if (child_event->attr.inherit_stat) {
-		struct task_struct *task = child_event->ctx->task;
-
 		if (task && task != TASK_TOMBSTONE)
 			perf_event_read_event(child_event, task);
 	}
@@ -14030,7 +14027,9 @@ static void sync_child_event(struct perf_event *child_event)
 
 static void
 perf_event_exit_event(struct perf_event *event,
-		      struct perf_event_context *ctx, bool revoke)
+		      struct perf_event_context *ctx,
+		      struct task_struct *task,
+		      bool revoke)
 {
 	struct perf_event *parent_event = event->parent;
 	unsigned long detach_flags = DETACH_EXIT;
@@ -14053,6 +14052,9 @@ perf_event_exit_event(struct perf_event *event,
 		mutex_lock(&parent_event->child_mutex);
 		/* PERF_ATTACH_ITRACE might be set concurrently */
 		attach_state = READ_ONCE(event->attach_state);
+
+		if (attach_state & PERF_ATTACH_CHILD)
+			sync_child_event(event, task);
 	}
 
 	if (revoke)
@@ -14144,7 +14146,7 @@ static void perf_event_exit_task_context(struct task_struct *task, bool exit)
 		perf_event_task(task, ctx, 0);
 
 	list_for_each_entry_safe(child_event, next, &ctx->event_list, event_entry)
-		perf_event_exit_event(child_event, ctx, false);
+		perf_event_exit_event(child_event, ctx, exit ? task : NULL, false);
 
 	mutex_unlock(&ctx->mutex);
 
Signature · 1 line
2.51.0
author maintainer
#608 lore raw

PATCH 597/614 irqchip/mchp-eic: Fix error code in mchp_eic_domain_alloc()

In reply to Greg Kroah-Hartman

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

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

From: Dan Carpenter <[email protected]>

[ Upstream commit 7dbc0d40d8347bd9de55c904f59ea44bcc8dedb7 ]

If irq_domain_translate_twocell() sets "hwirq" to >= MCHP_EIC_NIRQ (2) then it results in an out of bounds access.

The code checks for invalid values, but doesn't set the error code. Return -EINVAL in that case, instead of returning success.

Fixes 00fa3461c86d ("irqchip/mchp-eic: Add support for the Microchip EIC")
---
 drivers/irqchip/irq-mchp-eic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/irqchip/irq-mchp-eic.c +1 -1
index b513a899c0853..979bb86929f8e 100644
@@ -166,7 +166,7 @@ static int mchp_eic_domain_alloc(struct irq_domain *domain, unsigned int virq,
 
 	ret = irq_domain_translate_twocell(domain, fwspec, &hwirq, &type);
 	if (ret || hwirq >= MCHP_EIC_NIRQ)
-		return ret;
+		return ret ?: -EINVAL;
 
 	switch (type) {
 	case IRQ_TYPE_EDGE_RISING:
Signature · 1 line
2.51.0
author maintainer
#609 lore raw

PATCH 598/614 cpu: Make atomic hotplug callbacks run with interrupts disabled on UP

In reply to Greg Kroah-Hartman

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

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

From: Sebastian Andrzej Siewior <[email protected]>

[ Upstream commit c94291914b200e10c72cef23c8e4c67eb4fdbcd9 ]

On SMP systems the CPU hotplug callbacks in the "starting" range are invoked while the CPU is brought up and interrupts are still disabled. Callbacks which are added later are invoked via the hotplug-thread on the target CPU and interrupts are explicitly disabled.

In the UP case callbacks which are added later are invoked directly without the thread indirection. This is in principle okay since there is just one CPU but those callbacks are invoked with interrupt disabled code. That's incorrect as those callbacks assume interrupt disabled context.

Disable interrupts before invoking the callbacks on UP if the state is atomic and interrupts are expected to be disabled. The "save" part is required because this is also invoked early in the boot process while interrupts are disabled and must not be enabled prematurely.

Fixes 06ddd17521bf1 ("sched/smp: Always define is_percpu_thread() and scheduler_ipi()")
---
 kernel/cpu.c | 25 ++++++++++++++++---------
 1 file changed, 16 insertions(+), 9 deletions(-)
kernel/cpu.c +16 -9
index db9f6c539b28c..15000c7abc659 100644
@@ -249,6 +249,14 @@ static int cpuhp_invoke_callback(unsigned int cpu, enum cpuhp_state state,
 	return ret;
 }
 
+/*
+ * The former STARTING/DYING states, ran with IRQs disabled and must not fail.
+ */
+static bool cpuhp_is_atomic_state(enum cpuhp_state state)
+{
+	return CPUHP_AP_IDLE_DEAD <= state && state < CPUHP_AP_ONLINE;
+}
+
 #ifdef CONFIG_SMP
 static bool cpuhp_is_ap_state(enum cpuhp_state state)
 {
@@ -271,14 +279,6 @@ static inline void complete_ap_thread(struct cpuhp_cpu_state *st, bool bringup)
 	complete(done);
 }
 
-/*
- * The former STARTING/DYING states, ran with IRQs disabled and must not fail.
- */
-static bool cpuhp_is_atomic_state(enum cpuhp_state state)
-{
-	return CPUHP_AP_IDLE_DEAD <= state && state < CPUHP_AP_ONLINE;
-}
-
 /* Synchronization state management */
 enum cpuhp_sync_state {
 	SYNC_STATE_DEAD,
@@ -2364,7 +2364,14 @@ static int cpuhp_issue_call(int cpu, enum cpuhp_state state, bool bringup,
 	else
 		ret = cpuhp_invoke_callback(cpu, state, bringup, node, NULL);
 #else
-	ret = cpuhp_invoke_callback(cpu, state, bringup, node, NULL);
+	if (cpuhp_is_atomic_state(state)) {
+		guard(irqsave)();
+		ret = cpuhp_invoke_callback(cpu, state, bringup, node, NULL);
+		/* STARTING/DYING must not fail! */
+		WARN_ON_ONCE(ret);
+	} else {
+		ret = cpuhp_invoke_callback(cpu, state, bringup, node, NULL);
+	}
 #endif
 	BUG_ON(ret && !bringup);
 	return ret;
Signature · 1 line
2.51.0
author maintainer
#610 lore raw

PATCH 599/614 ocfs2: fix memory leak in ocfs2_merge_rec_left()

In reply to Greg Kroah-Hartman

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

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

From: Dmitry Antipov <[email protected]>

[ Upstream commit 2214ec4bf89d0fd27717322d3983a2f3b469c7f3 ]

In 'ocfs2_merge_rec_left()', do not reset 'left_path' to NULL after move, thus allowing 'ocfs2_free_path()' to free it before return.

---
 fs/ocfs2/alloc.c | 1 -
 1 file changed, 1 deletion(-)
fs/ocfs2/alloc.c +0 -1
index 162711cc5b201..a0ced11e0c24a 100644
@@ -3654,7 +3654,6 @@ static int ocfs2_merge_rec_left(struct ocfs2_path *right_path,
 			 * So we use the new rightmost path.
 			 */
 			ocfs2_mv_path(right_path, left_path);
-			left_path = NULL;
 		} else
 			ocfs2_complete_edge_insert(handle, left_path,
 						   right_path, subtree_index);
Signature · 1 line
2.51.0
author maintainer
#611 lore raw

PATCH 600/614 perf/x86/intel: Fix NULL event dereference crash in handle_pmi_common()

In reply to Greg Kroah-Hartman

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

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

From: Evan Li <[email protected]>

[ Upstream commit 9415f749d34b926b9e4853da1462f4d941f89a0d ]

handle_pmi_common() may observe an active bit set in cpuc->active_mask while the corresponding cpuc->events[] entry has already been cleared, which leads to a NULL pointer dereference.

This can happen when interrupt throttling stops all events in a group while PEBS processing is still in progress. perf_event_overflow() can trigger perf_event_throttle_group(), which stops the group and clears the cpuc->events[] entry, but the active bit may still be set when handle_pmi_common() iterates over the events.

The following recent fix:

7e772a93eb61 ("perf/x86: Fix NULL event access and potential PEBS record loss")

moved the cpuc->events[] clearing from x86_pmu_stop() to x86_pmu_del() and relied on cpuc->active_mask/pebs_enabled checks. However, handle_pmi_common() can still encounter a NULL cpuc->events[] entry despite the active bit being set.

Add an explicit NULL check on the event pointer before using it, to cover this legitimate scenario and avoid the NULL dereference crash.

Fixes 7e772a93eb61 ("perf/x86: Fix NULL event access and potential PEBS record loss")
---
 arch/x86/events/intel/core.c | 3 +++
 1 file changed, 3 insertions(+)
arch/x86/events/intel/core.c +3 -0
index 9b824ed6fc1de..32d551f2646a7 100644
@@ -3249,6 +3249,9 @@ static int handle_pmi_common(struct pt_regs *regs, u64 status)
 
 		if (!test_bit(bit, cpuc->active_mask))
 			continue;
+		/* Event may have already been cleared: */
+		if (!event)
+			continue;
 
 		/*
 		 * There may be unprocessed PEBS records in the PEBS buffer,
Signature · 1 line
2.51.0
author maintainer
#612 lore raw

PATCH 601/614 efi/cper: Add a new helper function to print bitmasks

In reply to Greg Kroah-Hartman

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

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

From: Mauro Carvalho Chehab <[email protected]>

[ Upstream commit a976d790f49499ccaa0f991788ad8ebf92e7fd5c ]

Add a helper function to print a string with names associated to each bit field.

A typical example is:

	const char * const bits[] = {
		"bit 3 name",
		"bit 4 name",
		"bit 5 name",
	};
	char str[120];
        unsigned int bitmask = BIT(3) | BIT(5);

	#define MASK  GENMASK(5,3)

	cper_bits_to_str(str, sizeof(str), FIELD_GET(MASK, bitmask),
			 bits, ARRAY_SIZE(bits));

The above code fills string "str" with "bit 3 name|bit 5 name".

---
 drivers/firmware/efi/cper.c | 60 +++++++++++++++++++++++++++++++++++++
 include/linux/cper.h        |  2 ++
 2 files changed, 62 insertions(+)
drivers/firmware/efi/cper.c +60 -0
index 928409199a1a4..79ba688a64f8d 100644
@@ -12,6 +12,7 @@
  * Specification version 2.4.
  */
 
+#include <linux/bitmap.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/time.h>
@@ -106,6 +107,65 @@ void cper_print_bits(const char *pfx, unsigned int bits,
 		printk("%s\n", buf);
 }
 
+/**
+ * cper_bits_to_str - return a string for set bits
+ * @buf: buffer to store the output string
+ * @buf_size: size of the output string buffer
+ * @bits: bit mask
+ * @strs: string array, indexed by bit position
+ * @strs_size: size of the string array: @strs
+ *
+ * Add to @buf the bitmask in hexadecimal. Then, for each set bit in @bits,
+ * add the corresponding string describing the bit in @strs to @buf.
+ *
+ * A typical example is::
+ *
+ *	const char * const bits[] = {
+ *		"bit 3 name",
+ *		"bit 4 name",
+ *		"bit 5 name",
+ *	};
+ *	char str[120];
+ *	unsigned int bitmask = BIT(3) | BIT(5);
+ *	#define MASK GENMASK(5,3)
+ *
+ *	cper_bits_to_str(str, sizeof(str), FIELD_GET(MASK, bitmask),
+ *			 bits, ARRAY_SIZE(bits));
+ *
+ * The above code fills the string ``str`` with ``bit 3 name|bit 5 name``.
+ *
+ * Return: number of bytes stored or an error code if lower than zero.
+ */
+int cper_bits_to_str(char *buf, int buf_size, unsigned long bits,
+		     const char * const strs[], unsigned int strs_size)
+{
+	int len = buf_size;
+	char *str = buf;
+	int i, size;
+
+	*buf = '\0';
+
+	for_each_set_bit(i, &bits, strs_size) {
+		if (!(bits & BIT_ULL(i)))
+			continue;
+
+		if (*buf && len > 0) {
+			*str = '|';
+			len--;
+			str++;
+		}
+
+		size = strscpy(str, strs[i], len);
+		if (size < 0)
+			return size;
+
+		len -= size;
+		str += size;
+	}
+	return len - buf_size;
+}
+EXPORT_SYMBOL_GPL(cper_bits_to_str);
+
 static const char * const proc_type_strs[] = {
 	"IA32/X64",
 	"IA64",
include/linux/cper.h +2 -0
index 0ed60a91eca9d..58f40477c824e 100644
@@ -588,6 +588,8 @@ const char *cper_mem_err_type_str(unsigned int);
 const char *cper_mem_err_status_str(u64 status);
 void cper_print_bits(const char *prefix, unsigned int bits,
 		     const char * const strs[], unsigned int strs_size);
+int cper_bits_to_str(char *buf, int buf_size, unsigned long bits,
+		     const char * const strs[], unsigned int strs_size);
 void cper_mem_err_pack(const struct cper_sec_mem_err *,
 		       struct cper_mem_err_compact *);
 const char *cper_mem_err_unpack(struct trace_seq *,
Signature · 1 line
2.51.0
author maintainer
#613 lore raw

PATCH 602/614 efi/cper: Adjust infopfx size to accept an extra space

In reply to Greg Kroah-Hartman

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

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

From: Mauro Carvalho Chehab <[email protected]>

[ Upstream commit 8ad2c72e21efb3dc76c5b14089fa7984cdd87898 ]

Compiling with W=1 with werror enabled produces an error:

drivers/firmware/efi/cper-arm.c: In function ‘cper_print_proc_arm’:
drivers/firmware/efi/cper-arm.c:298:64: error: ‘snprintf’ output may be truncated before the last format character [-Werror=format-truncation=]
298 | snprintf(infopfx, sizeof(infopfx), "%s ", newpfx);
| ^
drivers/firmware/efi/cper-arm.c:298:25: note: ‘snprintf’ output between 2 and 65 bytes into a destination of size 64

  298 |                         snprintf(infopfx, sizeof(infopfx), "%s ", newpfx);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

As the logic there adds an space at the end of infopx buffer. Add an extra space to avoid such warning.

---
 drivers/firmware/efi/cper-arm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/firmware/efi/cper-arm.c +1 -1
index f0a63d09d3c49..6ff781e47147c 100644
@@ -240,7 +240,7 @@ void cper_print_proc_arm(const char *pfx,
 	int i, len, max_ctx_type;
 	struct cper_arm_err_info *err_info;
 	struct cper_arm_ctx_info *ctx_info;
-	char newpfx[64], infopfx[64];
+	char newpfx[64], infopfx[ARRAY_SIZE(newpfx) + 1];
 
 	printk("%sMIDR: 0x%016llx\n", pfx, proc->midr);
 
Signature · 1 line
2.51.0
author maintainer
#614 lore raw

PATCH 603/614 efi/cper: align ARM CPER type with UEFI 2.9A/2.10 specs

In reply to Greg Kroah-Hartman

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

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

From: Mauro Carvalho Chehab <[email protected]>

[ Upstream commit 96b010536ee020e716d28d9b359a4bcd18800aeb ]

Up to UEFI spec 2.9, the type byte of CPER struct for ARM processor was defined simply as:

Type at byte offset 4:

- Cache error
- TLB Error
- Bus Error
- Micro-architectural Error
All other values are reserved

Yet, there was no information about how this would be encoded.

Spec 2.9A errata corrected it by defining:

- Bit 1 - Cache Error
- Bit 2 - TLB Error
- Bit 3 - Bus Error
- Bit 4 - Micro-architectural Error
All other values are reserved

That actually aligns with the values already defined on older versions at N.2.4.1. Generic Processor Error Section.

Spec 2.10 also preserve the same encoding as 2.9A.

Adjust CPER and GHES handling code for both generic and ARM processors to properly handle UEFI 2.9A and 2.10 encoding.

---
 drivers/acpi/apei/ghes.c        | 16 +++++++----
 drivers/firmware/efi/cper-arm.c | 50 ++++++++++++++++-----------------
 include/linux/cper.h            | 10 +++----
 3 files changed, 39 insertions(+), 37 deletions(-)
drivers/acpi/apei/ghes.c +10 -6
index 7d2466b515046..56107aa002744 100644
@@ -22,6 +22,7 @@
 #include <linux/moduleparam.h>
 #include <linux/init.h>
 #include <linux/acpi.h>
+#include <linux/bitfield.h>
 #include <linux/io.h>
 #include <linux/interrupt.h>
 #include <linux/timer.h>
@@ -556,6 +557,7 @@ static bool ghes_handle_arm_hw_error(struct acpi_hest_generic_data *gdata,
 {
 	struct cper_sec_proc_arm *err = acpi_hest_get_payload(gdata);
 	int flags = sync ? MF_ACTION_REQUIRED : 0;
+	char error_type[120];
 	bool queued = false;
 	int sec_sev, i;
 	char *p;
@@ -568,9 +570,8 @@ static bool ghes_handle_arm_hw_error(struct acpi_hest_generic_data *gdata,
 	p = (char *)(err + 1);
 	for (i = 0; i < err->err_info_num; i++) {
 		struct cper_arm_err_info *err_info = (struct cper_arm_err_info *)p;
-		bool is_cache = (err_info->type == CPER_ARM_CACHE_ERROR);
+		bool is_cache = err_info->type & CPER_ARM_CACHE_ERROR;
 		bool has_pa = (err_info->validation_bits & CPER_ARM_INFO_VALID_PHYSICAL_ADDR);
-		const char *error_type = "unknown error";
 
 		/*
 		 * The field (err_info->error_info & BIT(26)) is fixed to set to
@@ -584,12 +585,15 @@ static bool ghes_handle_arm_hw_error(struct acpi_hest_generic_data *gdata,
 			continue;
 		}
 
-		if (err_info->type < ARRAY_SIZE(cper_proc_error_type_strs))
-			error_type = cper_proc_error_type_strs[err_info->type];
+		cper_bits_to_str(error_type, sizeof(error_type),
+				 FIELD_GET(CPER_ARM_ERR_TYPE_MASK, err_info->type),
+				 cper_proc_error_type_strs,
+				 ARRAY_SIZE(cper_proc_error_type_strs));
 
 		pr_warn_ratelimited(FW_WARN GHES_PFX
-				    "Unhandled processor error type: %s\n",
-				    error_type);
+				    "Unhandled processor error type 0x%02x: %s%s\n",
+				    err_info->type, error_type,
+				    (err_info->type & ~CPER_ARM_ERR_TYPE_MASK) ? " with reserved bit(s)" : "");
 		p += err_info->length;
 	}
 
drivers/firmware/efi/cper-arm.c +24 -26

97 lines not on this page · raw message

include/linux/cper.h +5 -5
index 58f40477c824e..5b1236d8c65bb 100644
@@ -297,11 +297,11 @@ enum {
 #define CPER_ARM_INFO_FLAGS_PROPAGATED		BIT(2)
 #define CPER_ARM_INFO_FLAGS_OVERFLOW		BIT(3)
 
-#define CPER_ARM_CACHE_ERROR			0
-#define CPER_ARM_TLB_ERROR			1
-#define CPER_ARM_BUS_ERROR			2
-#define CPER_ARM_VENDOR_ERROR			3
-#define CPER_ARM_MAX_TYPE			CPER_ARM_VENDOR_ERROR
+#define CPER_ARM_ERR_TYPE_MASK			GENMASK(4,1)
+#define CPER_ARM_CACHE_ERROR			BIT(1)
+#define CPER_ARM_TLB_ERROR			BIT(2)
+#define CPER_ARM_BUS_ERROR			BIT(3)
+#define CPER_ARM_VENDOR_ERROR			BIT(4)
 
 #define CPER_ARM_ERR_VALID_TRANSACTION_TYPE	BIT(0)
 #define CPER_ARM_ERR_VALID_OPERATION_TYPE	BIT(1)
Signature · 1 line
2.51.0
author maintainer
#615 lore raw

PATCH 604/614 usb: gadget: tegra-xudc: Always reinitialize data toggle when clear halt

In reply to Greg Kroah-Hartman

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

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

From: Haotien Hsu <[email protected]>

commit 2585973c7f9ee31d21e5848c996fab2521fd383d upstream.

The driver previously skipped handling ClearFeature(ENDPOINT_HALT) when the endpoint was already not halted. This prevented the controller from resetting the data sequence number and reinitializing the endpoint state.

According to USB 3.2 specification Rev. 1.1, section 9.4.5, ClearFeature(ENDPOINT_HALT) must always reset the data sequence and set the stream state machine to Disabled, regardless of whether the endpoint was halted.

Remove the early return so that ClearFeature(ENDPOINT_HALT) always resets the endpoint sequence state as required by the specification.

Fixes 49db427232fe ("usb: gadget: Add UDC driver for tegra XUSB device mode controller")
Cc stable <[email protected]>
---
 drivers/usb/gadget/udc/tegra-xudc.c |    6 ------
 1 file changed, 6 deletions(-)
drivers/usb/gadget/udc/tegra-xudc.c +0 -6
@@ -1558,12 +1558,6 @@ static int __tegra_xudc_ep_set_halt(stru
 		return -ENOTSUPP;
 	}
 
-	if (!!(xudc_readl(xudc, EP_HALT) & BIT(ep->index)) == halt) {
-		dev_dbg(xudc->dev, "EP %u already %s\n", ep->index,
-			halt ? "halted" : "not halted");
-		return 0;
-	}
-
 	if (halt) {
 		ep_halt(xudc, ep->index);
 	} else {
author maintainer
#616 lore raw

PATCH 605/614 usb: typec: ucsi: fix probe failure in gaokun_ucsi_probe()

In reply to Greg Kroah-Hartman

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

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

From: Duoming Zhou <[email protected]>

commit 6b120ef99fbcba9e413783561f8cc160719db589 upstream.

The gaokun_ucsi_probe() uses ucsi_create() to allocate a UCSI instance. The ucsi_create() validates whether ops->poll_cci is defined, and if not, it directly returns -EINVAL. However, the gaokun_ucsi_ops structure does not define the poll_cci, causing ucsi_create() always fail with -EINVAL. This issue can be observed in the kernel log with the following error:

ucsi_huawei_gaokun.ucsi huawei_gaokun_ec.ucsi.0: probe with driver ucsi_huawei_gaokun.ucsi failed with error -22

Fix the issue by adding the missing poll_cci callback to gaokun_ucsi_ops.

---
 drivers/usb/typec/ucsi/ucsi_huawei_gaokun.c |    1 +
 1 file changed, 1 insertion(+)
drivers/usb/typec/ucsi/ucsi_huawei_gaokun.c +1 -0
@@ -196,6 +196,7 @@ static void gaokun_ucsi_connector_status
 const struct ucsi_operations gaokun_ucsi_ops = {
 	.read_version = gaokun_ucsi_read_version,
 	.read_cci = gaokun_ucsi_read_cci,
+	.poll_cci = gaokun_ucsi_read_cci,
 	.read_message_in = gaokun_ucsi_read_message_in,
 	.sync_control = ucsi_sync_control_common,
 	.async_control = gaokun_ucsi_async_control,
author maintainer
#617 lore raw

PATCH 606/614 usb: phy: Initialize struct usb_phy list_head

In reply to Greg Kroah-Hartman

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

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

From: Diogo Ivo <[email protected]>

commit c69ff68b097b0f53333114f1b2c3dc128f389596 upstream.

As part of the registration of a new 'struct usb_phy' with the USB PHY core via either usb_add_phy(struct usb_phy *x, ...) or usb_add_phy_dev(struct usb_phy *x) these functions call list_add_tail(&x->head, phy_list) in order for the new instance x to be stored in phy_list, a static list kept internally by the core.

After 7d21114dc6a2 ("usb: phy: Introduce one extcon device into usb phy") when executing either of the registration functions above it is possible that usb_add_extcon() fails, leading to either function returning before the call to list_add_tail(), leaving x->head uninitialized.

Then, when a driver tries to undo the failed registration by calling usb_remove_phy(struct usb_phy *x) there will be an unconditional call to list_del(&x->head) acting on an uninitialized variable, and thus a possible NULL pointer dereference.

Fix this by initializing x->head before usb_add_extcon() has a chance to fail. Note that this was not needed before 7d21114dc6a2 since list_add_phy() was executed unconditionally and it guaranteed that x->head was initialized.

Fixes 7d21114dc6a2 ("usb: phy: Introduce one extcon device into usb phy")
Cc stable <[email protected]>
---
 drivers/usb/phy/phy.c |    4 ++++
 1 file changed, 4 insertions(+)
drivers/usb/phy/phy.c +4 -0
@@ -646,6 +646,8 @@ int usb_add_phy(struct usb_phy *x, enum
 		return -EINVAL;
 	}
 
+	INIT_LIST_HEAD(&x->head);
+
 	usb_charger_init(x);
 	ret = usb_add_extcon(x);
 	if (ret)
@@ -696,6 +698,8 @@ int usb_add_phy_dev(struct usb_phy *x)
 		return -EINVAL;
 	}
 
+	INIT_LIST_HEAD(&x->head);
+
 	usb_charger_init(x);
 	ret = usb_add_extcon(x);
 	if (ret)
author maintainer
#618 lore raw

PATCH 607/614 usb: typec: ucsi: fix use-after-free caused by uec->work

In reply to Greg Kroah-Hartman

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

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

From: Duoming Zhou <[email protected]>

commit 2b7a0f47aaf2439d517ba0a6b29c66a535302154 upstream.

The delayed work uec->work is scheduled in gaokun_ucsi_probe() but never properly canceled in gaokun_ucsi_remove(). This creates use-after-free scenarios where the ucsi and gaokun_ucsi structure are freed after ucsi_destroy() completes execution, while the gaokun_ucsi_register_worker() might be either currently executing or still pending in the work queue. The already-freed gaokun_ucsi or ucsi structure may then be accessed.

Furthermore, the race window is 3 seconds, which is sufficiently long to make this bug easily reproducible. The following is the trace captured by KASAN:

==================================================================

BUG: KASAN: slab-use-after-free in __run_timers+0x5ec/0x630
Write of size 8 at addr ffff00000ec28cc8 by task swapper/0/0
...
Call trace:
 show_stack+0x18/0x24 (C)
 dump_stack_lvl+0x78/0x90
 print_report+0x114/0x580
 kasan_report+0xa4/0xf0
 __asan_report_store8_noabort+0x20/0x2c
 __run_timers+0x5ec/0x630
 run_timer_softirq+0xe8/0x1cc
 handle_softirqs+0x294/0x720
 __do_softirq+0x14/0x20
 ____do_softirq+0x10/0x1c
 call_on_irq_stack+0x30/0x48
 do_softirq_own_stack+0x1c/0x28
 __irq_exit_rcu+0x27c/0x364
 irq_exit_rcu+0x10/0x1c
 el1_interrupt+0x40/0x60
 el1h_64_irq_handler+0x18/0x24
 el1h_64_irq+0x6c/0x70
 arch_local_irq_enable+0x4/0x8 (P)
 do_idle+0x334/0x458
 cpu_startup_entry+0x60/0x70
 rest_init+0x158/0x174
 start_kernel+0x2f8/0x394
 __primary_switched+0x8c/0x94

Allocated by task 72 on cpu 0 at 27.510341s:
 kasan_save_stack+0x2c/0x54
 kasan_save_track+0x24/0x5c
 kasan_save_alloc_info+0x40/0x54
 __kasan_kmalloc+0xa0/0xb8
 __kmalloc_node_track_caller_noprof+0x1c0/0x588
 devm_kmalloc+0x7c/0x1c8
 gaokun_ucsi_probe+0xa0/0x840  auxiliary_bus_probe+0x94/0xf8
 really_probe+0x17c/0x5b8
 __driver_probe_device+0x158/0x2c4
 driver_probe_device+0x10c/0x264
 __device_attach_driver+0x168/0x2d0
 bus_for_each_drv+0x100/0x188
 __device_attach+0x174/0x368
 device_initial_probe+0x14/0x20
 bus_probe_device+0x120/0x150
 device_add+0xb3c/0x10fc
 __auxiliary_device_add+0x88/0x130

...

Freed by task 73 on cpu 1 at 28.910627s:
 kasan_save_stack+0x2c/0x54
 kasan_save_track+0x24/0x5c
 __kasan_save_free_info+0x4c/0x74
 __kasan_slab_free+0x60/0x8c
 kfree+0xd4/0x410
 devres_release_all+0x140/0x1f0
 device_unbind_cleanup+0x20/0x190
 device_release_driver_internal+0x344/0x460
 device_release_driver+0x18/0x24
 bus_remove_device+0x198/0x274
 device_del+0x310/0xa84

...

The buggy address belongs to the object at ffff00000ec28c00
 which belongs to the cache kmalloc-512 of size 512
The buggy address is located 200 bytes inside of
 freed 512-byte region
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x4ec28
head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0x3fffe0000000040(head|node=0|zone=0|lastcpupid=0x1ffff)
page_type: f5(slab)
raw: 03fffe0000000040 ffff000008801c80 dead000000000122 0000000000000000
raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000

head: 03fffe0000000040 ffff000008801c80 dead000000000122 0000000000000000
head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
head: 03fffe0000000002 fffffdffc03b0a01 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004

page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff00000ec28b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff00000ec28c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff00000ec28c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                              ^
 ffff00000ec28d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff00000ec28d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Add disable_delayed_work_sync() in gaokun_ucsi_remove() to ensure that uec->work is properly canceled and prevented from executing after the ucsi and gaokun_ucsi structure have been deallocated.

---
 drivers/usb/typec/ucsi/ucsi_huawei_gaokun.c |    1 +
 1 file changed, 1 insertion(+)
drivers/usb/typec/ucsi/ucsi_huawei_gaokun.c +1 -0
@@ -503,6 +503,7 @@ static void gaokun_ucsi_remove(struct au
 {
 	struct gaokun_ucsi *uec = auxiliary_get_drvdata(adev);
 
+	disable_delayed_work_sync(&uec->work);
 	gaokun_ec_unregister_notify(uec->ec, &uec->nb);
 	ucsi_unregister(uec->ucsi);
 	ucsi_destroy(uec->ucsi);
author maintainer
#619 lore raw

PATCH 608/614 usb: dwc3: dwc3_power_off_all_roothub_ports: Use ioremap_np when required

In reply to Greg Kroah-Hartman

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

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

From: Sven Peter <[email protected]>

commit 5ed9cc71432a8adf3c42223c935f714aac29901b upstream.

On Apple Silicon machines we can't use ioremap() / Device-nGnRE to map most regions but must use ioremap_np() / Device-nGnRnE whenever IORESOURCE_MEM_NONPOSTED is set. Make sure this is also done inside dwc3_power_off_all_roothub_ports to prevent SErrors.

Fixes 2d2a3349521d ("usb: dwc3: Add workaround for host mode VBUS glitch when boot")
---
 drivers/usb/dwc3/host.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/usb/dwc3/host.c +4 -1
@@ -37,7 +37,10 @@ static void dwc3_power_off_all_roothub_p
 
 	/* xhci regs are not mapped yet, do it temporarily here */
 	if (dwc->xhci_resources[0].start) {
-		xhci_regs = ioremap(dwc->xhci_resources[0].start, DWC3_XHCI_REGS_END);
+		if (dwc->xhci_resources[0].flags & IORESOURCE_MEM_NONPOSTED)
+			xhci_regs = ioremap_np(dwc->xhci_resources[0].start, DWC3_XHCI_REGS_END);
+		else
+			xhci_regs = ioremap(dwc->xhci_resources[0].start, DWC3_XHCI_REGS_END);
 		if (!xhci_regs) {
 			dev_err(dwc->dev, "Failed to ioremap xhci_regs\n");
 			return;
author maintainer
#620 lore raw

PATCH 609/614 ALSA: dice: fix buffer overflow in detect_stream_formats()

In reply to Greg Kroah-Hartman

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

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

From: Junrui Luo <[email protected]>

commit 324f3e03e8a85931ce0880654e3c3eb38b0f0bba upstream.

The function detect_stream_formats() reads the stream_count value directly from a FireWire device without validating it. This can lead to out-of-bounds writes when a malicious device provides a stream_count value greater than MAX_STREAMS.

Fix by applying the same validation to both TX and RX stream counts in detect_stream_formats().

---
 sound/firewire/dice/dice-extension.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/firewire/dice/dice-extension.c +2 -2
@@ -116,7 +116,7 @@ static int detect_stream_formats(struct
 			break;
 
 		base_offset += EXT_APP_STREAM_ENTRIES;
-		stream_count = be32_to_cpu(reg[0]);
+		stream_count = min_t(unsigned int, be32_to_cpu(reg[0]), MAX_STREAMS);
 		err = read_stream_entries(dice, section_addr, base_offset,
 					  stream_count, mode,
 					  dice->tx_pcm_chs,
@@ -125,7 +125,7 @@ static int detect_stream_formats(struct
 			break;
 
 		base_offset += stream_count * EXT_APP_STREAM_ENTRY_SIZE;
-		stream_count = be32_to_cpu(reg[1]);
+		stream_count = min_t(unsigned int, be32_to_cpu(reg[1]), MAX_STREAMS);
 		err = read_stream_entries(dice, section_addr, base_offset,
 					  stream_count,
 					  mode, dice->rx_pcm_chs,
author maintainer
#621 lore raw

PATCH 610/614 ALSA: hda/realtek: Add match for ASUS Xbox Ally projects

In reply to Greg Kroah-Hartman

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

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

From: Antheas Kapenekakis <[email protected]>

commit 18a4895370a79a3efb4a53ccd1efffef6c5b634e upstream.

Bind the realtek codec to TAS2781 I2C audio amps on ASUS Xbox Ally projects. While these projects work without a quirk, adding it increases the output volume significantly.

---
 sound/hda/codecs/realtek/alc269.c |    2 ++
 1 file changed, 2 insertions(+)
sound/hda/codecs/realtek/alc269.c +2 -0
@@ -6736,6 +6736,8 @@ static const struct hda_quirk alc269_fix
 	SND_PCI_QUIRK(0x1043, 0x12f0, "ASUS X541UV", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
 	SND_PCI_QUIRK(0x1043, 0x1313, "Asus K42JZ", ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE),
 	SND_PCI_QUIRK(0x1043, 0x1314, "ASUS GA605K", ALC285_FIXUP_ASUS_GA605K_HEADSET_MIC),
+	SND_PCI_QUIRK(0x1043, 0x1384, "ASUS RC73XA", ALC287_FIXUP_TXNW2781_I2C),
+	SND_PCI_QUIRK(0x1043, 0x1394, "ASUS RC73YA", ALC287_FIXUP_TXNW2781_I2C),
 	SND_PCI_QUIRK(0x1043, 0x13b0, "ASUS Z550SA", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
 	SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK),
 	SND_PCI_QUIRK(0x1043, 0x1433, "ASUS GX650PY/PZ/PV/PU/PYV/PZV/PIV/PVV", ALC285_FIXUP_ASUS_I2C_HEADSET_MIC),
author maintainer
#622 lore raw

PATCH 611/614 ALSA: hda/tas2781: fix speaker id retrieval for multiple probes

In reply to Greg Kroah-Hartman

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

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

From: Antheas Kapenekakis <[email protected]>

commit 945865a0ddf3e3950aea32e23e10d815ee9b21bc upstream.

Currently, on ASUS projects, the TAS2781 codec attaches the speaker GPIO to the first tasdevice_priv instance using devm. This causes tas2781_read_acpi to fail on subsequent probes since the GPIO is already managed by the first device. This causes a failure on Xbox Ally X, because it has two amplifiers, and prevents us from quirking both the Xbox Ally and Xbox Ally X in the realtek codec driver.

It is unnecessary to attach the GPIO to a device as it is static. Therefore, instead of attaching it and then reading it when loading the firmware, read its value directly in tas2781_read_acpi and store it in the private data structure. Then, make reading the value non-fatal so that ASUS projects that miss a speaker pin can still work, perhaps using fallback firmware.

Fixes 4e7035a75da9 ("ALSA: hda/tas2781: Add speaker id check for ASUS projects")
---
 include/sound/tas2781.h                        |    2 -
 sound/hda/codecs/side-codecs/tas2781_hda_i2c.c |   44 ++++++++++++++-----------
 2 files changed, 26 insertions(+), 20 deletions(-)
include/sound/tas2781.h +1 -1
@@ -197,7 +197,6 @@ struct tasdevice_priv {
 	struct acoustic_data acou_data;
 #endif
 	struct tasdevice_fw *fmw;
-	struct gpio_desc *speaker_id;
 	struct gpio_desc *reset;
 	struct mutex codec_lock;
 	struct regmap *regmap;
@@ -215,6 +214,7 @@ struct tasdevice_priv {
 	unsigned int magic_num;
 	unsigned int chip_id;
 	unsigned int sysclk;
+	int speaker_id;
 
 	int irq;
 	int cur_prog;
sound/hda/codecs/side-codecs/tas2781_hda_i2c.c +25 -19

73 lines not on this page · raw message

author maintainer
#623 lore raw

PATCH 612/614 ALSA: hda: cs35l41: Fix NULL pointer dereference in cs35l41_hda_read_acpi()

In reply to Greg Kroah-Hartman

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

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

From: Denis Arefev <[email protected]>

commit c34b04cc6178f33c08331568c7fd25c5b9a39f66 upstream.

The acpi_get_first_physical_node() function can return NULL, in which case the get_device() function also returns NULL, but this value is then dereferenced without checking,so add a check to prevent a crash.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes 7b2f3eb492da ("ALSA: hda: cs35l41: Add support for CS35L41 in HDA systems")
---
 sound/hda/codecs/side-codecs/cs35l41_hda.c |    2 ++
 1 file changed, 2 insertions(+)
sound/hda/codecs/side-codecs/cs35l41_hda.c +2 -0
@@ -1901,6 +1901,8 @@ static int cs35l41_hda_read_acpi(struct
 
 	cs35l41->dacpi = adev;
 	physdev = get_device(acpi_get_first_physical_node(adev));
+	if (!physdev)
+		return -ENODEV;
 
 	sub = acpi_get_subsystem_id(ACPI_HANDLE(physdev));
 	if (IS_ERR(sub))
author maintainer
#624 lore raw

PATCH 613/614 ALSA: wavefront: Clear substream pointers on close

In reply to Greg Kroah-Hartman

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

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

From: Junrui Luo <[email protected]>

commit e11c5c13ce0ab2325d38fe63500be1dd88b81e38 upstream.

Clear substream pointers in close functions to avoid leaving dangling pointers, helping to improve code safety and
prevents potential issues.

---
 sound/isa/wavefront/wavefront_midi.c |    2 ++
 1 file changed, 2 insertions(+)
sound/isa/wavefront/wavefront_midi.c +2 -0
@@ -278,6 +278,7 @@ static int snd_wavefront_midi_input_clos
 	        return -EIO;
 
 	guard(spinlock_irqsave)(&midi->open);
+	midi->substream_input[mpu] = NULL;
 	midi->mode[mpu] &= ~MPU401_MODE_INPUT;
 
 	return 0;
@@ -300,6 +301,7 @@ static int snd_wavefront_midi_output_clo
 	        return -EIO;
 
 	guard(spinlock_irqsave)(&midi->open);
+	midi->substream_output[mpu] = NULL;
 	midi->mode[mpu] &= ~MPU401_MODE_OUTPUT;
 	return 0;
 }
author maintainer
#625 lore raw

PATCH 614/614 ALSA: wavefront: Fix integer overflow in sample size validation

In reply to Greg Kroah-Hartman

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

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

From: Junrui Luo <[email protected]>

commit 0c4a13ba88594fd4a27292853e736c6b4349823d upstream.

The wavefront_send_sample() function has an integer overflow issue when validating sample size. The header->size field is u32 but gets cast to int for comparison with dev->freemem

Fix by using unsigned comparison to avoid integer overflow.

---
 sound/isa/wavefront/wavefront_synth.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/isa/wavefront/wavefront_synth.c +2 -2
@@ -950,9 +950,9 @@ wavefront_send_sample (snd_wavefront_t *
 	if (header->size) {
 		dev->freemem = wavefront_freemem (dev);
 
-		if (dev->freemem < (int)header->size) {
+		if (dev->freemem < 0 || dev->freemem < header->size) {
 			dev_err(dev->card->dev,
-				"insufficient memory to load %d byte sample.\n",
+				"insufficient memory to load %u byte sample.\n",
 				header->size);
 			return -ENOMEM;
 		}
Tested-by on the v1 series
#626 lore raw
In reply to Greg Kroah-Hartman

Hi

no regressions here on x86_64 (RKL, Intel 11th Gen. CPU), but *only* when running GPU driver i915.

with GPU driver xe I get here:

[   14.391631] rfkill: input handler disabled
[   14.787149] ------------[ cut here ]------------
[   14.787153] refcount_t: underflow; use-after-free.
[   14.787167] WARNING: CPU: 10 PID: 2463 at lib/refcount.c:28 refcount_warn_saturate+0xbe/0x110
[   14.787174] Modules linked in: vboxnetadp(OE) vboxnetflt(OE) vboxdrv(OE) rfcomm nf_conntrack_netbios_ns nf_conntrack_broadcast nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nf_tables bnep iwlmvm mac80211 mei_hdcp mei_pxp btusb kvm_intel btintel iwlwifi bluetooth kvm cfg80211 ecdh_generic irqbypass mei_me wmi_bmof mei nfnetlink xe intel_vsec drm_suballoc_helper gpu_sched drm_gpuvm drm_exec i915 i2c_algo_bit drm_buddy drm_display_helper video wmi
[   14.787203] CPU: 10 UID: 60578 PID: 2463 Comm: pool-8 Tainted: G U     OE       6.18.2-rc1_MY #1 PREEMPT(lazy)
[   14.787205] Tainted: [U]=USER, [O]=OOT_MODULE, [E]=UNSIGNED_MODULE
[   14.787206] Hardware name: ASUS System Product Name/ROG STRIX B560-G GAMING WIFI, BIOS 2302 11/13/2024
[   14.787207] RIP: 0010:refcount_warn_saturate+0xbe/0x110
[   14.787210] Code: 02 01 e8 05 de 52 ff 0f 0b e9 7e ba a1 00 80 3d 8d 16 41 02 00 75 85 48 c7 c7 00 d5 f5 9e c6 05 7d 16 41 02 01 e8 e2 dd 52 ff <0f> 0b e9 5b ba a1 00 80 3d 6b 16 41 02 00 0f 85 5e ff ff ff 48 c7
[   14.787211] RSP: 0018:ffffa0ba88dbf918 EFLAGS: 00010246
[   14.787213] RAX: 0000000000000000 RBX: ffff900804a13800 RCX: 0000000000000027
[   14.787214] RDX: ffff900b4f917a88 RSI: 0000000000000001 RDI: ffff900b4f917a80
[   14.787215] RBP: ffff90082578c000 R08: 0000000000000000 R09: ffffa0ba88dbf7b0
[   14.787215] R10: ffffffff9fb451e8 R11: ffffffff9fa951e0 R12: 0000000000000000
[   14.787216] R13: ffffa0ba88dbf970 R14: ffff9008213f0218 R15: 0000000000000000
[   14.787217] FS:  0000000000000000(0000) GS:ffff900baedd9000(0000) knlGS:0000000000000000
[   14.787218] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   14.787219] CR2: 00007fc6a725fed0 CR3: 000000011f3c5001 CR4: 0000000000770ef0
[   14.787220] PKRU: 55555554
[   14.787220] Call Trace:
[   14.787222]  <TASK>
[   14.787224]  xe_exec_queue_destroy+0x165/0x1a0 [xe]
[   14.787326]  xe_vm_close_and_put+0x1e3/0x950 [xe]
[   14.787414]  xe_file_close+0x108/0x1e0 [xe]
[   14.787463]  drm_file_free+0x238/0x2a0
[   14.787466]  drm_release_noglobal+0x78/0xc0
[   14.787468]  __fput+0xe6/0x2a0
[   14.787471]  task_work_run+0x5d/0x90
[   14.787473]  do_exit+0x273/0xa60
[   14.787476]  ? timerqueue_del+0x2e/0x60
[   14.787478]  ? __remove_hrtimer+0x41/0xb0
[   14.787480]  do_group_exit+0x2e/0xb0
[   14.787482]  ? hrtimer_cancel+0x21/0x40
[   14.787484]  get_signal+0x8b0/0x8f0
[   14.787485]  arch_do_signal_or_restart+0x8d/0x2a0
[   14.787489]  exit_to_user_mode_loop+0x80/0x170
[   14.787492]  do_syscall_64+0x1c5/0xfa0
[   14.787494]  ? __pfx_hrtimer_wakeup+0x10/0x10
[   14.787496]  ? __rseq_handle_notify_resume+0xa4/0x4d0
[   14.787499]  ? switch_fpu_return+0x4e/0xd0
[   14.787501]  ? do_syscall_64+0x1f8/0xfa0
[   14.787503]  ? __rseq_handle_notify_resume+0xa4/0x4d0
[   14.787504]  ? f_dupfd+0x62/0xa0
[   14.787506]  ? switch_fpu_return+0x4e/0xd0
[   14.787507]  ? do_syscall_64+0x1f8/0xfa0
[   14.787509]  ? __x64_sys_fcntl+0x96/0x110
[   14.787512]  ? do_syscall_64+0x7c/0xfa0
[   14.787514]  ? flush_tlb_func+0x119/0x380
[   14.787516]  ? sched_clock+0x10/0x30
[   14.787518]  ? sched_clock_cpu+0xf/0x230
[   14.787520]  ? __flush_smp_call_function_queue+0xae/0x410
[   14.787522]  ? sched_clock_cpu+0xf/0x230
[   14.787523]  ? irqtime_account_irq+0x3c/0xc0
[   14.787525]  ? clear_bhb_loop+0x40/0x90
[   14.787527]  ? clear_bhb_loop+0x40/0x90
[   14.787528]  ? clear_bhb_loop+0x40/0x90
[   14.787529]  ? clear_bhb_loop+0x40/0x90
[   14.787530]  entry_SYSCALL_64_after_hwframe+0x71/0x79
[   14.787532] RIP: 0033:0x7fa07a4ff34d
[   14.787540] Code: Unable to access opcode bytes at 0x7fa07a4ff323.
[   14.787541] RSP: 002b:00007f9f8bffe478 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
[   14.787543] RAX: fffffffffffffdfc RBX: 0000000000000001 RCX: 00007fa07a4ff34d
[   14.787544] RDX: 0000000000000002 RSI: 0000000000000080 RDI: 000055c50d821a20
[   14.787544] RBP: 00007f9f8bffe4e0 R08: 00007fa07b3c7000 R09: 000000000000000e
[   14.787545] R10: 00007f9f8bffe4a0 R11: 0000000000000246 R12: 00000000018ae951
[   14.787546] R13: 0000000000000001 R14: 0000000000000002 R15: 000055c50d821a10
[   14.787548]  </TASK>
[   14.787548] ---[ end trace 0000000000000000 ]---

====

If I did the bisect correct, bisect-log:

# status: waiting for both good and bad commits
# good: [25442251cbda7590d87d8203a8dc1ddf2c93de61] Linux 6.18.1
git bisect good 25442251cbda7590d87d8203a8dc1ddf2c93de61
# status: waiting for bad commit, 1 good commit known
# bad: [103c79e44ce7c81882928abab98b96517a8bce88] Linux 6.18.2-rc1
git bisect bad 103c79e44ce7c81882928abab98b96517a8bce88
# bad: [d32e7ccac8c6afc6a3a46fa4e7cdf0568ee919bd] drm/msm: Fix NULL pointer dereference in crashstate_get_vm_logs() git bisect bad d32e7ccac8c6afc6a3a46fa4e7cdf0568ee919bd

Thanks

author maintainer
#627 lore raw
Quoted 107 lines · Ronald Warsow

Hi

no regressions here on x86_64 (RKL, Intel 11th Gen. CPU), but *only* when running GPU driver i915.

with GPU driver xe I get here:

[   14.391631] rfkill: input handler disabled
[   14.787149] ------------[ cut here ]------------
[   14.787153] refcount_t: underflow; use-after-free.
[   14.787167] WARNING: CPU: 10 PID: 2463 at lib/refcount.c:28
refcount_warn_saturate+0xbe/0x110
[   14.787174] Modules linked in: vboxnetadp(OE) vboxnetflt(OE) vboxdrv(OE)

rfcomm nf_conntrack_netbios_ns nf_conntrack_broadcast nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nf_tables bnep iwlmvm mac80211 mei_hdcp mei_pxp btusb kvm_intel btintel iwlwifi bluetooth kvm cfg80211 ecdh_generic irqbypass mei_me wmi_bmof mei nfnetlink xe intel_vsec drm_suballoc_helper gpu_sched drm_gpuvm drm_exec i915 i2c_algo_bit drm_buddy drm_display_helper video wmi

[   14.787203] CPU: 10 UID: 60578 PID: 2463 Comm: pool-8 Tainted: G U     OE
6.18.2-rc1_MY #1 PREEMPT(lazy)
[   14.787205] Tainted: [U]=USER, [O]=OOT_MODULE, [E]=UNSIGNED_MODULE
[   14.787206] Hardware name: ASUS System Product Name/ROG STRIX B560-G
GAMING WIFI, BIOS 2302 11/13/2024
[   14.787207] RIP: 0010:refcount_warn_saturate+0xbe/0x110
[   14.787210] Code: 02 01 e8 05 de 52 ff 0f 0b e9 7e ba a1 00 80 3d 8d 16
41 02 00 75 85 48 c7 c7 00 d5 f5 9e c6 05 7d 16 41 02 01 e8 e2 dd 52 ff <0f>
0b e9 5b ba a1 00 80 3d 6b 16 41 02 00 0f 85 5e ff ff ff 48 c7
[   14.787211] RSP: 0018:ffffa0ba88dbf918 EFLAGS: 00010246
[   14.787213] RAX: 0000000000000000 RBX: ffff900804a13800 RCX:
0000000000000027
[   14.787214] RDX: ffff900b4f917a88 RSI: 0000000000000001 RDI:
ffff900b4f917a80
[   14.787215] RBP: ffff90082578c000 R08: 0000000000000000 R09:
ffffa0ba88dbf7b0
[   14.787215] R10: ffffffff9fb451e8 R11: ffffffff9fa951e0 R12:
0000000000000000
[   14.787216] R13: ffffa0ba88dbf970 R14: ffff9008213f0218 R15:
0000000000000000
[   14.787217] FS:  0000000000000000(0000) GS:ffff900baedd9000(0000)
knlGS:0000000000000000
[   14.787218] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   14.787219] CR2: 00007fc6a725fed0 CR3: 000000011f3c5001 CR4:
0000000000770ef0
[   14.787220] PKRU: 55555554
[   14.787220] Call Trace:
[   14.787222]  <TASK>
[   14.787224]  xe_exec_queue_destroy+0x165/0x1a0 [xe]
[   14.787326]  xe_vm_close_and_put+0x1e3/0x950 [xe]
[   14.787414]  xe_file_close+0x108/0x1e0 [xe]
[   14.787463]  drm_file_free+0x238/0x2a0
[   14.787466]  drm_release_noglobal+0x78/0xc0
[   14.787468]  __fput+0xe6/0x2a0
[   14.787471]  task_work_run+0x5d/0x90
[   14.787473]  do_exit+0x273/0xa60
[   14.787476]  ? timerqueue_del+0x2e/0x60
[   14.787478]  ? __remove_hrtimer+0x41/0xb0
[   14.787480]  do_group_exit+0x2e/0xb0
[   14.787482]  ? hrtimer_cancel+0x21/0x40
[   14.787484]  get_signal+0x8b0/0x8f0
[   14.787485]  arch_do_signal_or_restart+0x8d/0x2a0
[   14.787489]  exit_to_user_mode_loop+0x80/0x170
[   14.787492]  do_syscall_64+0x1c5/0xfa0
[   14.787494]  ? __pfx_hrtimer_wakeup+0x10/0x10
[   14.787496]  ? __rseq_handle_notify_resume+0xa4/0x4d0
[   14.787499]  ? switch_fpu_return+0x4e/0xd0
[   14.787501]  ? do_syscall_64+0x1f8/0xfa0
[   14.787503]  ? __rseq_handle_notify_resume+0xa4/0x4d0
[   14.787504]  ? f_dupfd+0x62/0xa0
[   14.787506]  ? switch_fpu_return+0x4e/0xd0
[   14.787507]  ? do_syscall_64+0x1f8/0xfa0
[   14.787509]  ? __x64_sys_fcntl+0x96/0x110
[   14.787512]  ? do_syscall_64+0x7c/0xfa0
[   14.787514]  ? flush_tlb_func+0x119/0x380
[   14.787516]  ? sched_clock+0x10/0x30
[   14.787518]  ? sched_clock_cpu+0xf/0x230
[   14.787520]  ? __flush_smp_call_function_queue+0xae/0x410
[   14.787522]  ? sched_clock_cpu+0xf/0x230
[   14.787523]  ? irqtime_account_irq+0x3c/0xc0
[   14.787525]  ? clear_bhb_loop+0x40/0x90
[   14.787527]  ? clear_bhb_loop+0x40/0x90
[   14.787528]  ? clear_bhb_loop+0x40/0x90
[   14.787529]  ? clear_bhb_loop+0x40/0x90
[   14.787530]  entry_SYSCALL_64_after_hwframe+0x71/0x79
[   14.787532] RIP: 0033:0x7fa07a4ff34d
[   14.787540] Code: Unable to access opcode bytes at 0x7fa07a4ff323.
[   14.787541] RSP: 002b:00007f9f8bffe478 EFLAGS: 00000246 ORIG_RAX:
00000000000000ca
[   14.787543] RAX: fffffffffffffdfc RBX: 0000000000000001 RCX:
00007fa07a4ff34d
[   14.787544] RDX: 0000000000000002 RSI: 0000000000000080 RDI:
000055c50d821a20
[   14.787544] RBP: 00007f9f8bffe4e0 R08: 00007fa07b3c7000 R09:
000000000000000e
[   14.787545] R10: 00007f9f8bffe4a0 R11: 0000000000000246 R12:
00000000018ae951
[   14.787546] R13: 0000000000000001 R14: 0000000000000002 R15:
000055c50d821a10
[   14.787548]  </TASK>
[   14.787548] ---[ end trace 0000000000000000 ]---

====

If I did the bisect correct, bisect-log:

Quoted 9 lines

# status: waiting for both good and bad commits
# good: [25442251cbda7590d87d8203a8dc1ddf2c93de61] Linux 6.18.1 git bisect good 25442251cbda7590d87d8203a8dc1ddf2c93de61
# status: waiting for bad commit, 1 good commit known
# bad: [103c79e44ce7c81882928abab98b96517a8bce88] Linux 6.18.2-rc1 git bisect bad 103c79e44ce7c81882928abab98b96517a8bce88
# bad: [d32e7ccac8c6afc6a3a46fa4e7cdf0568ee919bd] drm/msm: Fix NULL pointer dereference in crashstate_get_vm_logs()
git bisect bad d32e7ccac8c6afc6a3a46fa4e7cdf0568ee919bd

Is this also an issue with 6.19-rc1? Are we missing something here?

thanks,

greg k-h

#628 lore raw
Quoted 12 lines · Greg Kroah-Hartman
Quoted 11 lines · Ronald Warsow

Hi

no regressions here on x86_64 (RKL, Intel 11th Gen. CPU), but *only* when running GPU driver i915.

with GPU driver xe I get here:

[   14.391631] rfkill: input handler disabled
[   14.787149] ------------[ cut here ]------------
[   14.787153] refcount_t: underflow; use-after-free.
[   14.787167] WARNING: CPU: 10 PID: 2463 at lib/refcount.c:28

....

Quoted 14 lines
Quoted 4 lines

====

If I did the bisect correct, bisect-log:

Quoted 9 lines

# status: waiting for both good and bad commits
# good: [25442251cbda7590d87d8203a8dc1ddf2c93de61] Linux 6.18.1 git bisect good 25442251cbda7590d87d8203a8dc1ddf2c93de61
# status: waiting for bad commit, 1 good commit known
# bad: [103c79e44ce7c81882928abab98b96517a8bce88] Linux 6.18.2-rc1 git bisect bad 103c79e44ce7c81882928abab98b96517a8bce88
# bad: [d32e7ccac8c6afc6a3a46fa4e7cdf0568ee919bd] drm/msm: Fix NULL pointer dereference in crashstate_get_vm_logs()
git bisect bad d32e7ccac8c6afc6a3a46fa4e7cdf0568ee919bd

Quoted 2 lines

Is this also an issue with 6.19-rc1? Are we missing something here?

6.19-rc1 is okay here

Quoted 4 lines

thanks,

greg k-h

author maintainer
#629 lore raw
Quoted 30 lines · Ronald Warsow
Quoted 12 lines · Greg Kroah-Hartman
Quoted 11 lines · Ronald Warsow

Hi

no regressions here on x86_64 (RKL, Intel 11th Gen. CPU), but *only* when running GPU driver i915.

with GPU driver xe I get here:

[   14.391631] rfkill: input handler disabled
[   14.787149] ------------[ cut here ]------------
[   14.787153] refcount_t: underflow; use-after-free.
[   14.787167] WARNING: CPU: 10 PID: 2463 at lib/refcount.c:28

....

Quoted 14 lines
Quoted 13 lines

====

If I did the bisect correct, bisect-log:

# status: waiting for both good and bad commits
# good: [25442251cbda7590d87d8203a8dc1ddf2c93de61] Linux 6.18.1 git bisect good 25442251cbda7590d87d8203a8dc1ddf2c93de61
# status: waiting for bad commit, 1 good commit known
# bad: [103c79e44ce7c81882928abab98b96517a8bce88] Linux 6.18.2-rc1 git bisect bad 103c79e44ce7c81882928abab98b96517a8bce88
# bad: [d32e7ccac8c6afc6a3a46fa4e7cdf0568ee919bd] drm/msm: Fix NULL pointer dereference in crashstate_get_vm_logs()
git bisect bad d32e7ccac8c6afc6a3a46fa4e7cdf0568ee919bd

Quoted 3 lines
Quoted 2 lines

Is this also an issue with 6.19-rc1? Are we missing something here?

6.19-rc1 is okay here

Odd, as you aren't even running the driver that this commit points to, right? You shouldn't be building it, so why does this show up as the "bad" commit id?

totally confused,

greg k-h

#630 lore raw
Quoted 4 lines · Greg Kroah-Hartman
Quoted 3 lines · Ronald Warsow
Quoted 2 lines · Greg Kroah-Hartman
Quoted 1 line · Ronald Warsow

Hi

...

Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 11 lines

If I did the bisect correct, bisect-log:

# status: waiting for both good and bad commits
# good: [25442251cbda7590d87d8203a8dc1ddf2c93de61] Linux 6.18.1 git bisect good 25442251cbda7590d87d8203a8dc1ddf2c93de61
# status: waiting for bad commit, 1 good commit known
# bad: [103c79e44ce7c81882928abab98b96517a8bce88] Linux 6.18.2-rc1 git bisect bad 103c79e44ce7c81882928abab98b96517a8bce88
# bad: [d32e7ccac8c6afc6a3a46fa4e7cdf0568ee919bd] drm/msm: Fix NULL pointer dereference in crashstate_get_vm_logs()
git bisect bad d32e7ccac8c6afc6a3a46fa4e7cdf0568ee919bd

Quoted 8 lines
Quoted 3 lines
Quoted 2 lines

Is this also an issue with 6.19-rc1? Are we missing something here?

6.19-rc1 is okay here

Odd, as you aren't even running the driver that this commit points to, right? You shouldn't be building it, so why does this show up as the "bad" commit id?

maybe I did something wrong with bisect ?
- I'm no developer and not very experienced with it -

side note: tomorrow I'm in vacation

Quoted 3 lines

totally confused,

greg k-h

Reviewed-by Thomas Hellström
#631 lore raw
In reply to Greg Kroah-Hartman
Quoted 4 lines · Greg Kroah-Hartman
Quoted 3 lines · Ronald Warsow
Quoted 2 lines · Greg Kroah-Hartman
Quoted 1 line · Ronald Warsow

Hi

...

Quoted 7 lines

Odd, as you aren't even running the driver that this commit points to, right? You shouldn't be building it, so why does this show up as the "bad" commit id?

totally confused,

well I realized I left out several steps to do bisect correct.

I hope this time it's correct:

d84236562448e634208746f0e04f725a509d4648 is the first bad commit commit d84236562448e634208746f0e04f725a509d4648

Author: Matthew Brost <[email protected]>
Date:   Fri Oct 31 16:40:45 2025 -0700

drm/xe: Enforce correct user fence signaling order using

[ Upstream commit adda4e855ab6409a3edaa585293f1f2069ab7299 ]

Prevent application hangs caused by out-of-order fence signaling when user fences are attached. Use drm_syncobj (via dma-fence-chain) to guarantee that each user fence signals in order, regardless of the signaling order of the attached fences. Ensure user fence writebacks to user space occur in the correct sequence.

v7:
- Skip drm_syncbj create of error (CI)

Fixes dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel

GPUs")

Link:
https://patch.msgid.link/[email protected]

 drivers/gpu/drm/xe/xe_exec_queue.c | 3 +++
 1 file changed, 3 insertions(+)
Quoted 1 line

greg k-h

author maintainer
#632 lore raw
Quoted 38 lines · Ronald Warsow
Quoted 4 lines · Greg Kroah-Hartman
Quoted 3 lines · Ronald Warsow
Quoted 2 lines · Greg Kroah-Hartman
Quoted 1 line · Ronald Warsow

Hi

...

Quoted 7 lines

Odd, as you aren't even running the driver that this commit points to, right? You shouldn't be building it, so why does this show up as the "bad" commit id?

totally confused,

well I realized I left out several steps to do bisect correct.

I hope this time it's correct:

d84236562448e634208746f0e04f725a509d4648 is the first bad commit commit d84236562448e634208746f0e04f725a509d4648

Author: Matthew Brost <[email protected]>
Date:   Fri Oct 31 16:40:45 2025 -0700

drm/xe: Enforce correct user fence signaling order using

[ Upstream commit adda4e855ab6409a3edaa585293f1f2069ab7299 ]

Prevent application hangs caused by out-of-order fence signaling when user fences are attached. Use drm_syncobj (via dma-fence-chain) to guarantee that each user fence signals in order, regardless of the signaling order of the attached fences. Ensure user fence writebacks to user space occur in the correct sequence.

v7:
- Skip drm_syncbj create of error (CI)

Fixes dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel

GPUs")

Quoted 9 lines

Link:
https://patch.msgid.link/[email protected]

 drivers/gpu/drm/xe/xe_exec_queue.c | 3 +++
 1 file changed, 3 insertions(+)

Thanks, will go drop this one now.

greg k-h

Tested-by on the v1 series
#634 lore raw
In reply to Greg Kroah-Hartman
Quoted 9 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 6.18.2 release. There are 614 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Thu, 18 Dec 2025 11:12:22 +0000. Anything received after that time might be too late.

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

Quoted 8 lines
	https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.18.2-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-6.18.y
and the diffstat can be found below.

thanks,

greg k-h

Thanks! Tested on all Alpine architectures & boot tested on x86_64.

Tested-by on the v1 series
#635 lore raw
In reply to Greg Kroah-Hartman
Quoted 10 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 6.18.2 release. There are 614 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Thu, 18 Dec 2025 11:12:22 +0000. Anything received after that time might be too late.

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

Quoted 8 lines
        https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.18.2-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-6.18.y
and the diffstat can be found below.

thanks,

greg k-h

The Linux kernel version 6.18.2 was built and boot-tested using qemu-x86_64 and qemu-arm64 with the default configuration (defconfig).

Both build and boot processes completed successfully on arm64 and x86_64. The kernel operated as expected in the virtualized environments, and no issues were observed. No dmesg regressions were found.

Build details:
Architectures: arm64, x86_64
Kernel version: 6.18.2
Configuration: defconfig
Source: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
Commit: 103c79e44ce7c81882928abab98b96517a8bce88

Best regards,
Dileep Malepu

#636 lore raw

cover 6.18.2-rc1 review

In reply to Greg Kroah-Hartman

I'm seeing the following allmodconfig and allyesconfig build failures on arm, arm64, riscv and x86_64.

## Build error
sound/soc/codecs/nau8325.c:430:13: error: variable 'n2_max' is uninitialized when used here [-Werror,-Wuninitialized]
430 | *n2_sel = n2_max;
| ^~~~~~
sound/soc/codecs/nau8325.c:389:52: note: initialize the variable 'n2_max' to silence this warning

  389 |         int i, j, mclk, mclk_max, ratio, ratio_sel, n2_max;
      |                                                           ^
      |                                                            = 0
sound/soc/codecs/nau8325.c:431:11: error: variable 'ratio_sel' is uninitialized when used here [-Werror,-Wuninitialized]
  431 |                 ratio = ratio_sel;
      |                         ^~~~~~~~~
sound/soc/codecs/nau8325.c:389:44: note: initialize the variable 'ratio_sel' to silence this warning
  389 |         int i, j, mclk, mclk_max, ratio, ratio_sel, n2_max;
      |                                                   ^
      |                                                    = 0

2 errors generated.
make[6]: *** [scripts/Makefile.build:287: sound/soc/codecs/nau8325.o] Error 1

First seen on 6.18.2-rc1

Good: 6.18.1-rc1
Bad:  6.18.2-rc1

And these build regressions also seen on 6.17.13-rc2.

## Build
* kernel: 6.18.2-rc1
* git: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
* git commit: 103c79e44ce7c81882928abab98b96517a8bce88
* git describe: v6.18-645-g103c79e44ce7
* test details: https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.18.y/build/v6.18-645-g103c79e44ce7

## Test Regressions (compared to v6.18-30-g7d4c06f4000f)
* Build,
- clang-21-allmodconfig
- clang-21-allyesconfig
- clang-nightly-allyesconfig

## Metric Regressions (compared to v6.18-30-g7d4c06f4000f)

## Test Fixes (compared to v6.18-30-g7d4c06f4000f)

## Metric Fixes (compared to v6.18-30-g7d4c06f4000f)

## Test result summary
total: 101371, pass: 83553, fail: 3486, skip: 14332, xfail: 0

## Build Summary
* arc: 5 total, 5 passed, 0 failed
* arm: 139 total, 138 passed, 1 failed
* arm64: 57 total, 51 passed, 6 failed
* i386: 18 total, 18 passed, 0 failed
* mips: 34 total, 33 passed, 1 failed
* parisc: 4 total, 4 passed, 0 failed
* powerpc: 40 total, 39 passed, 1 failed
* riscv: 25 total, 24 passed, 1 failed
* s390: 22 total, 21 passed, 1 failed
* sh: 5 total, 5 passed, 0 failed
* sparc: 4 total, 3 passed, 1 failed
* x86_64: 49 total, 46 passed, 3 failed

## Test suites summary
* boot
* commands
* kselftest-arm64
* kselftest-breakpoints
* kselftest-capabilities
* kselftest-cgroup
* kselftest-clone3
* kselftest-core
* kselftest-cpu-hotplug
* kselftest-cpufreq
* kselftest-efivarfs
* kselftest-exec
* kselftest-fpu
* kselftest-ftrace
* kselftest-futex
* kselftest-gpio
* kselftest-intel_pstate
* kselftest-ipc
* kselftest-kcmp
* kselftest-kvm
* kselftest-membarrier
* kselftest-memfd
* kselftest-mincore
* kselftest-mm
* kselftest-mqueue
* kselftest-net
* kselftest-net-mptcp
* kselftest-openat2
* kselftest-ptrace
* kselftest-rseq
* kselftest-rtc
* kselftest-rust
* kselftest-seccomp
* kselftest-sigaltstack
* kselftest-size
* kselftest-tc-testing
* kselftest-timers
* kselftest-tmpfs
* kselftest-tpm2
* kselftest-user_events
* kselftest-vDSO
* kselftest-x86
* kunit
* kvm-unit-tests
* lava
* libgpiod
* libhugetlbfs
* log-parser-boot
* log-parser-build-clang
* log-parser-build-gcc
* log-parser-test
* ltp-capability
* ltp-commands
* ltp-containers
* ltp-controllers
* ltp-cpuhotplug
* ltp-crypto
* ltp-cve
* ltp-dio
* ltp-fcntl-locktests
* ltp-fs
* ltp-fs_bind
* ltp-fs_perms_simple
* ltp-hugetlb
* ltp-math
* ltp-mm
* ltp-nptl
* ltp-pty
* ltp-sched
* ltp-smoke
* ltp-syscalls
* ltp-tracing
* perf
* rcutorture
* rt-tests-cyclicdeadline
* rt-tests-pi-stress
* rt-tests-pmqtest
* rt-tests-rt-migrate-test
* rt-tests-signaltest

--
Linaro LKFT
https://lkft.linaro.org

author maintainer
#637 lore raw
Quoted 18 lines · Naresh Kamboju

I'm seeing the following allmodconfig and allyesconfig build failures on arm, arm64, riscv and x86_64.

## Build error
sound/soc/codecs/nau8325.c:430:13: error: variable 'n2_max' is uninitialized when used here [-Werror,-Wuninitialized]
430 | *n2_sel = n2_max;
| ^~~~~~
sound/soc/codecs/nau8325.c:389:52: note: initialize the variable 'n2_max' to silence this warning

  389 |         int i, j, mclk, mclk_max, ratio, ratio_sel, n2_max;
      |                                                           ^
      |                                                            = 0
sound/soc/codecs/nau8325.c:431:11: error: variable 'ratio_sel' is uninitialized when used here [-Werror,-Wuninitialized]
  431 |                 ratio = ratio_sel;
      |                         ^~~~~~~~~
sound/soc/codecs/nau8325.c:389:44: note: initialize the variable 'ratio_sel' to silence this warning
  389 |         int i, j, mclk, mclk_max, ratio, ratio_sel, n2_max;
      |                                                   ^
      |                                                    = 0
Quoted 8 lines

2 errors generated.
make[6]: *** [scripts/Makefile.build:287: sound/soc/codecs/nau8325.o] Error 1

First seen on 6.18.2-rc1

Good: 6.18.1-rc1
Bad:  6.18.2-rc1

And these build regressions also seen on 6.17.13-rc2.

Thanks, I'll go queue up the fix for this.

greg k-h

#638 lore raw
Quoted 23 lines · Greg KH
Quoted 21 lines · Naresh Kamboju

I'm seeing the following allmodconfig and allyesconfig build failures on arm, arm64, riscv and x86_64.

## Build error
sound/soc/codecs/nau8325.c:430:13: error: variable 'n2_max' is uninitialized when used here [-Werror,-Wuninitialized]
430 | *n2_sel = n2_max;
| ^~~~~~
sound/soc/codecs/nau8325.c:389:52: note: initialize the variable 'n2_max' to silence this warning

  389 |         int i, j, mclk, mclk_max, ratio, ratio_sel, n2_max;
      |                                                           ^
      |                                                            = 0
sound/soc/codecs/nau8325.c:431:11: error: variable 'ratio_sel' is uninitialized when used here [-Werror,-Wuninitialized]
  431 |                 ratio = ratio_sel;
      |                         ^~~~~~~~~
sound/soc/codecs/nau8325.c:389:44: note: initialize the variable 'ratio_sel' to silence this warning
  389 |         int i, j, mclk, mclk_max, ratio, ratio_sel, n2_max;
      |                                                   ^
      |                                                    = 0

2 errors generated.
make[6]: *** [scripts/Makefile.build:287: sound/soc/codecs/nau8325.o] Error 1

Quoted 7 lines
Quoted 5 lines

First seen on 6.18.2-rc1

Good: 6.18.1-rc1
Bad:  6.18.2-rc1

And these build regressions also seen on 6.17.13-rc2.

Thanks, I'll go queue up the fix for this.

This build regression is across the 6.18.2-rc1, 6.17.13-rc2 and 6.12.63-rc1.

Quoted 2 lines

greg k-h

- Naresh

author maintainer
#639 lore raw
Quoted 28 lines · Naresh Kamboju
Quoted 27 lines · Greg KH
Quoted 25 lines · Naresh Kamboju

I'm seeing the following allmodconfig and allyesconfig build failures on arm, arm64, riscv and x86_64.

## Build error
sound/soc/codecs/nau8325.c:430:13: error: variable 'n2_max' is uninitialized when used here [-Werror,-Wuninitialized]
430 | *n2_sel = n2_max;
| ^~~~~~
sound/soc/codecs/nau8325.c:389:52: note: initialize the variable 'n2_max' to silence this warning

  389 |         int i, j, mclk, mclk_max, ratio, ratio_sel, n2_max;
      |                                                           ^
      |                                                            = 0
sound/soc/codecs/nau8325.c:431:11: error: variable 'ratio_sel' is uninitialized when used here [-Werror,-Wuninitialized]
  431 |                 ratio = ratio_sel;
      |                         ^~~~~~~~~
sound/soc/codecs/nau8325.c:389:44: note: initialize the variable 'ratio_sel' to silence this warning
  389 |         int i, j, mclk, mclk_max, ratio, ratio_sel, n2_max;
      |                                                   ^
      |                                                    = 0

2 errors generated.
make[6]: *** [scripts/Makefile.build:287: sound/soc/codecs/nau8325.o] Error 1

First seen on 6.18.2-rc1

Good: 6.18.1-rc1
Bad:  6.18.2-rc1
Quoted 5 lines
Quoted 3 lines
Quoted 1 line

And these build regressions also seen on 6.17.13-rc2.

Thanks, I'll go queue up the fix for this.

This build regression is across the 6.18.2-rc1, 6.17.13-rc2 and 6.12.63-rc1.

The fix was applied to all of these now, thanks.

greg k-h

Tested-by on the v1 series
#640 lore raw
In reply to Greg Kroah-Hartman
Quoted 9 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 6.18.2 release. There are 614 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Thu, 18 Dec 2025 11:12:22 +0000. Anything received after that time might be too late.

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

Quoted 8 lines
	https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.18.2-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-6.18.y
and the diffstat can be found below.

thanks,

greg k-h

On ARCH_BRCMSTB using 32-bit and 64-bit ARM kernels, build tested on BMIPS_GENERIC:

Signature · 1 line
Florian
Tested-by on the v1 series
#641 lore raw
In reply to Greg Kroah-Hartman
Quoted 9 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 6.18.2 release. There are 614 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Thu, 18 Dec 2025 11:12:22 +0000. Anything received after that time might be too late.

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

Quoted 8 lines
	https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.18.2-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-6.18.y
and the diffstat can be found below.

thanks,

greg k-h

Built and booted successfully on RISC-V RV64 (HiFive Unmatched).

Tested-by on the v1 series
#642 lore raw
In reply to Greg Kroah-Hartman

hello

Compiled and booted 6.18.2-rc1+

No typical new regressions from dmesg.

As per dmidecode command.
Version: AMD Ryzen 3 3250U with Radeon Graphics

Processor Information
Socket Designation: FP5
Type: Central Processor
Family: Zen
Manufacturer: Advanced Micro Devices, Inc.
ID: 81 0F 81 00 FF FB 8B 17
Signature: Family 23, Model 24, Stepping 1

--
software engineer
rajagiri school of engineering and technology

Quoted 2,492 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 6.18.2 release. There are 614 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Thu, 18 Dec 2025 11:12:22 +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/v6.x/stable-review/patch-6.18.2-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-6.18.y
and the diffstat can be found below.

thanks,

greg k-h

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

Greg Kroah-Hartman <[email protected]>

    Linux 6.18.2-rc1

Junrui Luo <[email protected]>
ALSA: wavefront: Fix integer overflow in sample size validation

Junrui Luo <[email protected]>
ALSA: wavefront: Clear substream pointers on close

Denis Arefev <[email protected]>
ALSA: hda: cs35l41: Fix NULL pointer dereference in cs35l41_hda_read_acpi()

Antheas Kapenekakis <[email protected]>
ALSA: hda/tas2781: fix speaker id retrieval for multiple probes

Antheas Kapenekakis <[email protected]>
ALSA: hda/realtek: Add match for ASUS Xbox Ally projects

Junrui Luo <[email protected]>
ALSA: dice: fix buffer overflow in detect_stream_formats()

Sven Peter <[email protected]>
usb: dwc3: dwc3_power_off_all_roothub_ports: Use ioremap_np when required

Duoming Zhou <[email protected]>

    usb: typec: ucsi: fix use-after-free caused by uec->work

Diogo Ivo <[email protected]>
usb: phy: Initialize struct usb_phy list_head

Duoming Zhou <[email protected]>
usb: typec: ucsi: fix probe failure in gaokun_ucsi_probe()

Haotien Hsu <[email protected]>
usb: gadget: tegra-xudc: Always reinitialize data toggle when clear halt

Mauro Carvalho Chehab <[email protected]>
efi/cper: align ARM CPER type with UEFI 2.9A/2.10 specs

Mauro Carvalho Chehab <[email protected]>
efi/cper: Adjust infopfx size to accept an extra space

Mauro Carvalho Chehab <[email protected]>
efi/cper: Add a new helper function to print bitmasks

Evan Li <[email protected]>
perf/x86/intel: Fix NULL event dereference crash in handle_pmi_common()

Dmitry Antipov <[email protected]>
ocfs2: fix memory leak in ocfs2_merge_rec_left()

Sebastian Andrzej Siewior <[email protected]>
cpu: Make atomic hotplug callbacks run with interrupts disabled on UP

Dan Carpenter <[email protected]>
irqchip/mchp-eic: Fix error code in mchp_eic_domain_alloc()

Thaumy Cheng <[email protected]>
perf/core: Fix missing read event generation on task exit

Bart Van Assche <[email protected]>
scsi: ufs: core: Fix an error handler crash

Duoming Zhou <[email protected]>
scsi: imm: Fix use-after-free bug caused by unfinished delayed work

Haotian Zhang <[email protected]>
dm log-writes: Add missing set_freezable() for freezable kthread

Alexey Simakov <[email protected]>
dm-raid: fix possible NULL dereference with undefined raid type

Hemalatha Pinnamreddy <[email protected]>
ASoC: amd: acp: update tdm channels for specific DAI

Mohamed Khalfella <[email protected]>

    block: Use RCU in blk_mq_[un]quiesce_tagset() instead of set->tag_list_lock

Dibin Moolakadan Subrahmanian <[email protected]>
drm/i915/fbdev: Hold runtime PM ref during fbdev BO creation

Jani Nikula <[email protected]>
drm/{i915, xe}/fbdev: deduplicate struct drm_mode_fb_cmd2 init

Jani Nikula <[email protected]>
drm/{i915, xe}/fbdev: pass struct drm_device to intel_fbdev_fb_alloc()

Jani Nikula <[email protected]>
drm/i915/fbdev: make intel_framebuffer_create() error return handling explicit

Jani Nikula <[email protected]>
drm/xe/fbdev: use the same 64-byte stride alignment as i915

Liyuan Pang <[email protected]>
ARM: 9464/1: fix input-only operand modification in load_unaligned_zeropad()

Junrui Luo <[email protected]>
ALSA: firewire-motu: add bounds check in put_user loop for DSP events

Javier Martinez Canillas <[email protected]>
regulator: spacemit: Align input supply name with the DT binding

Nuno Sá <[email protected]>
rtc: max31335: Fix ignored return value in set_alarm

Haotian Zhang <[email protected]>
rtc: gamecube: Check the return value of ioremap()

Xiaogang Chen <[email protected]>
drm/amdkfd: Use huge page size to check split svm range alignment

Andres J Rosa <[email protected]>
ALSA: uapi: Fix typo in asound.h comment

Dave Kleikamp <[email protected]>
dma/pool: eliminate alloc_pages warning in atomic_pool_expand

Troy Mitchell <[email protected]>
i2c: spacemit: fix detect issue

Kathara Sasikumar <[email protected]>
docs: hwmon: fix link to g762 devicetree binding

Arnd Bergmann <[email protected]>

    gpio: tb10x: fix OF_GPIO dependency

Mike Snitzer <[email protected]>
nfs/localio: remove 61 byte hole from needless ____cacheline_aligned

Mike Snitzer <[email protected]>
nfs/localio: remove alignment size checking in nfs_is_local_dio_possible

David Howells <[email protected]>
cifs: Fix handling of a beyond-EOF DIO/unbuffered read over SMB2

David Howells <[email protected]>
cifs: Fix handling of a beyond-EOF DIO/unbuffered read over SMB1

René Rebe <[email protected]>
drm/nouveau: fix circular dep oops from vendored i2c encoder

Madhur Kumar <[email protected]>
drm/nouveau: refactor deprecated strcpy

Junrui Luo <[email protected]>
ALSA: firewire-motu: fix buffer overflow in hwdep read for DSP events

Mark Brown <[email protected]>
regulator: fixed: Rely on the core freeing the enable GPIO

Dan Carpenter <[email protected]>
drm/plane: Fix IS_ERR() vs NULL check in drm_plane_create_hotspot_properties()

Caleb Sander Mateos <[email protected]>
io_uring/kbuf: use READ_ONCE() for userspace-mapped memory

Israel Rukshin <[email protected]>
nvme-auth: use kvfree() for memory allocated with kvcalloc()

Shaurya Rane <[email protected]>
block: fix memory leak in __blkdev_issue_zero_pages

shechenglong <[email protected]>
block: fix comment for op_is_zone_mgmt() to include RESET_ALL

Arnd Bergmann <[email protected]>
drm/panel: novatek-nt35560: avoid on-stack device structure

Cong Zhang <[email protected]>
blk-mq: Abort suspend when wakeup events are pending

Daeho Jeong <[email protected]>
f2fs: revert summary entry count from 2048 to 512 in 16kb block support

Shengjiu Wang <[email protected]>
ASoC: ak5558: Disable regulator when error happens

Shengjiu Wang <[email protected]>
ASoC: ak4458: Disable regulator when error happens

Hemalatha Pinnamreddy <[email protected]>
ASoC: amd: acp: Audio is not resuming after s0ix

Haotian Zhang <[email protected]>
ASoC: bcm: bcm63xx-pcm-whistler: Check return value of of_dma_configure()

Anton Khirnov <[email protected]>
platform/x86: asus-wmi: use brightness_set_blocking() for kbd led

Armin Wolf <[email protected]>
fs/nls: Fix inconsistency between utf8_to_utf32() and utf32_to_utf8()

Trond Myklebust <[email protected]>
NFS: Fix inheritance of the block sizes when automounting

Trond Myklebust <[email protected]>
NFS: Automounted filesystems should inherit ro,noexec,nodev,sync flags

Trond Myklebust <[email protected]>
Revert "nfs: ignore SB_RDONLY when mounting nfs"

Trond Myklebust <[email protected]>
Revert "nfs: clear SB_RDONLY before getting superblock"

Trond Myklebust <[email protected]>
Revert "nfs: ignore SB_RDONLY when remounting nfs"

Akash Goel <[email protected]>
drm/panthor: Prevent potential UAF in group creation

Jonathan Curley <[email protected]>
NFSv4/pNFS: Clear NFS_INO_LAYOUTCOMMIT in pnfs_mark_layout_stateid_invalid

Trond Myklebust <[email protected]>
NFS: Initialise verifiers for visible dentries in _nfs4_open_and_get_state

Trond Myklebust <[email protected]>
NFS: Initialise verifiers for visible dentries in nfs_atomic_open()

Trond Myklebust <[email protected]>
NFS: Initialise verifiers for visible dentries in readdir and lookup

Armin Wolf <[email protected]>
fs/nls: Fix utf16 to utf8 conversion

Trond Myklebust <[email protected]>
NFS: Avoid changing nlink when file removes and attribute updates race

Abel Vesa <[email protected]>
kbuild: install-extmod-build: Properly fix CC expansion when ccache is used

Haotian Zhang <[email protected]>
rtc: amlogic-a4: fix double free caused by devm

Daeho Jeong <[email protected]>
f2fs: maintain one time GC mode is enabled during whole zoned GC cycle

Xi Pardee <[email protected]>
platform/x86:intel/pmc: Update Arrow Lake telemetry GUID

John Stultz <[email protected]>
sched/core: Fix psi_dequeue() for Proxy Execution

xupengbo <[email protected]>
sched/fair: Fix unfairness caused by stalled tg_load_avg_contrib when the last task migrates out

Eric Sandeen <[email protected]>
9p: fix cache/debug options printing in v9fs_show_options

Abdun Nihaal <[email protected]>
fbdev: ssd1307fb: fix potential page leak in ssd1307fb_probe()

Ian Rogers <[email protected]>
perf stat: Allow no events to open if this is a "--null" run

Haotian Zhang <[email protected]>
pinctrl: single: Fix incorrect type for error return variable

Ian Rogers <[email protected]>
perf hist: In init, ensure mem_info is put on error paths

Ian Rogers <[email protected]>
perf kvm: Fix debug assertion

Namhyung Kim <[email protected]>
perf tools: Fix split kallsyms DSO counting

Namhyung Kim <[email protected]>
perf tools: Mark split kallsyms DSOs as loaded

Namjae Jeon <[email protected]>
exfat: fix divide-by-zero in exfat_allocate_bitmap

Shuhao Fu <[email protected]>
exfat: fix refcount leak in exfat_find

Namhyung Kim <[email protected]>
perf jitdump: Add sym/str-tables to build-ID generation

Xiang Mei <[email protected]>
net/sched: sch_cake: Fix incorrect qlen reduction in cake_drop

Vladimir Oltean <[email protected]>

    net: dsa: xrs700x: reject unsupported HSR configurations

Xiaoliang Yang <[email protected]>
net: hsr: create an API to get hsr port type

Jonas Gorski <[email protected]>

    net: dsa: b53: fix BCM5325/65 ARL entry VIDs

Jonas Gorski <[email protected]>
net: dsa: b53: fix BCM5325/65 ARL entry multicast port masks

Jonas Gorski <[email protected]>
net: dsa: b53: add support for bcm63xx ARL entry format

Jonas Gorski <[email protected]>
net: dsa: b53: fix CPU port unicast ARL entries for BCM5325/65

Jonas Gorski <[email protected]>
net: dsa: b53: use same ARL search result offset for BCM5325/65

Jonas Gorski <[email protected]>

    net: dsa: b53: add support for 5389/5397/5398 ARL entry format

Jonas Gorski <[email protected]>
net: dsa: b53: move ARL entry functions into ops struct

Jonas Gorski <[email protected]>
net: dsa: b53: split reading search entry into their own functions

Jonas Gorski <[email protected]>
net: dsa: b53: provide accessors for accessing ARL_SRCH_CTL

Jonas Gorski <[email protected]>
net: dsa: b53: move writing ARL entries into their own functions

Jonas Gorski <[email protected]>
net: dsa: b53: move reading ARL entries into their own function

Jonas Gorski <[email protected]>

    net: dsa: b53: b53_arl_read{,25}(): use the entry for comparision

Jonas Gorski <[email protected]>
net: dsa: b53: fix extracting VID from entry for BCM5325/65

Jonas Gorski <[email protected]>
net: dsa: b53: fix VLAN_ID_IDX write size for BCM5325/65

Christophe Leroy (CS GROUP) <[email protected]>
um: Disable KASAN_INLINE when STATIC_LINK is selected

Stefan Metzmacher <[email protected]>
smb: client: relax WARN_ON_ONCE(SMBDIRECT_SOCKET_*) checks in recv_done() and smbd_conn_upcall()

Stefan Metzmacher <[email protected]>
smb: server: relax WARN_ON_ONCE(SMBDIRECT_SOCKET_*) checks in recv_done() and smb_direct_cm_handler()

Stefan Metzmacher <[email protected]>
smb: smbdirect: introduce SMBDIRECT_CHECK_STATUS_{WARN,DISCONNECT}()

Stefan Metzmacher <[email protected]>
smb: smbdirect: introduce SMBDIRECT_DEBUG_ERR_PTR() helper

Johan Hovold <[email protected]>
clk: keystone: fix compile testing

Yu Kuai <[email protected]>
md/raid5: fix IO hang when array is broken with IO inflight

Alexandru Gagniuc <[email protected]>
remoteproc: qcom_q6v5_wcss: fix parsing of qcom,halt-regs

Kumar Kartikeya Dwivedi <[email protected]>
rqspinlock: Use trylock fallback when per-CPU rqnode is busy

Kumar Kartikeya Dwivedi <[email protected]>
rqspinlock: Enclose lock/unlock within lock entry acquisitions

Ivan Stepchenko <[email protected]>
mtd: lpddr_cmds: fix signed shifts in lpddr_cmds

Breno Leitao <[email protected]>
net: netpoll: initialize work queue before error checks

Hangbin Liu <[email protected]>
selftests: bonding: add delay before each xvlan_over_bond connectivity check

Robert Marko <[email protected]>
net: phy: aquantia: check for NVMEM deferral

Mickaël Salaün <[email protected]>
landlock: Fix handling of disconnected directories

Alex Williamson <[email protected]>
vfio/pci: Use RCU for error/request triggers to avoid circular locking

Dev Jain <[email protected]>
arm64/pageattr: Propagate return value from __change_memory_common

Tianchu Chen <[email protected]>
spi: ch341: fix out-of-bounds memory access in ch341_transfer_one

Haotian Zhang <[email protected]>
mtd: rawnand: renesas: Handle devm_pm_runtime_enable() errors

Alexey Kodanev <[email protected]>
net: stmmac: fix rx limit check in stmmac_rx_zc()

Antoine Tenart <[email protected]>
net: vxlan: prevent NULL deref in vxlan_xmit_one

Michal Schmidt <[email protected]>
iavf: Implement settime64 with -EOPNOTSUPP

Fernando Fernandez Mancera <[email protected]>
netfilter: nft_connlimit: update the count if add was skipped

Fernando Fernandez Mancera <[email protected]>
netfilter: nf_conncount: rework API to use sk_buff directly

Pablo Neira Ayuso <[email protected]>
netfilter: flowtable: check for maximum number of encapsulations in bridge vlan

Ilias Stamatis <[email protected]>
Reinstate "resource: avoid unnecessary lookups in find_next_iomem_res()"

Chen-Yu Tsai <[email protected]>
arm64: dts: mediatek: mt8195: Fix address range for JPEG decoder core 1

sparkhuang <[email protected]>
regulator: core: Protect regulator_supply_alias_list with regulator_list_mutex

Marek Szyprowski <[email protected]>
ARM: dts: samsung: exynos4412-midas: turn off SDIO WLAN chip during system suspend

Marek Szyprowski <[email protected]>
ARM: dts: samsung: exynos4210-trats: turn off SDIO WLAN chip during system suspend

Marek Szyprowski <[email protected]>
ARM: dts: samsung: exynos4210-i9100: turn off SDIO WLAN chip during system suspend

Marek Szyprowski <[email protected]>
ARM: dts: samsung: universal_c210: turn off SDIO WLAN chip during system suspend

Marek Szyprowski <[email protected]>
soc: samsung: exynos-pmu: Fix structure initialization

Mikhail Kshevetskiy <[email protected]>
spi: airoha-snfi: en7523: workaround flash damaging if UART_TXD was short to GND

Cezary Rojewski <[email protected]>
ASoC: Intel: catpt: Fix error path in hw_params()

Michael S. Tsirkin <[email protected]>
virtio: clean up features qword/dword terms

Alok Tiwari <[email protected]>
vdpa/pds: use %pe for ERR_PTR() in event handler registration

Mike Christie <[email protected]>
vhost: Fix kthread worker cgroup failure handling

Alok Tiwari <[email protected]>
vdpa/mlx5: Fix incorrect error code reporting in query_virtqueues

Michael S. Tsirkin <[email protected]>
virtio: fix map ops comment

Michael S. Tsirkin <[email protected]>
virtio: fix virtqueue_set_affinity() docs

Michael S. Tsirkin <[email protected]>
virtio: standardize Returns documentation style

Michael S. Tsirkin <[email protected]>
virtio: fix grammar in virtio_map_ops docs

Michael S. Tsirkin <[email protected]>
virtio: fix grammar in virtio_queue_info docs

Michael S. Tsirkin <[email protected]>
virtio: fix whitespace in virtio_config_ops

Michael S. Tsirkin <[email protected]>
virtio: fix typo in virtio_device_ready() comment

Kriish Sharma <[email protected]>
virtio: fix kernel-doc for mapping/free_coherent functions

Alok Tiwari <[email protected]>
virtio_vdpa: fix misleading return in void function

Guenter Roeck <[email protected]>
of: Skip devicetree kunit tests when RISCV+ACPI doesn't populate root node

Willem de Bruijn <[email protected]>
selftests/net: packetdrill: pass send_omit_free to MSG_ZEROCOPY tests

Yongjian Sun <[email protected]>
ext4: improve integrity checking in __mb_check_buddy by enhancing order-0 validation

Edward Adam Davis <[email protected]>
bpf: Fix exclusive map memory leak

Matthieu Buffet <[email protected]>
selftests/landlock: Fix makefile header list

Kevin Brodsky <[email protected]>
ublk: prevent invalid access with DEBUG

René Rebe <[email protected]>
ACPI: processor_core: fix map_x2apic_id for amd-pstate on am4

Haotian Zhang <[email protected]>
hwmon: sy7636a: Fix regulator_enable resource leak on error path

Eric Huang <[email protected]>
drm/amdkfd: assign AID to uuid in topology for SPX mode

Dan Carpenter <[email protected]>
drm/amd/display: Fix logical vs bitwise bug in get_embedded_panel_info_v2_1()

Will Rosenberg <[email protected]>
kernfs: fix memory leak of kernfs_iattrs in __kernfs_new_node

Christophe JAILLET <[email protected]>
misc: rp1: Fix an error handling path in rp1_probe()

Christoph Hellwig <[email protected]>
fs: lift the FMODE_NOCMTIME check into file_update_time_flags

Christoph Hellwig <[email protected]>
fs: refactor file timestamp update logic

Haotian Zhang <[email protected]>
greybus: gb-beagleplay: Fix timeout handling in bootloader functions

Alexandre Courbot <[email protected]>
firmware_loader: make RUST_FW_LOADER_ABSTRACTIONS select FW_LOADER

Shengjiu Wang <[email protected]>
ASoC: fsl_xcvr: clear the channel status control memory

Andreas Gruenbacher <[email protected]>
gfs2: Prevent recursive memory reclaim

Jaroslav Kysela <[email protected]>
ASoC: nau8325: add missing build config

Jaroslav Kysela <[email protected]>
ASoC: nau8325: use simple i2c probe function

Johan Hovold <[email protected]>
clocksource/drivers/nxp-stm: Prevent driver unbind

Johan Hovold <[email protected]>
clocksource/drivers/nxp-stm: Fix section mismatches

Johan Hovold <[email protected]>
clocksource/drivers/nxp-pit: Prevent driver unbind

Johan Hovold <[email protected]>
clocksource/drivers/arm_arch_timer_mmio: Prevent driver unbind

Johan Hovold <[email protected]>
clocksource/drivers/stm: Fix double deregistration on probe failure

Haotian Zhang <[email protected]>
clocksource/drivers/ralink: Fix resource leaks in init error path

Akash Goel <[email protected]>
drm/panthor: Avoid adding of kernel BOs to extobj list

Guillaume La Roque <[email protected]>
arm64: dts: amlogic: meson-g12b: Fix L2 cache reference for S922X CPUs

Jijun Wang <[email protected]>
RDMA/irdma: Fix SRQ shadow area address initialization

Jacob Moroni <[email protected]>
RDMA/irdma: Remove doorbell elision logic

Jacob Moroni <[email protected]>
RDMA/irdma: Do not set IBK_LOCAL_DMA_LKEY for GEN3+

Jacob Moroni <[email protected]>
RDMA/irdma: Do not directly rely on IB_PD_UNSAFE_GLOBAL_RKEY

Anil Samal <[email protected]>
RDMA/irdma: Add missing mutex destroy

Krzysztof Czurylo <[email protected]>
RDMA/irdma: Fix SIGBUS in AEQ destroy

Tatyana Nikolova <[email protected]>
RDMA/irdma: Add a missing kfree of struct irdma_pci_f for GEN2

Krzysztof Czurylo <[email protected]>
RDMA/irdma: Fix data race in irdma_free_pble

Krzysztof Czurylo <[email protected]>
RDMA/irdma: Fix data race in irdma_sc_ccq_arm

Stephan Gerhold <[email protected]>
iommu/arm-smmu-qcom: Enable use of all SMR groups when running bare-metal

Randy Dunlap <[email protected]>
backlight: lp855x: Fix lp855x.h kernel-doc warnings

Luca Ceresoli <[email protected]>
backlight: led-bl: Add devlink to supplier LEDs

Ria Thomas <[email protected]>
wifi: ieee80211: correct FILS status codes

Christoph Hellwig <[email protected]>
iomap: allocate s_dio_done_wq for async reads as well

Christoph Hellwig <[email protected]>
iomap: always run error completions in user context

David Gow <[email protected]>
um: Don't rename vmap to kernel_vmap

Timur Tabi <[email protected]>
drm/nouveau: restrict the flush page to a 32-bit address

Shawn Lin <[email protected]>
PCI: dwc: Fix wrong PORT_LOGIC_LTSSM_STATE_MASK definition

Filipe Manana <[email protected]>
btrfs: fix leaf leak in an error path in btrfs_del_items()

Qu Wenruo <[email protected]>
btrfs: make sure extent and csum paths are always released in scrub_raid56_parity_stripe()

Boris Burkov <[email protected]>
btrfs: fix racy bitfield write in btrfs_clear_space_info_full()

Miquel Sabaté Solà <[email protected]>
btrfs: fix double free of qgroup record after failure to add delayed ref head

Alan Maguire <[email protected]>
selftests/bpf: Allow selftests to build with older xxd

Alan Maguire <[email protected]>
bpftool: Allow bpftool to build with openssl < 3

Ryan Huang <[email protected]>
iommu/arm-smmu-v3: Fix error check in arm_smmu_alloc_cd_tables

Jianglei Nie <[email protected]>
staging: fbtft: core: fix potential memory leak in fbtft_probe_common()

Dinh Nguyen <[email protected]>
firmware: stratix10-svc: fix make htmldocs warning for stratix10_svc

Zilin Guan <[email protected]>

    mt76: mt7615: Fix memory leak in mt7615_mcu_wtbl_sta_add()

Lorenzo Bianconi <[email protected]>

    wifi: mt76: mt7996: Add missing locking in mt7996_mac_sta_rc_work()

Lorenzo Bianconi <[email protected]>

    wifi: mt76: mt7996: skip ieee80211_iter_keys() on scanning link remove

Lorenzo Bianconi <[email protected]>
wifi: mt76: mt7996: skip deflink accounting for offchannel links

Lorenzo Bianconi <[email protected]>
wifi: mt76: Move mt76_abort_scan out of mt76_reset_device()

Lorenzo Bianconi <[email protected]>

    wifi: mt76: mt7996: grab mt76 mutex in mt7996_mac_sta_event()

Shayne Chen <[email protected]>
wifi: mt76: mt7996: fix EMI rings for RRO

Shayne Chen <[email protected]>
wifi: mt76: mt7996: fix using wrong phy to start in mt7996_mac_restart()

Shayne Chen <[email protected]>
wifi: mt76: mt7996: fix MLO set key and group key issues

Shayne Chen <[email protected]>
wifi: mt76: mt7996: fix MLD group index assignment

Shayne Chen <[email protected]>
wifi: mt76: mt7996: set link_valid field when initializing wcid

Shayne Chen <[email protected]>
wifi: mt76: mt7996: fix teardown command for an MLD peer

Shayne Chen <[email protected]>

    wifi: mt76: mt7996: fix several fields in mt7996_mcu_bss_basic_tlv()

Howard Hsu <[email protected]>
wifi: mt76: mt7996: fix implicit beamforming support for mt7992

StanleyYP Wang <[email protected]>
wifi: mt76: mt7996: fix max nss value when getting rx chainmask

Fedor Pchelkin <[email protected]>
Revert "wifi: mt76: mt792x: improve monitor interface handling"

Lorenzo Bianconi <[email protected]>

    wifi: mt76: mt7996: Remove useless check in mt7996_msdu_page_get_from_cache()

Lorenzo Bianconi <[email protected]>
wifi: mt76: wed: use proper wed reference in mt76 wed driver callabacks

Lorenzo Bianconi <[email protected]>
wifi: mt76: mt7996: Remove unnecessary link_id checks in mt7996_tx

Felix Fietkau <[email protected]>

    wifi: mt76: mt7996: fix null pointer deref in mt7996_conf_tx()

Shenghao Ding <[email protected]>
ASoC: tas2781: correct the wrong period

Baojun Xu <[email protected]>
ASoC: tas2781: Correct the wrong chip ID for reset variable check

Herbert Xu <[email protected]>
crypto: ahash - Zero positive err value in ahash_update_finish

Herbert Xu <[email protected]>
crypto: ahash - Fix crypto_ahash_import with partial block data

Selvin Xavier <[email protected]>
RDMA/bnxt_re: Pass correct flag for dma mr creation

Selvin Xavier <[email protected]>
RDMA/bnxt_re: Fix the inline size for GenP7 devices

Gao Xiang <[email protected]>
erofs: limit the level of fs stacking for file-backed mounts

Gao Xiang <[email protected]>
erofs: correct FSDAX detection

Fangyu Yu <[email protected]>
RISC-V: KVM: Fix guest page fault within HLV* instructions

Pengjie Zhang <[email protected]>
PM / devfreq: hisi: Fix potential UAF in OPP handling

Haotian Zhang <[email protected]>
crypto: ccree - Correctly handle return of sg_nents_for_len

Haotian Zhang <[email protected]>
crypto: starfive - Correctly handle return of sg_nents_for_len

Martin Teichmann <[email protected]>
bpf: properly verify tail call behavior

Xing Guo <[email protected]>
selftests/bpf: Update test_tag to use sha256

Matt Bobrowski <[email protected]>
selftests/bpf: Improve reliability of test_perf_branches_no_hw()

Matt Bobrowski <[email protected]>
selftests/bpf: skip test_perf_branches_hw() on unsupported platforms

Dan Carpenter <[email protected]>
regulator: pca9450: Fix error code in probe()

Gopi Krishna Menon <[email protected]>
usb: raw-gadget: cap raw_io transfer length to KMALLOC_MAX_SIZE

Jisheng Zhang <[email protected]>
usb: dwc2: fix hang during suspend if set as peripheral

Jisheng Zhang <[email protected]>
usb: dwc2: fix hang during shutdown if set as peripheral

Oliver Neukum <[email protected]>
usb: chaoskey: fix locking for O_NONBLOCK

Zhao Yipeng <[email protected]>
ima: Handle error code returned by ima_filter_rule_match()

Ivan Pravdin <[email protected]>
rtla: Fix -a overriding -t argument

Tomas Glozar <[email protected]>
rtla/tests: Fix osnoise test calling timerlat

Tomas Glozar <[email protected]>
rtla/tests: Extend action tests to 5s

Jason Tian <[email protected]>
RAS: Report all ARM processor CPER information to userspace

Seungjin Bae <[email protected]>
wifi: rtl818x: rtl8187: Fix potential buffer underflow in rtl8187_rx_cb()

Charles Mirabile <[email protected]>
clk: spacemit: Set clk_hw_onecell_data::num before using flex array

Chen Ridong <[email protected]>
cpuset: Treat cpusets in attaching as populated

Alexander Dahl <[email protected]>
net: phy: adin1100: Fix software power-down ready condition

Matt Bobrowski <[email protected]>
selftests/bpf: Use ASSERT_STRNEQ to factor in long slab cache names

Charles Keepax <[email protected]>
ASoC: SDCA: Fix missing dash in HIDE DisCo property

Cristian Ciocaltea <[email protected]>
phy: rockchip: samsung-hdptx: Prevent Inter-Pair Skew from exceeding the limits

Cristian Ciocaltea <[email protected]>
phy: rockchip: samsung-hdptx: Reduce ROPLL loop bandwidth

Cristian Ciocaltea <[email protected]>
phy: rockchip: samsung-hdptx: Fix reported clock rate in high bpc mode

Xiaolei Wang <[email protected]>

    phy: freescale: Initialize priv->lock

Shawn Lin <[email protected]>
phy: rockchip: naneng-combphy: Fix PCIe L1ss support RK3562

Shawn Lin <[email protected]>
phy: rockchip: naneng-combphy: Fix PCIe L1ss support RK3528

Christophe JAILLET <[email protected]>
phy: renesas: rcar-gen3-usb2: Fix an error handling path in rcar_gen3_phy_usb2_probe()

Fenglin Wu <[email protected]>
leds: rgb: leds-qcom-lpg: Don't enable TRILED when configuring PWM

Yuntao Wang <[email protected]>
of/fdt: Fix incorrect use of dt_root_addr_cells in early_init_dt_check_kho()

Yuntao Wang <[email protected]>
of/fdt: Fix the len check in early_init_dt_check_for_usable_mem_range()

Yuntao Wang <[email protected]>
of/fdt: Fix the len check in early_init_dt_check_for_elfcorehdr()

Yuntao Wang <[email protected]>
of/fdt: Consolidate duplicate code into helper functions

Haotian Zhang <[email protected]>
mfd: mt6358-irq: Fix missing irq_domain_remove() in error path

Haotian Zhang <[email protected]>
mfd: mt6397-irq: Fix missing irq_domain_remove() in error path

Tomas Glozar <[email protected]>

    tools/rtla: Fix --on-threshold always triggering

Costa Shulyupin <[email protected]>
tools/rtla: Fix unassigned nr_cpus

Chien Wong <[email protected]>
wifi: mac80211: fix CMAC functions not handling errors

Aashish Sharma <[email protected]>
iommu/vt-d: Fix unused invalidation hint in qi_desc_iotlb

Vineeth Pillai (Google) <[email protected]>
iommu/vt-d: Set INTEL_IOMMU_FLOPPY_WA depend on BLK_DEV_FD

Vladimir Oltean <[email protected]>
net: phy: realtek: create rtl8211f_config_rgmii_delay()

Zilin Guan <[email protected]>
scsi: qla2xxx: Fix improper freeing of purex item

Shawn Lin <[email protected]>
scsi: ufs: rockchip: Reset controller on PRE_CHANGE of hce enable notify

Uwe Kleine-König <[email protected]>
pwm: bcm2835: Make sure the channel is enabled after pwm_request()

Leo Yan <[email protected]>
perf arm_spe: Fix memset subclass in operation

Fernando Fernandez Mancera <[email protected]>
ipv6: clear RA flags when adding a static route

Longbin Li <[email protected]>
spi: sophgo: Fix incorrect use of bus width value macros

Akhil P Oommen <[email protected]>
drm/msm/a6xx: Improve MX rail fallback in RPMH vote init

Akhil P Oommen <[email protected]>
drm/msm/a6xx: Fix the gemnoc workaround

Akhil P Oommen <[email protected]>
drm/msm/a6xx: Flush LRZ cache before PT switch

Jay Liu <[email protected]>
drm/mediatek: Fix CCORR mtk_ctm_s31_32_to_s1_n function issue

Edward Adam Davis <[email protected]>
fs/ntfs3: Prevent memory leaks in add sub record

Edward Adam Davis <[email protected]>
fs/ntfs3: out1 also needs to put mi

Ovidiu Panait <[email protected]>
net: stmmac: Fix VLAN 0 deletion in vlan_del_hw_rx_fltr()

Ritesh Harjani (IBM) <[email protected]>
powerpc/64s/ptdump: Fix kernel_hash_pagetable dump for ISA v3.00 HPTE format

Ritesh Harjani (IBM) <[email protected]>
powerpc/64s/hash: Restrict stress_hpt_struct memblock region to within RMA limit

Pu Lehui <[email protected]>

    bpf: Fix invalid prog->stats access when update_effective_progs fails

Inochi Amaoto <[email protected]>
net: stmmac: dwmac-sophgo: Add phy interface filter

Inochi Amaoto <[email protected]>
net: phy: Add helper for fixing RGMII PHY mode based on internal mac delay

Abdun Nihaal <[email protected]>
wifi: rtl818x: Fix potential memory leaks in rtl8180_init_rx_ring()

Christian Bruel <[email protected]>
PCI: stm32: Fix EP page_size alignment

Christian Bruel <[email protected]>
PCI: stm32: Fix LTSSM EP race with start link

Dmitry Baryshkov <[email protected]>
drm/msm/a2xx: stop over-complaining about the legacy firmware

Huiwen He <[email protected]>
drm/msm: fix missing NULL check after kcalloc in crashstate_get_bos()

Huiwen He <[email protected]>
drm/msm: Fix NULL pointer dereference in crashstate_get_vm_logs()

Guenter Roeck <[email protected]>
block/blk-throttle: Fix throttle slice time for SSDs

Alexander Stein <[email protected]>
arm64: dts: imx95-tqma9596sa: reduce maximum FlexSPI frequency to 66MHz

Markus Niebel <[email protected]>
arm64: dts: imx95-tqma9596sa: fix TPM5 pinctrl node name

Sergey Bashirov <[email protected]>
NFSD/blocklayout: Fix minlength check in proc_layoutget

Al Viro <[email protected]>
tracefs: fix a leak in eventfs_create_events_dir()

Al Viro <[email protected]>
fuse_ctl_add_conn(): fix nlink breakage in case of early failure

Andy Shevchenko <[email protected]>
iio: core: Clean up device correctly on iio_device_alloc() failure

Andy Shevchenko <[email protected]>
iio: core: add missing mutex_destroy in iio_dev_release()

Haotian Zhang <[email protected]>
watchdog: starfive: Fix resource leak in probe error path

Haotian Zhang <[email protected]>
watchdog: wdat_wdt: Fix ACPI table leak in probe function

Nuno Das Neves <[email protected]>
mshv: Fix create memory region overlap check

Nuno Das Neves <[email protected]>
mshv: Fix deposit memory in MSHV_ROOT_HVCALL

Martin KaFai Lau <[email protected]>

    bpf: Check skb->transport_header is set in bpf_skb_check_mtu

Alexei Starovoitov <[email protected]>
selftests/bpf: Fix failure paths in send_signal test

Menglong Dong <[email protected]>
bpf: Handle return value of ftrace_set_filter_ip in register_fentry

Sahil Chandna <[email protected]>
bpf: Prevent nesting overflow in bpf_try_get_buffers

Thomas Weißschuh <[email protected]>
kbuild: don't enable CC_CAN_LINK if the dummy program generates warnings

Ilpo Järvinen <[email protected]>
PCI: Prevent resource tree corruption when BAR resize fails

Aaron Kling <[email protected]>
soc/tegra: fuse: speedo-tegra210: Update speedo IDs

Rene Rebe <[email protected]>
ps3disk: use memcpy_{from,to}_bvec index

Dmitry Baryshkov <[email protected]>
drm/msm/dpu: drop dpu_hw_dsc_destroy() prototype

Praveen Talari <[email protected]>
arm64: dts: qcom: qrb2210-rb1: Fix UART3 wakeup IRQ storm

Uwe Kleine-König <[email protected]>
pwm: Use %u to printf unsigned int pwm_chip::npwm and pwm_chip::id

Uwe Kleine-König <[email protected]>

    pwm: Simplify printf to emit chip->npwm in $debugfs/pwm

Aleksei Nikiforov <[email protected]>
s390/fpu: Fix false-positive kmsan report in fpu_vstl()

Zilin Guan <[email protected]>
crypto: iaa - Fix incorrect return value in save_iaa_wq()

Ian Rogers <[email protected]>
perf vendor metrics s390: Avoid has_event(INSTRUCTIONS)

FUKAUMI Naoki <[email protected]>
arm64: dts: rockchip: Add eeprom vcc-supply for Radxa ROCK 3C

FUKAUMI Naoki <[email protected]>
arm64: dts: rockchip: Add eeprom vcc-supply for Radxa ROCK 5A

FUKAUMI Naoki <[email protected]>
arm64: dts: rockchip: Move the EEPROM to correct I2C bus on Radxa ROCK 5A

Claudiu Beznea <[email protected]>
soc: renesas: rz-sysc: Populate readable_reg/writeable_reg in regmap config

Claudiu Beznea <[email protected]>
soc: renesas: r9a09g056-sys: Populate max_register

Siddharth Vadapalli <[email protected]>
PCI: keystone: Exit ks_pcie_probe() for invalid mode

Leon Hwang <[email protected]>
bpf: Free special fields when update [lru_,]percpu_hash maps

Lizhi Hou <[email protected]>
accel/amdxdna: Fix deadlock between context destroy and job timeout

Lizhi Hou <[email protected]>
accel/amdxdna: Clear mailbox interrupt register during channel creation

Chaitanya S Prakash <[email protected]>
arm64/mm: Allow __create_pgd_mapping() to propagate pgtable_alloc() errors

Haotian Zhang <[email protected]>
leds: netxbig: Fix GPIO descriptor leak in error paths

Haotian Zhang <[email protected]>
scsi: sim710: Fix resource leak by adding missing ioport_unmap() calls

Tony Battersby <[email protected]>
scsi: qla2xxx: Clear cmds after chip reset

Haotian Zhang <[email protected]>
ACPI: property: Fix fwnode refcount leak in acpi_fwnode_graph_parse_endpoint()

Joseph Qi <[email protected]>
ocfs2: use correct endian in ocfs2_dinode_has_extents

Dmitry Antipov <[email protected]>
ocfs2: relax BUG() to ocfs2_error() in __ocfs2_move_extent()

Andy Shevchenko <[email protected]>
lib/vsprintf: Check pointer before dereferencing in time_and_date()

Haotian Zhang <[email protected]>
clk: renesas: r9a06g032: Fix memory leak in error path

Lad Prabhakar <[email protected]>
clk: renesas: r9a09g077: Propagate rate changes to parent clocks

Jayesh Choudhary <[email protected]>
drm/tidss: Move OLDI mode validation to OLDI bridge mode_valid hook

Jayesh Choudhary <[email protected]>
drm/tidss: Remove max_pclk_khz and min_pclk_khz from tidss display features

Namhyung Kim <[email protected]>
perf tools: Fix missing feature check for inherit + SAMPLE_READ

Leo Yan <[email protected]>
coresight: etm4x: Properly control filter in CPU idle with FEAT_TRF

Leo Yan <[email protected]>
coresight: etm4x: Add context synchronization before enabling trace

Leo Yan <[email protected]>
coresight: etm4x: Correct polling IDLE bit

Leo Yan <[email protected]>
coresight: etm3x: Always set tracer's device mode on target CPU

Leo Yan <[email protected]>
coresight: etm4x: Always set tracer's device mode on target CPU

Leo Yan <[email protected]>
coresight: Change device mode to atomic type

Bartlomiej Kubik <[email protected]>
fs/ntfs3: Initialize allocated memory before use

David Wei <[email protected]>
io_uring/zcrx: call netdev_queue_get_dma_dev() under instance lock

David Wei <[email protected]>
net: export netdev_get_by_index_lock()

Zheng Qixing <[email protected]>
nbd: defer config unlock in nbd_genl_connect

Abdun Nihaal <[email protected]>
wifi: cw1200: Fix potential memory leak in cw1200_bh_rx_helper()

Long Li <[email protected]>
macintosh/mac_hid: fix race condition in mac_hid_toggle_emumouse

Christophe Leroy <[email protected]>
powerpc/32: Fix unpaired stwcx. on interrupt exit

Sourabh Jain <[email protected]>
powerpc/kdump: Fix size calculation for hot-removed memory ranges

Gautham R. Shenoy <[email protected]>
cpufreq/amd-pstate: Call cppc_set_auto_sel() only for online CPUs

Li Nan <[email protected]>
md: init bioset in mddev_init

Li Nan <[email protected]>
md: delete md_redundancy_group when array is becoming inactive

Bean Huo <[email protected]>
scsi: ufs: core: fix incorrect buffer duplication in ufshcd_read_string_desc()

Akash Goel <[email protected]>
drm/panthor: Fix potential memleak of vma structure

Edward Adam Davis <[email protected]>
ntfs3: init run lock for extend inode

Carl Worth <[email protected]>
coresight: tmc: add the handle of the event to the path

Jihed Chaibi <[email protected]>
ARM: dts: stm32: stm32mp157c-phycore: Fix STMPE811 touchscreen node properties

Ma Ke <[email protected]>
RDMA/rtrs: server: Fix error handling in get_or_create_srv

Manivannan Sadhasivam <[email protected]>
dt-bindings: PCI: amlogic: Fix the register name of the DBI region

Rodrigo Gobbi <[email protected]>
iio: imu: bmi270: fix dev_err_probe error msg

Johan Hovold <[email protected]>
staging: most: remove broken i2c driver

Mike McGowen <[email protected]>
scsi: smartpqi: Fix device resources accessed after device removal

Haotian Zhang <[email protected]>
scsi: stex: Fix reboot_notifier leak in probe error path

Zheng Qixing <[email protected]>
nbd: defer config put in recv_work

Xiao Ni <[email protected]>
md: avoid repeated calls to del_gendisk

Yun Zhou <[email protected]>
md: fix rcu protection in md_wakeup_thread

Xiao Ni <[email protected]>
md: delete mddev kobj before deleting gendisk kobj

Gabor Juhos <[email protected]>
regulator: core: disable supply if enabling main regulator fails

Dapeng Mi <[email protected]>
perf/x86/intel: Correct large PEBS flag check

Dapeng Mi <[email protected]>
perf/x86: Fix NULL event access and potential PEBS record loss

Pavel Begunkov <[email protected]>
io_uring: use WRITE_ONCE for user shared memory

FUKAUMI Naoki <[email protected]>
arm64: dts: rockchip: Fix USB Type-C host mode for Radxa ROCK 5B+/5T

Dan Carpenter <[email protected]>
hfs: fix potential use after free in hfs_correct_next_unused_CNID()

Lizhi Hou <[email protected]>
accel/amdxdna: Fix dma_fence leak when job is canceled

Zhang Yi <[email protected]>
ext4: correct the checking of quota files before moving extents

Manish Dharanenthiran <[email protected]>
wifi: ath12k: Fix timeout error during beacon stats retrieval

Haotian Zhang <[email protected]>
mfd: da9055: Fix missing regmap_del_irq_chip() in error path

Namhyung Kim <[email protected]>
perf annotate: Fix build with NO_SLANG=1

Fedor Pchelkin <[email protected]>
wifi: rtw89: usb: fix leak in rtw89_usb_write_port()

Fedor Pchelkin <[email protected]>
wifi: rtw89: usb: use common error path for skbs in rtw89_usb_rx_handler()

Wang Liang <[email protected]>
locktorture: Fix memory leak in param_set_cpumask()

Usama Arif <[email protected]>
efi/libstub: Fix page table access in 5-level to 4-level paging transition

Usama Arif <[email protected]>
x86/boot: Fix page table access in 5-level to 4-level paging transition

Xiaoqi Zhuang <[email protected]>
coresight: ETR: Fix ETR buffer use-after-free issue

Niklas Cassel <[email protected]>
arm64: tegra: Add pinctrl definitions for pcie-ep nodes

Peter Zijlstra <[email protected]>
entry,unwind/deferred: Fix unwind_reset_info() placement

Jihed Chaibi <[email protected]>
ARM: dts: omap3: n900: Correct obsolete TWL4030 power compatible

Jihed Chaibi <[email protected]>
ARM: dts: omap3: beagle-xm: Correct obsolete TWL4030 power compatible

Yegor Yefremov <[email protected]>
ARM: dts: am335x-netcom-plus-2xx: add missing GPIO labels

Geert Uytterhoeven <[email protected]>
ARM: dts: am33xx: Add missing serial console speed

Alan Maguire <[email protected]>
libbpf: Fix parsing of multi-split BTF

Vishwaroop A <[email protected]>
spi: tegra210-quad: Fix timeout handling

Matthew Brost <[email protected]>
drm/xe: Enforce correct user fence signaling order using

Christian Brauner <[email protected]>
cleanup: fix scoped_class()

Songtang Liu <[email protected]>
iommu/amd: Fix potential out-of-bounds read in iommu_mmio_show

Christian Brauner <[email protected]>
ns: initialize ns_list_node for initial namespaces

Christian Brauner <[email protected]>
ns: add NS_COMMON_INIT()

Thomas Richard (TI.com) <[email protected]>
firmware: ti_sci: Set IO Isolation only if the firmware is capable

Boris Brezillon <[email protected]>
drm/panthor: Fix UAF on kernel BO VA nodes

Ketil Johnsen <[email protected]>
drm/panthor: Fix race with suspend during unplug

Ketil Johnsen <[email protected]>
drm/panthor: Fix UAF race between device unplug and FW event processing

Boris Brezillon <[email protected]>
drm/panthor: Fix group_free_queue() for partially initialized queues

Boris Brezillon <[email protected]>
drm/panthor: Handle errors returned by drm_sched_entity_init()

Tingmao Wang <[email protected]>
fs/9p: Don't open remote file with APPEND mode when writeback cache is used

Mike Christie <[email protected]>
scsi: target: Fix LUN/device R/W and total command stats

Bart Van Assche <[email protected]>
scsi: target: Do not write NUL characters into ASCII configfs output

Ahelenia Ziemiańska <[email protected]>
power: supply: apm_power: only unset own apm_get_power_status

Val Packett <[email protected]>
power: supply: qcom_battmgr: support disabling charge control

Val Packett <[email protected]>
power: supply: qcom_battmgr: clamp charge control thresholds

Ivan Abramov <[email protected]>
power: supply: wm831x: Check wm831x_set_bits() return value

Murad Masimov <[email protected]>
power: supply: rt9467: Prevent using uninitialized local variable in rt9467_set_value_from_ranges()

Ivan Abramov <[email protected]>
power: supply: rt9467: Return error on failure in rt9467_set_value_from_ranges()

Ivan Abramov <[email protected]>
power: supply: max17040: Check iio_read_channel_processed() return code

Ivan Abramov <[email protected]>
power: supply: cw2015: Check devm_delayed_work_autocancel() return code

Haotian Zhang <[email protected]>
power: supply: rt5033_charger: Fix device node reference leaks

Frederic Weisbecker <[email protected]>
timers/migration: Fix imbalanced NUMA trees

Frederic Weisbecker <[email protected]>
timers/migration: Remove locking on group connection

Frederic Weisbecker <[email protected]>
timers/migration: Convert "while" loops to use "for"

Taniya Das <[email protected]>
clk: qcom: tcsrcc-glymur: Update register offsets for clock refs

Shuai Xue <[email protected]>
perf record: skip synthesize event when open evsel failed

Namhyung Kim <[email protected]>
perf lock contention: Load kernel map before lookup

Geert Uytterhoeven <[email protected]>
drm/imagination: Fix reference to devm_platform_get_and_ioremap_resource()

Christian Brauner <[email protected]>
cgroup: add cgroup namespace to tree after owner is set

Marek Vasut <[email protected]>
arm64: dts: renesas: sparrow-hawk: Fix full-size DP connector node name and labels

Kuan-Wei Chiu <[email protected]>
interconnect: debugfs: Fix incorrect error handling for NULL path

Lizhi Hou <[email protected]>
accel/amdxdna: Fix incorrect command state for timed out job

Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: msm8996: add interconnect paths to USB2 controller

Dmitry Baryshkov <[email protected]>
interconnect: qcom: msm8996: add missing link to SLAVE_USB_HS

Rameshkumar Sundaram <[email protected]>
wifi: ath12k: unassign arvif on scan vdev create failure

Rameshkumar Sundaram <[email protected]>
wifi: ath12k: enforce vdev limit in ath12k_mac_vdev_create()

Baochen Qiang <[email protected]>
wifi: ath12k: fix error handling in creating hardware group

Baochen Qiang <[email protected]>
wifi: ath12k: fix reusing m3 memory

Abdun Nihaal <[email protected]>
wifi: ath12k: fix potential memory leak in ath12k_wow_arp_ns_offload()

Jacob Keller <[email protected]>
docs: kdoc: fix duplicate section warning message

Arnd Bergmann <[email protected]>
random: use offstack cpumask when necessary

Stanley Chu <[email protected]>
i3c: master: svc: Prevent incomplete IBI transaction

Frank Li <[email protected]>
i3c: fix refcount inconsistency in i3c_master_register

Aniket Limaye <[email protected]>
arm64: dts: ti: k3-j784s4: Fix I2C pinmux pull configuration

Christian Brauner <[email protected]>
pidfs: add missing BUILD_BUG_ON() assert on struct pidfd_info

Christian Brauner <[email protected]>
pidfs: add missing PIDFD_INFO_SIZE_VER1

Tomasz Rusinowicz <[email protected]>
accel/ivpu: Fix race condition when unbinding BOs

Danilo Krummrich <[email protected]>
drm: nova: select NOVA_CORE

Haotian Zhang <[email protected]>
pinctrl: stm32: fix hwspinlock resource leak in probe function

Haotian Zhang <[email protected]>
soc: qcom: smem: fix hwspinlock resource leak in probe error paths

Taniya Das <[email protected]>
clk: qcom: gcc-qcs615: Update the SDCC clock to use shared_floor_ops

Benjamin Berg <[email protected]>
tools/nolibc/dirent: avoid errno in readdir_r

Benjamin Berg <[email protected]>
tools/nolibc/stdio: let perror work when NOLIBC_IGNORE_ERRNO is set

Maciej Falkowski <[email protected]>
accel/ivpu: Remove skip of dma unmap for imported buffers

Tengda Wu <[email protected]>
x86/dumpstack: Prevent KASAN false positive warnings in __show_regs()

Marek Vasut <[email protected]>
drm/rcar-du: dsi: Fix missing parameter in RXSETR_...EN macros

Peter Zijlstra <[email protected]>
task_work: Fix NMI race condition

Zhang Rui <[email protected]>
perf/x86/intel/cstate: Remove PC3 support from LunarLake

Arnaud Lecomte <[email protected]>
bpf: Fix stackmap overflow check in __bpf_get_stackid()

Arnaud Lecomte <[email protected]>
bpf: Refactor stack map trace depth calculation into helper function

Haotian Zhang <[email protected]>
mtd: rawnand: lpc32xx_slc: fix GPIO descriptor leak on probe error and remove

Aryan Srivastava <[email protected]>
mtd: nand: relax ECC parameter validation check

Aryan Srivastava <[email protected]>
Revert "mtd: rawnand: marvell: fix layouts"

Li Qiang <[email protected]>
wifi: iwlwifi: mld: add null check for kzalloc() in iwl_mld_send_proto_offload()

Alex Deucher <[email protected]>
drm/amdgpu/userq: fix SDMA and compute validation

Prike Liang <[email protected]>
drm/amdgpu: add userq object va track helpers

Wolfram Sang <[email protected]>
ARM: dts: renesas: r9a06g032-rzn1d400-db: Drop invalid #cells properties

Wolfram Sang <[email protected]>
ARM: dts: renesas: gose: Remove superfluous port property

Zhu Yanjun <[email protected]>

    RDMA/rxe: Fix null deref on srq->rq.queue after resize failure

Loic Poulain <[email protected]>
arm64: dts: qcom: qcm2290: Fix camss register prop ordering

Kuniyuki Iwashima <[email protected]>
sctp: Defer SCTP_DBG_OBJCNT_DEC() to sctp_destroy_sock().

Horatiu Vultur <[email protected]>
phy: mscc: Fix PTP for VSC8574 and VSC8572

Michal Suchanek <[email protected]>
perf hwmon_pmu: Fix uninitialized variable warning

Eric Gonçalves <[email protected]>
arm64: dts: qcom: sm8250-samsung-common: correct reserved pins

Konrad Dybcio <[email protected]>
arm64: dts: qcom: sdm845-starqltechn: Fix i2c-gpio node name

Pengyu Luo <[email protected]>

    arm64: dts: qcom: sc8280xp: Fix shifted GPI DMA channels

Val Packett <[email protected]>
arm64: dts: qcom: x1-dell-thena: remove dp data-lanes

Val Packett <[email protected]>
arm64: dts: qcom: x1-dell-thena: Add missing pinctrl for eDP HPD

Alexander Martinz <[email protected]>
arm64: dts: qcom: qcm6490-shift-otter: Add missing reserved-memory

Krishna Chaitanya Chundru <[email protected]>
arm64: dts: qcom: sm8750-mtp: move PCIe GPIOs to pcieport0 node

Neil Armstrong <[email protected]>
arm64: dts: qcom: sm8650: set ufs as dma coherent

Luca Weiss <[email protected]>
arm64: dts: qcom: qcm6490-fairphone-fp5: Add supplies to simple-fb node

Gergo Koteles <[email protected]>
arm64: dts: qcom: sdm845-oneplus: Correct gpio used for slider

Dzmitry Sankouski <[email protected]>
arm64: dts: qcom: sdm845-starqltechn: fix max77705 interrupts

Dzmitry Sankouski <[email protected]>
arm64: dts: qcom: sdm845-starqltechn: remove (address|size)-cells

Willy Tarreau <[email protected]>
tools/nolibc: x86: fix section mismatch caused by asm "mem*" functions

Krishna Kurapati <[email protected]>
arm64: dts: qcom: lemans: Add missing quirk for HS only USB controller

Krishna Kurapati <[email protected]>
arm64: dts: qcom: x1e80100: Add missing quirk for HS only USB controller

Krishna Kurapati <[email protected]>
arm64: dts: qcom: x1e80100: Fix compile warnings for USB HS controller

Peng Fan <[email protected]>
firmware: imx: scu-irq: fix OF node leak in

Randolph Sapp <[email protected]>
arm64: dts: ti: k3-am62p: Fix memory ranges for GPU

Bhanu Seshu Kumar Valluri <[email protected]>
PCI: endpoint: pci-epf-test: Fix sleeping function being called from atomic context

Thomas Richard <[email protected]>
leds: upboard: Fix module alias

Przemek Kitszel <[email protected]>
ice: remove duplicate call to ice_deinit_hw() on error paths

Przemek Kitszel <[email protected]>
ice: move ice_deinit_dev() to the end of deinit paths

Przemek Kitszel <[email protected]>
ice: extract ice_init_dev() from ice_init()

Przemek Kitszel <[email protected]>
ice: move ice_init_pf() out of ice_init_dev()

Przemek Kitszel <[email protected]>
ice: move udp_tunnel_nic and misc IRQ setup into ice_init_pf()

Przemek Kitszel <[email protected]>
ice: ice_init_pf: destroy mutexes and xarrays on memory alloc failure

Przemek Kitszel <[email protected]>
ice: move ice_init_interrupt_scheme() prior ice_init_pf()

Przemek Kitszel <[email protected]>
ice: move service task start out of ice_init_pf()

Lizhi Hou <[email protected]>
accel/amdxdna: Fix uninitialized return value

Baochen Qiang <[email protected]>
wifi: ath12k: restore register window after global reset

Len Brown <[email protected]>
tools/power turbostat: Regression fix Uncore MHz printed in hex

Heiko Carstens <[email protected]>
s390/ap: Don't leak debug feature files if AP instructions are not available

Bart Van Assche <[email protected]>
scsi: ufs: core: Move the ufshcd_enable_intr() declaration

Heiko Carstens <[email protected]>
s390/smp: Fix fallback CPU detection

Baochen Qiang <[email protected]>
wifi: ath11k: fix peer HE MCS assignment

Baochen Qiang <[email protected]>
wifi: ath11k: fix VHT MCS assignment

nieweiqiang <[email protected]>
crypto: hisilicon/qm - restore original qos values

Thorsten Blum <[email protected]>
crypto: asymmetric_keys - prevent overflow in asymmetric_key_generate_id

Haotian Zhang <[email protected]>
soc: qcom: gsbi: fix double disable caused by devm

Luca Weiss <[email protected]>
clk: qcom: camcc-sm7150: Fix PLL config of PLL2

Luca Weiss <[email protected]>
clk: qcom: camcc-sm6350: Fix PLL config of PLL2

Luo Jie <[email protected]>
clk: qcom: gcc-ipq5424: Correct the icc_first_node_id

Taniya Das <[email protected]>
clk: qcom: gcc-glymur: Update the halt check flags for pipe clocks

Taniya Das <[email protected]>
clk: qcom: gcc-sm8750: Add a new frequency for sdcc2 clock

Konrad Dybcio <[email protected]>
clk: qcom: rpmh: Define RPMH_IPA_CLK on QCS615

Vladimir Zapolskiy <[email protected]>
clk: qcom: camcc-sm6350: Specify Titan GDSC power domain as a parent to other

Vladimir Zapolskiy <[email protected]>
clk: qcom: camcc-sm8550: Specify Titan GDSC power domain as a parent to other

Sherry Sun <[email protected]>
tty: serial: imx: Only configure the wake register when device is set as wakeup source

Li Qiang <[email protected]>
uio: uio_fsl_elbc_gpcm:: Add null pointer check to uio_fsl_elbc_gpcm_probe

Geert Uytterhoeven <[email protected]>
PCI: rcar-gen2: Drop ARM dependency from PCI_RCAR_GEN2

Peter Griffin <[email protected]>
arm64: dts: exynos: gs101: fix sysreg_apm reg property

Peter Griffin <[email protected]>
arm64: dts: exynos: gs101: fix clock module unit reg sizes

Tianyou Li <[email protected]>
perf annotate: Check return value of evsel__get_arch() properly

Joy Zou <[email protected]>
arm64: dts: imx95-15x15-evk: add fan-supply property for pwm-fan

Tim Harvey <[email protected]>
arm64: dts: imx8mp-venice-gw702x: remove off-board sdhc1

Tim Harvey <[email protected]>
arm64: dts: imx8mp-venice-gw702x: remove off-board uart

Tim Harvey <[email protected]>
arm64: dts: imx8mm-venice-gw72xx: remove unused sdhc1 pinctrl

Tim Harvey <[email protected]>
arm64: dts: freescale: imx8mp-venice-gw7905-2x: remove duplicate usdhc1 props

Daniel Borkmann <[email protected]>
bpf: Do not let BPF test infra emit invalid GSO types to stack

Bart Van Assche <[email protected]>
block/mq-deadline: Switch back to a single dispatch list

Bart Van Assche <[email protected]>
block/mq-deadline: Introduce dd_start_request()

Christophe JAILLET <[email protected]>
PCI: sg2042: Fix a reference count issue in sg2042_pcie_remove()

T Pratham <[email protected]>
crypto: aead - Fix reqsize handling

Ian Rogers <[email protected]>
perf parse-events: Make X modifier more respectful of groups

Randy Dunlap <[email protected]>
firmware: qcom: tzmem: fix qcom_tzmem_policy kernel-doc

Francesco Lavra <[email protected]>
iio: imu: st_lsm6dsx: Fix measurement unit for odr struct member

Kathiravan Thirumoorthy <[email protected]>
arm64: dts: qcom: ipq5424: correct the TF-A reserved memory to 512K

Sidharth Seela <[email protected]>
ntfs3: Fix uninit buffer allocated by __getname()

Raphael Pinsonneault-Thibeault <[email protected]>
ntfs3: fix uninit memory after failed mi_read in mi_format_new

Herbert Xu <[email protected]>
crypto: authenc - Correctly pass EINPROGRESS back up to the caller

Johan Hovold <[email protected]>
irqchip: Pass platform device to platform drivers

Johan Hovold <[email protected]>
irqchip: Drop leftover brackets

Johan Hovold <[email protected]>
irqchip/qcom-irq-combiner: Fix section mismatch

Johan Hovold <[email protected]>
irqchip/starfive-jh8100: Fix section mismatch

Johan Hovold <[email protected]>
irqchip/renesas-rzg2l: Fix section mismatch

Johan Hovold <[email protected]>
irqchip/imx-mu-msi: Fix section mismatch

Johan Hovold <[email protected]>
irqchip/irq-brcmstb-l2: Fix section mismatch

Johan Hovold <[email protected]>
irqchip/irq-bcm7120-l2: Fix section mismatch

Johan Hovold <[email protected]>
irqchip/irq-bcm7038-l1: Fix section mismatch

Johan Hovold <[email protected]>
irqchip/bcm2712-mip: Fix section mismatch

Johan Hovold <[email protected]>
irqchip/bcm2712-mip: Fix OF node reference imbalance

Fernand Sieber <[email protected]>
sched/fair: Forfeit vruntime on yield

Pradeep Kumar Chitrapu <[email protected]>
wifi: ath12k: fix TX and RX MCS rate configurations in HE mode

Baochen Qiang <[email protected]>
wifi: ath12k: fix VHT MCS assignment

Sarika Sharma <[email protected]>
wifi: ath12k: Fix MSDU buffer types handling in RX error path

Baochen Qiang <[email protected]>
wifi: ath11k: restore register window after global reset

Kang Yang <[email protected]>
wifi: ath10k: move recovery check logic into a new work

Danilo Krummrich <[email protected]>
gpu: nova-core: gsp: do not unwrap() SGEntry

Danilo Krummrich <[email protected]>
gpu: nova-core: gsp: remove useless conversion

Ian Rogers <[email protected]>
perf parse-events: Fix legacy cache events if event is duplicated in a PMU

Wludzik, Jozef <[email protected]>
accel/ivpu: Fix race condition when mapping dmabuf

Josh Poimboeuf <[email protected]>
objtool: Fix weak symbol detection

Dylan Hatch <[email protected]>

    objtool: Fix standalone --hacks=jump_label

Peng Fan <[email protected]>
remoteproc: imx_rproc: Fix runtime PM cleanup and improve remove path

Mavroudis Chatzilazaridis <[email protected]>
HID: logitech-hidpp: Do not assume FAP in hidpp_send_message_sync()

Cyrille Pitchen <[email protected]>
drm: atmel-hlcdc: fix atmel_xlcdc_plane_setup_scaler()

Marek Vasut <[email protected]>
clk: renesas: cpg-mssr: Read back reset registers to assure values latched

Marek Vasut <[email protected]>
clk: renesas: cpg-mssr: Add missing 1ms delay into reset toggle callback

Biju Das <[email protected]>
pinctrl: renesas: rzg2l: Fix PMC restore

Roberto Sassu <[email protected]>
ima: Attach CREDS_CHECK IMA hook to bprm_creds_from_file LSM hook

Abel Vesa <[email protected]>
pinctrl: qcom: glymur: Fix the gpio and egpio pin functions

Abel Vesa <[email protected]>
pinctrl: qcom: glymur: Drop unnecessary platform data from match table

Ian Rogers <[email protected]>
perf bpf_counter: Fix opening of "any"(-1) CPU events

Seungjin Bae <[email protected]>
USB: Fix descriptor count when handling invalid MBIM extended descriptor

Thomas Weißschuh <[email protected]>
tools/nolibc: handle NULL wstatus argument to waitpid()

Mykyta Yatsenko <[email protected]>
bpf: Fix handling maps with no BTF and non-constant offsets for the bpf_wq

Kumar Kartikeya Dwivedi <[email protected]>
bpf: Fix sleepable context for async callbacks

Siddharth Chintamaneni <[email protected]>
bpf: Cleanup unused func args in rqspinlock implementation

Janusz Krzysztofik <[email protected]>
drm/vgem-fence: Fix potential deadlock on release

Karol Wachowski <[email protected]>
accel/ivpu: Fix DCT active percent format

Jacek Lawrynowicz <[email protected]>
accel/ivpu: Fix page fault in ivpu_bo_unbind_all_bos_from_context()

Jacek Lawrynowicz <[email protected]>
accel/ivpu: Rework bind/unbind of imported buffers

Guido Günther <[email protected]>
drm/panel: visionox-rm69299: Don't clear all mode flags

Guido Günther <[email protected]>
drm/panel: visionox-rm69299: Fix clock frequency for SHIFT6mq

Karol Wachowski <[email protected]>
accel/ivpu: Ensure rpm_runtime_put in case of engine reset/resume fail

Lizhi Hou <[email protected]>
accel/amdxdna: Call dma_buf_vmap_unlocked() for imported object

Lizhi Hou <[email protected]>
accel/amdxdna: Fix an integer overflow in aie2_query_ctx_status_array()

Mainak Sen <[email protected]>
gpu: host1x: Fix race in syncpt alloc/free

Konstantin Andreev <[email protected]>
smack: fix bug: setting task label silently ignores input garbage

Konstantin Andreev <[email protected]>
smack: fix bug: unprivileged task can create labels

Konstantin Andreev <[email protected]>
smack: fix bug: invalid label of unix socket file

Konstantin Andreev <[email protected]>
smack: always "instantiate" inode in smack_inode_init_security()

Konstantin Andreev <[email protected]>
smack: deduplicate xattr setting in smack_inode_init_security()

Konstantin Andreev <[email protected]>
smack: deduplicate "does access rule request transmutation"

Konstantin Andreev <[email protected]>
smack: fix bug: SMACK64TRANSMUTE set on non-directory

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

Diffstat:

 Documentation/admin-guide/LSM/Smack.rst            |  16 +-
 .../devicetree/bindings/pci/amlogic,axg-pcie.yaml  |   6 +-
 Documentation/hwmon/g762.rst                       |   2 +-
 Makefile                                           |   4 +-
 arch/arm/boot/dts/renesas/r8a7793-gose.dts         |   1 -
 .../arm/boot/dts/renesas/r9a06g032-rzn1d400-db.dts |   2 -
 arch/arm/boot/dts/samsung/exynos4210-i9100.dts     |   1 +
 arch/arm/boot/dts/samsung/exynos4210-trats.dts     |   1 +
 .../boot/dts/samsung/exynos4210-universal_c210.dts |   1 +
 arch/arm/boot/dts/samsung/exynos4412-midas.dtsi    |   1 +
 .../dts/st/stm32mp157c-phycore-stm32mp15-som.dtsi  |   8 +-
 arch/arm/boot/dts/ti/omap/am335x-bone-common.dtsi  |   2 +-
 arch/arm/boot/dts/ti/omap/am335x-boneblue.dts      |   2 +-
 arch/arm/boot/dts/ti/omap/am335x-chiliboard.dts    |   2 +-
 arch/arm/boot/dts/ti/omap/am335x-evm.dts           |   2 +-
 arch/arm/boot/dts/ti/omap/am335x-evmsk.dts         |   2 +-
 arch/arm/boot/dts/ti/omap/am335x-guardian.dts      |   2 +-
 arch/arm/boot/dts/ti/omap/am335x-icev2.dts         |   2 +-
 arch/arm/boot/dts/ti/omap/am335x-myirtech-myd.dts  |   2 +-
 .../boot/dts/ti/omap/am335x-netcom-plus-2xx.dts    |   8 +-
 .../arm/boot/dts/ti/omap/am335x-osd3358-sm-red.dts |   2 +-
 arch/arm/boot/dts/ti/omap/am335x-pdu001.dts        |   2 +-
 arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts  |   2 +-
 arch/arm/boot/dts/ti/omap/am335x-sl50.dts          |   2 +-
 arch/arm/boot/dts/ti/omap/omap3-beagle-xm.dts      |   2 +-
 arch/arm/boot/dts/ti/omap/omap3-n900.dts           |   2 +-
 arch/arm/include/asm/word-at-a-time.h              |  10 +-
 arch/arm64/boot/dts/amlogic/meson-g12b.dtsi        |   4 +-
 arch/arm64/boot/dts/exynos/google/gs101.dtsi       |  18 +-
 .../boot/dts/freescale/imx8mm-venice-gw72xx.dtsi   |  11 -
 .../boot/dts/freescale/imx8mp-venice-gw702x.dtsi   |  51 ---
 .../boot/dts/freescale/imx8mp-venice-gw72xx.dtsi   |  11 -
 arch/arm64/boot/dts/freescale/imx95-15x15-evk.dts  |   1 +
 .../arm64/boot/dts/freescale/imx95-tqma9596sa.dtsi |   4 +-
 arch/arm64/boot/dts/mediatek/mt8195.dtsi           |   2 +-
 arch/arm64/boot/dts/nvidia/tegra234.dtsi           |  61 ++++
 arch/arm64/boot/dts/qcom/ipq5424.dtsi              |   2 +-
 arch/arm64/boot/dts/qcom/lemans.dtsi               |   1 +
 arch/arm64/boot/dts/qcom/msm8996.dtsi              |   3 +
 arch/arm64/boot/dts/qcom/qcm2290.dtsi              |  10 +-
 arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts |   2 +
 arch/arm64/boot/dts/qcom/qcm6490-shift-otter.dts   |   5 +
 arch/arm64/boot/dts/qcom/qrb2210-rb1.dts           |   2 +-
 arch/arm64/boot/dts/qcom/sc8280xp.dtsi             | 170 +++++-----
 .../arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi |   4 +-
 .../boot/dts/qcom/sdm845-samsung-starqltechn.dts   |  16 +-
 .../arm64/boot/dts/qcom/sm8250-samsung-common.dtsi |   3 +-
 arch/arm64/boot/dts/qcom/sm8650.dtsi               |   2 +
 arch/arm64/boot/dts/qcom/sm8750-mtp.dts            |   6 +-
 arch/arm64/boot/dts/qcom/x1-dell-thena.dtsi        |   5 +-
 arch/arm64/boot/dts/qcom/x1e80100.dtsi             |  12 +-
 .../boot/dts/renesas/r8a779g3-sparrow-hawk.dts     |   6 +-
 arch/arm64/boot/dts/rockchip/rk3566-rock-3c.dts    |   1 +
 .../boot/dts/rockchip/rk3588-rock-5b-5bp-5t.dtsi   |   4 +-
 .../boot/dts/rockchip/rk3588-rock-5b-plus.dts      |   5 +
 arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts    |   4 +
 arch/arm64/boot/dts/rockchip/rk3588-rock-5t.dts    |   4 +
 arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts   |  15 +-
 arch/arm64/boot/dts/ti/k3-am62p.dtsi               |   2 +-
 arch/arm64/boot/dts/ti/k3-am69-sk.dts              |   8 +-
 .../boot/dts/ti/k3-j784s4-j742s2-evm-common.dtsi   |   4 +-
 arch/arm64/mm/mmu.c                                | 214 +++++++-----
 arch/arm64/mm/pageattr.c                           |   5 +-
 arch/powerpc/kernel/entry_32.S                     |  10 +-
 arch/powerpc/kexec/ranges.c                        |   2 +-
 arch/powerpc/mm/book3s64/hash_utils.c              |  10 +-
 arch/powerpc/mm/ptdump/hashpagetable.c             |   6 +
 arch/riscv/kvm/vcpu_insn.c                         |  22 ++
 arch/s390/include/asm/fpu-insn.h                   |   3 +
 arch/s390/kernel/smp.c                             |   1 +
 arch/um/Kconfig                                    |   1 +
 arch/um/Makefile                                   |  12 +-
 arch/um/include/asm/kasan.h                        |   4 -
 arch/x86/boot/compressed/pgtable_64.c              |  11 +-
 arch/x86/events/core.c                             |   5 +-
 arch/x86/events/intel/core.c                       |   7 +-
 arch/x86/events/intel/cstate.c                     |   3 +-
 arch/x86/kernel/dumpstack.c                        |  23 +-
 block/blk-lib.c                                    |   6 +-
 block/blk-mq.c                                     |  35 +-
 block/blk-throttle.c                               |   9 +-
 block/mq-deadline.c                                | 129 ++++---
 crypto/aead.c                                      |   1 +
 crypto/ahash.c                                     |  18 +-
 crypto/asymmetric_keys/asymmetric_type.c           |  12 +-
 crypto/authenc.c                                   |  75 +++--
 drivers/accel/amdxdna/aie2_ctx.c                   |  22 +-
 drivers/accel/amdxdna/aie2_pci.c                   |  10 +-
 drivers/accel/amdxdna/amdxdna_ctx.c                |   1 +
 drivers/accel/amdxdna/amdxdna_ctx.h                |   1 +
 drivers/accel/amdxdna/amdxdna_gem.c                |  47 ++-
 drivers/accel/amdxdna/amdxdna_mailbox.c            |   1 +
 drivers/accel/ivpu/ivpu_gem.c                      |  97 ++++--
 drivers/accel/ivpu/ivpu_gem.h                      |   2 +-
 drivers/accel/ivpu/ivpu_hw_btrs.c                  |   2 +-
 drivers/accel/ivpu/ivpu_hw_btrs.h                  |   2 +-
 drivers/accel/ivpu/ivpu_job.c                      |   6 +-
 drivers/accel/ivpu/ivpu_pm.c                       |   9 +-
 drivers/acpi/apei/ghes.c                           |  27 +-
 drivers/acpi/processor_core.c                      |   2 +-
 drivers/acpi/property.c                            |   1 +
 drivers/base/firmware_loader/Kconfig               |   2 +-
 drivers/block/nbd.c                                |   5 +-
 drivers/block/ps3disk.c                            |   4 +
 drivers/block/ublk_drv.c                           |   4 +-
 drivers/char/random.c                              |  19 +-
 drivers/clk/Makefile                               |   3 +-
 drivers/clk/qcom/camcc-sm6350.c                    |  13 +-
 drivers/clk/qcom/camcc-sm7150.c                    |   6 +-
 drivers/clk/qcom/camcc-sm8550.c                    |  10 +
 drivers/clk/qcom/clk-rpmh.c                        |   1 +
 drivers/clk/qcom/gcc-glymur.c                      |  24 +-
 drivers/clk/qcom/gcc-ipq5424.c                     |   3 +-
 drivers/clk/qcom/gcc-qcs615.c                      |   6 +-
 drivers/clk/qcom/gcc-sm8750.c                      |   1 +
 drivers/clk/qcom/tcsrcc-glymur.c                   |  54 +--
 drivers/clk/renesas/r9a06g032-clocks.c             |   6 +-
 drivers/clk/renesas/r9a09g077-cpg.c                |   4 +-
 drivers/clk/renesas/renesas-cpg-mssr.c             |  57 ++--
 drivers/clk/spacemit/ccu-k1.c                      |   4 +-
 drivers/clocksource/arm_arch_timer_mmio.c          |   2 +
 drivers/clocksource/timer-nxp-pit.c                |   3 +-
 drivers/clocksource/timer-nxp-stm.c                |  23 +-
 drivers/clocksource/timer-ralink.c                 |  11 +-
 drivers/cpufreq/amd-pstate.c                       |   2 +-
 drivers/crypto/ccree/cc_buffer_mgr.c               |   6 +-
 drivers/crypto/hisilicon/qm.c                      |  14 +-
 drivers/crypto/intel/iaa/iaa_crypto_main.c         |   2 +-
 drivers/crypto/starfive/jh7110-hash.c              |   6 +-
 drivers/devfreq/hisi_uncore_freq.c                 |   3 +-
 drivers/firmware/efi/cper-arm.c                    |  52 ++-
 drivers/firmware/efi/cper.c                        |  60 ++++
 drivers/firmware/efi/libstub/x86-5lvl.c            |   4 +-
 drivers/firmware/imx/imx-scu-irq.c                 |   4 +-
 drivers/firmware/stratix10-svc.c                   |   1 +
 drivers/firmware/ti_sci.c                          |  21 +-
 drivers/firmware/ti_sci.h                          |   2 +
 drivers/gpio/Kconfig                               |   1 -
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.h         |   1 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c          |  44 ++-
 drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h          |  12 +-
 drivers/gpu/drm/amd/amdgpu/mes_userqueue.c         |  31 +-
 drivers/gpu/drm/amd/amdkfd/kfd_svm.c               |  46 ++-
 drivers/gpu/drm/amd/amdkfd/kfd_topology.c          |   4 +-
 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c |   8 +-
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c    |  27 +-
 drivers/gpu/drm/drm_plane.c                        |   8 +-
 drivers/gpu/drm/i915/display/intel_fbdev.c         |  43 ++-
 drivers/gpu/drm/i915/display/intel_fbdev_fb.c      |  42 +--
 drivers/gpu/drm/i915/display/intel_fbdev_fb.h      |   8 +-
 drivers/gpu/drm/imagination/pvr_device.c           |   2 +-
 drivers/gpu/drm/mediatek/mtk_disp_ccorr.c          |  23 +-
 drivers/gpu/drm/msm/adreno/a2xx_gpu.c              |   2 +-
 drivers/gpu/drm/msm/adreno/a6xx_gmu.c              |  34 +-
 drivers/gpu/drm/msm/adreno/a6xx_gpu.c              |  10 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.h         |   6 -
 drivers/gpu/drm/msm/msm_gpu.c                      |  21 +-
 .../gpu/drm/nouveau/dispnv04/nouveau_i2c_encoder.c |  20 --
 .../drm/nouveau/include/dispnv04/i2c/encoder_i2c.h |  19 +-
 drivers/gpu/drm/nouveau/nouveau_fence.c            |   6 +-
 drivers/gpu/drm/nouveau/nvkm/subdev/fb/base.c      |   2 +-
 drivers/gpu/drm/nova/Kconfig                       |   1 +
 drivers/gpu/drm/panel/panel-novatek-nt35560.c      |   8 +-
 drivers/gpu/drm/panel/panel-visionox-rm69299.c     |   4 +-
 drivers/gpu/drm/panthor/panthor_device.c           |   4 +-
 drivers/gpu/drm/panthor/panthor_gem.c              |  20 +-
 drivers/gpu/drm/panthor/panthor_mmu.c              |  18 +-
 drivers/gpu/drm/panthor/panthor_sched.c            |  25 +-
 .../gpu/drm/renesas/rcar-du/rcar_mipi_dsi_regs.h   |   4 +-
 drivers/gpu/drm/tidss/tidss_dispc.c                |  93 +++--
 drivers/gpu/drm/tidss/tidss_dispc.h                |   3 -
 drivers/gpu/drm/tidss/tidss_drv.h                  |   2 +
 drivers/gpu/drm/tidss/tidss_oldi.c                 |  22 ++
 drivers/gpu/drm/vgem/vgem_fence.c                  |   2 +-
 drivers/gpu/drm/xe/display/intel_fbdev_fb.c        |  32 +-
 drivers/gpu/drm/xe/xe_exec_queue.c                 |   3 +
 drivers/gpu/host1x/syncpt.c                        |   4 +-
 drivers/gpu/nova-core/firmware/gsp.rs              |   8 +-
 drivers/greybus/gb-beagleplay.c                    |  12 +-
 drivers/hid/hid-logitech-hidpp.c                   |   9 +-
 drivers/hv/mshv_root_main.c                        |  89 +++--
 drivers/hwmon/sy7636a-hwmon.c                      |   7 +-
 drivers/hwtracing/coresight/coresight-etm-perf.c   |   1 +
 drivers/hwtracing/coresight/coresight-etm3x-core.c |  59 ++--
 drivers/hwtracing/coresight/coresight-etm4x-core.c | 103 ++++--
 drivers/hwtracing/coresight/coresight-etm4x.h      |   3 -
 drivers/hwtracing/coresight/coresight-tmc-etr.c    |  10 +-
 drivers/i2c/busses/i2c-k1.c                        |  19 +-
 drivers/i3c/master.c                               |   8 +-
 drivers/i3c/master/svc-i3c-master.c                |  22 +-
 drivers/iio/imu/bmi270/bmi270_spi.c                |   2 +-
 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h            |   2 +-
 drivers/iio/industrialio-core.c                    |  17 +-
 drivers/infiniband/hw/bnxt_re/ib_verbs.c           |   8 +-
 drivers/infiniband/hw/bnxt_re/qplib_sp.c           |   8 +-
 drivers/infiniband/hw/bnxt_re/qplib_sp.h           |   2 +-
 drivers/infiniband/hw/irdma/cm.c                   |   2 +-
 drivers/infiniband/hw/irdma/ctrl.c                 |   6 +-
 drivers/infiniband/hw/irdma/icrdma_if.c            |   6 +-
 drivers/infiniband/hw/irdma/ig3rdma_if.c           |   4 +
 drivers/infiniband/hw/irdma/main.h                 |   2 +-
 drivers/infiniband/hw/irdma/pble.c                 |   6 +-
 drivers/infiniband/hw/irdma/puda.c                 |   1 -
 drivers/infiniband/hw/irdma/uk.c                   |  31 +-
 drivers/infiniband/hw/irdma/user.h                 |   1 -
 drivers/infiniband/hw/irdma/verbs.c                |  24 +-
 drivers/infiniband/hw/irdma/verbs.h                |   3 +-
 drivers/infiniband/sw/rxe/rxe_srq.c                |   7 +-
 drivers/infiniband/ulp/rtrs/rtrs-srv.c             |   2 +-
 drivers/interconnect/debugfs-client.c              |   7 +-
 drivers/interconnect/qcom/msm8996.c                |   1 +
 drivers/iommu/amd/debugfs.c                        |   2 +-
 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c        |   2 +-
 drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c         |  27 +-
 drivers/iommu/intel/Kconfig                        |   2 +-
 drivers/iommu/intel/iommu.h                        |   2 +-
 drivers/irqchip/irq-bcm2712-mip.c                  |  11 +-
 drivers/irqchip/irq-bcm7038-l1.c                   |  11 +-
 drivers/irqchip/irq-bcm7120-l2.c                   |  31 +-
 drivers/irqchip/irq-brcmstb-l2.c                   |  25 +-
 drivers/irqchip/irq-imx-mu-msi.c                   |  28 +-
 drivers/irqchip/irq-mchp-eic.c                     |   7 +-
 drivers/irqchip/irq-meson-gpio.c                   |   5 +-
 drivers/irqchip/irq-qcom-mpm.c                     |   6 +-
 drivers/irqchip/irq-renesas-rzg2l.c                |  37 +-
 drivers/irqchip/irq-renesas-rzv2h.c                |  32 +-
 drivers/irqchip/irq-starfive-jh8100-intc.c         |   6 +-
 drivers/irqchip/irqchip.c                          |  10 +-
 drivers/irqchip/qcom-irq-combiner.c                |   2 +-
 drivers/irqchip/qcom-pdc.c                         |   5 +-
 drivers/leds/leds-netxbig.c                        |  36 +-
 drivers/leds/leds-upboard.c                        |   2 +-
 drivers/leds/rgb/leds-qcom-lpg.c                   |   4 +-
 drivers/macintosh/mac_hid.c                        |   3 +-
 drivers/md/dm-log-writes.c                         |   1 +
 drivers/md/dm-raid.c                               |   2 +
 drivers/md/md.c                                    |  92 ++---
 drivers/md/md.h                                    |   9 +-
 drivers/md/raid5.c                                 |   6 +-
 drivers/mfd/da9055-core.c                          |   1 +
 drivers/mfd/mt6358-irq.c                           |   1 +
 drivers/mfd/mt6397-irq.c                           |   1 +
 drivers/misc/rp1/rp1_pci.c                         |   3 +
 drivers/mtd/lpddr/lpddr_cmds.c                     |   8 +-
 drivers/mtd/nand/raw/lpc32xx_slc.c                 |   2 +
 drivers/mtd/nand/raw/marvell_nand.c                |  13 +-
 drivers/mtd/nand/raw/nand_base.c                   |  13 +-
 drivers/mtd/nand/raw/renesas-nand-controller.c     |   5 +-
 drivers/net/dsa/b53/b53_common.c                   | 331 ++++++++++++------
 drivers/net/dsa/b53/b53_priv.h                     | 111 +++++-
 drivers/net/dsa/b53/b53_regs.h                     |  41 ++-
 drivers/net/dsa/xrs700x/xrs700x.c                  |  11 +
 drivers/net/ethernet/intel/iavf/iavf_ptp.c         |   7 +
 drivers/net/ethernet/intel/ice/devlink/devlink.c   |  21 +-
 drivers/net/ethernet/intel/ice/ice.h               |   4 +
 drivers/net/ethernet/intel/ice/ice_common.c        |   3 +
 drivers/net/ethernet/intel/ice/ice_main.c          | 169 +++++-----
 drivers/net/ethernet/stmicro/stmmac/dwmac-sophgo.c |  20 +-
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c  |   2 +-
 drivers/net/ethernet/stmicro/stmmac/stmmac_vlan.c  |   3 +-
 drivers/net/phy/adin1100.c                         |   2 +-
 drivers/net/phy/aquantia/aquantia_firmware.c       |   2 +-
 drivers/net/phy/mscc/mscc_main.c                   |   6 +-
 drivers/net/phy/phy-core.c                         |  43 +++
 drivers/net/phy/realtek/realtek_main.c             |  65 ++--
 drivers/net/vxlan/vxlan_core.c                     |  18 +-
 drivers/net/wireless/ath/ath10k/core.c             |  20 +-
 drivers/net/wireless/ath/ath10k/core.h             |   2 +-
 drivers/net/wireless/ath/ath10k/mac.c              |   2 +-
 drivers/net/wireless/ath/ath11k/mac.c              |   8 +-
 drivers/net/wireless/ath/ath11k/pci.c              |  20 +-
 drivers/net/wireless/ath/ath11k/wmi.c              |  20 +-
 drivers/net/wireless/ath/ath11k/wmi.h              |   2 +
 drivers/net/wireless/ath/ath12k/core.c             |  24 +-
 drivers/net/wireless/ath/ath12k/core.h             |   1 -
 drivers/net/wireless/ath/ath12k/dp_rx.c            |  70 +++-
 drivers/net/wireless/ath/ath12k/hal_rx.c           |  10 +-
 drivers/net/wireless/ath/ath12k/mac.c              |  28 +-
 drivers/net/wireless/ath/ath12k/pci.c              |  20 +-
 drivers/net/wireless/ath/ath12k/qmi.c              |  11 +-
 drivers/net/wireless/ath/ath12k/qmi.h              |   5 +-
 drivers/net/wireless/ath/ath12k/wmi.c              |  23 +-
 drivers/net/wireless/ath/ath12k/wmi.h              |   2 +
 drivers/net/wireless/ath/ath12k/wow.c              |   1 +
 drivers/net/wireless/intel/iwlwifi/mld/d3.c        |   4 +
 drivers/net/wireless/mediatek/mt76/mac80211.c      |   2 -
 drivers/net/wireless/mediatek/mt76/mt76.h          |   9 +
 drivers/net/wireless/mediatek/mt76/mt7615/mcu.c    |   4 +-
 drivers/net/wireless/mediatek/mt76/mt7915/mac.c    |   2 +
 drivers/net/wireless/mediatek/mt76/mt792x_core.c   |   1 -
 drivers/net/wireless/mediatek/mt76/mt7996/dma.c    |  15 +-
 drivers/net/wireless/mediatek/mt76/mt7996/init.c   |  19 +-
 drivers/net/wireless/mediatek/mt76/mt7996/mac.c    |  18 +-
 drivers/net/wireless/mediatek/mt76/mt7996/main.c   | 115 ++++---
 drivers/net/wireless/mediatek/mt76/mt7996/mcu.c    |  69 ++--
 drivers/net/wireless/mediatek/mt76/mt7996/mmio.c   |   1 +
 drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h |  11 +-
 drivers/net/wireless/mediatek/mt76/wed.c           |  10 +-
 drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c |   9 +-
 drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c |  27 +-
 drivers/net/wireless/realtek/rtw89/usb.c           |  13 +-
 drivers/net/wireless/st/cw1200/bh.c                |   6 +-
 drivers/nvme/host/auth.c                           |   2 +-
 drivers/of/fdt.c                                   |  85 +++--
 drivers/of/of_kunit_helpers.c                      |   5 +-
 drivers/pci/controller/Kconfig                     |   7 +-
 drivers/pci/controller/cadence/pcie-sg2042.c       |   3 -
 drivers/pci/controller/dwc/pci-keystone.c          |   2 +
 drivers/pci/controller/dwc/pcie-designware.h       |   2 +-
 drivers/pci/controller/dwc/pcie-stm32-ep.c         |  41 +--
 drivers/pci/endpoint/functions/pci-epf-test.c      |   5 +-
 drivers/pci/setup-bus.c                            |   5 +
 drivers/phy/freescale/phy-fsl-imx8qm-hsio.c        |   5 +-
 drivers/phy/renesas/phy-rcar-gen3-usb2.c           |  20 +-
 drivers/phy/rockchip/phy-rockchip-naneng-combphy.c |  15 +
 drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c  |  27 +-
 drivers/pinctrl/pinctrl-single.c                   |   7 +-
 drivers/pinctrl/qcom/pinctrl-glymur.c              |   6 +-
 drivers/pinctrl/renesas/pinctrl-rzg2l.c            |   6 +-
 drivers/pinctrl/stm32/pinctrl-stm32.c              |   2 +-
 drivers/platform/x86/asus-wmi.c                    |   8 +-
 drivers/platform/x86/intel/pmc/core.h              |   2 +-
 drivers/power/supply/apm_power.c                   |   3 +-
 drivers/power/supply/cw2015_battery.c              |   8 +-
 drivers/power/supply/max17040_battery.c            |   6 +-
 drivers/power/supply/qcom_battmgr.c                |  26 +-
 drivers/power/supply/rt5033_charger.c              |   2 +
 drivers/power/supply/rt9467-charger.c              |   6 +-
 drivers/power/supply/wm831x_power.c                |  10 +-
 drivers/pwm/core.c                                 |   5 +-
 drivers/pwm/pwm-bcm2835.c                          |  28 +-
 drivers/ras/ras.c                                  |  40 ++-
 drivers/regulator/core.c                           |  37 +-
 drivers/regulator/fixed.c                          |  11 +-
 drivers/regulator/pca9450-regulator.c              |   7 +-
 drivers/regulator/spacemit-p1.c                    |   4 +-
 drivers/remoteproc/imx_rproc.c                     |   9 +-
 drivers/remoteproc/qcom_q6v5_wcss.c                |   8 +-
 drivers/rtc/rtc-amlogic-a4.c                       |   4 -
 drivers/rtc/rtc-gamecube.c                         |   4 +
 drivers/rtc/rtc-max31335.c                         |   6 +-
 drivers/s390/crypto/ap_bus.c                       |   8 +-
 drivers/scsi/imm.c                                 |   1 +
 drivers/scsi/qla2xxx/qla_nvme.c                    |   2 +-
 drivers/scsi/qla2xxx/qla_os.c                      |  20 +-
 drivers/scsi/qla2xxx/qla_target.c                  |   5 +-
 drivers/scsi/qla2xxx/qla_target.h                  |   1 +
 drivers/scsi/sim710.c                              |   2 +
 drivers/scsi/smartpqi/smartpqi_init.c              |  19 ++
 drivers/scsi/stex.c                                |   1 +
 drivers/soc/qcom/qcom_gsbi.c                       |   8 -
 drivers/soc/qcom/smem.c                            |   3 +-
 drivers/soc/renesas/r9a08g045-sysc.c               |  69 ++++
 drivers/soc/renesas/r9a09g047-sys.c                |  79 +++++
 drivers/soc/renesas/r9a09g056-sys.c                |  69 ++++
 drivers/soc/renesas/r9a09g057-sys.c                | 101 ++++++
 drivers/soc/renesas/rz-sysc.c                      |   2 +
 drivers/soc/renesas/rz-sysc.h                      |   4 +
 drivers/soc/samsung/exynos-pmu.c                   |   7 +-
 drivers/soc/tegra/fuse/speedo-tegra210.c           |  58 +++-
 drivers/spi/spi-airoha-snfi.c                      |  25 +-
 drivers/spi/spi-ch341.c                            |   2 +-
 drivers/spi/spi-sg2044-nor.c                       |   4 +-
 drivers/spi/spi-tegra210-quad.c                    |  22 +-
 drivers/staging/fbtft/fbtft-core.c                 |   4 +-
 drivers/staging/most/Kconfig                       |   2 -
 drivers/staging/most/Makefile                      |   1 -
 drivers/staging/most/i2c/Kconfig                   |  13 -
 drivers/staging/most/i2c/Makefile                  |   4 -
 drivers/staging/most/i2c/i2c.c                     | 374 ---------------------
 drivers/target/target_core_configfs.c              |   1 -
 drivers/target/target_core_stat.c                  |  24 +-
 drivers/tty/serial/imx.c                           |  14 +
 drivers/ufs/core/ufshcd-priv.h                     |   2 +
 drivers/ufs/core/ufshcd.c                          |  27 +-
 drivers/ufs/host/ufs-rockchip.c                    |  19 +-
 drivers/uio/uio_fsl_elbc_gpcm.c                    |   7 +
 drivers/usb/core/message.c                         |   2 +-
 drivers/usb/dwc2/platform.c                        |  17 +-
 drivers/usb/dwc3/host.c                            |   5 +-
 drivers/usb/gadget/legacy/raw_gadget.c             |   3 +
 drivers/usb/gadget/udc/tegra-xudc.c                |   6 -
 drivers/usb/misc/chaoskey.c                        |  16 +-
 drivers/usb/phy/phy.c                              |   4 +
 drivers/usb/typec/ucsi/ucsi_huawei_gaokun.c        |   2 +
 drivers/vdpa/mlx5/net/mlx5_vnet.c                  |   2 +-
 drivers/vdpa/pds/vdpa_dev.c                        |   2 +-
 drivers/vfio/pci/vfio_pci_core.c                   |  68 ++--
 drivers/vfio/pci/vfio_pci_intrs.c                  |  52 +--
 drivers/vfio/pci/vfio_pci_priv.h                   |   4 +
 drivers/vhost/net.c                                |  12 +-
 drivers/vhost/vhost.c                              |   4 +-
 drivers/video/backlight/led_bl.c                   |  13 +
 drivers/video/fbdev/ssd1307fb.c                    |   4 +-
 drivers/virtio/virtio.c                            |  12 +-
 drivers/virtio/virtio_debug.c                      |  10 +-
 drivers/virtio/virtio_pci_modern_dev.c             |   6 +-
 drivers/virtio/virtio_ring.c                       |   7 +-
 drivers/virtio/virtio_vdpa.c                       |   2 +-
 drivers/watchdog/starfive-wdt.c                    |   4 +-
 drivers/watchdog/wdat_wdt.c                        |  64 ++--
 fs/9p/v9fs.c                                       |   4 +-
 fs/9p/vfs_file.c                                   |  11 +-
 fs/9p/vfs_inode.c                                  |   3 +-
 fs/9p/vfs_inode_dotl.c                             |   2 +-
 fs/btrfs/block-group.c                             |   6 +-
 fs/btrfs/ctree.c                                   |   2 +-
 fs/btrfs/delayed-ref.c                             |  43 ++-
 fs/btrfs/scrub.c                                   |   2 +-
 fs/btrfs/space-info.c                              |  22 +-
 fs/btrfs/space-info.h                              |   6 +-
 fs/erofs/super.c                                   |  38 ++-
 fs/exfat/balloc.c                                  |   2 +-
 fs/exfat/namei.c                                   |  20 +-
 fs/ext4/mballoc.c                                  |  49 ++-
 fs/ext4/move_extent.c                              |   2 +-
 fs/f2fs/f2fs.h                                     |   2 +
 fs/f2fs/gc.c                                       | 132 +++++---
 fs/f2fs/recovery.c                                 |   2 +-
 fs/f2fs/segment.c                                  |  38 ++-
 fs/f2fs/segment.h                                  |   8 +-
 fs/f2fs/super.c                                    |  14 +
 fs/f2fs/sysfs.c                                    |   7 +
 fs/fuse/control.c                                  |  19 +-
 fs/gfs2/glock.c                                    |   5 +-
 fs/gfs2/inode.c                                    |  15 +
 fs/gfs2/inode.h                                    |   1 +
 fs/gfs2/ops_fstype.c                               |   2 +-
 fs/hfs/catalog.c                                   |   2 +-
 fs/inode.c                                         |  58 ++--
 fs/iomap/direct-io.c                               |  23 +-
 fs/kernfs/dir.c                                    |   5 +-
 fs/nfs/client.c                                    |  21 +-
 fs/nfs/dir.c                                       |  27 +-
 fs/nfs/internal.h                                  |   3 +-
 fs/nfs/localio.c                                   |   4 +-
 fs/nfs/namespace.c                                 |  11 +-
 fs/nfs/nfs4client.c                                |  18 +-
 fs/nfs/nfs4proc.c                                  |  27 +-
 fs/nfs/pnfs.c                                      |   1 +
 fs/nfs/super.c                                     |  33 +-
 fs/nfsd/blocklayout.c                              |   4 +-
 fs/nls/nls_base.c                                  |  27 +-
 fs/ntfs3/frecord.c                                 |   8 +-
 fs/ntfs3/fsntfs.c                                  |   9 +-
 fs/ntfs3/inode.c                                   |   7 +-
 fs/ocfs2/alloc.c                                   |   1 -
 fs/ocfs2/inode.c                                   |  10 +-
 fs/ocfs2/move_extents.c                            |   8 +-
 fs/pidfs.c                                         |   2 +
 fs/smb/client/cifssmb.c                            |   2 +-
 fs/smb/client/smb2pdu.c                            |   2 +-
 fs/smb/client/smbdirect.c                          |  28 +-
 fs/smb/common/smbdirect/smbdirect_socket.h         |  51 +++
 fs/smb/server/transport_rdma.c                     |  40 ++-
 fs/tracefs/event_inode.c                           |   3 +-
 include/asm-generic/mshyperv.h                     |  17 +-
 include/asm-generic/rqspinlock.h                   |  60 ++--
 include/linux/blk_types.h                          |   5 +-
 include/linux/cleanup.h                            |  15 +-
 include/linux/coresight.h                          |  35 +-
 include/linux/cper.h                               |  12 +-
 include/linux/f2fs_fs.h                            |   5 +-
 include/linux/filter.h                             |  12 +-
 include/linux/firmware/qcom/qcom_tzmem.h           |  15 +-
 include/linux/ieee80211.h                          |   4 +-
 include/linux/if_hsr.h                             |   9 +
 include/linux/irq-entry-common.h                   |   2 +-
 include/linux/irqchip.h                            |   8 +-
 include/linux/netdevice.h                          |   1 +
 include/linux/nfs_fs_sb.h                          |   5 +
 include/linux/ns_common.h                          |  11 +
 include/linux/of_fdt.h                             |   9 +
 include/linux/phy.h                                |   3 +
 include/linux/platform_data/lp855x.h               |   4 +-
 include/linux/ras.h                                |  16 +-
 include/linux/soc/mediatek/mtk_wed.h               |   1 +
 include/linux/vfio_pci_core.h                      |  10 +-
 include/linux/virtio.h                             |   2 +-
 include/linux/virtio_config.h                      |  24 +-
 include/linux/virtio_features.h                    |  29 +-
 include/linux/virtio_pci_modern.h                  |   8 +-
 include/net/netfilter/nf_conntrack_count.h         |  15 +-
 include/ras/ras_event.h                            |  49 ++-
 include/sound/tas2781.h                            |   2 +-
 include/target/target_core_base.h                  |  12 +-
 include/uapi/linux/pidfd.h                         |   1 +
 include/uapi/sound/asound.h                        |   2 +-
 include/ufs/ufshcd.h                               |   1 -
 io_uring/io_uring.c                                |  10 +-
 io_uring/kbuf.c                                    |  10 +-
 io_uring/zcrx.c                                    |  16 +-
 kernel/bpf/hashtab.c                               |  10 +-
 kernel/bpf/helpers.c                               |   3 +
 kernel/bpf/rqspinlock.c                            |  36 +-
 kernel/bpf/stackmap.c                              |  62 ++--
 kernel/bpf/syscall.c                               |   6 +-
 kernel/bpf/trampoline.c                            |   4 +-
 kernel/bpf/verifier.c                              |  89 +++--
 kernel/cgroup/cpuset.c                             |  35 +-
 kernel/cgroup/namespace.c                          |   2 +-
 kernel/cpu.c                                       |  25 +-
 kernel/dma/pool.c                                  |   2 +-
 kernel/events/core.c                               |  22 +-
 kernel/locking/locktorture.c                       |   8 +-
 kernel/resource.c                                  |  10 +-
 kernel/sched/fair.c                                |  17 +-
 kernel/sched/stats.h                               |   7 +-
 kernel/task_work.c                                 |   8 +-
 kernel/time/timer_migration.c                      | 264 ++++++++-------
 lib/vsprintf.c                                     |   6 +-
 net/bpf/test_run.c                                 |   5 +
 net/core/dev.h                                     |   1 -
 net/core/filter.c                                  |  16 +-
 net/core/netpoll.c                                 |   2 +-
 net/hsr/hsr_device.c                               |  20 ++
 net/hsr/hsr_slave.c                                |   7 +-
 net/ipv6/ip6_fib.c                                 |   4 +
 net/mac80211/aes_cmac.c                            |  63 +++-
 net/mac80211/aes_cmac.h                            |   8 +-
 net/mac80211/wpa.c                                 |  20 +-
 net/netfilter/nf_conncount.c                       | 195 +++++++----
 net/netfilter/nft_connlimit.c                      |  34 +-
 net/netfilter/nft_flow_offload.c                   |   9 +-
 net/netfilter/xt_connlimit.c                       |  14 +-
 net/openvswitch/conntrack.c                        |  16 +-
 net/sched/sch_cake.c                               |  60 ++--
 net/sctp/socket.c                                  |   5 +-
 scripts/cc-can-link.sh                             |   2 +-
 scripts/lib/kdoc/kdoc_parser.py                    |  16 +-
 scripts/package/install-extmod-build               |   2 +-
 security/integrity/ima/ima_main.c                  |  40 ++-
 security/integrity/ima/ima_policy.c                |   2 +-
 security/landlock/errata/abi-1.h                   |  16 +
 security/landlock/fs.c                             |  40 ++-
 security/smack/smack.h                             |   3 +
 security/smack/smack_access.c                      |  93 +++--
 security/smack/smack_lsm.c                         | 277 ++++++++++-----
 sound/firewire/dice/dice-extension.c               |   4 +-
 sound/firewire/motu/motu-hwdep.c                   |   7 +-
 sound/hda/codecs/realtek/alc269.c                  |   2 +
 sound/hda/codecs/side-codecs/cs35l41_hda.c         |   2 +
 sound/hda/codecs/side-codecs/tas2781_hda_i2c.c     |  44 +--
 sound/isa/wavefront/wavefront_midi.c               |   2 +
 sound/isa/wavefront/wavefront_synth.c              |   4 +-
 sound/soc/amd/acp/acp-i2s.c                        |   2 +
 sound/soc/amd/acp/acp-legacy-common.c              |  30 +-
 sound/soc/bcm/bcm63xx-pcm-whistler.c               |   4 +-
 sound/soc/codecs/Kconfig                           |   5 +
 sound/soc/codecs/Makefile                          |   2 +
 sound/soc/codecs/ak4458.c                          |  10 +-
 sound/soc/codecs/ak5558.c                          |  10 +-
 sound/soc/codecs/nau8325.c                         |   3 +-
 sound/soc/codecs/tas2781-comlib-i2c.c              |   2 +-
 sound/soc/codecs/tas2781-i2c.c                     |   2 +-
 sound/soc/fsl/fsl_xcvr.c                           |   2 +-
 sound/soc/intel/catpt/pcm.c                        |   4 +-
 sound/soc/sdca/sdca_functions.c                    |   2 +-
 tools/bpf/bpftool/sign.c                           |   6 +
 tools/include/nolibc/arch-x86.h                    |   6 +-
 tools/include/nolibc/dirent.h                      |   6 +-
 tools/include/nolibc/stdio.h                       |   4 +
 tools/include/nolibc/sys/wait.h                    |  18 +-
 tools/lib/bpf/btf.c                                |   4 +-
 tools/objtool/check.c                              |   3 +-
 tools/objtool/elf.c                                |   8 +-
 tools/perf/builtin-kvm.c                           |   2 +-
 tools/perf/builtin-record.c                        |   2 +-
 tools/perf/builtin-stat.c                          |  15 +-
 .../pmu-events/arch/s390/cf_z16/transaction.json   |   8 +-
 .../pmu-events/arch/s390/cf_z17/transaction.json   |   8 +-
 tools/perf/util/annotate.c                         |   2 +-
 .../util/arm-spe-decoder/arm-spe-pkt-decoder.c     |  25 +-
 .../util/arm-spe-decoder/arm-spe-pkt-decoder.h     |  15 +-
 tools/perf/util/bpf_counter.c                      |   7 +-
 tools/perf/util/bpf_lock_contention.c              |   6 +-
 tools/perf/util/evsel.c                            |   2 +-
 tools/perf/util/genelf.c                           |  32 +-
 tools/perf/util/hist.c                             |   6 +-
 tools/perf/util/hist.h                             |   8 +-
 tools/perf/util/hwmon_pmu.c                        |   3 +-
 tools/perf/util/parse-events.c                     |  44 ++-
 tools/perf/util/parse-events.h                     |   3 +-
 tools/perf/util/parse-events.y                     |   2 +-
 tools/perf/util/symbol.c                           |   5 +-
 tools/power/x86/turbostat/turbostat.c              |  12 +-
 tools/testing/selftests/bpf/.gitignore             |   1 +
 tools/testing/selftests/bpf/Makefile               |   6 +-
 .../selftests/bpf/prog_tests/kmem_cache_iter.c     |   3 +-
 .../selftests/bpf/prog_tests/perf_branches.c       |  22 +-
 .../testing/selftests/bpf/prog_tests/send_signal.c |   5 +
 .../selftests/bpf/progs/test_perf_branches.c       |   3 +
 tools/testing/selftests/bpf/test_tag.c             |   2 +-
 .../drivers/net/bonding/bond_macvlan_ipvlan.sh     |   1 +
 tools/testing/selftests/landlock/Makefile          |   2 +-
 .../tcp_syscall_bad_arg_sendmsg-empty-iov.pkt      |   4 +
 .../net/packetdrill/tcp_zerocopy_basic.pkt         |   2 +
 .../net/packetdrill/tcp_zerocopy_batch.pkt         |   2 +
 .../net/packetdrill/tcp_zerocopy_client.pkt        |   2 +
 .../net/packetdrill/tcp_zerocopy_closed.pkt        |   2 +
 .../net/packetdrill/tcp_zerocopy_epoll_edge.pkt    |   3 +
 .../packetdrill/tcp_zerocopy_epoll_exclusive.pkt   |   3 +
 .../net/packetdrill/tcp_zerocopy_epoll_oneshot.pkt |   3 +
 .../packetdrill/tcp_zerocopy_fastopen-client.pkt   |   2 +
 .../packetdrill/tcp_zerocopy_fastopen-server.pkt   |   2 +
 .../net/packetdrill/tcp_zerocopy_maxfrags.pkt      |   2 +
 .../net/packetdrill/tcp_zerocopy_small.pkt         |   2 +
 tools/tracing/rtla/Makefile.rtla                   |   2 +-
 tools/tracing/rtla/src/common.c                    |  24 +-
 tools/tracing/rtla/src/osnoise_hist.c              |   3 +-
 tools/tracing/rtla/src/osnoise_top.c               |   3 +-
 tools/tracing/rtla/src/timerlat.c                  |   3 +-
 tools/tracing/rtla/src/timerlat_hist.c             |   3 +-
 tools/tracing/rtla/src/timerlat_top.c              |   3 +-
 tools/tracing/rtla/tests/osnoise.t                 |   6 +-
 tools/tracing/rtla/tests/timerlat.t                |   4 +-
 616 files changed, 6319 insertions(+), 3850 deletions(-)
Signature · 2 lines
software engineer
rajagiri school of engineering and technology
Tested-by on the v1 series
#643 lore raw
In reply to Greg Kroah-Hartman

Hi Greg

Quoted 10 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 6.18.2 release. There are 614 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Thu, 18 Dec 2025 11:12:22 +0000. Anything received after that time might be too late.

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

Quoted 9 lines
        https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.18.2-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-6.18.y
and the diffstat can be found below.

thanks,

greg k-h

6.18.2-rc1 tested.

Build successfully completed.
Boot successfully completed.
No dmesg regressions.
Video output normal.
Sound output normal.

Lenovo ThinkPad X1 Carbon Gen10(Intel i7-1260P(x86_64) arch linux)

[    0.000000] Linux version 6.18.2-rc1rv-g103c79e44ce7

(takeshi@ThinkPadX1Gen10J0764) (gcc (GCC) 15.2.1 20251112, GNU ld (GNU Binutils) 2.45.1) #1 SMP PREEMPT_DYNAMIC Wed Dec 17 19:51:45 JST 2025

Thanks

Tested-by on the v1 series
#644 lore raw
In reply to Greg Kroah-Hartman
Quoted 9 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 6.18.2 release. There are 614 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Thu, 18 Dec 2025 11:12:22 +0000. Anything received after that time might be too late.

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

Quoted 8 lines
	https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.18.2-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-6.18.y
and the diffstat can be found below.

thanks,

greg k-h

Tested rc1 against the Fedora build system (aarch64, ppc64le, s390x, x86_64), and boot tested x86_64. No regressions noted.

maintainer Tested-by on the v1 series
#645 lore raw
In reply to Greg Kroah-Hartman
Quoted 9 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 6.18.2 release. There are 614 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Thu, 18 Dec 2025 11:12:22 +0000. Anything received after that time might be too late.

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

Quoted 8 lines
	https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.18.2-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-6.18.y
and the diffstat can be found below.

thanks,

greg k-h

All tests passing for Tegra ...

Test results for stable-v6.18:

    10 builds:	10 pass, 0 fail
    28 boots:	28 pass, 0 fail
    120 tests:	120 pass, 0 fail

Linux version: 6.18.2-rc1-g103c79e44ce7
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,

                tegra186-p3509-0000+p3636-0001, tegra194-p2972-0000,
                tegra194-p3509-0000+p3668-0000, tegra20-ventana,
                tegra210-p2371-2180, tegra210-p3450-0000,
                tegra30-cardhu-a04

Jon

Tested-by on the v1 series
#646 lore raw
In reply to Greg Kroah-Hartman

Am 16.12.2025 um 12:06 schrieb Greg Kroah-Hartman:

Quoted 4 lines

This is the start of the stable review cycle for the 6.18.2 release. There are 614 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Builds, boots and works on my 2-socket Ivy Bridge Xeon E5-2697 v2 server. No dmesg oddities or regressions found.

Beste Grüße,
Peter Schneider

Signature · 8 lines
Climb the mountain not to plant your flag, but to embrace the challenge,
enjoy the air and behold the view. Climb it so you can see the world,
not so the world can see you.                    -- David McCullough Jr.

OpenPGP:  0xA3828BD796CCE11A8CADE8866E3A92C92C3FF244
Download: https://www.peters-netzplatz.de/download/pschneider1968_pub.asc
https://keys.mailvelope.com/pks/lookup?op=get&[email protected]
https://keys.mailvelope.com/pks/lookup?op=get&[email protected]
Tested-by on the v1 series
#648 lore raw
In reply to Greg Kroah-Hartman
Quoted 8 lines · On Tue, 16 Dec 2025 12:06:07 +0100 Greg Kroah-Hartman…

This is the start of the stable review cycle for the 6.18.2 release. There are 614 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Thu, 18 Dec 2025 11:12:22 +0000. Anything received after that time might be too late.

Boot-tested under QEMU for Rust x86_64, arm64 and riscv64; built-tested for loongarch64:

Thanks!

Cheers,
Miguel