2.6.0-ben3: Badness in redraw_screen

Michael Schmitz schmitz at opal.biophys.uni-duesseldorf.de
Fri Jan 2 21:40:14 EST 2004


> In the first hunk of your patch you can possibly grab the semaphore and
> then do a return 1 with the semaphore held.
>
> If you really need to hold the semaphore to do a vc_allocate then you
> should remember to release that semaphore before doing the return 1

You're absolutely right. Thanks for spotting this.

> So something along the lines of ...
>
> acquire_console_sem();
> if (vc_allocate(SUSPEND_CONSOLE)) {
>     release_console_sme();
>     return 1;
> }
>
> would be better I think if you really do need to hold the console_sem()
> before calling vc_allocate.

Unfortunately, to avoid the warning we need to hold the semaphore before
calling vc_allocate, as this in turn will call the routines complaining
about the semaphore.

I don't think we can move the locking into vc_allocate; another function
might call this with the lock already held?

	Michael


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-dev mailing list