From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5EC80C4320A for ; Wed, 4 Aug 2021 00:06:38 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C32A06103C for ; Wed, 4 Aug 2021 00:06:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C32A06103C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 61E5E8D0013; Tue, 3 Aug 2021 20:06:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5CDD88D000F; Tue, 3 Aug 2021 20:06:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4BD1B8D0013; Tue, 3 Aug 2021 20:06:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0199.hostedemail.com [216.40.44.199]) by kanga.kvack.org (Postfix) with ESMTP id 32AEB8D000F for ; Tue, 3 Aug 2021 20:06:37 -0400 (EDT) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id DC27C1810E435 for ; Wed, 4 Aug 2021 00:06:36 +0000 (UTC) X-FDA: 78435456792.27.3AE2075 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf28.hostedemail.com (Postfix) with ESMTP id 8C30190091B0 for ; Wed, 4 Aug 2021 00:06:36 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 9C73760F94; Wed, 4 Aug 2021 00:06:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1628035595; bh=nVNmt50rwxw28VU0n8+zb9R0F0ql1Wr76VxGYaOa3ok=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=XDwuG2ltUA2z/VNEWrGRI7+z6ZrLSu6Ef2Emk9g+6Gk5BRRTtNjb+3fcKo2wxwKeL gzZ3BbO8yXdib9HMw6FybCtXOepHMlnPrzwbuZNQoQ5gNzfOWCrYDg6htemXiVZJyQ 2WvUmKgXOAs4FqwbgCvfHdWoxLv1+NBZ/886Y8P0= Date: Tue, 3 Aug 2021 17:06:33 -0700 From: Andrew Morton To: kernel test robot Cc: Nicholas Piggin , kbuild-all@lists.01.org, Linux Memory Management List , Mark Brown Subject: Re: [linux-next:master 5063/5087] kernel/user.c:141:28: error: 'struct user_struct' has no member named 'epoll_watches' Message-Id: <20210803170633.23f7e83d32a0f44b51f71828@linux-foundation.org> In-Reply-To: <202108040605.i3mJiObA-lkp@intel.com> References: <202108040605.i3mJiObA-lkp@intel.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=XDwuG2lt; dmarc=none; spf=pass (imf28.hostedemail.com: domain of akpm@linux-foundation.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org X-Stat-Signature: z983kpwdbumt6jqwngw3guni36485eqq X-Rspamd-Queue-Id: 8C30190091B0 X-Rspamd-Server: rspam01 X-HE-Tag: 1628035596-547534 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: On Wed, 4 Aug 2021 06:55:13 +0800 kernel test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master > head: c3f7b3be172b39d90b4c5cb87a2231cc6c2c8dcf > commit: e75b894778116889e88995d0e5029c2e9f6d847c [5063/5087] fs/epoll: use a per-cpu counter for user's watches count > > ... > > kernel/user.c: In function 'free_user': > >> kernel/user.c:141:28: error: 'struct user_struct' has no member named 'epoll_watches' > 141 | percpu_counter_destroy(&up->epoll_watches); > | ^~ not pretty, but... --- a/kernel/user.c~fs-epoll-use-a-per-cpu-counter-for-users-watches-count-fix +++ a/kernel/user.c @@ -138,7 +138,9 @@ static void free_user(struct user_struct { uid_hash_remove(up); spin_unlock_irqrestore(&uidhash_lock, flags); +#ifdef CONFIG_EPOLL percpu_counter_destroy(&up->epoll_watches); +#endif kmem_cache_free(uid_cachep, up); } @@ -186,10 +188,12 @@ struct user_struct *alloc_uid(kuid_t uid new->uid = uid; refcount_set(&new->__count, 1); +#ifdef CONFIG_EPOLL if (percpu_counter_init(&new->epoll_watches, 0, GFP_KERNEL)) { kmem_cache_free(uid_cachep, new); return NULL; } +#endif ratelimit_state_init(&new->ratelimit, HZ, 100); ratelimit_set_flags(&new->ratelimit, RATELIMIT_MSG_ON_RELEASE); @@ -200,7 +204,9 @@ struct user_struct *alloc_uid(kuid_t uid spin_lock_irq(&uidhash_lock); up = uid_hash_find(uid, hashent); if (up) { +#ifdef CONFIG_EPOLL percpu_counter_destroy(&new->epoll_watches); +#endif kmem_cache_free(uid_cachep, new); } else { uid_hash_insert(new, hashent); @@ -222,8 +228,10 @@ static int __init uid_cache_init(void) for(n = 0; n < UIDHASH_SZ; ++n) INIT_HLIST_HEAD(uidhash_table + n); +#ifdef CONFIG_EPOLL if (percpu_counter_init(&root_user.epoll_watches, 0, GFP_KERNEL)) - panic("percpu cpunter alloc failed"); + panic("percpu counter alloc failed"); +#endif /* Insert the root user immediately (init already runs as root) */ spin_lock_irq(&uidhash_lock); _