]> git.karo-electronics.de Git - karo-tx-linux.git/commit
SCSI: esp: Fix OOPS in esp_reset_cleanup().
authorDavid S. Miller <davem@davemloft.net>
Thu, 3 Jul 2008 02:45:49 +0000 (02:45 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 24 Jul 2008 16:14:05 +0000 (09:14 -0700)
commit13ac0ea3cf0b540c409d5a5ff1508f2d630d475d
tree24c42ad6b2aa20a535b30046ea1e9423cdff9f66
parentb80a43a3627d4dede30e59706443dc1653f5e2de
SCSI: esp: Fix OOPS in esp_reset_cleanup().

commit eadc49b1a8d09480f14caea292142f103a89c77a upstream

OOPS reported by Friedrich Oslage <bluebird@porno-bullen.de>

The problem here is that tp->starget is set every time a lun
is allocated for a particular target so we can catch the
sdev_target parent value.

The reset handler uses the NULL'ness of this value to determine
which targets are active.

But esp_slave_destroy() does not NULL out this value when appropriate.

So for every target that doesn't respond, the SCSI bus scan causes
a stale pointer to be left here, with ensuing crashes like you're
seeing.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/scsi/esp_scsi.c
drivers/scsi/esp_scsi.h