From: Jingoo Han <jg1.han@samsung.com>
To: linux-fbdev@vger.kernel.org
Subject: Re: backlight_register_device can oops if name is null ?
Date: Wed, 02 Jan 2013 00:44:39 +0000 [thread overview]
Message-ID: <005301cde882$590d0370$0b270a50$%han@samsung.com> (raw)
In-Reply-To: <CAHdPZaMKfMA=Z6n-X+3NMR-CScfwQmKYuyoJHBeK2bYFn8EEdg@mail.gmail.com>
On Tuesday, January 01, 2013 6:05 AM, Devendra Naga wrote
> Hello,
>
> while reading through the backlight_register_device function, there
backlight_register_device -> backlight_device_register
> seems to be a problem if the new object name is null, the pr_debug
> print goes and dereferences a null pointer causing an oops,
>
> the print should be removed or the check must be placed to ensure that
> name is not null,
Hi,
If name is null in backlight_device_register(),
pr_debug() will work properly and won't cause an oops.
However, dev_set_name() will cause oops, instead of pr_debug().
In this case, NULL check would be better.
Best regards,
Jingoo Han
>
> any ideas?
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2013-01-02 0:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-31 21:04 backlight_register_device can oops if name is null ? devendra.aaru
2013-01-02 0:44 ` Jingoo Han [this message]
2013-01-02 16:40 ` devendra.aaru
2013-01-03 2:31 ` Jingoo Han
2013-01-03 5:22 ` devendra.aaru
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='005301cde882$590d0370$0b270a50$%han@samsung.com' \
--to=jg1.han@samsung.com \
--cc=linux-fbdev@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 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).