From: Andrea Righi <arighi@develer.com>
To: linux-fbdev@vger.kernel.org
Subject: Re: [patch 1/1] fb: fix potential deadlock between lock_fb_info and
Date: Tue, 20 Sep 2011 22:20:45 +0000 [thread overview]
Message-ID: <20110920222045.GB11829@thinkpad> (raw)
In-Reply-To: <201109202111.p8KLBAJD019239@wpaz13.hot.corp.google.com>
On Tue, Sep 20, 2011 at 09:46:08PM +0000, Florian Tobias Schandinat wrote:
> Hi Andrew,
>
> On 09/20/2011 09:11 PM, akpm@google.com wrote:
> > From: Andrea Righi <arighi@develer.com>
> > Subject: fb: fix potential deadlock between lock_fb_info and console_lock
> >
> > fb_set_suspend() must be called with the console semaphore held, which
> > means the code path coming in here will first take the console_lock() and
> > then call lock_fb_info().
> >
> > However several framebuffer ioctl commands acquire these locks in reverse
> > order (lock_fb_info() and then console_lock()). This gives rise to
> > potential AB-BA deadlock.
> >
> > Fix this by changing the order of acquisition in the ioctl commands that
> > make use of console_lock().
>
> I already have another patch [1] that fixes the same issue in a different way.
> It looks less risky than yours and got more feedback.
>
>
> Best regards,
>
> Florian Tobias Schandinat
>
>
> [1] http://marc.info/?l=linux-kernel&m\x130833638508657&w=2
Looks better than my version.
For what it's worth it:
Reviewed-by: Andrea Righi <andrea@betterlinux.com>
Thanks,
-Andrea
prev parent reply other threads:[~2011-09-20 22:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-20 21:11 [patch 1/1] fb: fix potential deadlock between lock_fb_info and console_lock akpm
2011-09-20 21:46 ` [patch 1/1] fb: fix potential deadlock between lock_fb_info and Florian Tobias Schandinat
2011-09-20 22:20 ` Andrea Righi [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=20110920222045.GB11829@thinkpad \
--to=arighi@develer.com \
--cc=linux-fbdev@vger.kernel.org \
/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