From: Ben Dooks <ben-linux@fluff.org>
To: linux-kernel@vger.kernel.org
Cc: akpm@osdl.org
Subject: [PATCH] fs/proc/base.c - fix sparse errors
Date: Mon, 14 Mar 2005 20:49:42 +0000 [thread overview]
Message-ID: <20050314204942.GA32406@home.fluff.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 1239 bytes --]
Rewrite initialiser for proc_oom_adjust_operations,
and add __user annotations to oom_adjust_{read|write}
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
diff -urN -X ../dontdiff linux-2.6.11-bk10/fs/proc/base.c linux-2.6.11-bk10-procfs/fs/proc/base.c
--- linux-2.6.11-bk10/fs/proc/base.c 2005-03-14 14:45:00.000000000 +0000
+++ linux-2.6.11-bk10-procfs/fs/proc/base.c 2005-03-14 20:43:39.000000000 +0000
@@ -715,7 +715,7 @@
.open = mem_open,
};
-static ssize_t oom_adjust_read(struct file *file, char *buf,
+static ssize_t oom_adjust_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{
struct task_struct *task = proc_task(file->f_dentry->d_inode);
@@ -735,7 +735,7 @@
return count;
}
-static ssize_t oom_adjust_write(struct file *file, const char *buf,
+static ssize_t oom_adjust_write(struct file *file, const char __user *buf,
size_t count, loff_t *ppos)
{
struct task_struct *task = proc_task(file->f_dentry->d_inode);
@@ -761,8 +761,8 @@
}
static struct file_operations proc_oom_adjust_operations = {
- read: oom_adjust_read,
- write: oom_adjust_write,
+ .read = oom_adjust_read,
+ .write = oom_adjust_write,
};
static struct inode_operations proc_mem_inode_operations = {
[-- Attachment #2: fs-proc-base.patch --]
[-- Type: text/plain, Size: 1084 bytes --]
diff -urN -X ../dontdiff linux-2.6.11-bk10/fs/proc/base.c linux-2.6.11-bk10-procfs/fs/proc/base.c
--- linux-2.6.11-bk10/fs/proc/base.c 2005-03-14 14:45:00.000000000 +0000
+++ linux-2.6.11-bk10-procfs/fs/proc/base.c 2005-03-14 20:43:39.000000000 +0000
@@ -715,7 +715,7 @@
.open = mem_open,
};
-static ssize_t oom_adjust_read(struct file *file, char *buf,
+static ssize_t oom_adjust_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{
struct task_struct *task = proc_task(file->f_dentry->d_inode);
@@ -735,7 +735,7 @@
return count;
}
-static ssize_t oom_adjust_write(struct file *file, const char *buf,
+static ssize_t oom_adjust_write(struct file *file, const char __user *buf,
size_t count, loff_t *ppos)
{
struct task_struct *task = proc_task(file->f_dentry->d_inode);
@@ -761,8 +761,8 @@
}
static struct file_operations proc_oom_adjust_operations = {
- read: oom_adjust_read,
- write: oom_adjust_write,
+ .read = oom_adjust_read,
+ .write = oom_adjust_write,
};
static struct inode_operations proc_mem_inode_operations = {
reply other threads:[~2005-03-14 20:50 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=20050314204942.GA32406@home.fluff.org \
--to=ben-linux@fluff.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®