lkml.org 
[lkml]   [2003]   [Sep]   [8]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateMon, 8 Sep 2003 12:54:33 +0400
FromOleg Drokin <>
SubjectRe: sync crashed with segfault on 2.6.0-test4 (reiserfs partition)
Hello!

On Fri, Sep 05, 2003 at 02:24:48PM +0400, Alexander Vodomerov wrote:
> Yesterday I've tried 2.6.0-test4 kernel. It works fine about 17 hours, but
> suddenly sync command causes a segfault. I've made sync many times
> Sep  4 16:43:36 lorien kernel: EIP:    0060:[mpage_writepages+301/688]  
> Sep  4 16:43:36 lorien kernel:  [reiserfs_writepage+0/64] reiserfs_writepage+0x0/0x40
> Sep  4 16:43:36 lorien kernel:  [do_writepages+54/64] do_writepages+0x36/0x40
> Sep  4 16:43:36 lorien kernel:  [__sync_single_inode+169/496] __sync_single_inode+0xa9/0x1f0
> Sep  4 16:43:36 lorien kernel:  [sync_sb_inodes+396/560] sync_sb_inodes+0x18c/0x230
> Sep  4 16:43:36 lorien kernel:  [sync_inodes_sb+119/144] sync_inodes_sb+0x77/0x90
> Sep  4 16:43:36 lorien kernel:  [sync_inodes+43/160] sync_inodes+0x2b/0xa0
> Sep  4 16:43:36 lorien kernel:  [do_sync+35/112] do_sync+0x23/0x70
> Sep  4 16:43:36 lorien kernel:  [sys_sync+15/32] sys_sync+0xf/0x20
> Sep  4 16:43:36 lorien kernel:  [syscall_call+7/11] syscall_call+0x7/0xb

This is fixed in current bk tree/current -mm tree.
The following patch should do the trick.

Bye,
    Oleg

diff -Nru a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c
--- a/fs/reiserfs/inode.c	Mon Sep  8 12:54:12 2003
+++ b/fs/reiserfs/inode.c	Mon Sep  8 12:54:12 2003
@@ -2048,8 +2048,8 @@
         last_offset = inode->i_size & (PAGE_CACHE_SIZE - 1) ;
 	/* no file contents in this page */
 	if (page->index >= end_index + 1 || !last_offset) {
-	    error = 0 ;
-	    goto done ;
+    	    unlock_page(page);
+	    return 0;
 	}
 	kaddr = kmap_atomic(page, KM_USER0);
 	memset(kaddr + last_offset, 0, PAGE_CACHE_SIZE-last_offset) ;
-
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 13:48    [from the cache]
©2003-2008