User: | Jiri Slaby |
Error type: | Leaving function in locked state |
Error type description: | Some lock is not unlocked on all paths of a function, so it is leaked |
File location: | drivers/char/tty_io.c |
Line in file: | 1898 |
Project: | Linux Kernel |
Project version: | 2.6.28 |
Confirmation: | Fixed by 808ffa3d302257b9dc37b1412c1fcdf976fcddac |
Tools: |
Stanse
(1.2)
|
Entered: | 2012-03-02 21:35:17 UTC |
1868 return retval; 1869 schedule(); 1870 /* 1871 * Need to reset f_op in case a hangup happened. 1872 */ 1873 if (filp->f_op == &hung_up_tty_fops) 1874 filp->f_op = &tty_fops; 1875 goto retry_open; 1876 } 1877 1878 mutex_lock(&tty_mutex); 1879 spin_lock_irq(¤t->sighand->siglock); 1880 if (!noctty && 1881 current->signal->leader && 1882 !current->signal->tty && 1883 tty->session == NULL) 1884 __proc_set_tty(current, tty); 1885 spin_unlock_irq(¤t->sighand->siglock); 1886 mutex_unlock(&tty_mutex); 1887 return 0; 1888} 1889 1890/* BKL pushdown: scary code avoidance wrapper */ 1891static int tty_open(struct inode *inode, struct file *filp) 1892{ 1893 int ret; 1894 1895 lock_kernel(); 1896 ret = __tty_open(inode, filp); 1897 unlock_kernel(); 1898 return ret; 1899} 1900 1901 1902 1903 1904/** 1905 * tty_release - vfs callback for close 1906 * @inode: inode of tty 1907 * @filp: file pointer for handle to tty 1908 *