Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.4.1 /net/core/netfilter.c

Filename:/net/core/netfilter.c
Lines Added:4
Lines Deleted:1
Also changed in: (Previous) 2.4.1-pre12  2.4.1-pre11  2.4.1-pre10  2.4.0-ac12  2.4.0-test6  2.4.0-test5 
(Following) 2.4.2-ac4  2.4.2-ac5  2.4.2-ac6  2.4.2-ac7  2.4.2-ac8  2.4.2-ac10 

Location
[  2.4.1
  [  net
    [  core
       o  netfilter.c

Patch

diff -u --recursive --new-file v2.4.0/linux/net/core/netfilter.c linux/net/core/netfilter.c
--- v2.4.0/linux/net/core/netfilter.c   Fri Aug  4 13:07:24 2000
+++ linux/net/core/netfilter.c   Mon Jan 22 13:30:21 2001
@@ -442,7 +442,6 @@
    }
 }
 
-/* We have BR_NETPROTO_LOCK here */
 int nf_hook_slow(int pf, unsigned int hook, struct sk_buff *skb,
        struct net_device *indev,
        struct net_device *outdev,
@@ -452,6 +451,9 @@
    unsigned int verdict;
    int ret = 0;
 
+   /* We may already have this, but read-locks nest anyway */
+   br_read_lock_bh(BR_NETPROTO_LOCK);
+
 #ifdef CONFIG_NETFILTER_DEBUG
    if (skb->nf_debug & (1 << hook)) {
       printk("nf_hook: hook %i already set.\n", hook);
@@ -479,6 +481,7 @@
       break;
    }
 
+   br_read_unlock_bh(BR_NETPROTO_LOCK);
    return ret;
 }
 


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.