diff options
author | Jonathan Brassow <jbrassow@redhat.com> | 2012-01-28 00:53:53 +0400 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2012-01-31 02:43:41 +0400 |
commit | 34f8ac6d79e5446c6242e4bcb474f152c857c5c6 (patch) | |
tree | 5a0be3b7910428e52603304aa53e8da4476fb4b2 /drivers/video/atafb_utils.h | |
parent | 307729c8bc5b5a41361af8af95906eee7552acb1 (diff) | |
download | linux-34f8ac6d79e5446c6242e4bcb474f152c857c5c6.tar.xz |
Prevent DM RAID from loading bitmap twice.
The life cycle of a device-mapper target is:
1) create
2) resume
3) suspend
*) possibly repeat from 2
4) destroy
The dm-raid target is unconditionally calling MD's bitmap_load function upon
every resume. If steps 2 & 3 above are repeated, bitmap_load is called
multiple times. It is only written to be called once; otherwise, it allocates
new memory for the bitmap (without freeing the old) and incrementing the number
of pages it thinks it has without zeroing first. This ultimately leads to
access beyond allocated memory and lost memory.
Simply avoiding the bitmap_load call upon resume is not sufficient. If the
target was suspended while the initial recovery was only partially complete,
it needs to be restarted when the target is resumed. This is why
'md_wakeup_thread' is called before issuing the 'mddev_resume'.
Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/video/atafb_utils.h')
0 files changed, 0 insertions, 0 deletions