[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <201007291534.57188.arnd@arndb.de>
Date: Thu, 29 Jul 2010 15:34:56 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Vasiliy Kulikov <segooon@...il.com>
Cc: Artem Bityutskiy <Artem.Bityutskiy@...ia.com>,
David Woodhouse <David.Woodhouse@...el.com>,
Nicolas Pitre <nico@...xnic.net>,
"Hans-Christian Egtvedt" <hans-christian.egtvedt@...el.com>,
Jiri Slaby <jslaby@...e.cz>,
Stefani Seibold <stefani@...bold.net>,
Tejun Heo <tj@...nel.org>, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: Re: [bug] Fixing mutex_lock() under held spinlock
On Thursday 29 July 2010, Vasiliy Kulikov wrote:
> I've found that cfi_cmdset and lpddr_cmds call mutex_lock() under held
> spinlock(). Maybe it was designed as a special locking scheme, so I
> don't try to fix it as I might create new complex locking problem.
No, it certainly looks like a bug and it seems to have been introduced by
http://linux.derkeiler.com/Mailing-Lists/Kernel/2010-03/msg02798.html
Back in March, Stefani wrote:
| I have analyzed this drivers and IMHO i don't think there will be used
| from irq or atomic contexts. There is no request interrupt and there are
| a lot msleep and add_wait_queues/schedule calls during holding the
| mutex, which are not very useful in a irq or atomic context. But i don't
| know the whole mtd stack.
It seems you have missed at least two places. It should be possible to
fix this by turning shared->lock into a mutex as well.
Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists