From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Slavin Liu <bolin.liu@seu.edu.cn>
Cc: shengjiu.wang@gmail.com, xiubo.lee@gmail.com,
lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz,
tiwai@suse.com, festevam@gmail.com, nicoleotsuka@gmail.com,
error27@gmail.com, linux-sound@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ASoC: fsl_asrc: fix second front-end channel check
Date: Mon, 28 Sep 2026 11:59:30 +0300 [thread overview]
Message-ID: <aroscgugYoeB-HKM@ashevche-desk.local> (raw)
In-Reply-To: <20260927000738.10105-1-bolin.liu@seu.edu.cn>
On Sun, Sep 27, 2026 at 08:07:38AM +0800, Slavin Liu wrote:
> Commit b045248399d0 ("ASoC: fsl_asrc: Replace dma_request_slave_channel()
> by dma_request_chan()") made ->get_dma_channel() propagate error
> pointers, so the !NULL check added by commit b4136c0d69ea ("ASoC:
> fsl_asrc: check the second front-end DMA channel") no longer catches
> failures and the error pointer would be dereferenced at
> tmp_chan->private.
>
> Use IS_ERR() and propagate the error, keeping the release of the
> previously acquired persistent Front-End channel.
...
> /* Get DMA request of Front-End */
> tmp_chan = asrc->get_dma_channel(pair, dir);
> - if (!tmp_chan) {
> + if (IS_ERR(tmp_chan)) {
> dma_release_channel(pair->dma_chan[!dir]);
> pair->dma_chan[!dir] = NULL;
> - return -EINVAL;
> + return PTR_ERR(tmp_chan);
I believe this has to be left untouched as it might leak to user space.
> }
...
I also wondering why Sashiko hasn't pointed that out during the original
submission...
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2026-09-28 8:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-27 0:07 Slavin Liu
2026-09-28 8:59 ` Andy Shevchenko [this message]
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=aroscgugYoeB-HKM@ashevche-desk.local \
--to=andriy.shevchenko@linux.intel.com \
--cc=bolin.liu@seu.edu.cn \
--cc=broonie@kernel.org \
--cc=error27@gmail.com \
--cc=festevam@gmail.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=nicoleotsuka@gmail.com \
--cc=perex@perex.cz \
--cc=shengjiu.wang@gmail.com \
--cc=tiwai@suse.com \
--cc=xiubo.lee@gmail.com \
/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®