Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp4257480ybp; Mon, 14 Oct 2019 01:31:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqyXikyu4rGUxVF8GUBUNjpOHwgBLMfuvS9IsKG+scNnjagz/EeR2jaJoBgO88iFYGwbL1FP X-Received: by 2002:a50:f742:: with SMTP id j2mr26701708edn.253.1571041876999; Mon, 14 Oct 2019 01:31:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571041876; cv=none; d=google.com; s=arc-20160816; b=bUEKqi5VFb8z090mqqNTkZkCvma9+2RAdErMIGONJkUlo4WpxI04Lrnwm069bIkIgW 2kGUZXOvGg3DDJmBoNxkIWHFkbUhBIHE7gcccDTLfKfWIREK2kYsr76riKCWCI1iQTMY Pwq4wFYxoHwhEy9IbCYKt0OyXyB7zOyelgNgsJ4f3YjYxlL03y83JVw/GZ20y2ZOkAVG PWA2ZYLxFpSrXXrRchXp07gwrlMrZQP4FtnWIeSfHvvgGU57GnLbIR/LYWjeIlb1TCT8 boMWzTvqtPEaBwGf37Bf1y47DO7gIY+RMgfhowT3EHlSFU7qyZLenrRugKLW46cJS7SV T0WA== 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=6LyI+i5Az8CSRwDWhNnk+lV8Lka7EqUseEURwTA/yBI=; b=v5JE2eyzPnUmuNL8ZKr0Wuke0MZf9OvbjeOiGjDXbs3CB49QVlvlTlsRFMErWQm9SV VOAuZa4lmHkAEEh3hyhUSCGzcmsYNN2V8sJPzyc6H1LoPEcsyCtoFpGMkJ0dEoUZVBAN kYAQz4D70Wis22f5W69Dp6arvwg/I0XLwjJGsOPR89u9gQyYS8gFIEv5StYtzkEY7N6i cistEW1u1H+jDcRDQL1BKho1GCONHL9wwOeIXcUDHeKsCq0HztYlhFevdqSGJXi+2wzz +/moFnXNoCzc17ucuCJGKbfRtJW8xgXsujY88lA8milEYmg8ZABymq4kUFZnSPttZxA0 BU9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HL4tcFX8; 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 sa23si10571773ejb.289.2019.10.14.01.30.54; Mon, 14 Oct 2019 01:31:16 -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=HL4tcFX8; 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 S1730450AbfJNIah (ORCPT + 99 others); Mon, 14 Oct 2019 04:30:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:56832 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725936AbfJNIah (ORCPT ); Mon, 14 Oct 2019 04:30:37 -0400 Received: from localhost (unknown [122.167.124.160]) (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 83B5C20873; Mon, 14 Oct 2019 08:30:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1571041836; bh=pzx2a4+gtimMDY/H1zTjMD6F+r1Ky2VYeb6/PVRnv84=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HL4tcFX850OdWfyKl5gMt1JCpVNADA3j8KOlJWHeBOTak1X7EAHgqheIovTpuevmZ +Qxs7ilLooplHcmWIyG2Vgw8ERibstkgTEHKE1CeiBCrL+9nz7sTAe0WiqNDRuBari LD1kzyW/ZGJZznbyYn/rJWdzUhK5FgjkXQOyCOaU= Date: Mon, 14 Oct 2019 14:00:31 +0530 From: Vinod Koul To: Rayagonda Kokatanur Cc: Vinod Koul , Dan Williams , dmaengine@vger.kernel.org, Linux Kernel Mailing List , BCM Kernel Feedback , Ray Jui Subject: Re: [PATCH] dmaengine: bcm-sba-raid: Handle mbox_request_channel failure Message-ID: <20191014083031.GP2654@vkoul-mobl> References: <1547100464-7020-1-git-send-email-rayagonda.kokatanur@broadcom.com> <3d5497d8-7275-1461-8b59-b3695838be45@broadcom.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rayagonda, On 27-09-19, 09:38, Rayagonda Kokatanur wrote: > Hi Vinod, > > Did you get chance to review this fix? Please do *not* top post And on your question, sorry this is not in my queue somehow, please rebase and repost > > Best regards, > Rayagonda > > > On Thu, Jan 10, 2019 at 11:06 PM Ray Jui wrote: > > > > > > > > On 1/9/2019 10:07 PM, Rayagonda Kokatanur wrote: > > > Fix kernel NULL pointer dereference error when mbox_request_channel() > > > fails to allocate channel. > > > > > > Fixes: 4e9f8187aecb ("dmaengine: bcm-sba-raid: Use only single mailbox channel") > > > Signed-off-by: Rayagonda Kokatanur > > > --- > > > drivers/dma/bcm-sba-raid.c | 3 ++- > > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > > > diff --git a/drivers/dma/bcm-sba-raid.c b/drivers/dma/bcm-sba-raid.c > > > index 72878ac5c78d..77ae74663a45 100644 > > > --- a/drivers/dma/bcm-sba-raid.c > > > +++ b/drivers/dma/bcm-sba-raid.c > > > @@ -1690,7 +1690,7 @@ static int sba_probe(struct platform_device *pdev) > > > sba->mchan = mbox_request_channel(&sba->client, 0); > > > if (IS_ERR(sba->mchan)) { > > > ret = PTR_ERR(sba->mchan); > > > - goto fail_free_mchan; > > > + goto fail_exit; > > > } > > > > > > /* Find-out underlying mailbox device */ > > > @@ -1747,6 +1747,7 @@ static int sba_probe(struct platform_device *pdev) > > > sba_freeup_channel_resources(sba); > > > fail_free_mchan: > > > mbox_free_channel(sba->mchan); > > > +fail_exit: > > > return ret; > > > } > > > > > > > > > > Looks good to me. > > > > Reviewed-by: Ray Jui -- ~Vinod