Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\mempolicy.c Create Date:2022-07-28 15:33:24
Last Modify:2020-03-17 22:28:11 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Drop the (possibly final) reference to task->mempolicy. It needs to be* dropped after task->mempolicy is set to NULL so that any allocation done as* part of its kmem_cache_free(), such as by KASAN, doesn't reference a freed* policy.

Proto:void mpol_put_task_policy(struct task_struct *task)

Type:void

Parameter:

TypeParameterName
struct task_struct *task
2480  Protects ->fs, ->files, ->mm, ->group_info, ->comm, keyring* subscriptions and synchronises with wait4(). Also used in procfs. Also* pins the final release of task.io_context. Also protects ->cpuset and* ->cgroup.subsys[]. And ->vfork_done.
2481  pol = mempolicy
2482  mempolicy = NULL
2483  task_unlock(task)
2484  mpol_put(pol)