]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] setup_arg_pages. ARCH_STACK_GROWSUP
authorRusty Russell <rusty@rustcorp.com.au>
Thu, 5 Dec 2002 13:56:12 +0000 (05:56 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Thu, 5 Dec 2002 13:56:12 +0000 (05:56 -0800)
From:  Marcus Alanen <maalanen@ra.abo.fi>

  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?

fs/exec.c

index 28ff9cbfe0f9472e54f2189f026dee0d0fb75c08..4c0937c43144364b89ceb5448cb8f2402f41c8b2 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -358,11 +358,11 @@ int setup_arg_pages(struct linux_binprm *bprm)
                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;