From: James Morris <jmorris@namei.org>
To: Mimi Zohar <zohar@linux.vnet.ibm.com>
Cc: linux-kernel@vger.kernel.org, Al Viro <viro@zeniv.linux.org.uk>,
Roland Kletzing <devzero@web.de>,
"<David Safford" <safford@watson.ibm.com>,
stable@kernel.org, Mimi Zohar <zohar@us.ibm.com>
Subject: Re: [PATCH 1/2] kernel_read: redefine offset type
Date: Mon, 24 Aug 2009 14:58:06 +1000 (EST) [thread overview]
Message-ID: <alpine.LRH.2.00.0908241458010.22597@tundra.namei.org> (raw)
In-Reply-To: <df9691ba169503565c2e3b71c593f9c43a6b3eb2.1250871856.git.zohar@linux.vnet.ibm.com>
On Fri, 21 Aug 2009, Mimi Zohar wrote:
> vfs_read() offset is defined as loff_t, but kernel_read()
> offset is only defined as unsigned long. Redefine
> kernel_read() offset as loff_t.
>
> Cc: stable@kernel.org
> Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
Reviewed-by: James Morris <jmorris@namei.org>
> ---
> fs/exec.c | 4 ++--
> include/linux/fs.h | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/fs/exec.c b/fs/exec.c
> index 4a8849e..fb4f3cd 100644
> --- a/fs/exec.c
> +++ b/fs/exec.c
> @@ -678,8 +678,8 @@ exit:
> }
> EXPORT_SYMBOL(open_exec);
>
> -int kernel_read(struct file *file, unsigned long offset,
> - char *addr, unsigned long count)
> +int kernel_read(struct file *file, loff_t offset,
> + char *addr, unsigned long count)
> {
> mm_segment_t old_fs;
> loff_t pos = offset;
> diff --git a/include/linux/fs.h b/include/linux/fs.h
> index 67888a9..73e9b64 100644
> --- a/include/linux/fs.h
> +++ b/include/linux/fs.h
> @@ -2123,7 +2123,7 @@ extern struct file *do_filp_open(int dfd, const char *pathname,
> int open_flag, int mode, int acc_mode);
> extern int may_open(struct path *, int, int);
>
> -extern int kernel_read(struct file *, unsigned long, char *, unsigned long);
> +extern int kernel_read(struct file *, loff_t, char *, unsigned long);
> extern struct file * open_exec(const char *);
>
> /* fs/dcache.c -- generic fs support functions */
> --
> 1.6.0.6
>
--
James Morris
<jmorris@namei.org>
prev parent reply other threads:[~2009-08-24 4:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-21 18:32 Mimi Zohar
2009-08-21 18:32 ` [PATCH 2/2] ima: hashing large files bug fix Mimi Zohar
2009-08-24 4:57 ` James Morris
2009-08-24 4:58 ` James Morris [this message]
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=alpine.LRH.2.00.0908241458010.22597@tundra.namei.org \
--to=jmorris@namei.org \
--cc=devzero@web.de \
--cc=linux-kernel@vger.kernel.org \
--cc=safford@watson.ibm.com \
--cc=stable@kernel.org \
--cc=viro@zeniv.linux.org.uk \
--cc=zohar@linux.vnet.ibm.com \
--cc=zohar@us.ibm.com \
/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®