]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
add comments to queue-6.6/bpf-fix-a-race-condition-between-btf_put-and-map_fre.patch
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 21 Jan 2024 08:52:50 +0000 (09:52 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 21 Jan 2024 08:52:50 +0000 (09:52 +0100)
makes quilt happy

queue-6.6/bpf-fix-a-race-condition-between-btf_put-and-map_fre.patch

index 41a389c7266d46124206f412b721b245b9199c0e..68e5307e22523cff4e095a05d8d1706ae3bf044d 100644 (file)
@@ -131,18 +131,18 @@ code, I only got the above error once. To increase reproducibility, I added
 a delay in bpf_map_free_deferred() to delay map->ops->map_free(), which
 significantly increased reproducibility.
 
-  diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c
-  index 5e43ddd1b83f..aae5b5213e93 100644
-  --- a/kernel/bpf/syscall.c
-  +++ b/kernel/bpf/syscall.c
-  @@ -695,6 +695,7 @@ static void bpf_map_free_deferred(struct work_struct *work)
-        struct bpf_map *map = container_of(work, struct bpf_map, work);
-        struct btf_record *rec = map->record;
-
-  +     mdelay(100);
-        security_bpf_map_free(map);
-        bpf_map_release_memcg(map);
-        /* implementation dependent freeing */
+#  diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c
+#  index 5e43ddd1b83f..aae5b5213e93 100644
+#  --- a/kernel/bpf/syscall.c
+#  +++ b/kernel/bpf/syscall.c
+# @@ -695,6 +695,7 @@ static void bpf_map_free_deferred(struct work_struct *work)
+#        struct bpf_map *map = container_of(work, struct bpf_map, work);
+#        struct btf_record *rec = map->record;
+#
+#  +     mdelay(100);
+#        security_bpf_map_free(map);
+#        bpf_map_release_memcg(map);
+#        /* implementation dependent freeing */
 
 Hao also provided test cases ([1]) for easily reproducing the above issue.