From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott James Remnant Date: Tue, 25 Aug 2009 13:31:31 +0000 Subject: Re: [security] Race condition in udev Message-Id: <1251207091.4175.69.camel@quest> MIME-Version: 1 Content-Type: multipart/mixed; boundary="=-y08ZhJxgByB1F/EHnBrt" List-Id: References: <20090821102407.GA29609@florz.florz.dyndns.org> In-Reply-To: <20090821102407.GA29609@florz.florz.dyndns.org> To: linux-hotplug@vger.kernel.org --=-y08ZhJxgByB1F/EHnBrt Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Tue, 2009-08-25 at 15:11 +0200, Florian Zumbiehl wrote: > > > well, in those two cases always rename()ing the new node into place w= ould > > > work, too!? That would be a different strategy than what's in > > > place at the moment, but it wouldn't need a special case!? > > >=20 > > The rename() will fail. >=20 > Because? >=20 POSIX. > > > > Or when racing with devmapper which creates /dev/mapper/foo devices= at > > > > basically the same time as udev. > > >=20 > > > Seriously? How is a piece of code that does the existence check and > > > the subsequent action depending on the result of that check non-atomi= cally > > > supposed to help avoid some race condition resulting from possible > > > concurrent creation of a device node?! > > >=20 > > Read the code and find out. It works. >=20 > Guess how I found out that it can not work. >=20 I don't know, you haven't given any detail of any problems you've encountered. Scott --=20 Scott James Remnant scott@canonical.com --=-y08ZhJxgByB1F/EHnBrt Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEABECAAYFAkqT57MACgkQSnQiFMl4yK7iyACfa1PP7hQw7JJ1mG5NKVBPinlp cHMAn18C7B5oC5IgR8OMUVvWVdS/bH0/ =rD2U -----END PGP SIGNATURE----- --=-y08ZhJxgByB1F/EHnBrt--