[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ac3eb2510905161736o1cb7bc2aub3b7355528c4f507@mail.gmail.com>
Date: Sun, 17 May 2009 02:36:41 +0200
From: Kay Sievers <kay.sievers@...y.org>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Alessandro Zummo <alessandro.zummo@...ertech.it>,
rtc-linux@...glegroups.com, mingo@...e.hu,
Ozan Çağlayan <ozan@...dus.org.tr>,
David Brownell <david-b@...bell.net>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Greg KH <greg@...ah.com>, Tejun Heo <tj@...nel.org>
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@...y.org> wrote:
> On Sun, May 17, 2009 at 00:49, Andrew Morton <akpm@...ux-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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists