git.openpandora.org
/
pandora-kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ee294c7
)
dm persistent data: handle space map checker creation failure
author
Mike Snitzer
<snitzer@redhat.com>
Tue, 3 Jul 2012 11:55:35 +0000
(12:55 +0100)
committer
Ben Hutchings
<ben@decadent.org.uk>
Thu, 12 Jul 2012 03:32:07 +0000
(
04:32
+0100)
commit
62662303e7f590fdfbb0070ab820a0ad4267c119
upstream.
If CONFIG_DM_DEBUG_SPACE_MAPS is enabled and dm_sm_checker_create()
fails, dm_tm_create_internal() would still return success even though it
cleaned up all resources it was supposed to have created. This will
lead to a kernel crash:
general protection fault: 0000 [#1] SMP DEBUG_PAGEALLOC
...
RIP: 0010:[<
ffffffff81593659
>] [<
ffffffff81593659
>] dm_bufio_get_block_size+0x9/0x20
Call Trace:
[<
ffffffff81599bae
>] dm_bm_block_size+0xe/0x10
[<
ffffffff8159b8b8
>] sm_ll_init+0x78/0xd0
[<
ffffffff8159c1a6
>] sm_ll_new_disk+0x16/0xa0
[<
ffffffff8159c98e
>] dm_sm_disk_create+0xfe/0x160
[<
ffffffff815abf6e
>] dm_pool_metadata_open+0x16e/0x6a0
[<
ffffffff815aa010
>] pool_ctr+0x3f0/0x900
[<
ffffffff8158d565
>] dm_table_add_target+0x195/0x450
[<
ffffffff815904c4
>] table_load+0xe4/0x330
[<
ffffffff815917ea
>] ctl_ioctl+0x15a/0x2c0
[<
ffffffff81591963
>] dm_ctl_ioctl+0x13/0x20
[<
ffffffff8116a4f8
>] do_vfs_ioctl+0x98/0x560
[<
ffffffff8116aa51
>] sys_ioctl+0x91/0xa0
[<
ffffffff81869f52
>] system_call_fastpath+0x16/0x1b
Fix the space map checker code to return an appropriate ERR_PTR and have
dm_sm_disk_create() and dm_tm_create_internal() check for it with
IS_ERR.
Reported-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
No differences found