login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
August
»
18
Re: [PATCH] mm: code improvement of check_stack_guard_page
view
thread
Previous message: [thread] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From: KAMEZAWA Hiroyuki
Subject:
Re: [PATCH] mm: code improvement of check_stack_guard_page
Date: Tuesday, August 17, 2010 - 7:02 pm
On Sun, 15 Aug 2010 13:07:56 +0800 jovi zhang <bookjovi@gmail.com> wrote:
quoted text
> little code improvement of check_stack_guard_page function. > this commit is on top of commit "mm: keep a guard page below a grow-down > stack segment" of linus. >
Hmm. difference in binary code finally ? -Kame
quoted text
> diff --git a/mm/memory.c b/mm/memory.c > index 9b3b73f..643b112 100644 > --- a/mm/memory.c > +++ b/mm/memory.c > @@ -2768,13 +2768,15 @@ out_release: > */ > static inline int check_stack_guard_page(struct vm_area_struct *vma, > unsigned long address) > { > - address &= PAGE_MASK; > - if ((vma->vm_flags & VM_GROWSDOWN) && address == vma->vm_start) { > - address -= PAGE_SIZE; > - if (find_vma(vma->vm_mm, address) != vma) > - return -ENOMEM; > - > - expand_stack(vma, address); > + if (vma->vm_flags & VM_GROWSDOWN) { > + address &= PAGE_MASK; > + if(address == vma->vm_start) { > + address -= PAGE_SIZE; > + if (unlikely(find_vma(vma->vm_mm, address) != vma)) > + return -ENOMEM; > + > + expand_stack(vma, address); > + } > } > return 0; > }
--
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [thread] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
Re: [PATCH] mm: code improvement of check_stack_guard_page
, KAMEZAWA Hiroyuki
, (Tue Aug 17, 7:02 pm)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
David Lang
Re: [patch] MTD: fix DOC2000/2001/2001PLUS build error
Steven Rostedt
Re: [PATCH] input: Fix interrupt enable in i8042_ctr when enabling interrupt fails
Linus Torvalds
Re: [patch] epoll use a single inode ...
David Miller
Re: tg3: unable to handle null pointer dereference
Frank Seidel
Re: [RFC 13/13] Char: nozomi, cleanup read and write
git-commits-head
:
Linux Kernel Mailing List
amba: struct device - replace bus_id with dev_name(), dev_set_name()
Linux Kernel Mailing List
cpumask: make irq_set_affinity() take a const struct cpumask
Linux Kernel Mailing List
cgroups: fix probable race with put_css_set[_taskexit] and find_css_set
Linux Kernel Mailing List
[libata] Export ata_pio_queue_task() so that it can be used from sata_mv.
Linux Kernel Mailing List
[ARM] 5209/1: metronomefb: changes to use platform framebuffer
git
:
Junio C Hamano
Re: mingw, windows, crlf/lf, and git
Junio C Hamano
Re: [PATCH 1/2] Teach git-describe to display distances from tags.
Daniel Barkalow
Re: git and mtime
Linus Torvalds
Re: [PATCH] Teach 'git pull' the '--rebase' option
Alex Riesen
Re: Easy shell question: how to make a script killing all his childs when killed?
freebsd-current
:
Mark Linimon
Why the FreeBSD license will not be changing
Michael Moll
Re: Unable to boot on ECS K7S5A
FreeBSD Tinderbox
[head tinderbox] failure on ia64/ia64
Jille Timmermans
Re: svn commit: r185482 - head/sys/dev/ath/ath_rate/sample
Hayer, Sukhjinder
8_CURRENT boot problem
linux-netdev
:
Timo Teräs
ip xfrm policy semantics
Andi Kleen
Re: [ANNOUNCE]: First release of nftables
John P Poet
Realtek 8111C transmit timed out
Jeff Garzik
Re: [PATCH] fix netxen_pci_tbl[] breakage
Jesper Dangaard Brouer
[PATCH] iputils: arping fails to set correct broadcast address
Colocation donated by:
Syndicate