linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] coresight: perf: Add a missing call to etm_free_aux
@ 2016-11-19 17:41 Quentin Lambert
  2016-11-19 18:22 ` Quentin Lambert
  2016-11-21 17:17 ` Mathieu Poirier
  0 siblings, 2 replies; 4+ messages in thread
From: Quentin Lambert @ 2016-11-19 17:41 UTC (permalink / raw)
  To: linux-arm-kernel

Most error branches following the call to alloc_event_data contain a call to
etm_free_aux. This patch add a call to etm_free_aux to an error branch
that does not call it.

This issue was found with Hector.

Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
---
 drivers/hwtracing/coresight/coresight-etm-perf.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/hwtracing/coresight/coresight-etm-perf.c
+++ b/drivers/hwtracing/coresight/coresight-etm-perf.c
@@ -215,7 +215,7 @@ static void *etm_setup_aux(int event_cpu
 	 */
 	sink = coresight_get_enabled_sink(true);
 	if (!sink)
-		return NULL;
+		goto err;
 
 	INIT_WORK(&event_data->work, free_event_data);
 

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

* [PATCH] coresight: perf: Add a missing call to etm_free_aux
  2016-11-19 17:41 [PATCH] coresight: perf: Add a missing call to etm_free_aux Quentin Lambert
@ 2016-11-19 18:22 ` Quentin Lambert
  2016-11-19 18:42   ` Quentin Lambert
  2016-11-21 17:17 ` Mathieu Poirier
  1 sibling, 1 reply; 4+ messages in thread
From: Quentin Lambert @ 2016-11-19 18:22 UTC (permalink / raw)
  To: linux-arm-kernel


On 11/19/2016 06:41 PM, Quentin Lambert wrote:
> Most error branches following the call to alloc_event_data contain a call to
> etm_free_aux. This patch add a call to etm_free_aux to an error branch
> that does not call it.
>
> This issue was found with Hector.
>
> Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
> ---
>   drivers/hwtracing/coresight/coresight-etm-perf.c |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/drivers/hwtracing/coresight/coresight-etm-perf.c
> +++ b/drivers/hwtracing/coresight/coresight-etm-perf.c
> @@ -215,7 +215,7 @@ static void *etm_setup_aux(int event_cpu
>   	 */
>   	sink = coresight_get_enabled_sink(true);
>   	if (!sink)
> -		return NULL;
> +		goto err;
>   
>   	INIT_WORK(&event_data->work, free_event_data);
>   
I realized that I hadn't try to compile after having sent this patch and
I wasn't able to compile it.
Therefore, please ignore it for now.

Quentin

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

* [PATCH] coresight: perf: Add a missing call to etm_free_aux
  2016-11-19 18:22 ` Quentin Lambert
@ 2016-11-19 18:42   ` Quentin Lambert
  0 siblings, 0 replies; 4+ messages in thread
From: Quentin Lambert @ 2016-11-19 18:42 UTC (permalink / raw)
  To: linux-arm-kernel



On 11/19/2016 07:22 PM, Quentin Lambert wrote:
>
> On 11/19/2016 06:41 PM, Quentin Lambert wrote:
>> Most error branches following the call to alloc_event_data contain a 
>> call to
>> etm_free_aux. This patch add a call to etm_free_aux to an error branch
>> that does not call it.
>>
>> This issue was found with Hector.
>>
>> Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
>> ---
>>   drivers/hwtracing/coresight/coresight-etm-perf.c |    2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> --- a/drivers/hwtracing/coresight/coresight-etm-perf.c
>> +++ b/drivers/hwtracing/coresight/coresight-etm-perf.c
>> @@ -215,7 +215,7 @@ static void *etm_setup_aux(int event_cpu
>>        */
>>       sink = coresight_get_enabled_sink(true);
>>       if (!sink)
>> -        return NULL;
>> +        goto err;
>>         INIT_WORK(&event_data->work, free_event_data);
> I realized that I hadn't try to compile after having sent this patch and
> I wasn't able to compile it.
> Therefore, please ignore it for now.
I have just confirmed that it compiles.

Quentin

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

* [PATCH] coresight: perf: Add a missing call to etm_free_aux
  2016-11-19 17:41 [PATCH] coresight: perf: Add a missing call to etm_free_aux Quentin Lambert
  2016-11-19 18:22 ` Quentin Lambert
@ 2016-11-21 17:17 ` Mathieu Poirier
  1 sibling, 0 replies; 4+ messages in thread
From: Mathieu Poirier @ 2016-11-21 17:17 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Nov 19, 2016 at 06:41:24PM +0100, Quentin Lambert wrote:
> Most error branches following the call to alloc_event_data contain a call to
> etm_free_aux. This patch add a call to etm_free_aux to an error branch
> that does not call it.
> 
> This issue was found with Hector.
> 
> Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
> ---
>  drivers/hwtracing/coresight/coresight-etm-perf.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- a/drivers/hwtracing/coresight/coresight-etm-perf.c
> +++ b/drivers/hwtracing/coresight/coresight-etm-perf.c
> @@ -215,7 +215,7 @@ static void *etm_setup_aux(int event_cpu
>  	 */
>  	sink = coresight_get_enabled_sink(true);
>  	if (!sink)
> -		return NULL;
> +		goto err;
>  
>  	INIT_WORK(&event_data->work, free_event_data);
>  

Applied, after wrapping the commit log to 75 characters or less.
Please run checkpatch.pl on your next submission and compiling
your work before sending a patches is highly suggested.

Thanks,
Mathieu

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

end of thread, other threads:[~2016-11-21 17:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-19 17:41 [PATCH] coresight: perf: Add a missing call to etm_free_aux Quentin Lambert
2016-11-19 18:22 ` Quentin Lambert
2016-11-19 18:42   ` Quentin Lambert
2016-11-21 17:17 ` Mathieu Poirier

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).