]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/char/tty_ioctl.c
tty: Fix race in the flush for some ldiscs
[linux-2.6-omap-h63xx.git] / drivers / char / tty_ioctl.c
index a408c8e487ec006147078f2f7d22b6bce88925bb..6f4c7d0a53bf36bc6ff28afeadca4720704e459f 100644 (file)
@@ -1057,7 +1057,7 @@ int tty_perform_flush(struct tty_struct *tty, unsigned long arg)
        if (retval)
                return retval;
 
-       ld = tty_ldisc_ref(tty);
+       ld = tty_ldisc_ref_wait(tty);
        switch (arg) {
        case TCIFLUSH:
                if (ld && ld->ops->flush_buffer)