From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Matthew Wilcox <matthew@wil.cx>
Cc: Brian King <brking@linux.vnet.ibm.com>,
Daniel Debonzi <debonzi@linux.vnet.ibm.com>,
linux-scsi@vger.kernel.org
Subject: Re: scsi_host_alloc does not check for used shost->host_no
Date: Tue, 15 Jul 2008 15:34:14 -0500 [thread overview]
Message-ID: <1216154055.3312.129.camel@localhost.localdomain> (raw)
In-Reply-To: <20080715202507.GI14894@parisc-linux.org>
On Tue, 2008-07-15 at 14:25 -0600, Matthew Wilcox wrote:
> > Do we need to worry about a host in the SHOST_DEL state? In that case, it will still
> > exist to some degree, but scsi_host_get will fail. For example, what happens if a
> > shell is in /sys/class/scsi_host/host5/ and you delete host 5 and try to add another.
> > Couldn't you run into the same problem? In that case the scsi_host_get will fail.
> > I suppose you could check specifically for -ENXIO getting returned...
>
> Or we could make the host_no a u64 and avoid the problem ever happening
> in our lifetimes. I'm amazed that anyone's had the time to do 4 billion
> add/removes, to be honest. Assuming it takes 1 second per add/remove
> cycle, and there's not even time to scan a bus in that time, that's
> still 136 years.
Actually, right at the moment, a lot of the udev stuff is conditioned on
a non repeating host number (which is why we don't use idr like we do
for the other things). I'm really reluctant to go to a u64 host
number ... what was the use case that produced this problem?
James
next prev parent reply other threads:[~2008-07-15 20:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-11 13:19 scsi_host_alloc does not check for used shost->host_no Daniel Debonzi
2008-07-15 20:16 ` Brian King
2008-07-15 20:25 ` Matthew Wilcox
2008-07-15 20:31 ` Brian King
2008-07-15 20:54 ` [PATCH] Make host_no an unsigned int Matthew Wilcox
2008-07-15 20:34 ` James Bottomley [this message]
2008-07-15 21:39 ` scsi_host_alloc does not check for used shost->host_no Daniel Debonzi
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=1216154055.3312.129.camel@localhost.localdomain \
--to=james.bottomley@hansenpartnership.com \
--cc=brking@linux.vnet.ibm.com \
--cc=debonzi@linux.vnet.ibm.com \
--cc=linux-scsi@vger.kernel.org \
--cc=matthew@wil.cx \
/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