mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ray Jui <ray.jui@broadcom.com>
To: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>,
	Vinod Koul <vkoul@kernel.org>
Cc: Dan Williams <dan.j.williams@intel.com>,
	dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
	bcm-kernel-feedback-list@broadcom.com
Subject: Re: [PATCH] dmaengine: bcm-sba-raid: Handle mbox_request_channel failure
Date: Thu, 10 Jan 2019 09:36:26 -0800	[thread overview]
Message-ID: <3d5497d8-7275-1461-8b59-b3695838be45@broadcom.com> (raw)
In-Reply-To: <1547100464-7020-1-git-send-email-rayagonda.kokatanur@broadcom.com>



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 <rayagonda.kokatanur@broadcom.com>
> ---
>  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 <ray.jui@broadcom.com>

       reply	other threads:[~2019-01-10 17:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1547100464-7020-1-git-send-email-rayagonda.kokatanur@broadcom.com>
2019-01-10 17:36 ` Ray Jui [this message]
2019-09-27  4:08   ` Rayagonda Kokatanur
2019-10-14  8:30     ` Vinod Koul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3d5497d8-7275-1461-8b59-b3695838be45@broadcom.com \
    --to=ray.jui@broadcom.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=dan.j.williams@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rayagonda.kokatanur@broadcom.com \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®