From: Andrew Morton <akpm@digeo.com>
To: davidm@hpl.hp.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: [patch] make mprotect() work again
Date: Wed, 25 Sep 2002 16:19:08 -0700 [thread overview]
Message-ID: <3D92446C.1F55CC55@digeo.com> (raw)
In-Reply-To: 200209252300.g8PN0FGO019455@napali.hpl.hp.com
David Mosberger wrote:
>
> This patch:
>
> ChangeSet@1.536.31.4, 2002-09-17 20:35:47-07:00, akpm@digeo.com
> [PATCH] consolidate the VMA splitting code
>
> broke mprotect(). The patch below makes it work again.
>
Thanks. Yet another victim of the return-from-the-middle-of-a-function
disease.
I'll send this:
--- 2.5.38/mm/mprotect.c~mprotect-fix Wed Sep 25 16:16:14 2002
+++ 2.5.38-akpm/mm/mprotect.c Wed Sep 25 16:16:35 2002
@@ -187,7 +187,7 @@ mprotect_fixup(struct vm_area_struct *vm
* Try to merge with the previous vma.
*/
if (mprotect_attempt_merge(vma, *pprev, end, newflags))
- return 0;
+ goto success;
} else {
error = split_vma(mm, vma, start, 1);
if (error)
@@ -209,7 +209,7 @@ mprotect_fixup(struct vm_area_struct *vm
vma->vm_flags = newflags;
vma->vm_page_prot = newprot;
spin_unlock(&mm->page_table_lock);
-
+success:
change_protection(vma, start, end, newprot);
return 0;
.
prev parent reply other threads:[~2002-09-25 23:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-25 23:00 [patch] make mprotect() work again David Mosberger
2002-09-25 23:19 ` Andrew Morton [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3D92446C.1F55CC55@digeo.com \
--to=akpm@digeo.com \
--cc=davidm@hpl.hp.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).