* [PATCH] ASoC: soc-jack: calling snd_soc_jack_report causes a null pointer access
@ 2020-07-18 14:56 mnlife
0 siblings, 0 replies; 7+ messages in thread
From: mnlife @ 2020-07-18 14:56 UTC (permalink / raw)
To: lgirdwood, Jaroslav Kysela, open list, mnlife qiao, alsa-devel
Cc: nmlife.qiao, mnlife qiao
[-- Attachment #1: Type: text/plain, Size: 705 bytes --]
From: mnlife <mnlife@foxmail.com> When snd_soc_card_jack_new is not called or the call fails, calling this function causes a null pointer access Signed-off-by: mnlife <mnlife@foxmail.com> --- sound/soc/soc-jack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c index 0f1820f36b4d..51b799ee98b7 100644 --- a/sound/soc/soc-jack.c +++ b/sound/soc/soc-jack.c @@ -44,7 +44,7 @@ void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask) unsigned int sync = 0; int enable; - if (!jack) + if (!jack || !jack->jack) return; trace_snd_soc_jack_report(jack, mask, status); -- 2.17.1 .
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-ASoC-soc-jack-calling-snd_soc_jack_report-causes-a-n.patch --]
[-- Type: text/x-diff; name="0001-ASoC-soc-jack-calling-snd_soc_jack_report-causes-a-n.patch", Size: 912 bytes --]
From 1cd6ed8cd1c8518d6bd30bdc0b1cf998a3abe32d Mon Sep 17 00:00:00 2001
From: mnlife <mnlife@foxmail.com>
Date: Fri, 10 Jul 2020 21:31:08 +0800
Subject: [PATCH] ASoC: soc-jack: calling snd_soc_jack_report causes a null
pointer access
Content-Type: text/plain; charset="utf-8"
When snd_soc_card_jack_new is not called or the call fails,
calling this function causes a null pointer access
Signed-off-by: mnlife <mnlife@foxmail.com>
---
sound/soc/soc-jack.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c
index 0f1820f36b4d..51b799ee98b7 100644
--- a/sound/soc/soc-jack.c
+++ b/sound/soc/soc-jack.c
@@ -44,7 +44,7 @@ void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask)
unsigned int sync = 0;
int enable;
- if (!jack)
+ if (!jack || !jack->jack)
return;
trace_snd_soc_jack_report(jack, mask, status);
--
2.17.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] ASoC: soc-jack: calling snd_soc_jack_report causes a null pointer access
2023-08-11 14:25 mnlife
@ 2023-08-15 18:09 ` Mark Brown
0 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2023-08-15 18:09 UTC (permalink / raw)
To: lgirdwood, alsa-devel, mnlife
On Fri, 11 Aug 2023 22:25:11 +0800, mnlife wrote:
> When snd_soc_card_jack_new is not called or the call fails,
> calling this function causes a null pointer access
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: soc-jack: calling snd_soc_jack_report causes a null pointer access
commit: 62cc82e6486b9b66b340bbf5fb38b0171fb56a7f
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] 7+ messages in thread
* [PATCH] ASoC: soc-jack: calling snd_soc_jack_report causes a null pointer access
@ 2023-08-11 14:25 mnlife
2023-08-15 18:09 ` Mark Brown
0 siblings, 1 reply; 7+ messages in thread
From: mnlife @ 2023-08-11 14:25 UTC (permalink / raw)
To: broonie, lgirdwood, alsa-devel; +Cc: mnlife
When snd_soc_card_jack_new is not called or the call fails,
calling this function causes a null pointer access
Signed-off-by: mnlife <mnlife@126.com>
---
sound/soc/soc-jack.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c
index f951acb2ce362..b2cc13b9c77b7 100644
--- a/sound/soc/soc-jack.c
+++ b/sound/soc/soc-jack.c
@@ -37,7 +37,7 @@ void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask)
struct snd_soc_jack_pin *pin;
unsigned int sync = 0;
- if (!jack)
+ if (!jack || !jack->jack)
return;
trace_snd_soc_jack_report(jack, mask, status);
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] ASoC: soc-jack: calling snd_soc_jack_report causes a null pointer access
@ 2020-07-19 3:08 mnlife qiao
0 siblings, 0 replies; 7+ messages in thread
From: mnlife qiao @ 2020-07-19 3:08 UTC (permalink / raw)
To: lgirdwood, perex, linux-kernel, alsa-devel, mnlife
From: mnlife <mnlife@foxmail.com>
When snd_soc_card_jack_new is not called or the call fails,
calling this function causes a null pointer access
Signed-off-by: mnlife <mnlife@foxmail.com>
---
sound/soc/soc-jack.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c
index 0f1820f36b4d..51b799ee98b7 100644
--- a/sound/soc/soc-jack.c
+++ b/sound/soc/soc-jack.c
@@ -44,7 +44,7 @@ void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask)
unsigned int sync = 0;
int enable;
- if (!jack)
+ if (!jack || !jack->jack)
return;
trace_snd_soc_jack_report(jack, mask, status);
--
2.17.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] ASoC: soc-jack: calling snd_soc_jack_report causes a null pointer access
[not found] <tencent_2D17145034BA02B43C169473C02C4257AF06@qq.com>
@ 2020-07-19 2:52 ` mnlife qiao
0 siblings, 0 replies; 7+ messages in thread
From: mnlife qiao @ 2020-07-19 2:52 UTC (permalink / raw)
To: lgirdwood, Jaroslav Kysela, open list, alsa-devel, mnlife, mnlife qiao
> From: mnlife <mnlife@foxmail.com>
>
> When snd_soc_card_jack_new is not called or the call fails,
> calling this function causes a null pointer access
>
> Signed-off-by: mnlife <mnlife@foxmail.com>
> ---
> sound/soc/soc-jack.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c
> index 0f1820f36b4d..51b799ee98b7 100644
> --- a/sound/soc/soc-jack.c
> +++ b/sound/soc/soc-jack.c
> @@ -44,7 +44,7 @@ void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask)
> unsigned int sync = 0;
> int enable;
>
> - if (!jack)
> + if (!jack || !jack->jack)
> return;
> trace_snd_soc_jack_report(jack, mask, status);
>
> --
> 2.17.1
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] ASoC: soc-jack: calling snd_soc_jack_report causes a null pointer access
2020-07-15 0:24 ` mnlife qiao
@ 2020-07-16 22:29 ` Mark Brown
0 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2020-07-16 22:29 UTC (permalink / raw)
To: mnlife qiao; +Cc: open list, alsa-devel, lgirdwood, mnlife
[-- Attachment #1: Type: text/plain, Size: 654 bytes --]
On Wed, Jul 15, 2020 at 08:24:04AM +0800, mnlife qiao wrote:
> When snd_soc_card_jack_new is not called or the call fails,
> calling this function causes a null pointer access
> --- a/sound/soc/soc-jack.c
> +++ b/sound/soc/soc-jack.c
> @@ -44,7 +44,7 @@ void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask)
> unsigned int sync = 0;
> int enable;
>
> - if (!jack)
> + if (!jack || !jack->jack)
> return;
I'm afraid this still won't apply - there's a text/html version of the
patch, in the text portion tabs have been converted into spaces and it
appears some other issues that mean git am can't understand it.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] ASoC: soc-jack: calling snd_soc_jack_report causes a null pointer access
[not found] <5f0e49da.1c69fb81.1ede7.a8fbSMTPIN_ADDED_MISSING@mx.google.com>
@ 2020-07-15 0:24 ` mnlife qiao
2020-07-16 22:29 ` Mark Brown
0 siblings, 1 reply; 7+ messages in thread
From: mnlife qiao @ 2020-07-15 0:24 UTC (permalink / raw)
To: lgirdwood, Jaroslav Kysela, open list, alsa-devel, broonie,
mnlife qiao, mnlife
When snd_soc_card_jack_new is not called or the call fails,
calling this function causes a null pointer access
Signed-off-by: mnlife <mnlife@foxmail.com>
---
sound/soc/soc-jack.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c
index 0f1820f36b4d..51b799ee98b7 100644
--- a/sound/soc/soc-jack.c
+++ b/sound/soc/soc-jack.c
@@ -44,7 +44,7 @@ void snd_soc_jack_report(struct snd_soc_jack *jack, int
status, int mask)
unsigned int sync = 0;
int enable;
- if (!jack)
+ if (!jack || !jack->jack)
return;
trace_snd_soc_jack_report(jack, mask, status);
--
2.17.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-08-15 18:11 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-18 14:56 [PATCH] ASoC: soc-jack: calling snd_soc_jack_report causes a null pointer access mnlife
-- strict thread matches above, loose matches on Subject: below --
2023-08-11 14:25 mnlife
2023-08-15 18:09 ` Mark Brown
2020-07-19 3:08 mnlife qiao
[not found] <tencent_2D17145034BA02B43C169473C02C4257AF06@qq.com>
2020-07-19 2:52 ` mnlife qiao
[not found] <5f0e49da.1c69fb81.1ede7.a8fbSMTPIN_ADDED_MISSING@mx.google.com>
2020-07-15 0:24 ` mnlife qiao
2020-07-16 22:29 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).