* [PATCH] DRM: drm_debugfs_create_files uses unitialized stack in error printk
@ 2011-05-11 16:26 Eric Paris
0 siblings, 0 replies; only message in thread
From: Eric Paris @ 2011-05-11 16:26 UTC (permalink / raw)
To: airlied; +Cc: dri-devel
drm_debugfs_create_files declares a char buf on the stack and prints it's
value in a error condition. Before 28a62277 this character buf was filled
in but now it isn't. Instead we can now get the name from the parent dentry
and don't need this at all. Before this patch I would see a message like
below on every boot:
[drm:drm_debugfs_create_files] *ERROR* Cannot create /sys/kernel/debug/dri/I�5^B���/3
Signed-off-by: Eric Paris <eparis@redhat.com>
---
drivers/gpu/drm/drm_debugfs.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c
index 9d8c892..b9dc262 100644
--- a/drivers/gpu/drm/drm_debugfs.c
+++ b/drivers/gpu/drm/drm_debugfs.c
@@ -90,7 +90,6 @@ int drm_debugfs_create_files(struct drm_info_list *files, int count,
struct drm_device *dev = minor->dev;
struct dentry *ent;
struct drm_info_node *tmp;
- char name[64];
int i, ret;
for (i = 0; i < count; i++) {
@@ -109,7 +108,7 @@ int drm_debugfs_create_files(struct drm_info_list *files, int count,
root, tmp, &drm_debugfs_fops);
if (!ent) {
DRM_ERROR("Cannot create /sys/kernel/debug/dri/%s/%s\n",
- name, files[i].name);
+ root->d_name.name, files[i].name);
kfree(tmp);
ret = -1;
goto fail;
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-05-11 17:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-11 16:26 [PATCH] DRM: drm_debugfs_create_files uses unitialized stack in error printk Eric Paris
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox