summaryrefslogtreecommitdiff
path: root/drivers/pci/slot.c
diff options
context:
space:
mode:
authorHeinz Mauelshagen <heinzm@redhat.com>2014-03-12 15:13:39 (GMT)
committerJiri Slaby <jslaby@suse.cz>2014-03-24 08:45:00 (GMT)
commitb5ef2d0121f7494d8e06fb51e6646ac1b3693c86 (patch)
treec52c99151c700b694a9cf73cec79fd45cdc967d6 /drivers/pci/slot.c
parent67f1830fcdaefd65371bdd1bba38ca29cf7c2bbf (diff)
downloadlinux-fsl-qoriq-b5ef2d0121f7494d8e06fb51e6646ac1b3693c86.tar.xz
dm cache: fix access beyond end of origin device
commit e893fba90c09f9b57fb97daae204ea9cc2c52fa5 upstream. In order to avoid wasting cache space a partial block at the end of the origin device is not cached. Unfortunately, the check for such a partial block at the end of the origin device was flawed. Fix accesses beyond the end of the origin device that occured due to attempted promotion of an undetected partial block by: - initializing the per bio data struct to allow cache_end_io to work properly - recognizing access to the partial block at the end of the origin device - avoiding out of bounds access to the discard bitset Otherwise, users can experience errors like the following: attempt to access beyond end of device dm-5: rw=0, want=20971520, limit=20971456 ... device-mapper: cache: promotion failed; couldn't copy block Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com> Acked-by: Joe Thornber <ejt@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'drivers/pci/slot.c')
0 files changed, 0 insertions, 0 deletions