]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nfnetlink: allow commit to fail
authorFlorian Westphal <fw@strlen.de>
Thu, 24 May 2018 22:25:47 +0000 (00:25 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 28 May 2018 22:27:26 +0000 (00:27 +0200)
commit57de1f433f2a5c48d5b4da1e2bcb4c00ff830aa8
tree8f65587182cf879ecdefcdc3c5b1aaf36ff8bc72
parent022fde6e57a4dac474142202e3bcea5f01954fc0
netfilter: nfnetlink: allow commit to fail

->commit() cannot fail at the moment.

Followup-patch adds kmalloc calls in the commit phase, so we'll need
to be able to handle errors.

Make it so that -EGAIN causes a full replay, and make other errors
cause the transaction to fail.

Failing is ok from a consistency point of view as long as we
perform all actions that could return an error before
we increment the generation counter and the base seq.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nfnetlink.c