Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1526103 > unrolled thread
| Started by | Quentin Lambert <lambert.quentin@gmail.com> |
|---|---|
| First post | 2016-11-19 19:10 +0100 |
| Last post | 2016-11-21 18:20 +0100 |
| Articles | 4 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] coresight: perf: Add a missing call to etm_free_aux Quentin Lambert <lambert.quentin@gmail.com> - 2016-11-19 19:10 +0100
Re: [PATCH] coresight: perf: Add a missing call to etm_free_aux Quentin Lambert <lambert.quentin@gmail.com> - 2016-11-19 19:30 +0100
Re: [PATCH] coresight: perf: Add a missing call to etm_free_aux Quentin Lambert <lambert.quentin@gmail.com> - 2016-11-19 19:50 +0100
Re: [PATCH] coresight: perf: Add a missing call to etm_free_aux Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-11-21 18:20 +0100
| From | Quentin Lambert <lambert.quentin@gmail.com> |
|---|---|
| Date | 2016-11-19 19:10 +0100 |
| Subject | [PATCH] coresight: perf: Add a missing call to etm_free_aux |
| Message-ID | <sFifo-8mz-21@gated-at.bofh.it> |
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);
[toc] | [next] | [standalone]
| From | Quentin Lambert <lambert.quentin@gmail.com> |
|---|---|
| Date | 2016-11-19 19:30 +0100 |
| Message-ID | <sFiyJ-5C-41@gated-at.bofh.it> |
| In reply to | #1526103 |
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
[toc] | [prev] | [next] | [standalone]
| From | Quentin Lambert <lambert.quentin@gmail.com> |
|---|---|
| Date | 2016-11-19 19:50 +0100 |
| Message-ID | <sFiS6-cD-7@gated-at.bofh.it> |
| In reply to | #1526111 |
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
[toc] | [prev] | [next] | [standalone]
| From | Mathieu Poirier <mathieu.poirier@linaro.org> |
|---|---|
| Date | 2016-11-21 18:20 +0100 |
| Message-ID | <sG0q5-44i-15@gated-at.bofh.it> |
| In reply to | #1526103 |
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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web