mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure
@ 2024-11-24 13:48 Sasha Levin
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 02/48] drm/vc4: hvs: Set AXI panic modes for the HVS Sasha Levin
                   ` (46 more replies)
  0 siblings, 47 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:48 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Dom Cobley, Maxime Ripard, Dave Stevenson, Sasha Levin,
	maarten.lankhorst, tzimmermann, airlied, simona, dri-devel

From: Dom Cobley <popcornmix@gmail.com>

[ Upstream commit b4e5646178e86665f5caef2894578600f597098a ]

We regularly get dmesg error reports of:
[   18.184066] hdmi-audio-codec hdmi-audio-codec.3.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19
[   18.184098]  MAI: soc_pcm_open() failed (-19)

These are generated for any disconnected hdmi interface when pulseaudio
attempts to open the associated ALSA device (numerous times). Each open
generates a kernel error message, generating general log spam.

The error messages all come from _soc_pcm_ret in sound/soc/soc-pcm.c#L39
which suggests returning ENOTSUPP, rather that ENODEV will be quiet.
And indeed it is.

Signed-off-by: Dom Cobley <popcornmix@gmail.com>
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240621152055.4180873-5-dave.stevenson@raspberrypi.com
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/vc4/vc4_hdmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
index 971801acbde60..51971035d8cbb 100644
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
@@ -2156,7 +2156,7 @@ static int vc4_hdmi_audio_startup(struct device *dev, void *data)
 	}
 
 	if (!vc4_hdmi_audio_can_stream(vc4_hdmi)) {
-		ret = -ENODEV;
+		ret = -ENOTSUPP;
 		goto out_dev_exit;
 	}
 
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 02/48] drm/vc4: hvs: Set AXI panic modes for the HVS
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
@ 2024-11-24 13:48 ` Sasha Levin
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 03/48] drm: panel-orientation-quirks: Add quirk for AYA NEO 2 model Sasha Levin
                   ` (45 subsequent siblings)
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:48 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Dave Stevenson, Maxime Ripard, Sasha Levin, maarten.lankhorst,
	tzimmermann, airlied, simona, dri-devel

From: Dave Stevenson <dave.stevenson@raspberrypi.com>

[ Upstream commit 014eccc9da7bfc76a3107fceea37dd60f1d63630 ]

The HVS can change AXI request mode based on how full the COB
FIFOs are.
Until now the vc4 driver has been relying on the firmware to
have set these to sensible values.

With HVS channel 2 now being used for live video, change the
panic mode for all channels to be explicitly set by the driver,
and the same for all channels.

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240621152055.4180873-7-dave.stevenson@raspberrypi.com
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/vc4/vc4_hvs.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/gpu/drm/vc4/vc4_hvs.c b/drivers/gpu/drm/vc4/vc4_hvs.c
index 47990ecbfc4df..89c621d35259d 100644
--- a/drivers/gpu/drm/vc4/vc4_hvs.c
+++ b/drivers/gpu/drm/vc4/vc4_hvs.c
@@ -906,6 +906,17 @@ static int vc4_hvs_bind(struct device *dev, struct device *master, void *data)
 			      SCALER_DISPCTRL_SCLEIRQ);
 
 
+	/* Set AXI panic mode.
+	 * VC4 panics when < 2 lines in FIFO.
+	 * VC5 panics when less than 1 line in the FIFO.
+	 */
+	dispctrl &= ~(SCALER_DISPCTRL_PANIC0_MASK |
+		      SCALER_DISPCTRL_PANIC1_MASK |
+		      SCALER_DISPCTRL_PANIC2_MASK);
+	dispctrl |= VC4_SET_FIELD(2, SCALER_DISPCTRL_PANIC0);
+	dispctrl |= VC4_SET_FIELD(2, SCALER_DISPCTRL_PANIC1);
+	dispctrl |= VC4_SET_FIELD(2, SCALER_DISPCTRL_PANIC2);
+
 	/* Set AXI panic mode.
 	 * VC4 panics when < 2 lines in FIFO.
 	 * VC5 panics when less than 1 line in the FIFO.
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 03/48] drm: panel-orientation-quirks: Add quirk for AYA NEO 2 model
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 02/48] drm/vc4: hvs: Set AXI panic modes for the HVS Sasha Levin
@ 2024-11-24 13:48 ` Sasha Levin
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 04/48] drm: panel-orientation-quirks: Add quirk for AYA NEO Founder edition Sasha Levin
                   ` (44 subsequent siblings)
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:48 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Joaquín Ignacio Aramendía, Tobias Jakobi,
	Dmitry Baryshkov, Hans de Goede, Sasha Levin, maarten.lankhorst,
	mripard, tzimmermann, airlied, simona, dri-devel

From: Joaquín Ignacio Aramendía <samsagax@gmail.com>

[ Upstream commit 361ebf5ef843b0aa1704c72eb26b91cf76c3c5b7 ]

Add quirk orientation for AYA NEO 2. The name appears without spaces in
DMI strings. That made it difficult to reuse the 2021 match. Also the
display is larger in resolution.

Tested by the JELOS team that has been patching their own kernel for a
while now and confirmed by users in the AYA NEO and ChimeraOS discord
servers.

Signed-off-by: Joaquín Ignacio Aramendía <samsagax@gmail.com>
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/2b35545b77a9fd8c9699b751ca282226dcecb1dd.1726492131.git.tjakobi@math.uni-bielefeld.de
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/drm_panel_orientation_quirks.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/drm_panel_orientation_quirks.c b/drivers/gpu/drm/drm_panel_orientation_quirks.c
index 5b2506c65e952..69a38e1034cad 100644
--- a/drivers/gpu/drm/drm_panel_orientation_quirks.c
+++ b/drivers/gpu/drm/drm_panel_orientation_quirks.c
@@ -184,6 +184,12 @@ static const struct dmi_system_id orientation_data[] = {
 		  DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T103HAF"),
 		},
 		.driver_data = (void *)&lcd800x1280_rightside_up,
+	}, {	/* AYA NEO AYANEO 2 */
+		.matches = {
+		  DMI_EXACT_MATCH(DMI_SYS_VENDOR, "AYANEO"),
+		  DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "AYANEO 2"),
+		},
+		.driver_data = (void *)&lcd1200x1920_rightside_up,
 	}, {	/* AYA NEO 2021 */
 		.matches = {
 		  DMI_EXACT_MATCH(DMI_SYS_VENDOR, "AYADEVICE"),
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 04/48] drm: panel-orientation-quirks: Add quirk for AYA NEO Founder edition
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 02/48] drm/vc4: hvs: Set AXI panic modes for the HVS Sasha Levin
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 03/48] drm: panel-orientation-quirks: Add quirk for AYA NEO 2 model Sasha Levin
@ 2024-11-24 13:48 ` Sasha Levin
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 05/48] drm: panel-orientation-quirks: Add quirk for AYA NEO GEEK Sasha Levin
                   ` (43 subsequent siblings)
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:48 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Joaquín Ignacio Aramendía, Tobias Jakobi,
	Dmitry Baryshkov, Hans de Goede, Sasha Levin, maarten.lankhorst,
	mripard, tzimmermann, airlied, simona, dri-devel

From: Joaquín Ignacio Aramendía <samsagax@gmail.com>

[ Upstream commit d7972d735ca80a40a571bf753c138263981a5698 ]

Add quirk orientation for AYA NEO Founder. The name appears with spaces in
DMI strings as other devices of the brand. The panel is the same as the
NEXT and 2021 models. Those could not be reused as the former has VENDOR
name as "AYANEO" without spaces and the latter has "AYADEVICE".

Tested by the JELOS team that has been patching their own kernel for a
while now and confirmed by users in the AYA NEO and ChimeraOS discord
servers.

Signed-off-by: Joaquín Ignacio Aramendía <samsagax@gmail.com>
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/f71889a0b39f13f4b78481bd030377ca15035680.1726492131.git.tjakobi@math.uni-bielefeld.de
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/drm_panel_orientation_quirks.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/drm_panel_orientation_quirks.c b/drivers/gpu/drm/drm_panel_orientation_quirks.c
index 69a38e1034cad..87ab8009c8fd4 100644
--- a/drivers/gpu/drm/drm_panel_orientation_quirks.c
+++ b/drivers/gpu/drm/drm_panel_orientation_quirks.c
@@ -202,6 +202,12 @@ static const struct dmi_system_id orientation_data[] = {
 		  DMI_MATCH(DMI_PRODUCT_NAME, "AIR"),
 		},
 		.driver_data = (void *)&lcd1080x1920_leftside_up,
+	}, {	/* AYA NEO Founder */
+		.matches = {
+		  DMI_EXACT_MATCH(DMI_SYS_VENDOR, "AYA NEO"),
+		  DMI_MATCH(DMI_PRODUCT_NAME, "AYA NEO Founder"),
+		},
+		.driver_data = (void *)&lcd800x1280_rightside_up,
 	}, {	/* AYA NEO NEXT */
 		.matches = {
 		  DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AYANEO"),
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 05/48] drm: panel-orientation-quirks: Add quirk for AYA NEO GEEK
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
                   ` (2 preceding siblings ...)
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 04/48] drm: panel-orientation-quirks: Add quirk for AYA NEO Founder edition Sasha Levin
@ 2024-11-24 13:48 ` Sasha Levin
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 06/48] drm/bridge: it6505: Enable module autoloading Sasha Levin
                   ` (42 subsequent siblings)
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:48 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Joaquín Ignacio Aramendía, Tobias Jakobi,
	Dmitry Baryshkov, Hans de Goede, Sasha Levin, maarten.lankhorst,
	mripard, tzimmermann, airlied, simona, dri-devel

From: Joaquín Ignacio Aramendía <samsagax@gmail.com>

[ Upstream commit 428656feb972ca99200fc127b5aecb574efd9d3d ]

Add quirk orientation for AYA NEO GEEK. The name appears without
spaces in DMI strings. The board name is completely different to
the previous models making it difficult to reuse their quirks
despite being the same resolution and using the same orientation.

Tested by the JELOS team that has been patching their own kernel for a
while now and confirmed by users in the AYA NEO and ChimeraOS discord
servers.

Signed-off-by: Joaquín Ignacio Aramendía <samsagax@gmail.com>
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/40350b0d63fe2b54e7cba1e14be50917203f0079.1726492131.git.tjakobi@math.uni-bielefeld.de
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/drm_panel_orientation_quirks.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/drm_panel_orientation_quirks.c b/drivers/gpu/drm/drm_panel_orientation_quirks.c
index 87ab8009c8fd4..acf2dd02aad14 100644
--- a/drivers/gpu/drm/drm_panel_orientation_quirks.c
+++ b/drivers/gpu/drm/drm_panel_orientation_quirks.c
@@ -208,6 +208,12 @@ static const struct dmi_system_id orientation_data[] = {
 		  DMI_MATCH(DMI_PRODUCT_NAME, "AYA NEO Founder"),
 		},
 		.driver_data = (void *)&lcd800x1280_rightside_up,
+	}, {	/* AYA NEO GEEK */
+		.matches = {
+		  DMI_EXACT_MATCH(DMI_SYS_VENDOR, "AYANEO"),
+		  DMI_MATCH(DMI_PRODUCT_NAME, "GEEK"),
+		},
+		.driver_data = (void *)&lcd800x1280_rightside_up,
 	}, {	/* AYA NEO NEXT */
 		.matches = {
 		  DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AYANEO"),
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 06/48] drm/bridge: it6505: Enable module autoloading
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
                   ` (3 preceding siblings ...)
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 05/48] drm: panel-orientation-quirks: Add quirk for AYA NEO GEEK Sasha Levin
@ 2024-11-24 13:48 ` Sasha Levin
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 07/48] drm/mcde: " Sasha Levin
                   ` (41 subsequent siblings)
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:48 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Liao Chen, Neil Armstrong, Dmitry Baryshkov, Sasha Levin,
	andrzej.hajda, rfoss, maarten.lankhorst, mripard, tzimmermann,
	airlied, simona, dri-devel

From: Liao Chen <liaochen4@huawei.com>

[ Upstream commit 1e2ab24cd708b1c864ff983ee1504c0a409d2f8e ]

Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based
on the alias from of_device_id table.

Signed-off-by: Liao Chen <liaochen4@huawei.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240902113320.903147-2-liaochen4@huawei.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/bridge/ite-it6505.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/bridge/ite-it6505.c b/drivers/gpu/drm/bridge/ite-it6505.c
index 292c4f6da04af..6932e7364d90c 100644
--- a/drivers/gpu/drm/bridge/ite-it6505.c
+++ b/drivers/gpu/drm/bridge/ite-it6505.c
@@ -3349,6 +3349,7 @@ static const struct of_device_id it6505_of_match[] = {
 	{ .compatible = "ite,it6505" },
 	{ }
 };
+MODULE_DEVICE_TABLE(of, it6505_of_match);
 
 static struct i2c_driver it6505_i2c_driver = {
 	.driver = {
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 07/48] drm/mcde: Enable module autoloading
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
                   ` (4 preceding siblings ...)
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 06/48] drm/bridge: it6505: Enable module autoloading Sasha Levin
@ 2024-11-24 13:48 ` Sasha Levin
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 08/48] drm/radeon/r600_cs: Fix possible int overflow in r600_packet3_check() Sasha Levin
                   ` (40 subsequent siblings)
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:48 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Liao Chen, Linus Walleij, Dmitry Baryshkov, Sasha Levin,
	maarten.lankhorst, mripard, tzimmermann, airlied, simona,
	dri-devel

From: Liao Chen <liaochen4@huawei.com>

[ Upstream commit 8a16b5cdae26207ff4c22834559384ad3d7bc970 ]

Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based
on the alias from of_device_id table.

Signed-off-by: Liao Chen <liaochen4@huawei.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240902113320.903147-4-liaochen4@huawei.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/mcde/mcde_drv.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/mcde/mcde_drv.c b/drivers/gpu/drm/mcde/mcde_drv.c
index 1c4482ad507d9..78bdfd855d11b 100644
--- a/drivers/gpu/drm/mcde/mcde_drv.c
+++ b/drivers/gpu/drm/mcde/mcde_drv.c
@@ -468,6 +468,7 @@ static const struct of_device_id mcde_of_match[] = {
 	},
 	{},
 };
+MODULE_DEVICE_TABLE(of, mcde_of_match);
 
 static struct platform_driver mcde_driver = {
 	.driver = {
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 08/48] drm/radeon/r600_cs: Fix possible int overflow in r600_packet3_check()
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
                   ` (5 preceding siblings ...)
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 07/48] drm/mcde: " Sasha Levin
@ 2024-11-24 13:48 ` Sasha Levin
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 09/48] drm/display: Fix building with GCC 15 Sasha Levin
                   ` (39 subsequent siblings)
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:48 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Igor Artemiev, Alex Deucher, Sasha Levin, christian.koenig,
	Xinhui.Pan, airlied, simona, amd-gfx, dri-devel

From: Igor Artemiev <Igor.A.Artemiev@mcst.ru>

[ Upstream commit a1e2da6a5072f8abe5b0feaa91a5bcd9dc544a04 ]

It is possible, although unlikely, that an integer overflow will occur
when the result of radeon_get_ib_value() is shifted to the left.

Avoid it by casting one of the operands to larger data type (u64).

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

Signed-off-by: Igor Artemiev <Igor.A.Artemiev@mcst.ru>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/radeon/r600_cs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/radeon/r600_cs.c b/drivers/gpu/drm/radeon/r600_cs.c
index 6cf54a747749d..780352f794e91 100644
--- a/drivers/gpu/drm/radeon/r600_cs.c
+++ b/drivers/gpu/drm/radeon/r600_cs.c
@@ -2104,7 +2104,7 @@ static int r600_packet3_check(struct radeon_cs_parser *p,
 				return -EINVAL;
 			}
 
-			offset = radeon_get_ib_value(p, idx+1) << 8;
+			offset = (u64)radeon_get_ib_value(p, idx+1) << 8;
 			if (offset != track->vgt_strmout_bo_offset[idx_value]) {
 				DRM_ERROR("bad STRMOUT_BASE_UPDATE, bo offset does not match: 0x%llx, 0x%x\n",
 					  offset, track->vgt_strmout_bo_offset[idx_value]);
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 09/48] drm/display: Fix building with GCC 15
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
                   ` (6 preceding siblings ...)
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 08/48] drm/radeon/r600_cs: Fix possible int overflow in r600_packet3_check() Sasha Levin
@ 2024-11-24 13:48 ` Sasha Levin
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 10/48] r8169: don't apply UDP padding quirk on RTL8126A Sasha Levin
                   ` (38 subsequent siblings)
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:48 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Brahmajit Das, Jani Nikula, Sasha Levin, maarten.lankhorst,
	mripard, tzimmermann, airlied, simona, dmitry.baryshkov, rdunlap,
	oleksandr, dri-devel

From: Brahmajit Das <brahmajit.xyz@gmail.com>

[ Upstream commit a500f3751d3c861be7e4463c933cf467240cca5d ]

GCC 15 enables -Werror=unterminated-string-initialization by default.
This results in the following build error

drivers/gpu/drm/display/drm_dp_dual_mode_helper.c: In function ‘is_hdmi_adaptor’:
drivers/gpu/drm/display/drm_dp_dual_mode_helper.c:164:17: error: initializer-string for array of
 ‘char’ is too long [-Werror=unterminated-string-initialization]
  164 |                 "DP-HDMI ADAPTOR\x04";
      |                 ^~~~~~~~~~~~~~~~~~~~~

