Re: [uml-devel] [PATCH] arch: um: kernel: skas: mmu: remove pmd_free() and pud_free() for failure processing in init_stub_pte()

2013-11-15 Thread Hugh Dickins
On Wed, 13 Nov 2013, Chen Gang wrote: Unfortunately, p?d_alloc() and p?d_free() are not pair!! If p?d_alloc() succeed, they may be used, so in the next failure, we have to skip them to let exit_mmap() or do_munmap() to process it. According to Documentation/vm/locking, 'mm-page_table_lock'

Re: [uml-devel] [PATCH] arch: um: kernel: skas: mmu: remove pmd_free() and pud_free() for failure processing in init_stub_pte()

2013-11-14 Thread Chen Gang
On 11/14/2013 03:55 PM, Richard Weinberger wrote: Am 14.11.2013 08:33, schrieb Chen Gang: On 11/14/2013 02:48 PM, Chen Gang wrote: From the look of it, if an error did occur in init_stub_pte(), then the special mapping of STUB_CODE and STUB_DATA would not be installed, so this area would

Re: [uml-devel] [PATCH] arch: um: kernel: skas: mmu: remove pmd_free() and pud_free() for failure processing in init_stub_pte()

2013-11-14 Thread Chen Gang
On 11/14/2013 03:33 PM, Chen Gang wrote: On 11/14/2013 02:48 PM, Chen Gang wrote: From the look of it, if an error did occur in init_stub_pte(), then the special mapping of STUB_CODE and STUB_DATA would not be installed, so this area would be invisible to munmap and exit, and with your patch

Re: [uml-devel] [PATCH] arch: um: kernel: skas: mmu: remove pmd_free() and pud_free() for failure processing in init_stub_pte()

2013-11-13 Thread Richard Weinberger
Am 13.11.2013 06:06, schrieb Chen Gang: Unfortunately, p?d_alloc() and p?d_free() are not pair!! If p?d_alloc() succeed, they may be used, so in the next failure, we have to skip them to let exit_mmap() or do_munmap() to process it. According to Documentation/vm/locking, 'mm-page_table_lock'

Re: [uml-devel] [PATCH] arch: um: kernel: skas: mmu: remove pmd_free() and pud_free() for failure processing in init_stub_pte()

2013-11-13 Thread Chen Gang
On 11/14/2013 02:48 PM, Chen Gang wrote: From the look of it, if an error did occur in init_stub_pte(), then the special mapping of STUB_CODE and STUB_DATA would not be installed, so this area would be invisible to munmap and exit, and with your patch then the pages allocated likely to be

Re: [uml-devel] [PATCH] arch: um: kernel: skas: mmu: remove pmd_free() and pud_free() for failure processing in init_stub_pte()

2013-11-13 Thread Richard Weinberger
Am 14.11.2013 08:33, schrieb Chen Gang: On 11/14/2013 02:48 PM, Chen Gang wrote: From the look of it, if an error did occur in init_stub_pte(), then the special mapping of STUB_CODE and STUB_DATA would not be installed, so this area would be invisible to munmap and exit, and with your patch