Messages in this thread | | | From | Kay Sievers <> | Date | Sun, 17 May 2009 02:36:41 +0200 | Subject | Re: [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/
| |