[linux-pm] [Linux-fbdev-devel] [2.6.29-rc2] fb_mmap: circular locking dependency on hibernation

Andrea Righi righi.andrea at gmail.com
Sat Jan 31 10:11:55 PST 2009


On 2009-01-31 18:44, Geert Uytterhoeven wrote:
> On Sat, 31 Jan 2009, Andrea Righi wrote:
>> On 2009-01-30 05:15, Andrey Borzenkov wrote:
>>> On 29 of January 2009 12:10:11 Geert Uytterhoeven wrote:
>>>> On Tue, 27 Jan 2009, Andrey Borzenkov wrote:
>> fbcon: avoid circular locking dependency between fb_info->lock and mm->mmap_sem
>>
>> In fbcon notifier the handler for FB_EVENT_SET_CONSOLE_MAP doesn't need
>> to hold fb_info->lock.
>>
>> Simply unlock it before calling set_con2fb_map(), that could try to
>> acquire mm->mmap_sem to avoid a circular locking dependency with
>> fb_mmap() (that acquires mm->mmap_sem -> fb_info-lock).
> 
> However, set_con2fb_map() accesses the array of fb_info pointers
> registered_fb[], which seems to be a bit unsafe now the BKL is no longer held.

mmmh.. not sure about that, registered_fb[] was never accessed with
fb_info->lock held, see register/unregister_framebuffer().

But maybe this is another issue, and anyway, the array and also
num_registered_fb don't seem to be protected at all...

-Andrea


More information about the linux-pm mailing list