]> git.baikalelectronics.ru Git - kernel.git/commit
dm: cope with access beyond end of device in dm_merge_bvec
authorMikulas Patocka <mpatocka@redhat.com>
Wed, 1 Oct 2008 13:39:24 +0000 (14:39 +0100)
committerAlasdair G Kergon <agk@redhat.com>
Wed, 1 Oct 2008 13:39:24 +0000 (14:39 +0100)
commit4ec1d3db1614f28d91b578056418806b1b6bf3ec
treeccfda9067457032999a5d2d6ed5203caa2422937
parent1a8c45e509d7a74afdfc011c6b3228a3bff86d9d
dm: cope with access beyond end of device in dm_merge_bvec

If for any reason dm_merge_bvec() is given an offset beyond the end of the
device, avoid an oops and always allow one page to be added to an empty bio.
We'll reject the I/O later after the bio is submitted.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
drivers/md/dm.c