After discussion with Ville, the fix was to increase the size of
dp_dual_mode_hdmi_id array by one, so that it can accommodate the NULL
line character. This should let us build the kernel with GCC 15.

Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241002092311.942822-1-brahmajit.xyz@gmail.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/display/drm_dp_dual_mode_helper.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/display/drm_dp_dual_mode_helper.c b/drivers/gpu/drm/display/drm_dp_dual_mode_helper.c
index bd61e20770a5b..719da3610310f 100644
--- a/drivers/gpu/drm/display/drm_dp_dual_mode_helper.c
+++ b/drivers/gpu/drm/display/drm_dp_dual_mode_helper.c
@@ -160,11 +160,11 @@ EXPORT_SYMBOL(drm_dp_dual_mode_write);
 
 static bool is_hdmi_adaptor(const char hdmi_id[DP_DUAL_MODE_HDMI_ID_LEN])
 {
-	static const char dp_dual_mode_hdmi_id[DP_DUAL_MODE_HDMI_ID_LEN] =
+	static const char dp_dual_mode_hdmi_id[DP_DUAL_MODE_HDMI_ID_LEN + 1] =
 		"DP-HDMI ADAPTOR\x04";
 
 	return memcmp(hdmi_id, dp_dual_mode_hdmi_id,
-		      sizeof(dp_dual_mode_hdmi_id)) == 0;
+		      DP_DUAL_MODE_HDMI_ID_LEN) == 0;
 }
 
 static bool is_type1_adaptor(uint8_t adaptor_id)
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 10/48] r8169: don't apply UDP padding quirk on RTL8126A
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
                   ` (7 preceding siblings ...)
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 09/48] drm/display: Fix building with GCC 15 Sasha Levin
@ 2024-11-24 13:48 ` Sasha Levin
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 11/48] samples/bpf: Fix a resource leak Sasha Levin
                   ` (37 subsequent siblings)
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:48 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Heiner Kallweit, Simon Horman, Jakub Kicinski, Sasha Levin,
	nic_swsd, andrew+netdev, davem, edumazet, pabeni, netdev

From: Heiner Kallweit <hkallweit1@gmail.com>

[ Upstream commit 87e26448dbda4523b73a894d96f0f788506d3795 ]

Vendor drivers r8125/r8126 indicate that this quirk isn't needed
any longer for RTL8126A. Mimic this in r8169.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/d1317187-aa81-4a69-b831-678436e4de62@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/ethernet/realtek/r8169_main.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index a74e33bf0302e..4b461e93ffe9d 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -4139,8 +4139,8 @@ static unsigned int rtl8125_quirk_udp_padto(struct rtl8169_private *tp,
 {
 	unsigned int padto = 0, len = skb->len;
 
-	if (rtl_is_8125(tp) && len < 128 + RTL_MIN_PATCH_LEN &&
-	    rtl_skb_is_udp(skb) && skb_transport_header_was_set(skb)) {
+	if (len < 128 + RTL_MIN_PATCH_LEN && rtl_skb_is_udp(skb) &&
+	    skb_transport_header_was_set(skb)) {
 		unsigned int trans_data_len = skb_tail_pointer(skb) -
 					      skb_transport_header(skb);
 
@@ -4164,9 +4164,15 @@ static unsigned int rtl8125_quirk_udp_padto(struct rtl8169_private *tp,
 static unsigned int rtl_quirk_packet_padto(struct rtl8169_private *tp,
 					   struct sk_buff *skb)
 {
-	unsigned int padto;
+	unsigned int padto = 0;
 
-	padto = rtl8125_quirk_udp_padto(tp, skb);
+	switch (tp->mac_version) {
+	case RTL_GIGA_MAC_VER_61 ... RTL_GIGA_MAC_VER_63:
+		padto = rtl8125_quirk_udp_padto(tp, skb);
+		break;
+	default:
+		break;
+	}
 
 	switch (tp->mac_version) {
 	case RTL_GIGA_MAC_VER_34:
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 11/48] samples/bpf: Fix a resource leak
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
                   ` (8 preceding siblings ...)
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 10/48] r8169: don't apply UDP padding quirk on RTL8126A Sasha Levin
@ 2024-11-24 13:48 ` Sasha Levin
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 12/48] net: fec_mpc52xx_phy: Use %pa to format resource_size_t Sasha Levin
                   ` (36 subsequent siblings)
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:48 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Zhu Jun, Andrii Nakryiko, Sasha Levin, ast, daniel, bpf

From: Zhu Jun <zhujun2@cmss.chinamobile.com>

[ Upstream commit f3ef53174b23246fe9bc2bbc2542f3a3856fa1e2 ]

The opened file should be closed in show_sockopts(), otherwise resource
leak will occur that this problem was discovered by reading code

Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20241010014126.2573-1-zhujun2@cmss.chinamobile.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 samples/bpf/test_cgrp2_sock.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/samples/bpf/test_cgrp2_sock.c b/samples/bpf/test_cgrp2_sock.c
index a0811df888f45..8ca2a445ffa15 100644
--- a/samples/bpf/test_cgrp2_sock.c
+++ b/samples/bpf/test_cgrp2_sock.c
@@ -178,8 +178,10 @@ static int show_sockopts(int family)
 		return 1;
 	}
 
-	if (get_bind_to_device(sd, name, sizeof(name)) < 0)
+	if (get_bind_to_device(sd, name, sizeof(name)) < 0) {
+		close(sd);
 		return 1;
+	}
 
 	mark = get_somark(sd);
 	prio = get_priority(sd);
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 12/48] net: fec_mpc52xx_phy: Use %pa to format resource_size_t
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
                   ` (9 preceding siblings ...)
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 11/48] samples/bpf: Fix a resource leak Sasha Levin
@ 2024-11-24 13:48 ` Sasha Levin
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 13/48] net: ethernet: fs_enet: " Sasha Levin
                   ` (35 subsequent siblings)
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:48 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Simon Horman, Geert Uytterhoeven, Daniel Machon, Jakub Kicinski,
	Sasha Levin, andrew+netdev, davem, edumazet, pabeni,
	u.kleine-koenig, netdev

From: Simon Horman <horms@kernel.org>

[ Upstream commit 020bfdc4ed94be472138c891bde4d14241cf00fd ]

The correct format string for resource_size_t is %pa which
acts on the address of the variable to be formatted [1].

[1] https://elixir.bootlin.com/linux/v6.11.3/source/Documentation/core-api/printk-formats.rst#L229

Introduced by commit 9d9326d3bc0e ("phy: Change mii_bus id field to a string")

Flagged by gcc-14 as:

drivers/net/ethernet/freescale/fec_mpc52xx_phy.c: In function 'mpc52xx_fec_mdio_probe':
drivers/net/ethernet/freescale/fec_mpc52xx_phy.c:97:46: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t' {aka 'long long unsigned int'} [-Wformat=]
   97 |         snprintf(bus->id, MII_BUS_ID_SIZE, "%x", res.start);
      |                                             ~^   ~~~~~~~~~
      |                                              |      |
      |                                              |      resource_size_t {aka long long unsigned int}
      |                                              unsigned int
      |                                             %llx

No functional change intended.
Compile tested only.

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Closes: https://lore.kernel.org/netdev/711d7f6d-b785-7560-f4dc-c6aad2cce99@linux-m68k.org/
Signed-off-by: Simon Horman <horms@kernel.org>
Reviewed-by: Daniel Machon <daniel.machon@microchip.com>
Link: https://patch.msgid.link/20241014-net-pa-fmt-v1-1-dcc9afb8858b@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/ethernet/freescale/fec_mpc52xx_phy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/freescale/fec_mpc52xx_phy.c b/drivers/net/ethernet/freescale/fec_mpc52xx_phy.c
index 95f778cce98cb..e4911a76f08eb 100644
--- a/drivers/net/ethernet/freescale/fec_mpc52xx_phy.c
+++ b/drivers/net/ethernet/freescale/fec_mpc52xx_phy.c
@@ -93,7 +93,7 @@ static int mpc52xx_fec_mdio_probe(struct platform_device *of)
 		goto out_free;
 	}
 
-	snprintf(bus->id, MII_BUS_ID_SIZE, "%x", res.start);
+	snprintf(bus->id, MII_BUS_ID_SIZE, "%pa", &res.start);
 	bus->priv = priv;
 
 	bus->parent = dev;
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 13/48] net: ethernet: fs_enet: Use %pa to format resource_size_t
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
                   ` (10 preceding siblings ...)
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 12/48] net: fec_mpc52xx_phy: Use %pa to format resource_size_t Sasha Levin
@ 2024-11-24 13:48 ` Sasha Levin
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 14/48] net/sched: cbs: Fix integer overflow in cbs_set_port_rate() Sasha Levin
                   ` (34 subsequent siblings)
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:48 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Simon Horman, Geert Uytterhoeven, Daniel Machon, Jakub Kicinski,
	Sasha Levin, pantelis.antoniou, andrew+netdev, davem, edumazet,
	pabeni, linuxppc-dev, netdev

From: Simon Horman <horms@kernel.org>

[ Upstream commit 45fe45fada261e1e83fce2a07fa22835aec1cf0a ]

The correct format string for resource_size_t is %pa which
acts on the address of the variable to be formatted [1].

[1] https://elixir.bootlin.com/linux/v6.11.3/source/Documentation/core-api/printk-formats.rst#L229

Introduced by commit 9d9326d3bc0e ("phy: Change mii_bus id field to a string")

Flagged by gcc-14 as:

drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c: In function 'fs_mii_bitbang_init':
drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c:126:46: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t' {aka 'long long unsigned int'} [-Wformat=]
  126 |         snprintf(bus->id, MII_BUS_ID_SIZE, "%x", res.start);
      |                                             ~^   ~~~~~~~~~
      |                                              |      |
      |                                              |      resource_size_t {aka long long unsigned int}
      |                                              unsigned int
      |                                             %llx

No functional change intended.
Compile tested only.

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Closes: https://lore.kernel.org/netdev/711d7f6d-b785-7560-f4dc-c6aad2cce99@linux-m68k.org/
Signed-off-by: Simon Horman <horms@kernel.org>
Reviewed-by: Daniel Machon <daniel.machon@microchip.com>
Link: https://patch.msgid.link/20241014-net-pa-fmt-v1-2-dcc9afb8858b@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c b/drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c
index 21de56345503f..f743112730194 100644
--- a/drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c
+++ b/drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c
@@ -126,7 +126,7 @@ static int fs_mii_bitbang_init(struct mii_bus *bus, struct device_node *np)
 	 * we get is an int, and the odds of multiple bitbang mdio buses
 	 * is low enough that it's not worth going too crazy.
 	 */
-	snprintf(bus->id, MII_BUS_ID_SIZE, "%x", res.start);
+	snprintf(bus->id, MII_BUS_ID_SIZE, "%pa", &res.start);
 
 	data = of_get_property(np, "fsl,mdio-pin", &len);
 	if (!data || len != 4)
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 14/48] net/sched: cbs: Fix integer overflow in cbs_set_port_rate()
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
                   ` (11 preceding siblings ...)
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 13/48] net: ethernet: fs_enet: " Sasha Levin
@ 2024-11-24 13:48 ` Sasha Levin
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 15/48] af_packet: avoid erroring out after sock_init_data() in packet_create() Sasha Levin
                   ` (33 subsequent siblings)
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:48 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Elena Salomatkina, Jakub Kicinski, Sasha Levin, vinicius.gomes,
	jhs, xiyou.wangcong, jiri, davem, edumazet, pabeni, netdev

From: Elena Salomatkina <esalomatkina@ispras.ru>

[ Upstream commit 397006ba5d918f9b74e734867e8fddbc36dc2282 ]

The subsequent calculation of port_rate = speed * 1000 * BYTES_PER_KBIT,
where the BYTES_PER_KBIT is of type LL, may cause an overflow.
At least when speed = SPEED_20000, the expression to the left of port_rate
will be greater than INT_MAX.

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

Signed-off-by: Elena Salomatkina <esalomatkina@ispras.ru>
Link: https://patch.msgid.link/20241013124529.1043-1-esalomatkina@ispras.ru
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/sched/sch_cbs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/sched/sch_cbs.c b/net/sched/sch_cbs.c
index cac870eb78973..0567a15d0f850 100644
--- a/net/sched/sch_cbs.c
+++ b/net/sched/sch_cbs.c
@@ -310,7 +310,7 @@ static void cbs_set_port_rate(struct net_device *dev, struct cbs_sched_data *q)
 {
 	struct ethtool_link_ksettings ecmd;
 	int speed = SPEED_10;
-	int port_rate;
+	s64 port_rate;
 	int err;
 
 	err = __ethtool_get_link_ksettings(dev, &ecmd);
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 15/48] af_packet: avoid erroring out after sock_init_data() in packet_create()
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
                   ` (12 preceding siblings ...)
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 14/48] net/sched: cbs: Fix integer overflow in cbs_set_port_rate() Sasha Levin
@ 2024-11-24 13:48 ` Sasha Levin
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 16/48] Bluetooth: L2CAP: do not leave dangling sk pointer on error in l2cap_sock_create() Sasha Levin
                   ` (32 subsequent siblings)
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:48 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Ignat Korchagin, Eric Dumazet, Kuniyuki Iwashima,
	Willem de Bruijn, Jakub Kicinski, Sasha Levin,
	willemdebruijn.kernel, davem, pabeni, netdev

From: Ignat Korchagin <ignat@cloudflare.com>

[ Upstream commit 46f2a11cb82b657fd15bab1c47821b635e03838b ]

After sock_init_data() the allocated sk object is attached to the provided
sock object. On error, packet_create() frees the sk object leaving the
dangling pointer in the sock object on return. Some other code may try
to use this pointer and cause use-after-free.

Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Ignat Korchagin <ignat@cloudflare.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20241014153808.51894-2-ignat@cloudflare.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/packet/af_packet.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index c9c813f731c6e..9da9e41899c65 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -3418,18 +3418,18 @@ static int packet_create(struct net *net, struct socket *sock, int protocol,
 	if (sock->type == SOCK_PACKET)
 		sock->ops = &packet_ops_spkt;
 
+	po = pkt_sk(sk);
+	err = packet_alloc_pending(po);
+	if (err)
+		goto out_sk_free;
+
 	sock_init_data(sock, sk);
 
-	po = pkt_sk(sk);
 	init_completion(&po->skb_completion);
 	sk->sk_family = PF_PACKET;
 	po->num = proto;
 	po->xmit = dev_queue_xmit;
 
-	err = packet_alloc_pending(po);
-	if (err)
-		goto out2;
-
 	packet_cached_dev_reset(po);
 
 	sk->sk_destruct = packet_sock_destruct;
@@ -3462,7 +3462,7 @@ static int packet_create(struct net *net, struct socket *sock, int protocol,
 	sock_prot_inuse_add(net, &packet_proto, 1);
 
 	return 0;
-out2:
+out_sk_free:
 	sk_free(sk);
 out:
 	return err;
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 16/48] Bluetooth: L2CAP: do not leave dangling sk pointer on error in l2cap_sock_create()
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
                   ` (13 preceding siblings ...)
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 15/48] af_packet: avoid erroring out after sock_init_data() in packet_create() Sasha Levin
@ 2024-11-24 13:48 ` Sasha Levin
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 17/48] Bluetooth: RFCOMM: avoid leaving dangling sk pointer in rfcomm_sock_alloc() Sasha Levin
                   ` (31 subsequent siblings)
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:48 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Ignat Korchagin, Kuniyuki Iwashima, Eric Dumazet, Jakub Kicinski,
	Sasha Levin, marcel, johan.hedberg, luiz.dentz, linux-bluetooth

From: Ignat Korchagin <ignat@cloudflare.com>

[ Upstream commit 7c4f78cdb8e7501e9f92d291a7d956591bf73be9 ]

bt_sock_alloc() allocates the sk object and attaches it to the provided
sock object. On error l2cap_sock_alloc() frees the sk object, but the
dangling pointer is still attached to the sock object, which may create
use-after-free in other code.

Signed-off-by: Ignat Korchagin <ignat@cloudflare.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20241014153808.51894-3-ignat@cloudflare.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/bluetooth/l2cap_sock.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
index b17782dc513b5..4e965916c17c1 100644
--- a/net/bluetooth/l2cap_sock.c
+++ b/net/bluetooth/l2cap_sock.c
@@ -1920,6 +1920,7 @@ static struct sock *l2cap_sock_alloc(struct net *net, struct socket *sock,
 	chan = l2cap_chan_create();
 	if (!chan) {
 		sk_free(sk);
+		sock->sk = NULL;
 		return NULL;
 	}
 
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 17/48] Bluetooth: RFCOMM: avoid leaving dangling sk pointer in rfcomm_sock_alloc()
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
                   ` (14 preceding siblings ...)
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 16/48] Bluetooth: L2CAP: do not leave dangling sk pointer on error in l2cap_sock_create() Sasha Levin
@ 2024-11-24 13:48 ` Sasha Levin
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 18/48] net: af_can: do not leave a dangling sk pointer in can_create() Sasha Levin
                   ` (30 subsequent siblings)
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:48 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Ignat Korchagin, Kuniyuki Iwashima, Eric Dumazet, Jakub Kicinski,
	Sasha Levin, marcel, johan.hedberg, luiz.dentz, andrew.shadura,
	axboe, linux-bluetooth

From: Ignat Korchagin <ignat@cloudflare.com>

[ Upstream commit 3945c799f12b8d1f49a3b48369ca494d981ac465 ]

bt_sock_alloc() attaches allocated sk object to the provided sock object.
If rfcomm_dlc_alloc() fails, we release the sk object, but leave the
dangling pointer in the sock object, which may cause use-after-free.

Fix this by swapping calls to bt_sock_alloc() and rfcomm_dlc_alloc().

Signed-off-by: Ignat Korchagin <ignat@cloudflare.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20241014153808.51894-4-ignat@cloudflare.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/bluetooth/rfcomm/sock.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/net/bluetooth/rfcomm/sock.c b/net/bluetooth/rfcomm/sock.c
index cbff37b327340..c32a2374638b7 100644
--- a/net/bluetooth/rfcomm/sock.c
+++ b/net/bluetooth/rfcomm/sock.c
@@ -274,13 +274,13 @@ static struct sock *rfcomm_sock_alloc(struct net *net, struct socket *sock,
 	struct rfcomm_dlc *d;
 	struct sock *sk;
 
-	sk = bt_sock_alloc(net, sock, &rfcomm_proto, proto, prio, kern);
-	if (!sk)
+	d = rfcomm_dlc_alloc(prio);
+	if (!d)
 		return NULL;
 
-	d = rfcomm_dlc_alloc(prio);
-	if (!d) {
-		sk_free(sk);
+	sk = bt_sock_alloc(net, sock, &rfcomm_proto, proto, prio, kern);
+	if (!sk) {
+		rfcomm_dlc_free(d);
 		return NULL;
 	}
 
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 18/48] net: af_can: do not leave a dangling sk pointer in can_create()
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
                   ` (15 preceding siblings ...)
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 17/48] Bluetooth: RFCOMM: avoid leaving dangling sk pointer in rfcomm_sock_alloc() Sasha Levin
@ 2024-11-24 13:48 ` Sasha Levin
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 19/48] net: ieee802154: do not leave a dangling sk pointer in ieee802154_create() Sasha Levin
                   ` (29 subsequent siblings)
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:48 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Ignat Korchagin, Vincent Mailhol, Kuniyuki Iwashima,
	Marc Kleine-Budde, Jakub Kicinski, Sasha Levin, socketcan,
	linux-can

From: Ignat Korchagin <ignat@cloudflare.com>

[ Upstream commit 811a7ca7320c062e15d0f5b171fe6ad8592d1434 ]

On error can_create() frees the allocated sk object, but sock_init_data()
has already attached it to the provided sock object. This will leave a
dangling sk pointer in the sock object and may cause use-after-free later.

Signed-off-by: Ignat Korchagin <ignat@cloudflare.com>
Reviewed-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: Marc Kleine-Budde <mkl@pengutronix.de>
Link: https://patch.msgid.link/20241014153808.51894-5-ignat@cloudflare.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/can/af_can.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/can/af_can.c b/net/can/af_can.c
index c69168f11e44a..7d8543e877b44 100644
--- a/net/can/af_can.c
+++ b/net/can/af_can.c
@@ -171,6 +171,7 @@ static int can_create(struct net *net, struct socket *sock, int protocol,
 		/* release sk on errors */
 		sock_orphan(sk);
 		sock_put(sk);
+		sock->sk = NULL;
 	}
 
  errout:
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 19/48] net: ieee802154: do not leave a dangling sk pointer in ieee802154_create()
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
                   ` (16 preceding siblings ...)
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 18/48] net: af_can: do not leave a dangling sk pointer in can_create() Sasha Levin
@ 2024-11-24 13:48 ` Sasha Levin
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 20/48] net: inet: do not leave a dangling sk pointer in inet_create() Sasha Levin
                   ` (28 subsequent siblings)
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:48 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Ignat Korchagin, Miquel Raynal, Kuniyuki Iwashima, Eric Dumazet,
	Jakub Kicinski, Sasha Levin, alex.aring, stefan, davem, pabeni,
	linux-wpan, netdev

