]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
NFS: Fix error reporting in nfs_xdev_mount
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 16 Jan 2013 20:05:44 +0000 (15:05 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 4 Feb 2013 00:27:04 +0000 (18:27 -0600)
commite31c4ce31822e555047981b6dd0b2e54dd2224f1
treea328ac39761d2be292e6ba9a767af50cca6c6e2d
parent0c57854aa6bc2a4f9461b26b3c1c382c460cbf09
NFS: Fix error reporting in nfs_xdev_mount

commit dee972b967ae111ad5705733de17a3bfc4632311 upstream.

Currently, nfs_xdev_mount converts all errors from clone_server() to
ENOMEM, which can then leak to userspace (for instance to 'mount'). Fix that.
Also ensure that if nfs_fs_mount_common() returns an error, we
don't dprintk(0)...

The regression originated in commit 3d176e3fe4f6dc379b252bf43e2e146a8f7caf01
(NFS: Use nfs_fs_mount_common() for xdev mounts)

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfs/super.c