From: Len Brown <lenb@kernel.org>
To: akpm@linux-foundation.org
Cc: linux-acpi@vger.kernel.org, gorcunov@gmail.com, hmh@hmh.eng.br
Subject: Re: [patch 9/9] ThinkPad ACPI: fix possible NULL pointer dereference
Date: Tue, 29 Apr 2008 04:16:25 -0400 [thread overview]
Message-ID: <200804290416.25482.lenb@kernel.org> (raw)
In-Reply-To: <200804182027.m3IKRUlu013564@imap1.linux-foundation.org>
applied
thanks,
-len
On Friday 18 April 2008, akpm@linux-foundation.org wrote:
> From: Cyrill Gorcunov <gorcunov@gmail.com>
>
> Fix potential NULL pointer dereference if kstrdup failed
>
> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
>
> drivers/misc/thinkpad_acpi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff -puN drivers/misc/thinkpad_acpi.c~thinkpad-acpi-fix-possible-null-pointer-dereference drivers/misc/thinkpad_acpi.c
> --- a/drivers/misc/thinkpad_acpi.c~thinkpad-acpi-fix-possible-null-pointer-dereference
> +++ a/drivers/misc/thinkpad_acpi.c
> @@ -5826,7 +5826,7 @@ static void __init get_thinkpad_model_da
>
> tp->model_str = kstrdup(dmi_get_system_info(DMI_PRODUCT_VERSION),
> GFP_KERNEL);
> - if (strnicmp(tp->model_str, "ThinkPad", 8) != 0) {
> + if (tp->model_str && strnicmp(tp->model_str, "ThinkPad", 8) != 0) {
> kfree(tp->model_str);
> tp->model_str = NULL;
> }
> _
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
prev parent reply other threads:[~2008-04-29 8:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-18 20:27 [patch 9/9] ThinkPad ACPI: fix possible NULL pointer dereference akpm
2008-04-29 8:16 ` Len Brown [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200804290416.25482.lenb@kernel.org \
--to=lenb@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=gorcunov@gmail.com \
--cc=hmh@hmh.eng.br \
--cc=linux-acpi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.