* [BUG] cfi_cmdset_0001.c: possible recursive locking detected
@ 2009-10-22 22:05 Antonio Ospite
2009-10-23 20:02 ` [PATCH] MTD: add missing put_chip() in cfi_intelext_reset() Nicolas Pitre
0 siblings, 1 reply; 6+ messages in thread
From: Antonio Ospite @ 2009-10-22 22:05 UTC (permalink / raw)
To: linux-mtd; +Cc: openezx-devel
[-- Attachment #1: Type: text/plain, Size: 2629 bytes --]
Hi,
I am attaching a trace of a possible recursive locking in
cfi_cmdset_0001.c
The problem shows up at shutdown, with
CONFIG_MTD_CFI_INTELEXT=y
CONFIG_MTD_PXA2XX=y
Platform is armv5te (Motorola A780 smartphone), but I guess this doesn't
matter. If you think it does, let me know and I'll provide more
information about board code and config.
Thanks,
Antonio Ospite
=============================================
[ INFO: possible recursive locking detected ]
2.6.32-rc2-ezxdev #39
---------------------------------------------
halt/785 is trying to acquire lock:
(&chip->_spinlock){+.+...}, at: [<c01801e0>] get_chip+0xe4/0x1e0
but task is already holding lock:
(&chip->_spinlock){+.+...}, at: [<c01801a4>] get_chip+0xa8/0x1e0
other info that might help us debug this:
2 locks held by halt/785:
#0: ((reboot_notifier_list).rwsem){.+.+..}, at: [<c005d2d0>] __blocking_notifier_call_chain+0x30/0x64
#1: (&chip->_spinlock){+.+...}, at: [<c01801a4>] get_chip+0xa8/0x1e0
stack backtrace:
[<c002fd44>] (unwind_backtrace+0x0/0xe0) from [<c00683a8>] (validate_chain+0x5b0/0xdd8)
[<c00683a8>] (validate_chain+0x5b0/0xdd8) from [<c0069410>] (__lock_acquire+0x840/0x910)
[<c0069410>] (__lock_acquire+0x840/0x910) from [<c006a3b4>] (lock_acquire+0x60/0x74)
[<c006a3b4>] (lock_acquire+0x60/0x74) from [<c02a2cb4>] (_spin_lock+0x40/0x50)
[<c02a2cb4>] (_spin_lock+0x40/0x50) from [<c01801e0>] (get_chip+0xe4/0x1e0)
[<c01801e0>] (get_chip+0xe4/0x1e0) from [<c0180314>] (cfi_intelext_reset+0x38/0x90)
[<c0180314>] (cfi_intelext_reset+0x38/0x90) from [<c0180400>] (cfi_intelext_reboot+0x10/0x1c)
[<c0180400>] (cfi_intelext_reboot+0x10/0x1c) from [<c005d0ac>] (notifier_call_chain+0x2c/0x70)
[<c005d0ac>] (notifier_call_chain+0x2c/0x70) from [<c005d2ec>] (__blocking_notifier_call_chain+0x4c/0x64)
[<c005d2ec>] (__blocking_notifier_call_chain+0x4c/0x64) from [<c005d31c>] (blocking_notifier_call_chain+0x18/0x20)
[<c005d31c>] (blocking_notifier_call_chain+0x18/0x20) from [<c00525a4>] (kernel_shutdown_prepare+0x20/0x38)
[<c00525a4>] (kernel_shutdown_prepare+0x20/0x38) from [<c00525cc>] (kernel_power_off+0x10/0x44)
[<c00525cc>] (kernel_power_off+0x10/0x44) from [<c0053844>] (sys_reboot+0x118/0x1d8)
[<c0053844>] (sys_reboot+0x118/0x1d8) from [<c0029f20>] (ret_fast_syscall+0x0/0x34)
--
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?
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH] MTD: add missing put_chip() in cfi_intelext_reset()
2009-10-22 22:05 [BUG] cfi_cmdset_0001.c: possible recursive locking detected Antonio Ospite
@ 2009-10-23 20:02 ` Nicolas Pitre
2009-10-23 20:37 ` Antonio Ospite
2009-11-20 10:14 ` Antonio Ospite
0 siblings, 2 replies; 6+ messages in thread
From: Nicolas Pitre @ 2009-10-23 20:02 UTC (permalink / raw)
To: Antonio Ospite; +Cc: openezx-devel, linux-mtd
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);
}
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] MTD: add missing put_chip() in cfi_intelext_reset()
2009-10-23 20:02 ` [PATCH] MTD: add missing put_chip() in cfi_intelext_reset() Nicolas Pitre
@ 2009-10-23 20:37 ` Antonio Ospite
2009-11-20 10:14 ` Antonio Ospite
1 sibling, 0 replies; 6+ messages in thread
From: Antonio Ospite @ 2009-10-23 20:37 UTC (permalink / raw)
To: Nicolas Pitre; +Cc: openezx-devel, linux-mtd
[-- Attachment #1: Type: text/plain, Size: 1212 bytes --]
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
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?
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] MTD: add missing put_chip() in cfi_intelext_reset()
2009-10-23 20:02 ` [PATCH] MTD: add missing put_chip() in cfi_intelext_reset() Nicolas Pitre
2009-10-23 20:37 ` Antonio Ospite
@ 2009-11-20 10:14 ` Antonio Ospite
2009-11-26 7:01 ` Artem Bityutskiy
1 sibling, 1 reply; 6+ messages in thread
From: Antonio Ospite @ 2009-11-20 10:14 UTC (permalink / raw)
To: Nicolas Pitre; +Cc: openezx-devel, linux-mtd
[-- Attachment #1: Type: text/plain, Size: 1217 bytes --]
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);
> }
--
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?
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] MTD: add missing put_chip() in cfi_intelext_reset()
2009-11-20 10:14 ` Antonio Ospite
@ 2009-11-26 7:01 ` Artem Bityutskiy
2009-11-26 9:22 ` Antonio Ospite
0 siblings, 1 reply; 6+ messages in thread
From: Artem Bityutskiy @ 2009-11-26 7:01 UTC (permalink / raw)
To: Antonio Ospite; +Cc: openezx-devel, linux-mtd, Nicolas Pitre
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.
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] MTD: add missing put_chip() in cfi_intelext_reset()
2009-11-26 7:01 ` Artem Bityutskiy
@ 2009-11-26 9:22 ` Antonio Ospite
0 siblings, 0 replies; 6+ messages in thread
From: Antonio Ospite @ 2009-11-26 9:22 UTC (permalink / raw)
To: dedekind1; +Cc: openezx-devel, linux-mtd, Nicolas Pitre
[-- Attachment #1: Type: text/plain, Size: 1029 bytes --]
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
--
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?
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-11-26 9:22 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-22 22:05 [BUG] cfi_cmdset_0001.c: possible recursive locking detected Antonio Ospite
2009-10-23 20:02 ` [PATCH] MTD: add missing put_chip() in cfi_intelext_reset() Nicolas Pitre
2009-10-23 20:37 ` Antonio Ospite
2009-11-20 10:14 ` Antonio Ospite
2009-11-26 7:01 ` Artem Bityutskiy
2009-11-26 9:22 ` Antonio Ospite
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox