* fix rtc_cmos bug
@ 2009-05-17 15:04 ye janboe
2009-05-20 5:17 ` ye janboe
0 siblings, 1 reply; 4+ messages in thread
From: ye janboe @ 2009-05-17 15:04 UTC (permalink / raw)
To: linux-kernel; +Cc: rjw, bunk, bugme-janitors
fix Bug 13326 - Null pointer dereference in rtc-cmos driver
http://bugzilla.kernel.org/show_bug.cgi?id=13326
Signed-off-by: janboe <janboe.ye@gmail.com>
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
index 23e10b6..da132f6 100644
--- a/drivers/rtc/rtc-cmos.c
+++ b/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)
+ return retval;
#endif
if (!cmos_rtc.dev)
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: fix rtc_cmos bug
2009-05-17 15:04 fix rtc_cmos bug ye janboe
@ 2009-05-20 5:17 ` ye janboe
2009-05-20 6:16 ` Ozan Çağlayan
0 siblings, 1 reply; 4+ messages in thread
From: ye janboe @ 2009-05-20 5:17 UTC (permalink / raw)
To: linux-kernel; +Cc: rjw, bunk, bugme-janitors
my fix is wrong?
Why no one ack this patch?
Thanks
Janboe
2009/5/17 ye janboe <janboe.ye@gmail.com>:
> fix Bug 13326 - Null pointer dereference in rtc-cmos driver
> http://bugzilla.kernel.org/show_bug.cgi?id=13326
>
> Signed-off-by: janboe <janboe.ye@gmail.com>
>
> diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
> index 23e10b6..da132f6 100644
> --- a/drivers/rtc/rtc-cmos.c
> +++ b/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)
> + return retval;
> #endif
>
> if (!cmos_rtc.dev)
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: fix rtc_cmos bug
2009-05-20 5:17 ` ye janboe
@ 2009-05-20 6:16 ` Ozan Çağlayan
2009-05-20 13:03 ` ye janboe
0 siblings, 1 reply; 4+ messages in thread
From: Ozan Çağlayan @ 2009-05-20 6:16 UTC (permalink / raw)
To: ye janboe; +Cc: linux-kernel, rjw, bunk, bugme-janitors
ye janboe wrote On 20-05-2009 08:17:
> my fix is wrong?
>
> Why no one ack this patch?
>
> Thanks
>
> Janboe
>
>
AFAIK any fix in a driver which causes this oops is a partial fix
because the case should be handled in driver core. This is what the
patch suggested does actually:
http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/driver-core.current/driver-core-do-not-oops-when-driver_unregister-is-called-for-unregistered-drivers.patch
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: fix rtc_cmos bug
2009-05-20 6:16 ` Ozan Çağlayan
@ 2009-05-20 13:03 ` ye janboe
0 siblings, 0 replies; 4+ messages in thread
From: ye janboe @ 2009-05-20 13:03 UTC (permalink / raw)
To: Ozan Çağlayan; +Cc: linux-kernel, rjw, bunk, bugme-janitors
So if register failed, unregister is requested to invoked, right?
Anyway, thank you for your answer.
2009/5/20 Ozan Çağlayan <ozan@pardus.org.tr>:
> ye janboe wrote On 20-05-2009 08:17:
>> my fix is wrong?
>>
>> Why no one ack this patch?
>>
>> Thanks
>>
>> Janboe
>>
>>
>
> AFAIK any fix in a driver which causes this oops is a partial fix
> because the case should be handled in driver core. This is what the
> patch suggested does actually:
>
> http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/driver-core.current/driver-core-do-not-oops-when-driver_unregister-is-called-for-unregistered-drivers.patch
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-05-20 13:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-17 15:04 fix rtc_cmos bug ye janboe
2009-05-20 5:17 ` ye janboe
2009-05-20 6:16 ` Ozan Çağlayan
2009-05-20 13:03 ` ye janboe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.