aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-02-28 22:23:06 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-28 22:23:06 -0500
commit47871889c601d8199c51a4086f77eebd77c29b0b (patch)
tree40cdcac3bff0ee40cc33dcca61d0577cdf965f77 /net
parentc16cc0b464b8876cfd57ce1c1dbcb6f9a6a0bce3 (diff)
parent30ff056c42c665b9ea535d8515890857ae382540 (diff)
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Conflicts: drivers/firmware/iscsi_ibft.c
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/hidp/core.c17
-rw-r--r--net/core/dev.c2
-rw-r--r--net/core/filter.c6
-rw-r--r--net/core/rtnetlink.c8
-rw-r--r--net/core/sock.c3
-rw-r--r--net/decnet/dn_route.c14
-rw-r--r--net/ipv4/route.c14
-rw-r--r--net/packet/af_packet.c2
-rw-r--r--net/xfrm/xfrm_algo.c16
9 files changed, 59 insertions, 23 deletions
diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c
index fc6ec1e72652..280529ad9274 100644
--- a/net/bluetooth/hidp/core.c
+++ b/net/bluetooth/hidp/core.c
@@ -313,10 +313,21 @@ static int hidp_send_report(struct hidp_session *session, struct hid_report *rep
313 return hidp_queue_report(session, buf, rsize); 313 return hidp_queue_report(session, buf, rsize);
314} 314}
315 315
316static int hidp_output_raw_report(struct hid_device *hid, unsigned char *data, size_t count) 316static int hidp_output_raw_report(struct hid_device *hid, unsigned char *data, size_t count,
317 unsigned char report_type)
317{ 318{
318 if (hidp_send_ctrl_message(hid->driver_data, 319 switch (report_type) {
319 HIDP_TRANS_SET_REPORT | HIDP_DATA_RTYPE_FEATURE, 320 case HID_FEATURE_REPORT:
321 report_type = HIDP_TRANS_SET_REPORT | HIDP_DATA_RTYPE_FEATURE;
322 break;
323 case HID_OUTPUT_REPORT:
324 report_type = HIDP_TRANS_DATA | HIDP_DATA_RTYPE_OUPUT;
325 break;
326 default:
327 return -EINVAL;
328 }
329
330 if (hidp_send_ctrl_message(hid->driver_data, report_type,
320 data, count)) 331 data, count))
321 return -ENOMEM; 332 return -ENOMEM;
322 return count; 333 return count;
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}
91EXPORT_SYMBOL(rtnl_is_locked); 91EXPORT_SYMBOL(rtnl_is_locked);
92 92
93#ifdef CONFIG_PROVE_LOCKING
94int lockdep_rtnl_is_held(void)
95{
96 return lockdep_is_held(&rtnl_mutex);
97}
98EXPORT_SYMBOL(lockdep_rtnl_is_held);
99#endif /* #ifdef CONFIG_PROVE_LOCKING */
100
93static struct rtnl_link *rtnl_msg_handlers[NPROTO]; 101static struct rtnl_link *rtnl_msg_handlers[NPROTO];
94 102
95static inline int rtm_msgindex(int msgtype) 103static 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);
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c
index a03284061a31..a7bf03ca0a36 100644
--- a/net/decnet/dn_route.c
+++ b/net/decnet/dn_route.c
@@ -1155,8 +1155,8 @@ static int __dn_route_output_key(struct dst_entry **pprt, const struct flowi *fl
1155 1155
1156 if (!(flags & MSG_TRYHARD)) { 1156 if (!(flags & MSG_TRYHARD)) {
1157 rcu_read_lock_bh(); 1157 rcu_read_lock_bh();
1158 for(rt = rcu_dereference(dn_rt_hash_table[hash].chain); rt; 1158 for (rt = rcu_dereference_bh(dn_rt_hash_table[hash].chain); rt;
1159 rt = rcu_dereference(rt->u.dst.dn_next)) { 1159 rt = rcu_dereference_bh(rt->u.dst.dn_next)) {
1160 if ((flp->fld_dst == rt->fl.fld_dst) && 1160 if ((flp->fld_dst == rt->fl.fld_dst) &&
1161 (flp->fld_src == rt->fl.fld_src) && 1161 (flp->fld_src == rt->fl.fld_src) &&
1162 (flp->mark == rt->fl.mark) && 1162 (flp->mark == rt->fl.mark) &&
@@ -1618,9 +1618,9 @@ int dn_cache_dump(struct sk_buff *skb, struct netlink_callback *cb)
1618 if (h > s_h) 1618 if (h > s_h)
1619 s_idx = 0; 1619 s_idx = 0;
1620 rcu_read_lock_bh(); 1620 rcu_read_lock_bh();
1621 for(rt = rcu_dereference(dn_rt_hash_table[h].chain), idx = 0; 1621 for(rt = rcu_dereference_bh(dn_rt_hash_table[h].chain), idx = 0;
1622 rt; 1622 rt;
1623 rt = rcu_dereference(rt->u.dst.dn_next), idx++) { 1623 rt = rcu_dereference_bh(rt->u.dst.dn_next), idx++) {
1624 if (idx < s_idx) 1624 if (idx < s_idx)
1625 continue; 1625 continue;
1626 skb_dst_set(skb, dst_clone(&rt->u.dst)); 1626 skb_dst_set(skb, dst_clone(&rt->u.dst));
@@ -1654,12 +1654,12 @@ static struct dn_route *dn_rt_cache_get_first(struct seq_file *seq)
1654 1654
1655 for(s->bucket = dn_rt_hash_mask; s->bucket >= 0; --s->bucket) { 1655 for(s->bucket = dn_rt_hash_mask; s->bucket >= 0; --s->bucket) {
1656 rcu_read_lock_bh(); 1656 rcu_read_lock_bh();
1657 rt = dn_rt_hash_table[s->bucket].chain; 1657 rt = rcu_dereference_bh(dn_rt_hash_table[s->bucket].chain);
1658 if (rt) 1658 if (rt)
1659 break; 1659 break;
1660 rcu_read_unlock_bh(); 1660 rcu_read_unlock_bh();
1661 } 1661 }
1662 return rcu_dereference(rt); 1662 return rt;
1663} 1663}
1664 1664
1665static struct dn_route *dn_rt_cache_get_next(struct seq_file *seq, struct dn_route *rt) 1665static struct dn_route *dn_rt_cache_get_next(struct seq_file *seq, struct dn_route *rt)
@@ -1674,7 +1674,7 @@ static struct dn_route *dn_rt_cache_get_next(struct seq_file *seq, struct dn_rou
1674 rcu_read_lock_bh(); 1674 rcu_read_lock_bh();
1675 rt = dn_rt_hash_table[s->bucket].chain; 1675 rt = dn_rt_hash_table[s->bucket].chain;
1676 } 1676 }
1677 return rcu_dereference(rt); 1677 return rcu_dereference_bh(rt);
1678} 1678}
1679 1679
1680static void *dn_rt_cache_seq_start(struct seq_file *seq, loff_t *pos) 1680static void *dn_rt_cache_seq_start(struct seq_file *seq, loff_t *pos)
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 04762d3bef71..b2ba5581d2ae 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -287,12 +287,12 @@ static struct rtable *rt_cache_get_first(struct seq_file *seq)
287 if (!rt_hash_table[st->bucket].chain) 287 if (!rt_hash_table[st->bucket].chain)
288 continue; 288 continue;
289 rcu_read_lock_bh(); 289 rcu_read_lock_bh();
290 r = rcu_dereference(rt_hash_table[st->bucket].chain); 290 r = rcu_dereference_bh(rt_hash_table[st->bucket].chain);
291 while (r) { 291 while (r) {
292 if (dev_net(r->u.dst.dev) == seq_file_net(seq) && 292 if (dev_net(r->u.dst.dev) == seq_file_net(seq) &&
293 r->rt_genid == st->genid) 293 r->rt_genid == st->genid)
294 return r; 294 return r;
295 r = rcu_dereference(r->u.dst.rt_next); 295 r = rcu_dereference_bh(r->u.dst.rt_next);
296 } 296 }
297 rcu_read_unlock_bh(); 297 rcu_read_unlock_bh();
298 } 298 }
@@ -314,7 +314,7 @@ static struct rtable *__rt_cache_get_next(struct seq_file *seq,
314 rcu_read_lock_bh(); 314 rcu_read_lock_bh();
315 r = rt_hash_table[st->bucket].chain; 315 r = rt_hash_table[st->bucket].chain;
316 } 316 }
317 return rcu_dereference(r); 317 return rcu_dereference_bh(r);
318} 318}
319 319
320static struct rtable *rt_cache_get_next(struct seq_file *seq, 320static struct rtable *rt_cache_get_next(struct seq_file *seq,
@@ -2694,8 +2694,8 @@ int __ip_route_output_key(struct net *net, struct rtable **rp,
2694 hash = rt_hash(flp->fl4_dst, flp->fl4_src, flp->oif, rt_genid(net)); 2694 hash = rt_hash(flp->fl4_dst, flp->fl4_src, flp->oif, rt_genid(net));
2695 2695
2696 rcu_read_lock_bh(); 2696 rcu_read_lock_bh();
2697 for (rth = rcu_dereference(rt_hash_table[hash].chain); rth; 2697 for (rth = rcu_dereference_bh(rt_hash_table[hash].chain); rth;
2698 rth = rcu_dereference(rth->u.dst.rt_next)) { 2698 rth = rcu_dereference_bh(rth->u.dst.rt_next)) {
2699 if (rth->fl.fl4_dst == flp->fl4_dst && 2699 if (rth->fl.fl4_dst == flp->fl4_dst &&
2700 rth->fl.fl4_src == flp->fl4_src && 2700 rth->fl.fl4_src == flp->fl4_src &&
2701 rth->fl.iif == 0 && 2701 rth->fl.iif == 0 &&
@@ -3013,8 +3013,8 @@ int ip_rt_dump(struct sk_buff *skb, struct netlink_callback *cb)
3013 if (!rt_hash_table[h].chain) 3013 if (!rt_hash_table[h].chain)
3014 continue; 3014 continue;
3015 rcu_read_lock_bh(); 3015 rcu_read_lock_bh();
3016 for (rt = rcu_dereference(rt_hash_table[h].chain), idx = 0; rt; 3016 for (rt = rcu_dereference_bh(rt_hash_table[h].chain), idx = 0; rt;
3017 rt = rcu_dereference(rt->u.dst.rt_next), idx++) { 3017 rt = rcu_dereference_bh(rt->u.dst.rt_next), idx++) {
3018 if (!net_eq(dev_net(rt->u.dst.dev), net) || idx < s_idx) 3018 if (!net_eq(dev_net(rt->u.dst.dev), net) || idx < s_idx)
3019 continue; 3019 continue;
3020 if (rt_is_expired(rt)) 3020 if (rt_is_expired(rt))
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index e2d1def70841..031a5e6fb4aa 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -500,7 +500,7 @@ static inline unsigned int run_filter(struct sk_buff *skb, struct sock *sk,
500 struct sk_filter *filter; 500 struct sk_filter *filter;
501 501
502 rcu_read_lock_bh(); 502 rcu_read_lock_bh();
503 filter = rcu_dereference(sk->sk_filter); 503 filter = rcu_dereference_bh(sk->sk_filter);
504 if (filter != NULL) 504 if (filter != NULL)
505 res = sk_run_filter(skb, filter->insns, filter->len); 505 res = sk_run_filter(skb, filter->insns, filter->len);
506 rcu_read_unlock_bh(); 506 rcu_read_unlock_bh();
diff --git a/net/xfrm/xfrm_algo.c b/net/xfrm/xfrm_algo.c
index 743c0134a6a9..8b4d6e3246e5 100644
--- a/net/xfrm/xfrm_algo.c
+++ b/net/xfrm/xfrm_algo.c
@@ -125,6 +125,22 @@ static struct xfrm_algo_desc aead_list[] = {
125 .sadb_alg_maxbits = 256 125 .sadb_alg_maxbits = 256
126 } 126 }
127}, 127},
128{
129 .name = "rfc4543(gcm(aes))",
130
131 .uinfo = {
132 .aead = {
133 .icv_truncbits = 128,
134 }
135 },
136
137 .desc = {
138 .sadb_alg_id = SADB_X_EALG_NULL_AES_GMAC,
139 .sadb_alg_ivlen = 8,
140 .sadb_alg_minbits = 128,
141 .sadb_alg_maxbits = 256
142 }
143},
128}; 144};
129 145
130static struct xfrm_algo_desc aalg_list[] = { 146static struct xfrm_algo_desc aalg_list[] = {