lkml.org 
[lkml]   [2009]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [rtc-linux] Re: [BUG 2.6.30_rc5] Null pointer dereference in rtc-cmos driver
On Sun, May 17, 2009 at 01:36, Kay Sievers <kay.sievers@vrfy.org> wrote:
> On Sun, May 17, 2009 at 00:49, Andrew Morton <akpm@linux-foundation.org> wrote:
>
>> This should fix the symptoms:
>
>> +++ a/drivers/rtc/rtc-cmos.c
>> @@ -1179,7 +1179,9 @@ static int __init cmos_init(void)
>>        int retval = 0;
>>
>>  #ifdef CONFIG_PNP
>> -       pnp_register_driver(&cmos_pnp_driver);
>> +       retval = pnp_register_driver(&cmos_pnp_driver);
>> +       if (retval < 0)
>> +               return retval;
>>  #endif
>
> That looks like a good fix.
>
>> Can someone please test it?
>
> I'll try to reproduce it.

Looks good. It makes the issue go away:
Error: Driver 'rtc_cmos' is already registered, aborting...
initcall cmos_init+0x0/0x55 [rtc_cmos] returned -17 after 51 usecs
initcall cmos_init+0x0/0x55 [rtc_cmos] returned with error code -17

Now to the driver core fix to prevent that ...

Thanks,
Kay
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2009-05-17 02:39    [W:0.084 / U:0.528 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site