From: Greg Kroah-Hartman Date: Sun, 9 Feb 2020 23:05:22 +0000 (+0100) Subject: drop net_sched-fix-a-resource-leak-in-tcindex_set_parms.patch from 4.9 X-Git-Tag: v4.19.103~20 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=60d6350dd35925dbc8ccc8a7119be5b001f87118;p=thirdparty%2Fkernel%2Fstable-queue.git drop net_sched-fix-a-resource-leak-in-tcindex_set_parms.patch from 4.9 --- diff --git a/queue-4.9/net_sched-fix-a-resource-leak-in-tcindex_set_parms.patch b/queue-4.9/net_sched-fix-a-resource-leak-in-tcindex_set_parms.patch deleted file mode 100644 index ac61145a9e6..00000000000 --- a/queue-4.9/net_sched-fix-a-resource-leak-in-tcindex_set_parms.patch +++ /dev/null @@ -1,47 +0,0 @@ -From foo@baz Sun 09 Feb 2020 11:08:35 PM CET -From: Cong Wang -Date: Tue, 4 Feb 2020 11:10:12 -0800 -Subject: net_sched: fix a resource leak in tcindex_set_parms() - -From: Cong Wang - -[ Upstream commit 52b5ae501c045010aeeb1d5ac0373ff161a88291 ] - -Jakub noticed there is a potential resource leak in -tcindex_set_parms(): when tcindex_filter_result_init() fails -and it jumps to 'errout1' which doesn't release the memory -and resources allocated by tcindex_alloc_perfect_hash(). - -We should just jump to 'errout_alloc' which calls -tcindex_free_perfect_hash(). - -Fixes: b9a24bb76bf6 ("net_sched: properly handle failure case of tcf_exts_init()") -Reported-by: Jakub Kicinski -Cc: Jamal Hadi Salim -Cc: Jiri Pirko -Signed-off-by: Cong Wang -Signed-off-by: David S. Miller -Signed-off-by: Greg Kroah-Hartman ---- - net/sched/cls_tcindex.c | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - ---- a/net/sched/cls_tcindex.c -+++ b/net/sched/cls_tcindex.c -@@ -336,7 +336,7 @@ tcindex_set_parms(struct net *net, struc - goto errout1; - err = tcindex_filter_result_init(&cr); - if (err < 0) -- goto errout1; -+ goto errout_alloc; - if (old_r) - cr.res = r->res; - -@@ -453,7 +453,6 @@ errout_alloc: - tcindex_free_perfect_hash(cp); - else if (balloc == 2) - kfree(cp->h); --errout1: - tcf_exts_destroy(&cr.exts); - tcf_exts_destroy(&new_filter_result.exts); - errout: diff --git a/queue-4.9/series b/queue-4.9/series index d6f6ad07cd0..c27e089a4ba 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -72,7 +72,6 @@ ubi-fix-an-error-pointer-dereference-in-error-handling-code.patch mfd-da9062-fix-watchdog-compatible-string.patch mfd-rn5t618-mark-adc-control-register-volatile.patch net-systemport-avoid-rbuf-stuck-in-wake-on-lan-mode.patch -net_sched-fix-a-resource-leak-in-tcindex_set_parms.patch bonding-alb-properly-access-headers-in-bond_alb_xmit.patch nfs-switch-back-to-to-iterate.patch nfs-fix-memory-leaks-and-corruption-in-readdir.patch