commit | 2e917d602acd9e3e8c6e4c43b213c8929d986503 | [log] [tgz] |
---|---|---|
author | Liping Zhang <liping.zhang@spreadtrum.com> | Mon Sep 12 22:21:36 2016 +0800 |
committer | Pablo Neira Ayuso <pablo@netfilter.org> | Mon Sep 12 20:00:23 2016 +0200 |
tree | 1d7ffcad09e03541892e6eb11fb150f30208a323 | |
parent | 8e8118f893138d4cc3d4dbf4163d7497fca54a9d [diff] |
netfilter: nft_numgen: fix race between num generate and store it After we generate a new number, we still use the priv->counter and store it to the dreg. This is not correct, another cpu may already change it to a new number. So we must use the generated number, not the priv->counter itself. Fixes: 91dbc6be0a62 ("netfilter: nf_tables: add number generator expression") Signed-off-by: Liping Zhang <liping.zhang@spreadtrum.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>