2002-10-19 22:11:15

by Marcus Alanen

[permalink] [raw]
Subject: [patch] setup_arg_pages. ARCH_STACK_GROWSUP ??

As far as I can see, setup_arg_pages code is hosed for the
ARCH_STACK_GROWSUP case, completely wrong types... Does any arch even
use this?

Marcus

diff -Naurd --exclude-from=/home/maalanen/linux/base/diff_exclude linus-2.5.44/fs/exec.c msa-2.5.44/fs/exec.c
--- linus-2.5.44/fs/exec.c Wed Oct 16 16:31:15 2002
+++ msa-2.5.44/fs/exec.c Sat Oct 19 22:03:11 2002
@@ -354,11 +354,11 @@
memmove(to, to + offset, PAGE_SIZE - offset);
from = kmap(bprm->page[j]);
memcpy(to + PAGE_SIZE - offset, from, offset);
- kunmap(bprm[j - 1]);
+ kunmap(bprm->page[j - 1]);
to = from;
}
memmove(to, to + offset, PAGE_SIZE - offset);
- kunmap(bprm[j - 1]);
+ kunmap(bprm->page[j - 1]);

/* Adjust bprm->p to point to the end of the strings. */
bprm->p = PAGE_SIZE * i - offset;


2002-10-20 01:32:18

by Matthew Wilcox

[permalink] [raw]
Subject: Re: [patch] setup_arg_pages. ARCH_STACK_GROWSUP ??


> As far as I can see, setup_arg_pages code is hosed for the
> ARCH_STACK_GROWSUP case, completely wrong types... Does any arch even
> use this?

Yes, but kunmap is a NOP on that architecture, so nobody noticed. Patch
looks good though.

--
Revolutions do not require corporate support.