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: <1335463902.9701.35.camel@lade.trondhjem.org>
Date:	Thu, 26 Apr 2012 18:11:42 +0000
From:	"Myklebust, Trond" <Trond.Myklebust@...app.com>
To:	Stanislav Kinsbursky <skinsbursky@...allels.com>
CC:	"bfields@...ldses.org" <bfields@...ldses.org>,
	"linux-nfs@...r.kernel.org" <linux-nfs@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"devel@...nvz.org" <devel@...nvz.org>
Subject: Re: [PATCH 2/3] SUNRPC: traverse clients tree on PipeFS event

On Fri, 2012-04-20 at 18:19 +0400, Stanislav Kinsbursky wrote:

> +static int __rpc_pipefs_event(struct rpc_clnt *clnt, unsigned long event,
> +				struct super_block *sb)
> +{
> +	int error;
> +
> +	if (!rpc_clnt_skip_event(clnt, event)) {
> +		error = __rpc_clnt_handle_event(clnt, event, sb);
> +		if (error)
> +			return error;
> +	}
> +	if (clnt != clnt->cl_parent)
> +		return __rpc_pipefs_event(clnt->cl_parent, event, sb);
> +	return 0;
> +}

Hi Stanislav,

Recursion in the kernel is generally frowned upon due to the stack size
limits. Could you please rewrite the above into a simple loop. Something
along the lines of:

	for(;;) {
		...

		if (clnt == clnt->cl_parent)
			break;
		clnt = clnt->cl_parent;
	}

-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@...app.com
www.netapp.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