summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authormalc <av1474@comtv.ru>2014-01-28 05:06:53 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-01-28 09:02:39 +0400
commitadd688fbd32158440dbe62c07269a39ed969c059 (patch)
treec4bf48c0c7cf65982c11b2cf1c949f52a3750148 /arch
parentfb5bb60cd004a00c1d11db680a37942ecdedb1c5 (diff)
downloadlinux-add688fbd32158440dbe62c07269a39ed969c059.tar.xz
Revert "mm/vmalloc: interchage the implementation of vmalloc_to_{pfn,page}"
Revert commit ece86e222db4, which was intended as a small performance improvement. Despite the claim that the patch doesn't introduce any functional changes in fact it does. The "no page" path behaves different now. Originally, vmalloc_to_page might return NULL under some conditions, with new implementation it returns pfn_to_page(0) which is not the same as NULL. Simple test shows the difference. test.c #include <linux/kernel.h> #include <linux/module.h> #include <linux/vmalloc.h> #include <linux/mm.h> int __init myi(void) { struct page *p; void *v; v = vmalloc(PAGE_SIZE); /* trigger the "no page" path in vmalloc_to_page*/ vfree(v); p = vmalloc_to_page(v); pr_err("expected val = NULL, returned val = %p", p); return -EBUSY; } void __exit mye(void) { } module_init(myi) module_exit(mye) Before interchange: expected val = NULL, returned val = (null) After interchange: expected val = NULL, returned val = c7ebe000 Signed-off-by: Vladimir Murzin <murzin.v@gmail.com> Cc: Jianyu Zhan <nasa4836@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions