linux/drivers/md
Milan Broz 91e1062592 dm crypt: use bio_add_page
Fix possible max_phys_segments violation in cloned dm-crypt bio.

In write operation dm-crypt needs to allocate new bio request
and run crypto operation on this clone. Cloned request has always
the same size, but number of physical segments can be increased
and violate max_phys_segments restriction.

This can lead to data corruption and serious hardware malfunction.
This was observed when using XFS over dm-crypt and at least
two HBA controller drivers (arcmsr, cciss) recently.

Fix it by using bio_add_page() call (which tests for other
restrictions too) instead of constructing own biovec.

All versions of dm-crypt are affected by this bug.

Cc: stable@kernel.org
Cc:  dm-crypt@saout.de
Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2007-12-20 17:32:13 +00:00
..
raid6test
.gitignore
bitmap.c Add UNPLUG traces to all appropriate places 2007-11-09 13:41:32 +01:00
dm-bio-list.h
dm-bio-record.h
dm-crypt.c dm crypt: use bio_add_page 2007-12-20 17:32:13 +00:00
dm-delay.c
dm-emc.c
dm-exception-store.c
dm-hw-handler.c
dm-hw-handler.h
dm-io.c
dm-io.h
dm-ioctl.c dm: trigger change uevent on rename 2007-12-20 17:32:11 +00:00
dm-linear.c
dm-log.c
dm-log.h
dm-mpath-hp-sw.c
dm-mpath-rdac.c
dm-mpath.c
dm-mpath.h
dm-path-selector.c
dm-path-selector.h
dm-raid1.c
dm-round-robin.c
dm-snap.c
dm-snap.h
dm-stripe.c
dm-table.c dm: merge max_hw_sector 2007-12-20 17:32:12 +00:00
dm-target.c
dm-uevent.c
dm-uevent.h
dm-zero.c
dm.c dm: trigger change uevent on rename 2007-12-20 17:32:11 +00:00
dm.h dm: trigger change uevent on rename 2007-12-20 17:32:11 +00:00
faulty.c
Kconfig dm mpath: hp requires scsi 2007-12-20 17:32:09 +00:00
kcopyd.c
kcopyd.h
linear.c Add UNPLUG traces to all appropriate places 2007-11-09 13:41:32 +01:00
Makefile
md.c Add UNPLUG traces to all appropriate places 2007-11-09 13:41:32 +01:00
mktables.c
multipath.c Add UNPLUG traces to all appropriate places 2007-11-09 13:41:32 +01:00
raid0.c Add UNPLUG traces to all appropriate places 2007-11-09 13:41:32 +01:00
raid1.c Add UNPLUG traces to all appropriate places 2007-11-09 13:41:32 +01:00
raid5.c raid5: fix unending write sequence 2007-11-14 18:45:39 -08:00
raid6.h
raid6algos.c
raid6altivec.uc
raid6int.uc
raid6mmx.c
raid6recov.c
raid6sse1.c
raid6sse2.c
raid6x86.h
raid10.c Add UNPLUG traces to all appropriate places 2007-11-09 13:41:32 +01:00
unroll.pl