[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAB4K4y5S-X8rCWZaB5ZJeAZupoKajMsKyVw7eMFnAP1v7V5dVw@mail.gmail.com>
Date: Sat, 24 Mar 2012 15:40:25 +0530
From: Ajeet Yadav <ajeet.yadav.77@...il.com>
To: Alexander Viro <viro@...iv.linux.org.uk>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] vfs: fix uninitialised iattr in do_truncate
[PATCH] vfs: fix uninitialised iattr in do_truncate
struct newattrs is uninitialised.
Signed-off-by: Ajeet Yadav <ajeet.yadav.77@...il.com>
---
fs/open.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/open.c b/fs/open.c
index 77becc0..2676efa 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -37,7 +37,7 @@ int do_truncate(struct dentry *dentry, loff_t
length, unsigned int time_attrs,
struct file *filp)
{
int ret;
- struct iattr newattrs;
+ struct iattr newattrs = {0};
/* Not pretty: "inode->i_size" shouldn't really be signed. But it is. */
if (length < 0)
--
1.7.8.4
--
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