From: Eric Paris <eparis@redhat.com>
To: airlied@linux.ie
Cc: dri-devel@lists.freedesktop.org
Subject: [PATCH] DRM: drm_debugfs_create_files uses unitialized stack in error printk
Date: Wed, 11 May 2011 12:26:05 -0400 [thread overview]
Message-ID: <20110511162605.2542.35528.stgit@paris.rdu.redhat.com> (raw)
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
reply other threads:[~2011-05-11 17:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110511162605.2542.35528.stgit@paris.rdu.redhat.com \
--to=eparis@redhat.com \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox