This should be accompanied by addr2 = __START_KERNEL_map + __pa(address); /* Make sure the kernel mappings stay executable */ prot2 = pte_pgprot(pte_mkexec(pfn_pte(0, prot))); - err = __change_page_attr(addr2, pfn, prot2, + (void)__change_page_attr(addr2, pfn, prot2, kref_prot(addr2)); } } as otherwise it is non-obvious why there's no check of err (which so far really was missing). The reason this must be tolerated here is free_init_pages()/ free_initmem() removing the translation for the affected kernel image pages altogether. JanMatches what i386 does and makes more sense. Signed-off-by: Andi Kleen <ak@suse.de> --- arch/x86_64/mm/pageattr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) Index: linux/arch/x86_64/mm/pageattr.c =================================================================== --- linux.orig/arch/x86_64/mm/pageattr.c +++ linux/arch/x86_64/mm/pageattr.c @@ -151,7 +151,9 @@ __change_page_attr(unsigned long address pgprot_t ref_prot2; kpte = lookup_address(address); - if (!kpte) return 0; + if (!kpte) + return -EINVAL; + kpte_page = virt_to_page(((unsigned long)kpte) & PAGE_MASK); BUG_ON(PageCompound(kpte_page)); BUG_ON(PageLRU(kpte_page)); _______________________________________________ patches mailing list patches@x86-64.org https://www.x86-64.org/mailman/listinfo/patches -
| Natalie Protasevich | [BUG] New Kernel Bugs |
| david | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
git: | |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Miller | [GIT]: Networking |
| Patrick McHardy | [NET_SCHED 00/04]: External SFQ classifiers/flow classifier |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
