From: Nathan Scott <nathans@sgi.com>
To: Cahya Wirawan <cwirawan@email.archlab.tuwien.ac.at>
Cc: linux-kernel@vger.kernel.org, linux-xfs@oss.sgi.com
Subject: Re: XFS: Oops in 2.4.26 and 2.4.27-rc4
Date: Mon, 2 Aug 2004 14:58:27 +1000 [thread overview]
Message-ID: <20040802045827.GA21646@frodo> (raw)
In-Reply-To: <20040801165946.GA1045@email.archlab.tuwien.ac.at>
On Sun, Aug 01, 2004 at 06:59:46PM +0200, Cahya Wirawan wrote:
> Hi,
Hi there,
> ...
> 2.4.26 and 2.4.27-rc4 get an Oops again. The server will not always
> crash, but it gets always an Oops at the same test (diotest4), and it is
Thanks for reporting it, here is the fix.
cheers.
--
Nathan
--- fs/xfs/linux-2.4/xfs_lrw.c.orig 2004-08-02 12:57:02.000000000 +1000
+++ fs/xfs/linux-2.4/xfs_lrw.c 2004-08-02 13:00:03.000000000 +1000
@@ -283,6 +283,8 @@
XFS_STATS_INC(xs_read_calls);
if (unlikely(ioflags & IO_ISDIRECT)) {
+ if ((ssize_t)size < 0)
+ return -XFS_ERROR(EINVAL);
if (((__psint_t)buf & BBMASK) ||
(*offset & mp->m_blockmask) ||
(size & mp->m_blockmask)) {
@@ -325,7 +327,8 @@
if (unlikely(ioflags & IO_ISDIRECT)) {
xfs_rw_enter_trace(XFS_DIORD_ENTER, &ip->i_iocore,
buf, size, *offset, ioflags);
- ret = do_generic_direct_read(file, buf, size, offset);
+ ret = (*offset < ip->i_d.di_size) ?
+ do_generic_direct_read(file, buf, size, offset) : 0;
UPDATE_ATIME(file->f_dentry->d_inode);
} else {
xfs_rw_enter_trace(XFS_READ_ENTER, &ip->i_iocore,
prev parent reply other threads:[~2004-08-02 4:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-01 16:59 XFS: Oops in 2.4.26 and 2.4.27-rc4 Cahya Wirawan
2004-08-02 4:58 ` Nathan Scott [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=20040802045827.GA21646@frodo \
--to=nathans@sgi.com \
--cc=cwirawan@email.archlab.tuwien.ac.at \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@oss.sgi.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.