summaryrefslogtreecommitdiff
path: root/net/core
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@home.osdl.org>2003-12-30 00:06:58 -0800
committerLinus Torvalds <torvalds@home.osdl.org>2003-12-30 00:06:58 -0800
commitd027a95f37ec012ca4c8d5e42419c8eb7338dbbf (patch)
treedb8b856ed3dac472606fd68737e7e3a01f13c073 /net/core
parentb2e95563794f81a3b2ccbeffcb59af1090fa00ef (diff)
parent09fa6bcea48db8d55e9789585773cf367a899a75 (diff)
Merge bk://kernel.bkbits.net/davem/net-2.6
into home.osdl.org:/home/torvalds/v2.5/linux
Diffstat (limited to 'net/core')
-rw-r--r--net/core/dev.c2
-rw-r--r--net/core/neighbour.c4
-rw-r--r--net/core/sock.c25
-rw-r--r--net/core/sysctl_net_core.c6
4 files changed, 34 insertions, 3 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 47fff21ea3b2..30cba1e1c633 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1543,7 +1543,7 @@ static inline int __handle_bridge(struct sk_buff *skb,
struct packet_type **pt_prev, int *ret)
{
#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
- if (skb->dev->br_port) {
+ if (skb->dev->br_port && skb->pkt_type != PACKET_LOOPBACK) {
*ret = handle_bridge(skb, *pt_prev);
if (br_handle_frame_hook(skb) == 0)
return 1;
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 247b6d6e661d..4b194b6be05a 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -1518,6 +1518,7 @@ struct neigh_sysctl_table {
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec_jiffies,
+ .strategy = &sysctl_jiffies,
},
{
.ctl_name = NET_NEIGH_DELAY_PROBE_TIME,
@@ -1525,6 +1526,7 @@ struct neigh_sysctl_table {
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec_jiffies,
+ .strategy = &sysctl_jiffies,
},
{
.ctl_name = NET_NEIGH_GC_STALE_TIME,
@@ -1532,6 +1534,7 @@ struct neigh_sysctl_table {
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec_jiffies,
+ .strategy = &sysctl_jiffies,
},
{
.ctl_name = NET_NEIGH_UNRES_QLEN,
@@ -1574,6 +1577,7 @@ struct neigh_sysctl_table {
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec_jiffies,
+ .strategy = &sysctl_jiffies,
},
{
.ctl_name = NET_NEIGH_GC_THRESH1,
diff --git a/net/core/sock.c b/net/core/sock.c
index 9d51516eaa56..d549d519482d 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1119,6 +1119,31 @@ void sock_init_data(struct socket *sock, struct sock *sk)
atomic_set(&sk->sk_refcnt, 1);
}
+void lock_sock(struct sock *sk)
+{
+ might_sleep();
+ spin_lock_bh(&(sk->sk_lock.slock));
+ if (sk->sk_lock.owner)
+ __lock_sock(sk);
+ sk->sk_lock.owner = (void *)1;
+ spin_unlock_bh(&(sk->sk_lock.slock));
+}
+
+EXPORT_SYMBOL(lock_sock);
+
+void release_sock(struct sock *sk)
+{
+ spin_lock_bh(&(sk->sk_lock.slock));
+ if (sk->sk_backlog.tail)
+ __release_sock(sk);
+ sk->sk_lock.owner = NULL;
+ if (waitqueue_active(&(sk->sk_lock.wq)))
+ wake_up(&(sk->sk_lock.wq));
+ spin_unlock_bh(&(sk->sk_lock.slock));
+}
+
+EXPORT_SYMBOL(release_sock);
+
EXPORT_SYMBOL(__lock_sock);
EXPORT_SYMBOL(__release_sock);
EXPORT_SYMBOL(sk_alloc);
diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c
index 46c0c78b196d..642ef77a2824 100644
--- a/net/core/sysctl_net_core.c
+++ b/net/core/sysctl_net_core.c
@@ -146,7 +146,8 @@ ctl_table core_table[] = {
.data = &net_msg_cost,
.maxlen = sizeof(int),
.mode = 0644,
- .proc_handler = &proc_dointvec_jiffies
+ .proc_handler = &proc_dointvec_jiffies,
+ .strategy = &sysctl_jiffies,
},
{
.ctl_name = NET_CORE_MSG_BURST,
@@ -154,7 +155,8 @@ ctl_table core_table[] = {
.data = &net_msg_burst,
.maxlen = sizeof(int),
.mode = 0644,
- .proc_handler = &proc_dointvec_jiffies
+ .proc_handler = &proc_dointvec_jiffies,
+ .strategy = &sysctl_jiffies,
},
{
.ctl_name = NET_CORE_OPTMEM_MAX,