* [PATCH] ASoC: Intel: fix Coccinelle kfree warning
@ 2015-04-26 15:42 ` Firo Yang
0 siblings, 0 replies; 8+ messages in thread
From: Firo Yang @ 2015-04-26 15:42 UTC (permalink / raw)
To: lgirdwood
Cc: kernel-janitors, broonie, perex, tiwai, yang.jie, han.lu,
jarkko.nikula, pawel.piskorski, alsa-devel, Firo Yang
It's not necessary to use kfree() to free memory allocated with
devm_kzalloc in a probe function and using kfree leads to a double free.
Signed-off-by: Firo Yang <firogm@gmail.com>
---
sound/soc/intel/haswell/sst-haswell-ipc.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/sound/soc/intel/haswell/sst-haswell-ipc.c b/sound/soc/intel/haswell/sst-haswell-ipc.c
index 344a1e9..324eceb 100644
--- a/sound/soc/intel/haswell/sst-haswell-ipc.c
+++ b/sound/soc/intel/haswell/sst-haswell-ipc.c
@@ -2201,7 +2201,6 @@ dma_err:
dsp_new_err:
sst_ipc_fini(ipc);
ipc_init_err:
- kfree(hsw);
return ret;
}
EXPORT_SYMBOL_GPL(sst_hsw_dsp_init);
--
2.1.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH] ASoC: Intel: fix Coccinelle kfree warning
@ 2015-04-26 15:42 ` Firo Yang
0 siblings, 0 replies; 8+ messages in thread
From: Firo Yang @ 2015-04-26 15:42 UTC (permalink / raw)
To: lgirdwood
Cc: kernel-janitors, broonie, perex, tiwai, yang.jie, han.lu,
jarkko.nikula, pawel.piskorski, alsa-devel, Firo Yang
It's not necessary to use kfree() to free memory allocated with
devm_kzalloc in a probe function and using kfree leads to a double free.
Signed-off-by: Firo Yang <firogm@gmail.com>
---
sound/soc/intel/haswell/sst-haswell-ipc.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/sound/soc/intel/haswell/sst-haswell-ipc.c b/sound/soc/intel/haswell/sst-haswell-ipc.c
index 344a1e9..324eceb 100644
--- a/sound/soc/intel/haswell/sst-haswell-ipc.c
+++ b/sound/soc/intel/haswell/sst-haswell-ipc.c
@@ -2201,7 +2201,6 @@ dma_err:
dsp_new_err:
sst_ipc_fini(ipc);
ipc_init_err:
- kfree(hsw);
return ret;
}
EXPORT_SYMBOL_GPL(sst_hsw_dsp_init);
--
2.1.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* RE: [PATCH] ASoC: Intel: fix Coccinelle kfree warning
2015-04-26 15:42 ` Firo Yang
@ 2015-04-27 7:23 ` Jie, Yang
-1 siblings, 0 replies; 8+ messages in thread
From: Jie, Yang @ 2015-04-27 7:23 UTC (permalink / raw)
To: Firo Yang, lgirdwood@gmail.com
Cc: kernel-janitors@vger.kernel.org, broonie@kernel.org,
perex@perex.cz, tiwai@suse.de, Lu, Han,
jarkko.nikula@linux.intel.com, Piskorski, Pawel,
alsa-devel@alsa-project.org, Jin, Yao
> -----Original Message-----
> From: Firo Yang [mailto:firogm@gmail.com]
> Sent: Sunday, April 26, 2015 11:42 PM
> To: lgirdwood@gmail.com
> Cc: kernel-janitors@vger.kernel.org; broonie@kernel.org; perex@perex.cz;
> tiwai@suse.de; Jie, Yang; Lu, Han; jarkko.nikula@linux.intel.com; Piskorski,
> Pawel; alsa-devel@alsa-project.org; Firo Yang
> Subject: [PATCH] ASoC: Intel: fix Coccinelle kfree warning
>
> It's not necessary to use kfree() to free memory allocated with devm_kzalloc
> in a probe function and using kfree leads to a double free.
>
> Signed-off-by: Firo Yang <firogm@gmail.com>
> ---
> sound/soc/intel/haswell/sst-haswell-ipc.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/sound/soc/intel/haswell/sst-haswell-ipc.c
> b/sound/soc/intel/haswell/sst-haswell-ipc.c
> index 344a1e9..324eceb 100644
> --- a/sound/soc/intel/haswell/sst-haswell-ipc.c
> +++ b/sound/soc/intel/haswell/sst-haswell-ipc.c
> @@ -2201,7 +2201,6 @@ dma_err:
> dsp_new_err:
> sst_ipc_fini(ipc);
> ipc_init_err:
> - kfree(hsw);
It has been fixed by Jin Yao 2 weeks ago:
http://git.kernel.org/cgit/linux/kernel/git/broonie/sound.git/commit/?h=for-next&id=ac98b4c015b50b1e452f8d55b612320be7f80825
~Keyon
> return ret;
> }
> EXPORT_SYMBOL_GPL(sst_hsw_dsp_init);
> --
> 2.1.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH] ASoC: Intel: fix Coccinelle kfree warning
@ 2015-04-27 7:23 ` Jie, Yang
0 siblings, 0 replies; 8+ messages in thread
From: Jie, Yang @ 2015-04-27 7:23 UTC (permalink / raw)
To: Firo Yang, lgirdwood@gmail.com
Cc: kernel-janitors@vger.kernel.org, broonie@kernel.org,
perex@perex.cz, tiwai@suse.de, Lu, Han,
jarkko.nikula@linux.intel.com, Piskorski, Pawel,
alsa-devel@alsa-project.org, Jin, Yao
> -----Original Message-----
> From: Firo Yang [mailto:firogm@gmail.com]
> Sent: Sunday, April 26, 2015 11:42 PM
> To: lgirdwood@gmail.com
> Cc: kernel-janitors@vger.kernel.org; broonie@kernel.org; perex@perex.cz;
> tiwai@suse.de; Jie, Yang; Lu, Han; jarkko.nikula@linux.intel.com; Piskorski,
> Pawel; alsa-devel@alsa-project.org; Firo Yang
> Subject: [PATCH] ASoC: Intel: fix Coccinelle kfree warning
>
> It's not necessary to use kfree() to free memory allocated with devm_kzalloc
> in a probe function and using kfree leads to a double free.
>
> Signed-off-by: Firo Yang <firogm@gmail.com>
> ---
> sound/soc/intel/haswell/sst-haswell-ipc.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/sound/soc/intel/haswell/sst-haswell-ipc.c
> b/sound/soc/intel/haswell/sst-haswell-ipc.c
> index 344a1e9..324eceb 100644
> --- a/sound/soc/intel/haswell/sst-haswell-ipc.c
> +++ b/sound/soc/intel/haswell/sst-haswell-ipc.c
> @@ -2201,7 +2201,6 @@ dma_err:
> dsp_new_err:
> sst_ipc_fini(ipc);
> ipc_init_err:
> - kfree(hsw);
It has been fixed by Jin Yao 2 weeks ago:
http://git.kernel.org/cgit/linux/kernel/git/broonie/sound.git/commit/?h=for-next&id¬98b4c015b50b1e452f8d55b612320be7f80825
~Keyon
> return ret;
> }
> EXPORT_SYMBOL_GPL(sst_hsw_dsp_init);
> --
> 2.1.0
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ASoC: Intel: fix Coccinelle kfree warning
2015-04-27 7:23 ` Jie, Yang
@ 2015-04-27 7:42 ` Firo Yang
-1 siblings, 0 replies; 8+ messages in thread
From: Firo Yang @ 2015-04-27 7:42 UTC (permalink / raw)
To: Jie, Yang
Cc: lgirdwood@gmail.com, kernel-janitors@vger.kernel.org,
broonie@kernel.org, perex@perex.cz, tiwai@suse.de, Lu, Han,
jarkko.nikula@linux.intel.com, Piskorski, Pawel,
alsa-devel@alsa-project.org, Jin, Yao
Thanks, Jie.
I find another simlar BUG in
./sound/soc/intel/baytrail/sst-baytrail-ipc.c::sst_byt_dsp_init()
Does anyone fixed it, too?
Regards
Firo
On Mon, Apr 27, 2015 at 07:23:32AM +0000, Jie, Yang wrote:
>> -----Original Message-----
>> From: Firo Yang [mailto:firogm@gmail.com]
>> Sent: Sunday, April 26, 2015 11:42 PM
>> To: lgirdwood@gmail.com
>> Cc: kernel-janitors@vger.kernel.org; broonie@kernel.org; perex@perex.cz;
>> tiwai@suse.de; Jie, Yang; Lu, Han; jarkko.nikula@linux.intel.com; Piskorski,
>> Pawel; alsa-devel@alsa-project.org; Firo Yang
>> Subject: [PATCH] ASoC: Intel: fix Coccinelle kfree warning
>>
>> It's not necessary to use kfree() to free memory allocated with devm_kzalloc
>> in a probe function and using kfree leads to a double free.
>>
>> Signed-off-by: Firo Yang <firogm@gmail.com>
>> ---
>> sound/soc/intel/haswell/sst-haswell-ipc.c | 1 -
>> 1 file changed, 1 deletion(-)
>>
>> diff --git a/sound/soc/intel/haswell/sst-haswell-ipc.c
>> b/sound/soc/intel/haswell/sst-haswell-ipc.c
>> index 344a1e9..324eceb 100644
>> --- a/sound/soc/intel/haswell/sst-haswell-ipc.c
>> +++ b/sound/soc/intel/haswell/sst-haswell-ipc.c
>> @@ -2201,7 +2201,6 @@ dma_err:
>> dsp_new_err:
>> sst_ipc_fini(ipc);
>> ipc_init_err:
>> - kfree(hsw);
>
>It has been fixed by Jin Yao 2 weeks ago:
>http://git.kernel.org/cgit/linux/kernel/git/broonie/sound.git/commit/?h=for-next&id=ac98b4c015b50b1e452f8d55b612320be7f80825
>
>~Keyon
>
>> return ret;
>> }
>> EXPORT_SYMBOL_GPL(sst_hsw_dsp_init);
>> --
>> 2.1.0
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ASoC: Intel: fix Coccinelle kfree warning
@ 2015-04-27 7:42 ` Firo Yang
0 siblings, 0 replies; 8+ messages in thread
From: Firo Yang @ 2015-04-27 7:42 UTC (permalink / raw)
To: Jie, Yang
Cc: lgirdwood@gmail.com, kernel-janitors@vger.kernel.org,
broonie@kernel.org, perex@perex.cz, tiwai@suse.de, Lu, Han,
jarkko.nikula@linux.intel.com, Piskorski, Pawel,
alsa-devel@alsa-project.org, Jin, Yao
Thanks, Jie.
I find another simlar BUG in
./sound/soc/intel/baytrail/sst-baytrail-ipc.c::sst_byt_dsp_init()
Does anyone fixed it, too?
Regards
Firo
On Mon, Apr 27, 2015 at 07:23:32AM +0000, Jie, Yang wrote:
>> -----Original Message-----
>> From: Firo Yang [mailto:firogm@gmail.com]
>> Sent: Sunday, April 26, 2015 11:42 PM
>> To: lgirdwood@gmail.com
>> Cc: kernel-janitors@vger.kernel.org; broonie@kernel.org; perex@perex.cz;
>> tiwai@suse.de; Jie, Yang; Lu, Han; jarkko.nikula@linux.intel.com; Piskorski,
>> Pawel; alsa-devel@alsa-project.org; Firo Yang
>> Subject: [PATCH] ASoC: Intel: fix Coccinelle kfree warning
>>
>> It's not necessary to use kfree() to free memory allocated with devm_kzalloc
>> in a probe function and using kfree leads to a double free.
>>
>> Signed-off-by: Firo Yang <firogm@gmail.com>
>> ---
>> sound/soc/intel/haswell/sst-haswell-ipc.c | 1 -
>> 1 file changed, 1 deletion(-)
>>
>> diff --git a/sound/soc/intel/haswell/sst-haswell-ipc.c
>> b/sound/soc/intel/haswell/sst-haswell-ipc.c
>> index 344a1e9..324eceb 100644
>> --- a/sound/soc/intel/haswell/sst-haswell-ipc.c
>> +++ b/sound/soc/intel/haswell/sst-haswell-ipc.c
>> @@ -2201,7 +2201,6 @@ dma_err:
>> dsp_new_err:
>> sst_ipc_fini(ipc);
>> ipc_init_err:
>> - kfree(hsw);
>
>It has been fixed by Jin Yao 2 weeks ago:
>http://git.kernel.org/cgit/linux/kernel/git/broonie/sound.git/commit/?h=for-next&id¬98b4c015b50b1e452f8d55b612320be7f80825
>
>~Keyon
>
>> return ret;
>> }
>> EXPORT_SYMBOL_GPL(sst_hsw_dsp_init);
>> --
>> 2.1.0
>
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH] ASoC: Intel: fix Coccinelle kfree warning
2015-04-27 7:42 ` Firo Yang
@ 2015-04-27 7:52 ` Jie, Yang
-1 siblings, 0 replies; 8+ messages in thread
From: Jie, Yang @ 2015-04-27 7:52 UTC (permalink / raw)
To: Firo Yang
Cc: lgirdwood@gmail.com, kernel-janitors@vger.kernel.org,
broonie@kernel.org, perex@perex.cz, tiwai@suse.de, Lu, Han,
jarkko.nikula@linux.intel.com, Piskorski, Pawel,
alsa-devel@alsa-project.org, Jin, Yao
> -----Original Message-----
> From: Firo Yang [mailto:firogm@gmail.com]
> Sent: Monday, April 27, 2015 3:42 PM
> To: Jie, Yang
> Cc: lgirdwood@gmail.com; kernel-janitors@vger.kernel.org;
> broonie@kernel.org; perex@perex.cz; tiwai@suse.de; Lu, Han;
> jarkko.nikula@linux.intel.com; Piskorski, Pawel; alsa-devel@alsa-project.org;
> Jin, Yao
> Subject: Re: [PATCH] ASoC: Intel: fix Coccinelle kfree warning
>
> Thanks, Jie.
>
> I find another simlar BUG in
> ./sound/soc/intel/baytrail/sst-baytrail-ipc.c::sst_byt_dsp_init()
> Does anyone fixed it, too?
I guess so. You can refer to the for-next branch of git repo to
confirm it:
git://git.kernel.org/cgit/linux/kernel/git/broonie/sound.git
~Keyon
>
> Regards
> Firo
>
> On Mon, Apr 27, 2015 at 07:23:32AM +0000, Jie, Yang wrote:
> >> -----Original Message-----
> >> From: Firo Yang [mailto:firogm@gmail.com]
> >> Sent: Sunday, April 26, 2015 11:42 PM
> >> To: lgirdwood@gmail.com
> >> Cc: kernel-janitors@vger.kernel.org; broonie@kernel.org;
> >> perex@perex.cz; tiwai@suse.de; Jie, Yang; Lu, Han;
> >> jarkko.nikula@linux.intel.com; Piskorski, Pawel;
> >> alsa-devel@alsa-project.org; Firo Yang
> >> Subject: [PATCH] ASoC: Intel: fix Coccinelle kfree warning
> >>
> >> It's not necessary to use kfree() to free memory allocated with
> >> devm_kzalloc in a probe function and using kfree leads to a double free.
> >>
> >> Signed-off-by: Firo Yang <firogm@gmail.com>
> >> ---
> >> sound/soc/intel/haswell/sst-haswell-ipc.c | 1 -
> >> 1 file changed, 1 deletion(-)
> >>
> >> diff --git a/sound/soc/intel/haswell/sst-haswell-ipc.c
> >> b/sound/soc/intel/haswell/sst-haswell-ipc.c
> >> index 344a1e9..324eceb 100644
> >> --- a/sound/soc/intel/haswell/sst-haswell-ipc.c
> >> +++ b/sound/soc/intel/haswell/sst-haswell-ipc.c
> >> @@ -2201,7 +2201,6 @@ dma_err:
> >> dsp_new_err:
> >> sst_ipc_fini(ipc);
> >> ipc_init_err:
> >> - kfree(hsw);
> >
> >It has been fixed by Jin Yao 2 weeks ago:
> >http://git.kernel.org/cgit/linux/kernel/git/broonie/sound.git/commit/?h
> >=for-next&id=ac98b4c015b50b1e452f8d55b612320be7f80825
> >
> >~Keyon
> >
> >> return ret;
> >> }
> >> EXPORT_SYMBOL_GPL(sst_hsw_dsp_init);
> >> --
> >> 2.1.0
> >
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH] ASoC: Intel: fix Coccinelle kfree warning
@ 2015-04-27 7:52 ` Jie, Yang
0 siblings, 0 replies; 8+ messages in thread
From: Jie, Yang @ 2015-04-27 7:52 UTC (permalink / raw)
To: Firo Yang
Cc: lgirdwood@gmail.com, kernel-janitors@vger.kernel.org,
broonie@kernel.org, perex@perex.cz, tiwai@suse.de, Lu, Han,
jarkko.nikula@linux.intel.com, Piskorski, Pawel,
alsa-devel@alsa-project.org, Jin, Yao
> -----Original Message-----
> From: Firo Yang [mailto:firogm@gmail.com]
> Sent: Monday, April 27, 2015 3:42 PM
> To: Jie, Yang
> Cc: lgirdwood@gmail.com; kernel-janitors@vger.kernel.org;
> broonie@kernel.org; perex@perex.cz; tiwai@suse.de; Lu, Han;
> jarkko.nikula@linux.intel.com; Piskorski, Pawel; alsa-devel@alsa-project.org;
> Jin, Yao
> Subject: Re: [PATCH] ASoC: Intel: fix Coccinelle kfree warning
>
> Thanks, Jie.
>
> I find another simlar BUG in
> ./sound/soc/intel/baytrail/sst-baytrail-ipc.c::sst_byt_dsp_init()
> Does anyone fixed it, too?
I guess so. You can refer to the for-next branch of git repo to
confirm it:
git://git.kernel.org/cgit/linux/kernel/git/broonie/sound.git
~Keyon
>
> Regards
> Firo
>
> On Mon, Apr 27, 2015 at 07:23:32AM +0000, Jie, Yang wrote:
> >> -----Original Message-----
> >> From: Firo Yang [mailto:firogm@gmail.com]
> >> Sent: Sunday, April 26, 2015 11:42 PM
> >> To: lgirdwood@gmail.com
> >> Cc: kernel-janitors@vger.kernel.org; broonie@kernel.org;
> >> perex@perex.cz; tiwai@suse.de; Jie, Yang; Lu, Han;
> >> jarkko.nikula@linux.intel.com; Piskorski, Pawel;
> >> alsa-devel@alsa-project.org; Firo Yang
> >> Subject: [PATCH] ASoC: Intel: fix Coccinelle kfree warning
> >>
> >> It's not necessary to use kfree() to free memory allocated with
> >> devm_kzalloc in a probe function and using kfree leads to a double free.
> >>
> >> Signed-off-by: Firo Yang <firogm@gmail.com>
> >> ---
> >> sound/soc/intel/haswell/sst-haswell-ipc.c | 1 -
> >> 1 file changed, 1 deletion(-)
> >>
> >> diff --git a/sound/soc/intel/haswell/sst-haswell-ipc.c
> >> b/sound/soc/intel/haswell/sst-haswell-ipc.c
> >> index 344a1e9..324eceb 100644
> >> --- a/sound/soc/intel/haswell/sst-haswell-ipc.c
> >> +++ b/sound/soc/intel/haswell/sst-haswell-ipc.c
> >> @@ -2201,7 +2201,6 @@ dma_err:
> >> dsp_new_err:
> >> sst_ipc_fini(ipc);
> >> ipc_init_err:
> >> - kfree(hsw);
> >
> >It has been fixed by Jin Yao 2 weeks ago:
> >http://git.kernel.org/cgit/linux/kernel/git/broonie/sound.git/commit/?h
> >=for-next&id¬98b4c015b50b1e452f8d55b612320be7f80825
> >
> >~Keyon
> >
> >> return ret;
> >> }
> >> EXPORT_SYMBOL_GPL(sst_hsw_dsp_init);
> >> --
> >> 2.1.0
> >
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-04-27 7:52 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-26 15:42 [PATCH] ASoC: Intel: fix Coccinelle kfree warning Firo Yang
2015-04-26 15:42 ` Firo Yang
2015-04-27 7:23 ` Jie, Yang
2015-04-27 7:23 ` Jie, Yang
2015-04-27 7:42 ` Firo Yang
2015-04-27 7:42 ` Firo Yang
2015-04-27 7:52 ` Jie, Yang
2015-04-27 7:52 ` Jie, Yang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.