Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\test_kasan.c Create Date:2022-07-28 06:29:22
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:kmem_cache_oob

Proto:static noinline void __init kmem_cache_oob(void)

Type:void

Parameter:Nothing

384  size = 200
385  cache = kmem_cache_create("test_cache", size, 0, 0, NULL)
388  If Not cache Then
389  pr_err("Cache allocation failed\n")
390  Return
392  pr_info("out-of-bounds in kmem_cache_alloc\n")
393  p = kmem_cache_alloc(cache, GFP_KERNEL)
394  If Not p Then
395  pr_err("Allocation failed\n")
396  kmem_cache_destroy(cache)
397  Return
400  p = p[size]
401  kmem_cache_free(cache, p)
402  kmem_cache_destroy(cache)
Caller
NameDescribe
kmalloc_tests_init