summaryrefslogtreecommitdiffstats
path: root/net/netfilter/nf_log.c
diff options
context:
space:
mode:
authorDavid S. Miller2011-03-04 06:27:42 +0100
committerDavid S. Miller2011-03-04 06:27:42 +0100
commit0a0e9ae1bd788bc19adc4d4ae08c98b233697402 (patch)
tree13825eeb5bbeae27d66e95f12168eff4b60701ab /net/netfilter/nf_log.c
parentnetlink: kill eff_cap from struct netlink_skb_parms (diff)
parentMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmo... (diff)
downloadkernel-qcow2-linux-0a0e9ae1bd788bc19adc4d4ae08c98b233697402.tar.gz
kernel-qcow2-linux-0a0e9ae1bd788bc19adc4d4ae08c98b233697402.tar.xz
kernel-qcow2-linux-0a0e9ae1bd788bc19adc4d4ae08c98b233697402.zip
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/bnx2x/bnx2x.h
Diffstat (limited to 'net/netfilter/nf_log.c')
-rw-r--r--net/netfilter/nf_log.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/netfilter/nf_log.c b/net/netfilter/nf_log.c
index 20c775cff2a8..20714edf6cd2 100644
--- a/net/netfilter/nf_log.c
+++ b/net/netfilter/nf_log.c
@@ -85,6 +85,8 @@ EXPORT_SYMBOL(nf_log_unregister);
int nf_log_bind_pf(u_int8_t pf, const struct nf_logger *logger)
{
+ if (pf >= ARRAY_SIZE(nf_loggers))
+ return -EINVAL;
mutex_lock(&nf_log_mutex);
if (__find_logger(pf, logger->name) == NULL) {
mutex_unlock(&nf_log_mutex);
@@ -98,6 +100,8 @@ EXPORT_SYMBOL(nf_log_bind_pf);
void nf_log_unbind_pf(u_int8_t pf)
{
+ if (pf >= ARRAY_SIZE(nf_loggers))
+ return;
mutex_lock(&nf_log_mutex);
rcu_assign_pointer(nf_loggers[pf], NULL);
mutex_unlock(&nf_log_mutex);