From 49c379d3a72ab86aafeafebe6b43577acb1ef359 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Fri, 16 Feb 2024 18:02:30 +0100 Subject: [PATCH] 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 --- fs/xfs/xfs_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.30.2