summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sg.c
diff options
context:
space:
mode:
authorHugh Dickins <hugh@veritas.com>2006-01-09 20:46:49 +0000
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-09 12:57:05 -0800
commit41ed16fa47350661da01443b8241bf6ca8080fd7 (patch)
treee12d199c8e63f9f296f73336471038fcbcf22bf3 /drivers/scsi/sg.c
parent6150c32589d1976ca8a5c987df951088c05a7542 (diff)
downloadblackbird-obmc-linux-41ed16fa47350661da01443b8241bf6ca8080fd7.tar.gz
blackbird-obmc-linux-41ed16fa47350661da01443b8241bf6ca8080fd7.zip
[PATCH] Fix sg_page_malloc() memset
sg_page_malloc should clear the data buffer, not that extent of mem_map. This fixes Jesper's sg_page_free "Bad page states" Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/scsi/sg.c')
-rw-r--r--drivers/scsi/sg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
index 221e96e2620a..78aad9582bcf 100644
--- a/drivers/scsi/sg.c
+++ b/drivers/scsi/sg.c
@@ -2493,7 +2493,7 @@ sg_page_malloc(int rqSz, int lowDma, int *retSzp)
}
if (resp) {
if (!capable(CAP_SYS_ADMIN) || !capable(CAP_SYS_RAWIO))
- memset(resp, 0, resSz);
+ memset(page_address(resp), 0, resSz);
if (retSzp)
*retSzp = resSz;
}
OpenPOWER on IntegriCloud