函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:uevent_net_init

函数原型:static int uevent_net_init(struct net *net)

返回类型:int

参数:

类型参数名称
struct net *net
759  struct netlink_kernel_cfg cfg = {groups = 1, input = uevent_net_rcv, flags = NL_CFG_F_NONROOT_RECV}
765  ue_sk等于分配内存并置零
766  如果非ue_sk则返回:负ENOMEM
769  sk等于netlink_kernel_create(net, Kernel messages to userspace , & cfg)
770  如果非sk
771  打印错误信息("kobject_uevent: unable to create netlink socket!\n")
772  释放内存
773  返回:负ENODEV
776  uevent socket 等于ue_sk
779  如果 Owning user namespace 恒等于init_user_ns
780  mutex_lock( & This lock protects uevent_seqnum and uevent_sock_list )
781  添加链表项
782  mutex_unlock( & This lock protects uevent_seqnum and uevent_sock_list )
785  返回:0