Showing error 1701

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: 2067
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:

2037        spin_lock_irqsave(&bp->lock, flags);
2038        sx_out(bp, CD186x_MSVR, port->MSVR);
2039        spin_unlock_irqrestore(&bp->lock, flags);
2040        spin_unlock_irqrestore(&port->lock, flags);
2041
2042        func_exit();
2043}
2044
2045
2046static void sx_stop(struct tty_struct *tty)
2047{
2048        struct specialix_port *port = (struct specialix_port *)tty->driver_data;
2049        struct specialix_board *bp;
2050        unsigned long flags;
2051
2052        func_enter();
2053
2054        if (sx_paranoia_check(port, tty->name, "sx_stop")) {
2055                func_exit();
2056                return;
2057        }
2058
2059        bp = port_Board(port);
2060
2061        spin_lock_irqsave(&port->lock, flags);
2062        port->IER &= ~IER_TXRDY;
2063        spin_lock_irqsave(&bp->lock, flags);
2064        sx_out(bp, CD186x_CAR, port_No(port));
2065        sx_out(bp, CD186x_IER, port->IER);
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;
Show full sources