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] [day] [month] [year] [list]
Date:	Thu, 23 Feb 2012 13:37:12 +0100
From:	Jiri Slaby <jslaby@...e.cz>
To:	Alan Cox <alan@...rguk.ukuu.org.uk>
CC:	benh@...nel.crashing.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] tty: the briq panel isn't a tty, make it use its own
 locking

On 02/23/2012 01:34 PM, Alan Cox wrote:
> --- a/drivers/char/briq_panel.c
> +++ b/drivers/char/briq_panel.c
...
> @@ -66,37 +67,28 @@ static void set_led(char state)
>  
>  static int briq_panel_open(struct inode *ino, struct file *filep)
>  {
> -	tty_lock();
> -	/* enforce single access, vfd_is_open is protected by BKL */
> -	if (vfd_is_open) {
> +	/* enforce single open */
> +	if (test_and_set_bit(0, &vfd_is_open)) {
>  		tty_unlock();

This one should be removed too.

>  		return -EBUSY;
>  	}
> -	vfd_is_open = 1;
> -
> -	tty_unlock();
>  	return 0;
>  }

thanks,
-- 
js
suse labs
--
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