Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp252347imn; Fri, 29 Jul 2022 06:00:19 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vCOqdOoYEIGMK1251rytT+U3Grq/RhkrEtsL17RvnP7kQWRzwPpP+kDxKBNubogseCP0co X-Received: by 2002:a17:907:6288:b0:72f:90ba:f0b2 with SMTP id nd8-20020a170907628800b0072f90baf0b2mr2719979ejc.696.1659099619239; Fri, 29 Jul 2022 06:00:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659099619; cv=none; d=google.com; s=arc-20160816; b=uU+XKzjycHnl433MnppouxcGaAqAGHvWrsawKG8T3BlKASLG+lFg8Ua16NSbcDESS1 j3lDRjL1kUzg4mCSPxa3f2g43LotY2Ma5roN3xPAJqPY11UzhOhj6W8fVuzViM9157Uq iQriQWvkd5nBTeVP15lEtLPNzzslEPOMPiR6c2TjRIQ9NGynwd9M8LpdeCDTEeBbfKDB VKxYb7WT4rF6q4eh+d6pImGOJ/WERvjbl9QCIaETXl3uWF1jMYLjaGDk3shtZpHGv7wY eOLdzxIKDxSBXOO2WIu4EpVjFCyrm/LKI3WK+ixJeZdu9nFc08je4eb60KLfs1JHPU+f aJEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=UscPiVc3W69u2SDEZgLhh627QT22j/EkeFjDm8ewhDU=; b=J6ejWOndFAM59Eua2zIdnghipx4OKcecOCJAFJKQ/JoHf2/dmCPpWBnTKwngMuKmW1 q/PibY86rDAI/yCsKt6k2jBqRX+Z1au+5CfX9/puCjuGepg40w04E3ZkXXeu9B6Cbm6k bUMYUix3GHflhTGGVwYgJj+omlGA24+0dUFI/9oE3KhGpbAwJOEWZwIgQ+VPZ0eqU3Ub JmLwF6MfjGAawSxFlIT3bIzDYcjbb1UQsLqamezhaJvN4mWOn65K7MknguxPEEw0ZSAA U++UO7E+YyTS7KoMNpgTmUhhc5icWJWwXomEMMGjnZPHRw6Wmb79z8Po695p0IxFlfuS 97IQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=nJrpxtj3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id wj16-20020a170907051000b0070d5a5343a3si2835337ejb.353.2022.07.29.05.59.53; Fri, 29 Jul 2022 06:00:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=nJrpxtj3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235982AbiG2MbR (ORCPT + 99 others); Fri, 29 Jul 2022 08:31:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235074AbiG2MbQ (ORCPT ); Fri, 29 Jul 2022 08:31:16 -0400 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CD6C67586 for ; Fri, 29 Jul 2022 05:31:15 -0700 (PDT) Received: by mail-lf1-x131.google.com with SMTP id b16so7101334lfb.7 for ; Fri, 29 Jul 2022 05:31:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=UscPiVc3W69u2SDEZgLhh627QT22j/EkeFjDm8ewhDU=; b=nJrpxtj3/Yr1byjkae9e+eAEwtAZS6cQLSq9Wf/FbOweTm1lCQVUsPbRKq3KsquHix Ahx76WP2GWkQOvWSzNFy/ojyGd9Wrx02NkjPklNTCGLCJEyvOFX2lCKqmtSGsrSciIga juEvUdPxt4sxwKHufQCBxHAQGnMZw0p0eyn1K88qjYMCqpIC8Hj5RFCIHsOW7O6qvkuU 6U2SdnxZg83UIY3mAlDL62txLD3y11abWwFFIGB9Klz0ZvA0NHYkD7Lmo1AXFwWl4L10 LCF2cCFW4VSrlv8DHIP2JK3k43qO7RHanKnUtmINBDajIStTnQ7okAWfcVh35ThcWcQl Hrbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UscPiVc3W69u2SDEZgLhh627QT22j/EkeFjDm8ewhDU=; b=6Uf2jmDBMWY1SsVCANAUaT2OubminXZR2nFim+QK+9fJjExMDGqE25ZlxgMEe+5UYl Gmry/fmFLz/8+mfsw8e/UWPM0Ib490Uio0RQJIzMnO54CLMU+Nv1KtMyVXdsbwT4wKNL AbAS+VJqTcD7g3zS6dBCX5Wv9Sr2B7xL4ZajmNOanzOxk74PMaTHOGubWVG9nXkjNRbh /8S0WnTL34LES3fq4CIPXZoC8Xi/2qL0nfSsqg8f9cV43uCGh0ibrXLwA+TlBVhNEf1d LEhrV6NJ6GV5ChvAM624alEp7Kvy5WT42eWZIhoPO24puL/r54GhE/AWT5HYEMiJOpFp zQFA== X-Gm-Message-State: AJIora/LpwXk8fGauf5WXyNOppQhWfqIflp+jMRFvN0amkU4NXpxAN+G wurui4wpeZJbaCjrirRQPA6IW7H5wqoaNTdhVzfLUw== X-Received: by 2002:a05:6512:1093:b0:48a:7c08:8d29 with SMTP id j19-20020a056512109300b0048a7c088d29mr1161026lfg.540.1659097873241; Fri, 29 Jul 2022 05:31:13 -0700 (PDT) MIME-Version: 1.0 References: <000000000000e6917605e48ce2bf@google.com> <2916828.W3qMjvkFlE@silver> In-Reply-To: <2916828.W3qMjvkFlE@silver> From: Dmitry Vyukov Date: Fri, 29 Jul 2022 14:31:01 +0200 Message-ID: Subject: Re: [syzbot] WARNING in p9_client_destroy To: Christian Schoenebeck Cc: asmadeus@codewreck.org, Vlastimil Babka , syzbot , akpm@linux-foundation.org, davem@davemloft.net, edumazet@google.com, elver@google.com, ericvh@gmail.com, hdanton@sina.com, k.kahurani@gmail.com, kuba@kernel.org, linux-kernel@vger.kernel.org, lucho@ionkov.net, netdev@vger.kernel.org, pabeni@redhat.com, rientjes@google.com, syzkaller-bugs@googlegroups.com, torvalds@linux-foundation.org, v9fs-developer@lists.sourceforge.net Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 26 Jul 2022 at 14:10, Christian Schoenebeck wrote: > > On Montag, 25. Juli 2022 14:45:08 CEST Dmitry Vyukov wrote: > > On Mon, 25 Jul 2022 at 13:51, wrote: > > > Vlastimil Babka wrote on Mon, Jul 25, 2022 at 12:15:24PM +0200: > > > > On 7/24/22 15:17, syzbot wrote: > > > > > syzbot has bisected this issue to: > > > > > > > > > > commit 7302e91f39a81a9c2efcf4bc5749d18128366945 > > > > > Author: Marco Elver > > > > > Date: Fri Jan 14 22:03:58 2022 +0000 > > > > > > > > > > mm/slab_common: use WARN() if cache still has objects on destroy > > > > > > > > Just to state the obvious, bisection pointed to a commit that added the > > > > warning, but the reason for the warning would be that p9 is destroying a > > > > kmem_cache without freeing all the objects there first, and that would > > > > be > > > > true even before the commit. > > > > > > Probably true from the moment that cache/idr was introduced... I've got > > > a couple of fixes in next but given syzcaller claims that's the tree it > > > was produced on I guess there can be more such leaks. > > > (well, the lines it sent in the backtrace yesterday don't match next, > > > but I wouldn't count on it) > > > > > > If someone wants to have a look please feel free, I would bet the > > > problem is just that p9_fd_close() doesn't call or does something > > > equivalent to p9_conn_cancel() and there just are some requests that > > > haven't been sent yet when the mount is closed.. > > > But I don't have/can/want to take the time to check right now as I > > > consider such a leak harmless enough, someone has to be root or > > > equivalent to do 9p mounts in most cases. > > > > FWIW with KASAN we have allocation stacks for each heap object. So > > when KASAN is enabled that warning could list all live object > > allocation stacks. > > With allocation stack you mean the backtrace/call stack at the point in time > when the memory originally was acquired? > > If the answer is yes, then sure, if someone had a chance to post those > backtraces, then that would help us to take a closer look at where this leak > might happen. Otherwise I fear it will end up among those other "lack of > priority" issues. Yes, I meant providing allocation stacks for leaked objects. Filed https://bugzilla.kernel.org/show_bug.cgi?id=216306 for this feature.