Re: 2.6.15-mm
From: Hugh Dickins
Date: Mon Jan 09 2006 - 15:14:15 EST
On Mon, 9 Jan 2006, Jesper Juhl wrote:
> On 1/9/06, Hugh Dickins <hugh@xxxxxxxxxxx> wrote:
> >
> > Remove sg_rb_correct4mmap() and its nasty __put_page()s, which are liable
> > to do quite the wrong thing. Instead allocate pages with __GFP_COMP, then
> > high-orders should be safe for exposure to userspace by sg_vma_nopage(),
> > without any further manipulations. Based on original patch by Nick Piggin.
>
> Unfortunately that patch doesn't change a thing (except some
> addresses, but that's exected) :-(
Okay, thanks for trying. Maybe you need to revert to the 2.6.15
drivers/scsi/sg.c for now (does that work for you in the 2.6.15-mm2
kernel?), or you could first try this little patch on 2.6.15-mm2
(either with or without my earlier patch - which will be wanted,
but not so urgently). I've not attempted to review the changes
in detail, but this change (if no more) looks to be badly needed...
And it's 2.6.15-git needing the fix, not just -mm.
sg_page_malloc clear the data buffer, not that extent of mem_map.
Signed-off-by: Hugh Dickins <hugh@xxxxxxxxxxx>
--- 2.6.15-mm2/drivers/scsi/sg.c 2006-01-07 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/