From b7aea120039c21688f18aaa0d81e21da70d67625 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 27 Oct 2022 10:33:03 +0200 Subject: [PATCH] drop queue-5.10/libbpf-use-is_err_or_null-in-hashmap__free.patch not needed --- ...-use-is_err_or_null-in-hashmap__free.patch | 48 ------------------- queue-5.10/series | 1 - 2 files changed, 49 deletions(-) delete mode 100644 queue-5.10/libbpf-use-is_err_or_null-in-hashmap__free.patch diff --git a/queue-5.10/libbpf-use-is_err_or_null-in-hashmap__free.patch b/queue-5.10/libbpf-use-is_err_or_null-in-hashmap__free.patch deleted file mode 100644 index 8b2ca061698..00000000000 --- a/queue-5.10/libbpf-use-is_err_or_null-in-hashmap__free.patch +++ /dev/null @@ -1,48 +0,0 @@ -From a5ba4a9bb0982e29a8a046ca76e578bb2f8f74c2 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 7 Jan 2022 10:26:19 -0500 -Subject: libbpf: Use IS_ERR_OR_NULL() in hashmap__free() -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: Mauricio Vásquez - -[ Upstream commit fba60b171a0322830b446dd28170092c47243d39 ] - -hashmap__new() uses ERR_PTR() to return an error so it's better to -use IS_ERR_OR_NULL() in order to check the pointer before calling -free(). This will prevent freeing an invalid pointer if somebody calls -hashmap__free() with the result of a failed hashmap__new() call. - -Signed-off-by: Mauricio Vásquez -Signed-off-by: Andrii Nakryiko -Acked-by: Song Liu -Link: https://lore.kernel.org/bpf/20220107152620.192327-1-mauricio@kinvolk.io -Stable-dep-of: 1fcc064b305a ("netfilter: rpfilter/fib: Set ->flowic_uid correctly for user namespaces.") -Signed-off-by: Sasha Levin ---- - tools/lib/bpf/hashmap.c | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/tools/lib/bpf/hashmap.c b/tools/lib/bpf/hashmap.c -index 3c20b126d60d..aeb09c288716 100644 ---- a/tools/lib/bpf/hashmap.c -+++ b/tools/lib/bpf/hashmap.c -@@ -75,7 +75,7 @@ void hashmap__clear(struct hashmap *map) - - void hashmap__free(struct hashmap *map) - { -- if (!map) -+ if (IS_ERR_OR_NULL(map)) - return; - - hashmap__clear(map); -@@ -238,4 +238,3 @@ bool hashmap__delete(struct hashmap *map, const void *key, - - return true; - } -- --- -2.35.1 - diff --git a/queue-5.10/series b/queue-5.10/series index 60441e9487b..51c080fd640 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -39,7 +39,6 @@ cifs-fix-xid-leak-in-cifs_flock.patch cifs-fix-xid-leak-in-cifs_ses_add_channel.patch net-hsr-avoid-possible-null-deref-in-skb_clone.patch ionic-catch-null-pointer-issue-on-reconfig.patch -libbpf-use-is_err_or_null-in-hashmap__free.patch nvme-hwmon-rework-to-avoid-devm-allocation.patch nvme-hwmon-return-error-code-when-registration-fails.patch nvme-hwmon-consistently-ignore-errors-from-nvme_hwmo.patch -- 2.47.3