]> git.baikalelectronics.ru Git - kernel.git/commit
scsi_error: fix invalid setting of host byte
authorUlrich Obergfell <uobergfe@redhat.com>
Wed, 4 Jun 2014 11:34:57 +0000 (13:34 +0200)
committerChristoph Hellwig <hch@lst.de>
Tue, 24 Jun 2014 15:00:12 +0000 (17:00 +0200)
commitbdcfd619acf21ac3ca29ffd713dd4e4870f4e84a
treea1e892598591ccbea088344ae55e359c0ead64c9
parent77e9131da3a881ef118ad45cc3e419059944deda
scsi_error: fix invalid setting of host byte

After scsi_try_to_abort_cmd returns, the eh_abort_handler may have
already found that the command has completed in the device, causing
the host_byte to be nonzero (e.g. it could be DID_ABORT).  When
this happens, ORing DID_TIME_OUT into the host byte will corrupt
the result field and initiate an unwanted command retry.

Fix this by using set_host_byte instead, following the model of
commit 36e0607e0d011cdaef6c003ef2b0a18412646bc3.

Cc: stable@vger.kernel.org
Signed-off-by: Ulrich Obergfell <uobergfe@redhat.com>
[Fix all instances according to review comments. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
drivers/scsi/scsi_error.c