[PATCH] ide/ide-cs: fix order of releasing resources

Dominik Brodowski linux at dominikbrodowski.net
Thu Jan 14 05:38:37 EST 2010


On Tue, Jan 12, 2010 at 08:34:54PM +0100, Wolfram Sang wrote:
> ide_detach() called first ide_release() and then release_region(). This
> produced the following warnings:
> 
>   Trying to free nonexistent resource <000000000000c10e-000000000000c10e>
>   Trying to free nonexistent resource <000000000000c100-000000000000c107>
> 
> This is true, because the callchain inside ide_release() is:
> 
>   ide_release -> pcmcia_disable_device -> pcmcia_release_io
> 
> So, the whole io-block is already gone for release_region(). To fix
> this, just swap the order of releasing (and remove the now obsolete
> shadowing).
> 
> Signed-off-by: Wolfram Sang <w.sang at pengutronix.de>
> Cc: Bartlomiej Zolnierkiewicz <bzolnier at gmail.com>
> Cc: "David S. Miller" <davem at davemloft.net>
Acked-by: Dominik Brodowski <linux at dominikbrodowski.net>

Best,
	Dominik



More information about the linux-pcmcia mailing list