lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b8a7f1d6-be84-4387-9ef9-b6ec91da69f7@stanley.mountain>
Date: Mon, 20 Jan 2025 13:32:46 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Claudiu Beznea <claudiu.beznea@...on.dev>
Cc: Biju Das <biju.das.jz@...renesas.com>,
	Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>,
	Liam Girdwood <lgirdwood@...il.com>,
	Mark Brown <broonie@...nel.org>, Jaroslav Kysela <perex@...ex.cz>,
	Takashi Iwai <tiwai@...e.com>, linux-sound@...r.kernel.org,
	linux-renesas-soc@...r.kernel.org, linux-kernel@...r.kernel.org,
	kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] ASoC: renesas: rz-ssi: Clean up on error in probe()

On Fri, Jan 17, 2025 at 01:51:55PM +0200, Claudiu Beznea wrote:
> > -			if (ret < 0)
> > -				return dev_err_probe(dev, ret,
> > -						"irq request error (dma_rx)\n");
> > +			if (ret < 0) {
> > +				dev_err_probe(dev, ret,
> > +					      "irq request error (dma_rx)\n");
> > +				goto err_release_dma_chs;
> > +			}
> >  		}
> >  	}
> 
> The code block ending here is entered only if !rz_ssi_is_dma_enabled(). If
> that is true there are no DMA channel to be released. Maybe better would be
> to move this code block on the failure path of the rz_ssi_dma_request() as
> also proposed here:
> https://lore.kernel.org/all/CAMuHMdU+_NuLp2FuwwcLfJRe2ssMtp=z7fqcsANgYfFehTNJGg@mail.gmail.com/
> 

Aw crud...  Thanks for the review.  Cut and pasting the code seems like
probably the right answer.  It's not a hard patch to write, but I don't
have the hardware so I can't test it.  The existing ordering feels tricky
enough that there is probably a reason for it which I just can't see off
the top of my head...

Let me think about this some more.

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