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]
Message-ID: <51DADF3E.1000802@monstr.eu>
Date:	Mon, 08 Jul 2013 17:48:14 +0200
From:	Michal Simek <monstr@...str.eu>
To:	Mark Brown <broonie@...nel.org>
CC:	Michal Simek <michal.simek@...inx.com>,
	linux-kernel@...r.kernel.org,
	linux-spi <linux-spi@...r.kernel.org>,
	Grant Likely <grant.likely@...aro.org>,
	spi-devel-general@...ts.sourceforge.net
Subject: Re: [PATCH v1 3/4] spi/xilinx: Simplify irq allocation

On 07/08/2013 04:49 PM, Mark Brown wrote:
> On Mon, Jul 08, 2013 at 03:29:16PM +0200, Michal Simek wrote:
>> Use devm_request_irq() for irq allocation which
>> simplify driver code.
> 
>> @@ -495,7 +493,6 @@ static int xilinx_spi_remove(struct platform_device *pdev)
>>  	struct xilinx_spi *xspi = platform_get_drvdata(pdev);
>>
>>  	spi_bitbang_stop(&xspi->bitbang);
>> -	free_irq(xspi->irq, xspi);
>>
>>  	spi_master_put(xspi->bitbang.master);
> 
> Is it definitely safe to leave the IRQ hanging around after the master
> has been freed - there's no possibility of a late error interrupt or
> something?

I think it is more generic question if this race condition is fine
for all drivers which are using devres groups.

I have just looked at it and devres_release_all() is called where
driver is unload and irq are disabled there.

It means that all handlers should be unregistered and if IRQ happen
after it then it should be handled by Linux kernel if driver
doesn't disable it.

btw: What's the proper way for spi driver unregistration?

spi_unregistered_master() (which also free private structure)
and
spi_master_put()?

Thanks,
Michal

-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform



Download attachment "signature.asc" of type "application/pgp-signature" (264 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