Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp6835853ybh; Thu, 8 Aug 2019 06:27:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqxJSWmZv2e1mQ/JQfm02tMMNLf2kI2+ZlVvfvhZXvhMYOrPCnxmzgiPe0qtn0GICchtmk/I X-Received: by 2002:a17:90a:376f:: with SMTP id u102mr4145745pjb.5.1565270833957; Thu, 08 Aug 2019 06:27:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565270833; cv=none; d=google.com; s=arc-20160816; b=QxxiO75WTyV/OdxNyj+wBSWB0AwYB63H7Vk8dE9AnkScD7ZfUDy7RhjwxOfCm+/rSf ssjzPvKzgTj13wHDMPM9M2NVIgFX+wUmVVH9/9lwMynw/jEnqvMYr9uVRLnFaTRDTucC JGhrLW0yRPURQpdaFSoSJeIjMvih6qlUW7Uw1INLAZhCxDYRlN6OBex0RZinRvE/5+rV FSCB5P/kZVb4W3Hb4MYTI54kzxrznJnoKpe7x4Fp3F2BPiVl96X1Zqn15VYI9jgtRY3V IVumgyBp1mmjEk9WL3peJqybIAGeA8uWt+/ZssjBtq5DS1vEpMcl601Zml6Btf/s/gXt XwCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=A3Y1b5rR6ep/qW8tUG2RtbrbEPzFfrJ1c4GzRlbLp5Y=; b=CQRfUsX22deL+aYaInco6UIPXWTOver8cYnigIw4GFaHseiCWBShK+OLvfqLyqJQwC PFAIQ8C7CdwaMyuK2sOB+9o2p2pSRjCztljX1DcjILy6dmZHP1dVgXlCU10oBeNXUMZr Gm2jQiZMtTKDn4UvOxol2e+JnQDGQPP1UBefh8/EuV+Yp0OcQkPZIUycPTG4fXv1SweJ D9IgMz/aXQRUy+E66QRwckNzVDNrHEXknV/m/OQP6ZsHdDHfiwi1Dit2nFAtB6elwgmc l9pfD4LIUB0fpvnTTJkGbNNFrdyP6Xb3bvJ4AoK80V9Bz+6mA2lau/LmqXuhEpNRDoH1 j5Fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wdhiSMgE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cj14si49712979plb.141.2019.08.08.06.26.57; Thu, 08 Aug 2019 06:27:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wdhiSMgE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733047AbfHHN0L (ORCPT + 99 others); Thu, 8 Aug 2019 09:26:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:60560 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732643AbfHHN0L (ORCPT ); Thu, 8 Aug 2019 09:26:11 -0400 Received: from localhost (unknown [122.178.245.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B37412171F; Thu, 8 Aug 2019 13:26:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565270770; bh=xOthRltc9QPDcvSfY6/4aGUZsvl14aXcUqTn5d6Zb0c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=wdhiSMgEUzklpKCVFzekiTPw8B+at3lhPkMlMq4SDMz7bagefPWO/3Q+YcDzoHCPg vY90keJnw2raAF5MHo3hox17C8WLQGi9gvALi+W9RX1r1qYdChpA4QJ93ZTn9d6Kam koHNlTvuUSrcY+0LQUue/knLXIFACQjNVu0A19FU= Date: Thu, 8 Aug 2019 18:54:56 +0530 From: Vinod Koul To: Jia-Ju Bai Cc: dan.j.williams@intel.com, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com, dmaengine@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] dma: stm32-mdma: Fix a possible null-pointer dereference in stm32_mdma_irq_handler() Message-ID: <20190808132456.GA12733@vkoul-mobl.Dlink> References: <20190729020849.17971-1-baijiaju1990@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190729020849.17971-1-baijiaju1990@gmail.com> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29-07-19, 10:08, Jia-Ju Bai wrote: > In stm32_mdma_irq_handler(), chan is checked on line 1368. > When chan is NULL, it is still used on line 1369: > dev_err(chan2dev(chan), "MDMA channel not initialized\n"); > > Thus, a possible null-pointer dereference may occur. > > To fix this bug, "dev_dbg(mdma2dev(dmadev), ...)" is used instead. Applied after changing subsystem name in patch title to dmaengine: ..., Also while fixing it helps to add Fixes tag, have added Thanks -- ~Vinod