lkml.org 
[lkml]   [2004]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: XFS: Oops in 2.4.26 and 2.4.27-rc4
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,
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:04    [W:0.026 / U:0.796 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site