From: James Bottomley <James.Bottomley@suse.de>
To: iceberg <strakh@ispras.ru>
Cc: Andrew Morton <akpm@linux-foundation.org>,
eric@andante.org, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org, Kay Sievers <kay.sievers@vrfy.org>,
Greg KH <greg@kroah.com>
Subject: Re: [PATCH] scsi_lib.c: sleeping function called from invalid context
Date: Tue, 06 Oct 2009 13:50:49 +0000 [thread overview]
Message-ID: <1254837049.4383.17.camel@mulgrave.site> (raw)
In-Reply-To: <200910061230.03488.strakh@ispras.ru>
On Tue, 2009-10-06 at 12:30 +0000, iceberg wrote:
> James, what about code where spin_unlock is called before scsi_device_put,
> especially for avoiding atomic context?
> In code like
> spin_unlock
> scsi_device_put
> spin_lock
> Is spin_unlock/spin_lock redundant?
Depends on context ... most of them are actually swapping locks or
providing pre-emption points ... it could be redundant, but doesn't have
to be.
> Why do we need scsi_device_get/scsi_device_put pair in scsi_lib.c at all? If
> we are sure that scsi_device_put is always not last, for what purpose do we
> call it together with scsi_device_get in the loop?
We're not sure (and never can be in a hotplug world) that any put isn't
the last one.
James
prev parent reply other threads:[~2009-10-06 13:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-23 17:58 iceberg
2009-09-24 22:56 ` Andrew Morton
2009-09-25 1:23 ` James Bottomley
2009-10-01 18:32 ` James Bottomley
2009-10-05 18:35 ` iceberg
2009-10-05 15:13 ` James Bottomley
2009-10-06 12:30 ` iceberg
2009-10-06 13:50 ` James Bottomley [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=1254837049.4383.17.camel@mulgrave.site \
--to=james.bottomley@suse.de \
--cc=akpm@linux-foundation.org \
--cc=eric@andante.org \
--cc=greg@kroah.com \
--cc=kay.sievers@vrfy.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=strakh@ispras.ru \
/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®