Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp6397241rdb; Mon, 1 Jan 2024 23:32:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IHLfkTUOsicHd2qLFr5NWfOU4tFjbXGp6Udzxne5J/Cb96+vzZ+9ljZ/VAJpK7QxzTGxUyz X-Received: by 2002:ad4:4b31:0:b0:67f:baba:e1c8 with SMTP id s17-20020ad44b31000000b0067fbabae1c8mr16852336qvw.97.1704180778560; Mon, 01 Jan 2024 23:32:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704180778; cv=none; d=google.com; s=arc-20160816; b=1FIhZLaZ5P9qZU3G3cxMNMuH0D9KYjFJu+CAUgArm1+BvrerMo05SjUse/klLXofqq 4g5HEFG0+sBb/EGPgk26bWS6ywBt591VpqGJVcBcPFW8XwfCdgPyPU0KCecKS2g3FWgd wlLxb8zqpmkrE/eE5/rwGyHtdrvuLb9pKeymAa6yYisb2rw5l88/LMAdqxktGWmqfSJ+ LUv+rXBkS7XiKNJF62mIpdOtezoZo19oMG051nVQpzESg2Dz3bDajMkBtA4AI6Y8Uu90 LWiDi1bnzv1fjtohwrZPUu1rhl/ys/C2E+1Bj9qSK65aSkL8we/M6nL16RE2ieTftvuA 3ptg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=EhFYnh+cMjLhe96c/DjhnHwH2X/+PqHgz11UD0BfHcc=; fh=e/RYfy0DxX+dXKGVMPmykU7IC6bB71TMw9TnWaqUwwk=; b=T067PUGASC512mg2Ed8W233evdSmB8n1ULxcowv7bVQ9UOAOHHTTLp73RMSsNHWBya WFsJuwhbcleAnn+sN7ARMs9tnR99e3DvScEo1lwa1IFrevBSBv8GqxMiHeeVnIxpNVL5 8BpaCSImpylxp0lMdH1IhKz2pcP2CG4Vzu4Dxa0IRLa9VE32dTz1LFvrj/voc1HJgGpS drJdjfH6CCCjpsdP7WwROk5cmefF543iLprRjS9D/rHndUoqsfiaK1GyyLmoEjuN78aA kMEjPKshbgux0dMUS+hTLhTowCFC9SQQb3ZYdl03UalaZCzHVqL59MR1LPXjmqOZfIuQ kX6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=wCoBu3+q; spf=pass (google.com: domain of linux-kernel+bounces-14117-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14117-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=web.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id n12-20020a0c9d4c000000b006806781ace9si12587478qvf.42.2024.01.01.23.32.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jan 2024 23:32:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-14117-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=wCoBu3+q; spf=pass (google.com: domain of linux-kernel+bounces-14117-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14117-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=web.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 4FF2A1C2152E for ; Tue, 2 Jan 2024 07:32:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 92D842594; Tue, 2 Jan 2024 07:32:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=web.de header.i=markus.elfring@web.de header.b="wCoBu3+q" X-Original-To: linux-kernel@vger.kernel.org Received: from mout.web.de (mout.web.de [212.227.15.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 80B6A6AA1; Tue, 2 Jan 2024 07:32:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=web.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=web.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1704180751; x=1704785551; i=markus.elfring@web.de; bh=EhFYnh+cMjLhe96c/DjhnHwH2X/+PqHgz11UD0BfHcc=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From: In-Reply-To; b=wCoBu3+qiO2GczBp3vxu8jULTnyOX4c4WdQMy49nHoPgkfNRQvpB09U5lthXWqPZ 5LgoJU6hFTb+ytWtv6t5RxhAJIYjfQogbFVqvRug8TAtsMUjGbF3ytMStiVjHVpy5 get4nhz9XMjRqiPgM1LkEj54PzOoDLZTwTPTDHUKWatUqXB3t2Nuy9bTRJpJMX7X0 0uPpxx4nGMp0awP4nvkeOL4433AKXiCtvqVE15O3BM5m6UxpQz2xpKiHWmsuMTzwO DsSBaMeazMNL24p+Ndlul6oFxwdJDhuTH0h23RCinX4ZYfcC77UPevCrlVAmvGQxT 2g2/pDrmQToqA6TmVg== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from [192.168.178.21] ([94.31.91.95]) by smtp.web.de (mrweb006 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MzCA3-1qxf800uf5-00voof; Tue, 02 Jan 2024 08:32:31 +0100 Message-ID: <70a94379-ee4b-46e7-8cb9-c817590ad851@web.de> Date: Tue, 2 Jan 2024 08:32:30 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: packet: Improve exception handling in fanout_add() Content-Language: en-GB To: Stephen Hemminger , netdev@vger.kernel.org, kernel-janitors@vger.kernel.org Cc: Willem de Bruijn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , LKML References: <828bb442-29d0-4bb8-b90d-f200bdd4faf6@web.de> <6591e0fcb089f_21410c2946c@willemb.c.googlers.com.notmuch> <20240101101221.73276d5d@hermes.local> From: Markus Elfring In-Reply-To: <20240101101221.73276d5d@hermes.local> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:2NpcJNTnh/PMkkkoUV4Zb96so9kvmH6xJEr4I3R816oo3zU7nqv XU4kKOBDV0aI4x3eW61/C1JWPirfCwmx+Xdj6jMWX67kndC1DfCLnbYB9+LLraghZF6aGuo Zfh2H5Rir331bZ0kw4zR5heqMQHdOwiBENeRgEPZbKLpwstm69ACXyJjHFHQnli+OmMa2hF 9SuSd3BRXepdjvbc6bW0Q== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:0UhzYiaB31c=;OdzWLEIlrEXm8/ORIMdPgkfmBgy 5g7O+kDaQrfv7Gy5f9GOFJT6fOgMdvkKjV0z7Y+Cnsv0LzyYK/Pvm+ZM2Sf0fo4onOhF73TYp h1Xff8VOlsl4elxxGyQkmw57h2A+djO/FXGSBbca1rKm+TDTqliBvQvSczif2adekWCOiGRNL JFsFPvQaMU6MilAC5rjKfzGXP8LjDtJSEM0WXrBCKAXfeVi506vzdrMf615Dsef8nMtDilkJU ffoexDRFkCurvmiQHrRsWXWAW7vlo9gxgKdKmHsymMqDa72IGywcR6kH3LvsiOx3qSyF3/6sX Z0o5O0glqM5vpR6fGXJe9/UIGx9rwWooquOzDGZgWjjAI3pWGBgXOnYNsSwrgdpdKxB1S6asi qF873LNbkPN6U1Tkx9xbgrVM7eJbxdkJDDx9bavW9a1Joirit04xPijY3etXY1L8FVh1q13uq pr+iTrXc8M2t2zYL7vL9UIBSnSLH6fF0+pXopjjcDb3PqW0BCW7slCAJuBa+whMEQUjqJbEtU Soad0myJ22Lc2c7AqE9deYOQEMAhCqa9qlQbj2BZaazfJQLluXFKzj2B06IDdW/yolfj3/9jQ yoG2URT/SDRtMVZW2vk0F2rcSzVeXAk0eFgvhW5NqlBEytNn25IBB2pEUAzTst/Hjk/AT4FF+ MNeU1s4Jfahf68hwZ3KTm/uXdPPMnMhkQ0iLd+tA3Pwu2U4Kmu1XGUf6tM2J7HLGc1vzHJSR9 SJuIIxlg0yNB6c9uP+rQiMFKlnUfba4JtSenJL56kdbGQLfxKr5AkTUAQZW2AfbjptOO+AgeE qt+ogYEjJ3bhgzwehANvgeTUfdWwuaCp/yxQ5Mo/SMcYrPZ9w0TSQfmKORhU4VAb1IvW71V66 FTsET3tW6wBykDsBc3/sCv2K3NrrDWNTJSObsJP4Ixu3I12+8ITEpSOA8d11nHWrwF3HGkYWD Y98gj2hzUtaIwk9F+l2D73CbN3o= > If you look at the existing coccinelle script there is even one > to remove unnecessary checks for null before calling kfree. The avoidance of extra pointer checks is an other use case than omitting redundant function calls, isn't it? Regards, Markus