diff options
author | David S. Miller <davem@davemloft.net> | 2010-02-28 22:23:06 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-28 22:23:06 -0500 |
commit | 47871889c601d8199c51a4086f77eebd77c29b0b (patch) | |
tree | 40cdcac3bff0ee40cc33dcca61d0577cdf965f77 /net/core | |
parent | c16cc0b464b8876cfd57ce1c1dbcb6f9a6a0bce3 (diff) | |
parent | 30ff056c42c665b9ea535d8515890857ae382540 (diff) |
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Conflicts:
drivers/firmware/iscsi_ibft.c
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/dev.c | 2 | ||||
-rw-r--r-- | net/core/filter.c | 6 | ||||
-rw-r--r-- | net/core/rtnetlink.c | 8 | ||||
-rw-r--r-- | net/core/sock.c | 3 |
4 files changed, 14 insertions, 5 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index e5972f7f7e1b..bcc490cc9452 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -2103,7 +2103,7 @@ gso: | |||
2103 | rcu_read_lock_bh(); | 2103 | rcu_read_lock_bh(); |
2104 | 2104 | ||
2105 | txq = dev_pick_tx(dev, skb); | 2105 | txq = dev_pick_tx(dev, skb); |
2106 | q = rcu_dereference(txq->qdisc); | 2106 | q = rcu_dereference_bh(txq->qdisc); |
2107 | 2107 | ||
2108 | #ifdef CONFIG_NET_CLS_ACT | 2108 | #ifdef CONFIG_NET_CLS_ACT |
2109 | skb->tc_verd = SET_TC_AT(skb->tc_verd, AT_EGRESS); | 2109 | skb->tc_verd = SET_TC_AT(skb->tc_verd, AT_EGRESS); |
diff --git a/net/core/filter.c b/net/core/filter.c index 7517110ff4ae..d38ef7fd50f0 100644 --- a/net/core/filter.c +++ b/net/core/filter.c | |||
@@ -86,7 +86,7 @@ int sk_filter(struct sock *sk, struct sk_buff *skb) | |||
86 | return err; | 86 | return err; |
87 | 87 | ||
88 | rcu_read_lock_bh(); | 88 | rcu_read_lock_bh(); |
89 | filter = rcu_dereference(sk->sk_filter); | 89 | filter = rcu_dereference_bh(sk->sk_filter); |
90 | if (filter) { | 90 | if (filter) { |
91 | unsigned int pkt_len = sk_run_filter(skb, filter->insns, | 91 | unsigned int pkt_len = sk_run_filter(skb, filter->insns, |
92 | filter->len); | 92 | filter->len); |
@@ -521,7 +521,7 @@ int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk) | |||
521 | } | 521 | } |
522 | 522 | ||
523 | rcu_read_lock_bh(); | 523 | rcu_read_lock_bh(); |
524 | old_fp = rcu_dereference(sk->sk_filter); | 524 | old_fp = rcu_dereference_bh(sk->sk_filter); |
525 | rcu_assign_pointer(sk->sk_filter, fp); | 525 | rcu_assign_pointer(sk->sk_filter, fp); |
526 | rcu_read_unlock_bh(); | 526 | rcu_read_unlock_bh(); |
527 | 527 | ||
@@ -537,7 +537,7 @@ int sk_detach_filter(struct sock *sk) | |||
537 | struct sk_filter *filter; | 537 | struct sk_filter *filter; |
538 | 538 | ||
539 | rcu_read_lock_bh(); | 539 | rcu_read_lock_bh(); |
540 | filter = rcu_dereference(sk->sk_filter); | 540 | filter = rcu_dereference_bh(sk->sk_filter); |
541 | if (filter) { | 541 | if (filter) { |
542 | rcu_assign_pointer(sk->sk_filter, NULL); | 542 | rcu_assign_pointer(sk->sk_filter, NULL); |
543 | sk_filter_delayed_uncharge(sk, filter); | 543 | sk_filter_delayed_uncharge(sk, filter); |
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index d1472a423323..4568120d8533 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c | |||
@@ -90,6 +90,14 @@ int rtnl_is_locked(void) | |||
90 | } | 90 | } |
91 | EXPORT_SYMBOL(rtnl_is_locked); | 91 | EXPORT_SYMBOL(rtnl_is_locked); |
92 | 92 | ||
93 | #ifdef CONFIG_PROVE_LOCKING | ||
94 | int lockdep_rtnl_is_held(void) | ||
95 | { | ||
96 | return lockdep_is_held(&rtnl_mutex); | ||
97 | } | ||
98 | EXPORT_SYMBOL(lockdep_rtnl_is_held); | ||
99 | #endif /* #ifdef CONFIG_PROVE_LOCKING */ | ||
100 | |||
93 | static struct rtnl_link *rtnl_msg_handlers[NPROTO]; | 101 | static struct rtnl_link *rtnl_msg_handlers[NPROTO]; |
94 | 102 | ||
95 | static inline int rtm_msgindex(int msgtype) | 103 | static inline int rtm_msgindex(int msgtype) |
diff --git a/net/core/sock.c b/net/core/sock.c index 472a59f205b0..fcd397a762ff 100644 --- a/net/core/sock.c +++ b/net/core/sock.c | |||
@@ -1073,7 +1073,8 @@ static void __sk_free(struct sock *sk) | |||
1073 | if (sk->sk_destruct) | 1073 | if (sk->sk_destruct) |
1074 | sk->sk_destruct(sk); | 1074 | sk->sk_destruct(sk); |
1075 | 1075 | ||
1076 | filter = rcu_dereference(sk->sk_filter); | 1076 | filter = rcu_dereference_check(sk->sk_filter, |
1077 | atomic_read(&sk->sk_wmem_alloc) == 0); | ||
1077 | if (filter) { | 1078 | if (filter) { |
1078 | sk_filter_uncharge(sk, filter); | 1079 | sk_filter_uncharge(sk, filter); |
1079 | rcu_assign_pointer(sk->sk_filter, NULL); | 1080 | rcu_assign_pointer(sk->sk_filter, NULL); |