diff options
author | Milan Broz <mbroz@redhat.com> | 2007-12-13 14:16:10 +0000 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2007-12-20 17:32:13 +0000 |
commit | 91e106259214b40e992a58fb9417da46868e19b2 (patch) | |
tree | d40a2f0aa45427a66d024ce1b29ea7cb24cc770e /drivers/scsi/scsi_transport_iscsi.c | |
parent | 91212507f93778c09d4c1335207b6f4b995f5ad1 (diff) | |
download | op-kernel-dev-91e106259214b40e992a58fb9417da46868e19b2.zip op-kernel-dev-91e106259214b40e992a58fb9417da46868e19b2.tar.gz |
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>
Diffstat (limited to 'drivers/scsi/scsi_transport_iscsi.c')
0 files changed, 0 insertions, 0 deletions