This is a note to let you know that I've just added the patch titled
nilfs2: fix crash after one superblock became unavailable
to the 2.6.36-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
nilfs2-fix-crash-after-one-superblock-became-unavailable.patch
and it can be found in the queue-2.6.36 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 0ca7a5b9ac5d301845dd6382ff25a699b6263a81 Mon Sep 17 00:00:00 2001
From: Ryusuke Konishi <[email protected]>
Date: Fri, 21 Jan 2011 16:40:31 +0900
Subject: nilfs2: fix crash after one superblock became unavailable
From: Ryusuke Konishi <[email protected]>
commit 0ca7a5b9ac5d301845dd6382ff25a699b6263a81 upstream.
Fixes the following kernel oops in nilfs_setup_super() which could
arise if one of two super-blocks is unavailable.
> BUG: unable to handle kernel NULL pointer dereference at (null)
> Pid: 3529, comm: mount.nilfs2 Not tainted 2.6.37 #1 /
> EIP: 0060:[<c03196bc>] EFLAGS: 00010202 CPU: 3
> EIP is at memcpy+0xc/0x1b
> Call Trace:
> [<f953720e>] ? nilfs_setup_super+0x6c/0xa5 [nilfs2]
> [<f95369e9>] ? nilfs_get_root_dentry+0x81/0xcb [nilfs2]
> [<f9537a08>] ? nilfs_mount+0x4f9/0x62c [nilfs2]
> [<c02745cf>] ? kstrdup+0x36/0x3f
> [<f953750f>] ? nilfs_mount+0x0/0x62c [nilfs2]
> [<c0293940>] ? vfs_kern_mount+0x4d/0x12c
> [<c02a5100>] ? get_fs_type+0x76/0x8f
> [<c0293a68>] ? do_kern_mount+0x33/0xbf
> [<c02a784a>] ? do_mount+0x2ed/0x714
> [<c02a6171>] ? copy_mount_options+0x28/0xfc
> [<c02a7ce3>] ? sys_mount+0x72/0xaf
> [<c0473085>] ? syscall_call+0x7/0xb
Reported-by: Wakko Warner <[email protected]>
Signed-off-by: Ryusuke Konishi <[email protected]>
Tested-by: Wakko Warner <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
fs/nilfs2/super.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/fs/nilfs2/super.c
+++ b/fs/nilfs2/super.c
@@ -733,7 +733,8 @@ static int nilfs_setup_super(struct nilf
cpu_to_le16(le16_to_cpu(sbp[0]->s_state) & ~NILFS_VALID_FS);
sbp[0]->s_mtime = cpu_to_le64(get_seconds());
/* synchronize sbp[1] with sbp[0] */
- memcpy(sbp[1], sbp[0], nilfs->ns_sbsize);
+ if (sbp[1])
+ memcpy(sbp[1], sbp[0], nilfs->ns_sbsize);
return nilfs_commit_super(sbi, NILFS_SB_COMMIT_ALL);
}
Patches currently in stable-queue which might be from
[email protected] are
queue-2.6.36/nilfs2-fix-crash-after-one-superblock-became-unavailable.patch
_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable