linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] ACPICA: Don't leak next_walk_state in acpi_ds_call_control_method()
  2012-10-24 22:15 ` Rafael J. Wysocki
@ 2008-11-25 13:42   ` Jesper Juhl
  2012-10-28 21:08     ` Rafael J. Wysocki
  0 siblings, 1 reply; 4+ messages in thread
From: Jesper Juhl @ 2008-11-25 13:42 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: linux-acpi, linux-kernel, Len Brown, Lin Ming, Bob Moore

On Thu, 25 Oct 2012, Rafael J. Wysocki wrote:

> On Sunday 21 of October 2012 22:35:46 Jesper Juhl wrote:
> > If acpi_ds_create_walk_state() succeeds, but the call to
> > ACPI_ALLOCATE_ZEROED() fails, then we'll return from the function
> > without properly freeing 'next_walk_state'.
> > 
> > Signed-off-by: Jesper Juhl <jj@chaosbits.net>
> 
> This has to go through ACPICA upstream, but we'll get it from there eventually.
> 

Ok. I haven't heard any response to this other than yours, so I guess I'll 
just re-send it in a few days if I still hear nothing.

Can I add your ACK when I re-send?

/Jesper


> Thanks,
> Rafael
> 
> 
> > ---
> >  drivers/acpi/acpica/dsmethod.c |    3 ++-
> >  1 files changed, 2 insertions(+), 1 deletions(-)
> > 
> > diff --git a/drivers/acpi/acpica/dsmethod.c b/drivers/acpi/acpica/dsmethod.c
> > index aa9a5d4..ade59a3 100644
> > --- a/drivers/acpi/acpica/dsmethod.c
> > +++ b/drivers/acpi/acpica/dsmethod.c
> > @@ -378,7 +378,8 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
> >  	 */
> >  	info = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_evaluate_info));
> >  	if (!info) {
> > -		return_ACPI_STATUS(AE_NO_MEMORY);
> > +		status = AE_NO_MEMORY;
> > +		goto cleanup;
> >  	}
> >  
> >  	info->parameters = &this_walk_state->operands[0];
> > 
> 

-- 
Jesper Juhl <jj@chaosbits.net>       http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.


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

* [PATCH] ACPICA: Don't leak next_walk_state in acpi_ds_call_control_method()
@ 2012-10-21 20:35 Jesper Juhl
  2012-10-24 22:15 ` Rafael J. Wysocki
  0 siblings, 1 reply; 4+ messages in thread
From: Jesper Juhl @ 2012-10-21 20:35 UTC (permalink / raw)
  To: linux-acpi; +Cc: linux-kernel, Len Brown, Lin Ming, Bob Moore

If acpi_ds_create_walk_state() succeeds, but the call to
ACPI_ALLOCATE_ZEROED() fails, then we'll return from the function
without properly freeing 'next_walk_state'.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
---
 drivers/acpi/acpica/dsmethod.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/acpi/acpica/dsmethod.c b/drivers/acpi/acpica/dsmethod.c
index aa9a5d4..ade59a3 100644
--- a/drivers/acpi/acpica/dsmethod.c
+++ b/drivers/acpi/acpica/dsmethod.c
@@ -378,7 +378,8 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
 	 */
 	info = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_evaluate_info));
 	if (!info) {
-		return_ACPI_STATUS(AE_NO_MEMORY);
+		status = AE_NO_MEMORY;
+		goto cleanup;
 	}
 
 	info->parameters = &this_walk_state->operands[0];
-- 
1.7.1


-- 
Jesper Juhl <jj@chaosbits.net>       http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.


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

* Re: [PATCH] ACPICA: Don't leak next_walk_state in acpi_ds_call_control_method()
  2012-10-21 20:35 [PATCH] ACPICA: Don't leak next_walk_state in acpi_ds_call_control_method() Jesper Juhl
@ 2012-10-24 22:15 ` Rafael J. Wysocki
  2008-11-25 13:42   ` Jesper Juhl
  0 siblings, 1 reply; 4+ messages in thread
