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: <1153848015.5639.17.camel@localhost>
Date:	Tue, 25 Jul 2006 13:20:15 -0400
From:	Trond Myklebust <trond.myklebust@....uio.no>
To:	Josh Triplett <josht@...ibm.com>
Cc:	linux-kernel@...r.kernel.org, Andrew Morton <akpm@...l.org>
Subject: Re: [PATCH] [nfs] Release dentry_lock in an error path of nfs_path

On Mon, 2006-07-24 at 16:30 -0700, Josh Triplett wrote:
> In one of the error paths of nfs_path, it may return with dentry_lock still
> held; fix this by adding and using a new error path Elong_unlock which unlocks
> dentry_lock.
> 
> Signed-off-by: Josh Triplett <josh@...edesktop.org>

Applied to the NFS git tree... Thanks!

  Trond

> ---
>  fs/nfs/namespace.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/nfs/namespace.c b/fs/nfs/namespace.c
> index 19b98ca..86b3169 100644
> --- a/fs/nfs/namespace.c
> +++ b/fs/nfs/namespace.c
> @@ -51,7 +51,7 @@ char *nfs_path(const char *base, const s
>  		namelen = dentry->d_name.len;
>  		buflen -= namelen + 1;
>  		if (buflen < 0)
> -			goto Elong;
> +			goto Elong_unlock;
>  		end -= namelen;
>  		memcpy(end, dentry->d_name.name, namelen);
>  		*--end = '/';
> @@ -68,6 +68,8 @@ char *nfs_path(const char *base, const s
>  	end -= namelen;
>  	memcpy(end, base, namelen);
>  	return end;
> +Elong_unlock:
> +	spin_unlock(&dcache_lock);
>  Elong:
>  	return ERR_PTR(-ENAMETOOLONG);
>  }
> 
> 

-
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