Showing error 1700

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

2010
2011        func_enter();
2012
2013        if (sx_paranoia_check(port, tty->name, "sx_unthrottle")) {
2014                func_exit();
2015                return;
2016        }
2017
2018        bp = port_Board(port);
2019
2020        spin_lock_irqsave(&port->lock, flags);
2021        /* XXXX Use DTR INSTEAD???? */
2022        if (sx_crtscts(tty))
2023                port->MSVR |= MSVR_DTR;
2024        /* Else clause: see remark in "sx_throttle"... */
2025        spin_lock_irqsave(&bp->lock, flags);
2026        sx_out(bp, CD186x_CAR, port_No(port));
2027        spin_unlock_irqrestore(&bp->lock, flags);
2028        if (I_IXOFF(tty)) {
2029                spin_unlock_irqrestore(&port->lock, flags);
2030                sx_wait_CCR(bp);
2031                spin_lock_irqsave(&bp->lock, flags);
2032                sx_out(bp, CD186x_CCR, CCR_SSCH1);
2033                spin_unlock_irqrestore(&bp->lock, flags);
2034                sx_wait_CCR(bp);
2035                spin_lock_irqsave(&port->lock, flags);
2036        }
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;
Show full sources