From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 66891C47DD9 for ; Sun, 24 Mar 2024 13:23:31 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 0831981E55; Sun, 24 Mar 2024 13:23:31 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id RNHKx2dqviLs; Sun, 24 Mar 2024 13:23:30 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 472DE81E05 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1711286610; bh=MTqIB3naOtDYLJf0K8rUUG6vL07A9g5twS2/717iwn0=; h=Date:To:References:From:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=KRKqeQ02oePS07NiUjqGU4jcLJTJQ3rjxhtNbJQ8dJRxo5fmbYZIpVirlGTyCAD/B oDBEQOwKGuGgM1duuxt7bn+qU3LXBwjfuaHTevhRt0wJsBZgm/8lB0BCzXiMlnHphe AAgevGTPozcd+/Uw5Q8t2uYBwuKm0Yc7xvI/aKUIfyPoX3NWovywwRCo6ClCxMNgAA MFx1oab0ewg7WuzG5N3DhfQxTSHHsBRTeIzu+gfpqOoYK2Ami5BpkC2Zc2zQtFqt0s Xh2E770H2TLeOY1Y6kSlUsn2qOZ/nkvUNC7c12CvJ8Icse6ku62zfWvo4YaOsiR9zz Mb1a0AuhN40Cw== Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 472DE81E05; Sun, 24 Mar 2024 13:23:30 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 10F191BF5A2 for ; Sun, 24 Mar 2024 13:23:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 0608C400E4 for ; Sun, 24 Mar 2024 13:23:29 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id zxvPX_B18CcH for ; Sun, 24 Mar 2024 13:23:28 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=212.227.17.12; helo=mout.web.de; envelope-from=markus.elfring@web.de; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org 4094A40184 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 4094A40184 Received: from mout.web.de (mout.web.de [212.227.17.12]) by smtp2.osuosl.org (Postfix) with ESMTPS id 4094A40184 for ; Sun, 24 Mar 2024 13:23:26 +0000 (UTC) X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from [192.168.178.21] ([94.31.90.95]) by smtp.web.de (mrweb105 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MdwJY-1sPNJp2ydq-00b2mp; Sun, 24 Mar 2024 14:22:47 +0100 Message-ID: <4366d46d-0edc-4e45-8695-9fbaae571049@web.de> Date: Sun, 24 Mar 2024 14:22:31 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Dan Carpenter , kernel-janitors@vger.kernel.org, netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org, smatch@vger.kernel.org References: <0efe132b-b343-4438-bb00-5a4b82722ed3@moroto.mountain> <08c9f970-3007-461a-b9f9-9ab414024f68@web.de> Content-Language: en-GB From: Markus Elfring In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:CTdIMvqo4D4qp88LUdaGqZIeHr1rsg3dFK6XkIHsGrHhX8hygEY xeM1L1NTweuW3yDjP7/0iUWobOfG1BjWaTh6I8vwbM+vIvzxR8Rk+KlwJTjzxlTOvCwFLiV +ZneA5TyR0xTkqnQYujVvGiIS4L4sz89Ic4B4ewElUyLvHfwQP8x1gHUbg0FmhebGh9xuHv M5jekW0cafP2FWuE+PxZg== UI-OutboundReport: notjunk:1;M01:P0:q96qtKu9Jgg=;9ZP3rm0Jn0OfUlIbeNEbpN9nU/M xn8mc10NleKEXz9b2oluXRoccSYgAKwfacOkizrpDcGDnA9ZWAPjXgL0sHcLDNA893XhI5baF Za+a0Dk7zhjy1NtgOnvWyo1VV/UazU3K/hCP7pN5n3u0QSt2GaCFi6B4yHoUq2Ca1IkSiKgGf mPBqFcSyKwCofpDzEZzRMioDXbCcVphpYLX1UZmKVTZ9kWB3QeTYLNPiqwEXvYtoH6y7PVkPZ 8/AAtegyu4TxtA55uI1LMi1g3y/oTkScC1n2JyvuIZSTyd+P7Aiu0/zI0sVEV6Fvh6LXyo9ar HMVXM/t+fcB0cwP1jVYymweYswOrSkcjfxA1D3tHaPhbFU+36QYNWLxDc64kVOMFVAsqL1EN0 t9Fdg+UXNwFhJznxczvf6pUV+ji9bp/9YQsoglcoc0iCQgxAVv9QWk/lfReVIiThk9d5nxPGD iPz3nrl6c5FQlW0yHtfCg+x3RHaPKHSL7OXjG3R/sNIvaVD4AhynRV20X00jEHmnwwoqpQkUs WsH+pdc69FXbRYfMOxKH8Nx1DnTeFcs9qhzXhkq9Njp5il1TpSkUv5u9bzUo/u7dIXM3Eluur q7getxrKfv/PYUUZlRrQgVuVBQYrllnrQLWWhxGdR6eyA6NOnpefkkkpH4yVGdRsqY+AgeV0V t5Qb7luwnYivTUSN3geuL32ZCRpS6mL0G+CQx3wjQxVFmD2kU47/FShQQqTnLsedVWrq40npN IYjTeRXrsJeAvWv2mPe+RLXDx2BghdjxTKoeGWSVVioGfXoUHr2SkEU7v2By3wcXP3FoJWrkH BFs1R1u8LpCFyGRh9sx5j5NlL9a4aTob4DGb4OPMaPmFc= X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de; s=s29768273; t=1711286567; x=1711891367; i=markus.elfring@web.de; bh=MTqIB3naOtDYLJf0K8rUUG6vL07A9g5twS2/717iwn0=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From: In-Reply-To; b=kQMkCT8m4qnhAjinVUeBCnUPEwveJL7b1XTagYv/8FdtFu0EMKMtUIVVYCqVa75w /3c8fG62V4M24e7nUi2Enyopu0uwExw8XTJCPsS3EWipxVW+O4tajAz/IHmfoVwCG QmQVAsYLSHWt403NGLaumyQ9pAf6LTTQgM8qUEJMwKJ350RlMU5gcN7hAYUyXs+hE TEEDsGYslfqrRz9XhPkwr+kZ1M3V2aH3Z8CGhIXr/bqXN40sio2duh7KaQnR3A67W IuZ0efVRBu4RdU3f7bm2EngEiq5zm15a+GgprRFRFO0dYlj8kvmBAiDtU6Hd4pqSR PyFMe0qAYgOviryUZg== X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=web.de X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=web.de header.i=markus.elfring@web.de header.a=rsa-sha256 header.s=s29768273 header.b=kQMkCT8m Subject: Re: [Intel-wired-lan] [v2] ice: Fix freeing uninitialized pointers X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Pucha Himasekhar Reddy , Paolo Abeni , Jiri Pirko , Kees Cook , Tony Nguyen , Przemek Kitszel , Lukasz Czapnik , LKML , Julia Lawall , Alexander Lobakin , Eric Dumazet , David Laight , Maciej Fijalkowski , Jakub Kicinski , Dan Williams , Andy Shevchenko , "David S. Miller" , Jonathan Cameron Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" >>> Automatically cleaned up pointers need to be initialized before exitin= g >>> their scope. In this case, they need to be initialized to NULL before >>> any return statement. >> >> * May we expect that compilers should report that affected variables >> were only declared here instead of appropriately defined >> (despite of attempts for scope-based resource management)? >> > > We disabled GCC's check for uninitialized variables a long time ago > because it had too many false positives. Can further case distinctions (and compilation parameters) become more hel= pful according to the discussed handling of the attribute =E2=80=9C__cleanup=E2= =80=9D (or =E2=80=9C__free=E2=80=9D)? >> * Did you extend detection support in the source code analysis tool =E2= =80=9CSmatch=E2=80=9D >> for a questionable implementation detail? > > Yes. Smatch detects this as an uninitialized variable. Does the corresponding warning indicate requirements for scope-based resou= rce management? Regards, Markus