Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:auditd_set - Set/Reset the auditd connection state*@pid: auditd PID*@portid: auditd netlink portid*@net: auditd network namespace pointer* Description:* This function will obtain and drop network namespace references as* necessary

Proto:static int auditd_set(struct pid *pid, unsigned int portid, struct net *net)

Type:int

Parameter:

TypeParameterName
struct pid *pid
unsigned intportid
struct net *net
497  If Not pid || Not net Then Return -EINVAL
500  ac_new = 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).
501  If Not ac_new Then Return -ENOMEM
503  pid = get_pid(pid)
504  portid = portid
505  net = get_net(net)
507  spin_lock_irqsave( & auditd_conn_lock, flags)
508  ac_old = cu_dereference_protected() - fetch RCU pointer when updates prevented*@p: The pointer to read, prior to dereferencing*@c: The conditions under which the dereference will take place* Return the value of the specified RCU-protected pointer, but omit(struct auditd_connection - kernel/auditd connection state*@pid: auditd PID*@portid: netlink portid*@net: the associated network namespace*@rcu: RCU head* Description:* This struct is RCU protected; you must either hold the RCU lock for reading, lockdep_is_held( & auditd_conn_lock))
510  cu_assign_pointer() - assign to RCU-protected pointer*@p: pointer to assign to*@v: value to assign (publish)* Assigns the specified value to the specified RCU-protected* pointer, ensuring that any concurrent RCU readers will see* any prior initialization(struct auditd_connection - kernel/auditd connection state*@pid: auditd PID*@portid: netlink portid*@net: the associated network namespace*@rcu: RCU head* Description:* This struct is RCU protected; you must either hold the RCU lock for reading, ac_new)
511  spin_unlock_irqrestore( & auditd_conn_lock, flags)
513  If ac_old Then all_rcu() - Queue an RCU callback for invocation after a grace period
516  Return 0
Caller
NameDescribe
audit_receive_msg