Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp5714747rdb; Sun, 31 Dec 2023 13:45:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IH8qRRBFeXpl5oZDGJnh9oi/b2FLvmVopW9hh7IdOf8CPzK0u8GL0/AtbslR+dQG6h7AQVI X-Received: by 2002:a05:600c:1548:b0:40d:7d83:d88c with SMTP id f8-20020a05600c154800b0040d7d83d88cmr1725560wmg.182.1704059150243; Sun, 31 Dec 2023 13:45:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704059150; cv=none; d=google.com; s=arc-20160816; b=nmrbjxXy3e2oLpZqL8oF5842eHz2g4QCzM67VFDXfohImRSsM54l0vZt3wgmk5WVzN ApdFDGcH9nFA11LJWYTLW0FtI1hjWJhPE2ym3oEQgpJ5FgMQWB/KKDl36YcN2T0/n+GO M50beAnT3hr708laepr+zWJU6ertcY/kJoBmK1I+Qw/wyDUvlRk+HIYMFj2fECKafaSd c8fO5kgllRZhyDB2neSJVnKAH33xR/2oPiElPL4Rz6SmruDzrG+0rwqNzxckQ8g0z49j 6i5MFx5Pj3AldaWC77betDXTyToQxbgNETSWrSKkar1fAD6OaRk2gkZNiZIY4/JTkHcg GFYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:references:in-reply-to :message-id:cc:to:from:date:dkim-signature; bh=RKsBy9hdrgBDv+9lbkkexRpE8/6en4orssBBHouRAoU=; fh=3WxroMDqJQfpPllBvGsRFmvQecxcZVRkFRNOU5m3fLQ=; b=APz+kPdXqH14um22fjXS0kSIRwTq6vYv6PI6WNuWn4bZan9IaoJKvLz/V5G75TSccL dFh1CbOlSBeNZZsFrYUvXpRFLlJ/dyrCxFsduNwFuEaCz+TLZM0QfkP7Tt2emrFIqU7m uFekmGb4rl1jMou4b+iBfNHwQXXf2ZTLZaig+WhPcW39UhSXFvGwGa5nNf9FlLQrch+t /PTGIcQkq9OrRMIejWGZPMwLRBd5q4zWtNzY+l5otLyfmgQgHmcvF8Fr/AlzeLWwIFG4 6GFgazX02LD9K5pOOzP9n1OD8V1cfXUYeP8yX3WpZrvAGWcPzVp8QUUCTCbj30GdXSNg HPjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=GBu98d3f; spf=pass (google.com: domain of linux-kernel+bounces-13788-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13788-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ay10-20020a170907900a00b00a280da89f8fsi187323ejc.193.2023.12.31.13.45.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 Dec 2023 13:45:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-13788-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=GBu98d3f; spf=pass (google.com: domain of linux-kernel+bounces-13788-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13788-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 05D8E1F221B7 for ; Sun, 31 Dec 2023 21:45:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 832DCC143; Sun, 31 Dec 2023 21:45:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GBu98d3f" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-oi1-f175.google.com (mail-oi1-f175.google.com [209.85.167.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 814B4BE47; Sun, 31 Dec 2023 21:45:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oi1-f175.google.com with SMTP id 5614622812f47-3bb9b28acb4so5322241b6e.2; Sun, 31 Dec 2023 13:45:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704059133; x=1704663933; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=RKsBy9hdrgBDv+9lbkkexRpE8/6en4orssBBHouRAoU=; b=GBu98d3fQT47mJmFlOcAI+CXeckXDZSD6/6fpp7ZUYnc7MVHsJ4rbY68wM4qkunB/W CtBlRUB3mfu+mw5Jlw/h5la0eISpdPZVUsXVhMzrMwhZhGGTMauwIOsTSF0vWNOm1oN/ gGFV7J/6vs15CMjEv+QLw6iNOffznUCPPvkQvUyqhxlRvLuPyVL5AqYBhr9uwilFisK9 Jp2arX4+/GbzJ3jJDvLUOPnWzvDXbws9PLywDz+A6Ny+aJRkaoB8VbIpTj/nHeLvfyIi CcX9xadWqfLToM+slKGmjLJZKjfHOs+g55sJXYdcXHwLu/lsja5VOKpyZoaHlTvqQ6KT 3iPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704059133; x=1704663933; h=content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=RKsBy9hdrgBDv+9lbkkexRpE8/6en4orssBBHouRAoU=; b=ms/1e5Jvw3Q01q9oFljyvrAEPJt4lBo4BefS/bRuQwGYrQARa8OaDYhhO4/uWth6X1 LMp2NNrUXNOSsazXG5huAaJBsGVha2J5SEfk5tKVjrHOKOnkyrhH0sGOyJ1UBu0nhbkt LdxMQls1wsuwTkpLx8LkhPe1AoSN2dOOtG4zcb9mH2p+SLjwyLQWpDDIYo22urolHSDf KTB1YkS09BSGy/anlLjhVd9JvUHKOus2kzqBgnPkg65zL1mBKMJsjyvXRM7psx9Aw+Jy PJmLhyaidZ8PRW/mvSDDolpNOalQ1QFnbW+bsa+tBEtXgKKB5M71W6QzTjuI8GeMZsts iFBw== X-Gm-Message-State: AOJu0YzPPIu7yCDoQlu6qBx+1frd5FjSLhqJqjMhWWBVKDRjhSYrlpfT K8njMPPnFOiShJfGJxttI7A= X-Received: by 2002:a05:6808:2191:b0:3b9:dd70:7660 with SMTP id be17-20020a056808219100b003b9dd707660mr17086741oib.11.1704059133558; Sun, 31 Dec 2023 13:45:33 -0800 (PST) Received: from localhost (48.230.85.34.bc.googleusercontent.com. [34.85.230.48]) by smtp.gmail.com with ESMTPSA id n13-20020a0cec4d000000b0067cd5c86936sm8869073qvq.79.2023.12.31.13.45.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 Dec 2023 13:45:32 -0800 (PST) Date: Sun, 31 Dec 2023 16:45:32 -0500 From: Willem de Bruijn To: Markus Elfring , netdev@vger.kernel.org, kernel-janitors@vger.kernel.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Willem de Bruijn Cc: LKML Message-ID: <6591e0fcb089f_21410c2946c@willemb.c.googlers.com.notmuch> In-Reply-To: <828bb442-29d0-4bb8-b90d-f200bdd4faf6@web.de> References: <828bb442-29d0-4bb8-b90d-f200bdd4faf6@web.de> Subject: Re: [PATCH] packet: Improve exception handling in fanout_add() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Markus Elfring wrote: > From: Markus Elfring > Date: Sun, 31 Dec 2023 16:30:51 +0100 > > The kfree() function was called in some cases by the fanout_add() function > even if the passed variable contained a null pointer. > This issue was detected by using the Coccinelle software. It is fine to call kfree with a possible NULL pointer: /** * kfree - free previously allocated memory * @object: pointer returned by kmalloc() or kmem_cache_alloc() * * If @object is NULL, no operation is performed. */ void kfree(const void *object)