summaryrefslogtreecommitdiff
path: root/scripts/stackusage
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2016-08-30 16:38:42 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-09-24 10:07:41 +0200
commit2ab3ad1db7fa2fd07972d11b34c586ac13a4f59a (patch)
tree2f36e586a78727914102b9421a93299fbbdb38df /scripts/stackusage
parent319930894f3614de9dabd1e4fae34328d4274a6e (diff)
dm crypt: fix error with too large bios
commit 4e870e948fbabf62b78e8410f04c67703e7c816b upstream. When dm-crypt processes writes, it allocates a new bio in crypt_alloc_buffer(). The bio is allocated from a bio set and it can have at most BIO_MAX_PAGES vector entries, however the incoming bio can be larger (e.g. if it was allocated by bcache). If the incoming bio is larger, bio_alloc_bioset() fails and an error is returned. To avoid the error, we test for a too large bio in the function crypt_map() and use dm_accept_partial_bio() to split the bio. dm_accept_partial_bio() trims the current bio to the desired size and asks DM core to send another bio with the rest of the data. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/stackusage')
0 files changed, 0 insertions, 0 deletions