]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_tables: do not leave chain stats enabled on error
authorPablo Neira Ayuso <pablo@netfilter.org>
Sun, 21 Aug 2022 10:41:33 +0000 (12:41 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 24 Aug 2022 05:43:21 +0000 (07:43 +0200)
commit1c4961627efcc17b0248d543f2924c5638984e14
tree68e431d7d8a2c6712f08da121396a86a34b7665d
parent081e6e219a4d31d6936cb1bbb625cd218704343f
netfilter: nf_tables: do not leave chain stats enabled on error

Error might occur later in the nf_tables_addchain() codepath, enable
static key only after transaction has been created.

Fixes: fb34607dfc37 ("netfilter: nf_tables: keep chain counters away from hot path")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_tables_api.c