Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:dev_map_alloc

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

Type:struct bpf_map

Parameter:

TypeParameterName
union bpf_attr *attr
181  If Not Check operation authority Then Return ERR_PTR( - EPERM)
184  dtab = 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).
185  If Not dtab Then Return ERR_PTR( - ENOMEM)
188  err = dev_map_init_map(dtab, attr)
189  If err Then
190  kfree(dtab)
191  Return ERR_PTR(err)
194  spin_lock( & dev_map_lock)
195  list_add_tail_rcu - add a new entry to rcu-protected list*@new: new entry to be added*@head: list head to add it before* Insert a new entry before the specified head
196  spin_unlock( & dev_map_lock)
198  Return map