]> www.infradead.org Git - users/jedix/linux-maple.git/commit
um: fix ubd cow size
authorRichard Weinberger <richard@nod.at>
Wed, 2 Nov 2011 12:17:27 +0000 (13:17 +0100)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Thu, 8 Dec 2011 19:18:00 +0000 (11:18 -0800)
commit5608a20e67a7f3fe34f389778a54533b54d8a0ec
treeeddc67c7b4eecf4df4ae94104b73dc090540b54b
parentf09fd356f0d02b15463850585b6dc87306a58b1b
um: fix ubd cow size

commit 8535639810e578960233ad39def3ac2157b0c3ec upstream.

ubd_file_size() cannot use ubd_dev->cow.file because at this time
ubd_dev->cow.file is not initialized.
Therefore, ubd_file_size() will always report a wrong disk size when
COW files are used.
Reading from /dev/ubd* would crash the kernel.

We have to read the correct disk size from the COW file's backing
file.

Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/um/drivers/ubd_kern.c