From patchwork Tue May 22 21:39:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 10419655 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D34F76016C for ; Tue, 22 May 2018 21:39:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C1BF429013 for ; Tue, 22 May 2018 21:39:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B560029017; Tue, 22 May 2018 21:39:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E8BA829013 for ; Tue, 22 May 2018 21:39:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2986E6B026A; Tue, 22 May 2018 17:39:48 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 21FD06B026B; Tue, 22 May 2018 17:39:48 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 13BA16B026C; Tue, 22 May 2018 17:39:48 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pl0-f69.google.com (mail-pl0-f69.google.com [209.85.160.69]) by kanga.kvack.org (Postfix) with ESMTP id C2F416B026A for ; Tue, 22 May 2018 17:39:47 -0400 (EDT) Received: by mail-pl0-f69.google.com with SMTP id a6-v6so12799404pll.22 for ; Tue, 22 May 2018 14:39:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:date:from:to :cc:subject:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=Hq+ti9YkCGCSBqh7+2yu42MBDsRbfUBXz91Sa7aFwFM=; b=D5/yQqqEIW43BB3vERVM/7wrbKa+y75KYlL7tm+a5LgITgKYDAVD43QPG9vq9O9CtJ Q6FNKMIFykkCSIf1m5cuzkD7eW6yUZcWbH75etnScCzBgEN5svbOeWBXG5K13r2uEo2Z qL79KvH1jPyxBSaTmXK/Vdo86nqs+Lvd9zG+2r97Ih/FBVKJigcUS4D9Atq1M4vfHE2A zOr4N8BnN6rs2s+gnQ2OhYNtK+BPExrV5M9KExWr/nPc0aqQrbmCDdfkHO6YvVT1ha9h UwJsVbrFpVNxJEzkhiN0L2NDsMCNIeTz43tQrUGBjuTlrbxeIUTFUTkmx/DxcXOucHmB ccxw== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of akpm@linux-foundation.org designates 140.211.169.12 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org X-Gm-Message-State: ALKqPweWrDlew5Kb9AXOubpT/CwTQGrzH+SGJPhlh7ninPfqHt58XpVf ZJV8WZlh1Sup/xUhPURSXYb7ZUmUcIGq2CBGkcla0USY7hWsCL3KL6jKZ9duFET2xo87Y1vvRbq neK5Tu5YpLJun+Z9oUAAEI805tO8w4usEeJWaDAdELyLExaX9SUQUNLUBkMoflFWqUQ== X-Received: by 2002:a65:5b4d:: with SMTP id y13-v6mr149816pgr.152.1527025187448; Tue, 22 May 2018 14:39:47 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpZObGfSqG0ehUs7K9MrwWlD3KW2Rd0Rx44PNBgwcaKrRVXBMhdifKiDWsKyVwJhZeWKPVV X-Received: by 2002:a65:5b4d:: with SMTP id y13-v6mr149796pgr.152.1527025186774; Tue, 22 May 2018 14:39:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527025186; cv=none; d=google.com; s=arc-20160816; b=cmIFXUm5GKfd3HOEkt+KWIgr3BIQsHHZvuIw8+QM8xD8iMzR30E6c9VXAMtSMXz9yy XJFlwzFeW19KVzthuy7+OD7OysgteGPUVYDJQIXlU5+skDrf6RbCkT+1ObPidanK0PiY 1TcNDgXxppiMsz4yVzONJaE8Phx96k9ygBy5zCJAFs+nV5uqVnXPzjsYstZh3vzhMa+o nXER2cXl27ItIh/M+OawtkB5g0sXSSk06ElRhlpFsJNcoG4BChG5Y8qsbBrhAuTQNxtI CA0dx/p5zBwIbp+HCmWvRan8Jm/ByaXSbImFV+/596nLfHq3TxqnBKVzRl4/4r+0Bytr Npaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:arc-authentication-results; bh=Hq+ti9YkCGCSBqh7+2yu42MBDsRbfUBXz91Sa7aFwFM=; b=i4koAxfgU8B8PtYp01BzyrNzURJjtSg+q3VbyjC1W91l34R2d62tA3l1sVK1ay9dXA GI2JVEDH9OdyB/vnq4FLcD1KOYkrVNYBiUdmxoc4Hy+Bxqu8dTYLKFPWgnA0xpTjCqEQ Ch+GbR5jjLI0ed252eG+PUv0mbE1afaFQTsKilsfDaZXihJY7LKd8iIbVoHsPlV8IPLi 3aIjL+wnDoyK/RvkAQkn+07MFk7SmXQtRbPcLVuMvkvdZLS8CmxkEusqnhB5ks6mVM/T /mqrtZCXltnuxMjpuwvwKpSJd1Zsm8Ye5JBJiMh0l9EIl/XuuhrRwrvaSCQrKVP3+/MM 0H0A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of akpm@linux-foundation.org designates 140.211.169.12 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org. [140.211.169.12]) by mx.google.com with ESMTPS id a3-v6si16588527pff.43.2018.05.22.14.39.46 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 May 2018 14:39:46 -0700 (PDT) Received-SPF: pass (google.com: domain of akpm@linux-foundation.org designates 140.211.169.12 as permitted sender) client-ip=140.211.169.12; Authentication-Results: mx.google.com; spf=pass (google.com: domain of akpm@linux-foundation.org designates 140.211.169.12 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org Received: from akpm3.svl.corp.google.com (unknown [104.133.9.71]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 10D374A5; Tue, 22 May 2018 21:39:46 +0000 (UTC) Date: Tue, 22 May 2018 14:39:45 -0700 From: Andrew Morton To: kbuild test robot Cc: Shakeel Butt , kbuild-all@01.org, Michal Hocko , Greg Thelen , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Johannes Weiner , Vladimir Davydov , Tejun Heo , Linux MM , cgroups@vger.kernel.org, LKML Subject: Re: [PATCH] mm: fix race between kmem_cache destroy, create and deactivate Message-Id: <20180522143945.f8a925d15d34615c87fb9c50@linux-foundation.org> In-Reply-To: <201805230558.T1nJMRRH%fengguang.wu@intel.com> References: <20180521174116.171846-1-shakeelb@google.com> <201805230558.T1nJMRRH%fengguang.wu@intel.com> X-Mailer: Sylpheed 3.6.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP On Wed, 23 May 2018 05:14:36 +0800 kbuild test robot wrote: > Thank you for the patch! Yet something to improve: > > [auto build test ERROR on mmotm/master] > [also build test ERROR on v4.17-rc6 next-20180517] > [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] > > url: https://github.com/0day-ci/linux/commits/Shakeel-Butt/mm-fix-race-between-kmem_cache-destroy-create-and-deactivate/20180523-041715 > base: git://git.cmpxchg.org/linux-mmotm.git master > config: i386-randconfig-x009-201820 (attached as .config) > compiler: gcc-7 (Debian 7.3.0-16) 7.3.0 > reproduce: > # save the attached .config to linux build tree > make ARCH=i386 > > All errors (new ones prefixed by >>): > > mm/slub.c: In function '__kmem_cache_alias': > >> mm/slub.c:4251:4: error: implicit declaration of function 'kmem_cache_put_locked'; did you mean 'kmem_cache_init_late'? [-Werror=implicit-function-declaration] > kmem_cache_put_locked(s); > ^~~~~~~~~~~~~~~~~~~~~ > kmem_cache_init_late > cc1: some warnings being treated as errors Thanks. --- a/mm/slab.h~mm-fix-race-between-kmem_cache-destroy-create-and-deactivate-v2-fix +++ a/mm/slab.h @@ -204,6 +204,8 @@ ssize_t slabinfo_write(struct file *file void __kmem_cache_free_bulk(struct kmem_cache *, size_t, void **); int __kmem_cache_alloc_bulk(struct kmem_cache *, gfp_t, size_t, void **); +extern void kmem_cache_put_locked(struct kmem_cache *s); + #if defined(CONFIG_MEMCG) && !defined(CONFIG_SLOB) /* List of all root caches. */ @@ -296,7 +298,6 @@ extern void slab_init_memcg_params(struc extern void memcg_link_cache(struct kmem_cache *s); extern void slab_deactivate_memcg_cache_rcu_sched(struct kmem_cache *s, void (*deact_fn)(struct kmem_cache *)); -extern void kmem_cache_put_locked(struct kmem_cache *s); #else /* CONFIG_MEMCG && !CONFIG_SLOB */ /* If !memcg, all caches are root. */