sd name space exhaustion causes system hang
commitf1c532c57f510a26886d8ee8650cfd1926e47b36
authorMichael Reed <mdr@sgi.com>
Mon, 20 Sep 2010 16:20:22 +0000 (20 11:20 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 21 Mar 2011 19:43:37 +0000 (21 12:43 -0700)
treed8fca623e62311af340f174faf7d0a2d6e533858
parent3c2feffd253e2c9f27c6b4d5af377d5aa9ae9233
sd name space exhaustion causes system hang

commit 1a03ae0f556a931aa3747b70e44b78308f5b0590 upstream.

Following a site power outage which re-enabled all the ports on my FC
switches, my system subsequently booted with far too many luns!  I had
let it run hoping it would make multi-user.  It didn't.  :(  It hung solid
after exhausting the last sd device, sdzzz, and attempting to create sdaaaa
and beyond.  I was unable to get a dump.

Discovered using a 2.6.32.13 based system.

correct this by detecting when the last index is utilized and failing
the sd probe of the device.  Patch applies to scsi-misc-2.6.

Signed-off-by: Michael Reed <mdr@sgi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/scsi/sd.c