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:	Fri, 9 May 2008 14:11:06 -0400
From:	"J. Bruce Fields" <bfields@...ldses.org>
To:	Miklos Szeredi <miklos@...redi.hu>
Cc:	akpm@...ux-foundation.org, linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Trond Myklebust <trond.myklebust@....uio.no>
Subject: Re: [patch 1/9] lockd: dont return EAGAIN from blocking lock
	request

On Fri, May 09, 2008 at 02:41:08PM +0200, Miklos Szeredi wrote:
> From: Miklos Szeredi <mszeredi@...e.cz>
> 
> EAGAIN does not make sense as a return value from a blocking lock

But nlm_stat_to_errno() is called in the non-blocking case too, right?
What am I missing?

--b.

> request, the lock should be retried by the kernel until either it is
> successful or fails permanently.
> 
> Looking at the server side NLM_LCK_DENIED means a permanent error in
> this case, so just turn this into an ENOLCK.
> 
> Signed-off-by: Miklos Szeredi <mszeredi@...e.cz>
> CC: Trond Myklebust <trond.myklebust@....uio.no>
> CC: "J. Bruce Fields" <bfields@...ldses.org>
> ---
>  fs/lockd/clntproc.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Index: linux-2.6/fs/lockd/clntproc.c
> ===================================================================
> --- linux-2.6.orig/fs/lockd/clntproc.c	2008-05-09 14:04:16.000000000 +0200
> +++ linux-2.6/fs/lockd/clntproc.c	2008-05-09 14:04:46.000000000 +0200
> @@ -808,7 +808,7 @@ nlm_stat_to_errno(__be32 status)
>  	case NLM_LCK_GRANTED:
>  		return 0;
>  	case NLM_LCK_DENIED:
> -		return -EAGAIN;
> +		return -ENOLCK;
>  	case NLM_LCK_DENIED_NOLOCKS:
>  	case NLM_LCK_DENIED_GRACE_PERIOD:
>  		return -ENOLCK;
> 
> --
--
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