From: Tejun Heo <htejun@gmail.com>
To: dtor_core@ameritech.net
Cc: mochel@digitalimplant.org, James.Bottomley@steeleye.com,
linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: [PATCH] driver model/scsi: synchronize pm calls with probe/remove
Date: Tue, 22 Mar 2005 13:57:02 +0900 [thread overview]
Message-ID: <423FA59E.5030406@gmail.com> (raw)
In-Reply-To: <d120d500050321064028e255fe@mail.gmail.com>
Hi, Dmitry.
Dmitry Torokhov wrote:
> On Mon, 21 Mar 2005 18:18:46 +0900, Tejun Heo <htejun@gmail.com> wrote:
>
>>Hello, Dmitry, Mochel and James.
>>
>>I've been looking at sd code and found seemingly bogus 'if (!sdkp)'
>>tests with /* this can happen */ comment. I've digged changelog and
>>found out that this was to prevent oops which occurs if some driver
>>gets stuck inside ->probe and the machine goes down and calls back
>>->remove. IMHO, we should avoid this problem by fixing driver ->probe
>>or ->remove callbacks instead of detecting and bypassing
>>half-initialized/destroyed devices in pm callbacks.
>>
>>This patch read-locks a device's bus using device_pm_down_read_bus()
>>before invoking any pm callback.
>
>
> Hi Tejun,
>
> There are talks about getting rid of bus's rwsem and replacing it with
> a per-device semaphore to serialize probe, remove, suspend and resume.
> This should resolve entire host of problems including this one, if I
> unrerstand it correctly.
>
> Please take a look here:
> http://seclists.org/lists/linux-kernel/2005/Mar/5847.html
>
Yeap, sounds great. Hmmm.. as the final result will (and should) be
the same for inidividual drivers (no overlapping callback invocations),
how about incorporating my patch before implementing the proposed fix
such that we can get rid of the awkward semantic first? The proposed
change should change the same part of code anyway, so I don't think this
would be a hassle.
Thanks.
--
tejun
prev parent reply other threads:[~2005-03-22 5:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-21 9:18 [PATCH] driver model/scsi: synchronize pm calls with probe/remove Tejun Heo
2005-03-21 14:40 ` Dmitry Torokhov
2005-03-22 4:57 ` Tejun Heo [this message]
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=423FA59E.5030406@gmail.com \
--to=htejun@gmail.com \
--cc=James.Bottomley@steeleye.com \
--cc=dtor_core@ameritech.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mochel@digitalimplant.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