[3.16.y-ckt stable] Patch "nfs: Fix use of uninitialized variable in nfs_getattr()" has been added to staging queue
Luis Henriques
luis.henriques at canonical.com
Mon Nov 24 15:05:26 UTC 2014
This is a note to let you know that I have just added a patch titled
nfs: Fix use of uninitialized variable in nfs_getattr()
to the linux-3.16.y-queue branch of the 3.16.y-ckt extended stable tree
which can be found at:
http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.16.y-queue
This patch is scheduled to be released in version 3.16.7-ckt2.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.16.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Luis
------
>From 67aad50c06685376fe2a8b17f7592a3833d16bd2 Mon Sep 17 00:00:00 2001
From: Jan Kara <jack at suse.cz>
Date: Thu, 23 Oct 2014 14:02:47 +0200
Subject: nfs: Fix use of uninitialized variable in nfs_getattr()
commit 16caf5b6101d03335b386e77e9e14136f989be87 upstream.
Variable 'err' needn't be initialized when nfs_getattr() uses it to
check whether it should call generic_fillattr() or not. That can result
in spurious error returns. Initialize 'err' properly.
Signed-off-by: Jan Kara <jack at suse.cz>
Signed-off-by: Trond Myklebust <trond.myklebust at primarydata.com>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
fs/nfs/inode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index a732cbbd4e80..aa6daf535dec 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -624,7 +624,7 @@ int nfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
{
struct inode *inode = dentry->d_inode;
int need_atime = NFS_I(inode)->cache_validity & NFS_INO_INVALID_ATIME;
- int err;
+ int err = 0;
trace_nfs_getattr_enter(inode);
/* Flush out writes to the server in order to update c/mtime. */
--
2.1.0
More information about the kernel-team
mailing list