函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__cgroup1_procs_write

函数原型:static ssize_t __cgroup1_procs_write(struct kernfs_open_file *of, char *buf, size_t nbytes, loff_t off, bool threadgroup)

返回类型:ssize_t

参数:

类型参数名称
struct kernfs_open_file *of
char *buf
size_tnbytes
loff_toff
boolthreadgroup
500  cgrp等于group_kn_lock_live - locking helper for cgroup kernfs methods*@kn: the kernfs_node being serviced*@drain_offline: perform offline draining on the cgroup* This helper is to be used by a cgroup kernfs method currently servicing*@kn
501  如果非cgrp则返回:负ENODEV
504  task等于cgroup_procs_write_start(buf, threadgroup, & locked)
505  ret等于PTR_ERR_OR_ZERO(task)
506  如果ret则转到:out_unlock
513  cred等于current_cred - Access the current task's subjective credentials* Access the subjective credentials of the current task. RCU-safe,* since nobody else can modify it.()
514  tcred等于get_task_cred - Get another task's objective credentials*@task: The task to query* Get the objective credentials of a task, pinning them so that they can't go* away
515  如果非uid_eq(有效uid, GLOBAL_ROOT_UID)且非uid_eq(有效uid, 进程uid)且非uid_eq(有效uid, 保留uid)则ret等于负EACCES
519  put_cred - Release a reference to a set of credentials*@cred: The credentials to release* Release a reference to a set of credentials, deleting them when the last ref* is released
520  如果ret则转到:out_finish
523  ret等于group_attach_task - attach a task or a whole threadgroup to a cgroup*@dst_cgrp: the cgroup to attach to*@leader: the task or the leader of the threadgroup to be attached*@threadgroup: attach the whole threadgroup?
525  out_finish :
526  cgroup_procs_write_finish(task, locked)
527  out_unlock :
528  group_kn_unlock - unlocking helper for cgroup kernfs methods*@kn: the kernfs_node being serviced* This helper undoes cgroup_kn_lock_live() and should be invoked before* the method finishes if locking succeeded
530  返回:如果ret否则nbytes
调用者
名称描述
cgroup1_procs_write
cgroup1_tasks_write