From: Arjan van de Ven <arjan@infradead.org>
To: Arjan van de Ven <arjan@infradead.org>
Cc: airlied@linux.ie, linux-kernel@vger.kernel.org,
Al Viro <viro@ZenIV.linux.org.uk>
Subject: [PATCH] drm: make drm use create_proc_read_entry() instead
Date: Sat, 31 May 2008 21:48:21 -0700 [thread overview]
Message-ID: <20080531214821.19218b6b@infradead.org> (raw)
In-Reply-To: <20080531203940.40536c9a@infradead.org>
From: Arjan van de Ven <arjan@linux.intel.com>
Subject: [PATCH] drm: make drm use create_proc_read_entry() instead
Al Viro points out that DRM should have used create_proc_read_entry(),
and although that is still racey right now, it at least has a chance
of getting fixed on the api level.
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
---
drivers/char/drm/drm_proc.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/char/drm/drm_proc.c b/drivers/char/drm/drm_proc.c
index 19e61ad..b586378 100644
--- a/drivers/char/drm/drm_proc.c
+++ b/drivers/char/drm/drm_proc.c
@@ -102,8 +102,9 @@ int drm_proc_init(struct drm_minor *minor, int minor_id,
}
for (i = 0; i < DRM_PROC_ENTRIES; i++) {
- ent = create_proc_entry(drm_proc_list[i].name,
- S_IFREG | S_IRUGO, minor->dev_root);
+ ent = create_proc_read_entry(drm_proc_list[i].name,
+ S_IFREG | S_IRUGO, minor->dev_root,
+ drm_proc_list[i].f, minor);
if (!ent) {
DRM_ERROR("Cannot create /proc/dri/%s/%s\n",
name, drm_proc_list[i].name);
@@ -114,8 +115,6 @@ int drm_proc_init(struct drm_minor *minor, int minor_id,
minor->dev_root = NULL;
return -1;
}
- ent->read_proc = drm_proc_list[i].f;
- ent->data = minor;
}
return 0;
--
1.5.5.1
next prev parent reply other threads:[~2008-06-01 4:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-01 3:39 [PATCH] drm: fix crash due to /proc registration race Arjan van de Ven
2008-06-01 4:48 ` Arjan van de Ven [this message]
2008-06-01 9:25 ` [PATCH] drm: make drm use create_proc_read_entry() instead Alexey Dobriyan
2008-06-01 9:36 ` Al Viro
2008-06-01 10:10 ` [PATCH] drm: switch to seq_files Alexey Dobriyan
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=20080531214821.19218b6b@infradead.org \
--to=arjan@infradead.org \
--cc=airlied@linux.ie \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@ZenIV.linux.org.uk \
/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
all inboxes | Powered by JetHome®