mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Mundt <lethal@linux-sh.org>
To: Wu Zhangjin <wuzhangjin@gmail.com>
Cc: Daniel Mack <daniel@caiaq.de>,
	linux-arm-kernel@lists.arm.linux.org.uk,
	linux-kernel@vger.kernel.org,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	"Rafael J. Wysocki" <rjw@sisk.pl>,
	stable@kernel.org, Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] fb: move mutex_init to framebuffer_alloc()
Date: Wed, 8 Jul 2009 18:52:12 +0900	[thread overview]
Message-ID: <20090708095212.GA14844@linux-sh.org> (raw)
In-Reply-To: <1247046145.22324.12.camel@falcon>

On Wed, Jul 08, 2009 at 05:42:25PM +0800, Wu Zhangjin wrote:
> On Wed, 2009-07-01 at 18:26 +0200, Daniel Mack wrote:
> > In 537a1bf05, a per-fbinfo mutex was added and framebuffer drivers were
> > adopted accordingly. This new lock is currently initialized in
> > register_framebuffer().
> > 
> > The mx3fb driver takes this lock in mx3fb_map_video_memory() _before_
> > register_framebuffer() is called and hence crashes the system very
> > early.
> > 
> > Moving this mutex_init() to framebuffer_alloc() solves this and also
> > seems a lot more straight forward.
> > 
> 
> but this may introduce deadlock to some _old_ drivers which have not
> used framebuffer_alloc to allocate fb_info structure.
> 
> to avoid deadlock, these drivers need to change kmalloc to
> framebuffer_alloc, otherwise, they need to add their own mutexes
> initialization source code:
> 		mutex_init(&info->lock);	mutex_init(&info->mm_lock);
> 
> here is only a record for the _old_ drivers' maintainers. hope they can
> get this info from google or find this commit: 
> 
Yes, I'm going through and gradually converting all of the outstanding
drivers (both old and new) over to framebuffer_alloc(). The old ones are
a bit more tedious given all of the casting games they play. I should
have the outstanding ones finished tomorrow.

      reply	other threads:[~2009-07-08  9:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-01 16:26 Daniel Mack
2009-07-08  9:42 ` Wu Zhangjin
2009-07-08  9:52   ` Paul Mundt [this message]

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=20090708095212.GA14844@linux-sh.org \
    --to=lethal@linux-sh.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=daniel@caiaq.de \
    --cc=linux-arm-kernel@lists.arm.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@sisk.pl \
    --cc=stable@kernel.org \
    --cc=wuzhangjin@gmail.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

Powered by JetHome