From: Rafael J. Wysocki @ 2012-10-24 22:15 UTC (permalink / raw)
  To: Jesper Juhl; +Cc: linux-acpi, linux-kernel, Len Brown, Lin Ming, Bob Moore

On Sunday 21 of October 2012 22:35:46 Jesper Juhl wrote:
> If acpi_ds_create_walk_state() succeeds, but the call to
> ACPI_ALLOCATE_ZEROED() fails, then we'll return from the function
> without properly freeing 'next_walk_state'.
> 
> Signed-off-by: Jesper Juhl <jj@chaosbits.net>

This has to go through ACPICA upstream, but we'll get it from there eventually.

Thanks,
Rafael


> ---
>  drivers/acpi/acpica/dsmethod.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/acpi/acpica/dsmethod.c b/drivers/acpi/acpica/dsmethod.c
> index aa9a5d4..ade59a3 100644
> --- a/drivers/acpi/acpica/dsmethod.c
> +++ b/drivers/acpi/acpica/dsmethod.c
> @@ -378,7 +378,8 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
>  	 */
>  	info = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_evaluate_info));
>  	if (!info) {
> -		return_ACPI_STATUS(AE_NO_MEMORY);
> +		status = AE_NO_MEMORY;
> +		goto cleanup;
>  	}
>  
>  	info->parameters = &this_walk_state->operands[0];
> 
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

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

* Re: [PATCH] ACPICA: Don't leak next_walk_state in acpi_ds_call_control_method()
  2008-11-25 13:42   ` Jesper Juhl
@ 2012-10-28 21:08     ` Rafael J. Wysocki
  0 siblings, 0 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2012-10-28 21:08 UTC (permalink / raw)
  To: Jesper Juhl; +Cc: linux-acpi, linux-kernel, Len Brown, Lin Ming, Bob Moore

On Tuesday, November 25, 2008 02:42:09 PM Jesper Juhl wrote:
> On Thu, 25 Oct 2012, Rafael J. Wysocki wrote:
> 
> > On Sunday 21 of October 2012 22:35:46 Jesper Juhl wrote:
> > > If acpi_ds_create_walk_state() succeeds, but the call to
> > > ACPI_ALLOCATE_ZEROED() fails, then we'll return from the function
> > > without properly freeing 'next_walk_state'.
> > > 
> > > Signed-off-by: Jesper Juhl <jj@chaosbits.net>
> > 
> > This has to go through ACPICA upstream, but we'll get it from there eventually.
> > 
> 
> Ok. I haven't heard any response to this other than yours, so I guess I'll 
> just re-send it in a few days if I still hear nothing.
> 
> Can I add your ACK when I re-send?

You don't need to resend, it's been taken.

Thanks,
Rafael


> > > ---
> > >  drivers/acpi/acpica/dsmethod.c |    3 ++-
> > >  1 files changed, 2 insertions(+), 1 deletions(-)
> > > 
> > > diff --git a/drivers/acpi/acpica/dsmethod.c b/drivers/acpi/acpica/dsmethod.c
> > > index aa9a5d4..ade59a3 100644
> > > --- a/drivers/acpi/acpica/dsmethod.c
> > > +++ b/drivers/acpi/acpica/dsmethod.c
> > > @@ -378,7 +378,8 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
> > >  	 */
> > >  	info = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_evaluate_info));
> > >  	if (!info) {
> > > -		return_ACPI_STATUS(AE_NO_MEMORY);
> > > +		status = AE_NO_MEMORY;
> > > +		goto cleanup;
> > >  	}
> > >  
> > >  	info->parameters = &this_walk_state->operands[0];
> > > 
> > 
> 
> 
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

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

end of thread, other threads:[~2012-10-28 21:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-21 20:35 [PATCH] ACPICA: Don't leak next_walk_state in acpi_ds_call_control_method() Jesper Juhl
2012-10-24 22:15 ` Rafael J. Wysocki
2008-11-25 13:42   ` Jesper Juhl
2012-10-28 21:08     ` Rafael J. Wysocki

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