diff options
author | David S. Miller <davem@davemloft.net> | 2008-06-17 23:53:22 -0700 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-06-24 15:48:56 -0500 |
commit | eadc49b1a8d09480f14caea292142f103a89c77a (patch) | |
tree | ed78a3cfdd22e9754eaadcd1c73c5edd2d03cf5b /drivers/scsi/esp_scsi.h | |
parent | c95e62ce8905aab62fed224eaaa9b8558a0ef652 (diff) |
[SCSI] esp: Fix OOPS in esp_reset_cleanup().
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>
Cc: Stable Tree <stable@kernel.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/esp_scsi.h')
-rw-r--r-- | drivers/scsi/esp_scsi.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/esp_scsi.h b/drivers/scsi/esp_scsi.h index bb43a138818..655e0b2240b 100644 --- a/drivers/scsi/esp_scsi.h +++ b/drivers/scsi/esp_scsi.h @@ -322,6 +322,7 @@ struct esp_target_data { u8 nego_goal_tags; struct scsi_target *starget; + int starget_ref; }; struct esp_event_ent { |