[S390] sclp_vt220: fix scheduling while atomic bug.
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Fri, 30 May 2008 08:03:30 +0000 (10:03 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 30 May 2008 08:03:35 +0000 (10:03 +0200)
commitd4820e44b0ae6830b1d634e6d0a425d839388c06
tree8f2e5e43623bd37056321de3940820a25d8a6bcf
parentc1bb7f31eaef6ed6b9f895b99d9ea12e6b853606
[S390] sclp_vt220: fix scheduling while atomic bug.

The driver incorrectly assumed that putchar will only be called from
schedulable process context and therefore blocked and waited if no
free output buffers where available.
Since putchar may also be called from BH context this may lead to
deadlocks.
To fix this just return the number of characters accepted and let the
upper layer handle the rest.

The console write function will busy wait (sclp_sync_wait) until a
buffer is available again.

Cc: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/char/sclp_vt220.c