Skip to contentSkip to conversation

6.1.39-rc1 review

PATCH In review Greg Kroah-Hartman 9 participants 604 messages Jul 16, 2023 – Aug 17, 2023 Page 5 of 5

Subsystems (8)
lore
Share & tools
lore
author maintainer
#574 lore raw

PATCH 572/591 xfs: explicitly specify cpu when forcing inodegc delayed work to run immediately

In reply to Greg Kroah-Hartman

From: "Darrick J. Wong" <[email protected]>

commit 03e0add80f4cf3f7393edb574eeb3a89a1db7758 upstream.

I've been noticing odd racing behavior in the inodegc code that could only be explained by one cpu adding an inode to its inactivation llist at the same time that another cpu is processing that cpu's llist. Preemption is disabled between get/put_cpu_ptr, so the only explanation is scheduler mayhem. I inserted the following debug code into xfs_inodegc_worker (see the next patch):

	ASSERT(gc->cpu == smp_processor_id());

This assertion tripped during overnight tests on the arm64 machines, but curiously not on x86_64. I think we haven't observed any resource leaks here because the lockfree list code can handle simultaneous llist_add and llist_del_all functions operating on the same list. However, the whole point of having percpu inodegc lists is to take advantage of warm memory caches by inactivating inodes on the last processor to touch the inode.

The incorrect scheduling seems to occur after an inodegc worker is subjected to mod_delayed_work(). This wraps mod_delayed_work_on with WORK_CPU_UNBOUND specified as the cpu number. Unbound allows for scheduling on any cpu, not necessarily the same one that scheduled the work.

Because preemption is disabled for as long as we have the gc pointer, I think it's safe to use current_cpu() (aka smp_processor_id) to queue the delayed work item on the correct cpu.

Fixes 7cf2b0f9611b ("xfs: bound maximum wait time for inodegc work")
---
 fs/xfs/xfs_icache.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
