Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
block: make bioset_exit() fully resilient against being called twice
Most of bioset_exit() is fine being called twice, as it clears the various allocations etc when they are freed. The exception is bio_alloc_cache_destroy(), which does not clear ->cache when it has freed it. This isn't necessarily a bug, but can be if buggy users does call the exit path more then once, or with just a memset() bioset which has never been initialized. dm appears to be one such user. Fixes: be4d234 ("bio: add allocation cache abstraction") Link: https://lore.kernel.org/linux-block/[email protected]/ Reported-by: Matthew Wilcox <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
- Loading branch information