diff mbox

MTD: add missing put_chip() in cfi_intelext_reset()

Message ID alpine.LFD.2.00.0910231559320.21460@xanadu.home
State Accepted
Commit c9f7ec30848637989b85a9f0ac5d4aa33c49916e
Headers show

Commit Message

Nicolas Pitre Oct. 23, 2009, 8:02 p.m. UTC
Signed-off-by: Nicolas Pitre <nico@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.

Comments

Antonio Ospite Oct. 23, 2009, 8:37 p.m. UTC | #1
On Fri, 23 Oct 2009 16:02:42 -0400 (EDT)
Nicolas Pitre <nico@fluxnic.net> wrote:

> 
> Signed-off-by: Nicolas Pitre <nico@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 Nov. 20, 2009, 10:14 a.m. UTC | #2
On Fri, 23 Oct 2009 16:02:42 -0400 (EDT)
Nicolas Pitre <nico@fluxnic.net> wrote:

> 
> Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
>

Hi, has this fix been submitted yet?
I can't see it in 2.6.32-rc8.

Thanks,
   Antonio

> ---
> 
> 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);
>  	}
Artem Bityutskiy Nov. 26, 2009, 7:01 a.m. UTC | #3
On Fri, 2009-11-20 at 11:14 +0100, Antonio Ospite wrote:
> On Fri, 23 Oct 2009 16:02:42 -0400 (EDT)
> Nicolas Pitre <nico@fluxnic.net> wrote:
> 
> > 
> > Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
> >
> 
> Hi, has this fix been submitted yet?
> I can't see it in 2.6.32-rc8.

The current situation indicates it is not going to be there.

This patch is in my l2-mtd tree, though.
Antonio Ospite Nov. 26, 2009, 9:22 a.m. UTC | #4
On Thu, 26 Nov 2009 09:01:18 +0200
Artem Bityutskiy <dedekind1@gmail.com> wrote:

> On Fri, 2009-11-20 at 11:14 +0100, Antonio Ospite wrote:
> > On Fri, 23 Oct 2009 16:02:42 -0400 (EDT)
> > Nicolas Pitre <nico@fluxnic.net> wrote:
> > 
> > > 
> > > Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
> > >
> > 
> > Hi, has this fix been submitted yet?
> > I can't see it in 2.6.32-rc8.
> 
> The current situation indicates it is not going to be there.
> 
> This patch is in my l2-mtd tree, though.
>

Ok, thanks, I just want to be sure this will find its way to
mainline, I don't care which path it takes :)

> -- 
> Best Regards,
> Artem Bityutskiy (Артём Битюцкий)
> 

Regards,
   Antonio
diff mbox

Patch

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);
 	}