• Heiko Carstens's avatar
    [S390] sclp_vt220: fix scheduling while atomic bug. · d4820e44
    Heiko Carstens authored
    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: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
    Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
    d4820e44
sclp_vt220.c 20.7 KB