From: Linus Torvalds <torvalds@linux-foundation.org>
To: Paul Mundt <lethal@linux-sh.org>
Cc: Wu Zhangjin <wuzhangjin@gmail.com>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mips@linux-mips.org, Krzysztof Helt <krzysztof.h1@wp.pl>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
Andrew Morton <akpm@linux-foundation.org>,
Ralf Baechle <ralf@linux-mips.org>, ???? <yanh@lemote.com>,
zhangfx <zhangfx@lemote.com>
Subject: Re: [BUG] drivers/video/sis: deadlock introduced by "fbdev: add mutex for fb_mmap locking"
Date: Sun, 5 Jul 2009 08:19:40 -0700 (PDT) [thread overview]
Message-ID: <alpine.LFD.2.01.0907050816110.3210@localhost.localdomain> (raw)
In-Reply-To: <20090705150134.GB8326@linux-sh.org>
On Mon, 6 Jul 2009, Paul Mundt wrote:
> >
> > Why not "lock" as well?
>
> I had that initially, but matroxfb will break if we do that, and
> presently nothing cares about trying to take ->lock that early on.
I really would rather have consistency than some odd rules like that.
In particular - if matroxfb is different and needs its own lock
initialization because it doesn't use the common allocation routine, then
please make _that_ consistent too. Rather than have it special-case just
one lock that it needs to initialize separately, make it clear that since
it does its own allocations it needs to initialize _everything_
separately.
Otherwise anybody grepping for things will always be confused, since
depending on random factors they'll notice the initializations in one
place or the other, and then do the wrong thing - exactly like mm_lock was
not correctly initialized this time around.
In other words: it's actually _better_ to make the matroxfb pain _more_
obvious rather than less.
And maybe we can deprecate the driver, throw it out entirely, or have
somebody actually fix it?
Linus
next prev parent reply other threads:[~2009-07-05 15:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-05 9:11 [BUG] drivers/video/sis: deadlock introduced by "fbdev: add mutex for fb_mmap locking" Wu Zhangjin
2009-07-05 14:19 ` Linus Torvalds
2009-07-05 14:52 ` Paul Mundt
2009-07-05 14:56 ` Linus Torvalds
2009-07-05 15:01 ` Paul Mundt
2009-07-05 15:19 ` Linus Torvalds [this message]
2009-07-05 15:25 ` Paul Mundt
2009-07-05 15:32 ` Linus Torvalds
2009-07-05 16:18 ` Krzysztof Helt
2009-07-06 1:13 ` Wu Zhangjin
2009-07-06 14:50 ` Krzysztof Helt
2009-07-06 16:29 ` Linus Torvalds
2009-07-05 16:43 ` Krzysztof Helt
2009-07-05 15:05 ` Krzysztof Helt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.2.01.0907050816110.3210@localhost.localdomain \
--to=torvalds@linux-foundation.org \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=krzysztof.h1@wp.pl \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
--cc=rjw@sisk.pl \
--cc=wuzhangjin@gmail.com \
--cc=yanh@lemote.com \
--cc=zhangfx@lemote.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox