| To: | Cahya Wirawan <cwirawan@xxxxxxxxxxxxxxxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: XFS: Oops in 2.4.26 and 2.4.27-rc4 |
| From: | Nathan Scott <nathans@xxxxxxx> |
| Date: | Mon, 2 Aug 2004 14:58:27 +1000 |
| Cc: | linux-kernel@xxxxxxxxxxxxxxx, linux-xfs@xxxxxxxxxxx |
| In-reply-to: | <20040801165946.GA1045@email.archlab.tuwien.ac.at> |
| References: | <20040801165946.GA1045@email.archlab.tuwien.ac.at> |
| Sender: | linux-xfs-bounce@xxxxxxxxxxx |
| User-agent: | Mutt/1.5.3i |
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 in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [2.6 patch] let 4KSTACKS depend on EXPERIMENTAL, Adrian Bunk |
|---|---|
| Next by Date: | Re: 2.4.26 XFS file space reporting bug, Nathan Scott |
| Previous by Thread: | [2.6 patch] let 4KSTACKS depend on EXPERIMENTAL, Adrian Bunk |
| Next by Thread: | Re: 2.4.26 XFS file space reporting bug, Nathan Scott |
| Indexes: | [Date] [Thread] [Top] [All Lists] |