From 4f8cccedf173063f4abc147fdca3c9140fc24cc5 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sun, 21 Jan 2024 09:52:50 +0100 Subject: [PATCH] add comments to queue-6.6/bpf-fix-a-race-condition-between-btf_put-and-map_fre.patch makes quilt happy --- ...ondition-between-btf_put-and-map_fre.patch | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/queue-6.6/bpf-fix-a-race-condition-between-btf_put-and-map_fre.patch b/queue-6.6/bpf-fix-a-race-condition-between-btf_put-and-map_fre.patch index 41a389c7266..68e5307e225 100644 --- a/queue-6.6/bpf-fix-a-race-condition-between-btf_put-and-map_fre.patch +++ b/queue-6.6/bpf-fix-a-race-condition-between-btf_put-and-map_fre.patch @@ -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. -- 2.47.3