From: Doug Ledford <dledford@redhat.com> Date: Mon, 25 Aug 2008 13:49:18 -0400 Subject: [md] fix handling of sense buffer in eh commands Message-id: 1219686558.16580.12.camel@firewall.xsintricity.com O-Subject: [Patch RHEL5.3] Fix handling of sense buffer in eh commands Bugzilla: 441640 RH-Acked-by: Pete Zaitcev <zaitcev@redhat.com> The scsi mid layer code incorrectly tries to access scmd->request_buffer, correct that (which allows us to get correct sense info from our device instead of getting no sense info). Fixes bz441640. -- Doug Ledford <dledford@redhat.com> GPG KeyID: CFBFF194 http://people.redhat.com/dledford Infiniband specific RPMs available at http://people.redhat.com/dledford/Infiniband commit 1e27dbbc6135f44152fb01e912403f2792d0c2cf Author: Doug Ledford <dledford@redhat.com> Date: Mon Aug 25 13:04:54 2008 -0400 Get the correct address of the sense buffer Signed-off-by: Doug Ledford <dledford@redhat.com> diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 1d3d726..ab13c38 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -720,7 +720,7 @@ static int scsi_send_eh_cmnd(struct scsi_cmnd *scmd, unsigned char *cmnd, */ if (copy_sense) { if (!SCSI_SENSE_VALID(scmd)) { - memcpy(scmd->sense_buffer, scmd->request_buffer, + memcpy(scmd->sense_buffer, page_address(sgl.page), sizeof(scmd->sense_buffer)); } __free_page(sgl.page);