函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:cgroupstats_user_cmd

函数原型:static int cgroupstats_user_cmd(struct sk_buff *skb, struct genl_info *info)

返回类型:int

参数:

类型参数名称
struct sk_buff *skb
struct genl_info *info
391  rc等于0
399  na等于attrs[CGROUPSTATS_CMD_ATTR_FD]
400  如果非na则返回:负EINVAL
403  fd等于返回U32属性的有效载荷
404  f等于fdget(fd)
405  如果非file则返回:0
408  size等于属性的总长度,包括填充
410  rc等于prepare_reply(info, CGROUPSTATS_CMD_NEW, & rep_skb, size)
412  如果rc小于0则转到:err
415  na等于la_reserve - reserve room for attribute on the skb*@skb: socket buffer to reserve room on*@attrtype: attribute type*@attrlen: length of attribute payload* Adds a netlink attribute header to a socket buffer and reserves
417  如果(na == NULL)则
418  释放netlink消息
419  rc等于负EMSGSIZE
420  转到:err
423  stats等于有效载荷的头部
424  memset(stats, 0, stats的长度)
426  rc等于groupstats_build - build and fill cgroupstats*@stats: cgroupstats to fill information into*@dentry: A dentry entry belonging to the cgroup for which stats have* been requested.* Build and fill cgroupstats so that taskstats can export it to user* space.
427  如果rc小于0则
428  释放netlink消息
429  转到:err
432  rc等于Send taskstats data in @skb to listener with nl_pid @pid
434  err :
435  fdput(f)
436  返回:rc