linux-sg2042/fs/nilfs2
Ryusuke Konishi 0ca7a5b9ac nilfs2: fix crash after one superblock became unavailable
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 <wakko@animx.eu.org>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Tested-by: Wakko Warner <wakko@animx.eu.org>
Cc: stable <stable@kernel.org> [2.6.37, 2.6.36]
LKML-Reference: <20110121024918.GA29598@animx.eu.org>
2011-01-22 15:22:36 +09:00
..
Kconfig Revert "task_struct: make journal_info conditional" 2009-12-17 13:23:24 -08:00
Makefile nilfs2: get rid of GCDAT inode 2010-10-23 09:24:38 +09:00
alloc.c nilfs2: add kernel doc comments to persistent object allocator functions 2010-05-10 11:32:31 +09:00
alloc.h nilfs2: add kernel doc comments to persistent object allocator functions 2010-05-10 11:32:31 +09:00
bmap.c nilfs2: unfold nilfs_dat_inode function 2011-01-10 14:38:39 +09:00
bmap.h nilfs2: get rid of GCDAT inode 2010-10-23 09:24:38 +09:00
btnode.c nilfs2: unfold nilfs_dat_inode function 2011-01-10 14:38:39 +09:00
btnode.h nilfs2: add read ahead mode to nilfs_btnode_submit_block 2010-07-23 10:02:15 +09:00
btree.c nilfs2: apply read-ahead for nilfs_btree_lookup_contig 2010-07-23 10:02:16 +09:00
btree.h nilfs2: get rid of nilfs_bmap_union 2010-07-23 10:02:14 +09:00
cpfile.c nilfs2: see state of root dentry for mount check of snapshots 2010-10-23 09:24:38 +09:00
cpfile.h nilfs2: use iget for all metadata files 2010-10-23 09:24:38 +09:00
dat.c nilfs2: fix typo in comment of nilfs_dat_move function 2010-11-24 12:51:48 +09:00
dat.h nilfs2: use iget for all metadata files 2010-10-23 09:24:38 +09:00
dir.c nilfs2: do not pass sbi to functions which can get it from inode 2011-01-10 14:37:54 +09:00
direct.c nilfs2: remove redundant pointer checks in bmap lookup functions 2010-07-23 10:02:14 +09:00
direct.h nilfs2: get rid of nilfs_bmap_union 2010-07-23 10:02:14 +09:00
export.h nilfs2: make snapshots in checkpoint tree exportable 2010-10-23 09:24:34 +09:00
file.c nilfs2: fiemap support 2011-01-10 14:05:46 +09:00
gcinode.c nilfs2: fix regression of garbage collection ioctl 2010-12-16 14:35:18 +09:00
ifile.c nilfs2: call nilfs_error inside bmap routines 2011-01-10 14:05:45 +09:00
ifile.h nilfs2: use iget for all metadata files 2010-10-23 09:24:38 +09:00
inode.c nilfs2: unfold nilfs_dat_inode function 2011-01-10 14:38:39 +09:00
ioctl.c nilfs2: unfold nilfs_dat_inode function 2011-01-10 14:38:39 +09:00
mdt.c nilfs2: simplify nilfs_mdt_freeze_buffer 2011-01-10 14:05:46 +09:00
mdt.h nilfs2: remove own inode allocator and destructor for metadata files 2010-10-23 09:24:39 +09:00
namei.c nilfs2: fiemap support 2011-01-10 14:05:46 +09:00
nilfs.h nilfs2: unfold nilfs_dat_inode function 2011-01-10 14:38:39 +09:00
page.c nilfs2: fix a checkpatch error in page.c 2011-01-10 14:05:46 +09:00
page.h nilfs2: fiemap support 2011-01-10 14:05:46 +09:00
recovery.c nilfs2: do not pass sbi to functions which can get it from inode 2011-01-10 14:37:54 +09:00
sb.h nilfs2: get rid of nilfs_mount_options structure 2011-01-10 14:05:46 +09:00
segbuf.c nilfs2: get rid of bdi from nilfs object 2010-10-23 09:24:39 +09:00
segbuf.h nilfs2: get rid of macros for segment summary information 2010-07-23 10:02:09 +09:00
segment.c nilfs2: unfold nilfs_dat_inode function 2011-01-10 14:38:39 +09:00
segment.h nilfs2: use root object to get ifile 2010-10-23 09:24:35 +09:00
sufile.c nilfs2: get rid of mi_nilfs back pointer to nilfs object 2010-10-23 09:24:38 +09:00
sufile.h nilfs2: get rid of mi_nilfs back pointer to nilfs object 2010-10-23 09:24:38 +09:00
super.c nilfs2: fix crash after one superblock became unavailable 2011-01-22 15:22:36 +09:00
the_nilfs.c nilfs2: unfold nilfs_dat_inode function 2011-01-10 14:38:39 +09:00
the_nilfs.h nilfs2: get rid of loaded flag from nilfs object 2011-01-10 14:05:46 +09:00