[PATCH] MTD: add missing put_chip() in cfi_intelext_reset()

Antonio Ospite ospite at studenti.unina.it
Fri Oct 23 16:37:04 EDT 2009


On Fri, 23 Oct 2009 16:02:42 -0400 (EDT)
Nicolas Pitre <nico at fluxnic.net> wrote:

> 
> Signed-off-by: Nicolas Pitre <nico at fluxnic.net>
> 
> ---
> 
> On Fri, 23 Oct 2009, Antonio Ospite wrote:
> 
> > Hi,
> > 
> > I am attaching a trace of a possible recursive locking in
> > cfi_cmdset_0001.c
> 
> This patch should fix it.
> 
> diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c
> index e7563a9..d923a2d 100644
> --- a/drivers/mtd/chips/cfi_cmdset_0001.c
> +++ b/drivers/mtd/chips/cfi_cmdset_0001.c
> @@ -2564,6 +2564,7 @@ static int cfi_intelext_reset(struct mtd_info *mtd)
>  		if (!ret) {
>  			map_write(map, CMD(0xff), chip->start);
>  			chip->state = FL_SHUTDOWN;
> +			put_chip(map, chip, chip->start);
>  		}
>  		spin_unlock(chip->mutex);
>  	}

I've just tested this and it seems to fix the issue, indeed.

Many thanks,
   Antonio

-- 
Antonio Ospite
http://ao2.it

PGP public key ID: 0x4553B001

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20091023/f1d14f07/attachment.sig>


More information about the linux-mtd mailing list