Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp6142513rdb; Mon, 1 Jan 2024 10:14:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IGdAg9gQF65AAf0WeUB7NHMMSuL+1EN0CIl+gUPDxvePbm//sbswehH0FqjNHrlDcTGuezA X-Received: by 2002:a50:9f4b:0:b0:556:869e:c3ec with SMTP id b69-20020a509f4b000000b00556869ec3ecmr406945edf.36.1704132853339; Mon, 01 Jan 2024 10:14:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704132853; cv=none; d=google.com; s=arc-20160816; b=tYNLdC4eG2a5FzSIGwrWy/DuklcrdA2s8H4bvqx96giqAew/76XQ7+Y9ZzaWnzVebG dX3Cs1TAjd+Xgs6rAZ76GTQyaLCQVI4EeiXaK+Is6qqhrDBGCctvBNoXm1DOs8UnF1LT eo0WfuQNV7NFxN+bK+wSWy4hqVhZ8SjudbkX1Hp0X4W6nV2QdekTp/VeutKn8VwwEvcY DZtvOKktXChfLZW1FUXVpYVA0tg6RFUGKoc0cWtVCK75g/abYhv2E1PWDvOKymTt6Lvd eGskRE576VpimKiTFJBI+AWn1R/XUxPhE5IGxtzVW0dtJobYe1nTakInWdypOksl7M2s ifIg== 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:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=ReGf1cOAhj5IBC+Obt0k8qwdOa0dy6S3IHxPRIfLygQ=; fh=KwoiKmkk9MdA+BKtQv696VA8m/ciK0QAAAYNwDB89No=; b=yhN2LX/QgM8I3hSrjyRsXcEC/sIALjw2PPCqhSloDwSyk8z3lpXxRVsSH95oV29GvV k/2rGocfo4RhlxBCYpd4vCQsGNZBWn4jXCvj4dRoH80g631CH3ihzKKH+J+df4amgeBg c26KfyqSof5hT8E0qk7t3VOI92yeGutpzCUuNIaIvqsmjqawXJipxqx5PRDZ9W3eoJ7+ 6CsCOrCRPAcv5sc2EFOQmWIQUIhPEfXx0EUTCWjscAnUOdABEvxdWRmfmR6BJ9dnxSbt 2NX8V4C3IxMQdqZabt0d1di4jpavBSWmKeGBGIRI55LQBUY34CnyMJUcEDugz91u3+n9 +iYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@networkplumber-org.20230601.gappssmtp.com header.s=20230601 header.b=2rxMKVpK; spf=pass (google.com: domain of linux-kernel+bounces-13927-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13927-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=networkplumber.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id v26-20020a50955a000000b00552c32f0f68si10492567eda.577.2024.01.01.10.14.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jan 2024 10:14:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-13927-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=@networkplumber-org.20230601.gappssmtp.com header.s=20230601 header.b=2rxMKVpK; spf=pass (google.com: domain of linux-kernel+bounces-13927-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13927-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=networkplumber.org 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 1CBEC1F215F9 for ; Mon, 1 Jan 2024 18:14:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A4283D26E; Mon, 1 Jan 2024 18:13:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20230601.gappssmtp.com header.i=@networkplumber-org.20230601.gappssmtp.com header.b="2rxMKVpK" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) (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 7B2F0C8CB for ; Mon, 1 Jan 2024 18:13:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=networkplumber.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=networkplumber.org Received: by mail-pl1-f170.google.com with SMTP id d9443c01a7336-1d3ef33e68dso56586995ad.1 for ; Mon, 01 Jan 2024 10:13:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1704132831; x=1704737631; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=ReGf1cOAhj5IBC+Obt0k8qwdOa0dy6S3IHxPRIfLygQ=; b=2rxMKVpKYJGh89+4cRUkVNguolMz98/F8BfPX7AjYTzt85ld+lTvge0nKQXFpiKMle XrXeMSdy5iPYDEhg4sL7VmCW94xkMEAd5wUCxZw3aYDOLNgDvs2l/oEA0JuI0cv/3IdN vz5JDguPVtYFld8j2ADnGXbEPB8OGWEDsN3PNoGAuZIgZ1FgBXuhwP1ETaw8275EncT9 DmPihLut3rIZHGeJgrBXVbFYWzX7TJcojxoJ8BQlk6SX1hRIUBcBL59BZ6GCmWIEHoa+ srSmQ7n5LpXMQEGV/W1oYfr6lhheyymsQzMYsvnTYebF0ulxH3QO2urA24XoRX2AAu6i fhmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704132831; x=1704737631; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ReGf1cOAhj5IBC+Obt0k8qwdOa0dy6S3IHxPRIfLygQ=; b=ZJ/v7hhcxwSToCtnZG18JgMbfNjflu/wFG24IPGpcHQhP/MI9rfJjHuqV/N7tugnq3 ts93AkkD0/cwR++c1t1CTBI1j/pBoOQp59GbWVtvOx9rNdTrn6zp3z+9cCd6rfn8I/nx AlLScL0zNUeUJKrC7YHqpZPkPnzcVMk9RU9DOKhYTcEP85ajpLixJ0467sh+FLplUd27 siYzwzy8k87X0q6Lp4B4Nmjgyxz74mQKUdRy0t1089pru9uGfk3uw0SFL4scgIZLwGC1 NQLZHlR/TC4PeTyLJnGlwTO1eeY/gKJe7ID0rEhFeLsUfATAJEk7D38VT83v3ZxUNsdu A/Ow== X-Gm-Message-State: AOJu0YzetBX7pTjYUX4gz1vslgkj49Umb/tL+SWXgBw4rkhK/fbErfk0 w95CciFbFoEy3HZzTvFaYYYVRh/iXokT9Q== X-Received: by 2002:a17:902:ced2:b0:1d3:f344:6b01 with SMTP id d18-20020a170902ced200b001d3f3446b01mr19617998plg.3.1704132830785; Mon, 01 Jan 2024 10:13:50 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id e9-20020a170902b78900b001cfb4d36eb1sm20375206pls.215.2024.01.01.10.13.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jan 2024 10:13:50 -0800 (PST) Date: Mon, 1 Jan 2024 10:13:48 -0800 From: Stephen Hemminger To: Markus Elfring Cc: netdev@vger.kernel.org, kernel-janitors@vger.kernel.org, Anjali Kulkarni , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Kuniyuki Iwashima , Paolo Abeni , Simon Horman , LKML Subject: Re: [PATCH 1/4] netlink: Improve exception handling in __netlink_kernel_create() Message-ID: <20240101101348.66978156@hermes.local> In-Reply-To: <477e5649-87e3-44d9-8226-010b9822e649@web.de> References: <90679f69-951c-47b3-b86f-75fd9fde3da3@web.de> <477e5649-87e3-44d9-8226-010b9822e649@web.de> 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=US-ASCII Content-Transfer-Encoding: 7bit On Sun, 31 Dec 2023 18:42:30 +0100 Markus Elfring wrote: > From: Markus Elfring > Date: Sun, 31 Dec 2023 17:26:41 +0100 > > The kfree() function was called in one case by > the __netlink_kernel_create() function during error handling > even if the passed variable contained a null pointer. > This issue was detected by using the Coccinelle software. > > Thus use another label. > > Signed-off-by: Markus Elfring NAK Please look at something else, calling kfree(NULL) is correct and the preferred solution.