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  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, 26 Aug 2008 22:19:48 -0500
From:	"Serge E. Hallyn" <>
To:	Alan Cox <>
Cc:	Rajiv Andrade <>,,,,
Subject: Re: [PATCH][resubmit] TPM: update char dev BKL pushdown

Quoting Alan Cox (
> > +	atomic_set(&chip->is_open, 1);
> > +	get_device(chip->dev); /* protect from chip disappearing */
> Why not just use test_and_set_bit() ? You seem to be abusing atomic_t to
> achieve this.

Good point.  Or heck just make it a simple flag.  Earlier I thought there
was a place where driver_lock was taken just to do num_opens--, and so
replacing the int num_opens with an atomic_t seemed worthwhile.  But since
is_open is a boolean and now seems to be always protected by driver_lock,
a flag seems best.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists