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

Benjamin Herrenschmidt benh at kernel.crashing.org
Fri Jan 11 08:17:59 EST 2008


> But I'm wondering whether it's always safe to call ps3fb_sync() from
> ps3fb_release() without acquiring the console semaphore:
>   - On console unbind, ps3fb_release() is called while holding the console
>     semaphore (cfr. the deadlock),
>   - On normal close of /dev/fb0, ps3fb_release() is called without holding the
>     console semaphore, i.e. there's no protection against concurreny anymore.
>
> Perhaps ps3fb_release() should do
> 
> 	if (!try_acquire_console_sem()) {
> 		ps3fb_sync();
> 		release_console_sem();
> 	}

No, I think this is an fbmem bug, it should take the console sem before
calling into the driver release so that the calling context is
consistent.

Ben.

> 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?).
> 
> 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