projects
/
platform
/
upstream
/
kernel-adaptation-pc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
16cce6d
)
[PATCH] v9fs: fix vfs_inode dereference before NULL check
author
Eugene Teo
<eugene.teo@eugeneteo.net>
Sat, 25 Mar 2006 11:07:27 +0000
(
03:07
-0800)
committer
Linus Torvalds
<torvalds@g5.osdl.org>
Sat, 25 Mar 2006 16:22:54 +0000
(08:22 -0800)
__getname, which in turn will call kmem_cache_alloc, may return NULL.
Coverity bug #977
Signed-off-by: Eugene Teo <eugene.teo@eugeneteo.net>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/9p/vfs_inode.c
patch
|
blob
|
history
diff --git
a/fs/9p/vfs_inode.c
b/fs/9p/vfs_inode.c
index
dc67f83
..
4cbfb71
100644
(file)
--- a/
fs/9p/vfs_inode.c
+++ b/
fs/9p/vfs_inode.c
@@
-1244,6
+1244,8
@@
v9fs_vfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t rdev)
return -EINVAL;
name = __getname();
+ if (!name)
+ return -ENOMEM;
/* build extension */
if (S_ISBLK(mode))
sprintf(name, "b %u %u", MAJOR(rdev), MINOR(rdev));