From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Torvalds Date: Tue, 14 Jun 2011 18:15:53 +0000 Subject: Re: Possible deadlock when suspending framebuffer Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Paul Mundt , linux-fbdev@vger.kernel.org Cc: Linux Kernel Mailing List , Francis Moreau Paul, fbdev people.. Comments? This was sent to me and lkml, the right people probably didn't see it. I doubt it's a big problem in practice, but.. Linus On Tue, Jun 14, 2011 at 6:10 AM, Francis Moreau wrote: > Hello, > > I noticed that a possible deadlock can happen when the current frame > buffering is being suspended and a new frambuffer device is being > registred at the same time. > > When suspending the current frambuffer by doing : echo 1 >>/sys/class/graphics/fb0/state, the kernel actually takes the > following locks in that order: console_lock, lock_fb_info (see > store_fbstate()). > > However when a new framebuffer is coming in, the lock sequence is: > lock_fb_info (taken by do_remove_conflicting_framebuffer()), > console_lock() (taken by unbind_console). > > I don't know how this should be fixed though... > > Thanks > -- > Francis >