Re: [PATCH] RTC: mark if rtc-cmos drivers were successfullyregistered.

From: Thadeu Lima de Souza Cascardo
Date: Mon Jul 20 2009 - 16:57:36 EST


On Mon, Jul 20, 2009 at 10:32:06PM +0200, Kay Sievers wrote:
> On Mon, Jul 20, 2009 at 22:19, Andrew Morton<akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
> > On Sun, Â5 Jul 2009 01:07:59 -0300
> > Thadeu Lima de Souza Cascardo <cascardo@xxxxxxxxxxxxxx> wrote:
> >
> >> rtc-cmos has two drivers, one PNP and one platform. When PNP has not
> >> succeeded probing, platform is registered. However, it tries to
> >> unregister both drivers unconditionally, instead of only unregistering
> >> those that were successfully registered. Fix that with a boolean
> >> variable for each driver indicating whether registering was successful.
>
> > This came up a few weeks ago - the kernel was actually crashing deep
> > down in the driver core, when a not-registered device was unregistered.
> >
> > I believe Kay was planning on making the driver core more robust, so
> > that crash shouldn't be happening any more. ÂKay, can you please confirm
> > that thsi got fixed?
>
> This is supposed to fix it:
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5c8563d773c0e9f0ac2a552e84806decd98ce732
>
> Thanks,
> Kay

Yes, but instead of an oops, we get a warning when the driver could just
behave properly. That's the intention of this patch: do not warn the
user when there's nothing to warn about, as long as the driver behaves
itself. Doing an rmmod on a unused module should not give the user what
looks like an oops. I should start being more verbose with my commit
messages. :-D

My best and thanks for you work,
Thadeu Cascardo.

Attachment: signature.asc
Description: Digital signature