From: Christoph Hellwig Date: Fri, 16 Feb 2024 17:02:30 +0000 (+0100) Subject: xfs: use kvfree for buf in xfs_ioc_getbmap X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=49c379d3a72ab86aafeafebe6b43577acb1ef359;p=linux.git 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 Reviewed-by: Carlos Maiolino Reviewed-by: Chaitanya Kulkarni Signed-off-by: Chandan Babu R --- diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c index 7eeebcb6b9250..7c35d76440972 100644 --- a/fs/xfs/xfs_ioctl.c +++ b/fs/xfs/xfs_ioctl.c @@ -1506,7 +1506,7 @@ xfs_ioc_getbmap( error = 0; out_free_buf: - kfree(buf); + kvfree(buf); return error; }