From: Dmitry Torokhov <dtor_core@ameritech.net>
To: Greg KH <greg@kroah.com>
Cc: Tejun Heo <tj@home-tj.org>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2.6.10-rc1 2/5] driver-model: bus_recan_devices() locking fix
Date: Thu, 4 Nov 2004 11:12:58 -0800 (PST) [thread overview]
Message-ID: <20041104191258.77740.qmail@web81309.mail.yahoo.com> (raw)
In-Reply-To: <20041104185826.GA17756@kroah.com>
Greg KH <greg@kroah.com> wrote:
> On Thu, Nov 04, 2004 at 04:02:58PM +0900, Tejun Heo wrote:
> > df_02_bus_rescan_devcies_fix.patch
> >
> > bus_rescan_devices() eventually calls device_attach() and thus
> > requires write locking the corresponding bus. The original code just
> > called bus_for_each_dev() which only read locks the bus. This patch
> > separates __bus_for_each_dev() and __bus_for_each_drv(), which don't
> > do locking themselves, out from the original functions and call them
> > with read lock in the original functions and with write lock in
> > bus_rescan_devices().
> >
> >
> > Signed-off-by: Tejun Heo <tj@home-tj.org>
>
> Thanks, I cleaned up the formatting a bit in this patch and applied it.
>
Hmm, I do not like that the patch now fiddles with bus's rwsem before
incrementing bus's refcount.
I think just iterating through device list right the bus_rescan_devices
will be good enough. I sent the patch together with other 3, did it get
lost?
--
Dmitry
next prev parent reply other threads:[~2004-11-04 19:19 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-04 7:01 [PATCH 2.6.10-rc1 0/5] driver-model: misc bug fixes Tejun Heo
2004-11-04 7:02 ` [PATCH 2.6.10-rc1 1/5] driver-model: comment fix in bus.c Tejun Heo
2004-11-04 18:35 ` Greg KH
2004-11-04 7:02 ` [PATCH 2.6.10-rc1 2/5] driver-model: bus_recan_devices() locking fix Tejun Heo
2004-11-04 18:58 ` Greg KH
2004-11-04 19:12 ` Dmitry Torokhov [this message]
2004-11-05 6:14 ` Tejun Heo
2004-11-05 16:33 ` Dmitry Torokhov
2004-11-09 1:27 ` Tejun Heo
2004-11-09 1:43 ` Dmitry Torokhov
2004-11-10 7:13 ` Tejun Heo
2004-11-10 0:40 ` Greg KH
2004-11-10 4:17 ` Dmitry Torokhov
2004-11-16 5:52 ` Greg KH
2004-11-04 7:03 ` [PATCH 2.6.10-rc1 3/5] driver-model: sysfs_release() dangling pointer reference fix Tejun Heo
2004-11-04 18:59 ` Greg KH
2004-11-04 7:04 ` [PATCH 2.6.10-rc1 4/5] driver-model: kobject_add() error path reference counting fix Tejun Heo
2004-11-04 19:00 ` Greg KH
2004-11-04 7:05 ` [PATCH 2.6.10-rc1 5/5] driver-model: device_add() " Tejun Heo
2004-11-04 20:07 ` Greg KH
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=20041104191258.77740.qmail@web81309.mail.yahoo.com \
--to=dtor_core@ameritech.net \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@home-tj.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
all inboxes | Powered by JetHome®