Re: [patch 1/1] fb: fix potential deadlock between lock_fb_info and console_lock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 20, 2011 at 09:46:08PM +0000, Florian Tobias Schandinat wrote:
> Hi Andrew,
> 
> On 09/20/2011 09:11 PM, akpm@xxxxxxxxxx wrote:
> > From: Andrea Righi <arighi@xxxxxxxxxxx>
> > 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=130833638508657&w=2

Looks better than my version.

For what it's worth it:

Reviewed-by: Andrea Righi <andrea@xxxxxxxxxxxxxxx>

Thanks,
-Andrea
--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Tourism]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux