Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp95323imm; Tue, 22 May 2018 14:41:00 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqzxY5CBtQbQMxMoAXV1diu4UWYZkuAgIJDTXIe5ocgT/XTotI6YbIBKt1m4xsKdIyoAkPf X-Received: by 2002:a65:4443:: with SMTP id e3-v6mr145316pgq.348.1527025260904; Tue, 22 May 2018 14:41:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527025260; cv=none; d=google.com; s=arc-20160816; b=Fs1YJhzidKcaKu+cckuVVcA+60wAz7jzpjmQfHpjnP9KAf5zS6F/qbGXswlO7AvoIa JKpQJaUhsMwhKdzFZtZ9z6IGFldfp2ZaiEqoO4ut60B3sR4Lc4fDG32GDV391ieGkLcA 0i1Di3Rh1DF60EvBVIe+eOqGTR5mLb1rWNQZQa1+NLqQ7lufIRDfipoZ1m4gYrNJi+ym u6BA5LjBLw2Z+OS4FzN/ahUalmNiUPjfxV9kmR2iNOfwFA55afCRilhkqUpoj+5FZzR2 H6gDAmO4oCf6SB2tD6fNVlHcaZJjvEDNBkZ/v3n5fgRcNU9YBQwChYHlQcUV6DxicnFs VAcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=Hq+ti9YkCGCSBqh7+2yu42MBDsRbfUBXz91Sa7aFwFM=; b=SOArj/khc2xH7eIlYtLUVryi9Z4x07CfpBN9oGQUjzhezvmOf0EPit1NsmjickxU1C iZdpmbsPZOnR/uj1qKU1ZiGR7mgY4Cuqu0CMBgXL2rLHDXfacYfyGW2N7uk/qkAVHLFp gsgd9WfTvd2X/IAX7PntvE3cRy82snQ8cgvYfhfjd87VPG5iPu0TH5QApzi3OfjVDRWn 7NeEqSj7RjNAyZ3VXxGbMj8gczk/cl8GuFoTiX5KWCf7pN1m9mpJg/rksdJd7ovY1ZTD WBkh2W258BaASAhnouREno+RZiUfNt6DuMZlAe87goVfERNRBdN6ozYpCNTT52Jwttjk wHoA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 190-v6si10917529pgi.333.2018.05.22.14.40.46; Tue, 22 May 2018 14:41:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753163AbeEVVjs (ORCPT + 99 others); Tue, 22 May 2018 17:39:48 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:53298 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753015AbeEVVjq (ORCPT ); Tue, 22 May 2018 17:39:46 -0400 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 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. */ _