]> git.karo-electronics.de Git - karo-tx-linux.git/commit
um: fix ubd cow size
authorRichard Weinberger <richard@nod.at>
Wed, 2 Nov 2011 12:17:27 +0000 (13:17 +0100)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Fri, 17 Aug 2012 19:35:39 +0000 (15:35 -0400)
commit646c97408dc636ce5a4ffeaa285d070b0ea47e43
tree9824717e4a7c68cd6f484942103e35d70fc6ce3b
parent459d03f9128cec3e66a52d1cc805f9698c427af9
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: Paul Gortmaker <paul.gortmaker@windriver.com>
arch/um/drivers/ubd_kern.c