Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:proc_do_static_key

Proto:int proc_do_static_key(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos)

Type:int

Parameter:

TypeParameterName
struct ctl_table *table
intwrite
void __user *buffer
size_t *lenp
loff_t *ppos
3390  key = data
3391  DEFINE_MUTEX(static_key_mutex)
3393  struct ctl_table tmp = {data = & val, maxlen = size of val , mode = mode, extra1 = Keep the same order as in fs/proc/proc_sysctl.c , extra2 = SYSCTL_ONE, }
3401  If write && Not Check operation authority Then Return -EPERM
3404  mutex_lock( & static_key_mutex)
3405  val = static_key_enabled(key)
3406  ret = read a vector of integers with min/max values
3407  If write && Not ret Then
3408  If val Then static_key_enable(key)
3410  Else static_key_disable(key)
3413  mutex_unlock( & static_key_mutex)
3414  Return ret