[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>
This commit is contained in:
Hugh Dickins 2006-01-09 20:46:49 +00:00 committed by Linus Torvalds
parent 6150c32589
commit 41ed16fa47

View file

@ -2493,7 +2493,7 @@ sg_page_malloc(int rqSz, int lowDma, int *retSzp)
} }
if (resp) { if (resp) {
if (!capable(CAP_SYS_ADMIN) || !capable(CAP_SYS_RAWIO)) if (!capable(CAP_SYS_ADMIN) || !capable(CAP_SYS_RAWIO))
memset(resp, 0, resSz); memset(page_address(resp), 0, resSz);
if (retSzp) if (retSzp)
*retSzp = resSz; *retSzp = resSz;
} }