* [PATCH AUTOSEL 6.5 1/6] ASoC: ti: omap-mcbsp: Fix runtime PM underflow warnings
@ 2023-11-15 3:34 Sasha Levin
2023-11-15 3:34 ` [PATCH AUTOSEL 6.5 2/6] drm/qxl: prevent memory leak Sasha Levin
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: Sasha Levin @ 2023-11-15 3:34 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Tony Lindgren, Andreas Kemnade, Mark Brown, Sasha Levin,
peter.ujfalusi, jarkko.nikula, lgirdwood, perex, tiwai,
alsa-devel, linux-omap, linux-sound
From: Tony Lindgren <tony@atomide.com>
[ Upstream commit fbb74e56378d8306f214658e3d525a8b3f000c5a ]
We need to check for an active device as otherwise we get warnings
for some mcbsp instances for "Runtime PM usage count underflow!".
Reported-by: Andreas Kemnade <andreas@kemnade.info>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Link: https://lore.kernel.org/r/20231030052340.13415-1-tony@atomide.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/ti/omap-mcbsp.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/sound/soc/ti/omap-mcbsp.c b/sound/soc/ti/omap-mcbsp.c
index 21fa7b9787997..94c514e57eef9 100644
--- a/sound/soc/ti/omap-mcbsp.c
+++ b/sound/soc/ti/omap-mcbsp.c
@@ -74,14 +74,16 @@ static int omap2_mcbsp_set_clks_src(struct omap_mcbsp *mcbsp, u8 fck_src_id)
return -EINVAL;
}
- pm_runtime_put_sync(mcbsp->dev);
+ if (mcbsp->active)
+ pm_runtime_put_sync(mcbsp->dev);
r = clk_set_parent(mcbsp->fclk, fck_src);
if (r)
dev_err(mcbsp->dev, "CLKS: could not clk_set_parent() to %s\n",
src);
- pm_runtime_get_sync(mcbsp->dev);
+ if (mcbsp->active)
+ pm_runtime_get_sync(mcbsp->dev);
clk_put(fck_src);
--
2.42.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH AUTOSEL 6.5 2/6] drm/qxl: prevent memory leak
2023-11-15 3:34 [PATCH AUTOSEL 6.5 1/6] ASoC: ti: omap-mcbsp: Fix runtime PM underflow warnings Sasha Levin
@ 2023-11-15 3:34 ` Sasha Levin
2023-11-15 7:07 ` [Spice-devel] " Frediano Ziglio
2023-11-15 3:34 ` [PATCH AUTOSEL 6.5 3/6] ALSA: hda/realtek: Add quirk for ASUS UX7602ZM Sasha Levin
` (3 subsequent siblings)
4 siblings, 1 reply; 7+ messages in thread
From: Sasha Levin @ 2023-11-15 3:34 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Zongmin Zhou, Dave Airlie, Maxime Ripard, Sasha Levin, kraxel,
maarten.lankhorst, tzimmermann, airlied, daniel, virtualization,
spice-devel, dri-devel
From: Zongmin Zhou <zhouzongmin@kylinos.cn>
[ Upstream commit 0e8b9f258baed25f1c5672613699247c76b007b5 ]
The allocated memory for qdev->dumb_heads should be released
in qxl_destroy_monitors_object before qxl suspend.
otherwise,qxl_create_monitors_object will be called to
reallocate memory for qdev->dumb_heads after qxl resume,
it will cause memory leak.
Signed-off-by: Zongmin Zhou <zhouzongmin@kylinos.cn>
Link: https://lore.kernel.org/r/20230801025309.4049813-1-zhouzongmin@kylinos.cn
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/qxl/qxl_display.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c
index 6492a70e3c396..404b0483bb7cb 100644
--- a/drivers/gpu/drm/qxl/qxl_display.c
+++ b/drivers/gpu/drm/qxl/qxl_display.c
@@ -1229,6 +1229,9 @@ int qxl_destroy_monitors_object(struct qxl_device *qdev)
if (!qdev->monitors_config_bo)
return 0;
+ kfree(qdev->dumb_heads);
+ qdev->dumb_heads = NULL;
+
qdev->monitors_config = NULL;
qdev->ram_header->monitors_config = 0;
--
2.42.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH AUTOSEL 6.5 3/6] ALSA: hda/realtek: Add quirk for ASUS UX7602ZM
2023-11-15 3:34 [PATCH AUTOSEL 6.5 1/6] ASoC: ti: omap-mcbsp: Fix runtime PM underflow warnings Sasha Levin
2023-11-15 3:34 ` [PATCH AUTOSEL 6.5 2/6] drm/qxl: prevent memory leak Sasha Levin
@ 2023-11-15 3:34 ` Sasha Levin
2023-11-15 3:34 ` [PATCH AUTOSEL 6.5 4/6] LoongArch/smp: Call rcutree_report_cpu_starting() earlier Sasha Levin
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Sasha Levin @ 2023-11-15 3:34 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Alex Spataru, Takashi Iwai, Sasha Levin, perex, tiwai, kailang,
luke, sbinding, andy.chi, shenghao-ding, l.guzenko, ruinairas1992,
yangyuchi66, vitalyr, linux-sound
From: Alex Spataru <alex_spataru@outlook.com>
[ Upstream commit 26fd31ef9c02a5e91cdb8eea127b056bd7cf0b3b ]
Enables the SPI-connected CSC35L41 audio amplifier for this
laptop model.
As of BIOS version 303 it's still necessary to
modify the ACPI table to add the related _DSD properties:
https://github.com/alex-spataru/asus_zenbook_ux7602zm_sound/
Signed-off-by: Alex Spataru <alex_spataru@outlook.com>
Link: https://lore.kernel.org/r/DS7PR07MB7621BB5BB14F5473D181624CE3A4A@DS7PR07MB7621.namprd07.prod.outlook.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/pci/hda/patch_realtek.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index c2fbf484b1104..26ef0bc8190fb 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -9772,6 +9772,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x1043, 0x1d4e, "ASUS TM420", ALC256_FIXUP_ASUS_HPE),
SND_PCI_QUIRK(0x1043, 0x1e02, "ASUS UX3402ZA", ALC245_FIXUP_CS35L41_SPI_2),
SND_PCI_QUIRK(0x1043, 0x16a3, "ASUS UX3402VA", ALC245_FIXUP_CS35L41_SPI_2),
+ SND_PCI_QUIRK(0x1043, 0x1f62, "ASUS UX7602ZM", ALC245_FIXUP_CS35L41_SPI_2),
SND_PCI_QUIRK(0x1043, 0x1e11, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA502),
SND_PCI_QUIRK(0x1043, 0x1e12, "ASUS UM3402", ALC287_FIXUP_CS35L41_I2C_2),
SND_PCI_QUIRK(0x1043, 0x1e51, "ASUS Zephyrus M15", ALC294_FIXUP_ASUS_GU502_PINS),
--
2.42.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH AUTOSEL 6.5 4/6] LoongArch/smp: Call rcutree_report_cpu_starting() earlier
2023-11-15 3:34 [PATCH AUTOSEL 6.5 1/6] ASoC: ti: omap-mcbsp: Fix runtime PM underflow warnings Sasha Levin
2023-11-15 3:34 ` [PATCH AUTOSEL 6.5 2/6] drm/qxl: prevent memory leak Sasha Levin
2023-11-15 3:34 ` [PATCH AUTOSEL 6.5 3/6] ALSA: hda/realtek: Add quirk for ASUS UX7602ZM Sasha Levin
@ 2023-11-15 3:34 ` Sasha Levin
2023-11-15 3:34 ` [PATCH AUTOSEL 6.5 5/6] drm/amdgpu: fix software pci_unplug on some chips Sasha Levin
2023-11-15 3:34 ` [PATCH AUTOSEL 6.5 6/6] pwm: Fix double shift bug Sasha Levin
4 siblings, 0 replies; 7+ messages in thread
From: Sasha Levin @ 2023-11-15 3:34 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Huacai Chen, Sasha Levin, chenhuacai, maobibo, peterz, palmer,
guoren, vschneid, jpoimboe, yangtiezhu, zhoubinbin, loongarch
From: Huacai Chen <chenhuacai@loongson.cn>
[ Upstream commit a2ccf46333d7b2cf9658f0d82ac74097c1542fae ]
rcutree_report_cpu_starting() must be called before cpu_probe() to avoid
the following lockdep splat that triggered by calling __alloc_pages() when
CONFIG_PROVE_RCU_LIST=y:
=============================
WARNING: suspicious RCU usage
6.6.0+ #980 Not tainted
-----------------------------
kernel/locking/lockdep.c:3761 RCU-list traversed in non-reader section!!
other info that might help us debug this:
RCU used illegally from offline CPU!
rcu_scheduler_active = 1, debug_locks = 1
1 lock held by swapper/1/0:
#0: 900000000c82ef98 (&pcp->lock){+.+.}-{2:2}, at: get_page_from_freelist+0x894/0x1790
CPU: 1 PID: 0 Comm: swapper/1 Not tainted 6.6.0+ #980
Stack : 0000000000000001 9000000004f79508 9000000004893670 9000000100310000
90000001003137d0 0000000000000000 90000001003137d8 9000000004f79508
0000000000000000 0000000000000001 0000000000000000 90000000048a3384
203a656d616e2065 ca43677b3687e616 90000001002c3480 0000000000000008
000000000000009d 0000000000000000 0000000000000001 80000000ffffe0b8
000000000000000d 0000000000000033 0000000007ec0000 13bbf50562dad831
9000000005140748 0000000000000000 9000000004f79508 0000000000000004
0000000000000000 9000000005140748 90000001002bad40 0000000000000000
90000001002ba400 0000000000000000 9000000003573ec8 0000000000000000
00000000000000b0 0000000000000004 0000000000000000 0000000000070000
...
Call Trace:
[<9000000003573ec8>] show_stack+0x38/0x150
[<9000000004893670>] dump_stack_lvl+0x74/0xa8
[<900000000360d2bc>] lockdep_rcu_suspicious+0x14c/0x190
[<900000000361235c>] __lock_acquire+0xd0c/0x2740
[<90000000036146f4>] lock_acquire+0x104/0x2c0
[<90000000048a955c>] _raw_spin_lock_irqsave+0x5c/0x90
[<900000000381cd5c>] rmqueue_bulk+0x6c/0x950
[<900000000381fc0c>] get_page_from_freelist+0xd4c/0x1790
[<9000000003821c6c>] __alloc_pages+0x1bc/0x3e0
[<9000000003583b40>] tlb_init+0x150/0x2a0
[<90000000035742a0>] per_cpu_trap_init+0xf0/0x110
[<90000000035712fc>] cpu_probe+0x3dc/0x7a0
[<900000000357ed20>] start_secondary+0x40/0xb0
[<9000000004897138>] smpboot_entry+0x54/0x58
raw_smp_processor_id() is required in order to avoid calling into lockdep
before RCU has declared the CPU to be watched for readers.
See also commit 29368e093921 ("x86/smpboot: Move rcu_cpu_starting() earlier"),
commit de5d9dae150c ("s390/smp: move rcu_cpu_starting() earlier") and commit
99f070b62322 ("powerpc/smp: Call rcu_cpu_starting() earlier").
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/loongarch/kernel/smp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/loongarch/kernel/smp.c b/arch/loongarch/kernel/smp.c
index 6667b0a90f81d..dafccf44308b6 100644
--- a/arch/loongarch/kernel/smp.c
+++ b/arch/loongarch/kernel/smp.c
@@ -503,8 +503,9 @@ asmlinkage void start_secondary(void)
unsigned int cpu;
sync_counter();
- cpu = smp_processor_id();
+ cpu = raw_smp_processor_id();
set_my_cpu_offset(per_cpu_offset(cpu));
+ rcutree_report_cpu_starting(cpu);
cpu_probe();
constant_clockevent_init();
--
2.42.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH AUTOSEL 6.5 5/6] drm/amdgpu: fix software pci_unplug on some chips
2023-11-15 3:34 [PATCH AUTOSEL 6.5 1/6] ASoC: ti: omap-mcbsp: Fix runtime PM underflow warnings Sasha Levin
` (2 preceding siblings ...)
2023-11-15 3:34 ` [PATCH AUTOSEL 6.5 4/6] LoongArch/smp: Call rcutree_report_cpu_starting() earlier Sasha Levin
@ 2023-11-15 3:34 ` Sasha Levin
2023-11-15 3:34 ` [PATCH AUTOSEL 6.5 6/6] pwm: Fix double shift bug Sasha Levin
4 siblings, 0 replies; 7+ messages in thread
From: Sasha Levin @ 2023-11-15 3:34 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Vitaly Prosyak, Hawking Zhang, Luben Tuikov, Alex Deucher,
Christian Koenig, Sasha Levin, Xinhui.Pan, airlied, daniel,
Hawking.Zhang, tao.zhou1, Stanley.Yang, YiPeng.Chai,
kevinyang.wang, amd-gfx, dri-devel
From: Vitaly Prosyak <vitaly.prosyak@amd.com>
[ Upstream commit 4638e0c29a3f2294d5de0d052a4b8c9f33ccb957 ]
When software 'pci unplug' using IGT is executed we got a sysfs directory
entry is NULL for differant ras blocks like hdp, umc, etc.
Before call 'sysfs_remove_file_from_group' and 'sysfs_remove_group'
check that 'sd' is not NULL.
[ +0.000001] RIP: 0010:sysfs_remove_group+0x83/0x90
[ +0.000002] Code: 31 c0 31 d2 31 f6 31 ff e9 9a a8 b4 00 4c 89 e7 e8 f2 a2 ff ff eb c2 49 8b 55 00 48 8b 33 48 c7 c7 80 65 94 82 e8 cd 82 bb ff <0f> 0b eb cc 66 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 90
[ +0.000001] RSP: 0018:ffffc90002067c90 EFLAGS: 00010246
[ +0.000002] RAX: 0000000000000000 RBX: ffffffff824ea180 RCX: 0000000000000000
[ +0.000001] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[ +0.000001] RBP: ffffc90002067ca8 R08: 0000000000000000 R09: 0000000000000000
[ +0.000001] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
[ +0.000001] R13: ffff88810a395f48 R14: ffff888101aab0d0 R15: 0000000000000000
[ +0.000001] FS: 00007f5ddaa43a00(0000) GS:ffff88841e800000(0000) knlGS:0000000000000000
[ +0.000002] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ +0.000001] CR2: 00007f8ffa61ba50 CR3: 0000000106432000 CR4: 0000000000350ef0
[ +0.000001] Call Trace:
[ +0.000001] <TASK>
[ +0.000001] ? show_regs+0x72/0x90
[ +0.000002] ? sysfs_remove_group+0x83/0x90
[ +0.000002] ? __warn+0x8d/0x160
[ +0.000001] ? sysfs_remove_group+0x83/0x90
[ +0.000001] ? report_bug+0x1bb/0x1d0
[ +0.000003] ? handle_bug+0x46/0x90
[ +0.000001] ? exc_invalid_op+0x19/0x80
[ +0.000002] ? asm_exc_invalid_op+0x1b/0x20
[ +0.000003] ? sysfs_remove_group+0x83/0x90
[ +0.000001] dpm_sysfs_remove+0x61/0x70
[ +0.000002] device_del+0xa3/0x3d0
[ +0.000002] ? ktime_get_mono_fast_ns+0x46/0xb0
[ +0.000002] device_unregister+0x18/0x70
[ +0.000001] i2c_del_adapter+0x26d/0x330
[ +0.000002] arcturus_i2c_control_fini+0x25/0x50 [amdgpu]
[ +0.000236] smu_sw_fini+0x38/0x260 [amdgpu]
[ +0.000241] amdgpu_device_fini_sw+0x116/0x670 [amdgpu]
[ +0.000186] ? mutex_lock+0x13/0x50
[ +0.000003] amdgpu_driver_release_kms+0x16/0x40 [amdgpu]
[ +0.000192] drm_minor_release+0x4f/0x80 [drm]
[ +0.000025] drm_release+0xfe/0x150 [drm]
[ +0.000027] __fput+0x9f/0x290
[ +0.000002] ____fput+0xe/0x20
[ +0.000002] task_work_run+0x61/0xa0
[ +0.000002] exit_to_user_mode_prepare+0x150/0x170
[ +0.000002] syscall_exit_to_user_mode+0x2a/0x50
Cc: Hawking Zhang <hawking.zhang@amd.com>
Cc: Luben Tuikov <luben.tuikov@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian Koenig <christian.koenig@amd.com>
Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com>
Reviewed-by: Luben Tuikov <luben.tuikov@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_ras.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
index 7d5019a884024..2003be3390aab 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
@@ -1380,7 +1380,8 @@ static void amdgpu_ras_sysfs_remove_bad_page_node(struct amdgpu_device *adev)
{
struct amdgpu_ras *con = amdgpu_ras_get_context(adev);
- sysfs_remove_file_from_group(&adev->dev->kobj,
+ if (adev->dev->kobj.sd)
+ sysfs_remove_file_from_group(&adev->dev->kobj,
&con->badpages_attr.attr,
RAS_FS_NAME);
}
@@ -1397,7 +1398,8 @@ static int amdgpu_ras_sysfs_remove_feature_node(struct amdgpu_device *adev)
.attrs = attrs,
};
- sysfs_remove_group(&adev->dev->kobj, &group);
+ if (adev->dev->kobj.sd)
+ sysfs_remove_group(&adev->dev->kobj, &group);
return 0;
}
@@ -1444,7 +1446,8 @@ int amdgpu_ras_sysfs_remove(struct amdgpu_device *adev,
if (!obj || !obj->attr_inuse)
return -EINVAL;
- sysfs_remove_file_from_group(&adev->dev->kobj,
+ if (adev->dev->kobj.sd)
+ sysfs_remove_file_from_group(&adev->dev->kobj,
&obj->sysfs_attr.attr,
RAS_FS_NAME);
obj->attr_inuse = 0;
--
2.42.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH AUTOSEL 6.5 6/6] pwm: Fix double shift bug
2023-11-15 3:34 [PATCH AUTOSEL 6.5 1/6] ASoC: ti: omap-mcbsp: Fix runtime PM underflow warnings Sasha Levin
` (3 preceding siblings ...)
2023-11-15 3:34 ` [PATCH AUTOSEL 6.5 5/6] drm/amdgpu: fix software pci_unplug on some chips Sasha Levin
@ 2023-11-15 3:34 ` Sasha Levin
4 siblings, 0 replies; 7+ messages in thread
From: Sasha Levin @ 2023-11-15 3:34 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Dan Carpenter, Uwe Kleine-König, Sam Protsenko,
Thierry Reding, Sasha Levin, linux-pwm
From: Dan Carpenter <dan.carpenter@linaro.org>
[ Upstream commit d27abbfd4888d79dd24baf50e774631046ac4732 ]
These enums are passed to set/test_bit(). The set/test_bit() functions
take a bit number instead of a shifted value. Passing a shifted value
is a double shift bug like doing BIT(BIT(1)). The double shift bug
doesn't cause a problem here because we are only checking 0 and 1 but
if the value was 5 or above then it can lead to a buffer overflow.
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/linux/pwm.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/pwm.h b/include/linux/pwm.h
index 04ae1d9073a74..0755ba9938f74 100644
--- a/include/linux/pwm.h
+++ b/include/linux/pwm.h
@@ -41,8 +41,8 @@ struct pwm_args {
};
enum {
- PWMF_REQUESTED = 1 << 0,
- PWMF_EXPORTED = 1 << 1,
+ PWMF_REQUESTED = 0,
+ PWMF_EXPORTED = 1,
};
/*
--
2.42.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Spice-devel] [PATCH AUTOSEL 6.5 2/6] drm/qxl: prevent memory leak
2023-11-15 3:34 ` [PATCH AUTOSEL 6.5 2/6] drm/qxl: prevent memory leak Sasha Levin
@ 2023-11-15 7:07 ` Frediano Ziglio
0 siblings, 0 replies; 7+ messages in thread
From: Frediano Ziglio @ 2023-11-15 7:07 UTC (permalink / raw)
To: Sasha Levin
Cc: linux-kernel, stable, daniel, dri-devel, maarten.lankhorst,
virtualization, Maxime Ripard, Zongmin Zhou, kraxel, tzimmermann,
spice-devel, Dave Airlie
Il giorno mer 15 nov 2023 alle ore 06:57 Sasha Levin
<sashal@kernel.org> ha scritto:
>
> From: Zongmin Zhou <zhouzongmin@kylinos.cn>
>
> [ Upstream commit 0e8b9f258baed25f1c5672613699247c76b007b5 ]
>
> The allocated memory for qdev->dumb_heads should be released
> in qxl_destroy_monitors_object before qxl suspend.
> otherwise,qxl_create_monitors_object will be called to
Minor, typo: otherwise -> Otherwise.
> reallocate memory for qdev->dumb_heads after qxl resume,
> it will cause memory leak.
>
> Signed-off-by: Zongmin Zhou <zhouzongmin@kylinos.cn>
> Link: https://lore.kernel.org/r/20230801025309.4049813-1-zhouzongmin@kylinos.cn
> Reviewed-by: Dave Airlie <airlied@redhat.com>
> Signed-off-by: Maxime Ripard <mripard@kernel.org>
> Signed-off-by: Sasha Levin <sashal@kernel.org>
> ---
> drivers/gpu/drm/qxl/qxl_display.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c
> index 6492a70e3c396..404b0483bb7cb 100644
> --- a/drivers/gpu/drm/qxl/qxl_display.c
> +++ b/drivers/gpu/drm/qxl/qxl_display.c
> @@ -1229,6 +1229,9 @@ int qxl_destroy_monitors_object(struct qxl_device *qdev)
> if (!qdev->monitors_config_bo)
> return 0;
>
> + kfree(qdev->dumb_heads);
> + qdev->dumb_heads = NULL;
> +
> qdev->monitors_config = NULL;
> qdev->ram_header->monitors_config = 0;
>
Frediano
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-11-15 7:07 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-15 3:34 [PATCH AUTOSEL 6.5 1/6] ASoC: ti: omap-mcbsp: Fix runtime PM underflow warnings Sasha Levin
2023-11-15 3:34 ` [PATCH AUTOSEL 6.5 2/6] drm/qxl: prevent memory leak Sasha Levin
2023-11-15 7:07 ` [Spice-devel] " Frediano Ziglio
2023-11-15 3:34 ` [PATCH AUTOSEL 6.5 3/6] ALSA: hda/realtek: Add quirk for ASUS UX7602ZM Sasha Levin
2023-11-15 3:34 ` [PATCH AUTOSEL 6.5 4/6] LoongArch/smp: Call rcutree_report_cpu_starting() earlier Sasha Levin
2023-11-15 3:34 ` [PATCH AUTOSEL 6.5 5/6] drm/amdgpu: fix software pci_unplug on some chips Sasha Levin
2023-11-15 3:34 ` [PATCH AUTOSEL 6.5 6/6] pwm: Fix double shift bug Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox