Jens Axboe 605f7415ec 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: be4d234d7aeb ("bio: add allocation cache abstraction")
Link: https://lore.kernel.org/linux-block/YpK7m+14A+pZKs5k@casper.infradead.org/
Reported-by: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-05-29 07:36:31 -06:00
..
2022-03-21 16:48:55 -07:00
2022-03-26 11:51:46 -07:00
2021-12-06 13:18:47 -07:00
2020-03-17 20:55:21 +01:00
2022-03-08 19:39:38 -07:00
2022-03-24 19:37:53 -07:00
2022-03-31 12:58:38 -06:00
2022-03-24 19:37:53 -07:00
2021-09-14 00:22:15 -04:00
2022-02-02 07:49:59 -07:00
2022-03-21 16:48:55 -07:00
2021-10-18 06:17:01 -06:00
2022-04-17 19:49:59 -06:00
2022-02-02 07:49:59 -07:00
2022-01-12 10:26:52 -08:00
2022-03-07 12:48:35 -07:00
2022-02-02 07:49:59 -07:00
2022-03-07 12:48:35 -07:00