Showing error 1684

User: Jiri Slaby
Error type: Double Lock
Error type description: Some lock is locked twice unintentionally in a sequence
File location: drivers/char/specialix.c
Line in file: 1811
Project: Linux Kernel
Project version: 2.6.28
Confirmation: Fixed by 254702568da63ce6f5ad68e77d83b427da693654
Tools: Smatch (1.59)
Entered: 2013-09-10 14:01:52 UTC


Source:

1781                       unsigned int set, unsigned int clear)
1782{
1783        struct specialix_port *port = (struct specialix_port *)tty->driver_data;
1784        unsigned long flags;
1785        struct specialix_board *bp;
1786
1787        func_enter();
1788
1789        if (sx_paranoia_check(port, tty->name, __func__)) {
1790                func_exit();
1791                return -ENODEV;
1792        }
1793
1794        bp = port_Board(port);
1795
1796        spin_lock_irqsave(&port->lock, flags);
1797        if (sx_crtscts(port->port.tty)) {
1798                if (set & TIOCM_RTS)
1799                        port->MSVR |= MSVR_DTR;
1800        } else {
1801                if (set & TIOCM_DTR)
1802                        port->MSVR |= MSVR_DTR;
1803        }
1804        if (sx_crtscts(port->port.tty)) {
1805                if (clear & TIOCM_RTS)
1806                        port->MSVR &= ~MSVR_DTR;
1807        } else {
1808                if (clear & TIOCM_DTR)
1809                        port->MSVR &= ~MSVR_DTR;
1810        }
1811        spin_lock_irqsave(&bp->lock, flags);
1812        sx_out(bp, CD186x_CAR, port_No(port));
1813        sx_out(bp, CD186x_MSVR, port->MSVR);
1814        spin_unlock_irqrestore(&bp->lock, flags);
1815        spin_unlock_irqrestore(&port->lock, flags);
1816        func_exit();
1817        return 0;
1818}
1819
1820
1821static int sx_send_break(struct tty_struct *tty, int length)
Show full sources