Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Iterate over the object_list and return the first valid object at or after* the required position with its use_count incremented. The function triggers* a memory scanning when the pos argument points to the first position.

Proto:static void *kmemleak_seq_start(struct seq_file *seq, loff_t *pos)

Type:void

Parameter:

TypeParameterName
struct seq_file *seq
loff_t *pos
1617  n = pos
1620  err = mutex_lock_interruptible( & protects the memory scanning, parameters and debug/kmemleak file access )
1621  If err < 0 Then Return ERR_PTR(err)
1624  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
1626  If n-- > 0 Then Continue
1628  If Increment the object use_count. Return 1 if successful or 0 otherwise. Note* that once an object's use_count reached 0, the RCU freeing was already* registered and the object should no longer be used. This function must be Then Go to out
1631  object = NULL
1632  out :
1633  Return object