Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:prog_array_map_alloc

Proto:static struct bpf_map *prog_array_map_alloc(union bpf_attr *attr)

Type:struct bpf_map

Parameter:

TypeParameterName
union bpf_attr *attr
830  aux = 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).
831  If Not aux Then Return ERR_PTR( - ENOMEM)
834  INIT_WORK( & work, prog_array_map_clear_deferred)
835  Initialization list head
836  mutex_init - initialize the mutex*@mutex: the mutex to be initialized* Initialize the mutex to unlocked state.* It is not allowed to initialize an already locked mutex.( & poke_mutex)
838  map = array_map_alloc(attr)
839  If IS_ERR(map) Then
840  kfree(aux)
841  Return map
844  ({
844  __mptr = map
844  Do
844  When 0 cycle
844  __mptr - __builtin_offsetof(structbpf_array, map)
844  })->aux = aux
845  map = map
847  Return map