[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-id: <1817342376.533191432204130151.JavaMail.weblogic@ep2mlwas07b>
Date: Thu, 21 May 2015 10:28:52 +0000 (GMT)
From: Maninder Singh <maninder1.s@...sung.com>
To: akpm@...ux-foundation.org, dhowells@...hat.com, fabf@...net.be,
viro@...iv.linux.org.uk, linux-kernel@...r.kernel.org,
"v.narang@...sung.com" <v.narang@...sung.com>
Subject: [EDT] [PATCH] devpts/inode.c : Fix Possible dentry NULL dereference
EP-F6AA0618C49C4AEDA73BFF1B39950BAB
Hi,
Subject: [PATCH 1/1] devpts/inode.c : Fix Possible dentry NULL dereference
Issue reported by static tool Analyzer (Prevent).
d_find_alias can return NULL to deentry, Thus we need NULL check
before calling d_delete(dentry)
Signed-off-by: Maninder Singh <maninder1.s@...sung.com>
Reviewed-by: Vaneet Narang <v.narang@...sung.com>
---
fs/devpts/inode.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c
index add5663..0350ac2 100644
--- a/fs/devpts/inode.c
+++ b/fs/devpts/inode.c
@@ -663,7 +663,8 @@ void devpts_pty_kill(struct inode *inode)
dentry = d_find_alias(inode);
drop_nlink(inode);
- d_delete(dentry);
+ if (dentry)
+ d_delete(dentry);
dput(dentry); /* d_alloc_name() in devpts_pty_new() */
dput(dentry); /* d_find_alias above */
--
1.7.1
Thanks ,
Maninder Singh
Powered by blists - more mailing lists