aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFUJITA Tomonori <tomof@acm.org>2008-01-12 12:20:18 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-01-23 12:29:26 -0500
commitcc75e8ab6f262a3ea60e8d8268f48da5365f2823 (patch)
tree84be7a959b51f7f3349daead61dba5814155ab24
parent3bc8070fb75b33151791fb54ca36ae5abcc8b8df (diff)
[SCSI] libsas: fix sense_buffer overrun
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
-rw-r--r--drivers/scsi/libsas/sas_scsi_host.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c
index b784089b18d0..828fed1114ee 100644
--- a/drivers/scsi/libsas/sas_scsi_host.c
+++ b/drivers/scsi/libsas/sas_scsi_host.c
@@ -108,7 +108,7 @@ static void sas_scsi_task_done(struct sas_task *task)
108 break; 108 break;
109 case SAM_CHECK_COND: 109 case SAM_CHECK_COND:
110 memcpy(sc->sense_buffer, ts->buf, 110 memcpy(sc->sense_buffer, ts->buf,
111 max(SCSI_SENSE_BUFFERSIZE, ts->buf_valid_size)); 111 min(SCSI_SENSE_BUFFERSIZE, ts->buf_valid_size));
112 stat = SAM_CHECK_COND; 112 stat = SAM_CHECK_COND;
113 break; 113 break;
114 default: 114 default: