public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Hannes Reinecke <hare@suse.de>
Cc: Mike Christie <michaelc@cs.wisc.edu>, linux-scsi@vger.kernel.org
Subject: Re: [PATCH 6/9] scsi_dh: add generic SPC-3 alua handler
Date: Fri, 27 Jun 2008 09:38:16 -0500	[thread overview]
Message-ID: <1214577496.3394.12.camel@localhost.localdomain> (raw)
In-Reply-To: <4864FA31.9020401@suse.de>

On Fri, 2008-06-27 at 16:33 +0200, Hannes Reinecke wrote:
> I cannot see how this _could_ fail, as this function is provided by
> the module, so the very existence of the function depends on the
> module. But maybe it's better to check, even so.
> 
> I'll send an updated patch.

Just because you're in the actual module it's not safe to assume
try_module_get() will succeed.  The modules have a state variable
(->state) if the user tries to remove the module, this state check will
fail in try_module_get() and it will actually return a failure.

James



  reply	other threads:[~2008-06-27 14:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-24 10:05 [PATCH 6/9] scsi_dh: add generic SPC-3 alua handler Hannes Reinecke
2008-06-26  0:57 ` Chandra Seetharaman
2008-06-26 23:22 ` Mike Christie
2008-06-27 14:33   ` Hannes Reinecke
2008-06-27 14:38     ` James Bottomley [this message]
2008-06-27 15:51     ` Mike Christie
2008-07-01 18:46       ` Chandra Seetharaman

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=1214577496.3394.12.camel@localhost.localdomain \
    --to=james.bottomley@hansenpartnership.com \
    --cc=hare@suse.de \
    --cc=linux-scsi@vger.kernel.org \
    --cc=michaelc@cs.wisc.edu \
    /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