xfs: use kvfree for buf in xfs_ioc_getbmap
authorChristoph Hellwig <hch@lst.de>
Fri, 16 Feb 2024 17:02:30 +0000 (18:02 +0100)
committerChandan Babu R <chandanbabu@kernel.org>
Mon, 19 Feb 2024 04:17:31 +0000 (09:47 +0530)
commit49c379d3a72ab86aafeafebe6b43577acb1ef359
treeb33153d497040b3d56ee86e2541c9a5f9761bf72
parente4c3b72a6ea93ed9c1815c74312eee9305638852
xfs: use kvfree for buf in xfs_ioc_getbmap

Without this the kernel crashes in kfree for files with a sufficiently
large number of extents.

Fixes: d4c75a1b40cd ("xfs: convert remaining kmem_free() to kfree()")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
fs/xfs/xfs_ioctl.c