Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1435872rdb; Wed, 6 Dec 2023 21:04:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IG1aPft5YCN9cjVIRH1OJqNl2Cv2NYurQJ9V+2vIM4+ibSsOSovmD3a7WRP2PWB3aBbbQ4S X-Received: by 2002:a17:902:cec4:b0:1d0:83bc:5649 with SMTP id d4-20020a170902cec400b001d083bc5649mr1857234plg.33.1701925451615; Wed, 06 Dec 2023 21:04:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701925451; cv=none; d=google.com; s=arc-20160816; b=JGgm8dnHAl1hyW4lKDrU1FZ5L7bhWrUygbHIuJunqAHt+tP5axVYzyKur1WWBRdRKZ yscLj3xSZTZhAk6POo2D9qC2C2HFr3PaVzo3TVm9dfbP/mojmLSDZsGkvfT+9qWCHcJw ++Z++T7JtXMjezUo9I4bzG4mc9663iG6NgoRZkywWXBcPOgW9NtdOh5bpkOjYu6Q8TiS JM+4uhzpp6SHEC+Jp1cc3Vf6OMTSTa84BtJq3f1IHylOfqtU9mQWcSZNaECyIj6EpVZZ YHykTgthlr/pCf+YkvZlAmvb3fQFB6LSLblGjX9DOB7ZLlyUIcz5DZtdmdQpwrevI4C6 WKuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature:date; bh=9+VAtdw+VBXAf4egJulQBl5F+jTniBZVDEdNWU+PevM=; fh=U3olsbsyHXNOGeQia20zz3ZLIcngqV0Whm1MBKPG25A=; b=Vshlm7jlCI/n6nfEz6J3JHZ0qWpKhWP2CPTG7S36Sw1hdNAtd9hhoimDnxtnvaR0fN Z8bEQyQ7Z05gveudmsdzlMpDd+BIeW5H2BsnHmiH15uKUbNmFVS/5vuaufnoyVeFjMQX AqXP2YTIlKzaMog9dR4SVJKcylblWw+WDueJinglk5/wbw7sWl2qQmcJgD0cs7ybiFbk rvUZuySEUc7jDSQINVCUIII06klsmur4WibkmiIzzh8VCtlOZOK9cRo2grodOPStf3w+ 2PUTU1infFakfQCdxtPn0ctDPVWG3Ihj9738OrLgcFhoe8A3y8deh1XUj8aToTpFIU35 orBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=jbA7IPBy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id f3-20020a170902ce8300b001d0c1281f07si466652plg.205.2023.12.06.21.04.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 21:04:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=jbA7IPBy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 1B77B807E443; Wed, 6 Dec 2023 21:04:09 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230091AbjLGFDx (ORCPT + 99 others); Thu, 7 Dec 2023 00:03:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229977AbjLGFDw (ORCPT ); Thu, 7 Dec 2023 00:03:52 -0500 Received: from out-189.mta1.migadu.com (out-189.mta1.migadu.com [95.215.58.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C6A1D5C for ; Wed, 6 Dec 2023 21:03:58 -0800 (PST) Date: Thu, 7 Dec 2023 00:03:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1701925436; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=9+VAtdw+VBXAf4egJulQBl5F+jTniBZVDEdNWU+PevM=; b=jbA7IPByemD/cql2BiX6j7iBa9QLHJMtHJVuGstf9MSlWE9JOEjKXyhrh7iLfZfKFgS3LZ mfLfdxAOUw7H5nxtn4jTY/0cJJ93iah32/r7tTObyMpuDY3DgEIj4tv9duHXd5joiAaGUZ /R990PcU4rYx83ds2Q+QUu0pq3QZQhI= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Dave Chinner Cc: Al Viro , linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, linux-cachefs@redhat.com, dhowells@redhat.com, gfs2@lists.linux.dev, dm-devel@lists.linux.dev, linux-security-module@vger.kernel.org, selinux@vger.kernel.org, linux-kernel@vger.kernel.org, Suren Baghdasaryan Subject: Re: [PATCH 03/11] vfs: Use dlock list for superblock's inode list Message-ID: <20231207050351.gg74kg6jumik36gs@moria.home.lan> References: <20231206060629.2827226-1-david@fromorbit.com> <20231206060629.2827226-4-david@fromorbit.com> <20231207024024.GU1674809@ZenIV> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 06 Dec 2023 21:04:09 -0800 (PST) On Thu, Dec 07, 2023 at 03:59:10PM +1100, Dave Chinner wrote: > On Thu, Dec 07, 2023 at 02:40:24AM +0000, Al Viro wrote: > > On Wed, Dec 06, 2023 at 05:05:32PM +1100, Dave Chinner wrote: > > > > > @@ -303,6 +303,7 @@ static void destroy_unused_super(struct super_block *s) > > > super_unlock_excl(s); > > > list_lru_destroy(&s->s_dentry_lru); > > > list_lru_destroy(&s->s_inode_lru); > > > + free_dlock_list_heads(&s->s_inodes); > > > security_sb_free(s); > > > put_user_ns(s->s_user_ns); > > > kfree(s->s_subtype); > > > > Umm... Who's going to do that on normal umount? > > Huh. So neither KASAN nor kmemleak has told me that s->s-inodes was > being leaked. I'm guessing a rebase sometime in the past silently > dropped a critical hunk from deactivate_locked_super() in the bit > bucket, but as nothing since whenever that happened has failed or > flagged a memory leak I didn't notice. > > Such great tools we have...... kmemleak has always seemed flakey to me (as one would expect, it's difficult code to test). If we can ever get memory allocation profiling merged - it won't be a direct replacement but it'll be more reliable.