From: Gao Feng Date: Sat, 25 Mar 2017 10:24:36 +0000 (+0800) Subject: netfilter: nf_nat_snmp: Fix panic when snmp_trap_helper fails to register X-Git-Tag: v3.2.91~48 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1487bf5c5f6089f42de4e4370ab260944039b03e;p=pandora-kernel.git netfilter: nf_nat_snmp: Fix panic when snmp_trap_helper fails to register commit 75c689dca98851d65ef5a27e5ce26b625b68751c upstream. In the commit 93557f53e1fb ("netfilter: nf_conntrack: nf_conntrack snmp helper"), the snmp_helper is replaced by nf_nat_snmp_hook. So the snmp_helper is never registered. But it still tries to unregister the snmp_helper, it could cause the panic. Now remove the useless snmp_helper and the unregister call in the error handler. Fixes: 93557f53e1fb ("netfilter: nf_conntrack: nf_conntrack snmp helper") Signed-off-by: Gao Feng Signed-off-by: Pablo Neira Ayuso Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed