diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2018-06-05 05:26:33 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-11-06 12:18:01 +0100 |
commit | 7ff8f2104cc9f371d64fc87a3f9a08e6e88f6614 (patch) | |
tree | 141d5bd9d79184bf13dd070c9e928ce3da105667 /drivers/md/dm-bio-prison.c | |
parent | 37524335ac39dd4a77c305735c2ce5522278d674 (diff) | |
download | linux-stable-7ff8f2104cc9f371d64fc87a3f9a08e6e88f6614.tar.gz linux-stable-7ff8f2104cc9f371d64fc87a3f9a08e6e88f6614.tar.bz2 linux-stable-7ff8f2104cc9f371d64fc87a3f9a08e6e88f6614.zip |
dm: Use kzalloc for all structs with embedded biosets/mempools
[ Upstream commit d377535405686f735b90a8ad4ba269484cd7c96e ]
mempool_init()/bioset_init() require that the mempools/biosets be zeroed
first; they probably should not _require_ this, but not allocating those
structs with kzalloc is a fairly nonsensical thing to do (calling
mempool_exit()/bioset_exit() on an uninitialized mempool/bioset is legal
and safe, but only works if said memory was zeroed.)
Acked-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/md/dm-bio-prison.c')
-rw-r--r-- | drivers/md/dm-bio-prison.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm-bio-prison.c b/drivers/md/dm-bio-prison.c index 03af174485d3..fa2432a89bac 100644 --- a/drivers/md/dm-bio-prison.c +++ b/drivers/md/dm-bio-prison.c @@ -32,7 +32,7 @@ static struct kmem_cache *_cell_cache; */ struct dm_bio_prison *dm_bio_prison_create(void) { - struct dm_bio_prison *prison = kmalloc(sizeof(*prison), GFP_KERNEL); + struct dm_bio_prison *prison = kzalloc(sizeof(*prison), GFP_KERNEL); if (!prison) return NULL; |