From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=atomide.com header.i=@atomide.com header.b="k5bhQcCF" Received: from mail5.25mail.st (mail5.25mail.st [74.50.62.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB44A1BF5; Thu, 30 Nov 2023 03:57:53 -0800 (PST) Received: from localhost (91-158-86-216.elisa-laajakaista.fi [91.158.86.216]) by mail5.25mail.st (Postfix) with ESMTPSA id 35D6A6034B; Thu, 30 Nov 2023 11:57:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=atomide.com; s=25mailst; t=1701345472; bh=cP8eSb8jKdfgJGwJRQtVpwSbgMvX8Br+LyBBn0EHR2M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=k5bhQcCF84gIRBBurvlXmR1Wd1qeBmSi7rLN8alTMxinFOjc5w366P8I0ANKE848L ygNfVf/NSPZetc7k5tv03AqumVQhGrtVNqX/iZLeVard2oXoH2GCbBZTf5j3RnNFVv d6irNYV8157bYt8oOrWtE6ctKiNZDX9Y1q0KVxgO6YgEhtYdd3yri63a3lLuBDQthZ 1UJRT1IdTDWSD/Mp25PVe5mctf+0FpdQ+Nx/9BKMAaej4O3iSBjkiEsHSFNyillvub Dyl5H994hD7tui3n1AODZ4MMJ1WPQzLoZLCyJ5J/0nPTvTBeel2TCQ7RJZAccH7c4B Cj8C+9IPmZDoQ== Date: Thu, 30 Nov 2023 13:57:36 +0200 From: Tony Lindgren To: Kunwu Chan Cc: linux@armlinux.org.uk, ruslan.bilovol@ti.com, linux-omap@vger.kernel.org, kunwu.chan@hotmail.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ARM: OMAP2+: Fix null pointer dereference and memory leak in omap_soc_device_init Message-ID: <20231130115736.GB5169@atomide.com> References: <20231123145237.609442-1-chentao@kylinos.cn> Precedence: bulk X-Mailing-List: linux-omap@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231123145237.609442-1-chentao@kylinos.cn> * Kunwu Chan [231123 16:53]: > kasprintf() returns a pointer to dynamically allocated memory which can > be NULL upon failure. When 'soc_dev_attr->family' is NULL,it'll trigger > the null pointer dereference issue, such as in 'soc_info_show'. Applying into fixes thanks. Tony 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 2757BC4167B for ; Thu, 30 Nov 2023 11:58:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rilnAZ1K6Du6J5O1U7yRpqFR645dKnyjxRH9K244mJQ=; b=eeGgw94Kg4/zY0 0lDlQ5kRyrLZt1vkhm9svs9SmmPX2ca/IAxNk5xQcyanP1R352Asw/4tSy1j92d1OpyKRiY5G2K4X t2bcqTQy+ZjfVZuuE1nWK2G7vjJpfz5wIzS548eb8RoAKW08VyuwcWegIYeR2atILfFj5jbtMTGVF jDgCjrh2g5U8Ubwu9LD80dsxRvobXRNw53SbWWQ4zTIMjuudCnvwOxGCi1gLqu8k5boX6zH8QirGE 4DAV5Pdv/55XBTBWZmJtR96BMTTiZTl6APrqpgY7mNEt4/js0Nx0ElR1Dn6Lix5ACr70EUcvMiJk8 q5akgOGXIMkyg3f3mHJA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r8fgP-00Akgm-2e; Thu, 30 Nov 2023 11:58:17 +0000 Received: from mail5.25mail.st ([74.50.62.9]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r8fg5-00AkRg-2I for linux-arm-kernel@lists.infradead.org; Thu, 30 Nov 2023 11:57:58 +0000 Received: from localhost (91-158-86-216.elisa-laajakaista.fi [91.158.86.216]) by mail5.25mail.st (Postfix) with ESMTPSA id 35D6A6034B; Thu, 30 Nov 2023 11:57:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=atomide.com; s=25mailst; t=1701345472; bh=cP8eSb8jKdfgJGwJRQtVpwSbgMvX8Br+LyBBn0EHR2M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=k5bhQcCF84gIRBBurvlXmR1Wd1qeBmSi7rLN8alTMxinFOjc5w366P8I0ANKE848L ygNfVf/NSPZetc7k5tv03AqumVQhGrtVNqX/iZLeVard2oXoH2GCbBZTf5j3RnNFVv d6irNYV8157bYt8oOrWtE6ctKiNZDX9Y1q0KVxgO6YgEhtYdd3yri63a3lLuBDQthZ 1UJRT1IdTDWSD/Mp25PVe5mctf+0FpdQ+Nx/9BKMAaej4O3iSBjkiEsHSFNyillvub Dyl5H994hD7tui3n1AODZ4MMJ1WPQzLoZLCyJ5J/0nPTvTBeel2TCQ7RJZAccH7c4B Cj8C+9IPmZDoQ== Date: Thu, 30 Nov 2023 13:57:36 +0200 From: Tony Lindgren To: Kunwu Chan Cc: linux@armlinux.org.uk, ruslan.bilovol@ti.com, linux-omap@vger.kernel.org, kunwu.chan@hotmail.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ARM: OMAP2+: Fix null pointer dereference and memory leak in omap_soc_device_init Message-ID: <20231130115736.GB5169@atomide.com> References: <20231123145237.609442-1-chentao@kylinos.cn> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20231123145237.609442-1-chentao@kylinos.cn> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231130_035757_804888_DD5B5685 X-CRM114-Status: UNSURE ( 7.92 ) X-CRM114-Notice: Please train this message. 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org * Kunwu Chan [231123 16:53]: > kasprintf() returns a pointer to dynamically allocated memory which can > be NULL upon failure. When 'soc_dev_attr->family' is NULL,it'll trigger > the null pointer dereference issue, such as in 'soc_info_show'. Applying into fixes thanks. Tony _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel