Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp846764lqp; Thu, 21 Mar 2024 18:48:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXZ549nKFjChjB1PRtbzsn1CTZ+VXtNiwE2ukam3r0CqnVq5Lm+pm09UfaRT+diZot9BjP+2TZAIFk/YcHO/Sjt+kHdMpkfc5Ybumqzuw== X-Google-Smtp-Source: AGHT+IGzsLnwxXAV6ZpQnoiu4MBpb98itNq1oZA3wAlyy3vjH/oWU8GOyUqPumAmZXEqGV/+K1kb X-Received: by 2002:a50:aa89:0:b0:568:7be0:50a4 with SMTP id q9-20020a50aa89000000b005687be050a4mr536270edc.11.1711072129047; Thu, 21 Mar 2024 18:48:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711072129; cv=pass; d=google.com; s=arc-20160816; b=wRGWozPLYm+MCW/gt1p6omt/JKKTcswLN5aj0mta6ibNHTr66Z2uQ1lMJ3RHAYed20 joRFRwCDTCKXRFm7+YzbfAT+KrAQekUefzuXze+4pMgUa/VvIX44ZSHBvva5o3uqWoOv oxemcP0fF+7ZzX/y/fXngKuWM2wsZLz74F+td2MhuzT2KJmmGfR7lQXMI87wD8FaSjwI RqtnpoPCdiUB12eq/fsnVTSc6niliAgq5OTef2EW/d9g04O4pwpDKKAQfY57jFa5vKMg dGGDW6Bh6XAz3Eln0zwN3WI4pFLWYc/kFtEwOP9rNYFFEZUXeb1V3A4SudDMkUFf1Xwl bgdQ== ARC-Message-Signature: i=2; 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=xEs+nxPabscqfZYnqP1XSpV1Ny+o8wv2NPvfwWpfoJs=; fh=3D0cnBRJwl+OAzpLPlUNIwdJgUeSozf47DBk+do0OHE=; b=t1VYGqc+AJYzEi/AsmM0v3+84nM9+U2vPl1S5MorEy6VjVXdXxR0hsodvwW94yRSDr eVI6ZuJfpYzbTrjk9xcS/Ku6JNWUvRmXZKljL28iD5MOZ5kxY3nh8Rmm3D0Ita5hrd3+ DLj7Tsn9v6F8Wrg0Rd87kr0ikSEFwtWRzvvXGAhl8mL+yR6FxDe2BBQOb4R19QZfMUh6 kLvNQJrYFBKVoQmQL47T/Dn7NiFJIeMewenMGf0xR1dm7UP/63HbxVuKZ62cQ+xkoDuz spALDzDaiQK5joxtWkOu/WDBCb5/2ssUcUvxZFJ9OaxhWYtdQ625aOKq/guv4w4TQ36L 2ixQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SuYk7s2U; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-110862-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-110862-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id y35-20020a50bb26000000b00566a1dd07e4si409819ede.495.2024.03.21.18.48.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Mar 2024 18:48:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-110862-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=@kernel.org header.s=k20201202 header.b=SuYk7s2U; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-110862-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-110862-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.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 AA1B71F22EF5 for ; Fri, 22 Mar 2024 01:48:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5108D3C38; Fri, 22 Mar 2024 01:48:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="SuYk7s2U" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 59B5F65C; Fri, 22 Mar 2024 01:48:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711072113; cv=none; b=misYYZLdtM5Jo7wnqv6xnEnH+ip8bKXUX1RFanYZnJUsRuoOt4YAalJ+fMIphcjtqWBILQcS/Up0MDsN00t01EowlgUTeL87M+V4Vs+ELuu8YF/JepvcGDq/X7JjJ0M12laSKlKYTBL5MZBfz3ztEFm6X2xuG1lSbRHVRkGyzoI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711072113; c=relaxed/simple; bh=xEs+nxPabscqfZYnqP1XSpV1Ny+o8wv2NPvfwWpfoJs=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=LKfqR6jzs/NkuNmuPqQjP0+YSiAzDF5kxUDFqWcpE2d8aEo7PGIUYzpgBVfJpxsFoZn6cvLBbgEIccHw7VXKUpKGsmIyLQWKJsvqpjv9lmR7/MiV/KCLkqrln4I2t8+iuaEomyVJmLRxIfb3s8hPfNicod40/648teEL+o1sX10= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=SuYk7s2U; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id BEC36C43390; Fri, 22 Mar 2024 01:48:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711072110; bh=xEs+nxPabscqfZYnqP1XSpV1Ny+o8wv2NPvfwWpfoJs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=SuYk7s2UjAWtsP6/F+h81BmUN58VCzNgEdB/VXdXyezkhoLn6Lqz+ITt0UJdCIcfc MiXw6aa2rxAKAjEikmm/XzpOegE/dWexDUa7SrwVZVVEyfwTMPigrjfeLC+u/6G91E jBraP1oU9V17rWifPfU6wXvsHCGENphUzV0qbInwg+d38pnyh8NBpVfuXFxZsbYLhF yJzOiZWaMrBi0k7B5AA+IfOfUa1BN4GJYeg7J0M0hUJoS4m5WR9ZgGj8++Y8oYmU+y tyBk7Yb4Q0wEoxrpcBbdi+zKXgP3dg6BFGK8x57EMhjLsLiEMhWO6yq8+Aas3hui6I m+Va6UdQhsoPw== Date: Thu, 21 Mar 2024 18:48:28 -0700 From: Jakub Kicinski To: Jesse Brandeburg Cc: Julia Lawall , Andy Shevchenko , Dan Carpenter , , , , "Maciej Fijalkowski" , Przemek Kitszel , Tony Nguyen , LKML , Alexander Lobakin , David Laight , "David S. Miller" , Eric Dumazet , Jiri Pirko , "Jonathan Cameron" , Kees Cook , Lukasz Czapnik , Paolo Abeni , "Pucha Himasekhar Reddy" , Dan Williams Subject: Re: [PATCH net] ice: Fix freeing uninitialized pointers Message-ID: <20240321184828.3e22c698@kernel.org> In-Reply-To: References: 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: quoted-printable On Thu, 21 Mar 2024 15:27:47 -0700 Jesse Brandeburg wrote: > The gist of it is that we should instead be using inline declarations,=20 > which I also agree is a reasonable style for this. It more clearly shows= =20 > the __free(kfree) and the allocation (kzalloc, kcalloc, etc) on the same= =20 > (or virtually the same) line of code. >=20 > I'm curious if Jakub would dislike this less? Accept? At present I find this construct unreadable. I may get used to it, hard to say. Also I don't see the benefit of the auto-freeing construct, I'd venture a guess that all the bugs it may prevent would have been caught by smatch. But I'm an old curmudgeon stuck in my ways. Feel free to experiment in Intel drivers, and we'll see how it works out =F0=9F=A4=B7=EF=B8=8F