Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752136AbbHTBcn (ORCPT ); Wed, 19 Aug 2015 21:32:43 -0400 Received: from col004-omc1s7.hotmail.com ([65.55.34.17]:50751 "EHLO COL004-OMC1S7.hotmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751749AbbHTBcm (ORCPT ); Wed, 19 Aug 2015 21:32:42 -0400 X-Greylist: delayed 372 seconds by postgrey-1.27 at vger.kernel.org; Wed, 19 Aug 2015 21:32:42 EDT X-TMN: [LkMIviW+j95JVXN+hOH5ytVZLC0/V3EX] X-Originating-Email: [xili_gchen_5257@hotmail.com] Message-ID: From: gchen gchen To: Andrew Morton CC: kernel mailing list , "Kirill A. Shutemov" , "riel@redhat.com" , Michal Hocko , "sasha.levin@oracle.com" , Linux Memory Subject: Re: [PATCH] mm: mmap: Simplify the failure return working flow Date: Thu, 20 Aug 2015 09:27:42 +0800 Importance: Normal In-Reply-To: <55D52CDE.8060700@hotmail.com> References: <55D5275D.7020406@hotmail.com> ,<55D52CDE.8060700@hotmail.com> Content-Type: text/plain; charset="gb2312" MIME-Version: 1.0 X-OriginalArrivalTime: 20 Aug 2015 01:27:42.0307 (UTC) FILETIME=[68BA1330:01D0DAE7] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id t7K1Wndc024723 Content-Length: 2834 Lines: 87 On Tue, 18 Aug 2015 15:57:08 -0700 akpm@linux-foundation.org wrote: > > On Wed, 19 Aug 2015 06:27:58 +0800 Chen Gang > wrote: > >> From: Chen Gang > > As sent, this patch is From:you@hotmail and Signed-off-by:you@gmail. > > This is peculiar. I'm assuming that it should have been From:you@gmail and > I have made that change to my copy of the patch. > > You can do this yourself by putting an explicit From: line at the start > of the changelog. > Yes, it is really peculiar, the reason is gmail is not stable in China. I have to send mail in my hotmail address. But I still want to use my gmail as Signed-off-by, since I have already used it, and also its name is a little formal than my hotmail. Welcome any ideas, suggestions and completions for it (e.g. if it is necessary to let send mail and Signed-off-by mail be the same, I shall try). [...] > So, > > --- a/mm/mmap.c~mm-mmap-simplify-the-failure-return-working-flow-fix > +++ a/mm/mmap.c > @@ -2952,7 +2952,7 @@ struct vm_area_struct *copy_vma(struct v > } else { > new_vma = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL); > if (!new_vma) > - return NULL; > + goto out; > *new_vma = *vma; > new_vma->vm_start = addr; > new_vma->vm_end = addr + len; > @@ -2971,10 +2971,11 @@ struct vm_area_struct *copy_vma(struct v > } > return new_vma; > > - out_free_mempol: > +out_free_mempol: > mpol_put(vma_policy(new_vma)); > - out_free_vma: > +out_free_vma: > kmem_cache_free(vm_area_cachep, new_vma); > +out: > return NULL; > } > It is OK to me, thanks. During these days (2-4 months), I shall try to make some patches for Linux mm: - I am learning Linux kernel mmu, so I can re-use part of code to user mode (add softmmu to qemu linux user in my working time). Then I can try some mm patches when I am reading related code. - At present, cross-building various archs with allmodconfig looks OK (have no many issues), so for me, I can stop and start another parts (e.g. mmu, loongson machine of mips arch, ...). Welcome any ideas, suggestions and completions for it: - Assume I am not quite familiar with mmu -- in honest, I feel I am really not. - Is it possible to build the related 'softmmu' as a module which can be used by both kernel mode and user mode (if really it is, I shall try to perform it -- I can do it in my working time). - ... Thanks. -- Chen Gang Open, share, and attitude like air, water, and life which God blessed ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?