[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191219.175331.2104515305508917057.davem@davemloft.net>
Date: Thu, 19 Dec 2019 17:53:31 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: dcaratti@...hat.com
Cc: netdev@...r.kernel.org, jhs@...atatu.com, xiyou.wangcong@...il.com,
jiri@...nulli.us, vladbu@...lanox.com, mrv@...atatu.com
Subject: Re: [PATCH net 0/2] net/sched: cls_u32: fix refcount leak
From: Davide Caratti <dcaratti@...hat.com>
Date: Wed, 18 Dec 2019 00:00:03 +0100
> a refcount leak in the error path of u32_change() has been recently
> introduced. It can be observed with the following commands:
...
> they all legitimately return -EINVAL; however, they leave semi-configured
> filters at eth0 tc ingress:
...
> With older kernels, filters were unconditionally considered empty (and
> thus de-refcounted) on the error path of ->change().
> After commit 8b64678e0af8 ("net: sched: refactor tp insert/delete for
> concurrent execution"), filters were considered empty when the walk()
> function didn't set 'walker.stop' to 1.
> Finally, with commit 6676d5e416ee ("net: sched: set dedicated tcf_walker
> flag when tp is empty"), tc filters are considered empty unless the walker
> function is called with a non-NULL handle. This last change doesn't fit
> cls_u32 design, because at least the "root hnode" is (almost) always
> non-NULL, as it's allocated in u32_init().
>
> - patch 1/2 is a proposal to restore the original kernel behavior, where
> no filter was installed in the error path of u32_change().
> - patch 2/2 adds tdc selftests that can be ued to verify the correct
> behavior of u32 in the error path of ->change().
Series applied, thanks.
Powered by blists - more mailing lists