Showing error 600

User: Jiri Slaby
Error type: Double Unlock
Error type description: Some lock is unlocked twice unintentionally in a sequence
File location: drivers/char/riscom8.c
Line in file: 1076
Project: Linux Kernel
Project version: 2.6.28
Confirmation: Fixed accidentally by c146942573c84b16ccb480a9cfa885a7581585a8
Tools: Stanse (1.2)
Entered: 2011-11-07 22:20:57 UTC


Source:

1046                port->IER |= IER_TXEMPTY;
1047                rc_out(bp, CD180_CAR, port_No(port));
1048                rc_out(bp, CD180_IER, port->IER);
1049                /*
1050                 * Before we drop DTR, make sure the UART transmitter
1051                 * has completely drained; this is especially
1052                 * important if there is a transmit FIFO!
1053                 */
1054                timeout = jiffies + HZ;
1055                while (port->IER & IER_TXEMPTY) {
1056                        msleep_interruptible(jiffies_to_msecs(port->timeout));
1057                        if (time_after(jiffies, timeout))
1058                                break;
1059                }
1060        }
1061        rc_shutdown_port(tty, bp, port);
1062        rc_flush_buffer(tty);
1063        tty_ldisc_flush(tty);
1064
1065        tty->closing = 0;
1066        port->port.tty = NULL;
1067        if (port->port.blocked_open) {
1068                if (port->port.close_delay)
1069                        msleep_interruptible(jiffies_to_msecs(port->port.close_delay));
1070                wake_up_interruptible(&port->port.open_wait);
1071        }
1072        port->port.flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING);
1073        wake_up_interruptible(&port->port.close_wait);
1074
1075out:
1076        spin_unlock_irqrestore(&riscom_lock, flags);
1077}
1078
1079static int rc_write(struct tty_struct *tty,
1080                    const unsigned char *buf, int count)
1081{
1082        struct riscom_port *port = (struct riscom_port *)tty->driver_data;
1083        struct riscom_board *bp;
1084        int c, total = 0;
1085        unsigned long flags;
1086
Show full sources