From: Manfred Spraul <manfred@colorfullife.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sendfile calls lock_verify_area with wrong parameters
Date: Sun, 18 Jan 2004 14:04:42 +0100 [thread overview]
Message-ID: <400A846A.6000003@colorfullife.com> (raw)
In-Reply-To: <400A7DF5.4060704@colorfullife.com>
[-- Attachment #1: Type: text/plain, Size: 210 bytes --]
Manfred Spraul wrote:
>+ if (!ppos)
>+ ppos = &in_file->f_pos;
>
>
Too early - in_file not yet initialized.
An updated (and tested with 2.6.1-mm4) patch is attached - sorry for the
noise.
--
Manfred
[-- Attachment #2: patch-locks-sendfile --]
[-- Type: text/plain, Size: 657 bytes --]
--- 2.6/fs/read_write.c 2004-01-17 12:19:38.000000000 +0100
+++ build-2.6/fs/read_write.c 2004-01-18 13:42:11.000000000 +0100
@@ -559,7 +559,9 @@
goto fput_in;
if (!in_file->f_op || !in_file->f_op->sendfile)
goto fput_in;
- retval = locks_verify_area(FLOCK_VERIFY_READ, in_inode, in_file, in_file->f_pos, count);
+ if (!ppos)
+ ppos = &in_file->f_pos;
+ retval = locks_verify_area(FLOCK_VERIFY_READ, in_inode, in_file, *ppos, count);
if (retval)
goto fput_in;
@@ -588,9 +590,6 @@
if (retval)
goto fput_out;
- if (!ppos)
- ppos = &in_file->f_pos;
-
if (!max)
max = min(in_inode->i_sb->s_maxbytes, out_inode->i_sb->s_maxbytes);
prev parent reply other threads:[~2004-01-18 13:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-18 12:37 [PATCH] sendfile calls lock_verify_area with wrong parameters Manfred Spraul
2004-01-18 13:04 ` Manfred Spraul [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=400A846A.6000003@colorfullife.com \
--to=manfred@colorfullife.com \
--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