Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4275461rwd; Tue, 30 May 2023 03:06:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6gRq0bUOhqY1+XyQArrax2iRFO1J5MULHeD38vsmQpyKt8Z/5uh5nWqjUck0OH3aiNGuGU X-Received: by 2002:a17:902:ec81:b0:1ae:2b95:7125 with SMTP id x1-20020a170902ec8100b001ae2b957125mr2149666plg.63.1685441196270; Tue, 30 May 2023 03:06:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685441196; cv=none; d=google.com; s=arc-20160816; b=ksxZriL1GmJf2HDUAX3aD72Dy5j4DlBLCbgah8PuotdpUOx3xDhef+SCpIcR61zyW5 CGqwdMXKZFDfyX2mW92hN5GayhlNgzAfhEPAMaz92klSfjEHFNmoKIHkFk+pTaf6Zfo+ vurTDVwWHNDxkXjNIt5N6adgsX8Yy158+6C1QHRDdyBv0WG38T12sfnInc4J3wH+xsUa Z9VbTaEQMmoXtuW423pz73n97F440FCGnPdFaMTvIL8pSQ9la4xXKg/LERGA63VPJ1s5 z0Qiio+MsPYgboiK8kK2U0jtbM0j+qxxfGBYK347B/pO+I0e5BaVsb9ASerT/TRx1drE RMrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=df0mWFLhyU/UnQUjKoGbCL9uZYwvK+VhiEL1cfEuoxg=; b=QosUnii6hfRSE6mJwSR4dUH74Md35zsLf8ButNUyM/7IYY5nKBfU7c7mk2FQ+u5VWc SwcL6tkGskmVEtCyYayemMoRg7+cYNF8SNP0Wz9/86WeIBjOo3GisbY7X/Erd3gG77k6 ecN06sCu27vO07Kvg45wT2vE+CH5cKbGafjbj6qc+UOh/e+nPMKVNmrJgLUBh64pNNu1 W2Uf0JUhfIZ0PmksSL4HhIM9nMtk0/AnR5vWqxoLemsm0CtEx9lH+D2wZjUf4C6hyUyS KaAYzse9aHhe3rPm1UNhvVL79rZu2UISPPX6BIswguI3NUkErGvIU/Zd06wNisoGb+dm Xd8Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j22-20020a170902759600b001aaef930752si1398154pll.647.2023.05.30.03.06.24; Tue, 30 May 2023 03:06:36 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231276AbjE3JyB (ORCPT + 99 others); Tue, 30 May 2023 05:54:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230201AbjE3Jxv (ORCPT ); Tue, 30 May 2023 05:53:51 -0400 Received: from www262.sakura.ne.jp (www262.sakura.ne.jp [202.181.97.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A5D5D9 for ; Tue, 30 May 2023 02:53:18 -0700 (PDT) Received: from fsav413.sakura.ne.jp (fsav413.sakura.ne.jp [133.242.250.112]) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id 34U9qmfQ063315; Tue, 30 May 2023 18:52:48 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav413.sakura.ne.jp (F-Secure/fsigk_smtp/550/fsav413.sakura.ne.jp); Tue, 30 May 2023 18:52:48 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/fsav413.sakura.ne.jp) Received: from [192.168.1.6] (M106072142033.v4.enabler.ne.jp [106.72.142.33]) (authenticated bits=0) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id 34U9pX72063087 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NO); Tue, 30 May 2023 18:51:33 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) Message-ID: Date: Tue, 30 May 2023 18:51:32 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: [PATCH] ref_tracker: add stack_depot_save() failure handling to ref_tracker_alloc() Content-Language: en-US To: Eric Dumazet , Jakub Kicinski Cc: Dmitry Vyukov , "David S. Miller" , LKML References: <5fa8dfeb-8eb6-0de0-a335-e0b4336c29e0@I-love.SAKURA.ne.jp> <20230529190526.65d13658@kernel.org> From: Tetsuo Handa In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_NONE,SPF_NONE,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 2023/05/30 16:22, Eric Dumazet wrote: >>> Therefore, assume that stack_depot_save(GFP_KERNEL | __GFP_NOFAIL) from >>> ref_tracker_alloc() can silently fail, and emit "unreliable refcount >>> tracker." message. > > Note: I never assumed stack_depot_save() would enforce/use NOFAIL. Hmm, I misread this function. if (gfp & __GFP_DIRECT_RECLAIM) gfp_mask |= __GFP_NOFAIL; // Or'ing to "gfp_mask" than "gfp". *trackerp = tracker = kzalloc(sizeof(*tracker), gfp_mask); // <= This is "gfp_mask". tracker->alloc_stack_handle = stack_depot_save(entries, nr_entries, gfp); // <= This is "gfp". So, stack_depot_save(GFP_KERNEL | __GFP_NOFAIL) is not happening. Then, question becomes whether we want tracker->alloc_stack_handle != NULL or not. If tracker->alloc_stack_handle == NULL is still useful, this patch will be useless...