Defined in 2 files as a function:
- include/net/net_namespace.h, line 285 (as a function)
- include/net/net_namespace.h, line 329 (as a function)
Referenced in 11 files:
- drivers/net/wireguard/socket.c, line 377
- fs/proc/proc_net.c, line 37
- include/net/pkt_cls.h, line 270
- kernel/bpf/offload.c
- net/core/net_namespace.c
- net/netfilter/nf_nat_masquerade.c, line 111
- net/netfilter/nf_tables_api.c, line 10557
- net/psp/psp_nl.c, line 67
- net/rds/tcp.c, line 523
- net/tipc/crypto.c
- net/xfrm/xfrm_input.c, line 826
Smatch caller information:
net/core/net_namespace.c get_net_ns() -> maybe_get_net()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | net | 4096-ptr_max |
| HALF_LOCKED2 | global &rtnl_mutex |
net/core/net_namespace.c get_net_ns_by_id() -> maybe_get_net()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | net | 1-u64max |
| DATA_SOURCE | 0 | net | r idr_find |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | rcu_read | ||
| HALF_LOCKED2 | &dev->lock |
net/core/net_namespace.c peernet2id_alloc() -> maybe_get_net()
| Type | Parameter | Key | Value |
|---|---|---|---|
| BUF_SIZE | 0 | net | (-1),10304,10432 |
| BUF_SIZE | 0 | net | (-1),10304,10432 |
| DATA_SOURCE | 0 | net | $1 |
| PREEMPT_ADD | <- disables preempt | ||
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| UNITS | 0 | net | unit_byte |
| LOCK2 | &net->nsid_lock | ||
| HALF_LOCKED2 | rcu_read | ||
| TYPE_LOCK | (struct net)->nsid_lock |
fs/proc/proc_net.c get_proc_net() -> maybe_get_net()
| Type | Parameter | Key | Value |
|---|---|---|---|
| BUF_SIZE | 0 | net | s32min-(-2),1-s32max |
| RX_PATH | |||
| TASK_NOT_RUNNING |
net/sched/cls_flower.c tcf_exts_get_net() -> maybe_get_net()
| Type | Parameter | Key | Value |
|---|---|---|---|
| RX_PATH | |||
| TASK_NOT_RUNNING |
net/rds/tcp.c rds_tcp_tune() -> maybe_get_net()
| Type | Parameter | Key | Value |
|---|---|---|---|
| UNITS | 0 | net | unit_byte |
| HALF_LOCKED2 | &pool->lock | ||
| HALF_LOCKED2 | &rtn->rds_tcp_accept_lock | ||
| HALF_LOCKED2 | &tc->t_conn_path_lock |
net/sched/cls_bpf.c tcf_exts_get_net() -> maybe_get_net()
| Type | Parameter | Key | Value |
|---|---|---|---|
| RX_PATH | |||
| TASK_NOT_RUNNING |
drivers/net/wireguard/socket.c wg_socket_init() -> maybe_get_net()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | net | 1-u64max |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | &wg->device_update_lock | ||
| LOCK2 | rcu_read | ||
| HALF_LOCKED2 | global &rtnl_mutex | ||
| TYPE_LOCK | (struct wg_device)->device_update_lock |
net/sched/cls_cgroup.c tcf_exts_get_net() -> maybe_get_net()
| Type | Parameter | Key | Value |
|---|---|---|---|
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HALF_LOCKED2 | global &rtnl_mutex |
net/sched/cls_matchall.c tcf_exts_get_net() -> maybe_get_net()
| Type | Parameter | Key | Value |
|---|---|---|---|
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HALF_LOCKED2 | global &rtnl_mutex |
net/xfrm/xfrm_input.c xfrm_trans_queue_net() -> maybe_get_net()
| Type | Parameter | Key | Value |
|---|---|---|---|
| DATA_SOURCE | 0 | net | $0 |
| PREEMPT_ADD | |||
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HALF_LOCKED2 | bh |
net/sched/cls_u32.c tcf_exts_get_net() -> maybe_get_net()
| Type | Parameter | Key | Value |
|---|---|---|---|
| RX_PATH | |||
| TASK_NOT_RUNNING |
net/psp/psp_nl.c psp_nl_multicast_per_ns() -> maybe_get_net()
| Type | Parameter | Key | Value |
|---|---|---|---|
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | rcu_read |
net/netfilter/nf_tables_api.c nft_trans_gc_alloc() -> maybe_get_net()
| Type | Parameter | Key | Value |
|---|---|---|---|
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| UNITS | 0 | net | unit_byte |
| HALF_LOCKED2 | &nft_net->commit_mutex |
net/l2tp/l2tp_ppp.c pppol2tp_proc_open() -> maybe_get_net()
| Type | Parameter | Key | Value |
|---|---|---|---|
| BUF_SIZE | 0 | net | s32min-(-2),1-s32max |
| BUF_SIZE | 0 | net | s32min-(-2),1-s32max |
| UNITS | 0 | net | unit_array_size |
kernel/bpf/offload.c bpf_map_offload_info_fill_ns() -> maybe_get_net()
| Type | Parameter | Key | Value |
|---|---|---|---|
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | global &bpf_devs_lock | ||
| LOCK2 | global &rtnl_mutex | ||
| HALF_LOCKED2 | &task->signal->exec_update_lock |
kernel/bpf/offload.c bpf_prog_offload_info_fill_ns() -> maybe_get_net()
| Type | Parameter | Key | Value |
|---|---|---|---|
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | global &bpf_devs_lock | ||
| LOCK2 | global &rtnl_mutex | ||
| HALF_LOCKED2 | &task->signal->exec_update_lock |
net/tipc/crypto.c tipc_aead_decrypt() -> maybe_get_net()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | net | 4096-ptr_max |
| PARAM_VALUE | 0 | net->gen | 4096-ptr_max |
| PARAM_VALUE | 0 | net->ipv4.fib_main->tb_id | 0-4294967295 |
| PARAM_VALUE | 0 | net->ipv4.fib_main->tb_num_default | s32min-s32max |
| CAPPED_DATA | 0 | net->gen | 1 |
| DATA_SOURCE | 0 | net | $0 |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| UNITS | 0 | net | unit_byte |
| LOCK2 | rcu_read |
net/tipc/crypto.c tipc_aead_encrypt() -> maybe_get_net()
| Type | Parameter | Key | Value |
|---|---|---|---|
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| UNITS | 0 | net | unit_byte |
| HALF_LOCKED2 | &__dnode->lock | ||
| HALF_LOCKED2 | rcu_read |
net/sched/cls_flow.c tcf_exts_get_net() -> maybe_get_net()
| Type | Parameter | Key | Value |
|---|---|---|---|
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HALF_LOCKED2 | global &rtnl_mutex |
net/sched/cls_fw.c tcf_exts_get_net() -> maybe_get_net()
| Type | Parameter | Key | Value |
|---|---|---|---|
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HALF_LOCKED2 | global &rtnl_mutex |
net/sched/cls_basic.c tcf_exts_get_net() -> maybe_get_net()
| Type | Parameter | Key | Value |
|---|---|---|---|
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HALF_LOCKED2 | global &rtnl_mutex |
net/netfilter/nf_nat_masquerade.c nf_nat_masq_schedule() -> maybe_get_net()
| Type | Parameter | Key | Value |
|---|---|---|---|
| DATA_SOURCE | 0 | net | $0 |
| UNITS | 0 | net | unit_byte |
net/sched/cls_route.c tcf_exts_get_net() -> maybe_get_net()
| Type | Parameter | Key | Value |
|---|---|---|---|
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HALF_LOCKED2 | global &rtnl_mutex |