Searched hist:"318716 ddea0829d3be566efc69d31029c40d51e2" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/md/ |
H A D | dm.c | diff 318716ddea0829d3be566efc69d31029c40d51e2 Wed Nov 22 13:56:12 CST 2017 Mike Snitzer <snitzer@redhat.com> dm: safely allocate multiple bioset bios
DM targets can request multiple bios be sent to them by DM core (see: num_{flush,discard,write_same,write_zeroes}_bios). But until now these bios were allocated in an unsafe manner than could potentially exhaust the DM device's bioset -- in the face of multiple threads each trying to do multiple allocations from the same DM device's bioset.
Fix __send_duplicate_bios() by using the new alloc_multiple_bios(). The allocation strategy used by alloc_multiple_bios() models that used by dm-crypt.c:crypt_alloc_buffer().
Neil Brown initially proposed this fix but the implementation has been revised enough that it inappropriate to attribute the entirety of it to him.
Suggested-by: NeilBrown <neilb@suse.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
|