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]
Message-Id: <20070108132755.41c27142.akpm@osdl.org>
Date:	Mon, 8 Jan 2007 13:27:55 -0800
From:	Andrew Morton <akpm@...l.org>
To:	"Josef 'Jeff' Sipek" <jsipek@...sunysb.edu>
Cc:	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
	hch@...radead.org, viro@....linux.org.uk, torvalds@...l.org,
	mhalcrow@...ibm.com, David Quigley <dquigley@....cs.sunysb.edu>,
	Erez Zadok <ezk@...sunysb.edu>
Subject: Re: [PATCH 15/24] Unionfs: Privileged operations workqueue

On Sun,  7 Jan 2007 23:13:07 -0500
"Josef 'Jeff' Sipek" <jsipek@...sunysb.edu> wrote:

> From: Josef "Jeff" Sipek <jsipek@...sunysb.edu>
> 
> Workqueue & helper functions used to perform privileged operations on
> behalf of the user process.
> 
> Signed-off-by: Josef "Jeff" Sipek <jsipek@...sunysb.edu>
> Signed-off-by: David Quigley <dquigley@....cs.sunysb.edu>
> Signed-off-by: Erez Zadok <ezk@...sunysb.edu>
> +
>
> ...
>
> +#include "union.h"
> +
> +/* Super-user IO work Queue - sometimes we need to perform actions which
> + * would fail due to the unix permissions on the parent directory (e.g.,
> + * rmdir a directory which appears empty, but in reality contains
> + * whiteouts).
> + */
> +
> +struct workqueue_struct *sioq;

Rather a terse identifier for a global symbol.

> +int __init init_sioq(void)
> +{
> +	int err;
> +
> +	sioq = create_workqueue("unionfs_siod");
> +	if (!IS_ERR(sioq))
> +		return 0;
> +
> +	err = PTR_ERR(sioq);
> +	printk(KERN_ERR "create_workqueue failed %d\n", err);
> +	sioq = NULL;
> +	return err;
> +}
> +
> +void __exit stop_sioq(void)
> +{
> +	if (sioq)
> +		destroy_workqueue(sioq);
> +}
> +
> +void run_sioq(work_func_t func, struct sioq_args *args)
> +{
> +	INIT_WORK(&args->work, func);
> +
> +	init_completion(&args->comp);
> +	while (!queue_work(sioq, &args->work)) {
> +		/* TODO: do accounting if needed */
> +		schedule();
> +	}

That's a busywait.

> +	wait_for_completion(&args->comp);
> +}
> +
>
> ...
>
> +void __delete_whiteouts(struct work_struct *work) {

Misplaced brace.


-
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