函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\util.c Create Date:2022-07-27 15:45:34
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:kstrndup - allocate space for and copy an existing string*@s: the string to duplicate*@max: read at most @max chars from @s*@gfp: the GFP mask used in the kmalloc() call when allocating memory* Note: Use kmemdup_nul() instead if the size is known exactly

函数原型:char *kstrndup(const char *s, size_t max, gfp_t gfp)

返回类型:char

参数:

类型参数名称
const char *s
size_tmax
gfp_tgfp
101  如果非s则返回:NULL
104  len等于字符串长度
105  buf等于kmalloc_track_caller(len + 1, gfp)
106  如果buf
107  内存复制(buf, s, len)
108  buf[len]等于'\0'
110  返回:buf
调用者
名称描述
__kstrncpyXXX: move to kstrncpy() once merged.* Users should use kfree_const() when freeing these.
trigger_request_store
trigger_async_request_store
trigger_custom_fallback_store
__kstrncpyXXX: move to kstrncpy() once merged.* Users should use kfree_const() when freeing these.
wakelock_lookup_add
__parse_imm_string
vmpressure_register_eventvmpressure_register_event() - Bind vmpressure notifications to an eventfd*@memcg: memcg that is interested in vmpressure notifications*@eventfd: eventfd context to link notifications with*@args: event arguments (pressure level threshold, optional mode)*
argv_splitargv_split - split a string at whitespace, returning an argv*@gfp: the GFP mask used to allocate memory*@str: the string to be split*@argcp: returned argument count* Returns an array of pointers to strings which are split out from*@str
resume_store
unpack_profilepack_profile - unpack a serialized profile*@e: serialized data extent information (NOT NULL)* NOTE: unpack profile sets audit struct if there is a failure