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-next>] [day] [month] [year] [list]
Message-Id: <200707112027.30490.fenkes@de.ibm.com>
Date:	Wed, 11 Jul 2007 20:27:29 +0200
From:	Joachim Fenkes <fenkes@...ibm.com>
To:	linux-kernel@...r.kernel.org, linuxppc-dev@...abs.org,
	jim.houston@...r.com
Cc:	Christoph Raisch <raisch@...ibm.com>,
	"Hoang-Nam Nguyen" <hnguyen@...ibm.com>,
	Stefan Roscher <stefan.roscher@...ibm.com>
Subject: DEFINE_IDR() and the layer cache

Hi all,

while the idr discussion is still hot, there's another thing that caught my
eye recently:

As to my reading of idr.h, I have two choices of initializing a global idr:
 a) static struct idr foo; /* ... */ idr_init(&foo);
 b) static DEFINE_IDR(foo);

idr_init(), when called for the first time, sets up the layer
cache. idr_get_new() and friends expect the cache to exist. Now, what happens
if the first call to idr_get_new() targets an idr initialized using
DEFINE_IDR() before idr_init() has been called at least once? Could this
happen?

My $0.02,
  Joachim


-
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