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 05B79C4332F for ; Wed, 14 Dec 2022 08:27:00 +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=r3yU5ZiifiGNRVObU6/wr1gse/TLVb/W6UYdsBhb20M=; b=n9AhZbpL5KlFwP pUOpQWydMBsb1Ae0Z7juXqaJ3UQsg6PAHm86lpKVAzJAiuCGZkku2XcREaF3m/iqbU1vLHM4bAi6X 0rZIAYhASIB7h6sIwJLQ3nnd0B/eqgW40iinjKHSrK66t1qPp8AVCKJimU8rklFBQbazrdWk/chF4 IxWELye1WKQwv5F7UhSkBLYGcaMaRzKh+/MXXSkQvlhOgDdU7huwE48B3svLZSh+h9ZxG2q7t4dU3 l4fiv7NCyoaOBv33hmZWc9amCj7I+dBV13VMSuxKJIstOWl3BMYpisFCrncAIq9naJY2MnQVKa3JW PSnXZ7477ErnX76+/MKg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p5N5X-00EW4L-NQ; Wed, 14 Dec 2022 08:26:03 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p5N5V-00EW0g-A7 for linux-arm-kernel@lists.infradead.org; Wed, 14 Dec 2022 08:26:02 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id EB630CE180B; Wed, 14 Dec 2022 08:25:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 141E2C433AC; Wed, 14 Dec 2022 08:25:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1671006354; bh=nUhA1KN+yRl+UoxzA4ZvEUH9cmzVGlUJ/vaEO+7pygI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LsbQHL2YXxb5IMvaSJ7+YYdciPjG0QapQJSC0aODWhZWLAA24qZQ+IUljHoQzZVaf Kvgosw3knqxIc+u2CVFEGazvDlgaCKNs+RLLY5wol3TftjXDY3VXc55krmFoHhowjo 0y4RU41w/u/7hgXMVyvBASAKpWQ/uyge07tHMDbw= Date: Wed, 14 Dec 2022 09:25:51 +0100 From: Greg KH To: Jiasheng Jiang Cc: neal_liu@aspeedtech.com, joel@jms.id.au, andrew@aj.id.au, sumit.semwal@linaro.org, christian.koenig@amd.com, linux-aspeed@lists.ozlabs.org, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org Subject: Re: [PATCH v2] usb: gadget: aspeed_udc: Add check for dma_alloc_coherent Message-ID: References: <20221214025414.44866-1-jiasheng@iscas.ac.cn> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20221214025414.44866-1-jiasheng@iscas.ac.cn> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221214_002601_566562_B26486EB X-CRM114-Status: GOOD ( 14.59 ) 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 On Wed, Dec 14, 2022 at 10:54:14AM +0800, Jiasheng Jiang wrote: > Add the check for the return value of dma_alloc_coherent in order to > avoid NULL pointer dereference. > > This flaw was found using an experimental static analysis tool we are > developing, APP-Miner, which has not been disclosed. > > The allyesconfig build using GCC 9.3.0 shows no new warning. As we > don't have a UDC device to test with, no runtime testing was able to > be performed. > > Signed-off-by: Jiasheng Jiang > --- > Changelog: > > v1 -> v2: > > 1. Add "goto err;" when allocation fails. You already sent a previous v2 that differs from this one, this should be v3, right? _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel