projects
/
profile
/
ivi
/
kernel-adaptation-intel-automotive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ff846ab
)
drm: dereference of tmp in drm_proc_create_files()
author
Roel Kluin
<roel.kluin@gmail.com>
Sat, 29 Aug 2009 20:20:34 +0000
(22:20 +0200)
committer
Dave Airlie
<airlied@redhat.com>
Sun, 30 Aug 2009 23:09:29 +0000
(09:09 +1000)
tmp allocation may fail, prevent a dereference.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_proc.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/drm_proc.c
b/drivers/gpu/drm/drm_proc.c
index
bbd4b3d
..
dc967af
100644
(file)
--- a/
drivers/gpu/drm/drm_proc.c
+++ b/
drivers/gpu/drm/drm_proc.c
@@
-106,6
+106,10
@@
int drm_proc_create_files(struct drm_info_list *files, int count,
continue;
tmp = kmalloc(sizeof(struct drm_info_node), GFP_KERNEL);
+ if (tmp == NULL) {
+ ret = -1;
+ goto fail;
+ }
ent = create_proc_entry(files[i].name, S_IFREG | S_IRUGO, root);
if (!ent) {
DRM_ERROR("Cannot create /proc/dri/%s/%s\n",