* [PATCH v3] ASoC: qcom: Fix NULL Dereference in asoc_qcom_lpass_cpu_platform_probe()
@ 2024-10-06 20:57 Gax-c
2024-10-07 13:16 ` Markus Elfring
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Gax-c @ 2024-10-06 20:57 UTC (permalink / raw)
To: srinivas.kandagatla, lgirdwood, broonie, perex, tiwai, rohitkr
Cc: linux-sound, linux-arm-msm, stable, zzjas98, chenyuan0y,
Zichen Xie
From: Zichen Xie <zichenxie0106@gmail.com>
A devm_kzalloc() in asoc_qcom_lpass_cpu_platform_probe() could
possibly return NULL pointer. NULL Pointer Dereference may be
triggerred without addtional check.
Add a NULL check for the returned pointer.
Fixes: b5022a36d28f ("ASoC: qcom: lpass: Use regmap_field for i2sctl and dmactl registers")
Cc: stable@vger.kernel.org
Signed-off-by: Zichen Xie <zichenxie0106@gmail.com>
---
v2: Fix "From" tag.
v3: Format tags to Fixes/Cc/Signed-off-by.
---
sound/soc/qcom/lpass-cpu.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/soc/qcom/lpass-cpu.c b/sound/soc/qcom/lpass-cpu.c
index 5a47f661e0c6..242bc16da36d 100644
--- a/sound/soc/qcom/lpass-cpu.c
+++ b/sound/soc/qcom/lpass-cpu.c
@@ -1242,6 +1242,8 @@ int asoc_qcom_lpass_cpu_platform_probe(struct platform_device *pdev)
/* Allocation for i2sctl regmap fields */
drvdata->i2sctl = devm_kzalloc(&pdev->dev, sizeof(struct lpaif_i2sctl),
GFP_KERNEL);
+ if (!drvdata->i2sctl)
+ return -ENOMEM;
/* Initialize bitfields for dai I2SCTL register */
ret = lpass_cpu_init_i2sctl_bitfields(dev, drvdata->i2sctl,
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH v3] ASoC: qcom: Fix NULL Dereference in asoc_qcom_lpass_cpu_platform_probe()
2024-10-06 20:57 [PATCH v3] ASoC: qcom: Fix NULL Dereference in asoc_qcom_lpass_cpu_platform_probe() Gax-c
@ 2024-10-07 13:16 ` Markus Elfring
2024-10-07 13:47 ` Mark Brown
2024-10-07 13:40 ` [v3?] " Markus Elfring
2024-10-07 16:08 ` [PATCH v3] " Mark Brown
2 siblings, 1 reply; 6+ messages in thread
From: Markus Elfring @ 2024-10-07 13:16 UTC (permalink / raw)
To: Zichen Xie, alsa-devel, linux-sound, linux-arm-msm,
Dmitry Baryshkov, Greg Kroah-Hartman, Jaroslav Kysela,
Liam Girdwood, Mark Brown, Rohit kumar, Srinivas Kandagatla,
Takashi Iwai
Cc: stable, LKML, Chenyuan Yang, Zijie Zhao
> A devm_kzalloc() in asoc_qcom_lpass_cpu_platform_probe() could
call?
> possibly return NULL pointer. NULL Pointer Dereference may be
Can the term “null pointer dereference” be applied for
the final commit message (including the summary phrase)?
> triggerred without addtional check.
triggered? additional?
Regards,
Markus
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH v3] ASoC: qcom: Fix NULL Dereference in asoc_qcom_lpass_cpu_platform_probe()
2024-10-07 13:16 ` Markus Elfring
@ 2024-10-07 13:47 ` Mark Brown
0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2024-10-07 13:47 UTC (permalink / raw)
To: Markus Elfring
Cc: Zichen Xie, alsa-devel, linux-sound, linux-arm-msm,
Dmitry Baryshkov, Greg Kroah-Hartman, Jaroslav Kysela,
Liam Girdwood, Rohit kumar, Srinivas Kandagatla, Takashi Iwai,
stable, LKML, Chenyuan Yang, Zijie Zhao
[-- Attachment #1: Type: text/plain, Size: 598 bytes --]
On Mon, Oct 07, 2024 at 03:16:27PM +0200, Markus Elfring wrote:
> > A devm_kzalloc() in asoc_qcom_lpass_cpu_platform_probe() could
>
> call?
>
>
> > possibly return NULL pointer. NULL Pointer Dereference may be
>
> Can the term “null pointer dereference” be applied for
> the final commit message (including the summary phrase)?
>
>
> > triggerred without addtional check.
>
> triggered? additional?
Feel free to ignore Markus, he has a long history of sending
unhelpful review comments and continues to ignore repeated requests
to stop.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [v3?] ASoC: qcom: Fix NULL Dereference in asoc_qcom_lpass_cpu_platform_probe()
2024-10-06 20:57 [PATCH v3] ASoC: qcom: Fix NULL Dereference in asoc_qcom_lpass_cpu_platform_probe() Gax-c
2024-10-07 13:16 ` Markus Elfring
@ 2024-10-07 13:40 ` Markus Elfring
2024-10-07 14:14 ` Mark Brown
2024-10-07 16:08 ` [PATCH v3] " Mark Brown
2 siblings, 1 reply; 6+ messages in thread
From: Markus Elfring @ 2024-10-07 13:40 UTC (permalink / raw)
To: Zichen Xie, alsa-devel, linux-sound, linux-arm-msm,
Dmitry Baryshkov, Greg Kroah-Hartman, Jaroslav Kysela,
Liam Girdwood, Mark Brown, Rohit kumar, Srinivas Kandagatla,
Takashi Iwai
Cc: stable, LKML, Chenyuan Yang, Zijie Zhao
…
> ---
> v2: Fix "From" tag.
> v3: Format tags to Fixes/Cc/Signed-off-by.
> ---
…
* How do you think about to reconsider the version numbers
a bit more?
* Would you like to mention the repeated adjustment of
the patch subject?
* Can a duplicate marker line be replaced by a blank line?
See also:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.12-rc2#n231
Is the email address “linux-kernel@vger.kernel.org” still relevant here?
Regards,
Markus
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [v3?] ASoC: qcom: Fix NULL Dereference in asoc_qcom_lpass_cpu_platform_probe()
2024-10-07 13:40 ` [v3?] " Markus Elfring
@ 2024-10-07 14:14 ` Mark Brown
0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2024-10-07 14:14 UTC (permalink / raw)
To: Markus Elfring
Cc: Zichen Xie, alsa-devel, linux-sound, linux-arm-msm,
Dmitry Baryshkov, Greg Kroah-Hartman, Jaroslav Kysela,
Liam Girdwood, Rohit kumar, Srinivas Kandagatla, Takashi Iwai,
stable, LKML, Chenyuan Yang, Zijie Zhao
[-- Attachment #1: Type: text/plain, Size: 441 bytes --]
On Mon, Oct 07, 2024 at 03:40:21PM +0200, Markus Elfring wrote:
> * How do you think about to reconsider the version numbers
> a bit more?
>
> * Would you like to mention the repeated adjustment of
> the patch subject?
>
> * Can a duplicate marker line be replaced by a blank line?
Feel free to ignore Markus, he has a long history of sending
unhelpful review comments and continues to ignore repeated requests
to stop.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3] ASoC: qcom: Fix NULL Dereference in asoc_qcom_lpass_cpu_platform_probe()
2024-10-06 20:57 [PATCH v3] ASoC: qcom: Fix NULL Dereference in asoc_qcom_lpass_cpu_platform_probe() Gax-c
2024-10-07 13:16 ` Markus Elfring
2024-10-07 13:40 ` [v3?] " Markus Elfring
@ 2024-10-07 16:08 ` Mark Brown
2 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2024-10-07 16:08 UTC (permalink / raw)
To: srinivas.kandagatla, lgirdwood, perex, tiwai, Gax-c
Cc: linux-sound, linux-arm-msm, stable, zzjas98, chenyuan0y
On Sun, 06 Oct 2024 15:57:37 -0500, Gax-c wrote:
> A devm_kzalloc() in asoc_qcom_lpass_cpu_platform_probe() could
> possibly return NULL pointer. NULL Pointer Dereference may be
> triggerred without addtional check.
> Add a NULL check for the returned pointer.
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: qcom: Fix NULL Dereference in asoc_qcom_lpass_cpu_platform_probe()
commit: 49da1463c9e3d2082276c3e0e2a8b65a88711cd2
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-10-07 16:08 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-06 20:57 [PATCH v3] ASoC: qcom: Fix NULL Dereference in asoc_qcom_lpass_cpu_platform_probe() Gax-c
2024-10-07 13:16 ` Markus Elfring
2024-10-07 13:47 ` Mark Brown
2024-10-07 13:40 ` [v3?] " Markus Elfring
2024-10-07 14:14 ` Mark Brown
2024-10-07 16:08 ` [PATCH v3] " Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox