[Cbe-oss-dev] [PATCH 2/2] ps3fb: fix deadlock on kexec()

Geert Uytterhoeven Geert.Uytterhoeven at sonycom.com
Fri Jan 11 21:58:01 EST 2008


On Fri, 11 Jan 2008, Jeremy Kerr wrote:
> > Perhaps ps3fb_release() should do
> >
> > 	if (!try_acquire_console_sem()) {
> > 		ps3fb_sync();
> > 		release_console_sem();
> > 	}
> >
> > This would do the sync on a normal close, but not on special cases
> > (console unbind, e.g. shutdown and kexec).
> >
> > What do you think?
> >
> > BTW, if we want these fixes in 2.6.24, we probably have to send it
> > ASAP (tomorrow?).
> 
> Agreed - either way is fine with me, as long as we can kexec :D
> 
> Perhaps we can do the simple ps3fb fix for .24, then fix the fbmem 
> fb_release calling conventions in .25.

I'll take that road: I think it's safer to let ps3fb_release() try to acquire
the console semaphore and not refresh the screen if it fails, than to call
ps3fb_sync() without holding the console semaphore, as ps3fbpar may get
modified at the same time, causing crashes or lockups.

After all, ps3fb_release() only calls ps3fb_sync() to refresh the screen when
display flipping is disabled, which is an uncommon case (except during
shutdown/kexec).

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Network and Software Technology Center Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone:    +32 (0)2 700 8453
Fax:      +32 (0)2 700 8622
E-mail:   Geert.Uytterhoeven at sonycom.com
Internet: http://www.sony-europe.com/

Sony Network and Software Technology Center Europe
A division of Sony Service Centre (Europe) N.V.
Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium
VAT BE 0413.825.160 · RPR Brussels
Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619


More information about the cbe-oss-dev mailing list