Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2386091pxb; Tue, 13 Apr 2021 00:07:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKRq70opscvt6VNVYmaKMzA0IazkxxUrsV/e4aHNjeHZno6Tkg7URsq5ijPh0Sr2+FfVDa X-Received: by 2002:a17:90b:2305:: with SMTP id mt5mr3442079pjb.198.1618297651849; Tue, 13 Apr 2021 00:07:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618297651; cv=none; d=google.com; s=arc-20160816; b=uNk8Q2rMDLf500cVyFLMkdkMiUke8X/WSf0Nwtme3Lpi8er8JbgHBdl3froZ8Ldp0A 2hSccXTLyqPMkB8WmpD3OeIDUX31RpX6BbrzDBcc5zB4IOntTnoD0eMYv4oRyv/cJA5C LCdCY5E8iAM+a9Bwq79DY9kSNDg5VDZQ8TVNUAc9IpzoeoNPjG15JR2O2q6yQRIlADaA 4LcxKuGoHA15qTjjKdhj1yk9ElZQdd7jArxE/dp3fS3pfmFBh021oqP4F/IjsmCxDDl5 nZZCyptDU6FKT07W+XkDrzCI+jmnOx46BjrJcntPw0zHUbOsh7+1C5IYGUbGfqSekBZD Xxsw== 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=s/V4IhN2Q/V5U4Tpj75AkP6BGAKxhjp8mRuYxyjG6j4=; b=U4euDxF5e6Xl8Nj3cM8CADwjtPVRRNRd1r1k7i+zzQQJpuERNVtLBiWqIKmsObfU5u TnTELO8NmI/QCVYGDDSSKiejwzGeAchyQZy0EyESpH9x/G+B4XrtPUbVShXxxsTVZjVM tck69j2kzZ1+2v5xy4G5Q+7x77ub5Y1oy9qoTGg/1oK2z1pBtxBt11wcrdO0rmtou2C9 U98iqECjimAn1Uq4qdvYZ8AAGnpx4koDG62vs3DVh0VIE/ScVbllkyw0vVwmSqWztJJw 27ApBUE+u0BuXCp2M5BSrCFtI96b5hMJiRTA1zAZh5m0EYIv9ICvLMXSK9qTaeG8EcnD LoRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dyhlIeYR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m22si17138044pls.298.2021.04.13.00.07.19; Tue, 13 Apr 2021 00:07:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dyhlIeYR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237810AbhDLUlZ (ORCPT + 99 others); Mon, 12 Apr 2021 16:41:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230454AbhDLUlZ (ORCPT ); Mon, 12 Apr 2021 16:41:25 -0400 Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B4D9C061574; Mon, 12 Apr 2021 13:41:05 -0700 (PDT) Received: by mail-pf1-x42d.google.com with SMTP id d124so9929604pfa.13; Mon, 12 Apr 2021 13:41:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=s/V4IhN2Q/V5U4Tpj75AkP6BGAKxhjp8mRuYxyjG6j4=; b=dyhlIeYRHxVIOPSAOFAjDs8PxmPHHMjH7jfPK1ntxxCY4H50yQ8vIjKMtCKah/qYdH V5KhxBAeDrgXDMfcL51T7GJXIklGu6fnwAPgZfCNAIOLMX/6cyNP9spAKH35vU+rYXcB zwgDrl4YlKXPrO1ah3VSgcvvnDS06AKGXSoi80Plt5Uuq06ADSpMaHDfRVfU1Kq1rdk/ 53Qomj7MX5XpCc9AlasKZWW/HKs261+GF07M2nJL1ODcQAKN1GM/IgFTnRD8rd7noUyT 7oOVg9orzYhSiWVUGF0mZRnV26RVKg35wXon2Q3CdYlH7UBQZwuuE0KgUsXGNxdWW5J4 zhRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=s/V4IhN2Q/V5U4Tpj75AkP6BGAKxhjp8mRuYxyjG6j4=; b=SykSbkPcbnhP0zoRYH9SmXvVnhFG6POal98yAiZipoFmtXem1ZE0mNjk8xg0yhEYFX AkYV5g562qXE+cZJzaieyg8kw7x/uxBfFq3/S1BhwFmG2V+MC6X4V/DSSi0DOgOXmSaS eea9kaXH48KlLjUDHctwjHvRJNFf6o9Aoi6aal/kqIwGxs511njCLyADHHL5w7342wro IhkzmhUeLMoD2zoW2W8NrTWiSTDgUI1w4bqCCtToZ7waEDDg+FhhBfrYaSqDXjqGZ6QK P9YltOtQKPX4BHKJ86jNhFKRvidjB/77zdgr6U4Da49UM27hiKzj9ANnMqzA7xHzlJIv ewmA== X-Gm-Message-State: AOAM533eHXko6aZCl9VU3/+43j93tFuVoTgb1RCs3Vrp5CSXTn8sVFQm Ag/QMLPG+jTrngf/set2ZpXfLU6qes5xOAJay3M= X-Received: by 2002:a62:5ac4:0:b029:22e:e8de:eaba with SMTP id o187-20020a625ac40000b029022ee8deeabamr26458316pfb.4.1618260065161; Mon, 12 Apr 2021 13:41:05 -0700 (PDT) MIME-Version: 1.0 References: <20210409073046.GI3697@techsingularity.net> <20210409084436.GK3697@techsingularity.net> <87ab3d13-f95d-07c5-fc6a-fb33e32685e5@gmail.com> <3c79924f-3603-b259-935a-2e913dc3afcd@gmail.com> In-Reply-To: From: Xie He Date: Mon, 12 Apr 2021 13:40:54 -0700 Message-ID: Subject: Re: Problem in pfmemalloc skb handling in net/core/dev.c To: Eric Dumazet Cc: Mel Gorman , Mel Gorman , jslaby@suse.cz, Neil Brown , Peter Zijlstra , Mike Christie , Eric B Munson , Sebastian Andrzej Siewior , Christoph Lameter , Andrew Morton , "David S. Miller" , Jakub Kicinski , Linux Kernel Network Developers , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 9, 2021 at 12:12 PM Xie He wrote: > > This is exactly what I'm talking about. "skb_pfmemalloc_protocol" > cannot guarantee pfmemalloc skbs are not delivered to unrelated > protocols, because "__netif_receive_skb" will sometimes treat > pfmemalloc skbs as normal skbs. > I'm not sure if you understand what I'm saying. Please look at the > code of "__netif_receive_skb" and see what will happen when > "sk_memalloc_socks()" is false and "skb_pfmemalloc(skb)" is true. Do you see the problem now? Just think what happens when "skb_pfmemalloc(skb)" is true and "sk_memalloc_socks()" has just changed to "false", and whether in this case "skb_pfmemalloc_protocol" still takes any effect.