Re: 3.1rc10 null pointer dereference ideapad_backlight_notify_power

Sam Tygier
2011-10-24T21:51:51Z

>On Thu, 20 Oct 2011, Ike Panhc wrote:
>
>> This issue has been reported[1] and patch[2] is ready.
>>
>> [1] http://www.mail-archive.com/platform-driver-x86@vger.kernel.org/msg02340.html
>>
>> [2] http://www.mail-archive.com/platform-driver-x86@vger.kernel.org/msg02343.html
>>    http://www.mail-archive.com/platform-driver-x86@vger.kernel.org/msg02346.html
>>
>
>It certainly looks like the patch in [2] will fix the issue, but it looks
>like those are from a couple months ago and I'm still not seeing it in
>linux-next.  Matthew, how is this going to Linus and will it be cc'd to
>stable@vger.kernel.org?

the patch works for me (i applied it to kernel between r10 and 3.1 final). for some reason i don't understand i had to apply the patch by hand.

my git diff says:

diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
index 0c59541..36953bd 100644
--- a/drivers/platform/x86/ideapad-laptop.c
+++ b/drivers/platform/x86/ideapad-laptop.c
@@ -492,6 +492,9 @@ static void ideapad_backlight_notify_power(struct ideapad_private *priv)
{
unsigned long power;
struct backlight_device *blightdev = priv->blightdev;
+
+       if (!blightdev)
+               return;

if (read_ec_data(ideapad_handle, 0x18, &power))
return;

i am not quite sure of the etiquette, should I repost the patch in its original form, or my version, or can someone else get this included.

thanks

sam