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, 22 May 2007 18:35:05 +0200 (MEST)
From:	Jan Engelhardt <jengelh@...ux01.gwdg.de>
To:	Paul Dickson <paul@...manentmail.com>
cc:	Badari Pulavarty <pbadari@...ibm.com>, bharata@...ux.vnet.ibm.com,
	lkml <linux-kernel@...r.kernel.org>,
	linux-fsdevel <linux-fsdevel@...r.kernel.org>,
	Jan Blunck <j.blunck@...harburg.de>
Subject: Re: [RFC][PATCH  5/14] Introduce union stack


On May 19 2007 03:18, Paul Dickson wrote:
>
>How about getting rid of the gotos:
>
>	while (fs) {
>		locked = union_trylock(fs->root);
>		if (locked) {
>			locked = union_trylock(fs->altroot);
>			if (locked) {
>				locked = union_trylock(fs->pwd);
>				if (locked)
>					break;

Suppose we break here...

>				else {
>					union_unlock(fs->altroot);
>					union_unlock(fs->root);
>				}
>			else
>				union_unlock(fs->root);
>			}
>		}
>		read_unlock(&fs->lock);
>		UM_DEBUG_LOCK("Failed to get all semaphores in fs_struct!\n");
>		cpu_relax();
>		read_lock(&fs->lock);
>	}
>	BUG_ON(!fs);

Then no lock is released. Boom.



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