]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
dm zone: fix dm_revalidate_zones() memory allocation
authorDamien Le Moal <damien.lemoal@wdc.com>
Fri, 18 Jun 2021 23:15:19 +0000 (08:15 +0900)
committerMike Snitzer <snitzer@redhat.com>
Fri, 25 Jun 2021 19:25:23 +0000 (15:25 -0400)
commit28436ba34b7d1b6af2a898d37ee678a1eb643db4
tree3249cac7d6ca1cf1def45ff7937a258ccec8fe3b
parent326dbde2e0a77be107c9ddd04899fd9ee27ffc94
dm zone: fix dm_revalidate_zones() memory allocation

Make sure that the zone write pointer offset array is allocated with a
vmalloc in dm_zone_revalidate_cb() by passing GFP_KERNEL gfp flag to
kvcalloc(). However, since we do not want to trigger IOs while
revalidating zones, change dm_revalidate_zones() to have the zone scan
done in GFP_NOIO context using memalloc_noio_save/restore calls.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: bb37d77239af ("dm: introduce zone append emulation")
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-zone.c