Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\kobject_uevent.c Create Date:2022-07-28 06:14:46
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:uevent_net_init

Proto:static int uevent_net_init(struct net *net)

Type:int

Parameter:

TypeParameterName
struct net *net
759  struct netlink_kernel_cfg cfg = {groups = 1, input = uevent_net_rcv, flags = NL_CFG_F_NONROOT_RECV}
765  ue_sk = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
766  If Not ue_sk Then Return -ENOMEM
769  sk = netlink_kernel_create(net, Kernel messages to userspace , & cfg)
770  If Not sk Then
771  pr_err("kobject_uevent: unable to create netlink socket!\n")
772  kfree(ue_sk)
773  Return -ENODEV
776  uevent socket = ue_sk
779  If Owning user namespace == init_user_ns Then
780  mutex_lock( & This lock protects uevent_seqnum and uevent_sock_list )
781  list_add_tail - add a new entry*@new: new entry to be added*@head: list head to add it before* Insert a new entry before the specified head.* This is useful for implementing queues.
782  mutex_unlock( & This lock protects uevent_seqnum and uevent_sock_list )
785  Return 0