Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3884171rwd; Mon, 29 May 2023 19:13:18 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7P/6AqCZZml2LRENeOJHVe1MtmWdMxihd3v0OmWW96oW71e8f4ndIR9WyYt1h1UNqlIQjR X-Received: by 2002:a17:90a:d787:b0:253:38b7:682d with SMTP id z7-20020a17090ad78700b0025338b7682dmr895827pju.18.1685412798157; Mon, 29 May 2023 19:13:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685412798; cv=none; d=google.com; s=arc-20160816; b=RZrQkqR8ya0Ac0VAJHiyAzAGPbRaWyqkEpMzLii/HwezY8vjEFBxXKsQgI1F3tj/yU mpTQJZCwfKuvk4dw04cxpLxwLY42pw7Md+98815SVF9oc4sFchslR229sPo3JEEy5kAH 0dDmkG/kuQwPomxpERSiieWixPQXjY4L/Iq0G82z8ry0STGIE21Exn1R/zSpSzHGDhLE aHyEFy7daSGdjoFGikNUYh1AZ9qYMh4C+EKRk2TLntGny/KvUXgm1uacPGXKmMxynl2X M1SVojNWKzWumsNh9e/OibtjKeZAynk0M4mUeGsFVmNjxe5vK7QivVRZs7eT43lxjiAc uflw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=wgtrjnpv9khSJ0dcSdQS0k+9LO2+d4D8JUB8Sgvnpx0=; b=vtTg7j5VHeEdG2J5CCFDFS5GqbVGF5T0GeBJ7k0TWQ8gZHVnqF6BntLcdnFTyzDvUh xr6DAhWMxm/YS0McpkBpZHlncgP+sJbIozoyCvDB8mvr0UXeTb0BJ5eSb+XDg27dsjX0 8TnaSw1ku8pIdX9jV9lHqUpwxt8mfUYETy0fKQm+WFPzrWX7cv+waq435fMhcqEEKjua bQRx2kyXqsLqh+AsHhFk3hIK7W+Y/1/e2R8NjoghrSqQ4FmmtuZp2I0SMt0lUH3omjZA u0O2+EofYXu7eVacUOohIQkLTbN7vALMWCoeiUqFO3mRMxp3VXZEyKzmSv8xRkW+3E3O /EdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LoQFyMLX; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id rj6-20020a17090b3e8600b0023af4ee47dasi13307154pjb.65.2023.05.29.19.13.06; Mon, 29 May 2023 19:13:18 -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=@kernel.org header.s=k20201202 header.b=LoQFyMLX; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230045AbjE3CGJ (ORCPT + 99 others); Mon, 29 May 2023 22:06:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229744AbjE3CGI (ORCPT ); Mon, 29 May 2023 22:06:08 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0082FC for ; Mon, 29 May 2023 19:05:39 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 90512629A5 for ; Tue, 30 May 2023 02:05:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BAA2AC433D2; Tue, 30 May 2023 02:05:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685412328; bh=lpVRrInRkjIGpIbSn0aKpHVNrVrO5AVlH73S71R1cP4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=LoQFyMLX+LQC91JJ+5QDDiRckZX21cHd2N1Hl5468z4gFEB9k9J/5ovLViOQB9Guc jDuUkN8DIdfYsH7W9WzYs3PKlX5XwAECb+JdZB0vQK1c0/xrJr5rjPMN+4Y/O8TDL0 wvOBk5QFXw60Z024AOVn1QqszdlmEXB+tFg7hKSrO2vTaqb2Fm5T99mtclSk9dTvej dc348u+kR76BWnoWRq8+Fk95J8XUIgUzwESowEcdb3z4UMSqlwHUrPKmncnyAUtcb+ HoNSLieOubVsVw3DOP0g3mI9JBZwhEFq0Pdy+4gZP6kDHTOVoKjSIE+g2hfzQjEJTH y0qmVfB1/4YRQ== Date: Mon, 29 May 2023 19:05:26 -0700 From: Jakub Kicinski To: Tetsuo Handa Cc: Eric Dumazet , Dmitry Vyukov , "David S. Miller" , LKML Subject: Re: [PATCH] ref_tracker: add stack_depot_save() failure handling to ref_tracker_alloc() Message-ID: <20230529190526.65d13658@kernel.org> In-Reply-To: <5fa8dfeb-8eb6-0de0-a335-e0b4336c29e0@I-love.SAKURA.ne.jp> References: <5fa8dfeb-8eb6-0de0-a335-e0b4336c29e0@I-love.SAKURA.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Sat, 27 May 2023 20:04:11 +0900 Tetsuo Handa wrote: > stack_depot_save() cannot accept __GFP_NOFAIL flag because > __stack_depot_save() drops gfp flags which are not in > GFP_KERNEL | GFP_ATOMIC | __GFP_NOWARN. Also, changing > __stack_depot_save() to accept __GFP_NOFAIL is not possible > because rmqueue() does not want __GFP_NOFAIL flag for > order == DEPOT_POOL_ORDER allocation request. > > Therefore, assume that stack_depot_save(GFP_KERNEL | __GFP_NOFAIL) from > ref_tracker_alloc() can silently fail, and emit "unreliable refcount > tracker." message. It's probably a good idea to CC netdev@vger. I'm not sure if anyone will pick this up from LKML. For the patch itself - I'm not sure it's needed, even if we don't record the stack we'll have a tracker object and still detect the leak. So printing the "unreliable refcount" message is not very precise. At least to me; Eric's opinion matters most.