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] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 9 Jul 2015 09:48:13 +0800
From:	Koro Chen <koro.chen@...iatek.com>
To:	Mark Brown <broonie@...nel.org>
CC:	<perex@...ex.cz>, <tiwai@...e.de>, <lgirdwood@...il.com>,
	<srv_heupstream@...iatek.com>, <linux-kernel@...r.kernel.org>,
	<alsa-devel@...a-project.org>, <bardliao@...ltek.com>,
	<oder_chiou@...ltek.com>
Subject: Re: [PATCH 1/2] ASoC: rt5645: Fix missing free_irq

On Wed, 2015-07-08 at 12:14 +0100, Mark Brown wrote:
> On Wed, Jul 08, 2015 at 04:25:50PM +0800, Koro Chen wrote:
> 
> > The driver does not free irq if snd_soc_register_codec fails.
> > It does not return error when request irq failed, either.
> > Fix this by using devm_request_threaded_irq(), and returns when error.
> 
> Unfortunately this isn't safe...
> 
> > -	if (i2c->irq)
> > -		free_irq(i2c->irq, rt5645);
> > -
> >  	cancel_delayed_work_sync(&rt5645->jack_detect_work);
> 
> This work item is queued up by the interrupt handler so we need to
> unregister the interrupt before we cancel any pending work otherwise
> it's possible that the interrupt may fire after we cancelled the work.
Thank you for seeing this, I didn't notice the delayed work.
Do you think I should use devm_request_threaded_irq(), and change
free_irq to devm_free_irq in remove? Or I should keep the original
request_thread_irq(), and just add a free_irq() during probe failed?
 


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