summary refs log tree commit diff
path: root/fs/ext4/super.c
diff options
context:
space:
mode:
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2009-11-07 18:45:16 +0900
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2009-11-08 19:01:35 +0900
commit5399dd1fc8f5e812db931225ef5f67d89f3b1a56 (patch)
treecb75ad2f91fb2ec6ad70f3c1a055090418fc643f /fs/ext4/super.c
parentb419148e567728f6af0c3b01965c1cc141e3e13a (diff)
downloadlinux-5399dd1fc8f5e812db931225ef5f67d89f3b1a56.tar.gz
nilfs2: fix kernel oops in error case of nilfs_ioctl_move_blocks
This fixes a kernel oops reported by Markus Trippelsdorf in the email
titled "[NILFS users] kernel Oops while running nilfs_cleanerd".

The oops was caused by a bug of error path in
nilfs_ioctl_move_blocks() function, which was inlined in
nilfs_ioctl_clean_segments().

nilfs_ioctl_move_blocks checks duplication of blocks which will be
moved in garbage collection.  But, the check should have be done
within nilfs_ioctl_move_inode_block() to prevent list corruption among
buffers storing the target blocks.

To fix the kernel oops, this moves forward the duplication check
before the list insertion.

I also tested this for stable trees [2.6.30, 2.6.31].

Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Cc: stable <stable@kernel.org>
Diffstat (limited to 'fs/ext4/super.c')
0 files changed, 0 insertions, 0 deletions