Lines Matching refs:task

48 	struct task_struct *task = owner;  in task_storage_ptr()  local
50 return &task->bpf_storage; in task_storage_ptr()
54 task_storage_lookup(struct task_struct *task, struct bpf_map *map, in task_storage_lookup() argument
61 rcu_dereference_check(task->bpf_storage, bpf_rcu_lock_held()); in task_storage_lookup()
69 void bpf_task_storage_free(struct task_struct *task) in bpf_task_storage_free() argument
76 local_storage = rcu_dereference(task->bpf_storage); in bpf_task_storage_free()
91 struct task_struct *task; in bpf_pid_task_storage_lookup_elem() local
105 task = pid_task(pid, PIDTYPE_PID); in bpf_pid_task_storage_lookup_elem()
106 if (!task) { in bpf_pid_task_storage_lookup_elem()
112 sdata = task_storage_lookup(task, map, true); in bpf_pid_task_storage_lookup_elem()
125 struct task_struct *task; in bpf_pid_task_storage_update_elem() local
142 task = pid_task(pid, PIDTYPE_PID); in bpf_pid_task_storage_update_elem()
143 if (!task) { in bpf_pid_task_storage_update_elem()
150 task, (struct bpf_local_storage_map *)map, value, map_flags, in bpf_pid_task_storage_update_elem()
160 static int task_storage_delete(struct task_struct *task, struct bpf_map *map, in task_storage_delete() argument
165 sdata = task_storage_lookup(task, map, false); in task_storage_delete()
179 struct task_struct *task; in bpf_pid_task_storage_delete_elem() local
193 task = pid_task(pid, PIDTYPE_PID); in bpf_pid_task_storage_delete_elem()
194 if (!task) { in bpf_pid_task_storage_delete_elem()
200 err = task_storage_delete(task, map, true); in bpf_pid_task_storage_delete_elem()
209 struct task_struct *task, void *value, in __bpf_task_storage_get() argument
214 sdata = task_storage_lookup(task, map, nobusy); in __bpf_task_storage_get()
219 if (refcount_read(&task->usage) && in __bpf_task_storage_get()
222 task, (struct bpf_local_storage_map *)map, value, in __bpf_task_storage_get()
232 task, void *, value, u64, flags, gfp_t, gfp_flags) in BPF_CALL_5()
238 if (flags & ~BPF_LOCAL_STORAGE_GET_F_CREATE || !task) in BPF_CALL_5()
242 data = __bpf_task_storage_get(map, task, value, flags, in BPF_CALL_5()
251 task, void *, value, u64, flags, gfp_t, gfp_flags) in BPF_CALL_5()
256 if (flags & ~BPF_LOCAL_STORAGE_GET_F_CREATE || !task) in BPF_CALL_5()
260 data = __bpf_task_storage_get(map, task, value, flags, in BPF_CALL_5()
267 task) in BPF_CALL_2()
273 if (!task) in BPF_CALL_2()
281 ret = task_storage_delete(task, map, nobusy); in BPF_CALL_2()
288 task) in BPF_CALL_2()
293 if (!task) in BPF_CALL_2()
301 ret = task_storage_delete(task, map, true); in BPF_CALL_2()