Files
lkl_linux/include/linux
Martin KaFai Lau fc6652aab6 bpf: Remember smap in bpf_local_storage
This patch remembers which smap triggers the allocation
of a 'struct bpf_local_storage' object. The local_storage is
allocated during the very first selem added to the owner.
The smap pointer is needed when using the bpf_mem_cache_free
in a later patch because it needs to free to the correct
smap's bpf_mem_alloc object.

When a selem is being removed, it needs to check if it is
the selem that triggers the creation of the local_storage.
If it is, the local_storage->smap pointer will be reset to NULL.
This NULL reset is done under the local_storage->lock in
bpf_selem_unlink_storage_nolock() when a selem is being removed.
Also note that the local_storage may not go away even
local_storage->smap is NULL because there may be other
selem still stored in the local_storage.

Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Link: https://lore.kernel.org/r/20230308065936.1550103-6-martin.lau@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2023-03-10 11:05:28 -08:00
..
2023-01-16 09:26:05 +01:00
2023-02-16 13:42:22 +01:00
2023-02-20 09:20:55 -05:00
2023-02-15 19:38:50 +01:00
2023-01-19 14:46:25 +01:00
2022-12-07 09:43:12 -07:00
2023-03-08 16:19:51 -08:00
2023-02-03 08:20:55 -07:00
2023-01-13 11:48:15 +01:00
2023-01-19 16:07:40 +01:00
2023-01-29 15:18:33 -07:00
2023-01-29 15:18:33 -07:00
2023-02-06 19:06:58 +01:00
2023-01-19 09:24:28 +01:00
2023-01-11 06:52:43 -05:00
2023-02-02 22:33:13 -08:00
2023-01-17 09:29:59 +01:00
2022-12-11 19:30:20 -08:00
2023-02-13 10:11:20 +02:00
2023-01-19 09:24:28 +01:00
2023-01-19 09:24:28 +01:00
2023-01-19 09:24:30 +01:00
2023-03-07 23:57:19 -08:00
2023-02-02 22:33:34 -08:00
2023-01-16 09:26:06 +01:00
2023-03-07 18:19:09 -08:00
2023-01-04 14:44:13 -07:00
2023-01-19 09:24:28 +01:00
2022-12-20 03:13:45 +01:00
2023-01-19 09:24:28 +01:00
2023-01-19 15:01:19 +01:00
2023-03-08 13:21:47 +00:00
2023-01-03 17:49:22 -08:00
2023-01-18 17:12:47 -08:00
2023-02-16 18:10:18 +01:00
2023-01-23 15:38:08 +01:00
2023-02-20 19:26:58 -05:00
2023-01-19 09:24:28 +01:00