From: Ignat Korchagin <ignat@cloudflare.com>

[ Upstream commit b4fcd63f6ef79c73cafae8cf4a114def5fc3d80d ]

sock_init_data() attaches the allocated sk object to the provided sock
object. If ieee802154_create() fails later, the allocated sk object is
freed, but the dangling pointer remains in the provided sock object, which
may allow use-after-free.

Clear the sk pointer in the sock object on error.

Signed-off-by: Ignat Korchagin <ignat@cloudflare.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20241014153808.51894-6-ignat@cloudflare.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/ieee802154/socket.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/net/ieee802154/socket.c b/net/ieee802154/socket.c
index 1fa2fe041ec03..9f74be2aad000 100644
--- a/net/ieee802154/socket.c
+++ b/net/ieee802154/socket.c
@@ -1046,19 +1046,21 @@ static int ieee802154_create(struct net *net, struct socket *sock,
 
 	if (sk->sk_prot->hash) {
 		rc = sk->sk_prot->hash(sk);
-		if (rc) {
-			sk_common_release(sk);
-			goto out;
-		}
+		if (rc)
+			goto out_sk_release;
 	}
 
 	if (sk->sk_prot->init) {
 		rc = sk->sk_prot->init(sk);
 		if (rc)
-			sk_common_release(sk);
+			goto out_sk_release;
 	}
 out:
 	return rc;
+out_sk_release:
+	sk_common_release(sk);
+	sock->sk = NULL;
+	goto out;
 }
 
 static const struct net_proto_family ieee802154_family_ops = {
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 20/48] net: inet: do not leave a dangling sk pointer in inet_create()
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
                   ` (17 preceding siblings ...)
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 19/48] net: ieee802154: do not leave a dangling sk pointer in ieee802154_create() Sasha Levin
@ 2024-11-24 13:48 ` Sasha Levin
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 21/48] net: inet6: do not leave a dangling sk pointer in inet6_create() Sasha Levin
                   ` (27 subsequent siblings)
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:48 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Ignat Korchagin, Kuniyuki Iwashima, Eric Dumazet, Jakub Kicinski,
	Sasha Levin, davem, dsahern, pabeni, netdev

From: Ignat Korchagin <ignat@cloudflare.com>

[ Upstream commit 9365fa510c6f82e3aa550a09d0c5c6b44dbc78ff ]

sock_init_data() attaches the allocated sk object to the provided sock
object. If inet_create() fails later, the sk object is freed, but the
sock object retains the dangling pointer, which may create use-after-free
later.

Clear the sk pointer in the sock object on error.

Signed-off-by: Ignat Korchagin <ignat@cloudflare.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20241014153808.51894-7-ignat@cloudflare.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/ipv4/af_inet.c | 22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index cc013be9b02c4..4f3c932e37ed5 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -371,32 +371,30 @@ static int inet_create(struct net *net, struct socket *sock, int protocol,
 		inet->inet_sport = htons(inet->inet_num);
 		/* Add to protocol hash chains. */
 		err = sk->sk_prot->hash(sk);
-		if (err) {
-			sk_common_release(sk);
-			goto out;
-		}
+		if (err)
+			goto out_sk_release;
 	}
 
 	if (sk->sk_prot->init) {
 		err = sk->sk_prot->init(sk);
-		if (err) {
-			sk_common_release(sk);
-			goto out;
-		}
+		if (err)
+			goto out_sk_release;
 	}
 
 	if (!kern) {
 		err = BPF_CGROUP_RUN_PROG_INET_SOCK(sk);
-		if (err) {
-			sk_common_release(sk);
-			goto out;
-		}
+		if (err)
+			goto out_sk_release;
 	}
 out:
 	return err;
 out_rcu_unlock:
 	rcu_read_unlock();
 	goto out;
+out_sk_release:
+	sk_common_release(sk);
+	sock->sk = NULL;
+	goto out;
 }
 
 
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 21/48] net: inet6: do not leave a dangling sk pointer in inet6_create()
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
                   ` (18 preceding siblings ...)
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 20/48] net: inet: do not leave a dangling sk pointer in inet_create() Sasha Levin
@ 2024-11-24 13:48 ` Sasha Levin
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 22/48] wifi: ath5k: add PCI ID for SX76X Sasha Levin
                   ` (26 subsequent siblings)
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:48 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Ignat Korchagin, Kuniyuki Iwashima, Eric Dumazet, Jakub Kicinski,
	Sasha Levin, davem, dsahern, pabeni, netdev

From: Ignat Korchagin <ignat@cloudflare.com>

[ Upstream commit 9df99c395d0f55fb444ef39f4d6f194ca437d884 ]

sock_init_data() attaches the allocated sk pointer to the provided sock
object. If inet6_create() fails later, the sk object is released, but the
sock object retains the dangling sk pointer, which may cause use-after-free
later.

Clear the sock sk pointer on error.

Signed-off-by: Ignat Korchagin <ignat@cloudflare.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20241014153808.51894-8-ignat@cloudflare.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/ipv6/af_inet6.c | 22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index 62247621cea52..2d113bcd672ef 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -260,31 +260,29 @@ static int inet6_create(struct net *net, struct socket *sock, int protocol,
 		 */
 		inet->inet_sport = htons(inet->inet_num);
 		err = sk->sk_prot->hash(sk);
-		if (err) {
-			sk_common_release(sk);
-			goto out;
-		}
+		if (err)
+			goto out_sk_release;
 	}
 	if (sk->sk_prot->init) {
 		err = sk->sk_prot->init(sk);
-		if (err) {
-			sk_common_release(sk);
-			goto out;
-		}
+		if (err)
+			goto out_sk_release;
 	}
 
 	if (!kern) {
 		err = BPF_CGROUP_RUN_PROG_INET_SOCK(sk);
-		if (err) {
-			sk_common_release(sk);
-			goto out;
-		}
+		if (err)
+			goto out_sk_release;
 	}
 out:
 	return err;
 out_rcu_unlock:
 	rcu_read_unlock();
 	goto out;
+out_sk_release:
+	sk_common_release(sk);
+	sock->sk = NULL;
+	goto out;
 }
 
 static int __inet6_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len,
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 22/48] wifi: ath5k: add PCI ID for SX76X
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
                   ` (19 preceding siblings ...)
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 21/48] net: inet6: do not leave a dangling sk pointer in inet6_create() Sasha Levin
@ 2024-11-24 13:48 ` Sasha Levin
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 23/48] wifi: ath5k: add PCI ID for Arcadyan devices Sasha Levin
                   ` (25 subsequent siblings)
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:48 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Rosen Penev, Jeff Johnson, Sasha Levin, jirislaby, mickflemm,
	mcgrof, kvalo, linux-wireless

From: Rosen Penev <rosenp@gmail.com>

[ Upstream commit da0474012402d4729b98799d71a54c35dc5c5de3 ]

This is in two devices made by Gigaset, SX762 and SX763.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://patch.msgid.link/20240930180716.139894-2-rosenp@gmail.com
Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/wireless/ath/ath5k/pci.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/ath/ath5k/pci.c b/drivers/net/wireless/ath/ath5k/pci.c
index 86b8cb975b1ac..35a6a7b1047a3 100644
--- a/drivers/net/wireless/ath/ath5k/pci.c
+++ b/drivers/net/wireless/ath/ath5k/pci.c
@@ -46,6 +46,7 @@ static const struct pci_device_id ath5k_pci_id_table[] = {
 	{ PCI_VDEVICE(ATHEROS, 0x001b) }, /* 5413 Eagle */
 	{ PCI_VDEVICE(ATHEROS, 0x001c) }, /* PCI-E cards */
 	{ PCI_VDEVICE(ATHEROS, 0x001d) }, /* 2417 Nala */
+	{ PCI_VDEVICE(ATHEROS, 0xff16) }, /* Gigaset SX76[23] AR241[34]A */
 	{ PCI_VDEVICE(ATHEROS, 0xff1b) }, /* AR5BXB63 */
 	{ 0 }
 };
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 23/48] wifi: ath5k: add PCI ID for Arcadyan devices
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
                   ` (20 preceding siblings ...)
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 22/48] wifi: ath5k: add PCI ID for SX76X Sasha Levin
@ 2024-11-24 13:48 ` Sasha Levin
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 24/48] drm/panel: simple: Add Microchip AC69T88A LVDS Display panel Sasha Levin
                   ` (24 subsequent siblings)
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:48 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Rosen Penev, Jeff Johnson, Sasha Levin, jirislaby, mickflemm,
	mcgrof, kvalo, linux-wireless

From: Rosen Penev <rosenp@gmail.com>

[ Upstream commit f3ced9bb90b0a287a1fa6184d16b0f104a78fa90 ]

Arcadyan made routers with this PCI ID containing an AR2417.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://patch.msgid.link/20240930180716.139894-3-rosenp@gmail.com
Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/wireless/ath/ath5k/pci.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/ath/ath5k/pci.c b/drivers/net/wireless/ath/ath5k/pci.c
index 35a6a7b1047a3..f583e0f3932b8 100644
--- a/drivers/net/wireless/ath/ath5k/pci.c
+++ b/drivers/net/wireless/ath/ath5k/pci.c
@@ -47,6 +47,7 @@ static const struct pci_device_id ath5k_pci_id_table[] = {
 	{ PCI_VDEVICE(ATHEROS, 0x001c) }, /* PCI-E cards */
 	{ PCI_VDEVICE(ATHEROS, 0x001d) }, /* 2417 Nala */
 	{ PCI_VDEVICE(ATHEROS, 0xff16) }, /* Gigaset SX76[23] AR241[34]A */
+	{ PCI_VDEVICE(ATHEROS, 0xff1a) }, /* Arcadyan ARV45XX AR2417 */
 	{ PCI_VDEVICE(ATHEROS, 0xff1b) }, /* AR5BXB63 */
 	{ 0 }
 };
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 24/48] drm/panel: simple: Add Microchip AC69T88A LVDS Display panel
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
                   ` (21 preceding siblings ...)
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 23/48] wifi: ath5k: add PCI ID for Arcadyan devices Sasha Levin
@ 2024-11-24 13:48 ` Sasha Levin
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 25/48] net: sfp: change quirks for Alcatel Lucent G-010S-P Sasha Levin
                   ` (23 subsequent siblings)
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:48 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Manikandan Muralidharan, Dharma Balasubiramani, Dmitry Baryshkov,
	Sasha Levin, neil.armstrong, maarten.lankhorst, mripard,
	tzimmermann, airlied, simona, dri-devel

From: Manikandan Muralidharan <manikandan.m@microchip.com>

[ Upstream commit 40da1463cd6879f542238b36c1148f517927c595 ]

Add support for Microchip AC69T88A 5 inch TFT LCD 800x480
Display module with LVDS interface.The panel uses the Sitronix
ST7262 800x480 Display driver

Signed-off-by: Manikandan Muralidharan <manikandan.m@microchip.com>
Signed-off-by: Dharma Balasubiramani <dharma.b@microchip.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240919091548.430285-2-manikandan.m@microchip.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/panel/panel-simple.c | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index b560d62b6e219..a35e94e2ffd06 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -3908,6 +3908,31 @@ static const struct panel_desc yes_optoelectronics_ytc700tlag_05_201c = {
 	.connector_type = DRM_MODE_CONNECTOR_LVDS,
 };
 
+static const struct drm_display_mode mchp_ac69t88a_mode = {
+	.clock = 25000,
+	.hdisplay = 800,
+	.hsync_start = 800 + 88,
+	.hsync_end = 800 + 88 + 5,
+	.htotal = 800 + 88 + 5 + 40,
+	.vdisplay = 480,
+	.vsync_start = 480 + 23,
+	.vsync_end = 480 + 23 + 5,
+	.vtotal = 480 + 23 + 5 + 1,
+};
+
+static const struct panel_desc mchp_ac69t88a = {
+	.modes = &mchp_ac69t88a_mode,
+	.num_modes = 1,
+	.bpc = 8,
+	.size = {
+		.width = 108,
+		.height = 65,
+	},
+	.bus_flags = DRM_BUS_FLAG_DE_HIGH,
+	.bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA,
+	.connector_type = DRM_MODE_CONNECTOR_LVDS,
+};
+
 static const struct drm_display_mode arm_rtsm_mode[] = {
 	{
 		.clock = 65000,
@@ -4325,6 +4350,9 @@ static const struct of_device_id platform_of_match[] = {
 	}, {
 		.compatible = "yes-optoelectronics,ytc700tlag-05-201c",
 		.data = &yes_optoelectronics_ytc700tlag_05_201c,
+	}, {
+		.compatible = "microchip,ac69t88a",
+		.data = &mchp_ac69t88a,
 	}, {
 		/* Must be the last entry */
 		.compatible = "panel-dpi",
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 25/48] net: sfp: change quirks for Alcatel Lucent G-010S-P
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
                   ` (22 preceding siblings ...)
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 24/48] drm/panel: simple: Add Microchip AC69T88A LVDS Display panel Sasha Levin
@ 2024-11-24 13:48 ` Sasha Levin
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 26/48] drm/sched: memset() 'job' in drm_sched_job_init() Sasha Levin
                   ` (22 subsequent siblings)
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:48 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Shengyu Qu, Paolo Abeni, Sasha Levin, linux, andrew, hkallweit1,
	davem, edumazet, kuba, netdev

From: Shengyu Qu <wiagn233@outlook.com>

[ Upstream commit 90cb5f1776ba371478e2b08fbf7018c7bd781a8d ]

Seems Alcatel Lucent G-010S-P also have the same problem that it uses
TX_FAULT pin for SOC uart. So apply sfp_fixup_ignore_tx_fault to it.

Signed-off-by: Shengyu Qu <wiagn233@outlook.com>
Link: https://patch.msgid.link/TYCPR01MB84373677E45A7BFA5A28232C98792@TYCPR01MB8437.jpnprd01.prod.outlook.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/phy/sfp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/phy/sfp.c b/drivers/net/phy/sfp.c
index 06dce78d7b0c9..0666a39dc4859 100644
--- a/drivers/net/phy/sfp.c
+++ b/drivers/net/phy/sfp.c
@@ -386,7 +386,8 @@ static void sfp_quirk_ubnt_uf_instant(const struct sfp_eeprom_id *id,
 static const struct sfp_quirk sfp_quirks[] = {
 	// Alcatel Lucent G-010S-P can operate at 2500base-X, but incorrectly
 	// report 2500MBd NRZ in their EEPROM
-	SFP_QUIRK_M("ALCATELLUCENT", "G010SP", sfp_quirk_2500basex),
+	SFP_QUIRK("ALCATELLUCENT", "G010SP", sfp_quirk_2500basex,
+		  sfp_fixup_ignore_tx_fault),
 
 	// Alcatel Lucent G-010S-A can operate at 2500base-X, but report 3.2GBd
 	// NRZ in their EEPROM
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 26/48] drm/sched: memset() 'job' in drm_sched_job_init()
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
                   ` (23 preceding siblings ...)
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 25/48] net: sfp: change quirks for Alcatel Lucent G-010S-P Sasha Levin
@ 2024-11-24 13:48 ` Sasha Levin
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 27/48] drm/amdgpu: clear RB_OVERFLOW bit when enabling interrupts for vega20_ih Sasha Levin
                   ` (21 subsequent siblings)
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:48 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Philipp Stanner, Christian König, Sasha Levin, ltuikov89,
	matthew.brost, dakr, maarten.lankhorst, mripard, tzimmermann,
	airlied, simona, dri-devel

From: Philipp Stanner <pstanner@redhat.com>

[ Upstream commit 2320c9e6a768d135c7b0039995182bb1a4e4fd22 ]

drm_sched_job_init() has no control over how users allocate struct
drm_sched_job. Unfortunately, the function can also not set some struct
members such as job->sched.

This could theoretically lead to UB by users dereferencing the struct's
pointer members too early.

It is easier to debug such issues if these pointers are initialized to
NULL, so dereferencing them causes a NULL pointer exception.
Accordingly, drm_sched_entity_init() does precisely that and initializes
its struct with memset().

Initialize parameter "job" to 0 in drm_sched_job_init().

Signed-off-by: Philipp Stanner <pstanner@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241021105028.19794-2-pstanner@redhat.com
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/scheduler/sched_main.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c
index f138b3be1646f..dbdd00c61315b 100644
--- a/drivers/gpu/drm/scheduler/sched_main.c
+++ b/drivers/gpu/drm/scheduler/sched_main.c
@@ -595,6 +595,14 @@ int drm_sched_job_init(struct drm_sched_job *job,
 	if (!entity->rq)
 		return -ENOENT;
 
+	/*
+	 * We don't know for sure how the user has allocated. Thus, zero the
+	 * struct so that unallowed (i.e., too early) usage of pointers that
+	 * this function does not set is guaranteed to lead to a NULL pointer
+	 * exception instead of UB.
+	 */
+	memset(job, 0, sizeof(*job));
+
 	job->entity = entity;
 	job->s_fence = drm_sched_fence_alloc(entity, owner);
 	if (!job->s_fence)
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 27/48] drm/amdgpu: clear RB_OVERFLOW bit when enabling interrupts for vega20_ih
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
                   ` (24 preceding siblings ...)
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 26/48] drm/sched: memset() 'job' in drm_sched_job_init() Sasha Levin
@ 2024-11-24 13:48 ` Sasha Levin
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 28/48] drm/amdgpu: Dereference the ATCS ACPI buffer Sasha Levin
                   ` (20 subsequent siblings)
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:48 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Victor Lu, Alex Deucher, Sasha Levin, christian.koenig,
	Xinhui.Pan, airlied, simona, sunil.khatri, friedrich.vock,
	Hawking.Zhang, amd-gfx, dri-devel

