From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw0-f198.google.com (mail-yw0-f198.google.com [209.85.161.198]) by kanga.kvack.org (Postfix) with ESMTP id 5627C6B0012 for ; Wed, 28 Mar 2018 09:31:39 -0400 (EDT) Received: by mail-yw0-f198.google.com with SMTP id v205so1020704ywa.12 for ; Wed, 28 Mar 2018 06:31:39 -0700 (PDT) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com. [148.163.156.1]) by mx.google.com with ESMTPS id r17si4071296qtb.373.2018.03.28.06.31.37 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Mar 2018 06:31:37 -0700 (PDT) Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w2SDUucZ061653 for ; Wed, 28 Mar 2018 09:31:36 -0400 Received: from e06smtp10.uk.ibm.com (e06smtp10.uk.ibm.com [195.75.94.106]) by mx0a-001b2d01.pphosted.com with ESMTP id 2h0bpe955s-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Wed, 28 Mar 2018 09:31:22 -0400 Received: from localhost by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 28 Mar 2018 14:30:19 +0100 Subject: Re: [mm] b1f0502d04: INFO:trying_to_register_non-static_key References: <20180317075119.u6yuem2bhxvggbz3@inn> <792c0f75-7e7f-cd81-44ae-4205f6e4affc@linux.vnet.ibm.com> From: Laurent Dufour Date: Wed, 28 Mar 2018 15:30:08 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Message-Id: Sender: owner-linux-mm@kvack.org List-ID: To: David Rientjes Cc: kernel test robot , paulmck@linux.vnet.ibm.com, peterz@infradead.org, akpm@linux-foundation.org, kirill@shutemov.name, ak@linux.intel.com, mhocko@kernel.org, dave@stgolabs.net, jack@suse.cz, Matthew Wilcox , benh@kernel.crashing.org, mpe@ellerman.id.au, paulus@samba.org, Thomas Gleixner , Ingo Molnar , hpa@zytor.com, Will Deacon , Sergey Senozhatsky , Andrea Arcangeli , Alexei Starovoitov , kemi.wang@intel.com, sergey.senozhatsky.work@gmail.com, Daniel Jordan , linux-kernel@vger.kernel.org, linux-mm@kvack.org, haren@linux.vnet.ibm.com, khandual@linux.vnet.ibm.com, npiggin@gmail.com, bsingharora@gmail.com, Tim Chen , linuxppc-dev@lists.ozlabs.org, x86@kernel.org, lkp@01.org On 26/03/2018 00:10, David Rientjes wrote: > On Wed, 21 Mar 2018, Laurent Dufour wrote: > >> I found the root cause of this lockdep warning. >> >> In mmap_region(), unmap_region() may be called while vma_link() has not been >> called. This happens during the error path if call_mmap() failed. >> >> The only to fix that particular case is to call >> seqcount_init(&vma->vm_sequence) when initializing the vma in mmap_region(). >> > > Ack, although that would require a fixup to dup_mmap() as well. You're right, I'll fix that too. Thanks a lot. Laurent.