summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_trans.h
diff options
context:
space:
mode:
authorRustam Kovhaev <rkovhaev@gmail.com>2021-10-11 16:02:22 -0700
committerDarrick J. Wong <djwong@kernel.org>2021-10-11 16:13:30 -0700
commitc30a0cbd07ecc0eec7b3cd568f7b1c7bb7913f93 (patch)
treef34ba1c6084e01aeab941523e91ddda9c61f4237 /fs/xfs/xfs_trans.h
parenta785fba7df9a80098c71dd65df0923e6018ac0d5 (diff)
xfs: use kmem_cache_free() for kmem_cache objects
For kmalloc() allocations SLOB prepends the blocks with a 4-byte header, and it puts the size of the allocated blocks in that header. Blocks allocated with kmem_cache_alloc() allocations do not have that header. SLOB explodes when you allocate memory with kmem_cache_alloc() and then try to free it with kfree() instead of kmem_cache_free(). SLOB will assume that there is a header when there is none, read some garbage to size variable and corrupt the adjacent objects, which eventually leads to hang or panic. Let's make XFS work with SLOB by using proper free function. Fixes: 9749fee83f38 ("xfs: enable the xfs_defer mechanism to process extents to free") Signed-off-by: Rustam Kovhaev <rkovhaev@gmail.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/xfs_trans.h')
0 files changed, 0 insertions, 0 deletions