From: Victor Lu <victorchengchi.lu@amd.com>

[ Upstream commit 8b22f048331dfd45fdfbf0efdfb1d43deff7518d ]

Port this change to vega20_ih.c:
commit afbf7955ff01 ("drm/amdgpu: clear RB_OVERFLOW bit when enabling interrupts")

Original commit message:
"Why:
Setting IH_RB_WPTR register to 0 will not clear the RB_OVERFLOW bit
if RB_ENABLE is not set.

How to fix:
Set WPTR_OVERFLOW_CLEAR bit after RB_ENABLE bit is set.
The RB_ENABLE bit is required to be set, together with
WPTR_OVERFLOW_ENABLE bit so that setting WPTR_OVERFLOW_CLEAR bit
would clear the RB_OVERFLOW."

Signed-off-by: Victor Lu <victorchengchi.lu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/amd/amdgpu/vega20_ih.c | 27 ++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/vega20_ih.c b/drivers/gpu/drm/amd/amdgpu/vega20_ih.c
index f1ba76c35cd6e..e85a0fb227d4e 100644
--- a/drivers/gpu/drm/amd/amdgpu/vega20_ih.c
+++ b/drivers/gpu/drm/amd/amdgpu/vega20_ih.c
@@ -109,6 +109,33 @@ static int vega20_ih_toggle_ring_interrupts(struct amdgpu_device *adev,
 	tmp = REG_SET_FIELD(tmp, IH_RB_CNTL, RB_ENABLE, (enable ? 1 : 0));
 	tmp = REG_SET_FIELD(tmp, IH_RB_CNTL, RB_GPU_TS_ENABLE, 1);
 
+	if (enable) {
+		/* Unset the CLEAR_OVERFLOW bit to make sure the next step
+		 * is switching the bit from 0 to 1
+		 */
+		tmp = REG_SET_FIELD(tmp, IH_RB_CNTL, WPTR_OVERFLOW_CLEAR, 0);
+		if (amdgpu_sriov_vf(adev) && amdgpu_sriov_reg_indirect_ih(adev)) {
+			if (psp_reg_program(&adev->psp, ih_regs->psp_reg_id, tmp))
+				return -ETIMEDOUT;
+		} else {
+			WREG32_NO_KIQ(ih_regs->ih_rb_cntl, tmp);
+		}
+
+		/* Clear RB_OVERFLOW bit */
+		tmp = REG_SET_FIELD(tmp, IH_RB_CNTL, WPTR_OVERFLOW_CLEAR, 1);
+		if (amdgpu_sriov_vf(adev) && amdgpu_sriov_reg_indirect_ih(adev)) {
+			if (psp_reg_program(&adev->psp, ih_regs->psp_reg_id, tmp))
+				return -ETIMEDOUT;
+		} else {
+			WREG32_NO_KIQ(ih_regs->ih_rb_cntl, tmp);
+		}
+
+		/* Unset the CLEAR_OVERFLOW bit immediately so new overflows
+		 * can be detected.
+		 */
+		tmp = REG_SET_FIELD(tmp, IH_RB_CNTL, WPTR_OVERFLOW_CLEAR, 0);
+	}
+
 	/* enable_intr field is only valid in ring0 */
 	if (ih == &adev->irq.ih)
 		tmp = REG_SET_FIELD(tmp, IH_RB_CNTL, ENABLE_INTR, (enable ? 1 : 0));
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 28/48] drm/amdgpu: Dereference the ATCS ACPI buffer
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
                   ` (25 preceding siblings ...)
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 27/48] drm/amdgpu: clear RB_OVERFLOW bit when enabling interrupts for vega20_ih Sasha Levin
@ 2024-11-24 13:48 ` Sasha Levin
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 29/48] drm/amdgpu: refine error handling in amdgpu_ttm_tt_pin_userptr Sasha Levin
                   ` (19 subsequent siblings)
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:48 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Prike Liang, Alex Deucher, Sasha Levin, christian.koenig,
	Xinhui.Pan, airlied, simona, mario.limonciello, Jun.Ma2, antonio,
	sunpeng.li, amd-gfx, dri-devel

From: Prike Liang <Prike.Liang@amd.com>

[ Upstream commit 32e7ee293ff476c67b51be006e986021967bc525 ]

Need to dereference the atcs acpi buffer after
the method is executed, otherwise it will result in
a memory leak.

Signed-off-by: Prike Liang <Prike.Liang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
index 7ad7ebaaa93cd..5fa7f6d8aa309 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
@@ -758,6 +758,7 @@ int amdgpu_acpi_power_shift_control(struct amdgpu_device *adev,
 		return -EIO;
 	}
 
+	kfree(info);
 	return 0;
 }
 
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 29/48] drm/amdgpu: refine error handling in amdgpu_ttm_tt_pin_userptr
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
                   ` (26 preceding siblings ...)
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 28/48] drm/amdgpu: Dereference the ATCS ACPI buffer Sasha Levin
@ 2024-11-24 13:48 ` Sasha Levin
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 30/48] dma-debug: fix a possible deadlock on radix_lock Sasha Levin
                   ` (18 subsequent siblings)
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:48 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Lang Yu, Alex Deucher, Sasha Levin, christian.koenig, Xinhui.Pan,
	airlied, simona, Frank.Min, Likun.Gao, mdaenzer, Philip.Yang,
	Arunpravin.PaneerSelvam, Amaranath.Somalapuram, amd-gfx,
	dri-devel

From: Lang Yu <lang.yu@amd.com>

[ Upstream commit 46186667f98fb7158c98f4ff5da62c427761ffcd ]

Free sg table when dma_map_sgtable() failed to avoid memory leak.

Signed-off-by: Lang Yu <lang.yu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
index 7afefaa374276..2b15d938c779f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@ -776,7 +776,7 @@ static int amdgpu_ttm_tt_pin_userptr(struct ttm_device *bdev,
 	/* Map SG to device */
 	r = dma_map_sgtable(adev->dev, ttm->sg, direction, 0);
 	if (r)
-		goto release_sg;
+		goto release_sg_table;
 
 	/* convert SG to linear array of pages and dma addresses */
 	drm_prime_sg_to_dma_addr_array(ttm->sg, gtt->ttm.dma_address,
@@ -784,6 +784,8 @@ static int amdgpu_ttm_tt_pin_userptr(struct ttm_device *bdev,
 
 	return 0;
 
+release_sg_table:
+	sg_free_table(ttm->sg);
 release_sg:
 	kfree(ttm->sg);
 	ttm->sg = NULL;
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 30/48] dma-debug: fix a possible deadlock on radix_lock
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
                   ` (27 preceding siblings ...)
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 29/48] drm/amdgpu: refine error handling in amdgpu_ttm_tt_pin_userptr Sasha Levin
@ 2024-11-24 13:48 ` Sasha Levin
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 31/48] jfs: array-index-out-of-bounds fix in dtReadFirst Sasha Levin
                   ` (17 subsequent siblings)
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:48 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Levi Yun, Denis Nikitin, Christoph Hellwig, Sasha Levin,
	m.szyprowski, iommu

From: Levi Yun <yeoreum.yun@arm.com>

[ Upstream commit 7543c3e3b9b88212fcd0aaf5cab5588797bdc7de ]

radix_lock() shouldn't be held while holding dma_hash_entry[idx].lock
otherwise, there's a possible deadlock scenario when
dma debug API is called holding rq_lock():

CPU0                   CPU1                       CPU2
dma_free_attrs()
check_unmap()          add_dma_entry()            __schedule() //out
                                                  (A) rq_lock()
get_hash_bucket()
(A) dma_entry_hash
                                                  check_sync()
                       (A) radix_lock()           (W) dma_entry_hash
dma_entry_free()
(W) radix_lock()
                       // CPU2's one
                       (W) rq_lock()

CPU1 situation can happen when it extending radix tree and
it tries to wake up kswapd via wake_all_kswapd().

CPU2 situation can happen while perf_event_task_sched_out()
(i.e. dma sync operation is called while deleting perf_event using
 etm and etr tmc which are Arm Coresight hwtracing driver backends).

To remove this possible situation, call dma_entry_free() after
put_hash_bucket() in check_unmap().

Reported-by: Denis Nikitin <denik@chromium.org>
Closes: https://lists.linaro.org/archives/list/coresight@lists.linaro.org/thread/2WMS7BBSF5OZYB63VT44U5YWLFP5HL6U/#RWM6MLQX5ANBTEQ2PRM7OXCBGCE6NPWU
Signed-off-by: Levi Yun <yeoreum.yun@arm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 kernel/dma/debug.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/kernel/dma/debug.c b/kernel/dma/debug.c
index de02c0808fb83..3e6f2a39beb3b 100644
--- a/kernel/dma/debug.c
+++ b/kernel/dma/debug.c
@@ -1044,9 +1044,13 @@ static void check_unmap(struct dma_debug_entry *ref)
 	}
 
 	hash_bucket_del(entry);
-	dma_entry_free(entry);
-
 	put_hash_bucket(bucket, flags);
+
+	/*
+	 * Free the entry outside of bucket_lock to avoid ABBA deadlocks
+	 * between that and radix_lock.
+	 */
+	dma_entry_free(entry);
 }
 
 static void check_for_stack(struct device *dev,
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 31/48] jfs: array-index-out-of-bounds fix in dtReadFirst
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
                   ` (28 preceding siblings ...)
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 30/48] dma-debug: fix a possible deadlock on radix_lock Sasha Levin
@ 2024-11-24 13:48 ` Sasha Levin
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 32/48] jfs: fix shift-out-of-bounds in dbSplit Sasha Levin
                   ` (16 subsequent siblings)
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:48 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Ghanshyam Agrawal, syzbot+65fa06e29859e41a83f3, Dave Kleikamp,
	Sasha Levin, shaggy, eadavis, jfs-discussion

From: Ghanshyam Agrawal <ghanshyam1898@gmail.com>

[ Upstream commit ca84a2c9be482836b86d780244f0357e5a778c46 ]

The value of stbl can be sometimes out of bounds due
to a bad filesystem. Added a check with appopriate return
of error code in that case.

Reported-by: syzbot+65fa06e29859e41a83f3@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=65fa06e29859e41a83f3
Signed-off-by: Ghanshyam Agrawal <ghanshyam1898@gmail.com>
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/jfs/jfs_dtree.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/fs/jfs/jfs_dtree.c b/fs/jfs/jfs_dtree.c
index 5d3127ca68a42..69fd936fbdb37 100644
--- a/fs/jfs/jfs_dtree.c
+++ b/fs/jfs/jfs_dtree.c
@@ -3086,6 +3086,13 @@ static int dtReadFirst(struct inode *ip, struct btstack * btstack)
 
 		/* get the leftmost entry */
 		stbl = DT_GETSTBL(p);
+
+		if (stbl[0] < 0 || stbl[0] > 127) {
+			DT_PUTPAGE(mp);
+			jfs_error(ip->i_sb, "stbl[0] out of bound\n");
+			return -EIO;
+		}
+
 		xd = (pxd_t *) & p->slot[stbl[0]];
 
 		/* get the child page block address */
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 32/48] jfs: fix shift-out-of-bounds in dbSplit
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
                   ` (29 preceding siblings ...)
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 31/48] jfs: array-index-out-of-bounds fix in dtReadFirst Sasha Levin
@ 2024-11-24 13:48 ` Sasha Levin
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 33/48] jfs: fix array-index-out-of-bounds in jfs_readdir Sasha Levin
                   ` (15 subsequent siblings)
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:48 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Ghanshyam Agrawal, syzbot+b5ca8a249162c4b9a7d0, Dave Kleikamp,
	Sasha Levin, shaggy, rbrasga, aha310510, peili.dev,
	niharchaithanya, eadavis, jfs-discussion

From: Ghanshyam Agrawal <ghanshyam1898@gmail.com>

[ Upstream commit a5f5e4698f8abbb25fe4959814093fb5bfa1aa9d ]

When dmt_budmin is less than zero, it causes errors
in the later stages. Added a check to return an error beforehand
in dbAllocCtl itself.

Reported-by: syzbot+b5ca8a249162c4b9a7d0@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=b5ca8a249162c4b9a7d0
Signed-off-by: Ghanshyam Agrawal <ghanshyam1898@gmail.com>
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/jfs/jfs_dmap.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/fs/jfs/jfs_dmap.c b/fs/jfs/jfs_dmap.c
index a6b1d748df16b..30a56c37d9ecf 100644
--- a/fs/jfs/jfs_dmap.c
+++ b/fs/jfs/jfs_dmap.c
@@ -1820,6 +1820,9 @@ dbAllocCtl(struct bmap * bmp, s64 nblocks, int l2nb, s64 blkno, s64 * results)
 			return -EIO;
 		dp = (struct dmap *) mp->data;
 
+		if (dp->tree.budmin < 0)
+			return -EIO;
+
 		/* try to allocate the blocks.
 		 */
 		rc = dbAllocDmapLev(bmp, dp, (int) nblocks, l2nb, results);
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 33/48] jfs: fix array-index-out-of-bounds in jfs_readdir
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
                   ` (30 preceding siblings ...)
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 32/48] jfs: fix shift-out-of-bounds in dbSplit Sasha Levin
@ 2024-11-24 13:48 ` Sasha Levin
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 34/48] jfs: add a check to prevent array-index-out-of-bounds in dbAdjTree Sasha Levin
                   ` (14 subsequent siblings)
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:48 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Ghanshyam Agrawal, syzbot+0315f8fe99120601ba88, Dave Kleikamp,
	Sasha Levin, shaggy, eadavis, jfs-discussion

From: Ghanshyam Agrawal <ghanshyam1898@gmail.com>

[ Upstream commit 839f102efb168f02dfdd46717b7c6dddb26b015e ]

The stbl might contain some invalid values. Added a check to
return error code in that case.

