Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp2934762ybn; Thu, 26 Sep 2019 21:11:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqzgaQF3cx/GUIKUOBMWIY4GdC5wlSt5cPY7MtVFiaeWXM5ZV2XBS9sOCYlbQPB9mkupF5b7 X-Received: by 2002:a50:886d:: with SMTP id c42mr2383590edc.24.1569557497555; Thu, 26 Sep 2019 21:11:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569557497; cv=none; d=google.com; s=arc-20160816; b=FUJ8Taegv6+Dhs0iqOW9rEmX7ACjTdcf73duQGc7UADE8dAB1zXmthWzlbGT/vpKn4 wkK3nyE3WI1ssYjPxP+sLWPfUyFkp/38mKD80xoSouFxOb9hCgqxQeSU/2NW6uHBjL9X rAK8lAZKiudEOEM/cNppTdzSAvF11rWr3XujUtWzt1WP4/dpPrIP5sjYDq+RWCJsToUY uXpPpoQNfIY1BbrFheGNpW3PX2W6tovMGF/ssKs1yId9rjYZkiJqg6vpbIjBk0iEGzRF H9ZOazY5Uh+4oF+exnG0ZGMgo/LvLG6a9qHsch9zWXgVmYHgp4xb8RSA7QRvsnkcoxz9 Zh5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=BfnW1geNlZntFzHhhafondPp7xi7VUdjL4d8br8k48s=; b=xN/5gyoE66HPP2AeJrq35oDgKLSgOB2lpkn7I2SiQQTRwjQDo8OtINmdt30SwJLbj8 z3UqPeSvrdNkZs565Tl+I9oGb0U3b204CJT/M57E/8tAJZN1LjNDMZUtidP8PS2rB6Mw LshKDf3N7LKMQuTvr8w6Eb7ayE44OZDdA3+MbWw90DXNRYUvTdElSFBrfFz6BtwvI8VN 5kd96LHiY3TXTebb6JpU3YLnW0uo+8/s5Sqtbhg5PJKaFBJwfiFo7unn4WjMmR8cOpI+ ouAOzWHabIVYQFjL7NGpL74/sPK2tINyIwS/yW1YvKjshHw4pnAQYbxCwbMqNC7/CAEB VNKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=GWjOg7hA; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d32si791375eda.266.2019.09.26.21.10.59; Thu, 26 Sep 2019 21:11:37 -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=@broadcom.com header.s=google header.b=GWjOg7hA; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726423AbfI0EI0 (ORCPT + 99 others); Fri, 27 Sep 2019 00:08:26 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:38247 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725996AbfI0EIZ (ORCPT ); Fri, 27 Sep 2019 00:08:25 -0400 Received: by mail-lj1-f195.google.com with SMTP id b20so1075735ljj.5 for ; Thu, 26 Sep 2019 21:08:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BfnW1geNlZntFzHhhafondPp7xi7VUdjL4d8br8k48s=; b=GWjOg7hAWeNKEAqI14L4QbbKnwL23NwjZMENto5mq3AH4u9lQk53TtFLJzFWCA6lhy AIVyF8U7Euw+hssY2cxq3vjTKHD/P5o3cSCvKiQ2GEZA19LynPWy3hJxnwMtBdh9pSNU NIOGzSw9tC/L9i9LVUjQ3VAkZ4zfDzpwUR9gc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BfnW1geNlZntFzHhhafondPp7xi7VUdjL4d8br8k48s=; b=kEVYWo+Zj38yEZ/PlbkinO22oibnUMQyXMnRxqFEXVummjQ0EyWiWBXkRT2F2vuj5/ N8Gd7gFZwePdfr01WL0Fd/XTY8kNaIafo9Maz/SomCrT23y1Ic6GKTxfvp32E0Qi8I09 uClcg2QR7pTDGrhXjntIH+em5K1liJXDK3bn/E+Q/EmhFBw9bgAbKTX+67kcIb3Nhabp LtiSOqkpZkRhRXcI5bCOHH7euSNkwcZJhYvWpnpFJZglmd5oBA6VviGVV7/r+U82zQGu mA6Cma5VZ1t3d6q/S684azrHYGrmNP7/y+VseSOu9DjpHXqCgsm9VVMHwwJLOgAF7jzW mTLg== X-Gm-Message-State: APjAAAVJa85dlG1b7ZBbjr/ww8A0ROQJgcfFKX49MAUHh331FnAsIccm yh8cTHWdmIfib50aYIEx4v298xIz1VtAmJMWVlv1Eg== X-Received: by 2002:a2e:3201:: with SMTP id y1mr1258100ljy.5.1569557303271; Thu, 26 Sep 2019 21:08:23 -0700 (PDT) MIME-Version: 1.0 References: <1547100464-7020-1-git-send-email-rayagonda.kokatanur@broadcom.com> <3d5497d8-7275-1461-8b59-b3695838be45@broadcom.com> In-Reply-To: <3d5497d8-7275-1461-8b59-b3695838be45@broadcom.com> From: Rayagonda Kokatanur Date: Fri, 27 Sep 2019 09:38:12 +0530 Message-ID: Subject: Re: [PATCH] dmaengine: bcm-sba-raid: Handle mbox_request_channel failure To: Vinod Koul Cc: Dan Williams , dmaengine@vger.kernel.org, Linux Kernel Mailing List , BCM Kernel Feedback , Ray Jui Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Vinod, Did you get chance to review this fix? 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