函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Thread function performing automatic memory scanning. Unreferenced objects* at the end of a memory scan are reported but only the first time.

函数原型:static int kmemleak_scan_thread(void *arg)

返回类型:int

参数:

类型参数名称
void *arg
1551  first_run等于IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_DEBUG_KMEMLEAK_AUTO_SCAN)
1553  打印信息("Automatic memory scanning thread started\n")
1554  set_user_nice(当前进程, 10)
1559  如果first_run
1560  timeout等于msecs_to_jiffies: - convert milliseconds to jiffies*@m: time in milliseconds* conversion is done as follows:* - negative values mean 'infinite timeout' (MAX_JIFFY_OFFSET)* - 'too large' values [that would result in larger than
1561  first_run等于0
1562 timeout且非kthread_should_stop - should this kthread return now?* When someone calls kthread_stop() on your kthread, it will be woken* and this will return true. You should then return, and your return* value will be passed through to kthread_stop().循环
1563  timeout等于We can use __set_current_state() here because schedule_timeout() calls* schedule() unconditionally.
1566  当非kthread_should_stop - should this kthread return now?* When someone calls kthread_stop() on your kthread, it will be woken* and this will return true. You should then return, and your return* value will be passed through to kthread_stop().循环
1567  timeout等于delay between automatic memory scannings
1569  mutex_lock( & protects the memory scanning, parameters and debug/kmemleak file access )
1570  Scan data sections and all the referenced memory blocks allocated via the* kernel's standard allocators. This function must be called with the* scan_mutex held.
1571  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
1574 timeout且非kthread_should_stop - should this kthread return now?* When someone calls kthread_stop() on your kthread, it will be woken* and this will return true. You should then return, and your return* value will be passed through to kthread_stop().循环
1575  timeout等于We can use __set_current_state() here because schedule_timeout() calls* schedule() unconditionally.
1578  打印信息("Automatic memory scanning thread ended\n")
1580  返回:0