aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-03-23 13:07:16 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-23 13:07:16 -0400
commit934e18b5cb4531cc6e81865bf54115cfd21d1ac6 (patch)
treec9e9398648f8be6948f41bf879e8962812418088 /net
parenta20ae85abaefb02cc0edf19c34f78d19437c1cf1 (diff)
parent8a78335442cea429afb2b964318b6e257448ea00 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) L2TP doesn't get autoloaded when you try to open an L2TP socket due to a missing module alias, fix from Benjamin LaHaise. 2) Netlabel and RDS should propagate gfp flags given to them by callers, fixes from Dan Carpeneter. 3) Recursive locking fix in usbnet wasn't bulletproof and can result in objects going away mid-flight due to races, fix from Ming Lei. 4) Fix up some confusion about a bool module parameter in netfilter's iptable_filter and ip6table_filter, from Rusty Russell. 5) If SKB recycling is used via napi_reuse_skb() we end up with different amounts of headroom reserved than we had at the original SKB allocation. Fix from Eric Dumazet. 6) Fix races in TG3 driver ring refilling, from Michael Chan. 7) We have callbacks for IPSEC replay notifiers, but some call sites were not using the ops method and instead were calling one of the implementations directly. Oops. Fix from Steffen Klassert. 8) Fix IP address validation properly in the bonding driver, the previous fix only works with netlink where the subnet mask and IP address are changed in one atomic operation. When 'ifconfig' ioctls are used the IP address and the subnet mask are changed in two distinct operations. Fix from Andy Gospodarek. 9) Provide a sky2 module operation to work around power management issues with some BIOSes. From Stephen Hemminger. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: usbnet: consider device busy at each recieved packet bonding: remove entries for master_ip and vlan_ip and query devices instead netfilter: remove forward module param confusion. usbnet: don't clear urb->dev in tx_complete usbnet: increase URB reference count before usb_unlink_urb xfrm: Access the replay notify functions via the registered callbacks xfrm: Remove unused xfrm_state from xfrm_state_check_space RDS: use gfp flags from caller in conn_alloc() netlabel: use GFP flags from caller instead of GFP_ATOMIC l2tp: enable automatic module loading for l2tp_ppp cnic: Fix parity error code conflict tg3: Fix RSS ring refill race condition sky2: override for PCI legacy power management net: fix napi_reuse_skb() skb reserve
Diffstat (limited to 'net')
-rw-r--r--net/core/dev.c3
-rw-r--r--net/ipv4/devinet.c1
-rw-r--r--net/ipv4/netfilter/iptable_filter.c9
-rw-r--r--net/ipv6/netfilter/ip6table_filter.c9
-rw-r--r--net/l2tp/l2tp_ppp.c1
-rw-r--r--net/netlabel/netlabel_kapi.c2
-rw-r--r--net/rds/ib_cm.c2
-rw-r--r--net/rds/iw_cm.c2
-rw-r--r--net/rds/loop.c2
-rw-r--r--net/xfrm/xfrm_output.c4
-rw-r--r--net/xfrm/xfrm_replay.c6
11 files changed, 17 insertions, 24 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 0f3eb7d79a2d..452db7090d18 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3560,7 +3560,8 @@ EXPORT_SYMBOL(napi_gro_receive);
3560static void napi_reuse_skb(struct napi_struct *napi, struct sk_buff *skb) 3560static void napi_reuse_skb(struct napi_struct *napi, struct sk_buff *skb)
3561{ 3561{
3562 __skb_pull(skb, skb_headlen(skb)); 3562 __skb_pull(skb, skb_headlen(skb));
3563 skb_reserve(skb, NET_IP_ALIGN - skb_headroom(skb)); 3563 /* restore the reserve we had after netdev_alloc_skb_ip_align() */
3564 skb_reserve(skb, NET_SKB_PAD + NET_IP_ALIGN - skb_headroom(skb));
3564 skb->vlan_tci = 0; 3565 skb->vlan_tci = 0;
3565 skb->dev = napi->dev; 3566 skb->dev = napi->dev;
3566 skb->skb_iif = 0; 3567 skb->skb_iif = 0;
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index e41c40f48cfe..d4fad5c77447 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -1079,6 +1079,7 @@ __be32 inet_confirm_addr(struct in_device *in_dev,
1079 1079
1080 return addr; 1080 return addr;
1081} 1081}
1082EXPORT_SYMBOL(inet_confirm_addr);
1082 1083
1083/* 1084/*
1084 * Device notifier 1085 * Device notifier
diff --git a/net/ipv4/netfilter/iptable_filter.c b/net/ipv4/netfilter/iptable_filter.c
index 0e58f09e59fb..851acec852d2 100644
--- a/net/ipv4/netfilter/iptable_filter.c
+++ b/net/ipv4/netfilter/iptable_filter.c
@@ -52,7 +52,7 @@ iptable_filter_hook(unsigned int hook, struct sk_buff *skb,
52static struct nf_hook_ops *filter_ops __read_mostly; 52static struct nf_hook_ops *filter_ops __read_mostly;
53 53
54/* Default to forward because I got too much mail already. */ 54/* Default to forward because I got too much mail already. */
55static bool forward = NF_ACCEPT; 55static bool forward = true;
56module_param(forward, bool, 0000); 56module_param(forward, bool, 0000);
57 57
58static int __net_init iptable_filter_net_init(struct net *net) 58static int __net_init iptable_filter_net_init(struct net *net)
@@ -64,7 +64,7 @@ static int __net_init iptable_filter_net_init(struct net *net)
64 return -ENOMEM; 64 return -ENOMEM;
65 /* Entry 1 is the FORWARD hook */ 65 /* Entry 1 is the FORWARD hook */
66 ((struct ipt_standard *)repl->entries)[1].target.verdict = 66 ((struct ipt_standard *)repl->entries)[1].target.verdict =
67 -forward - 1; 67 forward ? -NF_ACCEPT - 1 : -NF_DROP - 1;
68 68
69 net->ipv4.iptable_filter = 69 net->ipv4.iptable_filter =
70 ipt_register_table(net, &packet_filter, repl); 70 ipt_register_table(net, &packet_filter, repl);
@@ -88,11 +88,6 @@ static int __init iptable_filter_init(void)
88{ 88{
89 int ret; 89 int ret;
90 90
91 if (forward < 0 || forward > NF_MAX_VERDICT) {
92 pr_err("iptables forward must be 0 or 1\n");
93 return -EINVAL;
94 }
95
96 ret = register_pernet_subsys(&iptable_filter_net_ops); 91 ret = register_pernet_subsys(&iptable_filter_net_ops);
97 if (ret < 0) 92 if (ret < 0)
98 return ret; 93 return ret;
diff --git a/net/ipv6/netfilter/ip6table_filter.c b/net/ipv6/netfilter/ip6table_filter.c
index a8f6da97e3b2..325e59a0224f 100644
--- a/net/ipv6/netfilter/ip6table_filter.c
+++ b/net/ipv6/netfilter/ip6table_filter.c
@@ -44,7 +44,7 @@ ip6table_filter_hook(unsigned int hook, struct sk_buff *skb,
44static struct nf_hook_ops *filter_ops __read_mostly; 44static struct nf_hook_ops *filter_ops __read_mostly;
45 45
46/* Default to forward because I got too much mail already. */ 46/* Default to forward because I got too much mail already. */
47static bool forward = NF_ACCEPT; 47static bool forward = true;
48module_param(forward, bool, 0000); 48module_param(forward, bool, 0000);
49 49
50static int __net_init ip6table_filter_net_init(struct net *net) 50static int __net_init ip6table_filter_net_init(struct net *net)
@@ -56,7 +56,7 @@ static int __net_init ip6table_filter_net_init(struct net *net)
56 return -ENOMEM; 56 return -ENOMEM;
57 /* Entry 1 is the FORWARD hook */ 57 /* Entry 1 is the FORWARD hook */
58 ((struct ip6t_standard *)repl->entries)[1].target.verdict = 58 ((struct ip6t_standard *)repl->entries)[1].target.verdict =
59 -forward - 1; 59 forward ? -NF_ACCEPT - 1 : -NF_DROP - 1;
60 60
61 net->ipv6.ip6table_filter = 61 net->ipv6.ip6table_filter =
62 ip6t_register_table(net, &packet_filter, repl); 62 ip6t_register_table(net, &packet_filter, repl);
@@ -80,11 +80,6 @@ static int __init ip6table_filter_init(void)
80{ 80{
81 int ret; 81 int ret;
82 82
83 if (forward < 0 || forward > NF_MAX_VERDICT) {
84 pr_err("iptables forward must be 0 or 1\n");
85 return -EINVAL;
86 }
87
88 ret = register_pernet_subsys(&ip6table_filter_net_ops); 83 ret = register_pernet_subsys(&ip6table_filter_net_ops);
89 if (ret < 0) 84 if (ret < 0)
90 return ret; 85 return ret;
diff --git a/net/l2tp/l2tp_ppp.c b/net/l2tp/l2tp_ppp.c
index 9b071910b4ba..1addd9f3f40a 100644
--- a/net/l2tp/l2tp_ppp.c
+++ b/net/l2tp/l2tp_ppp.c
@@ -1845,3 +1845,4 @@ MODULE_AUTHOR("James Chapman <jchapman@katalix.com>");
1845MODULE_DESCRIPTION("PPP over L2TP over UDP"); 1845MODULE_DESCRIPTION("PPP over L2TP over UDP");
1846MODULE_LICENSE("GPL"); 1846MODULE_LICENSE("GPL");
1847MODULE_VERSION(PPPOL2TP_DRV_VERSION); 1847MODULE_VERSION(PPPOL2TP_DRV_VERSION);
1848MODULE_ALIAS("pppox-proto-" __stringify(PX_PROTO_OL2TP));
diff --git a/net/netlabel/netlabel_kapi.c b/net/netlabel/netlabel_kapi.c
index 2560e7b441c6..7c94aedd0912 100644
--- a/net/netlabel/netlabel_kapi.c
+++ b/net/netlabel/netlabel_kapi.c
@@ -597,7 +597,7 @@ int netlbl_secattr_catmap_setrng(struct netlbl_lsm_secattr_catmap *catmap,
597 iter = iter->next; 597 iter = iter->next;
598 iter_max_spot = iter->startbit + NETLBL_CATMAP_SIZE; 598 iter_max_spot = iter->startbit + NETLBL_CATMAP_SIZE;
599 } 599 }
600 ret_val = netlbl_secattr_catmap_setbit(iter, spot, GFP_ATOMIC); 600 ret_val = netlbl_secattr_catmap_setbit(iter, spot, flags);
601 } 601 }
602 602
603 return ret_val; 603 return ret_val;
diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c
index 51c868923f64..a1e116277477 100644
--- a/net/rds/ib_cm.c
+++ b/net/rds/ib_cm.c
@@ -749,7 +749,7 @@ int rds_ib_conn_alloc(struct rds_connection *conn, gfp_t gfp)
749 int ret; 749 int ret;
750 750
751 /* XXX too lazy? */ 751 /* XXX too lazy? */
752 ic = kzalloc(sizeof(struct rds_ib_connection), GFP_KERNEL); 752 ic = kzalloc(sizeof(struct rds_ib_connection), gfp);
753 if (!ic) 753 if (!ic)
754 return -ENOMEM; 754 return -ENOMEM;
755 755
diff --git a/net/rds/iw_cm.c b/net/rds/iw_cm.c
index 9556d2895f7a..a91e1db62ee6 100644
--- a/net/rds/iw_cm.c
+++ b/net/rds/iw_cm.c
@@ -694,7 +694,7 @@ int rds_iw_conn_alloc(struct rds_connection *conn, gfp_t gfp)
694 unsigned long flags; 694 unsigned long flags;
695 695
696 /* XXX too lazy? */ 696 /* XXX too lazy? */
697 ic = kzalloc(sizeof(struct rds_iw_connection), GFP_KERNEL); 697 ic = kzalloc(sizeof(struct rds_iw_connection), gfp);
698 if (!ic) 698 if (!ic)
699 return -ENOMEM; 699 return -ENOMEM;
700 700
diff --git a/net/rds/loop.c b/net/rds/loop.c
index 87ff2a8a454b..6b12b68541ae 100644
--- a/net/rds/loop.c
+++ b/net/rds/loop.c
@@ -121,7 +121,7 @@ static int rds_loop_conn_alloc(struct rds_connection *conn, gfp_t gfp)
121 struct rds_loop_connection *lc; 121 struct rds_loop_connection *lc;
122 unsigned long flags; 122 unsigned long flags;
123 123
124 lc = kzalloc(sizeof(struct rds_loop_connection), GFP_KERNEL); 124 lc = kzalloc(sizeof(struct rds_loop_connection), gfp);
125 if (!lc) 125 if (!lc)
126 return -ENOMEM; 126 return -ENOMEM;
127 127
diff --git a/net/xfrm/xfrm_output.c b/net/xfrm/xfrm_output.c
index 47bacd8c0250..95a338c89f99 100644
--- a/net/xfrm/xfrm_output.c
+++ b/net/xfrm/xfrm_output.c
@@ -21,7 +21,7 @@
21 21
22static int xfrm_output2(struct sk_buff *skb); 22static int xfrm_output2(struct sk_buff *skb);
23 23
24static int xfrm_state_check_space(struct xfrm_state *x, struct sk_buff *skb) 24static int xfrm_skb_check_space(struct sk_buff *skb)
25{ 25{
26 struct dst_entry *dst = skb_dst(skb); 26 struct dst_entry *dst = skb_dst(skb);
27 int nhead = dst->header_len + LL_RESERVED_SPACE(dst->dev) 27 int nhead = dst->header_len + LL_RESERVED_SPACE(dst->dev)
@@ -48,7 +48,7 @@ static int xfrm_output_one(struct sk_buff *skb, int err)
48 goto resume; 48 goto resume;
49 49
50 do { 50 do {
51 err = xfrm_state_check_space(x, skb); 51 err = xfrm_skb_check_space(skb);
52 if (err) { 52 if (err) {
53 XFRM_INC_STATS(net, LINUX_MIB_XFRMOUTERROR); 53 XFRM_INC_STATS(net, LINUX_MIB_XFRMOUTERROR);
54 goto error_nolock; 54 goto error_nolock;
diff --git a/net/xfrm/xfrm_replay.c b/net/xfrm/xfrm_replay.c
index 39e02c54ed26..2f6d11d04a2b 100644
--- a/net/xfrm/xfrm_replay.c
+++ b/net/xfrm/xfrm_replay.c
@@ -167,7 +167,7 @@ static void xfrm_replay_advance(struct xfrm_state *x, __be32 net_seq)
167 } 167 }
168 168
169 if (xfrm_aevent_is_on(xs_net(x))) 169 if (xfrm_aevent_is_on(xs_net(x)))
170 xfrm_replay_notify(x, XFRM_REPLAY_UPDATE); 170 x->repl->notify(x, XFRM_REPLAY_UPDATE);
171} 171}
172 172
173static int xfrm_replay_overflow_bmp(struct xfrm_state *x, struct sk_buff *skb) 173static int xfrm_replay_overflow_bmp(struct xfrm_state *x, struct sk_buff *skb)
@@ -279,7 +279,7 @@ static void xfrm_replay_advance_bmp(struct xfrm_state *x, __be32 net_seq)
279 replay_esn->bmp[nr] |= (1U << bitnr); 279 replay_esn->bmp[nr] |= (1U << bitnr);
280 280
281 if (xfrm_aevent_is_on(xs_net(x))) 281 if (xfrm_aevent_is_on(xs_net(x)))
282 xfrm_replay_notify(x, XFRM_REPLAY_UPDATE); 282 x->repl->notify(x, XFRM_REPLAY_UPDATE);
283} 283}
284 284
285static void xfrm_replay_notify_bmp(struct xfrm_state *x, int event) 285static void xfrm_replay_notify_bmp(struct xfrm_state *x, int event)
@@ -473,7 +473,7 @@ static void xfrm_replay_advance_esn(struct xfrm_state *x, __be32 net_seq)
473 replay_esn->bmp[nr] |= (1U << bitnr); 473 replay_esn->bmp[nr] |= (1U << bitnr);
474 474
475 if (xfrm_aevent_is_on(xs_net(x))) 475 if (xfrm_aevent_is_on(xs_net(x)))
476 xfrm_replay_notify(x, XFRM_REPLAY_UPDATE); 476 x->repl->notify(x, XFRM_REPLAY_UPDATE);
477} 477}
478 478
479static struct xfrm_replay xfrm_replay_legacy = { 479static struct xfrm_replay xfrm_replay_legacy = {