Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:allocate_loglevel_state

Proto:static int allocate_loglevel_state(void)

Type:int

Parameter:Nothing

38  prev_loglevel_state = klp_get_prev_state(CONSOLE_LOGLEVEL_STATE)
39  If prev_loglevel_state Then
40  pr_info("%s: space to store console_loglevel already allocated\n", __func__)
42  Return 0
45  loglevel_state = klp_get_state( & patch, CONSOLE_LOGLEVEL_STATE)
46  If Not loglevel_state Then Return -EINVAL
49  data = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
50  If Not data Then Return -ENOMEM
53  pr_info("%s: allocating space to store console_loglevel\n", __func__)
55  Return 0
Caller
NameDescribe
pre_patch_callbackExecuted on object patching (ie, patch enablement)
pre_patch_callbackExecuted on object patching (ie, patch enablement)