Reported-by: syzbot+0315f8fe99120601ba88@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=0315f8fe99120601ba88
Signed-off-by: Ghanshyam Agrawal <ghanshyam1898@gmail.com>
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/jfs/jfs_dtree.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/fs/jfs/jfs_dtree.c b/fs/jfs/jfs_dtree.c
index 69fd936fbdb37..8f85177f284b5 100644
--- a/fs/jfs/jfs_dtree.c
+++ b/fs/jfs/jfs_dtree.c
@@ -2891,6 +2891,14 @@ int jfs_readdir(struct file *file, struct dir_context *ctx)
 		stbl = DT_GETSTBL(p);
 
 		for (i = index; i < p->header.nextindex; i++) {
+			if (stbl[i] < 0 || stbl[i] > 127) {
+				jfs_err("JFS: Invalid stbl[%d] = %d for inode %ld, block = %lld",
+					i, stbl[i], (long)ip->i_ino, (long long)bn);
+				free_page(dirent_buf);
+				DT_PUTPAGE(mp);
+				return -EIO;
+			}
+
 			d = (struct ldtentry *) & p->slot[stbl[i]];
 
 			if (((long) jfs_dirent + d->namlen + 1) >
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 34/48] jfs: add a check to prevent array-index-out-of-bounds in dbAdjTree
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
                   ` (31 preceding siblings ...)
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 33/48] jfs: fix array-index-out-of-bounds in jfs_readdir Sasha Levin
@ 2024-11-24 13:48 ` Sasha Levin
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 35/48] net: enetc: remove ERR050089 workaround for i.MX95 Sasha Levin
                   ` (13 subsequent siblings)
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:48 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Nihar Chaithanya, syzbot+412dea214d8baa3f7483, Dave Kleikamp,
	Sasha Levin, shaggy, peili.dev, eadavis, rbrasga, ghanshyam1898,
	aha310510, jfs-discussion

From: Nihar Chaithanya <niharchaithanya@gmail.com>

[ Upstream commit a174706ba4dad895c40b1d2277bade16dfacdcd9 ]

When the value of lp is 0 at the beginning of the for loop, it will
become negative in the next assignment and we should bail out.

Reported-by: syzbot+412dea214d8baa3f7483@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=412dea214d8baa3f7483
Tested-by: syzbot+412dea214d8baa3f7483@syzkaller.appspotmail.com
Signed-off-by: Nihar Chaithanya <niharchaithanya@gmail.com>
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/jfs/jfs_dmap.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/fs/jfs/jfs_dmap.c b/fs/jfs/jfs_dmap.c
index 30a56c37d9ecf..6509102e581a1 100644
--- a/fs/jfs/jfs_dmap.c
+++ b/fs/jfs/jfs_dmap.c
@@ -2891,6 +2891,9 @@ static void dbAdjTree(dmtree_t *tp, int leafno, int newval, bool is_ctl)
 	/* bubble the new value up the tree as required.
 	 */
 	for (k = 0; k < le32_to_cpu(tp->dmt_height); k++) {
+		if (lp == 0)
+			break;
+
 		/* get the index of the first leaf of the 4 leaf
 		 * group containing the specified leaf (leafno).
 		 */
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 35/48] net: enetc: remove ERR050089 workaround for i.MX95
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
                   ` (32 preceding siblings ...)
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 34/48] jfs: add a check to prevent array-index-out-of-bounds in dbAdjTree Sasha Levin
@ 2024-11-24 13:48 ` Sasha Levin
  2024-11-25  1:55   ` Wei Fang
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 36/48] net: enetc: add i.MX95 EMDIO support Sasha Levin
                   ` (12 subsequent siblings)
  46 siblings, 1 reply; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:48 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Vladimir Oltean, Wei Fang, David S . Miller, Sasha Levin,
	claudiu.manoil, xiaoning.wang, andrew+netdev, edumazet, kuba,
	pabeni, imx, netdev

From: Vladimir Oltean <vladimir.oltean@nxp.com>

[ Upstream commit 86831a3f4cd4c924dd78cf0d6e4d73acacfe1b11 ]

The ERR050089 workaround causes performance degradation and potential
functional issues (e.g., RCU stalls) under certain workloads. Since
new SoCs like i.MX95 do not require this workaround, use a static key
to compile out enetc_lock_mdio() and enetc_unlock_mdio() at runtime,
improving performance and avoiding unnecessary logic.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Wei Fang <wei.fang@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 .../net/ethernet/freescale/enetc/enetc_hw.h   | 34 +++++++++++++------
 .../ethernet/freescale/enetc/enetc_pci_mdio.c | 28 +++++++++++++++
 2 files changed, 52 insertions(+), 10 deletions(-)

diff --git a/drivers/net/ethernet/freescale/enetc/enetc_hw.h b/drivers/net/ethernet/freescale/enetc/enetc_hw.h
index 18ca1f42b1f75..a5e38804e2811 100644
--- a/drivers/net/ethernet/freescale/enetc/enetc_hw.h
+++ b/drivers/net/ethernet/freescale/enetc/enetc_hw.h
@@ -372,18 +372,22 @@ struct enetc_hw {
  */
 extern rwlock_t enetc_mdio_lock;
 
+DECLARE_STATIC_KEY_FALSE(enetc_has_err050089);
+
 /* use this locking primitive only on the fast datapath to
  * group together multiple non-MDIO register accesses to
  * minimize the overhead of the lock
  */
 static inline void enetc_lock_mdio(void)
 {
-	read_lock(&enetc_mdio_lock);
+	if (static_branch_unlikely(&enetc_has_err050089))
+		read_lock(&enetc_mdio_lock);
 }
 
 static inline void enetc_unlock_mdio(void)
 {
-	read_unlock(&enetc_mdio_lock);
+	if (static_branch_unlikely(&enetc_has_err050089))
+		read_unlock(&enetc_mdio_lock);
 }
 
 /* use these accessors only on the fast datapath under
@@ -392,14 +396,16 @@ static inline void enetc_unlock_mdio(void)
  */
 static inline u32 enetc_rd_reg_hot(void __iomem *reg)
 {
-	lockdep_assert_held(&enetc_mdio_lock);
+	if (static_branch_unlikely(&enetc_has_err050089))
+		lockdep_assert_held(&enetc_mdio_lock);
 
 	return ioread32(reg);
 }
 
 static inline void enetc_wr_reg_hot(void __iomem *reg, u32 val)
 {
-	lockdep_assert_held(&enetc_mdio_lock);
+	if (static_branch_unlikely(&enetc_has_err050089))
+		lockdep_assert_held(&enetc_mdio_lock);
 
 	iowrite32(val, reg);
 }
@@ -428,9 +434,13 @@ static inline u32 _enetc_rd_mdio_reg_wa(void __iomem *reg)
 	unsigned long flags;
 	u32 val;
 
-	write_lock_irqsave(&enetc_mdio_lock, flags);
-	val = ioread32(reg);
-	write_unlock_irqrestore(&enetc_mdio_lock, flags);
+	if (static_branch_unlikely(&enetc_has_err050089)) {
+		write_lock_irqsave(&enetc_mdio_lock, flags);
+		val = ioread32(reg);
+		write_unlock_irqrestore(&enetc_mdio_lock, flags);
+	} else {
+		val = ioread32(reg);
+	}
 
 	return val;
 }
@@ -439,9 +449,13 @@ static inline void _enetc_wr_mdio_reg_wa(void __iomem *reg, u32 val)
 {
 	unsigned long flags;
 
-	write_lock_irqsave(&enetc_mdio_lock, flags);
-	iowrite32(val, reg);
-	write_unlock_irqrestore(&enetc_mdio_lock, flags);
+	if (static_branch_unlikely(&enetc_has_err050089)) {
+		write_lock_irqsave(&enetc_mdio_lock, flags);
+		iowrite32(val, reg);
+		write_unlock_irqrestore(&enetc_mdio_lock, flags);
+	} else {
+		iowrite32(val, reg);
+	}
 }
 
 #ifdef ioread64
diff --git a/drivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c b/drivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c
index dafb26f81f95f..d3248881a9b7e 100644
--- a/drivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c
+++ b/drivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c
@@ -9,6 +9,28 @@
 #define ENETC_MDIO_BUS_NAME	ENETC_MDIO_DEV_NAME " Bus"
 #define ENETC_MDIO_DRV_NAME	ENETC_MDIO_DEV_NAME " driver"
 
+DEFINE_STATIC_KEY_FALSE(enetc_has_err050089);
+EXPORT_SYMBOL_GPL(enetc_has_err050089);
+
+static void enetc_emdio_enable_err050089(struct pci_dev *pdev)
+{
+	if (pdev->vendor == PCI_VENDOR_ID_FREESCALE &&
+	    pdev->device == ENETC_MDIO_DEV_ID) {
+		static_branch_inc(&enetc_has_err050089);
+		dev_info(&pdev->dev, "Enabled ERR050089 workaround\n");
+	}
+}
+
+static void enetc_emdio_disable_err050089(struct pci_dev *pdev)
+{
+	if (pdev->vendor == PCI_VENDOR_ID_FREESCALE &&
+	    pdev->device == ENETC_MDIO_DEV_ID) {
+		static_branch_dec(&enetc_has_err050089);
+		if (!static_key_enabled(&enetc_has_err050089.key))
+			dev_info(&pdev->dev, "Disabled ERR050089 workaround\n");
+	}
+}
+
 static int enetc_pci_mdio_probe(struct pci_dev *pdev,
 				const struct pci_device_id *ent)
 {
@@ -60,6 +82,8 @@ static int enetc_pci_mdio_probe(struct pci_dev *pdev,
 		goto err_pci_mem_reg;
 	}
 
+	enetc_emdio_enable_err050089(pdev);
+
 	err = of_mdiobus_register(bus, dev->of_node);
 	if (err)
 		goto err_mdiobus_reg;
@@ -69,6 +93,7 @@ static int enetc_pci_mdio_probe(struct pci_dev *pdev,
 	return 0;
 
 err_mdiobus_reg:
+	enetc_emdio_disable_err050089(pdev);
 	pci_release_region(pdev, 0);
 err_pci_mem_reg:
 	pci_disable_device(pdev);
@@ -86,6 +111,9 @@ static void enetc_pci_mdio_remove(struct pci_dev *pdev)
 	struct enetc_mdio_priv *mdio_priv;
 
 	mdiobus_unregister(bus);
+
+	enetc_emdio_disable_err050089(pdev);
+
 	mdio_priv = bus->priv;
 	iounmap(mdio_priv->hw->port);
 	pci_release_region(pdev, 0);
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 36/48] net: enetc: add i.MX95 EMDIO support
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
                   ` (33 preceding siblings ...)
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 35/48] net: enetc: remove ERR050089 workaround for i.MX95 Sasha Levin
@ 2024-11-24 13:48 ` Sasha Levin
  2024-11-24 13:49 ` [PATCH AUTOSEL 6.1 37/48] drm/amdgpu: skip amdgpu_device_cache_pci_state under sriov Sasha Levin
                   ` (11 subsequent siblings)
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:48 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Wei Fang, David S . Miller, Sasha Levin, claudiu.manoil,
	vladimir.oltean, xiaoning.wang, andrew+netdev, edumazet, kuba,
	pabeni, imx, netdev

From: Wei Fang <wei.fang@nxp.com>

[ Upstream commit a52201fb9caa9b33b4d881725d1ec733438b07f2 ]

The verdor ID and device ID of i.MX95 EMDIO are different from LS1028A
EMDIO, so add new vendor ID and device ID to pci_device_id table to
support i.MX95 EMDIO.

Signed-off-by: Wei Fang <wei.fang@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c b/drivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c
index d3248881a9b7e..626faae064a95 100644
--- a/drivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c
+++ b/drivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c
@@ -4,6 +4,8 @@
 #include <linux/of_mdio.h>
 #include "enetc_pf.h"
 
+#define NETC_EMDIO_VEN_ID	0x1131
+#define NETC_EMDIO_DEV_ID	0xee00
 #define ENETC_MDIO_DEV_ID	0xee01
 #define ENETC_MDIO_DEV_NAME	"FSL PCIe IE Central MDIO"
 #define ENETC_MDIO_BUS_NAME	ENETC_MDIO_DEV_NAME " Bus"
@@ -122,6 +124,7 @@ static void enetc_pci_mdio_remove(struct pci_dev *pdev)
 
 static const struct pci_device_id enetc_pci_mdio_id_table[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_FREESCALE, ENETC_MDIO_DEV_ID) },
+	{ PCI_DEVICE(NETC_EMDIO_VEN_ID, NETC_EMDIO_DEV_ID) },
 	{ 0, } /* End of table. */
 };
 MODULE_DEVICE_TABLE(pci, enetc_pci_mdio_id_table);
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 37/48] drm/amdgpu: skip amdgpu_device_cache_pci_state under sriov
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
                   ` (34 preceding siblings ...)
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 36/48] net: enetc: add i.MX95 EMDIO support Sasha Levin
@ 2024-11-24 13:49 ` Sasha Levin
  2024-11-24 13:49 ` [PATCH AUTOSEL 6.1 38/48] ALSA: usb-audio: Make mic volume workarounds globally applicable Sasha Levin
                   ` (10 subsequent siblings)
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:49 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Victor Zhao, Lijo Lazar, Alex Deucher, Sasha Levin,
	christian.koenig, Xinhui.Pan, airlied, simona, sunil.khatri,
	Hawking.Zhang, mario.limonciello, Jun.Ma2, Yunxiang.Li, amd-gfx,
	dri-devel

From: Victor Zhao <Victor.Zhao@amd.com>

[ Upstream commit afe260df55ac280cd56306248cb6d8a6b0db095c ]

Under sriov, host driver will save and restore vf pci cfg space during
reset. And during device init, under sriov, pci_restore_state happens after
fullaccess released, and it can have race condition with mmio protection
enable from host side leading to missing interrupts.

So skip amdgpu_device_cache_pci_state for sriov.

Signed-off-by: Victor Zhao <Victor.Zhao@amd.com>
Acked-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 1d0f6628f1d69..aca1a4e9b7ae9 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -6013,6 +6013,9 @@ bool amdgpu_device_cache_pci_state(struct pci_dev *pdev)
 	struct amdgpu_device *adev = drm_to_adev(dev);
 	int r;
 
+	if (amdgpu_sriov_vf(adev))
+		return false;
+
 	r = pci_save_state(pdev);
 	if (!r) {
 		kfree(adev->pci_state);
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 38/48] ALSA: usb-audio: Make mic volume workarounds globally applicable
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
                   ` (35 preceding siblings ...)
  2024-11-24 13:49 ` [PATCH AUTOSEL 6.1 37/48] drm/amdgpu: skip amdgpu_device_cache_pci_state under sriov Sasha Levin
@ 2024-11-24 13:49 ` Sasha Levin
  2024-11-24 13:49 ` [PATCH AUTOSEL 6.1 39/48] drm/amdgpu: set the right AMDGPU sg segment limitation Sasha Levin
                   ` (9 subsequent siblings)
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:49 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Takashi Iwai, Sasha Levin, perex, tiwai, zhujun2, kl,
	wangdicheng, k.kosik, hulianqin, mbarriolinares, shenlichuan,
	lalinsky, cyan.vtb, linux-sound

From: Takashi Iwai <tiwai@suse.de>

[ Upstream commit d6e6b9218ced5249b9136833ef5ec3f554ec7fde ]

It seems that many webcams have buggy firmware and don't expose the
mic capture volume with the proper resolution.  We have workarounds in
mixer.c, but judging from the numbers, those can be better managed as
global quirk flags.

Link: https://patch.msgid.link/20241105120220.5740-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 sound/usb/mixer.c    | 58 ++++++++++++--------------------------------
 sound/usb/quirks.c   | 31 +++++++++++++++++++----
 sound/usb/usbaudio.h |  4 +++
 3 files changed, 45 insertions(+), 48 deletions(-)

diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index 102a9b3ba3bef..4cded91d22a8d 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -1084,6 +1084,21 @@ static void volume_control_quirks(struct usb_mixer_elem_info *cval,
 				  struct snd_kcontrol *kctl)
 {
 	struct snd_usb_audio *chip = cval->head.mixer->chip;
+
+	if (chip->quirk_flags & QUIRK_FLAG_MIC_RES_384) {
+		if (!strcmp(kctl->id.name, "Mic Capture Volume")) {
+			usb_audio_info(chip,
+				"set resolution quirk: cval->res = 384\n");
+			cval->res = 384;
+		}
+	} else if (chip->quirk_flags & QUIRK_FLAG_MIC_RES_16) {
+		if (!strcmp(kctl->id.name, "Mic Capture Volume")) {
+			usb_audio_info(chip,
+				"set resolution quirk: cval->res = 16\n");
+			cval->res = 16;
+		}
+	}
+
 	switch (chip->usb_id) {
 	case USB_ID(0x0763, 0x2030): /* M-Audio Fast Track C400 */
 	case USB_ID(0x0763, 0x2031): /* M-Audio Fast Track C600 */
@@ -1168,27 +1183,6 @@ static void volume_control_quirks(struct usb_mixer_elem_info *cval,
 		}
 		break;
 
-	case USB_ID(0x046d, 0x0807): /* Logitech Webcam C500 */
-	case USB_ID(0x046d, 0x0808):
-	case USB_ID(0x046d, 0x0809):
-	case USB_ID(0x046d, 0x0819): /* Logitech Webcam C210 */
-	case USB_ID(0x046d, 0x081b): /* HD Webcam c310 */
-	case USB_ID(0x046d, 0x081d): /* HD Webcam c510 */
-	case USB_ID(0x046d, 0x0825): /* HD Webcam c270 */
-	case USB_ID(0x046d, 0x0826): /* HD Webcam c525 */
-	case USB_ID(0x046d, 0x08ca): /* Logitech Quickcam Fusion */
-	case USB_ID(0x046d, 0x0991):
-	case USB_ID(0x046d, 0x09a2): /* QuickCam Communicate Deluxe/S7500 */
-	/* Most audio usb devices lie about volume resolution.
-	 * Most Logitech webcams have res = 384.
-	 * Probably there is some logitech magic behind this number --fishor
-	 */
-		if (!strcmp(kctl->id.name, "Mic Capture Volume")) {
-			usb_audio_info(chip,
-				"set resolution quirk: cval->res = 384\n");
-			cval->res = 384;
-		}
-		break;
 	case USB_ID(0x0495, 0x3042): /* ESS Technology Asus USB DAC */
 		if ((strstr(kctl->id.name, "Playback Volume") != NULL) ||
 			strstr(kctl->id.name, "Capture Volume") != NULL) {
@@ -1197,28 +1191,6 @@ static void volume_control_quirks(struct usb_mixer_elem_info *cval,
 			cval->res = 1;
 		}
 		break;
-	case USB_ID(0x1224, 0x2a25): /* Jieli Technology USB PHY 2.0 */
-		if (!strcmp(kctl->id.name, "Mic Capture Volume")) {
-			usb_audio_info(chip,
-				"set resolution quirk: cval->res = 16\n");
-			cval->res = 16;
-		}
-		break;
-	case USB_ID(0x1bcf, 0x2283): /* NexiGo N930AF FHD Webcam */
-	case USB_ID(0x03f0, 0x654a): /* HP 320 FHD Webcam */
-		if (!strcmp(kctl->id.name, "Mic Capture Volume")) {
-			usb_audio_info(chip,
-				"set resolution quirk: cval->res = 16\n");
-			cval->res = 16;
-		}
-		break;
-	case USB_ID(0x1bcf, 0x2281): /* HD Webcam */
-		if (!strcmp(kctl->id.name, "Mic Capture Volume")) {
-			usb_audio_info(chip,
-				"set resolution quirk: cval->res = 16\n");
-			cval->res = 16;
-		}
-		break;
 	}
 }
 
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index e96f5361e762f..2d6d0a660269b 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -2015,7 +2015,7 @@ struct usb_audio_quirk_flags_table {
 static const struct usb_audio_quirk_flags_table quirk_flags_table[] = {
 	/* Device matches */
 	DEVICE_FLG(0x03f0, 0x654a, /* HP 320 FHD Webcam */
-		   QUIRK_FLAG_GET_SAMPLE_RATE),
+		   QUIRK_FLAG_GET_SAMPLE_RATE | QUIRK_FLAG_MIC_RES_16),
 	DEVICE_FLG(0x041e, 0x3000, /* Creative SB Extigy */
 		   QUIRK_FLAG_IGNORE_CTL_ERROR),
 	DEVICE_FLG(0x041e, 0x4080, /* Creative Live Cam VF0610 */
@@ -2023,10 +2023,31 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = {
 	DEVICE_FLG(0x045e, 0x083c, /* MS USB Link headset */
 		   QUIRK_FLAG_GET_SAMPLE_RATE | QUIRK_FLAG_CTL_MSG_DELAY |
 		   QUIRK_FLAG_DISABLE_AUTOSUSPEND),
+	DEVICE_FLG(0x046d, 0x0807, /* Logitech Webcam C500 */
+		   QUIRK_FLAG_CTL_MSG_DELAY_1M | QUIRK_FLAG_MIC_RES_384),
+	DEVICE_FLG(0x046d, 0x0808, /* Logitech Webcam C600 */
+		   QUIRK_FLAG_CTL_MSG_DELAY_1M | QUIRK_FLAG_MIC_RES_384),
+	DEVICE_FLG(0x046d, 0x0809,
+		   QUIRK_FLAG_CTL_MSG_DELAY_1M | QUIRK_FLAG_MIC_RES_384),
+	DEVICE_FLG(0x046d, 0x0819, /* Logitech Webcam C210 */
+		   QUIRK_FLAG_CTL_MSG_DELAY_1M | QUIRK_FLAG_MIC_RES_384),
+	DEVICE_FLG(0x046d, 0x081b, /* HD Webcam c310 */
+		   QUIRK_FLAG_CTL_MSG_DELAY_1M | QUIRK_FLAG_MIC_RES_384),
+	DEVICE_FLG(0x046d, 0x081d, /* HD Webcam c510 */
+		   QUIRK_FLAG_CTL_MSG_DELAY_1M | QUIRK_FLAG_MIC_RES_384),
+	DEVICE_FLG(0x046d, 0x0825, /* HD Webcam c270 */
+		   QUIRK_FLAG_CTL_MSG_DELAY_1M | QUIRK_FLAG_MIC_RES_384),
+	DEVICE_FLG(0x046d, 0x0826, /* HD Webcam c525 */
+		   QUIRK_FLAG_CTL_MSG_DELAY_1M | QUIRK_FLAG_MIC_RES_384),
 	DEVICE_FLG(0x046d, 0x084c, /* Logitech ConferenceCam Connect */
 		   QUIRK_FLAG_GET_SAMPLE_RATE | QUIRK_FLAG_CTL_MSG_DELAY_1M),
+	DEVICE_FLG(0x046d, 0x08ca, /* Logitech Quickcam Fusion */
+		   QUIRK_FLAG_CTL_MSG_DELAY_1M | QUIRK_FLAG_MIC_RES_384),
 	DEVICE_FLG(0x046d, 0x0991, /* Logitech QuickCam Pro */
-		   QUIRK_FLAG_CTL_MSG_DELAY_1M | QUIRK_FLAG_IGNORE_CTL_ERROR),
+		   QUIRK_FLAG_CTL_MSG_DELAY_1M | QUIRK_FLAG_IGNORE_CTL_ERROR |
+		   QUIRK_FLAG_MIC_RES_384),
+	DEVICE_FLG(0x046d, 0x09a2, /* QuickCam Communicate Deluxe/S7500 */
+		   QUIRK_FLAG_CTL_MSG_DELAY_1M | QUIRK_FLAG_MIC_RES_384),
 	DEVICE_FLG(0x046d, 0x09a4, /* Logitech QuickCam E 3500 */
 		   QUIRK_FLAG_CTL_MSG_DELAY_1M | QUIRK_FLAG_IGNORE_CTL_ERROR),
 	DEVICE_FLG(0x0499, 0x1509, /* Steinberg UR22 */
@@ -2094,7 +2115,7 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = {
 	DEVICE_FLG(0x0fd9, 0x0008, /* Hauppauge HVR-950Q */
 		   QUIRK_FLAG_SHARE_MEDIA_DEVICE | QUIRK_FLAG_ALIGN_TRANSFER),
 	DEVICE_FLG(0x1224, 0x2a25, /* Jieli Technology USB PHY 2.0 */
-		   QUIRK_FLAG_GET_SAMPLE_RATE),
+		   QUIRK_FLAG_GET_SAMPLE_RATE | QUIRK_FLAG_MIC_RES_16),
 	DEVICE_FLG(0x1395, 0x740a, /* Sennheiser DECT */
 		   QUIRK_FLAG_GET_SAMPLE_RATE),
 	DEVICE_FLG(0x1397, 0x0507, /* Behringer UMC202HD */
@@ -2132,9 +2153,9 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = {
 	DEVICE_FLG(0x19f7, 0x0035, /* RODE NT-USB+ */
 		   QUIRK_FLAG_GET_SAMPLE_RATE),
 	DEVICE_FLG(0x1bcf, 0x2281, /* HD Webcam */
-		   QUIRK_FLAG_GET_SAMPLE_RATE),
+		   QUIRK_FLAG_GET_SAMPLE_RATE | QUIRK_FLAG_MIC_RES_16),
 	DEVICE_FLG(0x1bcf, 0x2283, /* NexiGo N930AF FHD Webcam */
-		   QUIRK_FLAG_GET_SAMPLE_RATE),
+		   QUIRK_FLAG_GET_SAMPLE_RATE | QUIRK_FLAG_MIC_RES_16),
 	DEVICE_FLG(0x2040, 0x7200, /* Hauppauge HVR-950Q */
 		   QUIRK_FLAG_SHARE_MEDIA_DEVICE | QUIRK_FLAG_ALIGN_TRANSFER),
 	DEVICE_FLG(0x2040, 0x7201, /* Hauppauge HVR-950Q-MXL */
diff --git a/sound/usb/usbaudio.h b/sound/usb/usbaudio.h
index f5a8dca66457f..65dcb1a02e976 100644
--- a/sound/usb/usbaudio.h
+++ b/sound/usb/usbaudio.h
@@ -178,6 +178,8 @@ extern bool snd_usb_skip_validation;
  * QUIRK_FLAG_FIXED_RATE
  *  Do not set PCM rate (frequency) when only one rate is available
  *  for the given endpoint.
+ * QUIRK_FLAG_MIC_RES_16 and QUIRK_FLAG_MIC_RES_384
+ *  Set the fixed resolution for Mic Capture Volume (mostly for webcams)
  */
 
 #define QUIRK_FLAG_GET_SAMPLE_RATE	(1U << 0)
@@ -202,5 +204,7 @@ extern bool snd_usb_skip_validation;
 #define QUIRK_FLAG_IFACE_SKIP_CLOSE	(1U << 19)
 #define QUIRK_FLAG_FORCE_IFACE_RESET	(1U << 20)
 #define QUIRK_FLAG_FIXED_RATE		(1U << 21)
+#define QUIRK_FLAG_MIC_RES_16		(1U << 22)
+#define QUIRK_FLAG_MIC_RES_384		(1U << 23)
 
 #endif /* __USBAUDIO_H */
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 39/48] drm/amdgpu: set the right AMDGPU sg segment limitation
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
                   ` (36 preceding siblings ...)
  2024-11-24 13:49 ` [PATCH AUTOSEL 6.1 38/48] ALSA: usb-audio: Make mic volume workarounds globally applicable Sasha Levin
@ 2024-11-24 13:49 ` Sasha Levin
  2024-11-24 13:49 ` [PATCH AUTOSEL 6.1 40/48] wifi: ipw2x00: libipw_rx_any(): fix bad alignment Sasha Levin
                   ` (8 subsequent siblings)
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:49 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Prike Liang, Christian König, Alex Deucher, Sasha Levin,
	Xinhui.Pan, airlied, simona, Frank.Min, shashank.sharma,
	felix.kuehling, Philip.Yang, Arunpravin.PaneerSelvam,
	Amaranath.Somalapuram, amd-gfx, dri-devel

From: Prike Liang <Prike.Liang@amd.com>

[ Upstream commit e2e97435783979124ba92d6870415c57ecfef6a5 ]

The driver needs to set the correct max_segment_size;
otherwise debug_dma_map_sg() will complain about the
over-mapping of the AMDGPU sg length as following:

WARNING: CPU: 6 PID: 1964 at kernel/dma/debug.c:1178 debug_dma_map_sg+0x2dc/0x370
[  364.049444] Modules linked in: veth amdgpu(OE) amdxcp drm_exec gpu_sched drm_buddy drm_ttm_helper ttm(OE) drm_suballoc_helper drm_display_helper drm_kms_helper i2c_algo_bit rpcsec_gss_krb5 auth_rpcgss nfsv4 nfs lockd grace netfs xt_conntrack xt_MASQUERADE nf_conntrack_netlink xfrm_user xfrm_algo iptable_nat xt_addrtype iptable_filter br_netfilter nvme_fabrics overlay nfnetlink_cttimeout nfnetlink openvswitch nsh nf_conncount nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c bridge stp llc amd_atl intel_rapl_msr intel_rapl_common sunrpc sch_fq_codel snd_hda_codec_realtek snd_hda_codec_generic snd_hda_scodec_component snd_hda_codec_hdmi snd_hda_intel snd_intel_dspcfg edac_mce_amd binfmt_misc snd_hda_codec snd_pci_acp6x snd_hda_core snd_acp_config snd_hwdep snd_soc_acpi kvm_amd snd_pcm kvm snd_seq_midi snd_seq_midi_event crct10dif_pclmul ghash_clmulni_intel sha512_ssse3 snd_rawmidi sha256_ssse3 sha1_ssse3 aesni_intel snd_seq nls_iso8859_1 crypto_simd snd_seq_device cryptd snd_timer rapl input_leds snd
[  364.049532]  ipmi_devintf wmi_bmof ccp serio_raw k10temp sp5100_tco soundcore ipmi_msghandler cm32181 industrialio mac_hid msr parport_pc ppdev lp parport drm efi_pstore ip_tables x_tables pci_stub crc32_pclmul nvme ahci libahci i2c_piix4 r8169 nvme_core i2c_designware_pci realtek i2c_ccgx_ucsi video wmi hid_generic cdc_ether usbnet usbhid hid r8152 mii
[  364.049576] CPU: 6 PID: 1964 Comm: rocminfo Tainted: G           OE      6.10.0-custom #492
[  364.049579] Hardware name: AMD Majolica-RN/Majolica-RN, BIOS RMJ1009A 06/13/2021
[  364.049582] RIP: 0010:debug_dma_map_sg+0x2dc/0x370
[  364.049585] Code: 89 4d b8 e8 36 b1 86 00 8b 4d b8 48 8b 55 b0 44 8b 45 a8 4c 8b 4d a0 48 89 c6 48 c7 c7 00 4b 74 bc 4c 89 4d b8 e8 b4 73 f3 ff <0f> 0b 4c 8b 4d b8 8b 15 c8 2c b8 01 85 d2 0f 85 ee fd ff ff 8b 05
[  364.049588] RSP: 0018:ffff9ca600b57ac0 EFLAGS: 00010286
[  364.049590] RAX: 0000000000000000 RBX: ffff88b7c132b0c8 RCX: 0000000000000027
[  364.049592] RDX: ffff88bb0f521688 RSI: 0000000000000001 RDI: ffff88bb0f521680
[  364.049594] RBP: ffff9ca600b57b20 R08: 000000000000006f R09: ffff9ca600b57930
[  364.049596] R10: ffff9ca600b57928 R11: ffffffffbcb46328 R12: 0000000000000000
[  364.049597] R13: 0000000000000001 R14: ffff88b7c19c0700 R15: ffff88b7c9059800
[  364.049599] FS:  00007fb2d3516e80(0000) GS:ffff88bb0f500000(0000) knlGS:0000000000000000
[  364.049601] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  364.049603] CR2: 000055610bd03598 CR3: 00000001049f6000 CR4: 0000000000350ef0
[  364.049605] Call Trace:
[  364.049607]  <TASK>
[  364.049609]  ? show_regs+0x6d/0x80
[  364.049614]  ? __warn+0x8c/0x140
[  364.049618]  ? debug_dma_map_sg+0x2dc/0x370
[  364.049621]  ? report_bug+0x193/0x1a0
[  364.049627]  ? handle_bug+0x46/0x80
[  364.049631]  ? exc_invalid_op+0x1d/0x80
[  364.049635]  ? asm_exc_invalid_op+0x1f/0x30
[  364.049642]  ? debug_dma_map_sg+0x2dc/0x370
[  364.049647]  __dma_map_sg_attrs+0x90/0xe0
[  364.049651]  dma_map_sgtable+0x25/0x40
[  364.049654]  amdgpu_bo_move+0x59a/0x850 [amdgpu]
[  364.049935]  ? srso_return_thunk+0x5/0x5f
[  364.049939]  ? amdgpu_ttm_tt_populate+0x5d/0xc0 [amdgpu]
[  364.050095]  ttm_bo_handle_move_mem+0xc3/0x180 [ttm]
[  364.050103]  ttm_bo_validate+0xc1/0x160 [ttm]
[  364.050108]  ? amdgpu_ttm_tt_get_user_pages+0xe5/0x1b0 [amdgpu]
[  364.050263]  amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu+0xa12/0xc90 [amdgpu]
[  364.050473]  kfd_ioctl_alloc_memory_of_gpu+0x16b/0x3b0 [amdgpu]
[  364.050680]  kfd_ioctl+0x3c2/0x530 [amdgpu]
[  364.050866]  ? __pfx_kfd_ioctl_alloc_memory_of_gpu+0x10/0x10 [amdgpu]
[  364.051054]  ? srso_return_thunk+0x5/0x5f
[  364.051057]  ? tomoyo_file_ioctl+0x20/0x30
[  364.051063]  __x64_sys_ioctl+0x9c/0xd0
[  364.051068]  x64_sys_call+0x1219/0x20d0
[  364.051073]  do_syscall_64+0x51/0x120
[  364.051077]  entry_SYSCALL_64_after_hwframe+0x76/0x7e
[  364.051081] RIP: 0033:0x7fb2d2f1a94f

Signed-off-by: Prike Liang <Prike.Liang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
index 2b15d938c779f..725afb497805c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@ -1732,6 +1732,7 @@ int amdgpu_ttm_init(struct amdgpu_device *adev)
 
 	mutex_init(&adev->mman.gtt_window_lock);
 
+	dma_set_max_seg_size(adev->dev, UINT_MAX);
 	/* No others user of address space so set it to 0 */
 	r = ttm_device_init(&adev->mman.bdev, &amdgpu_bo_driver, adev->dev,
 			       adev_to_drm(adev)->anon_inode->i_mapping,
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 40/48] wifi: ipw2x00: libipw_rx_any(): fix bad alignment
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
                   ` (37 preceding siblings ...)
  2024-11-24 13:49 ` [PATCH AUTOSEL 6.1 39/48] drm/amdgpu: set the right AMDGPU sg segment limitation Sasha Levin
@ 2024-11-24 13:49 ` Sasha Levin
  2024-11-24 13:49 ` [PATCH AUTOSEL 6.1 41/48] wifi: brcmfmac: Fix oops due to NULL pointer dereference in brcmf_sdiod_sglist_rw() Sasha Levin
                   ` (7 subsequent siblings)
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:49 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Jiapeng Chong, Abaci Robot, Kalle Valo, Sasha Levin,
	stas.yakovlev, linux-wireless

From: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>

[ Upstream commit 4fa4f049dc0d9741b16c96bcbf0108c85368a2b9 ]

This patch fixes incorrect code alignment.

./drivers/net/wireless/intel/ipw2x00/libipw_rx.c:871:2-3: code aligned with following code on line 882.
./drivers/net/wireless/intel/ipw2x00/libipw_rx.c:886:2-3: code aligned with following code on line 900.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=11381
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/20241101060725.54640-1-jiapeng.chong@linux.alibaba.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/wireless/intel/ipw2x00/libipw_rx.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/intel/ipw2x00/libipw_rx.c b/drivers/net/wireless/intel/ipw2x00/libipw_rx.c
index 48d6870bbf4e2..9a97ab9b89ae8 100644
--- a/drivers/net/wireless/intel/ipw2x00/libipw_rx.c
+++ b/drivers/net/wireless/intel/ipw2x00/libipw_rx.c
@@ -870,8 +870,8 @@ void libipw_rx_any(struct libipw_device *ieee,
 	switch (ieee->iw_mode) {
 	case IW_MODE_ADHOC:
 		/* our BSS and not from/to DS */
-		if (ether_addr_equal(hdr->addr3, ieee->bssid))
-		if ((fc & (IEEE80211_FCTL_TODS+IEEE80211_FCTL_FROMDS)) == 0) {
+		if (ether_addr_equal(hdr->addr3, ieee->bssid) &&
+		    ((fc & (IEEE80211_FCTL_TODS + IEEE80211_FCTL_FROMDS)) == 0)) {
 			/* promisc: get all */
 			if (ieee->dev->flags & IFF_PROMISC)
 				is_packet_for_us = 1;
@@ -885,8 +885,8 @@ void libipw_rx_any(struct libipw_device *ieee,
 		break;
 	case IW_MODE_INFRA:
 		/* our BSS (== from our AP) and from DS */
-		if (ether_addr_equal(hdr->addr2, ieee->bssid))
-		if ((fc & (IEEE80211_FCTL_TODS+IEEE80211_FCTL_FROMDS)) == IEEE80211_FCTL_FROMDS) {
+		if (ether_addr_equal(hdr->addr2, ieee->bssid) &&
+		    ((fc & (IEEE80211_FCTL_TODS + IEEE80211_FCTL_FROMDS)) == IEEE80211_FCTL_FROMDS)) {
 			/* promisc: get all */
 			if (ieee->dev->flags & IFF_PROMISC)
 				is_packet_for_us = 1;
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 41/48] wifi: brcmfmac: Fix oops due to NULL pointer dereference in brcmf_sdiod_sglist_rw()
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
                   ` (38 preceding siblings ...)
  2024-11-24 13:49 ` [PATCH AUTOSEL 6.1 40/48] wifi: ipw2x00: libipw_rx_any(): fix bad alignment Sasha Levin
@ 2024-11-24 13:49 ` Sasha Levin
  2024-11-24 13:49 ` [PATCH AUTOSEL 6.1 42/48] dsa: qca8k: Use nested lock to avoid splat Sasha Levin
                   ` (6 subsequent siblings)
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:49 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Norbert van Bolhuis, Kalle Valo, Sasha Levin, arend.vanspriel,
	saikrishnag, krzysztof.kozlowski, megi, erick.archer,
	jacobe.zang, linux-wireless, brcm80211, brcm80211-dev-list.pdl

From: Norbert van Bolhuis <nvbolhuis@gmail.com>

[ Upstream commit 857282b819cbaa0675aaab1e7542e2c0579f52d7 ]

This patch fixes a NULL pointer dereference bug in brcmfmac that occurs
when a high 'sd_sgentry_align' value applies (e.g. 512) and a lot of queued SKBs
are sent from the pkt queue.

The problem is the number of entries in the pre-allocated sgtable, it is
nents = max(rxglom_size, txglom_size) + max(rxglom_size, txglom_size) >> 4 + 1.
Given the default [rt]xglom_size=32 it's actually 35 which is too small.
Worst case, the pkt queue can end up with 64 SKBs. This occurs when a new SKB
is added for each original SKB if tailroom isn't enough to hold tail_pad.
At least one sg entry is needed for each SKB. So, eventually the "skb_queue_walk loop"
in brcmf_sdiod_sglist_rw may run out of sg entries. This makes sg_next return
NULL and this causes the oops.

The patch sets nents to max(rxglom_size, txglom_size) * 2 to be able handle
the worst-case.
Btw. this requires only 64-35=29 * 16 (or 20 if CONFIG_NEED_SG_DMA_LENGTH) = 464
additional bytes of memory.

Signed-off-by: Norbert van Bolhuis <nvbolhuis@gmail.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/20241107132903.13513-1-nvbolhuis@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
index e300278ea38c6..9217e9f6e9076 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
@@ -770,7 +770,7 @@ void brcmf_sdiod_sgtable_alloc(struct brcmf_sdio_dev *sdiodev)
 
 	nents = max_t(uint, BRCMF_DEFAULT_RXGLOM_SIZE,
 		      sdiodev->settings->bus.sdio.txglomsz);
-	nents += (nents >> 4) + 1;
+	nents *= 2;
 
 	WARN_ON(nents > sdiodev->max_segment_count);
 
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 42/48] dsa: qca8k: Use nested lock to avoid splat
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
                   ` (39 preceding siblings ...)
  2024-11-24 13:49 ` [PATCH AUTOSEL 6.1 41/48] wifi: brcmfmac: Fix oops due to NULL pointer dereference in brcmf_sdiod_sglist_rw() Sasha Levin
@ 2024-11-24 13:49 ` Sasha Levin
  2024-11-24 13:49 ` [PATCH AUTOSEL 6.1 43/48] Bluetooth: btusb: Add RTL8852BE device 0489:e123 to device tables Sasha Levin
                   ` (5 subsequent siblings)
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:49 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Andrew Lunn, Jakub Kicinski, Sasha Levin, olteanv, davem,
	edumazet, pabeni, florian.fainelli, alsi, ansuelsmth,
	michal.vokac, javier.carrasco.cruz, rmk+kernel, netdev

From: Andrew Lunn <andrew@lunn.ch>

[ Upstream commit 078e0d596f7b5952dad8662ace8f20ed2165e2ce ]

qca8k_phy_eth_command() is used to probe the child MDIO bus while the
parent MDIO is locked. This causes lockdep splat, reporting a possible
deadlock. It is not an actually deadlock, because different locks are
used. By making use of mutex_lock_nested() we can avoid this false
positive.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20241110175955.3053664-1-andrew@lunn.ch
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/dsa/qca/qca8k-8xxx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/dsa/qca/qca8k-8xxx.c b/drivers/net/dsa/qca/qca8k-8xxx.c
index 641692f716f86..47e9b2c303831 100644
--- a/drivers/net/dsa/qca/qca8k-8xxx.c
+++ b/drivers/net/dsa/qca/qca8k-8xxx.c
@@ -551,7 +551,7 @@ qca8k_phy_eth_command(struct qca8k_priv *priv, bool read, int phy,
 	 * We therefore need to lock the MDIO bus onto which the switch is
 	 * connected.
 	 */
-	mutex_lock(&priv->bus->mdio_lock);
+	mutex_lock_nested(&priv->bus->mdio_lock, MDIO_MUTEX_NESTED);
 
 	/* Actually start the request:
 	 * 1. Send mdio master packet
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 43/48] Bluetooth: btusb: Add RTL8852BE device 0489:e123 to device tables
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
                   ` (40 preceding siblings ...)
  2024-11-24 13:49 ` [PATCH AUTOSEL 6.1 42/48] dsa: qca8k: Use nested lock to avoid splat Sasha Levin
@ 2024-11-24 13:49 ` Sasha Levin
  2024-11-24 13:49 ` [PATCH AUTOSEL 6.1 44/48] Bluetooth: hci_core: Fix not checking skb length on hci_acldata_packet Sasha Levin
                   ` (4 subsequent siblings)
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:49 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Hilda Wu, Luiz Augusto von Dentz, Sasha Levin, marcel,
	luiz.dentz, linux-bluetooth

From: Hilda Wu <hildawu@realtek.com>

[ Upstream commit 69b84ffce260ff13826dc10aeb3c3e5c2288a552 ]

Add the support ID 0489:e123 to usb_device_id table for
Realtek RTL8852B chip.

The device info from /sys/kernel/debug/usb/devices as below.

T:  Bus=01 Lev=01 Prnt=01 Port=07 Cnt=04 Dev#=  7 Spd=12   MxCh= 0
D:  Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=0489 ProdID=e123 Rev= 0.00
S:  Manufacturer=Realtek
S:  Product=Bluetooth Radio
S:  SerialNumber=00e04c000001
C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms

Signed-off-by: Hilda Wu <hildawu@realtek.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/bluetooth/btusb.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 0b915f2c76078..4c9747de0d6de 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -549,6 +549,8 @@ static const struct usb_device_id blacklist_table[] = {
 						     BTUSB_WIDEBAND_SPEECH },
 	{ USB_DEVICE(0x13d3, 0x3591), .driver_info = BTUSB_REALTEK |
 						     BTUSB_WIDEBAND_SPEECH },
+	{ USB_DEVICE(0x0489, 0xe123), .driver_info = BTUSB_REALTEK |
+						     BTUSB_WIDEBAND_SPEECH },
 	{ USB_DEVICE(0x0489, 0xe125), .driver_info = BTUSB_REALTEK |
 						     BTUSB_WIDEBAND_SPEECH },
 
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 44/48] Bluetooth: hci_core: Fix not checking skb length on hci_acldata_packet
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
                   ` (41 preceding siblings ...)
  2024-11-24 13:49 ` [PATCH AUTOSEL 6.1 43/48] Bluetooth: btusb: Add RTL8852BE device 0489:e123 to device tables Sasha Levin
@ 2024-11-24 13:49 ` Sasha Levin
  2024-11-24 13:49 ` [PATCH AUTOSEL 6.1 45/48] ASoC: hdmi-codec: reorder channel allocation list Sasha Levin
                   ` (3 subsequent siblings)
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:49 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Luiz Augusto von Dentz, syzbot+6ea290ba76d8c1eb1ac2, Sasha Levin,
	marcel, johan.hedberg, luiz.dentz, linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

[ Upstream commit 3fe288a8214e7dd784d1f9b7c9e448244d316b47 ]

This fixes not checking if skb really contains an ACL header otherwise
the code may attempt to access some uninitilized/invalid memory past the
valid skb->data.

Reported-by: syzbot+6ea290ba76d8c1eb1ac2@syzkaller.appspotmail.com
Tested-by: syzbot+6ea290ba76d8c1eb1ac2@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=6ea290ba76d8c1eb1ac2
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/bluetooth/hci_core.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 789f7f4a09089..3cd7c212375fc 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -3829,18 +3829,22 @@ static void hci_tx_work(struct work_struct *work)
 /* ACL data packet */
 static void hci_acldata_packet(struct hci_dev *hdev, struct sk_buff *skb)
 {
-	struct hci_acl_hdr *hdr = (void *) skb->data;
+	struct hci_acl_hdr *hdr;
 	struct hci_conn *conn;
 	__u16 handle, flags;
 
-	skb_pull(skb, HCI_ACL_HDR_SIZE);
+	hdr = skb_pull_data(skb, sizeof(*hdr));
+	if (!hdr) {
+		bt_dev_err(hdev, "ACL packet too small");
+		goto drop;
+	}
 
 	handle = __le16_to_cpu(hdr->handle);
 	flags  = hci_flags(handle);
 	handle = hci_handle(handle);
 
-	BT_DBG("%s len %d handle 0x%4.4x flags 0x%4.4x", hdev->name, skb->len,
-	       handle, flags);
+	bt_dev_dbg(hdev, "len %d handle 0x%4.4x flags 0x%4.4x", skb->len,
+		   handle, flags);
 
 	hdev->stat.acl_rx++;
 
@@ -3859,6 +3863,7 @@ static void hci_acldata_packet(struct hci_dev *hdev, struct sk_buff *skb)
 			   handle);
 	}
 
+drop:
 	kfree_skb(skb);
 }
 
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 45/48] ASoC: hdmi-codec: reorder channel allocation list
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
                   ` (42 preceding siblings ...)
  2024-11-24 13:49 ` [PATCH AUTOSEL 6.1 44/48] Bluetooth: hci_core: Fix not checking skb length on hci_acldata_packet Sasha Levin
@ 2024-11-24 13:49 ` Sasha Levin
  2024-11-24 13:49 ` [PATCH AUTOSEL 6.1 46/48] rocker: fix link status detection in rocker_carrier_init() Sasha Levin
                   ` (2 subsequent siblings)
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:49 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Jonas Karlman, Christian Hewitt, Mark Brown, Sasha Levin,
	lgirdwood, perex, tiwai, herve.codina, krzysztof.kozlowski,
	jbrunet, linux-sound

From: Jonas Karlman <jonas@kwiboo.se>

[ Upstream commit 82ff5abc2edcfba0c0f1a1be807795e2876f46e9 ]

The ordering in hdmi_codec_get_ch_alloc_table_idx() results in
wrong channel allocation for a number of cases, e.g. when ELD
reports FL|FR|LFE|FC|RL|RR or FL|FR|LFE|FC|RL|RR|RC|RLC|RRC:

ca_id 0x01 with speaker mask FL|FR|LFE is selected instead of
ca_id 0x03 with speaker mask FL|FR|LFE|FC for 4 channels

and

ca_id 0x04 with speaker mask FL|FR|RC gets selected instead of
ca_id 0x0b with speaker mask FL|FR|LFE|FC|RL|RR for 6 channels

Fix this by reordering the channel allocation list with most
specific speaker masks at the top.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Link: https://patch.msgid.link/20241115044344.3510979-1-christianshewitt@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 sound/soc/codecs/hdmi-codec.c | 140 +++++++++++++++++++---------------
 1 file changed, 77 insertions(+), 63 deletions(-)

diff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c
index d8259afc60b08..cb664d3d02dd0 100644
--- a/sound/soc/codecs/hdmi-codec.c
+++ b/sound/soc/codecs/hdmi-codec.c
@@ -184,84 +184,97 @@ static const struct snd_pcm_chmap_elem hdmi_codec_8ch_chmaps[] = {
 /*
  * hdmi_codec_channel_alloc: speaker configuration available for CEA
  *
- * This is an ordered list that must match with hdmi_codec_8ch_chmaps struct
+ * This is an ordered list where ca_id must exist in hdmi_codec_8ch_chmaps
  * The preceding ones have better chances to be selected by
  * hdmi_codec_get_ch_alloc_table_idx().
  */
 static const struct hdmi_codec_cea_spk_alloc hdmi_codec_channel_alloc[] = {
 	{ .ca_id = 0x00, .n_ch = 2,
-	  .mask = FL | FR},
-	/* 2.1 */
-	{ .ca_id = 0x01, .n_ch = 4,
-	  .mask = FL | FR | LFE},
-	/* Dolby Surround */
+	  .mask = FL | FR },
+	{ .ca_id = 0x03, .n_ch = 4,
+	  .mask = FL | FR | LFE | FC },
 	{ .ca_id = 0x02, .n_ch = 4,
 	  .mask = FL | FR | FC },
-	/* surround51 */
+	{ .ca_id = 0x01, .n_ch = 4,
+	  .mask = FL | FR | LFE },
 	{ .ca_id = 0x0b, .n_ch = 6,
-	  .mask = FL | FR | LFE | FC | RL | RR},
-	/* surround40 */
-	{ .ca_id = 0x08, .n_ch = 6,
-	  .mask = FL | FR | RL | RR },
-	/* surround41 */
-	{ .ca_id = 0x09, .n_ch = 6,
-	  .mask = FL | FR | LFE | RL | RR },
-	/* surround50 */
+	  .mask = FL | FR | LFE | FC | RL | RR },
 	{ .ca_id = 0x0a, .n_ch = 6,
 	  .mask = FL | FR | FC | RL | RR },
-	/* 6.1 */
-	{ .ca_id = 0x0f, .n_ch = 8,
-	  .mask = FL | FR | LFE | FC | RL | RR | RC },
-	/* surround71 */
+	{ .ca_id = 0x09, .n_ch = 6,
+	  .mask = FL | FR | LFE | RL | RR },
+	{ .ca_id = 0x08, .n_ch = 6,
+	  .mask = FL | FR | RL | RR },
+	{ .ca_id = 0x07, .n_ch = 6,
+	  .mask = FL | FR | LFE | FC | RC },
+	{ .ca_id = 0x06, .n_ch = 6,
+	  .mask = FL | FR | FC | RC },
+	{ .ca_id = 0x05, .n_ch = 6,
+	  .mask = FL | FR | LFE | RC },
+	{ .ca_id = 0x04, .n_ch = 6,
+	  .mask = FL | FR | RC },
 	{ .ca_id = 0x13, .n_ch = 8,
 	  .mask = FL | FR | LFE | FC | RL | RR | RLC | RRC },
-	/* others */
-	{ .ca_id = 0x03, .n_ch = 8,
-	  .mask = FL | FR | LFE | FC },
-	{ .ca_id = 0x04, .n_ch = 8,
-	  .mask = FL | FR | RC},
-	{ .ca_id = 0x05, .n_ch = 8,
-	  .mask = FL | FR | LFE | RC },
-	{ .ca_id = 0x06, .n_ch = 8,
-	  .mask = FL | FR | FC | RC },
-	{ .ca_id = 0x07, .n_ch = 8,
-	  .mask = FL | FR | LFE | FC | RC },
-	{ .ca_id = 0x0c, .n_ch = 8,
-	  .mask = FL | FR | RC | RL | RR },
-	{ .ca_id = 0x0d, .n_ch = 8,
-	  .mask = FL | FR | LFE | RL | RR | RC },
-	{ .ca_id = 0x0e, .n_ch = 8,
-	  .mask = FL | FR | FC | RL | RR | RC },
-	{ .ca_id = 0x10, .n_ch = 8,
-	  .mask = FL | FR | RL | RR | RLC | RRC },
-	{ .ca_id = 0x11, .n_ch = 8,
-	  .mask = FL | FR | LFE | RL | RR | RLC | RRC },
+	{ .ca_id = 0x1f, .n_ch = 8,
+	  .mask = FL | FR | LFE | FC | RL | RR | FLC | FRC },
 	{ .ca_id = 0x12, .n_ch = 8,
 	  .mask = FL | FR | FC | RL | RR | RLC | RRC },
-	{ .ca_id = 0x14, .n_ch = 8,
-	  .mask = FL | FR | FLC | FRC },
-	{ .ca_id = 0x15, .n_ch = 8,
-	  .mask = FL | FR | LFE | FLC | FRC },
-	{ .ca_id = 0x16, .n_ch = 8,
-	  .mask = FL | FR | FC | FLC | FRC },
-	{ .ca_id = 0x17, .n_ch = 8,
-	  .mask = FL | FR | LFE | FC | FLC | FRC },
-	{ .ca_id = 0x18, .n_ch = 8,
-	  .mask = FL | FR | RC | FLC | FRC },
-	{ .ca_id = 0x19, .n_ch = 8,
-	  .mask = FL | FR | LFE | RC | FLC | FRC },
-	{ .ca_id = 0x1a, .n_ch = 8,
-	  .mask = FL | FR | RC | FC | FLC | FRC },
-	{ .ca_id = 0x1b, .n_ch = 8,
-	  .mask = FL | FR | LFE | RC | FC | FLC | FRC },
-	{ .ca_id = 0x1c, .n_ch = 8,
-	  .mask = FL | FR | RL | RR | FLC | FRC },
-	{ .ca_id = 0x1d, .n_ch = 8,
-	  .mask = FL | FR | LFE | RL | RR | FLC | FRC },
 	{ .ca_id = 0x1e, .n_ch = 8,
 	  .mask = FL | FR | FC | RL | RR | FLC | FRC },
-	{ .ca_id = 0x1f, .n_ch = 8,
-	  .mask = FL | FR | LFE | FC | RL | RR | FLC | FRC },
+	{ .ca_id = 0x11, .n_ch = 8,
+	  .mask = FL | FR | LFE | RL | RR | RLC | RRC },
+	{ .ca_id = 0x1d, .n_ch = 8,
+	  .mask = FL | FR | LFE | RL | RR | FLC | FRC },
+	{ .ca_id = 0x10, .n_ch = 8,
+	  .mask = FL | FR | RL | RR | RLC | RRC },
+	{ .ca_id = 0x1c, .n_ch = 8,
+	  .mask = FL | FR | RL | RR | FLC | FRC },
+	{ .ca_id = 0x0f, .n_ch = 8,
+	  .mask = FL | FR | LFE | FC | RL | RR | RC },
+	{ .ca_id = 0x1b, .n_ch = 8,
+	  .mask = FL | FR | LFE | RC | FC | FLC | FRC },
+	{ .ca_id = 0x0e, .n_ch = 8,
+	  .mask = FL | FR | FC | RL | RR | RC },
+	{ .ca_id = 0x1a, .n_ch = 8,
+	  .mask = FL | FR | RC | FC | FLC | FRC },
+	{ .ca_id = 0x0d, .n_ch = 8,
+	  .mask = FL | FR | LFE | RL | RR | RC },
+	{ .ca_id = 0x19, .n_ch = 8,
+	  .mask = FL | FR | LFE | RC | FLC | FRC },
+	{ .ca_id = 0x0c, .n_ch = 8,
+	  .mask = FL | FR | RC | RL | RR },
+	{ .ca_id = 0x18, .n_ch = 8,
+	  .mask = FL | FR | RC | FLC | FRC },
+	{ .ca_id = 0x17, .n_ch = 8,
+	  .mask = FL | FR | LFE | FC | FLC | FRC },
+	{ .ca_id = 0x16, .n_ch = 8,
+	  .mask = FL | FR | FC | FLC | FRC },
+	{ .ca_id = 0x15, .n_ch = 8,
+	  .mask = FL | FR | LFE | FLC | FRC },
+	{ .ca_id = 0x14, .n_ch = 8,
+	  .mask = FL | FR | FLC | FRC },
+	{ .ca_id = 0x0b, .n_ch = 8,
+	  .mask = FL | FR | LFE | FC | RL | RR },
+	{ .ca_id = 0x0a, .n_ch = 8,
+	  .mask = FL | FR | FC | RL | RR },
+	{ .ca_id = 0x09, .n_ch = 8,
+	  .mask = FL | FR | LFE | RL | RR },
+	{ .ca_id = 0x08, .n_ch = 8,
+	  .mask = FL | FR | RL | RR },
+	{ .ca_id = 0x07, .n_ch = 8,
+	  .mask = FL | FR | LFE | FC | RC },
+	{ .ca_id = 0x06, .n_ch = 8,
+	  .mask = FL | FR | FC | RC },
+	{ .ca_id = 0x05, .n_ch = 8,
+	  .mask = FL | FR | LFE | RC },
+	{ .ca_id = 0x04, .n_ch = 8,
+	  .mask = FL | FR | RC },
+	{ .ca_id = 0x03, .n_ch = 8,
+	  .mask = FL | FR | LFE | FC },
+	{ .ca_id = 0x02, .n_ch = 8,
+	  .mask = FL | FR | FC },
+	{ .ca_id = 0x01, .n_ch = 8,
+	  .mask = FL | FR | LFE },
 };
 
 struct hdmi_codec_priv {
@@ -370,7 +383,8 @@ static int hdmi_codec_chmap_ctl_get(struct snd_kcontrol *kcontrol,
 	struct snd_pcm_chmap *info = snd_kcontrol_chip(kcontrol);
 	struct hdmi_codec_priv *hcp = info->private_data;
 
-	map = info->chmap[hcp->chmap_idx].map;
+	if (hcp->chmap_idx != HDMI_CODEC_CHMAP_IDX_UNKNOWN)
+		map = info->chmap[hcp->chmap_idx].map;
 
 	for (i = 0; i < info->max_channels; i++) {
 		if (hcp->chmap_idx == HDMI_CODEC_CHMAP_IDX_UNKNOWN)
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 46/48] rocker: fix link status detection in rocker_carrier_init()
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
                   ` (43 preceding siblings ...)
  2024-11-24 13:49 ` [PATCH AUTOSEL 6.1 45/48] ASoC: hdmi-codec: reorder channel allocation list Sasha Levin
@ 2024-11-24 13:49 ` Sasha Levin
  2024-11-24 13:49 ` [PATCH AUTOSEL 6.1 47/48] net/neighbor: clear error in case strict check is not set Sasha Levin
  2024-11-24 13:49 ` [PATCH AUTOSEL 6.1 48/48] netpoll: Use rcu_access_pointer() in __netpoll_setup Sasha Levin
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:49 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Dmitry Antipov, Jakub Kicinski, Sasha Levin, jiri, andrew+netdev,
	davem, edumazet, pabeni, netdev

From: Dmitry Antipov <dmantipov@yandex.ru>

[ Upstream commit e64285ff41bb7a934bd815bd38f31119be62ac37 ]

Since '1 << rocker_port->pport' may be undefined for port >= 32,
cast the left operand to 'unsigned long long' like it's done in
'rocker_port_set_enable()' above. Compile tested only.

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

Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Link: https://patch.msgid.link/20241114151946.519047-1-dmantipov@yandex.ru
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/ethernet/rocker/rocker_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/rocker/rocker_main.c b/drivers/net/ethernet/rocker/rocker_main.c
index 9e59669a93dd3..2e2826c901fcc 100644
--- a/drivers/net/ethernet/rocker/rocker_main.c
+++ b/drivers/net/ethernet/rocker/rocker_main.c
@@ -2504,7 +2504,7 @@ static void rocker_carrier_init(const struct rocker_port *rocker_port)
 	u64 link_status = rocker_read64(rocker, PORT_PHYS_LINK_STATUS);
 	bool link_up;
 
-	link_up = link_status & (1 << rocker_port->pport);
+	link_up = link_status & (1ULL << rocker_port->pport);
 	if (link_up)
 		netif_carrier_on(rocker_port->dev);
 	else
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 47/48] net/neighbor: clear error in case strict check is not set
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
                   ` (44 preceding siblings ...)
  2024-11-24 13:49 ` [PATCH AUTOSEL 6.1 46/48] rocker: fix link status detection in rocker_carrier_init() Sasha Levin
@ 2024-11-24 13:49 ` Sasha Levin
  2024-11-24 13:49 ` [PATCH AUTOSEL 6.1 48/48] netpoll: Use rcu_access_pointer() in __netpoll_setup Sasha Levin
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:49 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Jakub Kicinski, Simon Horman, Sasha Levin, davem, edumazet,
	pabeni, kuniyu, gnaaman, joel.granados, linux, netdev

From: Jakub Kicinski <kuba@kernel.org>

[ Upstream commit 0de6a472c3b38432b2f184bd64eb70d9ea36d107 ]

Commit 51183d233b5a ("net/neighbor: Update neigh_dump_info for strict
data checking") added strict checking. The err variable is not cleared,
so if we find no table to dump we will return the validation error even
if user did not want strict checking.

I think the only way to hit this is to send an buggy request, and ask
for a table which doesn't exist, so there's no point treating this
as a real fix. I only noticed it because a syzbot repro depended on it
to trigger another bug.

Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20241115003221.733593-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/core/neighbour.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index c842f150c3048..dd0965e1afe85 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -2865,6 +2865,7 @@ static int neigh_dump_info(struct sk_buff *skb, struct netlink_callback *cb)
 	err = neigh_valid_dump_req(nlh, cb->strict_check, &filter, cb->extack);
 	if (err < 0 && cb->strict_check)
 		return err;
+	err = 0;
 
 	s_t = cb->args[0];
 
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* [PATCH AUTOSEL 6.1 48/48] netpoll: Use rcu_access_pointer() in __netpoll_setup
  2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
                   ` (45 preceding siblings ...)
  2024-11-24 13:49 ` [PATCH AUTOSEL 6.1 47/48] net/neighbor: clear error in case strict check is not set Sasha Levin
@ 2024-11-24 13:49 ` Sasha Levin
  46 siblings, 0 replies; 49+ messages in thread
From: Sasha Levin @ 2024-11-24 13:49 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Breno Leitao, Michal Kubiak, Jakub Kicinski, Sasha Levin, davem,
	edumazet, pabeni, horms, viro, netdev

From: Breno Leitao <leitao@debian.org>

[ Upstream commit c69c5e10adb903ae2438d4f9c16eccf43d1fcbc1 ]

The ndev->npinfo pointer in __netpoll_setup() is RCU-protected but is being
accessed directly for a NULL check. While no RCU read lock is held in this
context, we should still use proper RCU primitives for consistency and
correctness.

Replace the direct NULL check with rcu_access_pointer(), which is the
appropriate primitive when only checking for NULL without dereferencing
the pointer. This function provides the necessary ordering guarantees
without requiring RCU read-side protection.

Reviewed-by: Michal Kubiak <michal.kubiak@intel.com>
Signed-off-by: Breno Leitao <leitao@debian.org>
Link: https://patch.msgid.link/20241118-netpoll_rcu-v1-1-a1888dcb4a02@debian.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/core/netpoll.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index fd2195cfcb4aa..681eeb2b73992 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -636,7 +636,7 @@ int __netpoll_setup(struct netpoll *np, struct net_device *ndev)
 		goto out;
 	}
 
-	if (!ndev->npinfo) {
+	if (!rcu_access_pointer(ndev->npinfo)) {
 		npinfo = kmalloc(sizeof(*npinfo), GFP_KERNEL);
 		if (!npinfo) {
 			err = -ENOMEM;
-- 
2.43.0


^ permalink raw reply	[flat|nested] 49+ messages in thread

* RE: [PATCH AUTOSEL 6.1 35/48] net: enetc: remove ERR050089 workaround for i.MX95
  2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 35/48] net: enetc: remove ERR050089 workaround for i.MX95 Sasha Levin
@ 2024-11-25  1:55   ` Wei Fang
  0 siblings, 0 replies; 49+ messages in thread
From: Wei Fang @ 2024-11-25  1:55 UTC (permalink / raw)
  To: Sasha Levin, linux-kernel, stable
  Cc: Vladimir Oltean, David S . Miller, Claudiu Manoil, Clark Wang,
	andrew+netdev, edumazet, kuba, pabeni, imx, netdev

> From: Vladimir Oltean <vladimir.oltean@nxp.com>
> 
> [ Upstream commit 86831a3f4cd4c924dd78cf0d6e4d73acacfe1b11 ]
> 
> The ERR050089 workaround causes performance degradation and potential
> functional issues (e.g., RCU stalls) under certain workloads. Since new SoCs like
> i.MX95 do not require this workaround, use a static key to compile out
> enetc_lock_mdio() and enetc_unlock_mdio() at runtime, improving
> performance and avoiding unnecessary logic.
> 
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
> Signed-off-by: Wei Fang <wei.fang@nxp.com>
> Signed-off-by: David S. Miller <davem@davemloft.net>
> Signed-off-by: Sasha Levin <sashal@kernel.org>
> ---
>  .../net/ethernet/freescale/enetc/enetc_hw.h   | 34 +++++++++++++------
>  .../ethernet/freescale/enetc/enetc_pci_mdio.c | 28 +++++++++++++++
>  2 files changed, 52 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/net/ethernet/freescale/enetc/enetc_hw.h
> b/drivers/net/ethernet/freescale/enetc/enetc_hw.h
> index 18ca1f42b1f75..a5e38804e2811 100644
> --- a/drivers/net/ethernet/freescale/enetc/enetc_hw.h
> +++ b/drivers/net/ethernet/freescale/enetc/enetc_hw.h
> @@ -372,18 +372,22 @@ struct enetc_hw {
>   */
>  extern rwlock_t enetc_mdio_lock;
> 
> +DECLARE_STATIC_KEY_FALSE(enetc_has_err050089);
> +
>  /* use this locking primitive only on the fast datapath to
>   * group together multiple non-MDIO register accesses to
>   * minimize the overhead of the lock
>   */
>  static inline void enetc_lock_mdio(void)  {
> -	read_lock(&enetc_mdio_lock);
> +	if (static_branch_unlikely(&enetc_has_err050089))
> +		read_lock(&enetc_mdio_lock);
>  }
> 
>  static inline void enetc_unlock_mdio(void)  {
> -	read_unlock(&enetc_mdio_lock);
> +	if (static_branch_unlikely(&enetc_has_err050089))
> +		read_unlock(&enetc_mdio_lock);
>  }
> 
>  /* use these accessors only on the fast datapath under @@ -392,14 +396,16
> @@ static inline void enetc_unlock_mdio(void)
>   */
>  static inline u32 enetc_rd_reg_hot(void __iomem *reg)  {
> -	lockdep_assert_held(&enetc_mdio_lock);
> +	if (static_branch_unlikely(&enetc_has_err050089))
> +		lockdep_assert_held(&enetc_mdio_lock);
> 
>  	return ioread32(reg);
>  }
> 
>  static inline void enetc_wr_reg_hot(void __iomem *reg, u32 val)  {
> -	lockdep_assert_held(&enetc_mdio_lock);
> +	if (static_branch_unlikely(&enetc_has_err050089))
> +		lockdep_assert_held(&enetc_mdio_lock);
> 
>  	iowrite32(val, reg);
>  }
> @@ -428,9 +434,13 @@ static inline u32 _enetc_rd_mdio_reg_wa(void
> __iomem *reg)
>  	unsigned long flags;
>  	u32 val;
> 
> -	write_lock_irqsave(&enetc_mdio_lock, flags);
> -	val = ioread32(reg);
> -	write_unlock_irqrestore(&enetc_mdio_lock, flags);
> +	if (static_branch_unlikely(&enetc_has_err050089)) {
> +		write_lock_irqsave(&enetc_mdio_lock, flags);
> +		val = ioread32(reg);
> +		write_unlock_irqrestore(&enetc_mdio_lock, flags);
> +	} else {
> +		val = ioread32(reg);
> +	}
> 
>  	return val;
>  }
> @@ -439,9 +449,13 @@ static inline void _enetc_wr_mdio_reg_wa(void
> __iomem *reg, u32 val)  {
>  	unsigned long flags;
> 
> -	write_lock_irqsave(&enetc_mdio_lock, flags);
> -	iowrite32(val, reg);
> -	write_unlock_irqrestore(&enetc_mdio_lock, flags);
> +	if (static_branch_unlikely(&enetc_has_err050089)) {
> +		write_lock_irqsave(&enetc_mdio_lock, flags);
> +		iowrite32(val, reg);
> +		write_unlock_irqrestore(&enetc_mdio_lock, flags);
> +	} else {
> +		iowrite32(val, reg);
> +	}
>  }
> 
>  #ifdef ioread64
> diff --git a/drivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c
> b/drivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c
> index dafb26f81f95f..d3248881a9b7e 100644
> --- a/drivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c
> +++ b/drivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c
> @@ -9,6 +9,28 @@
>  #define ENETC_MDIO_BUS_NAME	ENETC_MDIO_DEV_NAME " Bus"
>  #define ENETC_MDIO_DRV_NAME	ENETC_MDIO_DEV_NAME " driver"
> 
> +DEFINE_STATIC_KEY_FALSE(enetc_has_err050089);
> +EXPORT_SYMBOL_GPL(enetc_has_err050089);
> +
> +static void enetc_emdio_enable_err050089(struct pci_dev *pdev) {
> +	if (pdev->vendor == PCI_VENDOR_ID_FREESCALE &&
> +	    pdev->device == ENETC_MDIO_DEV_ID) {
> +		static_branch_inc(&enetc_has_err050089);
> +		dev_info(&pdev->dev, "Enabled ERR050089 workaround\n");
> +	}
> +}
> +
> +static void enetc_emdio_disable_err050089(struct pci_dev *pdev) {
> +	if (pdev->vendor == PCI_VENDOR_ID_FREESCALE &&
> +	    pdev->device == ENETC_MDIO_DEV_ID) {
> +		static_branch_dec(&enetc_has_err050089);
> +		if (!static_key_enabled(&enetc_has_err050089.key))
> +			dev_info(&pdev->dev, "Disabled ERR050089 workaround\n");
> +	}
> +}
> +
>  static int enetc_pci_mdio_probe(struct pci_dev *pdev,
>  				const struct pci_device_id *ent)
>  {
> @@ -60,6 +82,8 @@ static int enetc_pci_mdio_probe(struct pci_dev *pdev,
>  		goto err_pci_mem_reg;
>  	}
> 
> +	enetc_emdio_enable_err050089(pdev);
> +
>  	err = of_mdiobus_register(bus, dev->of_node);
>  	if (err)
>  		goto err_mdiobus_reg;
> @@ -69,6 +93,7 @@ static int enetc_pci_mdio_probe(struct pci_dev *pdev,
>  	return 0;
> 
>  err_mdiobus_reg:
> +	enetc_emdio_disable_err050089(pdev);
>  	pci_release_region(pdev, 0);
>  err_pci_mem_reg:
>  	pci_disable_device(pdev);
> @@ -86,6 +111,9 @@ static void enetc_pci_mdio_remove(struct pci_dev
> *pdev)
>  	struct enetc_mdio_priv *mdio_priv;
> 
>  	mdiobus_unregister(bus);
> +
> +	enetc_emdio_disable_err050089(pdev);
> +
>  	mdio_priv = bus->priv;
>  	iounmap(mdio_priv->hw->port);
>  	pci_release_region(pdev, 0);
> --
> 2.43.0

Hi Sasha,

This patch does not need to be backported, because i.MX95 NETC is only
supported in the latest kernel (should be 6.13, Linus tree). For the old
kernel, only LS1028A NETC is supported, so this problem does not exist.


^ permalink raw reply	[flat|nested] 49+ messages in thread

end of thread, other threads:[~2024-11-25  1:55 UTC | newest]

Thread overview: 49+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-24 13:48 [PATCH AUTOSEL 6.1 01/48] drm/vc4: hdmi: Avoid log spam for audio start failure Sasha Levin
2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 02/48] drm/vc4: hvs: Set AXI panic modes for the HVS Sasha Levin
2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 03/48] drm: panel-orientation-quirks: Add quirk for AYA NEO 2 model Sasha Levin
2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 04/48] drm: panel-orientation-quirks: Add quirk for AYA NEO Founder edition Sasha Levin
2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 05/48] drm: panel-orientation-quirks: Add quirk for AYA NEO GEEK Sasha Levin
2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 06/48] drm/bridge: it6505: Enable module autoloading Sasha Levin
2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 07/48] drm/mcde: " Sasha Levin
2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 08/48] drm/radeon/r600_cs: Fix possible int overflow in r600_packet3_check() Sasha Levin
2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 09/48] drm/display: Fix building with GCC 15 Sasha Levin
2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 10/48] r8169: don't apply UDP padding quirk on RTL8126A Sasha Levin
2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 11/48] samples/bpf: Fix a resource leak Sasha Levin
2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 12/48] net: fec_mpc52xx_phy: Use %pa to format resource_size_t Sasha Levin
2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 13/48] net: ethernet: fs_enet: " Sasha Levin
2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 14/48] net/sched: cbs: Fix integer overflow in cbs_set_port_rate() Sasha Levin
2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 15/48] af_packet: avoid erroring out after sock_init_data() in packet_create() Sasha Levin
2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 16/48] Bluetooth: L2CAP: do not leave dangling sk pointer on error in l2cap_sock_create() Sasha Levin
2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 17/48] Bluetooth: RFCOMM: avoid leaving dangling sk pointer in rfcomm_sock_alloc() Sasha Levin
2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 18/48] net: af_can: do not leave a dangling sk pointer in can_create() Sasha Levin
2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 19/48] net: ieee802154: do not leave a dangling sk pointer in ieee802154_create() Sasha Levin
2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 20/48] net: inet: do not leave a dangling sk pointer in inet_create() Sasha Levin
2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 21/48] net: inet6: do not leave a dangling sk pointer in inet6_create() Sasha Levin
2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 22/48] wifi: ath5k: add PCI ID for SX76X Sasha Levin
2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 23/48] wifi: ath5k: add PCI ID for Arcadyan devices Sasha Levin
2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 24/48] drm/panel: simple: Add Microchip AC69T88A LVDS Display panel Sasha Levin
2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 25/48] net: sfp: change quirks for Alcatel Lucent G-010S-P Sasha Levin
2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 26/48] drm/sched: memset() 'job' in drm_sched_job_init() Sasha Levin
2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 27/48] drm/amdgpu: clear RB_OVERFLOW bit when enabling interrupts for vega20_ih Sasha Levin
2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 28/48] drm/amdgpu: Dereference the ATCS ACPI buffer Sasha Levin
2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 29/48] drm/amdgpu: refine error handling in amdgpu_ttm_tt_pin_userptr Sasha Levin
2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 30/48] dma-debug: fix a possible deadlock on radix_lock Sasha Levin
2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 31/48] jfs: array-index-out-of-bounds fix in dtReadFirst Sasha Levin
2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 32/48] jfs: fix shift-out-of-bounds in dbSplit Sasha Levin
2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 33/48] jfs: fix array-index-out-of-bounds in jfs_readdir Sasha Levin
2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 34/48] jfs: add a check to prevent array-index-out-of-bounds in dbAdjTree Sasha Levin
2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 35/48] net: enetc: remove ERR050089 workaround for i.MX95 Sasha Levin
2024-11-25  1:55   ` Wei Fang
2024-11-24 13:48 ` [PATCH AUTOSEL 6.1 36/48] net: enetc: add i.MX95 EMDIO support Sasha Levin
2024-11-24 13:49 ` [PATCH AUTOSEL 6.1 37/48] drm/amdgpu: skip amdgpu_device_cache_pci_state under sriov Sasha Levin
2024-11-24 13:49 ` [PATCH AUTOSEL 6.1 38/48] ALSA: usb-audio: Make mic volume workarounds globally applicable Sasha Levin
2024-11-24 13:49 ` [PATCH AUTOSEL 6.1 39/48] drm/amdgpu: set the right AMDGPU sg segment limitation Sasha Levin
2024-11-24 13:49 ` [PATCH AUTOSEL 6.1 40/48] wifi: ipw2x00: libipw_rx_any(): fix bad alignment Sasha Levin
2024-11-24 13:49 ` [PATCH AUTOSEL 6.1 41/48] wifi: brcmfmac: Fix oops due to NULL pointer dereference in brcmf_sdiod_sglist_rw() Sasha Levin
2024-11-24 13:49 ` [PATCH AUTOSEL 6.1 42/48] dsa: qca8k: Use nested lock to avoid splat Sasha Levin
2024-11-24 13:49 ` [PATCH AUTOSEL 6.1 43/48] Bluetooth: btusb: Add RTL8852BE device 0489:e123 to device tables Sasha Levin
2024-11-24 13:49 ` [PATCH AUTOSEL 6.1 44/48] Bluetooth: hci_core: Fix not checking skb length on hci_acldata_packet Sasha Levin
2024-11-24 13:49 ` [PATCH AUTOSEL 6.1 45/48] ASoC: hdmi-codec: reorder channel allocation list Sasha Levin
2024-11-24 13:49 ` [PATCH AUTOSEL 6.1 46/48] rocker: fix link status detection in rocker_carrier_init() Sasha Levin
2024-11-24 13:49 ` [PATCH AUTOSEL 6.1 47/48] net/neighbor: clear error in case strict check is not set Sasha Levin
2024-11-24 13:49 ` [PATCH AUTOSEL 6.1 48/48] netpoll: Use rcu_access_pointer() in __netpoll_setup Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®