• P
    tty: restore locked ioctl file op · 38ad2ed0
    Paul Fulghum 提交于
    Restore tty locked ioctl handler which was replaced with
    an unlocked ioctl handler in hung_up_tty_fops by the patch:
    
    commit e10cc1df
    Author: Paul Fulghum <paulkf@microgate.com>
    Date:   Thu May 10 22:22:50 2007 -0700
    
        tty: add compat_ioctl
    
    This was reported in:
    [Bug 8473] New: Oops: 0010 [1] SMP
    
    The bug is caused by switching to hung_up_tty_fops in do_tty_hangup.  An
    ioctl call can be waiting on BLK after testing for existence of the locked
    ioctl handler in the normal tty fops, but before calling the locked ioctl
    handler.  If a hangup occurs at that point, the locked ioctl fop is NULL
    and an oops occurs.
    
    (akpm: we can remove my debugging code from do_ioctl() now, but it'll be OK to
    do that for 2.6.23)
    Signed-off-by: NPaul Fulghum <paulkf@microgate.com>
    Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
    Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
    38ad2ed0
tty_io.c 101.4 KB