This patch series fix notifier registration bugs.

First patch adds error handling code for failure of notifier registration.
notifier registration can be failed. so that error handling code are needed.

Second patch fixes double-register bug in masqerade modules.
In order to protect double-register, masquerade modules manage
reference count. but it's not enough.
So that, this patch uses mutex instead of atomic value.

v2:
 - Add second patch
 - return success when notifier is already registered. (Florian Westphal)
v1: Initial patch

Taehee Yoo (2):
  netfilter: add missing error handling code for register functions
  netfilter: nat: fix double register in masquerade modules

 .../net/netfilter/ipv4/nf_nat_masquerade.h    |  2 +-
 .../net/netfilter/ipv6/nf_nat_masquerade.h    |  2 +-
 net/ipv4/netfilter/ipt_MASQUERADE.c           |  7 ++-
 net/ipv4/netfilter/nf_nat_masquerade_ipv4.c   | 38 +++++++++++---
 net/ipv4/netfilter/nft_masq_ipv4.c            |  4 +-
 net/ipv6/netfilter/ip6t_MASQUERADE.c          |  8 ++-
 net/ipv6/netfilter/nf_nat_masquerade_ipv6.c   | 49 ++++++++++++++-----
 net/ipv6/netfilter/nft_masq_ipv6.c            |  4 +-
 net/netfilter/nft_flow_offload.c              |  5 +-
 9 files changed, 89 insertions(+), 30 deletions(-)

-- 
2.17.1

Reply via email to