From: Paul Larson <plars@austin.ibm.com>
To: Badari Pulavarty <pbadari@us.ibm.com>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] vfs_read/vfs_write small bug fix (2.5.29)
Date: 29 Jul 2002 14:02:26 -0500 [thread overview]
Message-ID: <1027969346.11135.187.camel@plars.austin.ibm.com> (raw)
In-Reply-To: <200207291825.g6TIPj026021@eng2.beaverton.ibm.com>
On Mon, 2002-07-29 at 13:25, Badari Pulavarty wrote:
> Hi,
>
> Here is a patch to fix small bug in for vfs_read/vfs_write.
>
> Please apply.
This is actually one of the same issues I was looking at this morning.
I noticed that the Linux Test Project tests pread02 and pwrite02 were
failing because of this. However I also had to do some typecasting to
make it work correctly. I'm not sure this is the best way to do it, but
without the typecasting, the tests still fail.
-Paul Larson
diff -Nru a/fs/read_write.c b/fs/read_write.c
--- a/fs/read_write.c Mon Jul 29 14:48:45 2002
+++ b/fs/read_write.c Mon Jul 29 14:48:45 2002
@@ -185,7 +185,7 @@
return -EBADF;
if (!file->f_op || !file->f_op->read)
return -EINVAL;
- if (pos < 0)
+ if ((int)*pos < 0)
return -EINVAL;
ret = locks_verify_area(FLOCK_VERIFY_READ, inode, file, *pos, count);
@@ -210,7 +210,7 @@
return -EBADF;
if (!file->f_op || !file->f_op->write)
return -EINVAL;
- if (pos < 0)
+ if ((int)*pos < 0)
return -EINVAL;
ret = locks_verify_area(FLOCK_VERIFY_WRITE, inode, file, *pos, count);
next prev parent reply other threads:[~2002-07-29 19:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-29 18:25 Badari Pulavarty
2002-07-29 19:02 ` Paul Larson [this message]
2002-07-29 20:11 ` Linus Torvalds
2002-07-29 21:06 ` Paul Larson
2002-07-29 21:22 ` Linus Torvalds
2002-07-29 22:06 ` Paul Larson
2002-07-29 22:17 ` Linus Torvalds
2002-07-30 7:37 ` Andreas Schwab
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=1027969346.11135.187.camel@plars.austin.ibm.com \
--to=plars@austin.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pbadari@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®