]> git.baikalelectronics.ru Git - kernel.git/commit
net: flow_offload: Fix memory leak for indirect flow block
authorChris Mi <cmi@nvidia.com>
Tue, 8 Dec 2020 02:48:35 +0000 (10:48 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 10 Dec 2020 00:08:33 +0000 (16:08 -0800)
commitf9ac37d4d8e26bdfb387fa141f580671398525f9
treed47fce9d7dae20e3156ee50ac35dd5a37739ebd5
parentf691b8d86887f9151ecee8141ad296d9ba6c5c1d
net: flow_offload: Fix memory leak for indirect flow block

The offending commit introduces a cleanup callback that is invoked
when the driver module is removed to clean up the tunnel device
flow block. But it returns on the first iteration of the for loop.
The remaining indirect flow blocks will never be freed.

Fixes: 00e3889938ef ("net: flow_offload: consolidate indirect flow_block infrastructure")
CC: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Chris Mi <cmi@nvidia.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
net/core/flow_offload.c