[PATCH] fix Jesper's sg_page_free Bad page states

From: Hugh Dickins
Date: Mon Jan 09 2006 - 15:45:26 EST


sg_page_malloc clear the data buffer, not that extent of mem_map.

Signed-off-by: Hugh Dickins <hugh@xxxxxxxxxxx>
---

drivers/scsi/sg.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)

--- 2.6.15-git5/drivers/scsi/sg.c 2006-01-09 14:05:49.000000000 +0000
+++ linux/drivers/scsi/sg.c 2006-01-09 20:03:59.000000000 +0000
@@ -2493,7 +2493,7 @@ sg_page_malloc(int rqSz, int lowDma, int
}
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;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/