Showing error 1702

User: Jiri Slaby
Error type: Double Unlock
Error type description: Some lock is unlocked twice unintentionally in a sequence
File location: drivers/char/specialix.c
Line in file: 2096
Project: Linux Kernel
Project version: 2.6.28
Confirmation: Fixed by 254702568da63ce6f5ad68e77d83b427da693654
Tools: Smatch (1.59)
Entered: 2013-09-10 15:16:58 UTC


Source:

2066        spin_unlock_irqrestore(&bp->lock, flags);
2067        spin_unlock_irqrestore(&port->lock, flags);
2068
2069        func_exit();
2070}
2071
2072
2073static void sx_start(struct tty_struct *tty)
2074{
2075        struct specialix_port *port = (struct specialix_port *)tty->driver_data;
2076        struct specialix_board *bp;
2077        unsigned long flags;
2078
2079        func_enter();
2080
2081        if (sx_paranoia_check(port, tty->name, "sx_start")) {
2082                func_exit();
2083                return;
2084        }
2085
2086        bp = port_Board(port);
2087
2088        spin_lock_irqsave(&port->lock, flags);
2089        if (port->xmit_cnt && port->xmit_buf && !(port->IER & IER_TXRDY)) {
2090                port->IER |= IER_TXRDY;
2091                spin_lock_irqsave(&bp->lock, flags);
2092                sx_out(bp, CD186x_CAR, port_No(port));
2093                sx_out(bp, CD186x_IER, port->IER);
2094                spin_unlock_irqrestore(&bp->lock, flags);
2095        }
2096        spin_unlock_irqrestore(&port->lock, flags);
2097
2098        func_exit();
2099}
2100
2101static void sx_hangup(struct tty_struct *tty)
2102{
2103        struct specialix_port *port = (struct specialix_port *)tty->driver_data;
2104        struct specialix_board *bp;
2105        unsigned long flags;
2106
Show full sources