lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Fri, 29 Oct 2010 19:40:14 +0200
From:	Eli Billauer <eli@...lauer.co.il>
To:	linux-kernel@...r.kernel.org
Subject: pty.c: tty_lock() and tty_unlock() in reverse order?

Hello,


After having some problems with a simple open of /dev/tty taking 30 
seconds or so (more precisely, a complete freeze of login console and 
very slow ssh), I looked a bit into the kernel code.


My very recently downloaded kernel.org 2.6.36's pty.c goes as below. 
What bothers me is that tty_unlock() is called first, and tty_lock() 
just before exiting. Shouldn't it be the other way around?


static void pty_close(struct tty_struct *tty, struct file *filp)
{


    [snipped some code here, no games with locks]

        tty_*un*lock();
        tty_vhangup(tty->link);
        tty_lock();
    }
}


    Eli

-- 
Web: http://www.billauer.co.il

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