fs/xfs/xfs_icache.c +4 -2
@@ -2052,7 +2052,8 @@ xfs_inodegc_queue(
 		queue_delay = 0;
 
 	trace_xfs_inodegc_queue(mp, __return_address);
-	mod_delayed_work(mp->m_inodegc_wq, &gc->work, queue_delay);
+	mod_delayed_work_on(current_cpu(), mp->m_inodegc_wq, &gc->work,
+			queue_delay);
 	put_cpu_ptr(gc);
 
 	if (xfs_inodegc_want_flush_work(ip, items, shrinker_hits)) {
@@ -2096,7 +2097,8 @@ xfs_inodegc_cpu_dead(
 
 	if (xfs_is_inodegc_enabled(mp)) {
 		trace_xfs_inodegc_queue(mp, __return_address);
-		mod_delayed_work(mp->m_inodegc_wq, &gc->work, 0);
+		mod_delayed_work_on(current_cpu(), mp->m_inodegc_wq, &gc->work,
+				0);
 	}
 	put_cpu_ptr(gc);
 }
author maintainer
#575 lore raw

PATCH 573/591 xfs: check that per-cpu inodegc workers actually run on that cpu

In reply to Greg Kroah-Hartman

From: "Darrick J. Wong" <[email protected]>

commit b37c4c8339cd394ea6b8b415026603320a185651 upstream.

Now that we've allegedly worked out the problem of the per-cpu inodegc workers being scheduled on the wrong cpu, let's put in a debugging knob to let us know if a worker ever gets mis-scheduled again.

---
 fs/xfs/xfs_icache.c |    2 ++
 fs/xfs/xfs_mount.h  |    3 +++
 fs/xfs/xfs_super.c  |    3 +++
 3 files changed, 8 insertions(+)
fs/xfs/xfs_icache.c +2 -0
@@ -1848,6 +1848,8 @@ xfs_inodegc_worker(
 	struct llist_node	*node = llist_del_all(&gc->list);
 	struct xfs_inode	*ip, *n;
 
+	ASSERT(gc->cpu == smp_processor_id());
+
 	WRITE_ONCE(gc->items, 0);
 
 	if (!node)
fs/xfs/xfs_mount.h +3 -0
@@ -66,6 +66,9 @@ struct xfs_inodegc {
 	/* approximate count of inodes in the list */
 	unsigned int		items;
 	unsigned int		shrinker_hits;
+#if defined(DEBUG) || defined(XFS_WARN)
+	unsigned int		cpu;
+#endif
 };
 
 /*
fs/xfs/xfs_super.c +3 -0
@@ -1084,6 +1084,9 @@ xfs_inodegc_init_percpu(
 
 	for_each_possible_cpu(cpu) {
 		gc = per_cpu_ptr(mp->m_inodegc, cpu);
+#if defined(DEBUG) || defined(XFS_WARN)
+		gc->cpu = cpu;
+#endif
 		init_llist_head(&gc->list);
 		gc->items = 0;
 		INIT_DELAYED_WORK(&gc->work, xfs_inodegc_worker);
author maintainer
#576 lore raw

PATCH 574/591 xfs: disable reaping in fscounters scrub

In reply to Greg Kroah-Hartman

From: "Darrick J. Wong" <[email protected]>

commit 2d5f38a31980d7090f5bf91021488dc61a0ba8ee upstream.

The fscounters scrub code doesn't work properly because it cannot quiesce updates to the percpu counters in the filesystem, hence it returns false corruption reports. This has been fixed properly in one of the online repair patchsets that are under review by replacing the xchk_disable_reaping calls with an exclusive filesystem freeze. Disabling background gc isn't sufficient to fix the problem.

In other words, scrub doesn't need to call xfs_inodegc_stop, which is just as well since it wasn't correct to allow scrub to call xfs_inodegc_start when something else could be calling xfs_inodegc_stop (e.g. trying to freeze the filesystem).

Neuter the scrubber for now, and remove the xchk_*_reaping functions.

---
 fs/xfs/scrub/common.c     |   26 --------------------------
 fs/xfs/scrub/common.h     |    2 --
 fs/xfs/scrub/fscounters.c |   13 ++++++-------
 fs/xfs/scrub/scrub.c      |    2 --
 fs/xfs/scrub/scrub.h      |    1 -
 5 files changed, 6 insertions(+), 38 deletions(-)
fs/xfs/scrub/common.c +0 -26
@@ -865,29 +865,3 @@ xchk_ilock_inverted(
 	}
 	return -EDEADLOCK;
 }
-
-/* Pause background reaping of resources. */
-void
-xchk_stop_reaping(
-	struct xfs_scrub	*sc)
-{
-	sc->flags |= XCHK_REAPING_DISABLED;
-	xfs_blockgc_stop(sc->mp);
-	xfs_inodegc_stop(sc->mp);
-}
-
-/* Restart background reaping of resources. */
-void
-xchk_start_reaping(
-	struct xfs_scrub	*sc)
-{
-	/*
-	 * Readonly filesystems do not perform inactivation or speculative
-	 * preallocation, so there's no need to restart the workers.
-	 */
-	if (!xfs_is_readonly(sc->mp)) {
-		xfs_inodegc_start(sc->mp);
-		xfs_blockgc_start(sc->mp);
-	}
-	sc->flags &= ~XCHK_REAPING_DISABLED;
-}
fs/xfs/scrub/common.h +0 -2
@@ -148,7 +148,5 @@ static inline bool xchk_skip_xref(struct
 
 int xchk_metadata_inode_forks(struct xfs_scrub *sc);
 int xchk_ilock_inverted(struct xfs_inode *ip, uint lock_mode);
-void xchk_stop_reaping(struct xfs_scrub *sc);
-void xchk_start_reaping(struct xfs_scrub *sc);
 
 #endif	/* __XFS_SCRUB_COMMON_H__ */
fs/xfs/scrub/fscounters.c +6 -7
@@ -128,13 +128,6 @@ xchk_setup_fscounters(
 	if (error)
 		return error;
 
-	/*
-	 * Pause background reclaim while we're scrubbing to reduce the
-	 * likelihood of background perturbations to the counters throwing off
-	 * our calculations.
-	 */
-	xchk_stop_reaping(sc);
-
 	return xchk_trans_alloc(sc, 0);
 }
 
@@ -354,6 +347,12 @@ xchk_fscounters(
 		xchk_set_corrupt(sc);
 
 	/*
+	 * XXX: We can't quiesce percpu counter updates, so exit early.
+	 * This can be re-enabled when we gain exclusive freeze functionality.
+	 */
+	return 0;
+
+	/*
 	 * If ifree exceeds icount by more than the minimum variance then
 	 * something's probably wrong with the counters.
 	 */
fs/xfs/scrub/scrub.c +0 -2
@@ -171,8 +171,6 @@ xchk_teardown(
 	}
 	if (sc->sm->sm_flags & XFS_SCRUB_IFLAG_REPAIR)
 		mnt_drop_write_file(sc->file);
-	if (sc->flags & XCHK_REAPING_DISABLED)
-		xchk_start_reaping(sc);
 	if (sc->buf) {
 		kmem_free(sc->buf);
 		sc->buf = NULL;
fs/xfs/scrub/scrub.h +0 -1
@@ -88,7 +88,6 @@ struct xfs_scrub {
 
 /* XCHK state flags grow up from zero, XREP state flags grown down from 2^31 */
 #define XCHK_TRY_HARDER		(1 << 0)  /* can't get resources, try again */
-#define XCHK_REAPING_DISABLED	(1 << 2)  /* background block reaping paused */
 #define XREP_ALREADY_FIXED	(1 << 31) /* checking our repair work */
 
 /* Metadata scrubbers */
author maintainer
#577 lore raw

PATCH 575/591 xfs: fix xfs_inodegc_stop racing with mod_delayed_work

In reply to Greg Kroah-Hartman

From: "Darrick J. Wong" <[email protected]>

commit 2254a7396a0ca6309854948ee1c0a33fa4268cec upstream.

syzbot reported this warning from the faux inodegc shrinker that tries to kick off inodegc work:

------------[ cut here ]------------
WARNING: CPU: 1 PID: 102 at kernel/workqueue.c:1445 __queue_work+0xd44/0x1120 kernel/workqueue.c:1444
RIP: 0010:__queue_work+0xd44/0x1120 kernel/workqueue.c:1444
Call Trace:
 __queue_delayed_work+0x1c8/0x270 kernel/workqueue.c:1672
 mod_delayed_work_on+0xe1/0x220 kernel/workqueue.c:1746
 xfs_inodegc_shrinker_scan fs/xfs/xfs_icache.c:2212 [inline]
 xfs_inodegc_shrinker_scan+0x250/0x4f0 fs/xfs/xfs_icache.c:2191
 do_shrink_slab+0x428/0xaa0 mm/vmscan.c:853
 shrink_slab+0x175/0x660 mm/vmscan.c:1013
 shrink_one+0x502/0x810 mm/vmscan.c:5343
 shrink_many mm/vmscan.c:5394 [inline]
 lru_gen_shrink_node mm/vmscan.c:5511 [inline]
 shrink_node+0x2064/0x35f0 mm/vmscan.c:6459
 kswapd_shrink_node mm/vmscan.c:7262 [inline]
 balance_pgdat+0xa02/0x1ac0 mm/vmscan.c:7452
 kswapd+0x677/0xd60 mm/vmscan.c:7712
 kthread+0x2e8/0x3a0 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308

This warning corresponds to this code in __queue_work:

	/*
	 * For a draining wq, only works from the same workqueue are
	 * allowed. The __WQ_DESTROYING helps to spot the issue that
	 * queues a new work item to a wq after destroy_workqueue(wq).
	 */
	if (unlikely(wq->flags & (__WQ_DESTROYING | __WQ_DRAINING) &&
		     WARN_ON_ONCE(!is_chained_work(wq))))
		return;

For this to trip, we must have a thread draining the inodedgc workqueue and a second thread trying to queue inodegc work to that workqueue. This can happen if freezing or a ro remount race with reclaim poking our faux inodegc shrinker and another thread dropping an unlinked O_RDONLY file:

Thread 0 Thread 1 Thread 2

xfs_inodegc_stop

xfs_inodegc_shrinker_scan xfs_is_inodegc_enabled <yes, will continue>

xfs_clear_inodegc_enabled
xfs_inodegc_queue_all
<list empty, do not queue inodegc worker>

xfs_inodegc_queue
<add to list>
xfs_is_inodegc_enabled
<no, returns>

drain_workqueue
<set WQ_DRAINING>

llist_empty
<no, will queue list> mod_delayed_work_on(..., 0) __queue_work
<sees WQ_DRAINING, kaboom>

In other words, everything between the access to inodegc_enabled state and the decision to poke the inodegc workqueue requires some kind of coordination to avoid the WQ_DRAINING state. We could perhaps introduce a lock here, but we could also try to eliminate WQ_DRAINING from the picture.

We could replace the drain_workqueue call with a loop that flushes the workqueue and queues workers as long as there is at least one inode present in the per-cpu inodegc llists. We've disabled inodegc at this point, so we know that the number of queued inodes will eventually hit zero as long as xfs_inodegc_start cannot reactivate the workers.

There are four callers of xfs_inodegc_start. Three of them come from the VFS with s_umount held: filesystem thawing, failed filesystem freezing, and the rw remount transition. The fourth caller is mounting rw (no remount or freezing possible).

There are three callers ofs xfs_inodegc_stop. One is unmounting (no remount or thaw possible). Two of them come from the VFS with s_umount
held: fs freezing and ro remount transition.

Hence, it is correct to replace the drain_workqueue call with a loop that drains the inodegc llists.

Fixes 6191cf3ad59f ("xfs: flush inodegc workqueue tasks before cancel")
---
 fs/xfs/xfs_icache.c |   32 +++++++++++++++++++++++++++-----
 1 file changed, 27 insertions(+), 5 deletions(-)
fs/xfs/xfs_icache.c +27 -5
@@ -431,18 +431,23 @@ xfs_iget_check_free_state(
 }
 
 /* Make all pending inactivation work start immediately. */
-static void
+static bool
 xfs_inodegc_queue_all(
 	struct xfs_mount	*mp)
 {
 	struct xfs_inodegc	*gc;
 	int			cpu;
+	bool			ret = false;
 
 	for_each_online_cpu(cpu) {
 		gc = per_cpu_ptr(mp->m_inodegc, cpu);
-		if (!llist_empty(&gc->list))
+		if (!llist_empty(&gc->list)) {
 			mod_delayed_work_on(cpu, mp->m_inodegc_wq, &gc->work, 0);
+			ret = true;
+		}
 	}
+
+	return ret;
 }
 
 /*
@@ -1894,24 +1899,41 @@ xfs_inodegc_flush(
 
 /*
  * Flush all the pending work and then disable the inode inactivation background
- * workers and wait for them to stop.
+ * workers and wait for them to stop.  Caller must hold sb->s_umount to
+ * coordinate changes in the inodegc_enabled state.
  */
 void
 xfs_inodegc_stop(
 	struct xfs_mount	*mp)
 {
+	bool			rerun;
+
 	if (!xfs_clear_inodegc_enabled(mp))
 		return;
 
+	/*
+	 * Drain all pending inodegc work, including inodes that could be
+	 * queued by racing xfs_inodegc_queue or xfs_inodegc_shrinker_scan
+	 * threads that sample the inodegc state just prior to us clearing it.
+	 * The inodegc flag state prevents new threads from queuing more
+	 * inodes, so we queue pending work items and flush the workqueue until
+	 * all inodegc lists are empty.  IOWs, we cannot use drain_workqueue
+	 * here because it does not allow other unserialized mechanisms to
+	 * reschedule inodegc work while this draining is in progress.
+	 */
 	xfs_inodegc_queue_all(mp);
-	drain_workqueue(mp->m_inodegc_wq);
+	do {
+		flush_workqueue(mp->m_inodegc_wq);
+		rerun = xfs_inodegc_queue_all(mp);
+	} while (rerun);
 
 	trace_xfs_inodegc_stop(mp, __return_address);
 }
 
 /*
  * Enable the inode inactivation background workers and schedule deferred inode
- * inactivation work if there is any.
+ * inactivation work if there is any.  Caller must hold sb->s_umount to
+ * coordinate changes in the inodegc_enabled state.
  */
 void
 xfs_inodegc_start(
author maintainer
#578 lore raw

PATCH 576/591 mm/mmap: Fix extra maple tree write

In reply to Greg Kroah-Hartman

From: "Liam R. Howlett" <[email protected]>

based on commit 0503ea8f5ba73eb3ab13a81c1eefbaf51405385a upstream.

This was inadvertently fixed during the removal of __vma_adjust().

When __vma_adjust() is adjusting next with a negative value (pushing vma->vm_end lower), there would be two writes to the maple tree. The first write is unnecessary and uses all allocated nodes in the maple state. The second write is necessary but will need to allocate nodes since the first write has used the allocated nodes. This may be a problem as it may not be safe to allocate at this time, such as a low memory situation. Fix the issue by avoiding the first write and only write the adjusted "next" VMA.

---
 mm/mmap.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
mm/mmap.c +2 -1
@@ -767,7 +767,8 @@ int __vma_adjust(struct vm_area_struct *
 	}
 	if (end != vma->vm_end) {
 		if (vma->vm_end > end) {
-			if (!insert || (insert->vm_start != end)) {
+			if ((vma->vm_end + adjust_next != end) &&
+			    (!insert || (insert->vm_start != end))) {
 				vma_mas_szero(&mas, end, vma->vm_end);
 				mas_reset(&mas);
 				VM_WARN_ON(insert &&
author maintainer
#579 lore raw

PATCH 577/591 drm/i915: Fix TypeC mode initialization during system resume

In reply to Greg Kroah-Hartman

From: Imre Deak <[email protected]>

commit a82796a2e332d108b2d3aff38509caad370f69b5 upstream.

During system resume DP MST requires AUX to be working already before the HW state readout of the given encoder. Since AUX requires the encoder/PHY TypeC mode to be initialized, which atm only happens during HW state readout, these AUX transfers can change the TypeC mode incorrectly (disconnecting the PHY for an enabled encoder) and trigger the state check WARNs in intel_tc_port_sanitize().

Fix this by initializing the TypeC mode earlier both during driver loading and system resume and making sure that the mode can't change until the encoder's state is read out. While at it add the missing DocBook comments and rename intel_tc_port_sanitize()->intel_tc_port_sanitize_mode() for consistency.

---
 drivers/gpu/drm/i915/display/intel_ddi.c |    8 +++
 drivers/gpu/drm/i915/display/intel_tc.c  |   66 +++++++++++++++++++++++--------
 drivers/gpu/drm/i915/display/intel_tc.h  |    3 -
 3 files changed, 60 insertions(+), 17 deletions(-)
drivers/gpu/drm/i915/display/intel_ddi.c +7 -1
@@ -3579,7 +3579,7 @@ static void intel_ddi_sync_state(struct
 	enum phy phy = intel_port_to_phy(i915, encoder->port);
 
 	if (intel_phy_is_tc(i915, phy))
-		intel_tc_port_sanitize(enc_to_dig_port(encoder));
+		intel_tc_port_sanitize_mode(enc_to_dig_port(encoder));
 
 	if (crtc_state && intel_crtc_has_dp_encoder(crtc_state))
 		intel_dp_sync_state(encoder, crtc_state);
@@ -3789,11 +3789,17 @@ static void intel_ddi_encoder_destroy(st
 
 static void intel_ddi_encoder_reset(struct drm_encoder *encoder)
 {
+	struct drm_i915_private *i915 = to_i915(encoder->dev);
 	struct intel_dp *intel_dp = enc_to_intel_dp(to_intel_encoder(encoder));
+	struct intel_digital_port *dig_port = enc_to_dig_port(to_intel_encoder(encoder));
+	enum phy phy = intel_port_to_phy(i915, dig_port->base.port);
 
 	intel_dp->reset_link_params = true;
 
 	intel_pps_encoder_reset(intel_dp);
+
+	if (intel_phy_is_tc(i915, phy))
+		intel_tc_port_init_mode(dig_port);
 }
 
 static const struct drm_encoder_funcs intel_ddi_funcs = {
drivers/gpu/drm/i915/display/intel_tc.c +51 -15

103 lines not on this page · raw message

drivers/gpu/drm/i915/display/intel_tc.h +2 -1
@@ -24,7 +24,8 @@ int intel_tc_port_fia_max_lane_count(str
 void intel_tc_port_set_fia_lane_count(struct intel_digital_port *dig_port,
 				      int required_lanes);
 
-void intel_tc_port_sanitize(struct intel_digital_port *dig_port);
+void intel_tc_port_init_mode(struct intel_digital_port *dig_port);
+void intel_tc_port_sanitize_mode(struct intel_digital_port *dig_port);
 void intel_tc_port_lock(struct intel_digital_port *dig_port);
 void intel_tc_port_unlock(struct intel_digital_port *dig_port);
 void intel_tc_port_flush_work(struct intel_digital_port *dig_port);
author maintainer
#580 lore raw

PATCH 578/591 drm/i915/tc: Fix TC port link ref init for DP MST during HW readout

In reply to Greg Kroah-Hartman

From: Imre Deak <[email protected]>

commit 67165722c27cc46de112a4e10b450170c8980a6f upstream.

An enabled TC MST port holds one TC port link reference, regardless of the number of enabled streams on it, but the TC port HW readout takes one reference for each active MST stream.

Fix the HW readout, taking only one reference for MST ports.

This didn't cause an actual problem, since the encoder HW readout doesn't yet support reading out the MST HW state.

---
 drivers/gpu/drm/i915/display/intel_tc.c |   20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)
drivers/gpu/drm/i915/display/intel_tc.c +11 -9
@@ -683,11 +683,14 @@ static void intel_tc_port_update_mode(st
 	tc_cold_unblock(dig_port, domain, wref);
 }
 
-static void
-intel_tc_port_link_init_refcount(struct intel_digital_port *dig_port,
-				 int refcount)
+static void __intel_tc_port_get_link(struct intel_digital_port *dig_port)
 {
-	dig_port->tc_link_refcount = refcount;
+	dig_port->tc_link_refcount++;
+}
+
+static void __intel_tc_port_put_link(struct intel_digital_port *dig_port)
+{
+	dig_port->tc_link_refcount--;
 }
 
 /**
@@ -713,7 +716,7 @@ void intel_tc_port_init_mode(struct inte
 
 	dig_port->tc_mode = intel_tc_port_get_current_mode(dig_port);
 	/* Prevent changing dig_port->tc_mode until intel_tc_port_sanitize_mode() is called. */
-	intel_tc_port_link_init_refcount(dig_port, 1);
+	__intel_tc_port_get_link(dig_port);
 	dig_port->tc_lock_wakeref = tc_cold_block(dig_port, &dig_port->tc_lock_power_domain);
 
 	tc_cold_unblock(dig_port, domain, tc_cold_wref);
@@ -749,8 +752,6 @@ void intel_tc_port_sanitize_mode(struct
 		active_links = to_intel_crtc(encoder->base.crtc)->active;
 
 	drm_WARN_ON(&i915->drm, dig_port->tc_link_refcount != 1);
-	intel_tc_port_link_init_refcount(dig_port, active_links);
-
 	if (active_links) {
 		if (!icl_tc_phy_is_connected(dig_port))
 			drm_dbg_kms(&i915->drm,
@@ -769,6 +770,7 @@ void intel_tc_port_sanitize_mode(struct
 				    dig_port->tc_port_name,
 				    tc_port_mode_name(dig_port->tc_mode));
 		icl_tc_phy_disconnect(dig_port);
+		__intel_tc_port_put_link(dig_port);
 
 		tc_cold_unblock(dig_port, dig_port->tc_lock_power_domain,
 				fetch_and_zero(&dig_port->tc_lock_wakeref));
@@ -880,14 +882,14 @@ void intel_tc_port_get_link(struct intel
 			    int required_lanes)
 {
 	__intel_tc_port_lock(dig_port, required_lanes);
-	dig_port->tc_link_refcount++;
+	__intel_tc_port_get_link(dig_port);
 	intel_tc_port_unlock(dig_port);
 }
 
 void intel_tc_port_put_link(struct intel_digital_port *dig_port)
 {
 	intel_tc_port_lock(dig_port);
-	--dig_port->tc_link_refcount;
+	__intel_tc_port_put_link(dig_port);
 	intel_tc_port_unlock(dig_port);
 
 	/*
author maintainer
#581 lore raw

PATCH 579/591 drm/i915/tc: Fix system resume MST mode restore for DP-alt sinks

In reply to Greg Kroah-Hartman

From: Imre Deak <[email protected]>

commit 06f66261a1567d66b9d35c87393b6edfbea4c8f8 upstream.

At least restoring the MST topology during system resume needs to use AUX before the display HW readout->sanitization sequence is complete, but on TC ports the PHY may be in the wrong mode for this, resulting in the AUX transfers to fail.

The initial TC port mode is kept fixed as BIOS left it for the above HW readout sequence (to prevent changing the mode on an enabled port). If the port is disabled this initial mode is TBT - as in any case the PHY ownership is not held - even if a DP-alt sink is connected. Thus, the AUX transfers during this time will use TBT mode instead of the expected DP-alt mode and so time out.

Fix the above by connecting the PHY during port initialization if the port is disabled, which will switch to the expected mode (DP-alt in the above case).

As the encoder/pipe HW state isn't read-out yet at this point, check if the port is enabled based on the DDI_BUF enabled flag. Save the read-out initial mode, so intel_tc_port_sanitize_mode() can check this wrt. the read-out encoder HW state.

---
 drivers/gpu/drm/i915/display/intel_display_types.h |    1 
 drivers/gpu/drm/i915/display/intel_tc.c            |   49 +++++++++++++++++++--
 2 files changed, 47 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/display/intel_display_types.h +1 -0
@@ -1763,6 +1763,7 @@ struct intel_digital_port {
 	bool tc_legacy_port:1;
 	char tc_port_name[8];
 	enum tc_port_mode tc_mode;
+	enum tc_port_mode tc_init_mode;
 	enum phy_fia tc_phy_fia;
 	u8 tc_phy_fia_idx;
 
drivers/gpu/drm/i915/display/intel_tc.c +46 -3

84 lines not on this page · raw message

author maintainer
#582 lore raw

PATCH 580/591 mtd: parsers: refer to ARCH_BCMBCA instead of ARCH_BCM4908

In reply to Greg Kroah-Hartman

From: Lukas Bulwahn <[email protected]>

commit 085679b15b5af65f9610f619afde41da0f966194 upstream.

Commit dd5c672d7ca9 ("arm64: bcmbca: Merge ARCH_BCM4908 to ARCH_BCMBCA") removes config ARCH_BCM4908 as config ARCH_BCMBCA has the same intent.

Probably due to concurrent development, commit 002181f5b150 ("mtd: parsers:
add Broadcom's U-Boot parser") introduces 'Broadcom's U-Boot partition parser' that depends on ARCH_BCM4908, but this use was not visible during the config refactoring from the commit above. Hence, these two changes create a reference to a non-existing config symbol.

Adjust the MTD_BRCM_U_BOOT definition to refer to ARCH_BCMBCA instead of ARCH_BCM4908 to remove the reference to the non-existing config symbol ARCH_BCM4908.

---
 drivers/mtd/parsers/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/parsers/Kconfig +1 -1
@@ -22,7 +22,7 @@ config MTD_BCM63XX_PARTS
 
 config MTD_BRCM_U_BOOT
 	tristate "Broadcom's U-Boot partition parser"
-	depends on ARCH_BCM4908 || COMPILE_TEST
+	depends on ARCH_BCMBCA || COMPILE_TEST
 	help
 	  Broadcom uses a custom way of storing U-Boot environment variables.
 	  They are placed inside U-Boot partition itself at unspecified offset.
author maintainer
#583 lore raw

PATCH 581/591 netfilter: nf_tables: unbind non-anonymous set if rule construction fails

In reply to Greg Kroah-Hartman

From: Pablo Neira Ayuso <[email protected]>

commit 3e70489721b6c870252c9082c496703677240f53 upstream.

Otherwise a dangling reference to a rule object that is gone remains in the set binding list.

Fixes 26b5a5712eb8 ("netfilter: nf_tables: add NFT_TRANS_PREPARE_ERROR to deal with bound set/chain")
---
 net/netfilter/nf_tables_api.c |    2 ++
 1 file changed, 2 insertions(+)
net/netfilter/nf_tables_api.c +2 -0
@@ -5139,6 +5139,8 @@ void nf_tables_deactivate_set(const stru
 		nft_set_trans_unbind(ctx, set);
 		if (nft_set_is_anonymous(set))
 			nft_deactivate_next(ctx->net, set);
+		else
+			list_del_rcu(&binding->list);
 
 		set->use--;
 		break;
author maintainer
#584 lore raw

PATCH 582/591 blk-cgroup: Reinit blkg_iostat_set after clearing in blkcg_reset_stats()

In reply to Greg Kroah-Hartman

From: Waiman Long <[email protected]>

commit 3d2af77e31ade05ff7ccc3658c3635ec1bea0979 upstream.

When blkg_alloc() is called to allocate a blkcg_gq structure with the associated blkg_iostat_set's, there are 2 fields within blkg_iostat_set that requires proper initialization - blkg & sync. The former field was introduced by commit 3b8cc6298724 ("blk-cgroup:
Optimize blkcg_rstat_flush()") while the later one was introduced by commit f73316482977 ("blk-cgroup: reimplement basic IO stats using cgroup rstat").

Unfortunately those fields in the blkg_iostat_set's are not properly re-initialized when they are cleared in v1's blkcg_reset_stats(). This can lead to a kernel panic due to NULL pointer access of the blkg pointer. The missing initialization of sync is less problematic and can be a problem in a debug kernel due to missing lockdep initialization.

Fix these problems by re-initializing them after memory clearing.

Fixes 3b8cc6298724 ("blk-cgroup: Optimize blkcg_rstat_flush()")
Fixes f73316482977 ("blk-cgroup: reimplement basic IO stats using cgroup rstat")
---
 block/blk-cgroup.c |    5 +++++
 1 file changed, 5 insertions(+)
block/blk-cgroup.c +5 -0
@@ -544,8 +544,13 @@ static int blkcg_reset_stats(struct cgro
 			struct blkg_iostat_set *bis =
 				per_cpu_ptr(blkg->iostat_cpu, cpu);
 			memset(bis, 0, sizeof(*bis));
+
+			/* Re-initialize the cleared blkg_iostat_set */
+			u64_stats_init(&bis->sync);
+			bis->blkg = blkg;
 		}
 		memset(&blkg->iostat, 0, sizeof(blkg->iostat));
+		u64_stats_init(&blkg->iostat.sync);
 
 		for (i = 0; i < BLKCG_MAX_POLS; i++) {
 			struct blkcg_policy *pol = blkcg_policy[i];
author maintainer
#585 lore raw

PATCH 583/591 blk-cgroup: Flush stats before releasing blkcg_gq

In reply to Greg Kroah-Hartman

From: Ming Lei <[email protected]>

commit 20cb1c2fb7568a6054c55defe044311397e01ddb upstream.

As noted by Michal, the blkg_iostat_set's in the lockless list hold reference to blkg's to protect against their removal. Those blkg's hold reference to blkcg. When a cgroup is being destroyed, cgroup_rstat_flush() is only called at css_release_work_fn() which is called when the blkcg reference count reaches 0. This circular dependency will prevent blkcg and some blkgs from being freed after they are made offline.

It is less a problem if the cgroup to be destroyed also has other controllers like memory that will call cgroup_rstat_flush() which will clean up the reference count. If block is the only controller that uses rstat, these offline blkcg and blkgs may never be freed leaking more and more memory over time.

To prevent this potential memory leak:

- flush blkcg per-cpu stats list in __blkg_release(), when no new stat can be added

- add global blkg_stat_lock for covering concurrent parent blkg stat update

- don't grab bio->bi_blkg reference when adding the stats into blkcg's per-cpu stat list since all stats are guaranteed to be consumed before releasing blkg instance, and grabbing blkg reference for stats was the most fragile part of original patch

Based on Waiman's patch:

https://lore.kernel.org/linux-block/[email protected]/

---
 block/blk-cgroup.c |   41 ++++++++++++++++++++++++++++++++---------
 1 file changed, 32 insertions(+), 9 deletions(-)
block/blk-cgroup.c +32 -9
@@ -35,6 +35,8 @@
 #include "blk-throttle.h"
 #include "blk-rq-qos.h"
 
+static void __blkcg_rstat_flush(struct blkcg *blkcg, int cpu);
+
 /*
  * blkcg_pol_mutex protects blkcg_policy[] and policy [de]activation.
  * blkcg_pol_register_mutex nests outside of it and synchronizes entire
@@ -58,6 +60,8 @@ static LIST_HEAD(all_blkcgs);		/* protec
 bool blkcg_debug_stats = false;
 static struct workqueue_struct *blkcg_punt_bio_wq;
 
+static DEFINE_RAW_SPINLOCK(blkg_stat_lock);
+
 #define BLKG_DESTROY_BATCH_SIZE  64
 
 /*
@@ -153,9 +157,20 @@ static void blkg_free(struct blkcg_gq *b
 static void __blkg_release(struct rcu_head *rcu)
 {
 	struct blkcg_gq *blkg = container_of(rcu, struct blkcg_gq, rcu_head);
+	struct blkcg *blkcg = blkg->blkcg;
+	int cpu;
 
 	WARN_ON(!bio_list_empty(&blkg->async_bios));
 
+	/*
+	 * Flush all the non-empty percpu lockless lists before releasing
+	 * us, given these stat belongs to us.
+	 *
+	 * blkg_stat_lock is for serializing blkg stat update
+	 */
+	for_each_possible_cpu(cpu)
+		__blkcg_rstat_flush(blkcg, cpu);
+
 	/* release the blkcg and parent blkg refs this blkg has been holding */
 	css_put(&blkg->blkcg->css);
 	if (blkg->parent)
@@ -866,17 +881,12 @@ static void blkcg_iostat_update(struct b
 	u64_stats_update_end_irqrestore(&blkg->iostat.sync, flags);
 }
 
-static void blkcg_rstat_flush(struct cgroup_subsys_state *css, int cpu)
+static void __blkcg_rstat_flush(struct blkcg *blkcg, int cpu)
 {
-	struct blkcg *blkcg = css_to_blkcg(css);
 	struct llist_head *lhead = per_cpu_ptr(blkcg->lhead, cpu);
 	struct llist_node *lnode;
 	struct blkg_iostat_set *bisc, *next_bisc;
 
-	/* Root-level stats are sourced from system-wide IO stats */
-	if (!cgroup_parent(css->cgroup))
-		return;
-
 	rcu_read_lock();
 
 	lnode = llist_del_all(lhead);
@@ -884,6 +894,14 @@ static void blkcg_rstat_flush(struct cgr
 		goto out;
 
 	/*
+	 * For covering concurrent parent blkg update from blkg_release().
+	 *
+	 * When flushing from cgroup, cgroup_rstat_lock is always held, so
+	 * this lock won't cause contention most of time.
+	 */
+	raw_spin_lock(&blkg_stat_lock);
+
+	/*
 	 * Iterate only the iostat_cpu's queued in the lockless list.
 	 */
 	llist_for_each_entry_safe(bisc, next_bisc, lnode, lnode) {
@@ -906,13 +924,19 @@ static void blkcg_rstat_flush(struct cgr
 		if (parent && parent->parent)
 			blkcg_iostat_update(parent, &blkg->iostat.cur,
 					    &blkg->iostat.last);
-		percpu_ref_put(&blkg->refcnt);
 	}
-
+	raw_spin_unlock(&blkg_stat_lock);
 out:
 	rcu_read_unlock();
 }
 
+static void blkcg_rstat_flush(struct cgroup_subsys_state *css, int cpu)
+{
+	/* Root-level stats are sourced from system-wide IO stats */
+	if (cgroup_parent(css->cgroup))
+		__blkcg_rstat_flush(css_to_blkcg(css), cpu);
+}
+
 /*
  * We source root cgroup stats from the system-wide stats to avoid
  * tracking the same information twice and incurring overhead when no
@@ -2043,7 +2067,6 @@ void blk_cgroup_bio_start(struct bio *bi
 
 		llist_add(&bis->lnode, lhead);
 		WRITE_ONCE(bis->lqueued, true);
-		percpu_ref_get(&bis->blkg->refcnt);
 	}
 
 	u64_stats_update_end_irqrestore(&bis->sync, flags);
author maintainer
#586 lore raw

PATCH 584/591 MIPS: DTS: CI20: Raise VDDCORE voltage to 1.125 volts

In reply to Greg Kroah-Hartman

From: Paul Cercueil <[email protected]>

commit 944520f85d5b1fb2f9ea243be41f9c9af3d4cef3 upstream.

Commit 08384e80a70f ("MIPS: DTS: CI20: Fix ACT8600 regulator node names") caused the VDDCORE power supply (regulated by the ACT8600's DCDC1 output) to drop from a voltage of 1.2V configured by the bootloader, to the 1.1V set in the Device Tree.

According to the documentation, the VDDCORE supply should be between 0.99V and 1.21V; both values are therefore within the supported range.

However, VDDCORE being 1.1V results in the CI20 being very unstable, with corrupted memory, failures to boot, or reboots at random. The reason might be succint drops of the voltage below the minimum required.

Raising the minimum voltage to 1.125 volts seems to be enough to address this issue, while still keeping a relatively low core voltage which helps for power consumption and thermals.

Fixes 08384e80a70f ("MIPS: DTS: CI20: Fix ACT8600 regulator node names")
---
 arch/mips/boot/dts/ingenic/ci20.dts |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/mips/boot/dts/ingenic/ci20.dts +2 -2
@@ -240,8 +240,8 @@
 
 		regulators {
 			vddcore: DCDC1 {
-				regulator-min-microvolt = <1100000>;
-				regulator-max-microvolt = <1100000>;
+				regulator-min-microvolt = <1125000>;
+				regulator-max-microvolt = <1125000>;
 				regulator-always-on;
 			};
 			vddmem: DCDC2 {
author maintainer
#587 lore raw

PATCH 585/591 block: make sure local irq is disabled when calling __blkcg_rstat_flush

In reply to Greg Kroah-Hartman

From: Ming Lei <[email protected]>

commit 9c39b7a905d84b7da5f59d80f2e455853fea7217 upstream.

When __blkcg_rstat_flush() is called from cgroup_rstat_flush*() code path, interrupt is always disabled.

When we start to flush blkcg per-cpu stats list in __blkg_release() for avoiding to leak blkcg_gq's reference in commit 20cb1c2fb756 ("blk-cgroup: Flush stats before releasing blkcg_gq"), local irq isn't disabled yet, then lockdep warning may be triggered because the dependent cgroup locks may be acquired from irq(soft irq) handler.

Fix the issue by disabling local irq always.

---
 block/blk-cgroup.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
block/blk-cgroup.c +3 -2
@@ -886,6 +886,7 @@ static void __blkcg_rstat_flush(struct b
 	struct llist_head *lhead = per_cpu_ptr(blkcg->lhead, cpu);
 	struct llist_node *lnode;
 	struct blkg_iostat_set *bisc, *next_bisc;
+	unsigned long flags;
 
 	rcu_read_lock();
 
@@ -899,7 +900,7 @@ static void __blkcg_rstat_flush(struct b
 	 * When flushing from cgroup, cgroup_rstat_lock is always held, so
 	 * this lock won't cause contention most of time.
 	 */
-	raw_spin_lock(&blkg_stat_lock);
+	raw_spin_lock_irqsave(&blkg_stat_lock, flags);
 
 	/*
 	 * Iterate only the iostat_cpu's queued in the lockless list.
@@ -925,7 +926,7 @@ static void __blkcg_rstat_flush(struct b
 			blkcg_iostat_update(parent, &blkg->iostat.cur,
 					    &blkg->iostat.last);
 	}
-	raw_spin_unlock(&blkg_stat_lock);
+	raw_spin_unlock_irqrestore(&blkg_stat_lock, flags);
 out:
 	rcu_read_unlock();
 }
author maintainer
#588 lore raw

PATCH 586/591 netfilter: conntrack: Avoid nf_ct_helper_hash uses after free

In reply to Greg Kroah-Hartman

From: Florent Revest <[email protected]>

commit 6eef7a2b933885a17679eb8ed0796ddf0ee5309b upstream.

If nf_conntrack_init_start() fails (for example due to a register_nf_conntrack_bpf() failure), the nf_conntrack_helper_fini() clean-up path frees the nf_ct_helper_hash map.

When built with NF_CONNTRACK=y, further netfilter modules (e.g:
netfilter_conntrack_ftp) can still be loaded and call nf_conntrack_helpers_register(), independently of whether nf_conntrack initialized correctly. This accesses the nf_ct_helper_hash dangling pointer and causes a uaf, possibly leading to random memory corruption.

This patch guards nf_conntrack_helper_register() from accessing a freed or uninitialized nf_ct_helper_hash pointer and fixes possible uses-after-free when loading a conntrack module.

Fixes 12f7a505331e ("netfilter: add user-space connection tracking helper infrastructure")
---
 net/netfilter/nf_conntrack_helper.c |    4 ++++
 1 file changed, 4 insertions(+)
net/netfilter/nf_conntrack_helper.c +4 -0
@@ -358,6 +358,9 @@ int nf_conntrack_helper_register(struct
 	BUG_ON(me->expect_class_max >= NF_CT_MAX_EXPECT_CLASSES);
 	BUG_ON(strlen(me->name) > NF_CT_HELPER_NAME_LEN - 1);
 
+	if (!nf_ct_helper_hash)
+		return -ENOENT;
+
 	if (me->expect_policy->max_expected > NF_CT_EXPECT_MAX_CNT)
 		return -EINVAL;
 
@@ -513,4 +516,5 @@ int nf_conntrack_helper_init(void)
 void nf_conntrack_helper_fini(void)
 {
 	kvfree(nf_ct_helper_hash);
+	nf_ct_helper_hash = NULL;
 }
author maintainer
#589 lore raw

PATCH 587/591 netfilter: nf_tables: do not ignore genmask when looking up chain by id

In reply to Greg Kroah-Hartman

From: Thadeu Lima de Souza Cascardo <[email protected]>

commit 515ad530795c118f012539ed76d02bacfd426d89 upstream.

When adding a rule to a chain referring to its ID, if that chain had been deleted on the same batch, the rule might end up referring to a deleted chain.

This will lead to a WARNING like following:

[   33.098431] ------------[ cut here ]------------
[   33.098678] WARNING: CPU: 5 PID: 69 at net/netfilter/nf_tables_api.c:2037 nf_tables_chain_destroy+0x23d/0x260
[   33.099217] Modules linked in:
[   33.099388] CPU: 5 PID: 69 Comm: kworker/5:1 Not tainted 6.4.0+ #409
[   33.099726] Workqueue: events nf_tables_trans_destroy_work
[   33.100018] RIP: 0010:nf_tables_chain_destroy+0x23d/0x260
[   33.100306] Code: 8b 7c 24 68 e8 64 9c ed fe 4c 89 e7 e8 5c 9c ed fe 48 83 c4 08 5b 41 5c 41 5d 41 5e 41 5f 5d 31 c0 89 c6 89 c7 c3 cc cc cc cc <0f> 0b 48 83 c4 08 5b 41 5c 41 5d 41 5e 41 5f 5d 31 c0 89 c6 89 c7
[   33.101271] RSP: 0018:ffffc900004ffc48 EFLAGS: 00010202
[   33.101546] RAX: 0000000000000001 RBX: ffff888006fc0a28 RCX: 0000000000000000
[   33.101920] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[   33.102649] RBP: ffffc900004ffc78 R08: 0000000000000000 R09: 0000000000000000
[   33.103018] R10: 0000000000000000 R11: 0000000000000000 R12: ffff8880135ef500
[   33.103385] R13: 0000000000000000 R14: dead000000000122 R15: ffff888006fc0a10
[   33.103762] FS:  0000000000000000(0000) GS:ffff888024c80000(0000) knlGS:0000000000000000
[   33.104184] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   33.104493] CR2: 00007fe863b56a50 CR3: 00000000124b0001 CR4: 0000000000770ee0
[   33.104872] PKRU: 55555554
[   33.104999] Call Trace:
[   33.105113]  <TASK>
[   33.105214]  ? show_regs+0x72/0x90
[   33.105371]  ? __warn+0xa5/0x210
[   33.105520]  ? nf_tables_chain_destroy+0x23d/0x260
[   33.105732]  ? report_bug+0x1f2/0x200
[   33.105902]  ? handle_bug+0x46/0x90
[   33.106546]  ? exc_invalid_op+0x19/0x50
[   33.106762]  ? asm_exc_invalid_op+0x1b/0x20
[   33.106995]  ? nf_tables_chain_destroy+0x23d/0x260
[   33.107249]  ? nf_tables_chain_destroy+0x30/0x260
[   33.107506]  nf_tables_trans_destroy_work+0x669/0x680
[   33.107782]  ? mark_held_locks+0x28/0xa0
[   33.107996]  ? __pfx_nf_tables_trans_destroy_work+0x10/0x10
[   33.108294]  ? _raw_spin_unlock_irq+0x28/0x70
[   33.108538]  process_one_work+0x68c/0xb70
[   33.108755]  ? lock_acquire+0x17f/0x420
[   33.108977]  ? __pfx_process_one_work+0x10/0x10
[   33.109218]  ? do_raw_spin_lock+0x128/0x1d0
[   33.109435]  ? _raw_spin_lock_irq+0x71/0x80
[   33.109634]  worker_thread+0x2bd/0x700
[   33.109817]  ? __pfx_worker_thread+0x10/0x10
[   33.110254]  kthread+0x18b/0x1d0
[   33.110410]  ? __pfx_kthread+0x10/0x10
[   33.110581]  ret_from_fork+0x29/0x50
[   33.110757]  </TASK>
[   33.110866] irq event stamp: 1651
[   33.111017] hardirqs last  enabled at (1659): [<ffffffffa206a209>] __up_console_sem+0x79/0xa0
[   33.111379] hardirqs last disabled at (1666): [<ffffffffa206a1ee>] __up_console_sem+0x5e/0xa0
[   33.111740] softirqs last  enabled at (1616): [<ffffffffa1f5d40e>] __irq_exit_rcu+0x9e/0xe0
[   33.112094] softirqs last disabled at (1367): [<ffffffffa1f5d40e>] __irq_exit_rcu+0x9e/0xe0
[   33.112453] ---[ end trace 0000000000000000 ]---

This is due to the nft_chain_lookup_byid ignoring the genmask. After this change, adding the new rule will fail as it will not find the chain.

Fixes 837830a4b439 ("netfilter: nf_tables: add NFTA_RULE_CHAIN_ID attribute")
Reported-by Mingi Cho of Theori working with ZDI
---
 net/netfilter/nf_tables_api.c |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
net/netfilter/nf_tables_api.c +7 -4
@@ -2628,7 +2628,7 @@ err:
 
 static struct nft_chain *nft_chain_lookup_byid(const struct net *net,
 					       const struct nft_table *table,
-					       const struct nlattr *nla)
+					       const struct nlattr *nla, u8 genmask)
 {
 	struct nftables_pernet *nft_net = nft_pernet(net);
 	u32 id = ntohl(nla_get_be32(nla));
@@ -2639,7 +2639,8 @@ static struct nft_chain *nft_chain_looku
 
 		if (trans->msg_type == NFT_MSG_NEWCHAIN &&
 		    chain->table == table &&
-		    id == nft_trans_chain_id(trans))
+		    id == nft_trans_chain_id(trans) &&
+		    nft_active_genmask(chain, genmask))
 			return chain;
 	}
 	return ERR_PTR(-ENOENT);
@@ -3629,7 +3630,8 @@ static int nf_tables_newrule(struct sk_b
 			return -EOPNOTSUPP;
 
 	} else if (nla[NFTA_RULE_CHAIN_ID]) {
-		chain = nft_chain_lookup_byid(net, table, nla[NFTA_RULE_CHAIN_ID]);
+		chain = nft_chain_lookup_byid(net, table, nla[NFTA_RULE_CHAIN_ID],
+					      genmask);
 		if (IS_ERR(chain)) {
 			NL_SET_BAD_ATTR(extack, nla[NFTA_RULE_CHAIN_ID]);
 			return PTR_ERR(chain);
@@ -10137,7 +10139,8 @@ static int nft_verdict_init(const struct
 						 genmask);
 		} else if (tb[NFTA_VERDICT_CHAIN_ID]) {
 			chain = nft_chain_lookup_byid(ctx->net, ctx->table,
-						      tb[NFTA_VERDICT_CHAIN_ID]);
+						      tb[NFTA_VERDICT_CHAIN_ID],
+						      genmask);
 			if (IS_ERR(chain))
 				return PTR_ERR(chain);
 		} else {
#590 lore raw

Re: [PATCH 6.1 587/591] netfilter: nf_tables: do not ignore genmask when looking up chain by id

Hi Greg,

Quoted 3 lines · Greg Kroah-Hartman

From: Thadeu Lima de Souza Cascardo <[email protected]>

commit 515ad530795c118f012539ed76d02bacfd426d89 upstream.

You can cherry-pick this commit to:

- 5.15.y
- 5.10.y

Just tested here and it is good, no hunks are reported.

Thanks.

Quoted 113 lines

When adding a rule to a chain referring to its ID, if that chain had been deleted on the same batch, the rule might end up referring to a deleted chain.

This will lead to a WARNING like following:

[   33.098431] ------------[ cut here ]------------
[   33.098678] WARNING: CPU: 5 PID: 69 at net/netfilter/nf_tables_api.c:2037 nf_tables_chain_destroy+0x23d/0x260
[   33.099217] Modules linked in:
[   33.099388] CPU: 5 PID: 69 Comm: kworker/5:1 Not tainted 6.4.0+ #409
[   33.099726] Workqueue: events nf_tables_trans_destroy_work
[   33.100018] RIP: 0010:nf_tables_chain_destroy+0x23d/0x260
[   33.100306] Code: 8b 7c 24 68 e8 64 9c ed fe 4c 89 e7 e8 5c 9c ed fe 48 83 c4 08 5b 41 5c 41 5d 41 5e 41 5f 5d 31 c0 89 c6 89 c7 c3 cc cc cc cc <0f> 0b 48 83 c4 08 5b 41 5c 41 5d 41 5e 41 5f 5d 31 c0 89 c6 89 c7
[   33.101271] RSP: 0018:ffffc900004ffc48 EFLAGS: 00010202
[   33.101546] RAX: 0000000000000001 RBX: ffff888006fc0a28 RCX: 0000000000000000
[   33.101920] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[   33.102649] RBP: ffffc900004ffc78 R08: 0000000000000000 R09: 0000000000000000
[   33.103018] R10: 0000000000000000 R11: 0000000000000000 R12: ffff8880135ef500
[   33.103385] R13: 0000000000000000 R14: dead000000000122 R15: ffff888006fc0a10
[   33.103762] FS:  0000000000000000(0000) GS:ffff888024c80000(0000) knlGS:0000000000000000
[   33.104184] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   33.104493] CR2: 00007fe863b56a50 CR3: 00000000124b0001 CR4: 0000000000770ee0
[   33.104872] PKRU: 55555554
[   33.104999] Call Trace:
[   33.105113]  <TASK>
[   33.105214]  ? show_regs+0x72/0x90
[   33.105371]  ? __warn+0xa5/0x210
[   33.105520]  ? nf_tables_chain_destroy+0x23d/0x260
[   33.105732]  ? report_bug+0x1f2/0x200
[   33.105902]  ? handle_bug+0x46/0x90
[   33.106546]  ? exc_invalid_op+0x19/0x50
[   33.106762]  ? asm_exc_invalid_op+0x1b/0x20
[   33.106995]  ? nf_tables_chain_destroy+0x23d/0x260
[   33.107249]  ? nf_tables_chain_destroy+0x30/0x260
[   33.107506]  nf_tables_trans_destroy_work+0x669/0x680
[   33.107782]  ? mark_held_locks+0x28/0xa0
[   33.107996]  ? __pfx_nf_tables_trans_destroy_work+0x10/0x10
[   33.108294]  ? _raw_spin_unlock_irq+0x28/0x70
[   33.108538]  process_one_work+0x68c/0xb70
[   33.108755]  ? lock_acquire+0x17f/0x420
[   33.108977]  ? __pfx_process_one_work+0x10/0x10
[   33.109218]  ? do_raw_spin_lock+0x128/0x1d0
[   33.109435]  ? _raw_spin_lock_irq+0x71/0x80
[   33.109634]  worker_thread+0x2bd/0x700
[   33.109817]  ? __pfx_worker_thread+0x10/0x10
[   33.110254]  kthread+0x18b/0x1d0
[   33.110410]  ? __pfx_kthread+0x10/0x10
[   33.110581]  ret_from_fork+0x29/0x50
[   33.110757]  </TASK>
[   33.110866] irq event stamp: 1651
[   33.111017] hardirqs last  enabled at (1659): [<ffffffffa206a209>] __up_console_sem+0x79/0xa0
[   33.111379] hardirqs last disabled at (1666): [<ffffffffa206a1ee>] __up_console_sem+0x5e/0xa0
[   33.111740] softirqs last  enabled at (1616): [<ffffffffa1f5d40e>] __irq_exit_rcu+0x9e/0xe0
[   33.112094] softirqs last disabled at (1367): [<ffffffffa1f5d40e>] __irq_exit_rcu+0x9e/0xe0
[   33.112453] ---[ end trace 0000000000000000 ]---

This is due to the nft_chain_lookup_byid ignoring the genmask. After this change, adding the new rule will fail as it will not find the chain.

Fixes 837830a4b439 ("netfilter: nf_tables: add NFTA_RULE_CHAIN_ID attribute")
Reported-by Mingi Cho of Theori working with ZDI
---
 net/netfilter/nf_tables_api.c |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
net/netfilter/nf_tables_api.c +7 -4
@@ -2628,7 +2628,7 @@ err:
 
 static struct nft_chain *nft_chain_lookup_byid(const struct net *net,
 					       const struct nft_table *table,
-					       const struct nlattr *nla)
+					       const struct nlattr *nla, u8 genmask)
 {
 	struct nftables_pernet *nft_net = nft_pernet(net);
 	u32 id = ntohl(nla_get_be32(nla));
@@ -2639,7 +2639,8 @@ static struct nft_chain *nft_chain_looku
 
 		if (trans->msg_type == NFT_MSG_NEWCHAIN &&
 		    chain->table == table &&
-		    id == nft_trans_chain_id(trans))
+		    id == nft_trans_chain_id(trans) &&
+		    nft_active_genmask(chain, genmask))
 			return chain;
 	}
 	return ERR_PTR(-ENOENT);
@@ -3629,7 +3630,8 @@ static int nf_tables_newrule(struct sk_b
 			return -EOPNOTSUPP;
 
 	} else if (nla[NFTA_RULE_CHAIN_ID]) {
-		chain = nft_chain_lookup_byid(net, table, nla[NFTA_RULE_CHAIN_ID]);
+		chain = nft_chain_lookup_byid(net, table, nla[NFTA_RULE_CHAIN_ID],
+					      genmask);
 		if (IS_ERR(chain)) {
 			NL_SET_BAD_ATTR(extack, nla[NFTA_RULE_CHAIN_ID]);
 			return PTR_ERR(chain);
@@ -10137,7 +10139,8 @@ static int nft_verdict_init(const struct
 						 genmask);
 		} else if (tb[NFTA_VERDICT_CHAIN_ID]) {
 			chain = nft_chain_lookup_byid(ctx->net, ctx->table,
-						      tb[NFTA_VERDICT_CHAIN_ID]);
+						      tb[NFTA_VERDICT_CHAIN_ID],
+						      genmask);
 			if (IS_ERR(chain))
 				return PTR_ERR(chain);
 		} else {
author maintainer
#591 lore raw

Re: [PATCH 6.1 587/591] netfilter: nf_tables: do not ignore genmask when looking up chain by id

Quoted 5 lines · Pablo Neira Ayuso

Hi Greg,

Quoted 2 lines · Greg Kroah-Hartman

From: Thadeu Lima de Souza Cascardo <[email protected]>

Quoted 8 lines
Quoted 1 line

commit 515ad530795c118f012539ed76d02bacfd426d89 upstream.

You can cherry-pick this commit to:

- 5.15.y
- 5.10.y

Just tested here and it is good, no hunks are reported.

Already queued up there, thanks!

greg k-h

author maintainer
#592 lore raw

PATCH 588/591 netfilter: nf_tables: prevent OOB access in nft_byteorder_eval

In reply to Greg Kroah-Hartman

From: Thadeu Lima de Souza Cascardo <[email protected]>

commit caf3ef7468f7534771b5c44cd8dbd6f7f87c2cbd upstream.

When evaluating byteorder expressions with size 2, a union with 32-bit and 16-bit members is used. Since the 16-bit members are aligned to 32-bit, the array accesses will be out-of-bounds.

It may lead to a stack-out-of-bounds access like the one below:

[   23.095215] ==================================================================
[   23.095625] BUG: KASAN: stack-out-of-bounds in nft_byteorder_eval+0x13c/0x320
[   23.096020] Read of size 2 at addr ffffc90000007948 by task ping/115
[   23.096358]
[   23.096456] CPU: 0 PID: 115 Comm: ping Not tainted 6.4.0+ #413
[   23.096770] Call Trace:
[   23.096910]  <IRQ>
[   23.097030]  dump_stack_lvl+0x60/0xc0
[   23.097218]  print_report+0xcf/0x630
[   23.097388]  ? nft_byteorder_eval+0x13c/0x320
[   23.097577]  ? kasan_addr_to_slab+0xd/0xc0
[   23.097760]  ? nft_byteorder_eval+0x13c/0x320
[   23.097949]  kasan_report+0xc9/0x110
[   23.098106]  ? nft_byteorder_eval+0x13c/0x320
[   23.098298]  __asan_load2+0x83/0xd0
[   23.098453]  nft_byteorder_eval+0x13c/0x320
[   23.098659]  nft_do_chain+0x1c8/0xc50
[   23.098852]  ? __pfx_nft_do_chain+0x10/0x10
[   23.099078]  ? __kasan_check_read+0x11/0x20
[   23.099295]  ? __pfx___lock_acquire+0x10/0x10
[   23.099535]  ? __pfx___lock_acquire+0x10/0x10
[   23.099745]  ? __kasan_check_read+0x11/0x20
[   23.099929]  nft_do_chain_ipv4+0xfe/0x140
[   23.100105]  ? __pfx_nft_do_chain_ipv4+0x10/0x10
[   23.100327]  ? lock_release+0x204/0x400
[   23.100515]  ? nf_hook.constprop.0+0x340/0x550
[   23.100779]  nf_hook_slow+0x6c/0x100
[   23.100977]  ? __pfx_nft_do_chain_ipv4+0x10/0x10
[   23.101223]  nf_hook.constprop.0+0x334/0x550
[   23.101443]  ? __pfx_ip_local_deliver_finish+0x10/0x10
[   23.101677]  ? __pfx_nf_hook.constprop.0+0x10/0x10
[   23.101882]  ? __pfx_ip_rcv_finish+0x10/0x10
[   23.102071]  ? __pfx_ip_local_deliver_finish+0x10/0x10
[   23.102291]  ? rcu_read_lock_held+0x4b/0x70
[   23.102481]  ip_local_deliver+0xbb/0x110
[   23.102665]  ? __pfx_ip_rcv+0x10/0x10
[   23.102839]  ip_rcv+0x199/0x2a0
[   23.102980]  ? __pfx_ip_rcv+0x10/0x10
[   23.103140]  __netif_receive_skb_one_core+0x13e/0x150
[   23.103362]  ? __pfx___netif_receive_skb_one_core+0x10/0x10
[   23.103647]  ? mark_held_locks+0x48/0xa0
[   23.103819]  ? process_backlog+0x36c/0x380
[   23.103999]  __netif_receive_skb+0x23/0xc0
[   23.104179]  process_backlog+0x91/0x380
[   23.104350]  __napi_poll.constprop.0+0x66/0x360
[   23.104589]  ? net_rx_action+0x1cb/0x610
[   23.104811]  net_rx_action+0x33e/0x610
[   23.105024]  ? _raw_spin_unlock+0x23/0x50
[   23.105257]  ? __pfx_net_rx_action+0x10/0x10
[   23.105485]  ? mark_held_locks+0x48/0xa0
[   23.105741]  __do_softirq+0xfa/0x5ab
[   23.105956]  ? __dev_queue_xmit+0x765/0x1c00
[   23.106193]  do_softirq.part.0+0x49/0xc0
[   23.106423]  </IRQ>
[   23.106547]  <TASK>
[   23.106670]  __local_bh_enable_ip+0xf5/0x120
[   23.106903]  __dev_queue_xmit+0x789/0x1c00
[   23.107131]  ? __pfx___dev_queue_xmit+0x10/0x10
[   23.107381]  ? find_held_lock+0x8e/0xb0
[   23.107585]  ? lock_release+0x204/0x400
[   23.107798]  ? neigh_resolve_output+0x185/0x350
[   23.108049]  ? mark_held_locks+0x48/0xa0
[   23.108265]  ? neigh_resolve_output+0x185/0x350
[   23.108514]  neigh_resolve_output+0x246/0x350
[   23.108753]  ? neigh_resolve_output+0x246/0x350
[   23.109003]  ip_finish_output2+0x3c3/0x10b0
[   23.109250]  ? __pfx_ip_finish_output2+0x10/0x10
[   23.109510]  ? __pfx_nf_hook+0x10/0x10
[   23.109732]  __ip_finish_output+0x217/0x390
[   23.109978]  ip_finish_output+0x2f/0x130
[   23.110207]  ip_output+0xc9/0x170
[   23.110404]  ip_push_pending_frames+0x1a0/0x240
[   23.110652]  raw_sendmsg+0x102e/0x19e0
[   23.110871]  ? __pfx_raw_sendmsg+0x10/0x10
[   23.111093]  ? lock_release+0x204/0x400
[   23.111304]  ? __mod_lruvec_page_state+0x148/0x330
[   23.111567]  ? find_held_lock+0x8e/0xb0
[   23.111777]  ? find_held_lock+0x8e/0xb0
[   23.111993]  ? __rcu_read_unlock+0x7c/0x2f0
[   23.112225]  ? aa_sk_perm+0x18a/0x550
[   23.112431]  ? filemap_map_pages+0x4f1/0x900
[   23.112665]  ? __pfx_aa_sk_perm+0x10/0x10
[   23.112880]  ? find_held_lock+0x8e/0xb0
[   23.113098]  inet_sendmsg+0xa0/0xb0
[   23.113297]  ? inet_sendmsg+0xa0/0xb0
[   23.113500]  ? __pfx_inet_sendmsg+0x10/0x10
[   23.113727]  sock_sendmsg+0xf4/0x100
[   23.113924]  ? move_addr_to_kernel.part.0+0x4f/0xa0
[   23.114190]  __sys_sendto+0x1d4/0x290
[   23.114391]  ? __pfx___sys_sendto+0x10/0x10
[   23.114621]  ? __pfx_mark_lock.part.0+0x10/0x10
[   23.114869]  ? lock_release+0x204/0x400
[   23.115076]  ? find_held_lock+0x8e/0xb0
[   23.115287]  ? rcu_is_watching+0x23/0x60
[   23.115503]  ? __rseq_handle_notify_resume+0x6e2/0x860
[   23.115778]  ? __kasan_check_write+0x14/0x30
[   23.116008]  ? blkcg_maybe_throttle_current+0x8d/0x770
[   23.116285]  ? mark_held_locks+0x28/0xa0
[   23.116503]  ? do_syscall_64+0x37/0x90
[   23.116713]  __x64_sys_sendto+0x7f/0xb0
[   23.116924]  do_syscall_64+0x59/0x90
[   23.117123]  ? irqentry_exit_to_user_mode+0x25/0x30
[   23.117387]  ? irqentry_exit+0x77/0xb0
[   23.117593]  ? exc_page_fault+0x92/0x140
[   23.117806]  entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[   23.118081] RIP: 0033:0x7f744aee2bba
[   23.118282] Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb b8 0f 1f 00 f3 0f 1e fa 41 89 ca 64 8b 04 25 18 00 00 00 85 c0 75 15 b8 2c 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 7e c3 0f 1f 44 00 00 41 54 48 83 ec 30 44 89
[   23.119237] RSP: 002b:00007ffd04a7c9f8 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
[   23.119644] RAX: ffffffffffffffda RBX: 00007ffd04a7e0a0 RCX: 00007f744aee2bba
[   23.120023] RDX: 0000000000000040 RSI: 000056488e9e6300 RDI: 0000000000000003
[   23.120413] RBP: 000056488e9e6300 R08: 00007ffd04a80320 R09: 0000000000000010
[   23.120809] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000040
[   23.121219] R13: 00007ffd04a7dc38 R14: 00007ffd04a7ca00 R15: 00007ffd04a7e0a0
[   23.121617]  </TASK>
[   23.121749]
[   23.121845] The buggy address belongs to the virtual mapping at
[   23.121845]  [ffffc90000000000, ffffc90000009000) created by:
[   23.121845]  irq_init_percpu_irqstack+0x1cf/0x270
[   23.122707]
[   23.122803] The buggy address belongs to the physical page:
[   23.123104] page:0000000072ac19f0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x24a09
[   23.123609] flags: 0xfffffc0001000(reserved|node=0|zone=1|lastcpupid=0x1fffff)
[   23.123998] page_type: 0xffffffff()
[   23.124194] raw: 000fffffc0001000 ffffea0000928248 ffffea0000928248 0000000000000000
[   23.124610] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   23.125023] page dumped because: kasan: bad access detected
[   23.125326]
[   23.125421] Memory state around the buggy address:
[   23.125682]  ffffc90000007800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   23.126072]  ffffc90000007880: 00 00 00 00 00 f1 f1 f1 f1 f1 f1 00 00 f2 f2 00
[   23.126455] >ffffc90000007900: 00 00 00 00 00 00 00 00 00 f2 f2 f2 f2 00 00 00
[   23.126840]                                               ^
[   23.127138]  ffffc90000007980: 00 00 00 00 00 00 00 00 00 00 00 00 00 f3 f3 f3
[   23.127522]  ffffc90000007a00: f3 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1
[   23.127906] ==================================================================
[   23.128324] Disabling lock debugging due to kernel taint

Using simple s16 pointers for the 16-bit accesses fixes the problem. For the 32-bit accesses, src and dst can be used directly.

---
 net/netfilter/nft_byteorder.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
net/netfilter/nft_byteorder.c +7 -7
@@ -30,11 +30,11 @@ void nft_byteorder_eval(const struct nft
 	const struct nft_byteorder *priv = nft_expr_priv(expr);
 	u32 *src = &regs->data[priv->sreg];
 	u32 *dst = &regs->data[priv->dreg];
-	union { u32 u32; u16 u16; } *s, *d;
+	u16 *s16, *d16;
 	unsigned int i;
 
-	s = (void *)src;
-	d = (void *)dst;
+	s16 = (void *)src;
+	d16 = (void *)dst;
 
 	switch (priv->size) {
 	case 8: {
@@ -62,11 +62,11 @@ void nft_byteorder_eval(const struct nft
 		switch (priv->op) {
 		case NFT_BYTEORDER_NTOH:
 			for (i = 0; i < priv->len / 4; i++)
-				d[i].u32 = ntohl((__force __be32)s[i].u32);
+				dst[i] = ntohl((__force __be32)src[i]);
 			break;
 		case NFT_BYTEORDER_HTON:
 			for (i = 0; i < priv->len / 4; i++)
-				d[i].u32 = (__force __u32)htonl(s[i].u32);
+				dst[i] = (__force __u32)htonl(src[i]);
 			break;
 		}
 		break;
@@ -74,11 +74,11 @@ void nft_byteorder_eval(const struct nft
 		switch (priv->op) {
 		case NFT_BYTEORDER_NTOH:
 			for (i = 0; i < priv->len / 2; i++)
-				d[i].u16 = ntohs((__force __be16)s[i].u16);
+				d16[i] = ntohs((__force __be16)s16[i]);
 			break;
 		case NFT_BYTEORDER_HTON:
 			for (i = 0; i < priv->len / 2; i++)
-				d[i].u16 = (__force __u16)htons(s[i].u16);
+				d16[i] = (__force __u16)htons(s16[i]);
 			break;
 		}
 		break;
#593 lore raw

Re: [PATCH 6.1 588/591] netfilter: nf_tables: prevent OOB access in nft_byteorder_eval

Hi Greg,

Quoted 3 lines · Greg Kroah-Hartman

From: Thadeu Lima de Souza Cascardo <[email protected]>

commit caf3ef7468f7534771b5c44cd8dbd6f7f87c2cbd upstream.

You can also cherry-pick this commit to:

- 5.15.y
- 5.10.y
- 5.4.y
- 4.19.y
- 4.14.y

Just tested here and it is good, no hunks are reported.

Thanks.

Quoted 204 lines

When evaluating byteorder expressions with size 2, a union with 32-bit and 16-bit members is used. Since the 16-bit members are aligned to 32-bit, the array accesses will be out-of-bounds.

It may lead to a stack-out-of-bounds access like the one below:

[   23.095215] ==================================================================
[   23.095625] BUG: KASAN: stack-out-of-bounds in nft_byteorder_eval+0x13c/0x320
[   23.096020] Read of size 2 at addr ffffc90000007948 by task ping/115
[   23.096358]
[   23.096456] CPU: 0 PID: 115 Comm: ping Not tainted 6.4.0+ #413
[   23.096770] Call Trace:
[   23.096910]  <IRQ>
[   23.097030]  dump_stack_lvl+0x60/0xc0
[   23.097218]  print_report+0xcf/0x630
[   23.097388]  ? nft_byteorder_eval+0x13c/0x320
[   23.097577]  ? kasan_addr_to_slab+0xd/0xc0
[   23.097760]  ? nft_byteorder_eval+0x13c/0x320
[   23.097949]  kasan_report+0xc9/0x110
[   23.098106]  ? nft_byteorder_eval+0x13c/0x320
[   23.098298]  __asan_load2+0x83/0xd0
[   23.098453]  nft_byteorder_eval+0x13c/0x320
[   23.098659]  nft_do_chain+0x1c8/0xc50
[   23.098852]  ? __pfx_nft_do_chain+0x10/0x10
[   23.099078]  ? __kasan_check_read+0x11/0x20
[   23.099295]  ? __pfx___lock_acquire+0x10/0x10
[   23.099535]  ? __pfx___lock_acquire+0x10/0x10
[   23.099745]  ? __kasan_check_read+0x11/0x20
[   23.099929]  nft_do_chain_ipv4+0xfe/0x140
[   23.100105]  ? __pfx_nft_do_chain_ipv4+0x10/0x10
[   23.100327]  ? lock_release+0x204/0x400
[   23.100515]  ? nf_hook.constprop.0+0x340/0x550
[   23.100779]  nf_hook_slow+0x6c/0x100
[   23.100977]  ? __pfx_nft_do_chain_ipv4+0x10/0x10
[   23.101223]  nf_hook.constprop.0+0x334/0x550
[   23.101443]  ? __pfx_ip_local_deliver_finish+0x10/0x10
[   23.101677]  ? __pfx_nf_hook.constprop.0+0x10/0x10
[   23.101882]  ? __pfx_ip_rcv_finish+0x10/0x10
[   23.102071]  ? __pfx_ip_local_deliver_finish+0x10/0x10
[   23.102291]  ? rcu_read_lock_held+0x4b/0x70
[   23.102481]  ip_local_deliver+0xbb/0x110
[   23.102665]  ? __pfx_ip_rcv+0x10/0x10
[   23.102839]  ip_rcv+0x199/0x2a0
[   23.102980]  ? __pfx_ip_rcv+0x10/0x10
[   23.103140]  __netif_receive_skb_one_core+0x13e/0x150
[   23.103362]  ? __pfx___netif_receive_skb_one_core+0x10/0x10
[   23.103647]  ? mark_held_locks+0x48/0xa0
[   23.103819]  ? process_backlog+0x36c/0x380
[   23.103999]  __netif_receive_skb+0x23/0xc0
[   23.104179]  process_backlog+0x91/0x380
[   23.104350]  __napi_poll.constprop.0+0x66/0x360
[   23.104589]  ? net_rx_action+0x1cb/0x610
[   23.104811]  net_rx_action+0x33e/0x610
[   23.105024]  ? _raw_spin_unlock+0x23/0x50
[   23.105257]  ? __pfx_net_rx_action+0x10/0x10
[   23.105485]  ? mark_held_locks+0x48/0xa0
[   23.105741]  __do_softirq+0xfa/0x5ab
[   23.105956]  ? __dev_queue_xmit+0x765/0x1c00
[   23.106193]  do_softirq.part.0+0x49/0xc0
[   23.106423]  </IRQ>
[   23.106547]  <TASK>
[   23.106670]  __local_bh_enable_ip+0xf5/0x120
[   23.106903]  __dev_queue_xmit+0x789/0x1c00
[   23.107131]  ? __pfx___dev_queue_xmit+0x10/0x10
[   23.107381]  ? find_held_lock+0x8e/0xb0
[   23.107585]  ? lock_release+0x204/0x400
[   23.107798]  ? neigh_resolve_output+0x185/0x350
[   23.108049]  ? mark_held_locks+0x48/0xa0
[   23.108265]  ? neigh_resolve_output+0x185/0x350
[   23.108514]  neigh_resolve_output+0x246/0x350
[   23.108753]  ? neigh_resolve_output+0x246/0x350
[   23.109003]  ip_finish_output2+0x3c3/0x10b0
[   23.109250]  ? __pfx_ip_finish_output2+0x10/0x10
[   23.109510]  ? __pfx_nf_hook+0x10/0x10
[   23.109732]  __ip_finish_output+0x217/0x390
[   23.109978]  ip_finish_output+0x2f/0x130
[   23.110207]  ip_output+0xc9/0x170
[   23.110404]  ip_push_pending_frames+0x1a0/0x240
[   23.110652]  raw_sendmsg+0x102e/0x19e0
[   23.110871]  ? __pfx_raw_sendmsg+0x10/0x10
[   23.111093]  ? lock_release+0x204/0x400
[   23.111304]  ? __mod_lruvec_page_state+0x148/0x330
[   23.111567]  ? find_held_lock+0x8e/0xb0
[   23.111777]  ? find_held_lock+0x8e/0xb0
[   23.111993]  ? __rcu_read_unlock+0x7c/0x2f0
[   23.112225]  ? aa_sk_perm+0x18a/0x550
[   23.112431]  ? filemap_map_pages+0x4f1/0x900
[   23.112665]  ? __pfx_aa_sk_perm+0x10/0x10
[   23.112880]  ? find_held_lock+0x8e/0xb0
[   23.113098]  inet_sendmsg+0xa0/0xb0
[   23.113297]  ? inet_sendmsg+0xa0/0xb0
[   23.113500]  ? __pfx_inet_sendmsg+0x10/0x10
[   23.113727]  sock_sendmsg+0xf4/0x100
[   23.113924]  ? move_addr_to_kernel.part.0+0x4f/0xa0
[   23.114190]  __sys_sendto+0x1d4/0x290
[   23.114391]  ? __pfx___sys_sendto+0x10/0x10
[   23.114621]  ? __pfx_mark_lock.part.0+0x10/0x10
[   23.114869]  ? lock_release+0x204/0x400
[   23.115076]  ? find_held_lock+0x8e/0xb0
[   23.115287]  ? rcu_is_watching+0x23/0x60
[   23.115503]  ? __rseq_handle_notify_resume+0x6e2/0x860
[   23.115778]  ? __kasan_check_write+0x14/0x30
[   23.116008]  ? blkcg_maybe_throttle_current+0x8d/0x770
[   23.116285]  ? mark_held_locks+0x28/0xa0
[   23.116503]  ? do_syscall_64+0x37/0x90
[   23.116713]  __x64_sys_sendto+0x7f/0xb0
[   23.116924]  do_syscall_64+0x59/0x90
[   23.117123]  ? irqentry_exit_to_user_mode+0x25/0x30
[   23.117387]  ? irqentry_exit+0x77/0xb0
[   23.117593]  ? exc_page_fault+0x92/0x140
[   23.117806]  entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[   23.118081] RIP: 0033:0x7f744aee2bba
[   23.118282] Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb b8 0f 1f 00 f3 0f 1e fa 41 89 ca 64 8b 04 25 18 00 00 00 85 c0 75 15 b8 2c 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 7e c3 0f 1f 44 00 00 41 54 48 83 ec 30 44 89
[   23.119237] RSP: 002b:00007ffd04a7c9f8 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
[   23.119644] RAX: ffffffffffffffda RBX: 00007ffd04a7e0a0 RCX: 00007f744aee2bba
[   23.120023] RDX: 0000000000000040 RSI: 000056488e9e6300 RDI: 0000000000000003
[   23.120413] RBP: 000056488e9e6300 R08: 00007ffd04a80320 R09: 0000000000000010
[   23.120809] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000040
[   23.121219] R13: 00007ffd04a7dc38 R14: 00007ffd04a7ca00 R15: 00007ffd04a7e0a0
[   23.121617]  </TASK>
[   23.121749]
[   23.121845] The buggy address belongs to the virtual mapping at
[   23.121845]  [ffffc90000000000, ffffc90000009000) created by:
[   23.121845]  irq_init_percpu_irqstack+0x1cf/0x270
[   23.122707]
[   23.122803] The buggy address belongs to the physical page:
[   23.123104] page:0000000072ac19f0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x24a09
[   23.123609] flags: 0xfffffc0001000(reserved|node=0|zone=1|lastcpupid=0x1fffff)
[   23.123998] page_type: 0xffffffff()
[   23.124194] raw: 000fffffc0001000 ffffea0000928248 ffffea0000928248 0000000000000000
[   23.124610] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   23.125023] page dumped because: kasan: bad access detected
[   23.125326]
[   23.125421] Memory state around the buggy address:
[   23.125682]  ffffc90000007800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   23.126072]  ffffc90000007880: 00 00 00 00 00 f1 f1 f1 f1 f1 f1 00 00 f2 f2 00
[   23.126455] >ffffc90000007900: 00 00 00 00 00 00 00 00 00 f2 f2 f2 f2 00 00 00
[   23.126840]                                               ^
[   23.127138]  ffffc90000007980: 00 00 00 00 00 00 00 00 00 00 00 00 00 f3 f3 f3
[   23.127522]  ffffc90000007a00: f3 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1
[   23.127906] ==================================================================
[   23.128324] Disabling lock debugging due to kernel taint

Using simple s16 pointers for the 16-bit accesses fixes the problem. For the 32-bit accesses, src and dst can be used directly.

---
 net/netfilter/nft_byteorder.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
net/netfilter/nft_byteorder.c +7 -7
@@ -30,11 +30,11 @@ void nft_byteorder_eval(const struct nft
 	const struct nft_byteorder *priv = nft_expr_priv(expr);
 	u32 *src = &regs->data[priv->sreg];
 	u32 *dst = &regs->data[priv->dreg];
-	union { u32 u32; u16 u16; } *s, *d;
+	u16 *s16, *d16;
 	unsigned int i;
 
-	s = (void *)src;
-	d = (void *)dst;
+	s16 = (void *)src;
+	d16 = (void *)dst;
 
 	switch (priv->size) {
 	case 8: {
@@ -62,11 +62,11 @@ void nft_byteorder_eval(const struct nft
 		switch (priv->op) {
 		case NFT_BYTEORDER_NTOH:
 			for (i = 0; i < priv->len / 4; i++)
-				d[i].u32 = ntohl((__force __be32)s[i].u32);
+				dst[i] = ntohl((__force __be32)src[i]);
 			break;
 		case NFT_BYTEORDER_HTON:
 			for (i = 0; i < priv->len / 4; i++)
-				d[i].u32 = (__force __u32)htonl(s[i].u32);
+				dst[i] = (__force __u32)htonl(src[i]);
 			break;
 		}
 		break;
@@ -74,11 +74,11 @@ void nft_byteorder_eval(const struct nft
 		switch (priv->op) {
 		case NFT_BYTEORDER_NTOH:
 			for (i = 0; i < priv->len / 2; i++)
-				d[i].u16 = ntohs((__force __be16)s[i].u16);
+				d16[i] = ntohs((__force __be16)s16[i]);
 			break;
 		case NFT_BYTEORDER_HTON:
 			for (i = 0; i < priv->len / 2; i++)
-				d[i].u16 = (__force __u16)htons(s[i].u16);
+				d16[i] = (__force __u16)htons(s16[i]);
 			break;
 		}
 		break;
author maintainer
#594 lore raw

Re: [PATCH 6.1 588/591] netfilter: nf_tables: prevent OOB access in nft_byteorder_eval

Quoted 7 lines · Pablo Neira Ayuso

Hi Greg,

Quoted 3 lines · Greg Kroah-Hartman

From: Thadeu Lima de Souza Cascardo <[email protected]>

commit caf3ef7468f7534771b5c44cd8dbd6f7f87c2cbd upstream.

Quoted 7 lines

You can also cherry-pick this commit to:

- 5.15.y
- 5.10.y
- 5.4.y
- 4.19.y
- 4.14.y

Already queued up there, thanks!

greg k-h

author maintainer
#595 lore raw

PATCH 589/591 wireguard: queueing: use saner cpu selection wrapping

In reply to Greg Kroah-Hartman

From: Jason A. Donenfeld <[email protected]>

commit 7387943fa35516f6f8017a3b0e9ce48a3bef9faa upstream.

Using % nr_cpumask_bits is slow and complicated, and not totally robust toward dynamic changes to CPU topologies. Rather than storing the next CPU in the round-robin, just store the last one, and also return that value. This simplifies the loop drastically into a much more common pattern.

---
 drivers/net/wireguard/queueing.c |    1 +
 drivers/net/wireguard/queueing.h |   25 +++++++++++--------------
 drivers/net/wireguard/receive.c  |    2 +-
 drivers/net/wireguard/send.c     |    2 +-
 4 files changed, 14 insertions(+), 16 deletions(-)
drivers/net/wireguard/queueing.c +1 -0
@@ -28,6 +28,7 @@ int wg_packet_queue_init(struct crypt_qu
 	int ret;
 
 	memset(queue, 0, sizeof(*queue));
+	queue->last_cpu = -1;
 	ret = ptr_ring_init(&queue->ring, len, GFP_KERNEL);
 	if (ret)
 		return ret;
drivers/net/wireguard/queueing.h +11 -14
@@ -117,20 +117,17 @@ static inline int wg_cpumask_choose_onli
 	return cpu;
 }
 
-/* This function is racy, in the sense that next is unlocked, so it could return
- * the same CPU twice. A race-free version of this would be to instead store an
- * atomic sequence number, do an increment-and-return, and then iterate through
- * every possible CPU until we get to that index -- choose_cpu. However that's
- * a bit slower, and it doesn't seem like this potential race actually
- * introduces any performance loss, so we live with it.
+/* This function is racy, in the sense that it's called while last_cpu is
+ * unlocked, so it could return the same CPU twice. Adding locking or using
+ * atomic sequence numbers is slower though, and the consequences of racing are
+ * harmless, so live with it.
  */
-static inline int wg_cpumask_next_online(int *next)
+static inline int wg_cpumask_next_online(int *last_cpu)
 {
-	int cpu = *next;
-
-	while (unlikely(!cpumask_test_cpu(cpu, cpu_online_mask)))
-		cpu = cpumask_next(cpu, cpu_online_mask) % nr_cpumask_bits;
-	*next = cpumask_next(cpu, cpu_online_mask) % nr_cpumask_bits;
+	int cpu = cpumask_next(*last_cpu, cpu_online_mask);
+	if (cpu >= nr_cpu_ids)
+		cpu = cpumask_first(cpu_online_mask);
+	*last_cpu = cpu;
 	return cpu;
 }
 
@@ -159,7 +156,7 @@ static inline void wg_prev_queue_drop_pe
 
 static inline int wg_queue_enqueue_per_device_and_peer(
 	struct crypt_queue *device_queue, struct prev_queue *peer_queue,
-	struct sk_buff *skb, struct workqueue_struct *wq, int *next_cpu)
+	struct sk_buff *skb, struct workqueue_struct *wq)
 {
 	int cpu;
 
@@ -173,7 +170,7 @@ static inline int wg_queue_enqueue_per_d
 	/* Then we queue it up in the device queue, which consumes the
 	 * packet as soon as it can.
 	 */
-	cpu = wg_cpumask_next_online(next_cpu);
+	cpu = wg_cpumask_next_online(&device_queue->last_cpu);
 	if (unlikely(ptr_ring_produce_bh(&device_queue->ring, skb)))
 		return -EPIPE;
 	queue_work_on(cpu, wq, &per_cpu_ptr(device_queue->worker, cpu)->work);
drivers/net/wireguard/receive.c +1 -1
@@ -524,7 +524,7 @@ static void wg_packet_consume_data(struc
 		goto err;
 
 	ret = wg_queue_enqueue_per_device_and_peer(&wg->decrypt_queue, &peer->rx_queue, skb,
-						   wg->packet_crypt_wq, &wg->decrypt_queue.last_cpu);
+						   wg->packet_crypt_wq);
 	if (unlikely(ret == -EPIPE))
 		wg_queue_enqueue_per_peer_rx(skb, PACKET_STATE_DEAD);
 	if (likely(!ret || ret == -EPIPE)) {
drivers/net/wireguard/send.c +1 -1
@@ -318,7 +318,7 @@ static void wg_packet_create_data(struct
 		goto err;
 
 	ret = wg_queue_enqueue_per_device_and_peer(&wg->encrypt_queue, &peer->tx_queue, first,
-						   wg->packet_crypt_wq, &wg->encrypt_queue.last_cpu);
+						   wg->packet_crypt_wq);
 	if (unlikely(ret == -EPIPE))
 		wg_queue_enqueue_per_peer_tx(first, PACKET_STATE_DEAD);
 err:
author maintainer
#596 lore raw

PATCH 590/591 wireguard: netlink: send staged packets when setting initial private key

In reply to Greg Kroah-Hartman

From: Jason A. Donenfeld <[email protected]>

commit f58d0a9b4c6a7a5199c3af967e43cc8b654604d4 upstream.

Packets bound for peers can queue up prior to the device private key being set. For example, if persistent keepalive is set, a packet is queued up to be sent as soon as the device comes up. However, if the private key hasn't been set yet, the handshake message never sends, and no timer is armed to retry, since that would be pointless.

But, if a user later sets a private key, the expectation is that those queued packets, such as a persistent keepalive, are actually sent. So adjust the configuration logic to account for this edge case, and add a test case to make sure this works.

Maxim noticed this with a wg-quick(8) config to the tune of:

    [Interface]
    PostUp = wg set %i private-key somefile

    [Peer]
    PublicKey = ...
    Endpoint = ...
    PersistentKeepalive = 25

Here, the private key gets set after the device comes up using a PostUp script, triggering the bug.

---
 drivers/net/wireguard/netlink.c            |   14 ++++++++-----
 tools/testing/selftests/wireguard/netns.sh |   30 +++++++++++++++++++++++++----
 2 files changed, 35 insertions(+), 9 deletions(-)
drivers/net/wireguard/netlink.c +9 -5
@@ -546,6 +546,7 @@ static int wg_set_device(struct sk_buff
 		u8 *private_key = nla_data(info->attrs[WGDEVICE_A_PRIVATE_KEY]);
 		u8 public_key[NOISE_PUBLIC_KEY_LEN];
 		struct wg_peer *peer, *temp;
+		bool send_staged_packets;
 
 		if (!crypto_memneq(wg->static_identity.static_private,
 				   private_key, NOISE_PUBLIC_KEY_LEN))
@@ -564,14 +565,17 @@ static int wg_set_device(struct sk_buff
 		}
 
 		down_write(&wg->static_identity.lock);
-		wg_noise_set_static_identity_private_key(&wg->static_identity,
-							 private_key);
-		list_for_each_entry_safe(peer, temp, &wg->peer_list,
-					 peer_list) {
+		send_staged_packets = !wg->static_identity.has_identity && netif_running(wg->dev);
+		wg_noise_set_static_identity_private_key(&wg->static_identity, private_key);
+		send_staged_packets = send_staged_packets && wg->static_identity.has_identity;
+
+		wg_cookie_checker_precompute_device_keys(&wg->cookie_checker);
+		list_for_each_entry_safe(peer, temp, &wg->peer_list, peer_list) {
 			wg_noise_precompute_static_static(peer);
 			wg_noise_expire_current_peer_keypairs(peer);
+			if (send_staged_packets)
+				wg_packet_send_staged_packets(peer);
 		}
-		wg_cookie_checker_precompute_device_keys(&wg->cookie_checker);
 		up_write(&wg->static_identity.lock);
 	}
 skip_set_private_key:
tools/testing/selftests/wireguard/netns.sh +26 -4
@@ -514,10 +514,32 @@ n2 bash -c 'printf 0 > /proc/sys/net/ipv
 n1 ping -W 1 -c 1 192.168.241.2
 [[ $(n2 wg show wg0 endpoints) == "$pub1	10.0.0.3:1" ]]
 
-ip1 link del veth1
-ip1 link del veth3
-ip1 link del wg0
-ip2 link del wg0
+ip1 link del dev veth3
+ip1 link del dev wg0
+ip2 link del dev wg0
+
+# Make sure persistent keep alives are sent when an adapter comes up
+ip1 link add dev wg0 type wireguard
+n1 wg set wg0 private-key <(echo "$key1") peer "$pub2" endpoint 10.0.0.1:1 persistent-keepalive 1
+read _ _ tx_bytes < <(n1 wg show wg0 transfer)
+[[ $tx_bytes -eq 0 ]]
+ip1 link set dev wg0 up
+read _ _ tx_bytes < <(n1 wg show wg0 transfer)
+[[ $tx_bytes -gt 0 ]]
+ip1 link del dev wg0
+# This should also happen even if the private key is set later
+ip1 link add dev wg0 type wireguard
+n1 wg set wg0 peer "$pub2" endpoint 10.0.0.1:1 persistent-keepalive 1
+read _ _ tx_bytes < <(n1 wg show wg0 transfer)
+[[ $tx_bytes -eq 0 ]]
+ip1 link set dev wg0 up
+read _ _ tx_bytes < <(n1 wg show wg0 transfer)
+[[ $tx_bytes -eq 0 ]]
+n1 wg set wg0 private-key <(echo "$key1")
+read _ _ tx_bytes < <(n1 wg show wg0 transfer)
+[[ $tx_bytes -gt 0 ]]
+ip1 link del dev veth1
+ip1 link del dev wg0
 
 # We test that Netlink/IPC is working properly by doing things that usually cause split responses
 ip0 link add dev wg0 type wireguard
author maintainer
#597 lore raw

PATCH 591/591 tty: serial: fsl_lpuart: add earlycon for imx8ulp platform

In reply to Greg Kroah-Hartman

From: Sherry Sun <[email protected]>

commit e0edfdc15863ec80a1d9ac6e174dbccc00206dd0 upstream.

Add earlycon support for imx8ulp platform.

---
 drivers/tty/serial/fsl_lpuart.c |    1 +
 1 file changed, 1 insertion(+)
drivers/tty/serial/fsl_lpuart.c +1 -0
@@ -2627,6 +2627,7 @@ OF_EARLYCON_DECLARE(lpuart, "fsl,vf610-l
 OF_EARLYCON_DECLARE(lpuart32, "fsl,ls1021a-lpuart", lpuart32_early_console_setup);
 OF_EARLYCON_DECLARE(lpuart32, "fsl,ls1028a-lpuart", ls1028a_early_console_setup);
 OF_EARLYCON_DECLARE(lpuart32, "fsl,imx7ulp-lpuart", lpuart32_imx_early_console_setup);
+OF_EARLYCON_DECLARE(lpuart32, "fsl,imx8ulp-lpuart", lpuart32_imx_early_console_setup);
 OF_EARLYCON_DECLARE(lpuart32, "fsl,imx8qxp-lpuart", lpuart32_imx_early_console_setup);
 OF_EARLYCON_DECLARE(lpuart32, "fsl,imxrt1050-lpuart", lpuart32_imx_early_console_setup);
 EARLYCON_DECLARE(lpuart, lpuart_early_console_setup);
#598 lore raw
In reply to Greg Kroah-Hartman

Hello!

Quoted 1,788 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 6.1.39 release. There are 591 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 Tue, 18 Jul 2023 19:48:07 +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.1.39-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.1.y
and the diffstat can be found below.

thanks,

greg k-h

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

Greg Kroah-Hartman <[email protected]>

    Linux 6.1.39-rc1

Sherry Sun <[email protected]>
tty: serial: fsl_lpuart: add earlycon for imx8ulp platform

Jason A. Donenfeld <[email protected]>
wireguard: netlink: send staged packets when setting initial private key

Jason A. Donenfeld <[email protected]>
wireguard: queueing: use saner cpu selection wrapping

Thadeu Lima de Souza Cascardo <[email protected]>
netfilter: nf_tables: prevent OOB access in nft_byteorder_eval

Thadeu Lima de Souza Cascardo <[email protected]>
netfilter: nf_tables: do not ignore genmask when looking up chain by id

Florent Revest <[email protected]>
netfilter: conntrack: Avoid nf_ct_helper_hash uses after free

Ming Lei <[email protected]>
block: make sure local irq is disabled when calling __blkcg_rstat_flush

Paul Cercueil <[email protected]>
MIPS: DTS: CI20: Raise VDDCORE voltage to 1.125 volts

Ming Lei <[email protected]>
blk-cgroup: Flush stats before releasing blkcg_gq

Waiman Long <[email protected]>
blk-cgroup: Reinit blkg_iostat_set after clearing in blkcg_reset_stats()

Pablo Neira Ayuso <[email protected]>
netfilter: nf_tables: unbind non-anonymous set if rule construction fails

Lukas Bulwahn <[email protected]>
mtd: parsers: refer to ARCH_BCMBCA instead of ARCH_BCM4908

Imre Deak <[email protected]>
drm/i915/tc: Fix system resume MST mode restore for DP-alt sinks

Imre Deak <[email protected]>
drm/i915/tc: Fix TC port link ref init for DP MST during HW readout

Imre Deak <[email protected]>
drm/i915: Fix TypeC mode initialization during system resume

Liam R. Howlett <[email protected]>
mm/mmap: Fix extra maple tree write

Darrick J. Wong <[email protected]>
xfs: fix xfs_inodegc_stop racing with mod_delayed_work

Darrick J. Wong <[email protected]>
xfs: disable reaping in fscounters scrub

Darrick J. Wong <[email protected]>
xfs: check that per-cpu inodegc workers actually run on that cpu

Darrick J. Wong <[email protected]>
xfs: explicitly specify cpu when forcing inodegc delayed work to run immediately

Jan Kara <[email protected]>
fs: no need to check source

Yu Kuai <[email protected]>
blktrace: use inline function for blk_trace_remove() while blktrace is disabled

Christian Marangi <[email protected]>
leds: trigger: netdev: Recheck NETDEV_LED_MODE_LINKUP on dev rename

Arnd Bergmann <[email protected]>
ARM: orion5x: fix d2net gpio initialization

Krzysztof Kozlowski <[email protected]>
ARM: dts: qcom: ipq4019: fix broken NAND controller properties override

Krzysztof Kozlowski <[email protected]>
regulator: tps65219: Fix matching interrupts for their regulators

Ricardo Ribalda Delgado <[email protected]>
ASoC: mediatek: mt8173: Fix snd_soc_component_initialize error path

Ricardo Ribalda Delgado <[email protected]>
ASoC: mediatek: mt8173: Fix irq error path

Filipe Manana <[email protected]>
btrfs: do not BUG_ON() on tree mod log failure at __btrfs_cow_block()

Filipe Manana <[email protected]>
btrfs: fix extent buffer leak after tree mod log failure at split_node()

Filipe Manana <[email protected]>
btrfs: fix race when deleting quota root from the dirty cow roots list

Naohiro Aota <[email protected]>
btrfs: move out now unused BG from the reclaim list

Naohiro Aota <[email protected]>
btrfs: reinsert BGs failed to reclaim

David Sterba <[email protected]>
btrfs: add block-group tree to lockdep classes

Naohiro Aota <[email protected]>
btrfs: bail out reclaim process if filesystem is read-only

Naohiro Aota <[email protected]>
btrfs: delete unused BGs while reclaiming BGs

Matt Corallo <[email protected]>
btrfs: add handling for RAID1C23/DUP to btrfs_reduce_alloc_profile

Abhijeet Rastogi <[email protected]>
ipvs: increase ip_vs_conn_tab_bits range for 64BIT

Mario Limonciello <[email protected]>
usb: typec: ucsi: Mark dGPUs as DEVICE scope

Wayne Chang <[email protected]>
i2c: nvidia-gpu: Remove ccgx,firmware-build property

Wayne Chang <[email protected]>
i2c: nvidia-gpu: Add ACPI property to align with device-tree

Jan Kara <[email protected]>
fs: Lock moved directories

Jan Kara <[email protected]>
fs: Establish locking order for unrelated directories

Jan Kara <[email protected]>
Revert "f2fs: fix potential corruption when moving a directory"

Jan Kara <[email protected]>
ext4: Remove ext4 locking of moved directory

Thomas Weißschuh <[email protected]>
fs: avoid empty option when generating legacy mount string

Fabian Frederick <[email protected]>
jffs2: reduce stack usage in jffs2_build_xattr_subsystem()

Roberto Sassu <[email protected]>
shmem: use ramfs_kill_sb() for kill_sb method of ramfs-based tmpfs

Ryan Roberts <[email protected]>
mm/damon/ops-common: atomically test and clear young on ptes and pmds

Arnd Bergmann <[email protected]>
autofs: use flexible array in ioctl structure

Tianjia Zhang <[email protected]>
integrity: Fix possible multiple allocation in integrity_inode_get()

Kees Cook <[email protected]>
um: Use HOST_DIR for mrproper

Siddh Raman Pant <[email protected]>
watch_queue: prevent dangling pipe pointer

Zheng Wang <[email protected]>
bcache: Fix __bch_btree_node_alloc to make the failure behavior consistent

Zheng Wang <[email protected]>
bcache: Remove unnecessary NULL point check in node allocations

Mingzhe Zou <[email protected]>
bcache: fixup btree_cache_wait list damage

Quan Zhou <[email protected]>
wifi: mt76: mt7921e: fix init command fail with enabled device

Alexander Wetzel <[email protected]>
wifi: ath10k: Serialize wake_tx_queue ops

Johannes Berg <[email protected]>
wifi: cfg80211: fix regulatory disconnect for non-MLO

Chevron Li <[email protected]>
mmc: sdhci: fix DMA configure compatibility issue when 64bit DMA mode is used.

Ulf Hansson <[email protected]>
mmc: mmci: Set PROBE_PREFER_ASYNCHRONOUS

Robert Marko <[email protected]>
mmc: core: disable TRIM on Micron MTFC4GACAJCN-1M

Robert Marko <[email protected]>
mmc: core: disable TRIM on Kingston EMMC04G-M627

Jens Axboe <[email protected]>
io_uring: wait interruptibly for request completions on exit

Jianmin Lv <[email protected]>
irqchip/loongson-pch-pic: Fix initialization of HT vector register

Dai Ngo <[email protected]>
NFSD: add encoding of op_recall flag for write delegation

Liu Peibao <[email protected]>
irqchip/loongson-pch-pic: Fix potential incorrect hwirq assignment

Shuai Jiang <[email protected]>
i2c: qup: Add missing unwind goto in qup_i2c_probe()

Filipe Manana <[email protected]>
btrfs: do not BUG_ON() on tree mod log failure at balance_level()

Alvin Šipraga <[email protected]>
extcon: usbc-tusb320: Unregister typec port on driver removal

Uwe Kleine-König <[email protected]>
extcon: usbc-tusb320: Convert to i2c's .probe_new()

Demi Marie Obenour <[email protected]>
dm ioctl: Avoid double-fetch of version

Heinz Mauelshagen <[email protected]>
dm ioctl: have constant on the right side of the test

Heinz Mauelshagen <[email protected]>
dm: avoid split of quoted strings where possible

Heinz Mauelshagen <[email protected]>
dm: fix undue/missing spaces

Robert Hancock <[email protected]>
i2c: xiic: Don't try to handle more interrupt events after error

Danila Chernetsov <[email protected]>
apparmor: fix missing error check for rhashtable_insert_fast

Artur Rojek <[email protected]>
sh: dma: Fix DMA channel offset calculation

Thorsten Winkler <[email protected]>
s390/qeth: Fix vipa deletion

David Howells <[email protected]>
afs: Fix accidental truncation when storing data

Hariprasad Kelam <[email protected]>
octeontx-af: fix hardware timestamp configuration

Vladimir Oltean <[email protected]>
net: dsa: sja1105: always enable the send_meta options

Vladimir Oltean <[email protected]>
net: dsa: tag_sja1105: fix MAC DA patching from meta frames

Guillaume Nault <[email protected]>
pptp: Fix fib lookup calls.

Woody Zhang <[email protected]>
riscv: move memblock_allow_resize() after linear mapping is ready

Amir Goldstein <[email protected]>
fanotify: disallow mount/sb marks on kernel internal pseudo fs

Lin Ma <[email protected]>
net/sched: act_pedit: Add size check for TCA_PEDIT_PARMS_EX

Ilya Maximets <[email protected]>
xsk: Honor SO_BINDTODEVICE on bind

SeongJae Park <[email protected]>
bpf, btf: Warn but return no error for NULL btf from __register_btf_kfunc_id_set()

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

Eric Dumazet <[email protected]>
net: fix net_dev_start_xmit trace event vs skb_transport_offset()

Vladimir Oltean <[email protected]>
net: dsa: tag_sja1105: fix source port decoding in vlan_filtering=0 bridge mode

Vladimir Oltean <[email protected]>
net: bridge: keep ports without IFF_UNICAST_FLT in BR_PROMISC mode

Pali Rohár <[email protected]>
powerpc: dts: turris1x.dts: Fix PCIe MEM size for pci2 node

Randy Dunlap <[email protected]>
powerpc: allow PPC_EARLY_DEBUG_CPM only when SERIAL_CPM=y

Zeng Heng <[email protected]>
ntfs: Fix panic about slab-out-of-bounds caused by ntfs_listxattr()

Hariprasad Kelam <[email protected]>
octeontx2-af: Add validation before accessing cgx and lmac

Hariprasad Kelam <[email protected]>
octeontx2-af: Fix mapping for NIX block from CGX connection

Chao Yu <[email protected]>
f2fs: fix error path handling in truncate_dnode()

Nishanth Menon <[email protected]>

    mailbox: ti-msgmgr: Fill non-message tx data fields with 0x0

Mario Limonciello <[email protected]>
drm/amd: Don't try to enable secure display TA multiple times

Christian König <[email protected]>
drm/amdgpu: fix number of fence calculations

Jonas Gorski <[email protected]>
spi: bcm-qspi: return error if neither hif_mspi nor mspi is available

Zhengchao Shao <[email protected]>
mlxsw: minimal: fix potential memory leak in mlxsw_m_linecards_init

Pawel Dembicki <[email protected]>
net: dsa: vsc73xx: fix MTU configuration

Nick Child <[email protected]>
ibmvnic: Do not reset dql stats on NON_FATAL err

Luiz Augusto von Dentz <[email protected]>
Bluetooth: MGMT: Fix marking SCAN_RSP as not connectable

Luiz Augusto von Dentz <[email protected]>
Bluetooth: MGMT: Use BIT macro when defining bitfields

Pauli Virtanen <[email protected]>
Bluetooth: MGMT: add CIS feature bits to controller information

Pauli Virtanen <[email protected]>
Bluetooth: ISO: use hci_sync for setting CIG parameters

Johan Hovold <[email protected]>
Bluetooth: fix invalid-bdaddr quirk for non-persistent setup

Tobias Heider <[email protected]>
Add MODULE_FIRMWARE() for FIRMWARE_TG357766.

Vladimir Oltean <[email protected]>
net: dsa: tag_sja1105: always prefer source port information from INCL_SRCPT

Vladimir Oltean <[email protected]>
net: dsa: sja1105: always enable the INCL_SRCPT option

Vladimir Oltean <[email protected]>
net: dsa: felix: don't drop PTP frames with tag_8021q when RX timestamping is disabled

Vladimir Oltean <[email protected]>
net: mscc: ocelot: don't keep PTP configuration of all ports in single structure

Vladimir Oltean <[email protected]>
net: mscc: ocelot: don't report that RX timestamping is enabled by default

Dmitry Baryshkov <[email protected]>
spi: spi-geni-qcom: enable SPI_CONTROLLER_MUST_TX for GPI DMA mode

Florian Westphal <[email protected]>
net/sched: act_ipt: add sanity checks on skb before calling target

Xin Long <[email protected]>
net: add a couple of helpers for iph tot_len

Florian Westphal <[email protected]>
net/sched: act_ipt: add sanity checks on table name and hook locations

Chengfeng Ye <[email protected]>

    sctp: fix potential deadlock on &net->sctp.addr_wq_lock

Randy Dunlap <[email protected]>
media: cec: i2c: ch7322: also select REGMAP

Chao Yu <[email protected]>
f2fs: check return value of freeze_super()

Vinay Belgaumkar <[email protected]>
drm/i915/guc/slpc: Apply min softlimit correctly

Jouni Högander <[email protected]>
drm/i915/psr: Use hw.adjusted mode when calculating io/fast wake times

Christophe JAILLET <[email protected]>
rtc: st-lpc: Release some resources in st_rtc_probe() in case of error

Jinke Han <[email protected]>
blk-throttle: Fix io statistics for cgroup v1

Ming Lei <[email protected]>
blk-cgroup: don't update io stat for root cgroup

Waiman Long <[email protected]>
blk-cgroup: Optimize blkcg_rstat_flush()

Li Nan <[email protected]>
md/raid10: fix the condition to call bio_end_io_acct()

Shuijing Li <[email protected]>
pwm: mtk_disp: Fix the disable flow of disp_pwm

Dan Carpenter <[email protected]>
pwm: ab8500: Fix error code in probe()

Marek Vasut <[email protected]>
pwm: sysfs: Do not apply state to already disabled PWMs

Fancy Fang <[email protected]>
pwm: imx-tpm: force 'real_period' to be zero in suspend

Yury Norov <[email protected]>
lib/bitmap: drop optimization of bitmap_{from,to}_arr64

Claudiu Beznea <[email protected]>
phy: tegra: xusb: check return value of devm_kzalloc()

Christophe JAILLET <[email protected]>
mfd: stmpe: Only disable the regulators if they are enabled

Yicong Yang <[email protected]>
hwtracing: hisi_ptt: Fix potential sleep in atomic context

Dmitry Baryshkov <[email protected]>
clk: qcom: mmcc-msm8974: fix MDSS_GDSC power flags

Claudiu Beznea <[email protected]>
misc: fastrpc: check return value of devm_kasprintf()

Daniel Golle <[email protected]>
cpufreq: mediatek: correct voltages for MT7622 and MT7623

Christian Borntraeger <[email protected]>
KVM: s390/diag: fix racy access of physical cpu number in diag 9c handler

Pierre Morel <[email protected]>
KVM: s390: vsie: fix the length of APCB bitmap

Amelie Delaunay <[email protected]>

    mfd: stmfx: Nullify stmfx->vdd in case of error

Amelie Delaunay <[email protected]>
mfd: stmfx: Fix error path in stmfx_chip_init

Laurentiu Tudor <[email protected]>
bus: fsl-mc: don't assume child devices are all fsl-mc devices

Phil Elwell <[email protected]>
nvmem: rmem: Use NVMEM_DEVID_AUTO

Yi Yingao <[email protected]>

    nvmem: sunplus-ocotp: release otp->clk before return

Matti Vaittinen <[email protected]>
drivers: fwnode: fix fwnode_irq_get[_byname]()

Andy Shevchenko <[email protected]>
device property: Clarify description of returned value in some functions

Miaoqian Lin <[email protected]>
device property: Fix documentation for fwnode_get_next_parent()

Tony Lindgren <[email protected]>
serial: 8250_omap: Use force_suspend and resume for system suspend

Greg Kroah-Hartman <[email protected]>
Revert "usb: common: usb-conn-gpio: Set last role to unknown before initial detection"

Jiasheng Jiang <[email protected]>
mfd: intel-lpss: Add missing check for platform_get_resource

Christophe JAILLET <[email protected]>
mfd: wcd934x: Fix an error handling path in wcd934x_slim_probe()

Christophe JAILLET <[email protected]>
usb: dwc3-meson-g12a: Fix an error handling path in dwc3_meson_g12a_probe()

Prashanth K <[email protected]>
usb: common: usb-conn-gpio: Set last role to unknown before initial detection

Christophe JAILLET <[email protected]>
usb: dwc3: qcom: Fix an error handling path in dwc3_qcom_probe()

Christophe JAILLET <[email protected]>
usb: dwc3: qcom: Release the correct resources in dwc3_qcom_remove()

Nico Boehr <[email protected]>
KVM: s390: fix KVM_S390_GET_CMMA_BITS for GFNs in memslot holes

Chao Yu <[email protected]>
f2fs: fix to avoid NULL pointer dereference f2fs_write_end_io()

Chao Yu <[email protected]>
f2fs: fix potential deadlock due to unpaired node_write lock use

Bob Peterson <[email protected]>
gfs2: Fix duplicate should_fault_in_pages() call

Sergey Shtylyov <[email protected]>
sh: Avoid using IRQ0 on SH3 and SH4

Dan Carpenter <[email protected]>
media: atomisp: gmin_platform: fix out_len in gmin_get_config_dsm_var()

Rikard Falkeborn <[email protected]>
media: venus: helpers: Fix ALIGN() of non power of two

Stephan Gerhold <[email protected]>

    mfd: rt5033: Drop rt5033-battery sub-device

James Clark <[email protected]>
coresight: Fix loss of connection info when a module is unloaded

Clark Wang <[email protected]>
i3c: master: svc: fix cpu schedule in spin lock

Yue Zhao <[email protected]>
lkdtm: replace ll_rw_block with submit_bh

Muchun Song <[email protected]>
kernfs: fix missing kernfs_idr_lock to remove an ID from the IDR

John Ogness <[email protected]>
serial: 8250: lock port for UART_IER access in omap8250_irq()

John Ogness <[email protected]>
serial: core: lock port for start_rx() in uart_resume_port()

John Ogness <[email protected]>

    serial: 8250: lock port for stop_rx() in omap8250_irq()

John Ogness <[email protected]>
serial: core: lock port for stop_rx() in uart_suspend_port()

Bhupesh Sharma <[email protected]>
usb: misc: eud: Fix eud sysfs path (use 'qcom_eud')

Arnd Bergmann <[email protected]>
usb: hide unused usbfs_notify_suspend/resume functions

Li Yang <[email protected]>
usb: phy: phy-tahvo: fix memory leak in tahvo_usb_probe()

Andy Shevchenko <[email protected]>
extcon: Fix kernel doc of property capability fields to avoid warnings

Andy Shevchenko <[email protected]>
extcon: Fix kernel doc of property fields to avoid warnings

Prashanth K <[email protected]>
usb: gadget: u_serial: Add null pointer check in gserial_suspend

Vladislav Efanov <[email protected]>
usb: dwc3: qcom: Fix potential memory leak

Arnd Bergmann <[email protected]>
staging: vchiq_arm: mark vchiq_platform_init() static

Dmitry Baryshkov <[email protected]>
clk: qcom: mmcc-msm8974: use clk_rcg2_shared_ops for mdp_clk_src clock

Konrad Dybcio <[email protected]>
clk: qcom: dispcc-qcm2290: Fix GPLL0_OUT_DIV handling

Konrad Dybcio <[email protected]>
clk: qcom: dispcc-qcm2290: Fix BI_TCXO_AO handling

Robert Marko <[email protected]>
clk: qcom: ipq6018: fix networking resets

Robert Marko <[email protected]>
clk: qcom: reset: support resetting multiple bits

Yunfei Dong <[email protected]>
media: mediatek: vcodec: using decoder status instead of core work count

Martin Kepplinger <[email protected]>
media: hi846: fix usage of pm_runtime_get_if_in_use()

Daniel Scally <[email protected]>
media: i2c: Correct format propagation for st-mipid02

Duoming Zhou <[email protected]>
media: usb: siano: Fix warning due to null work_func_t function pointer

Marek Vasut <[email protected]>
media: videodev2.h: Fix struct v4l2_input tuner index comment

Ming Qian <[email protected]>
media: amphion: initiate a drain of the capture queue in dynamic resolution change

Ming Qian <[email protected]>
media: amphion: drop repeated codec data for vc1g format

Ming Qian <[email protected]>
media: amphion: drop repeated codec data for vc1l format

Daniil Dulov <[email protected]>
media: usb: Check az6007_read() return value

Konrad Dybcio <[email protected]>
clk: qcom: gcc-qcm2290: Mark RCGs shared where applicable

Mantas Pucka <[email protected]>
clk: qcom: gcc-ipq6018: Use floor ops for sdcc clocks

Taniya Das <[email protected]>
clk: qcom: camcc-sc7180: Add parent dependency to all camera GDSCs

Dmitry Baryshkov <[email protected]>
clk: qcom: mmcc-msm8974: remove oxili_ocmemgx_clk

Tony Lindgren <[email protected]>
serial: 8250: omap: Fix freeing of resources on failed register

Christophe JAILLET <[email protected]>
usb: dwc2: Fix some error handling paths

Uwe Kleine-König <[email protected]>
usb: dwc2: platform: Improve error reporting for problems during .remove()

John Paul Adrian Glaubitz <[email protected]>
sh: j2: Use ioremap() to translate device tree address into kernel memory

Yangtao Li <[email protected]>
f2fs: do not allow to defragment files have FI_COMPRESS_RELEASED

Konrad Dybcio <[email protected]>
dt-bindings: power: reset: qcom-pon: Only allow reboot-mode pre-pmk8350

Dan Carpenter <[email protected]>
w1: fix loop in w1_fini()

Stefan Wahren <[email protected]>
w1: w1_therm: fix locking behavior in convert_t

Ding Hui <[email protected]>
SUNRPC: Fix UAF in svc_tcp_listen_data_ready()

Filipe Manana <[email protected]>
btrfs: fix race when deleting free space root from the dirty cow roots list

Demi Marie Obenour <[email protected]>
block: increment diskseq on all media change events

Michael Schmitz <[email protected]>
block: change all __u32 annotations to __be32 in affs_hardblocks.h

Michael Schmitz <[email protected]>
block: add overflow checks for Amiga partition support

Michael Schmitz <[email protected]>
block: fix signed int overflow in Amiga partition support

Takashi Iwai <[email protected]>
ALSA: pcm: Fix potential data race at PCM memory allocation helpers

Takashi Iwai <[email protected]>
ALSA: jack: Fix mutex call in snd_jack_report()

Werner Sembach <[email protected]>
ALSA: hda/realtek: Add quirk for Clevo NPx0SNx

Andy Chi <[email protected]>
ALSA: hda/realtek: Enable mute/micmute LEDs and limit mic boost on EliteBook

Suren Baghdasaryan <[email protected]>
mm/mmap: Fix VM_LOCKED check in do_vmi_align_munmap()

Hersen Wu <[email protected]>
Revert "drm/amd/display: edp do not add non-edid timings"

Sean Nyekjaer <[email protected]>
iio: accel: fxls8962af: fixup buffer scan element type

Sean Nyekjaer <[email protected]>
iio: accel: fxls8962af: errata bug only applicable for FXLS8962AF

Fabrizio Lamarque <[email protected]>
iio: adc: ad7192: Fix internal/external clock selection

Fabrizio Lamarque <[email protected]>
iio: adc: ad7192: Fix null ad7192_state pointer access

EJ Hsu <[email protected]>
phy: tegra: xusb: Clear the driver reference in usb-phy dev

Krishna Kurapati <[email protected]>
usb: dwc3: gadget: Propagate core init errors to UDC during pullup

Davide Tronchin <[email protected]>
USB: serial: option: add LARA-R6 01B PIDs

Yu Kuai <[email protected]>
md/raid1-10: fix casting from randomized structure in raid1_submit_write()

Thomas Gleixner <[email protected]>
x86/efi: Make efi_set_virtual_address_map IBT safe

Will Deacon <[email protected]>
arm64: sme: Use STR P to clear FFR context field in streaming SVE mode

Arnd Bergmann <[email protected]>
ksmbd: avoid field overflow warning

Paulo Alcantara <[email protected]>
smb: client: fix broken file attrs with nodfs mounts

Shyam Prasad N <[email protected]>
cifs: do all necessary checks for credits within or before locking

Shyam Prasad N <[email protected]>
cifs: prevent use-after-free by freeing the cfile later

Ard Biesheuvel <[email protected]>
efi/libstub: Disable PCI DMA before grabbing the EFI memory map

Sami Tolvanen <[email protected]>
kbuild: Disable GCOV for *.mod.o

Martin Kaiser <[email protected]>
hwrng: st - keep clock enabled while hwrng is registered

Tarun Sahu <[email protected]>
dax/kmem: Pass valid argument to memory_group_register_static

Dan Williams <[email protected]>
dax: Introduce alloc_dev_dax_id()

Dan Williams <[email protected]>
dax: Fix dax_mapping_release() use after free

Bharath SM <[email protected]>
SMB3: Do not send lease break acknowledgment if all file handles have been closed

Olga Kornievskaia <[email protected]>
NFSv4.1: freeze the session table upon receiving NFS4ERR_BADSESSION

Qi Zheng <[email protected]>
NFSv4.2: fix wrong shrinker_id

Hareshx Sankar Raj <[email protected]>
crypto: qat - unmap buffers before free for RSA

Hareshx Sankar Raj <[email protected]>
crypto: qat - unmap buffer before free for DH

Herbert Xu <[email protected]>
crypto: qat - Use helper to set reqsize

Herbert Xu <[email protected]>
crypto: kpp - Add helper to set reqsize

Masahiro Yamada <[email protected]>
ARC: define ASM_NL and __ALIGN(_STR) outside #ifdef __ASSEMBLY__ guard

Dan Carpenter <[email protected]>
modpost: fix off by one in is_executable_section()

Stephan Müller <[email protected]>
crypto: jitter - correct health test during initialization

Arnd Bergmann <[email protected]>
crypto: marvell/cesa - Fix type mismatch warning

Masahiro Yamada <[email protected]>

    modpost: fix section mismatch message for R_ARM_{PC24,CALL,JUMP24}

Masahiro Yamada <[email protected]>
modpost: fix section mismatch message for R_ARM_ABS32

Randy Dunlap <[email protected]>
crypto: nx - fix build warnings when DEBUG_FS is not enabled

Masahiro Yamada <[email protected]>
modpost: remove broken calculation of exception_table_entry size

Herbert Xu <[email protected]>
hwrng: virtio - Fix race on data_avail and actual data

Eric Farman <[email protected]>
vfio/mdev: Move the compat_class initialization to module init

Xinghui Li <[email protected]>
PCI: vmd: Fix uninitialized variable usage in vmd_enable_domain()

Yoshihiro Shimoda <[email protected]>
PCI: endpoint: functions/pci-epf-test: Fix dma_chan direction

Shunsuke Mie <[email protected]>
PCI: endpoint: Fix a Kconfig prompt of vNTB driver

Shunsuke Mie <[email protected]>
PCI: endpoint: Fix Kconfig indent style

Aneesh Kumar K.V <[email protected]>
powerpc/mm/dax: Fix the condition when checking if altmap vmemap can cross-boundary

Aneesh Kumar K.V <[email protected]>
powerpc/book3s64/mm: Fix DirectMap stats in /proc/meminfo

Tiezhu Yang <[email protected]>
riscv: uprobes: Restore thread.bad_cause

Manivannan Sadhasivam <[email protected]>
PCI: qcom: Disable write access to read only registers for IP v2.9.0

Manivannan Sadhasivam <[email protected]>
PCI: qcom: Use DWC helpers for modifying the read-only DBI registers

Manivannan Sadhasivam <[email protected]>
PCI: qcom: Use lower case for hex

Manivannan Sadhasivam <[email protected]>
PCI: qcom: Sort and group registers and bitfield definitions

Manivannan Sadhasivam <[email protected]>
PCI: qcom: Remove PCIE20_ prefix from register definitions

Aditya Gupta <[email protected]>
powerpc: update ppc_save_regs to save current r1 in pt_regs

Nicholas Piggin <[email protected]>
powerpc: simplify ppc_save_regs

Colin Ian King <[email protected]>
powerpc/powernv/sriov: perform null check on iov before dereferencing iov

Claudiu Beznea <[email protected]>
pinctrl: at91-pio4: check return value of devm_kasprintf()

Claudiu Beznea <[email protected]>
pinctrl: microchip-sgpio: check return value of devm_kasprintf()

Nicholas Piggin <[email protected]>
powerpc/64s: Fix VAS mm use after free

Ian Rogers <[email protected]>
perf tool x86: Fix perf_env memory leak

Ravi Bangoria <[email protected]>
perf tool x86: Consolidate is_amd check into single function

Michal Wilczynski <[email protected]>
platform/x86/dell/dell-rbtn: Fix resources leaking on error path

Namhyung Kim <[email protected]>
perf dwarf-aux: Fix off-by-one in die_get_varname()

Mark Pearson <[email protected]>
platform/x86: thinkpad_acpi: Fix lkp-tests warnings for platform profiles

Arnaldo Carvalho de Melo <[email protected]>

    perf script: Fix allocation of evsel->priv related to per-event dump files

Christophe Leroy <[email protected]>
powerpc/signal32: Force inlining of __unsafe_save_user_regs() and save_tm_user_regs_unsafe()

Christophe Leroy <[email protected]>
powerpc/interrupt: Don't read MSR from interrupt_exit_kernel_prepare()

Christophe Leroy <[email protected]>
kcsan: Don't expect 64 bits atomic builtins from 32 bits architectures

Jiasheng Jiang <[email protected]>
pinctrl: npcm7xx: Add missing check for ioremap

Wells Lu <[email protected]>
pinctrl:sunplus: Add check for kmalloc

Mark Pearson <[email protected]>
platform/x86: think-lmi: Correct NVME password handling

Mark Pearson <[email protected]>
platform/x86: think-lmi: Correct System password interface

Mark Pearson <[email protected]>
platform/x86: think-lmi: mutex protection around multiple WMI calls

Andy Shevchenko <[email protected]>
pinctrl: cherryview: Return correct value if pin in push-pull mode

Arnaldo Carvalho de Melo <[email protected]>
perf bench: Add missing setlocale() call to allow usage of %'d style formatting

Justin Tee <[email protected]>
scsi: lpfc: Revise NPIV ELS unsol rcv cmpl logic to drop ndlp based on nlp_state

Sui Jingfeng <[email protected]>
PCI: Add pci_clear_master() stub for non-CONFIG_PCI

Wells Lu <[email protected]>
pinctrl: sunplus: Add check for kmalloc

Junyan Ye <[email protected]>
PCI: ftpci100: Release the clock resources

Rongguang Wei <[email protected]>
PCI: pciehp: Cancel bringup sequence if card is not present

Yuchen Yang <[email protected]>
scsi: 3w-xxxx: Add error handling for initialization failure in tw_probe()

Ding Hui <[email protected]>
PCI/ASPM: Disable ASPM on MFD function removal to avoid use-after-free

Hans de Goede <[email protected]>
platform/x86: lenovo-yogabook: Set default keyboard backligh brightness on probe()

Hans de Goede <[email protected]>
platform/x86: lenovo-yogabook: Reprobe devices on remove()

Hans de Goede <[email protected]>
platform/x86: lenovo-yogabook: Fix work race on remove()

Christophe JAILLET <[email protected]>
pinctrl: bcm2835: Handle gpiochip_add_pin_range() errors

Jinhong Zhu <[email protected]>
scsi: qedf: Fix NULL dereference in error handling

Nirmal Patel <[email protected]>
PCI: vmd: Reset VMD config register between soft reboots

Siddharth Vadapalli <[email protected]>
PCI: cadence: Fix Gen2 Link Retraining process

Syed Saba Kareem <[email protected]>
ASoC: amd: acp: clear pdm dma interrupt mask

Michael Walle <[email protected]>
ARM: dts: lan966x: kontron-d10: fix SPI CS

Michael Walle <[email protected]>
ARM: dts: lan966x: kontron-d10: fix board reset

Fei Shao <[email protected]>
clk: Fix memory leak in devm_clk_notifier_register()

Claudiu Beznea <[email protected]>
ASoC: imx-audmix: check return value of devm_kasprintf()

Amir Goldstein <[email protected]>
ovl: update of dentry revalidate flags after copy up

Alexey Romanov <[email protected]>
drivers: meson: secure-pwrc: always enable DMA domain

Claudiu Beznea <[email protected]>
clk: ti: clkctrl: check return value of kasprintf()

Claudiu Beznea <[email protected]>
clk: keystone: sci-clk: check return value of kasprintf()

Claudiu Beznea <[email protected]>
clk: si5341: free unused memory on probe failure

Claudiu Beznea <[email protected]>
clk: si5341: check return value of {devm_}kasprintf()

Claudiu Beznea <[email protected]>
clk: si5341: return error if one synth clock registration fails

Claudiu Beznea <[email protected]>
clk: cdce925: check return value of kasprintf()

Claudiu Beznea <[email protected]>
clk: vc5: check memory returned by kasprintf()

Dmitry Baryshkov <[email protected]>
drm/msm/dpu: correct MERGE_3D length

Luben Tuikov <[email protected]>
drm/amdgpu: Fix usage of UMC fill record in RAS

Srinivasan Shanmugam <[email protected]>
drm/amdgpu: Fix memcpy() in sienna_cichlid_append_powerplay_table function.

Nícolas F. R. A. Prado <[email protected]>
arm64: dts: mediatek: mt8192: Fix CPUs capacity-dmips-mhz

Allen-KH Cheng <[email protected]>
arm64: dts: mediatek: Add cpufreq nodes for MT8192

Bjorn Andersson <[email protected]>
drm/msm/dp: Free resources after unregistering them

Jessica Zhang <[email protected]>
drm/msm/dsi: Remove incorrect references to slice_count

Marijn Suijten <[email protected]>
drm/msm/dsi: Flip greater-than check for slice_count and slice_per_intf

Marijn Suijten <[email protected]>
drm/msm/dsi: Use DSC slice(s) packet size to compute word count

Jessica Zhang <[email protected]>
drm/msm/dpu: Fix slice_last_group_size calculation

Dmitry Baryshkov <[email protected]>
drm/msm/dpu: do not enable color-management if DSPPs are not available

Su Hui <[email protected]>
ALSA: ac97: Fix possible NULL dereference in snd_ac97_mixer

Yuan Can <[email protected]>
clk: tegra: tegra124-emc: Fix potential memory leak

Dan Carpenter <[email protected]>
clk: clocking-wizard: Fix Oops in clk_wzrd_register_divider()

Dan Carpenter <[email protected]>
clk: bcm: rpi: Fix off by one in raspberrypi_discover_clocks()

Marijn Suijten <[email protected]>
arm64: dts: qcom: sm8250-edo: Panel framebuffer is 2.5k instead of 4k

Konrad Dybcio <[email protected]>
arm64: dts: qcom: sdm845: Flush RSC sleep & wake votes

Yuxing Liu <[email protected]>
clk: imx: clk-imx8mp: improve error handling in imx8mp_clocks_probe()

Zhanhao Hu <[email protected]>
clk: imx93: fix memory leak and missing unwind goto in imx93_clocks_probe

Hao Luo <[email protected]>
clk: imx: clk-imx8mn: fix memory leak in imx8mn_clocks_probe

Kai Ma <[email protected]>
clk: imx: clk-imxrt1050: fix memory leak in imxrt1050_clocks_probe

Kashyap Desai <[email protected]>
RDMA/bnxt_re: Avoid calling wake_up threads from spin_lock context

Kashyap Desai <[email protected]>
RDMA/bnxt_re: wraparound mbox producer index

Dmitry Baryshkov <[email protected]>
drm/msm/a5xx: really check for A510 in a5xx_gpu_init

Chia-I Wu <[email protected]>
amdgpu: validate offset_in_bo of drm_amdgpu_gem_va

Bob Pearson <[email protected]>
RDMA/rxe: Fix access checks in rxe_check_bind_mw

Bob Pearson <[email protected]>
RDMA/rxe: Replace pr_xxx by rxe_dbg_xxx in rxe_mw.c

Bob Pearson <[email protected]>
RDMA/rxe: Add ibdev_dbg macros for rxe

Geert Uytterhoeven <[email protected]>
HID: uclogic: Modular KUnit tests should not depend on KUNIT=y

Nikita Zhandarovich <[email protected]>
drm/radeon: fix possible division-by-zero errors

Aurabindo Pillai <[email protected]>
drm/amd/display: Fix artifacting on eDP panels when engaging freesync video mode

Chen-Yu Tsai <[email protected]>
soc: mediatek: SVS: Fix MT8192 GPU node name

Daniil Dulov <[email protected]>
drm/amdkfd: Fix potential deallocation of previously deallocated memory.

Christophe JAILLET <[email protected]>
drm/amd/display: Fix a test dml32_rq_dlg_get_rq_reg()

Christophe JAILLET <[email protected]>
drm/amd/display: Fix a test CalculatePrefetchSchedule()

Paul Cercueil <[email protected]>
MIPS: DTS: CI20: Fix ACT8600 regulator node names

Maxime Ripard <[email protected]>
clk: Export clk_hw_forward_rate_request()

Christian Lamparter <[email protected]>
ARM: dts: BCM5301X: fix duplex-full => full-duplex

Guenter Roeck <[email protected]>
hwmon: (pmbus/adm1275) Fix problems with temperature monitoring on ADM1272

Tim Harvey <[email protected]>
hwmon: (gsc-hwmon) fix fan pwm temperature scaling

Olivier Moysan <[email protected]>
ARM: dts: stm32: fix i2s endpoint format property for stm32mp15xx-dkx

Marek Vasut <[email protected]>
ARM: dts: stm32: Fix audio routing on STM32MP15xx DHCOM PDK2

Caleb Connolly <[email protected]>
Input: pm8941-powerkey - fix debounce on gen2+ PMICs

Keerthy <[email protected]>
arm64: dts: ti: k3-j7200: Fix physical address of pin

Christophe JAILLET <[email protected]>
fbdev: omapfb: lcd_mipid: Fix an error handling path in mipid_spi_probe()

Kuogee Hsieh <[email protected]>
drm/msm/dpu: set DSC flush bit correctly at MDP CTL flush register

Wolfram Sang <[email protected]>
arm64: dts: renesas: ulcb-kf: Remove flow control for SCIF1

Geert Uytterhoeven <[email protected]>
ARM: dts: iwg20d-q7-common: Fix backlight pwm specifier

Chengchang Tang <[email protected]>
RDMA/hns: Fix hns_roce_table_get return value

Brendan Cunningham <[email protected]>
IB/hfi1: Fix wrong mmu_node used for user SDMA packet after invalidate

Arnd Bergmann <[email protected]>
RDMA/irdma: avoid fortify-string warning in irdma_clr_wqes

Randy Dunlap <[email protected]>
soc/fsl/qe: fix usb.c build errors

Martin Blumenstingl <[email protected]>
ARM: dts: meson8: correct uart_B and uart_C clock references

Cristian Ciocaltea <[email protected]>
ASoC: es8316: Do not set rate constraints for unsupported MCLKs

Cristian Ciocaltea <[email protected]>
ASoC: es8316: Increment max value for ALC Capture Target Volume control

Dmitry Baryshkov <[email protected]>
ARM: dts: qcom: apq8074-dragonboard: Set DMA as remotely controlled

Krzysztof Kozlowski <[email protected]>
memory: brcmstb_dpfe: fix testing array offset after use

Marek Vasut <[email protected]>
ARM: dts: stm32: Shorten the AV96 HDMI sound card name

Douglas Anderson <[email protected]>
arm64: dts: mediatek: mt8183: Add mediatek,broken-save-restore-fw to kukui

Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: apq8096: fix fixed regulator name property

Luca Weiss <[email protected]>
arm64: dts: qcom: pm7250b: add missing spmi-vadc include

Arnd Bergmann <[email protected]>
ARM: omap2: fix missing tick_broadcast() prototype

Arnd Bergmann <[email protected]>
ARM: ep93xx: fix missing-prototype warnings

Dario Binacchi <[email protected]>
drm/panel: simple: fix active size for Ampire AM-480272H3TMQW-T01H

Frieder Schrempf <[email protected]>
drm/bridge: ti-sn65dsi83: Fix enable/disable flow to meet spec

Dave Stevenson <[email protected]>
drm/bridge: Introduce pre_enable_prev_first to alter bridge init order

Stephan Gerhold <[email protected]>
arm64: dts: qcom: apq8016-sbc: Fix 1.8V power rail on LS expansion

Stephan Gerhold <[email protected]>
arm64: dts: qcom: apq8016-sbc: Fix regulator constraints

Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: sdm845-polaris: add missing touchscreen child node reg

Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: sm8350: correct DMA controller unit address

Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: sm8350: Add GPI DMA compatible fallback

Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: sdm845: correct camss unit address

Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: sdm630: correct camss unit address

Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: msm8996: correct camss unit address

Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: msm8994: correct SPMI unit address

Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: msm8916: correct MMC unit address

Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: msm8916: correct camss unit address

Krzysztof Kozlowski <[email protected]>
ARM: dts: qcom: msm8974: do not use underscore in node name (again)

Nícolas F. R. A. Prado <[email protected]>
drm/bridge: anx7625: Prevent endless probe loop

Uwe Kleine-König <[email protected]>

    drm/bridge: anx7625: Convert to i2c's .probe_new()

Tony Lindgren <[email protected]>
ARM: dts: gta04: Move model property out of pinctrl node

Biju Das <[email protected]>
clk: renesas: rzg2l: Fix CPG_SIPLL5_CLK1 register write

Jean-Philippe Brucker <[email protected]>
iommu/virtio: Return size mapped for a detached domain

Jean-Philippe Brucker <[email protected]>
iommu/virtio: Detach domain on endpoint release

Konrad Dybcio <[email protected]>
drm/msm/dpu: Set DPU_DATA_HCTL_EN for in INTF_SC7180_MASK

Vinod Polimera <[email protected]>
drm/msm/disp/dpu: get timing engine status from intf status register

Dmitry Baryshkov <[email protected]>
drm/msm/dsi: don't allow enabling 14nm VCO with unprogrammed rate

Kalesh AP <[email protected]>
RDMA/bnxt_re: Fix to remove an unnecessary log

Kalesh AP <[email protected]>
RDMA/bnxt_re: Remove a redundant check inside bnxt_re_update_gid

Kalesh AP <[email protected]>
RDMA/bnxt_re: Use unique names while registering interrupts

Kalesh AP <[email protected]>
RDMA/bnxt_re: Fix to remove unnecessary return labels

Selvin Xavier <[email protected]>
RDMA/bnxt_re: Disable/kill tasklet only if it is enabled

Nikita Zhandarovich <[email protected]>
hwmon: (f71882fg) prevent possible division by zero

Dan Carpenter <[email protected]>
clk: imx: scu: use _safe list iterator to avoid a use after free

Alexander Stein <[email protected]>
drm/bridge: tc358767: Switch to devm MIPI-DSI helpers

Robert Marko <[email protected]>
arm64: dts: microchip: sparx5: do not use PSCI on reference boards

Tony Lindgren <[email protected]>
bus: ti-sysc: Fix dispc quirk masking bool variables

Marek Vasut <[email protected]>
ARM: dts: stm32: Move ethernet MAC EEPROM from SoM to carrier boards

Maíra Canal <[email protected]>
drm/vkms: Fix RGB565 pixel conversion

Maíra Canal <[email protected]>
drm: Add fixed-point helper to get rounded integer values

Maíra Canal <[email protected]>
drm/vkms: isolate pixel conversion functionality

Bard Liao <[email protected]>
ASoC: Intel: sof_sdw: remove SOF_SDW_TGL_HDMI for MeteorLake devices

Dan Carpenter <[email protected]>
driver: soc: xilinx: use _safe loop iterator to avoid a use after free

Dmitry Baryshkov <[email protected]>
drm/panel: sharp-ls043t1le01: adjust mode settings

XuDong Liu <[email protected]>
drm: sun4i_tcon: use devm_clk_get_enabled in sun4i_tcon_init_clocks

Marek Vasut <[email protected]>
Input: adxl34x - do not hardcode interrupt trigger type

Marek Vasut <[email protected]>
clk: rs9: Fix .driver_data content in i2c_device_id

Marek Vasut <[email protected]>
clk: vc7: Fix .driver_data content in i2c_device_id

Marek Vasut <[email protected]>
clk: vc5: Fix .driver_data content in i2c_device_id

Liu Shixin <[email protected]>
bootmem: remove the vmemmap pages from kmemleak in free_bootmem_page

Lars-Peter Clausen <[email protected]>
clk: vc5: Use clamp() to restrict PLL range

Peter Collingbourne <[email protected]>
mm: call arch_swap_restore() from do_swap_page()

[email protected] <[email protected]>
ARM: dts: meson8b: correct uart_B and uart_C clock references

Rafał Miłecki <[email protected]>
ARM: dts: BCM5301X: Drop "clock-names" from the SPI node

Luc Ma <[email protected]>
drm/vram-helper: fix function names in vram helper doc

Francesco Dolcini <[email protected]>
drm/bridge: tc358768: fix THS_TRAILCNT computation

Francesco Dolcini <[email protected]>
drm/bridge: tc358768: fix TXTAGOCNT computation

Francesco Dolcini <[email protected]>
drm/bridge: tc358768: fix THS_ZEROCNT computation

Francesco Dolcini <[email protected]>
drm/bridge: tc358768: fix TCLK_TRAILCNT computation

Francesco Dolcini <[email protected]>
drm/bridge: tc358768: Add atomic_get_input_bus_fmts() implementation

Francesco Dolcini <[email protected]>
drm/bridge: tc358768: fix TCLK_ZEROCNT computation

Francesco Dolcini <[email protected]>
drm/bridge: tc358768: fix PLL target frequency

Francesco Dolcini <[email protected]>
drm/bridge: tc358768: fix PLL parameters computation

Francesco Dolcini <[email protected]>
drm/bridge: tc358768: always enable HS video mode

Alexander Stein <[email protected]>
drm/bridge: ti-sn65dsi83: Fix enable error path

Luca Weiss <[email protected]>

    Input: drv260x - sleep between polling GO bit

Markus Elfring <[email protected]>
drm/bridge: it6505: Move a variable assignment behind a null pointer check in receive_timing_debugfs_show()

Nicholas Kazlauskas <[email protected]>
drm/amd/display: Explicitly specify update type per plane info change

Nikita Zhandarovich <[email protected]>
radeon: avoid double free in ci_dpm_init()

Wesley Chalmers <[email protected]>
drm/amd/display: Add logging for display MALL refresh setting

Kuniyuki Iwashima <[email protected]>

    netlink: Add __sock_i_ino() for __netlink_diag_dump().

Cambda Zhu <[email protected]>
ipvlan: Fix return value of ipvlan_queue_xmit()

Ilia.Gavrilov <[email protected]>
netfilter: nf_conntrack_sip: fix the ct_sip_parse_numerical_param() return value.

Florian Westphal <[email protected]>
netfilter: conntrack: dccp: copy entire header to stack buffer, not just basic one

Jeremy Sowden <[email protected]>
lib/ts_bm: reset initial match offset for every block of text

Lin Ma <[email protected]>
net: nfc: Fix use-after-free caused by nfc_llcp_find_local

Edward Cree <[email protected]>
sfc: fix crash when reading stats while NIC is resetting

David Howells <[email protected]>
ocfs2: Fix use of slab data with sendpage

Maxim Kochetkov <[email protected]>
net: axienet: Move reset before 64-bit DMA detection

Kuniyuki Iwashima <[email protected]>
gtp: Fix use-after-free in __gtp_encap_destroy().

Sabrina Dubroca <[email protected]>
selftests: rtnetlink: remove netdevsim device after ipsec offload test

Eric Dumazet <[email protected]>
bonding: do not assume skb mac_header is set

Eric Dumazet <[email protected]>
netlink: do not hard code device address lenth in fdb dumps

Eric Dumazet <[email protected]>
netlink: fix potential deadlock in netlink_set_err()

Bartosz Golaszewski <[email protected]>
net: stmmac: fix double serdes powerdown

Jimmy Assarsson <[email protected]>
can: kvaser_pciefd: Set hardware timestamp on transmitted packets

Jimmy Assarsson <[email protected]>
can: kvaser_pciefd: Add function to set skb hwtstamps

Vincent Mailhol <[email protected]>
can: length: fix bitstuffing count

Gilad Sever <[email protected]>
bpf: Fix bpf socket lookup from tc/xdp to respect socket VRF bindings

Gilad Sever <[email protected]>
bpf: Call __bpf_sk_lookup()/__bpf_skc_lookup() directly via TC hookpoint

Gilad Sever <[email protected]>
bpf: Factor out socket lookup functions for the TC hookpoint.

Dmitry Antipov <[email protected]>
wifi: ath9k: convert msecs to jiffies where needed

Johannes Berg <[email protected]>
wifi: iwlwifi: mvm: indicate HW decrypt for beacon protection

Marek Vasut <[email protected]>
mmc: Add MMC_QUIRK_BROKEN_SD_CACHE for Kingston Canvas Go Plus from 11/2019

Ilan Peer <[email protected]>
wifi: ieee80211: Fix the common size calculation for reconfiguration ML

Ilan Peer <[email protected]>
wifi: cfg80211/mac80211: Fix ML element common size calculation

Johannes Berg <[email protected]>
wifi: cfg80211: fix regulatory disconnect with OCB/NAN

Benjamin Berg <[email protected]>
wifi: cfg80211: drop incorrect nontransmitted BSS update code

Benjamin Berg <[email protected]>
wifi: cfg80211: rewrite merging of inherited elements

Nicolas Cavallari <[email protected]>
wifi: mac80211: Remove "Missing iftype sband data/EHT cap" spam

Anjaneyulu <[email protected]>
wifi: iwlwifi: pcie: fix NULL pointer dereference in iwl_pcie_irq_rx_msix_handler()

Johannes Berg <[email protected]>
wifi: iwlwifi: pull from TXQs with softirqs disabled

Jiasheng Jiang <[email protected]>
wifi: ath11k: Add missing check for ioremap

Edwin Peer <[email protected]>
rtnetlink: extend RTEXT_FILTER_SKIP_STATS to IFLA_VF_INFO

Ilan Peer <[email protected]>
wifi: mac80211: Fix permissions for valid_links debugfs entry

Remi Pommarel <[email protected]>
wifi: ath9k: Fix possible stall on ath9k_txq_list_has_key()

Arnd Bergmann <[email protected]>
memstick r592: make memstick_debug_get_tpc_name() static

Douglas Anderson <[email protected]>
mmc: mediatek: Avoid ugly error message when SDIO wakeup IRQ isn't used

Zhen Lei <[email protected]>
kexec: fix a memory leak in crash_shrink_memory()

Douglas Anderson <[email protected]>
watchdog/perf: more properly prevent false positives with turbo modes

Douglas Anderson <[email protected]>
watchdog/perf: define dummy watchdog_update_hrtimer_threshold() on correct config

Haifeng Xu <[email protected]>
selftests: cgroup: fix unexpected failure on test_memcg_low

Karol Kolacinski <[email protected]>
ice: handle extts in the miscellaneous interrupt thread

Marek Vasut <[email protected]>
wifi: rsi: Do not set MMC_PM_KEEP_POWER in shutdown

Marek Vasut <[email protected]>
wifi: rsi: Do not configure WoWlan in shutdown hook if not enabled

Jesper Dangaard Brouer <[email protected]>
selftests/bpf: Fix check_mtu using wrong variable type

Johannes Berg <[email protected]>
wifi: mac80211: recalc min chandef for new STA links

Youghandhar Chintala <[email protected]>
wifi: ath10k: Trigger STA disconnect after reconfig complete on hardware restart

Jesper Dangaard Brouer <[email protected]>
samples/bpf: xdp1 and xdp2 reduce XDPBUFSIZE to 60

Fedor Pchelkin <[email protected]>
wifi: ath9k: don't allow to overwrite ENDPOINT0 attributes

Christophe JAILLET <[email protected]>
wifi: ray_cs: Fix an error handling path in ray_probe()

Christophe JAILLET <[email protected]>
wifi: wl3501_cs: Fix an error handling path in wl3501_probe()

Christophe JAILLET <[email protected]>
wifi: atmel: Fix an error handling path in atmel_probe()

Christophe JAILLET <[email protected]>
wifi: orinoco: Fix an error handling path in orinoco_cs_probe()

Christophe JAILLET <[email protected]>
wifi: orinoco: Fix an error handling path in spectrum_cs_probe()

Geert Uytterhoeven <[email protected]>
regulator: core: Streamline debugfs operations

Geert Uytterhoeven <[email protected]>
regulator: core: Fix more error checking for debugfs_create_dir()

Alexey Gladkov <[email protected]>
selftests/bpf: Do not use sign-file as testcase

Yafang Shao <[email protected]>
bpf: Fix memleak due to fentry attach failure

Yafang Shao <[email protected]>
bpf: Remove bpf trampoline selector

Alan Maguire <[email protected]>
bpftool: JIT limited misreported as negative value on aarch64

Krzysztof Kozlowski <[email protected]>
nfc: llcp: fix possible use of uninitialized variable in nfc_llcp_send_connect()

Joy Chakraborty <[email protected]>
spi: dw: Round of n_bytes to power of 2

Stanislav Fomichev <[email protected]>
bpf: Don't EFAULT for {g,s}setsockopt with wrong optlen

Andrii Nakryiko <[email protected]>
libbpf: fix offsetof() and container_of() to work with CO-RE

Alexander Mikhalitsyn <[email protected]>
sctp: add bpf_bypass_getsockopt proto callback

Christophe JAILLET <[email protected]>
wifi: mwifiex: Fix the size of a memory allocation in mwifiex_ret_802_11_scan()

Amisha Patel <[email protected]>
wifi: wilc1000: fix for absent RSN capabilities WFA testcase

Vijaya Krishna Nivarthi <[email protected]>
spi: spi-geni-qcom: Correct CS_TOGGLE bit in SPI_TRANS_CFG

Pengcheng Yang <[email protected]>
samples/bpf: Fix buffer overflow in tcp_basertt

Martin KaFai Lau <[email protected]>
libbpf: btf_dump_type_data_check_overflow needs to consider BTF_MEMBER_BITFIELD_SIZE

Fedor Pchelkin <[email protected]>
wifi: ath9k: avoid referencing uninit memory in ath9k_wmi_ctrl_rx

Peter Seiderer <[email protected]>
wifi: ath9k: fix AR9003 mac hardware hang check register offset calculation

Jesper Dangaard Brouer <[email protected]>
igc: Enable and fix RX hash usage by netstack

Jiasheng Jiang <[email protected]>
pstore/ram: Add check for kstrdup

Roberto Sassu <[email protected]>
ima: Fix build warnings

Roberto Sassu <[email protected]>
evm: Fix build warnings

Roberto Sassu <[email protected]>
evm: Complete description of evm_inode_setattr()

Mark Rutland <[email protected]>
locking/atomic: arm: fix sync ops

Juergen Gross <[email protected]>
x86/mm: Fix __swp_entry_to_pte() for Xen PV guests

Ravi Bangoria <[email protected]>
perf/ibs: Fix interface via core pmu events

Colin Ian King <[email protected]>
kselftest: vDSO: Fix accumulation of uninitialized ret when CLOCK_REALTIME is undefined

Qiuxu Zhuo <[email protected]>
rcu/rcuscale: Stop kfree_scale_thread thread(s) after unloading rcuscale

Qiuxu Zhuo <[email protected]>
rcu/rcuscale: Move rcu_scale_*() after kfree_scale_cleanup()

Paul E. McKenney <[email protected]>
rcuscale: Move shutdown from wait_event() to wait_event_idle()

Paul E. McKenney <[email protected]>
rcutorture: Correct name of use_softirq module parameter

Paul E. McKenney <[email protected]>
rcu-tasks: Stop rcu_tasks_invoke_cbs() from using never-onlined CPUs

Paul E. McKenney <[email protected]>
rcu: Make rcu_cpu_starting() rely on interrupts being disabled

Christophe JAILLET <[email protected]>
thermal/drivers/sun8i: Fix some error handling paths in sun8i_ths_probe()

Balsam CHIHI <[email protected]>
thermal/drivers/mediatek: Relocate driver to mediatek folder

Tero Kristo <[email protected]>
cpufreq: intel_pstate: Fix energy_performance_preference for passive

Arnd Bergmann <[email protected]>
ARM: 9303/1: kprobes: avoid missing-declaration warnings

Ulf Hansson <[email protected]>
PM: domains: Move the verification of in-params from genpd_add_device()

Zhang Rui <[email protected]>
powercap: RAPL: Fix CONFIG_IOSF_MBI dependency

Junhao He <[email protected]>
drivers/perf: hisi: Don't migrate perf to the CPU going to teardown

Kirill A. Shutemov <[email protected]>
x86/tdx: Fix race between set_memory_encrypted() and load_unaligned_zeropad()

Kirill A. Shutemov <[email protected]>
x86/mm: Allow guest.enc_status_change_prepare() to fail

Robin Murphy <[email protected]>
perf/arm-cmn: Fix DTC reset

Nikita Zhandarovich <[email protected]>
PM: domains: fix integer overflow issues in genpd_parse_state()

Feng Mingxi <[email protected]>
clocksource/drivers/cadence-ttc: Fix memory leak in ttc_timer_probe

Sebastian Andrzej Siewior <[email protected]>
tracing/timer: Add missing hrtimer modes to decode_hrtimer_mode().

Wen Yang <[email protected]>
tick/rcu: Fix bogus ratelimit condition

Thomas Gleixner <[email protected]>
posix-timers: Prevent RT livelock in itimer_delete()

Gao Xiang <[email protected]>
erofs: fix compact 4B support for 16k block size

Gao Xiang <[email protected]>
erofs: simplify iloc()

Chuck Lever <[email protected]>
svcrdma: Prevent page release when nothing was received

John Paul Adrian Glaubitz <[email protected]>
irqchip/jcore-aic: Fix missing allocation of IRQ descriptors

Antonio Borneo <[email protected]>
irqchip/stm32-exti: Fix warning on initialized field overwritten

Yu Kuai <[email protected]>
block: fix blktrace debugfs entries leakage

Yu Kuai <[email protected]>
md/raid1-10: submit write io directly if bitmap is not enabled

Yu Kuai <[email protected]>
md/raid1-10: factor out a helper to submit normal write

Yu Kuai <[email protected]>
md/raid1-10: factor out a helper to add bio to plug

Li Nan <[email protected]>
md/raid10: fix io loss while replacement replace rdev

Li Nan <[email protected]>
md/raid10: fix null-ptr-deref of mreplace in raid10_sync_request

Li Nan <[email protected]>
md/raid10: fix wrong setting of max_corr_read_errors

Li Nan <[email protected]>
md/raid10: fix overflow of md/safe_mode_delay

Li Nan <[email protected]>
md/raid10: check slab-out-of-bounds in md_bitmap_get_counter

Chaitanya Kulkarni <[email protected]>
nvme-core: fix dev_pm_qos memleak

Chaitanya Kulkarni <[email protected]>
nvme-core: add missing fault-injection cleanup

Sagi Grimberg <[email protected]>
nvme-auth: don't ignore key generation failures when initializing ctrl keys

Chaitanya Kulkarni <[email protected]>
nvme-core: fix memory leak in dhchap_ctrl_secret

Chaitanya Kulkarni <[email protected]>
nvme-core: fix memory leak in dhchap_secret_store

Sagi Grimberg <[email protected]>
nvme-auth: no need to reset chap contexts on re-authentication

Sagi Grimberg <[email protected]>
nvme-auth: remove symbol export from nvme_auth_reset

Sagi Grimberg <[email protected]>
nvme-auth: rename authentication work elements

Sagi Grimberg <[email protected]>
nvme-auth: rename __nvme_auth_[reset|free] to nvme_auth[reset|free]_dhchap

NeilBrown <[email protected]>
lockd: drop inappropriate svc_get() from locked_get()

Yu Kuai <[email protected]>
blk-mq: fix potential io hang by wrong 'wake_batch'

Arnd Bergmann <[email protected]>
virt: sevguest: Add CONFIG_CRYPTO dependency

Tom Lendacky <[email protected]>
x86/sev: Fix calculation of end address based on number of pages

Li Nan <[email protected]>
blk-iocost: use spin_lock_irqsave in adjust_inuse_and_calc_cost

Shawn Wang <[email protected]>
x86/resctrl: Only show tasks' pid in current pid namespace

Gao Xiang <[email protected]>
erofs: kill hooked chains to avoid loops on deduplicated compressed images

Gao Xiang <[email protected]>
erofs: move zdata.h into zdata.c

Gao Xiang <[email protected]>
erofs: remove tagged pointer helpers

Gao Xiang <[email protected]>
erofs: avoid tagged pointers to mark sync decompression

Gao Xiang <[email protected]>
erofs: clean up cached I/O strategies

Quoted 8 lines

Bart Van Assche <[email protected]>
block: Fix the type of the second bdev_op_is_zoned_write() argument

Arnd Bergmann <[email protected]>
fs: pipe: reveal missing function protoypes

Jeff Layton <[email protected]>

    drm: use mgr->dev in drm_dbg_kms in drm_dp_add_payload_part2

We're seeing build failures on i386 and x86 with Clang:
-----8<-----
/builds/linux/block/blk-cgroup.c:1238:6: error: variable 'ret' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]

        if (init_blkcg_llists(blkcg))
            ^~~~~~~~~~~~~~~~~~~~~~~~
/builds/linux/block/blk-cgroup.c:1288:9: note: uninitialized use occurs here
        return ret;
               ^~~
/builds/linux/block/blk-cgroup.c:1238:2: note: remove the 'if' if its
condition is always false
        if (init_blkcg_llists(blkcg))
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builds/linux/block/blk-cgroup.c:1223:33: note: initialize the
variable 'ret' to silence this warning
        struct cgroup_subsys_state *ret;
                                       ^
                                        = NULL

1 error generated.
----->8-----

More info to follow soon.

Greetings!

Daniel Díaz
[email protected]

#599 lore raw
Quoted 12 lines · Daniel Díaz

Hello!

Quoted 8 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 6.1.39 release. There are 591 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 Tue, 18 Jul 2023 19:48:07 +0000. Anything received after that time might be too late.

[ ... ]

Quoted 19 lines

We're seeing build failures on i386 and x86 with Clang:
-----8<-----
/builds/linux/block/blk-cgroup.c:1238:6: error: variable 'ret' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]

         if (init_blkcg_llists(blkcg))
             ^~~~~~~~~~~~~~~~~~~~~~~~
/builds/linux/block/blk-cgroup.c:1288:9: note: uninitialized use occurs here
         return ret;
                ^~~
/builds/linux/block/blk-cgroup.c:1238:2: note: remove the 'if' if its
condition is always false
         if (init_blkcg_llists(blkcg))
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builds/linux/block/blk-cgroup.c:1223:33: note: initialize the
variable 'ret' to silence this warning
         struct cgroup_subsys_state *ret;
                                        ^
                                         = NULL
Quoted 5 lines

1 error generated.
----->8-----

More info to follow soon.

Caused by 3b8cc6298724 ("blk-cgroup: Optimize blkcg_rstat_flush()") which is missing its prerequisite b5a9adcbd5dc ("blk-cgroup: Return -ENOMEM directly in blkcg_css_alloc() error path"). With three Fixup:
patches following, it is one of those patches where I wonder if it is worth the trouble.

Guenter

author maintainer
#600 lore raw
Quoted 36 lines · Guenter Roeck
Quoted 12 lines · Daniel Díaz

Hello!

Quoted 8 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 6.1.39 release. There are 591 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 Tue, 18 Jul 2023 19:48:07 +0000. Anything received after that time might be too late.

[ ... ]

Quoted 22 lines

We're seeing build failures on i386 and x86 with Clang:
-----8<-----
/builds/linux/block/blk-cgroup.c:1238:6: error: variable 'ret' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]

         if (init_blkcg_llists(blkcg))
             ^~~~~~~~~~~~~~~~~~~~~~~~
/builds/linux/block/blk-cgroup.c:1288:9: note: uninitialized use occurs here
         return ret;
                ^~~
/builds/linux/block/blk-cgroup.c:1238:2: note: remove the 'if' if its
condition is always false
         if (init_blkcg_llists(blkcg))
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builds/linux/block/blk-cgroup.c:1223:33: note: initialize the
variable 'ret' to silence this warning
         struct cgroup_subsys_state *ret;
                                        ^
                                         = NULL

1 error generated.
----->8-----

Quoted 8 lines
Quoted 2 lines

More info to follow soon.

Caused by 3b8cc6298724 ("blk-cgroup: Optimize blkcg_rstat_flush()") which is missing its prerequisite b5a9adcbd5dc ("blk-cgroup: Return -ENOMEM directly in blkcg_css_alloc() error path"). With three Fixup:
patches following, it is one of those patches where I wonder if it is worth the trouble.

Yeah, I'm going to just drop this mess for now, thanks. If the block developers think it is worth adding, let's get them to submit the working backports :)

greg k-h

Tested-by on the v1 series
#601 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.1.39 release. There are 591 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 Tue, 18 Jul 2023 19:48:07 +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.1.39-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.1.y
and the diffstat can be found below.

thanks,

greg k-h

6.1.39-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)

Thanks

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

Hey,

Quoted 4 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 6.1.39 release. There are 591 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.

Fails to build w/ clang on RISC-V:
block/blk-cgroup.c:1238:6: error: variable 'ret' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]

Guenter already pointed out the culprit.

Other than that,

Thanks,
Conor.

Tested-by on the v1 series
#603 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.1.39 release. There are 591 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 Tue, 18 Jul 2023 19:48:07 +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.1.39-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.1.y
and the diffstat can be found below.

thanks,

greg k-h

Compiled and booted on my test system. No dmesg regressions.

thanks,
-- Shuah