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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 C9878CD5BC2 for ; Thu, 13 Nov 2025 10:57:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=otlNO0CfgXL9gTNZ7R4b+ThSCRxp0enRmEIlgoxjAr0=; b=VosMaeAYW96KVy7ABhHKY/Litm 7cFw/Nlj0ECqDSfLHwxqBxkJJCC2u56K+ILPlx17RZ3MXF6BYtXPZv7R3SDhD76jSUsgPerFy7Oqw nvmxyBSw/xLmeEXIYWDCDpd7Thv2MVkOv/UtxFRP0QwB3LXEwp92oEN7zUmYFbcXvol+emEkFncSB J/jpxtu3I1e5NLTFc/EtOXlIoolN6pXnBhMpX/eAUZ++JZO25HNd9S+Uk4IO/6u+9Dbp9UZyV5V7O JqBONFSzHarHDXPGJzC88/yXPHxiocpTwBLQlZFrcIx57Z/dAUb2pLebbJyUwFk9iMOMWPpQpyeq4 yVKlMZ8w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vJV0g-0000000ALEa-3l17; Thu, 13 Nov 2025 10:57:02 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vJV0c-0000000ALCa-2q1a for linux-arm-kernel@lists.infradead.org; Thu, 13 Nov 2025 10:56:59 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 259DB1477; Thu, 13 Nov 2025 02:56:49 -0800 (PST) Received: from pluto (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D24CB3F792; Thu, 13 Nov 2025 02:56:55 -0800 (PST) Date: Thu, 13 Nov 2025 10:56:53 +0000 From: Cristian Marussi To: Ally Heev Cc: Sudeep Holla , Cristian Marussi , arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Dan Carpenter Subject: Re: [PATCH] arm: fix uninitialized pointers with free attr Message-ID: References: <20251105-aheev-uninitialized-free-attr-arm-v1-1-f7b6cb5d3361@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20251105-aheev-uninitialized-free-attr-arm-v1-1-f7b6cb5d3361@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20251113_025658_752085_5AC65428 X-CRM114-Status: GOOD ( 10.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Nov 05, 2025 at 07:37:52PM +0530, Ally Heev wrote: > Uninitialized pointers with `__free` attribute can cause undefined > behaviour as the memory assigned(randomly) to the pointer is freed > automatically when the pointer goes out of scope Hi, > > arm doesn't have any bugs related to this as of now, but > it is better to initialize and assign pointers with `__free` attr > in one statement to ensure proper scope-based cleanup > Thanks for this, I agree that it is better to stick to the intended usage-pattern in order to avoid future issues when the nearby code changes; for this reason I would also NOT add a Fix tag (...like you effectively did NOT...just to clarify why :P) Reviewed-by: Cristian Marussi Thanks, Cristian