Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3a298023 authored by Pablo Neira Ayuso's avatar Pablo Neira Ayuso Committed by Lee Jones
Browse files

UPSTREAM: netfilter: nf_tables: drop map element references from preparation phase



commit 628bd3e49cba1c066228e23d71a852c23e26da73 upstream.

set .destroy callback releases the references to other objects in maps.
This is very late and it results in spurious EBUSY errors. Drop refcount
from the preparation phase instead, update set backend not to drop
reference counter from set .destroy path.

Exceptions: NFT_TRANS_PREPARE_ERROR does not require to drop the
reference counter because the transaction abort path releases the map
references for each element since the set is unbound. The abort path
also deals with releasing reference counter for new elements added to
unbound sets.

Bug: 299922216
Fixes: 59105446 ("netfilter: nf_tables: revisit chain/object refcounting from elements")
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 3c7ec098)
Signed-off-by: default avatarLee Jones <joneslee@google.com>
Change-Id: I3fa17ba11bc3dcdb05d4f50eee79357e806581ad
parent 28ca0533
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment