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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 08 May 2012 11:18:35 -0700
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Alan Cox <alan@...rguk.ukuu.org.uk>
CC:	linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org
Subject: Re: [PATCH 2/3] pty: Lock the devpts bits privately

On 05/03/2012 02:22 PM, Alan Cox wrote:
> From: Alan Cox <alan@...ux.intel.com>
> 
> This is a private pty affair, we don't want to tangle it with the tty_lock
> any more as we know all the other non tty locking is now handled by the vfs
> so we too can move.
> 
> Signed-off-by: Alan Cox <alan@...ux.intel.com>

> +		        mutex_lock(&devpts_mutex);
>  			devpts_pty_kill(tty->link);
> +		        mutex_unlock(&devpts_mutex);

> +	mutex_lock(&devpts_mutex);
> +	tty = devpts_get_tty(pts_inode, idx);
> +	mutex_unlock(&devpts_mutex);

> +	mutex_lock(&devpts_mutex);
>  	tty = tty_init_dev(ptm_driver, index);
> +	mutex_unlock(&devpts_mutex);

Conceptually this seems fine, but it would seem cleaner to me to push
this mutex into the called functions in devpts; I suspect the lock could
be eliminated or at least be made per instance there (which would make
massive-container people happy...)

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.

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