]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_tables: use READ_ONCE and WRITE_ONCE for shared generation id access
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 9 Aug 2022 11:22:01 +0000 (13:22 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 10 Aug 2022 15:06:05 +0000 (17:06 +0200)
commite94475497d72ce32a0b8d7cba33372c18ae386ae
treefd1308aa3647d33b9066ad2330cc8bee4d9f0150
parentfa786a186fe11767c7b9be2d07a538de26b47b69
netfilter: nf_tables: use READ_ONCE and WRITE_ONCE for shared generation id access

The generation ID is bumped from the commit path while holding the
mutex, however, netlink dump operations rely on RCU.

This patch also adds missing cb->base_eq initialization in
nf_tables_dump_set().

Fixes: 16194f384d06 ("netfilter: nf_tables: set NLM_F_DUMP_INTR if netlink dumping is stale")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_tables_api.c