From: Greg KH <gregkh@suse.de>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Kay Sievers <kay.sievers@vrfy.org>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Adrian Bunk <bunk@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Natalie Protasevich <protasnb@gmail.com>
Subject: Re: 2.6.30-rc6: Reported regressions from 2.6.29
Date: Sun, 17 May 2009 08:33:46 -0700 [thread overview]
Message-ID: <20090517153346.GA1536@suse.de> (raw)
In-Reply-To: <alpine.LFD.2.01.0905161908100.3301@localhost.localdomain>
On Sat, May 16, 2009 at 07:13:59PM -0700, Linus Torvalds wrote:
>
>
> On Sun, 17 May 2009, Kay Sievers wrote:
> >
> > This makes the oops in the driver-core, caused by the rtc driver
> > unregister, go away. The original issue is also fixed in the rtc driver
> > itself.
>
> I don't think this is sufficient.
>
> > --- a/drivers/base/driver.c
> > +++ b/drivers/base/driver.c
> > @@ -257,6 +257,8 @@ EXPORT_SYMBOL_GPL(driver_register);
> > */
> > void driver_unregister(struct device_driver *drv)
> > {
> > + if (!drv || !drv->p)
> > + return;
> > driver_remove_groups(drv, drv->groups);
> > bus_remove_driver(drv);
> > }
>
> Ok, fine so far, but look at "driver_register()".
>
> It will set drv->p, but then not unset it if it fails! (For a certain
> class of failures)
>
> So for a certain failure pattern, drv->p will point to some stale value.
> Should we not clear drv->p in the "out_unregister" patch?
>
> To confuse the thing more, there are actually "half-way failures" that
> _succeed_ in driver registration, but then return an error code. See that
> whole
>
>
> kobject_uevent(&priv->kobj, KOBJ_ADD);
> return error;
>
> case in the "success" path driver_register(). We may return an error
> despite the fact that we actually attached the driver to bus, but
> "add_bind_files()" failed. A caller would be understandable very unhappy.
>
> So I suspect we should do something like the appended (in addition to your
> patch). Comments?
That looks good. I'll add the WARN_ON that Ingo pointed out, and merge
this with Kay's patch. Give me a few hours to wake up...
thanks,
greg k-h
next prev parent reply other threads:[~2009-05-17 15:34 UTC|newest]
Thread overview: 91+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-16 19:14 2.6.30-rc6: Reported regressions from 2.6.29 Rafael J. Wysocki
2009-05-16 19:14 ` [Bug #13068] Lockdep warining in inotify_dev_queue_event Rafael J. Wysocki
2009-05-17 6:35 ` Ingo Molnar
2009-05-17 8:13 ` Sachin Sant
2009-05-17 10:25 ` Rafael J. Wysocki
2009-05-16 19:20 ` [Bug #13069] regression in 2.6.29-git3 on SH/Dreamcast Rafael J. Wysocki
2009-05-16 19:20 ` [Bug #13107] LTP 20080131 causes defunct processes w/2.6.30-rc1 Rafael J. Wysocki
2009-05-17 19:13 ` Linus Torvalds
2009-05-18 14:41 ` Oleg Nesterov
2009-05-18 17:54 ` Sukadev Bhattiprolu
2009-05-19 9:16 ` Ingo Molnar
2009-05-19 13:32 ` Oleg Nesterov
2009-05-16 19:20 ` [Bug #13109] High latency on /sys/class/thermal Rafael J. Wysocki
2009-05-16 19:20 ` [Bug #13118] iptables very slow after commit 784544739a25c30637397ace5489eeb6e15d7d49 Rafael J. Wysocki
2009-05-17 6:06 ` Jeff Chua
2009-05-17 10:26 ` Rafael J. Wysocki
2009-05-16 19:20 ` [Bug #13116] Can't boot with nosmp Rafael J. Wysocki
2009-05-16 19:20 ` [Bug #13125] active uvcvideo breaks over suspend Rafael J. Wysocki
2009-05-16 19:20 ` [Bug #13122] reiserfs_delete_xattrs: Couldn't delete all xattrs (-13) Rafael J. Wysocki
2009-05-17 19:16 ` Linus Torvalds
2009-05-17 20:36 ` Rafael J. Wysocki
2009-05-16 19:20 ` [Bug #13119] Trouble with make-install from a NFS mount Rafael J. Wysocki
2009-05-16 19:20 ` [Bug #13126] BUG: MAX_LOCKDEP_ENTRIES too low! when mounting rootfs Rafael J. Wysocki
2009-05-16 19:20 ` [Bug #13156] keyboard backlight brightness up/down keys doesn't work Rafael J. Wysocki
2009-05-16 19:20 ` [Bug #13148] resume after suspend-to-ram broken on Sony Vaio VGN-SR19VN when sony-laptop driver present Rafael J. Wysocki
2009-05-16 19:20 ` [Bug #13177] 2.6.30-rc2-git7 build problem Rafael J. Wysocki
2009-05-18 14:05 ` Martin Knoblauch
2009-05-16 19:20 ` [Bug #13179] CD-R: wodim intermittent failures Rafael J. Wysocki
2009-05-16 22:51 ` Robert Hancock
2009-05-16 19:20 ` [Bug #13180] 2.6.30-rc2: WARNING at i915_gem.c for i915_gem_idle Rafael J. Wysocki
2009-05-16 19:20 ` [Bug #13171] 2.6.30-rc2 + xorg-intel-2.7.0 + DRM_I915_KMS = corruption Rafael J. Wysocki
2009-05-16 19:20 ` [Bug #13188] horizontal strips of the screen frozen Rafael J. Wysocki
2009-05-18 16:35 ` Justin Madru
2009-05-18 18:03 ` Rafael J. Wysocki
2009-05-18 18:04 ` Rafael J. Wysocki
2009-05-16 19:20 ` [Bug #13245] possible circular locking dependency detected Rafael J. Wysocki
2009-05-17 3:22 ` Ming Lei
2009-05-17 10:26 ` Rafael J. Wysocki
2009-05-16 19:20 ` [Bug #13293] Kernel BUG under network load with gianfar Rafael J. Wysocki
2009-05-16 19:20 ` [Bug #13285] INTELFB: Colors display incorrectly Rafael J. Wysocki
2009-05-16 19:20 ` [Bug #13250] Side channel of Intel HDA chip doesn't work anymore, did work with 2.6.29 Rafael J. Wysocki
2009-05-16 19:20 ` [Bug #13294] i915: drm: xorg leaks drm objects massively Rafael J. Wysocki
2009-05-16 19:20 ` [Bug #13297] kernel panic - not syncing : fatel exception in interupt Rafael J. Wysocki
2009-05-16 19:20 ` [Bug #13296] Lockdep violation at cleanup_workqueue_thread during suspend Rafael J. Wysocki
2009-05-16 19:20 ` [Bug #13298] modprobe ipmi_si hangs under 2.6.30-rc5 Rafael J. Wysocki
2009-05-16 19:20 ` [Bug #13306] hibernate slow on _second_ run Rafael J. Wysocki
2009-05-16 19:20 ` [Bug #13319] Page allocation failures with b43 and p54usb Rafael J. Wysocki
2009-05-16 23:36 ` Andrew Morton
2009-05-17 23:16 ` Larry Finger
2009-05-18 6:31 ` Pekka Enberg
2009-05-21 13:21 ` Larry Finger
2009-05-16 19:20 ` [Bug #13318] AGP doesn't work anymore on nforce2 Rafael J. Wysocki
2009-05-16 19:20 ` [Bug #13321] kernel crash with NULL pointer when boot Rafael J. Wysocki
2009-05-16 19:20 ` [Bug #13323] 2.6.30-rc deadline scheduler performance regression for iozone over NFS Rafael J. Wysocki
2009-05-16 19:20 ` [Bug #13324] panic when loading oprofile Rafael J. Wysocki
2009-05-16 19:20 ` [Bug #13325] 2.6.30-rc kills my box hard - and lockdep chains Rafael J. Wysocki
2009-05-16 19:20 ` [Bug #13327] Regression: 2.6.30-rc5 and rt2x00 / rt2500pci Rafael J. Wysocki
2009-05-16 19:20 ` [Bug #13326] Null pointer dereference in rtc-cmos driver Rafael J. Wysocki
2009-05-16 19:20 ` [Bug #13328] b44: eth0: BUG! Timeout waiting for bit 00000002 of register 42c to clear Rafael J. Wysocki
2009-05-16 19:20 ` [Bug #13329] cifs_close: NULL pointer dereference Rafael J. Wysocki
2009-05-16 23:44 ` 2.6.30-rc6: Reported regressions from 2.6.29 Linus Torvalds
2009-05-17 0:01 ` Linus Torvalds
2009-05-17 0:15 ` Kay Sievers
2009-05-17 1:01 ` Kay Sievers
2009-05-17 2:13 ` Linus Torvalds
2009-05-17 15:33 ` Greg KH [this message]
2009-05-18 3:48 ` Greg KH
2009-05-17 6:32 ` Ingo Molnar
2009-05-17 0:32 ` Ozan Çağlayan
2009-05-17 2:06 ` Linus Torvalds
2009-05-17 7:33 ` Ingo Molnar
2009-05-17 10:34 ` Rafael J. Wysocki
2009-05-17 12:56 ` Stefan Richter
2009-05-17 13:59 ` Jeff Mahoney
2009-05-17 13:32 ` Frederic Weisbecker
2009-05-17 16:19 ` Borislav Petkov
2009-05-18 16:35 ` Bartlomiej Zolnierkiewicz
2009-05-19 6:05 ` Borislav Petkov
2009-05-20 1:14 ` Frederic Weisbecker
2009-05-18 14:57 ` Oleg Nesterov
2009-05-18 15:11 ` Ingo Molnar
2009-05-18 15:31 ` Oleg Nesterov
2009-05-18 15:32 ` Linus Torvalds
2009-05-18 15:45 ` Oleg Nesterov
2009-05-17 17:55 ` Alex Bennee
2009-05-22 16:40 ` Linus Torvalds
2009-05-23 0:10 ` Rafael J. Wysocki
2009-05-25 20:24 ` Frans Pop
2009-05-25 23:02 ` Rafael J. Wysocki
2009-05-26 15:30 ` Frans Pop
2009-05-26 18:48 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090517153346.GA1536@suse.de \
--to=gregkh@suse.de \
--cc=akpm@linux-foundation.org \
--cc=bunk@kernel.org \
--cc=kay.sievers@vrfy.org \
--cc=linux-kernel@vger.kernel.org \
--cc=protasnb@gmail.com \
--cc=rjw@sisk.pl \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).