diff options
author | David S. Miller <davem@davemloft.net> | 2008-11-19 02:38:23 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-19 02:38:23 -0500 |
commit | 198d6ba4d7f48c94f990f4604f0b3d73925e0ded (patch) | |
tree | 56bbdf8ba2553c23c8099da9344a8f1d1aba97ab /net | |
parent | 9a57f7fabd383920585ed8b74eacd117c6551f2d (diff) | |
parent | 7f0f598a0069d1ab072375965a4b69137233169c (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/isdn/i4l/isdn_net.c
fs/cifs/connect.c
Diffstat (limited to 'net')
-rw-r--r-- | net/9p/Kconfig | 10 | ||||
-rw-r--r-- | net/compat.c | 4 | ||||
-rw-r--r-- | net/core/rtnetlink.c | 4 | ||||
-rw-r--r-- | net/core/scm.c | 2 | ||||
-rw-r--r-- | net/core/sock.c | 2 | ||||
-rw-r--r-- | net/ipv4/ip_input.c | 10 | ||||
-rw-r--r-- | net/ipv4/tcp_htcp.c | 14 | ||||
-rw-r--r-- | net/ipv6/datagram.c | 5 | ||||
-rw-r--r-- | net/ipv6/ipv6_sockglue.c | 5 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 6 | ||||
-rw-r--r-- | net/phonet/af_phonet.c | 4 |
11 files changed, 45 insertions, 21 deletions
diff --git a/net/9p/Kconfig b/net/9p/Kconfig index c42c0c400bf9..0663f99e977a 100644 --- a/net/9p/Kconfig +++ b/net/9p/Kconfig | |||
@@ -13,22 +13,24 @@ menuconfig NET_9P | |||
13 | 13 | ||
14 | If unsure, say N. | 14 | If unsure, say N. |
15 | 15 | ||
16 | if NET_9P | ||
17 | |||
16 | config NET_9P_VIRTIO | 18 | config NET_9P_VIRTIO |
17 | depends on NET_9P && EXPERIMENTAL && VIRTIO | 19 | depends on EXPERIMENTAL && VIRTIO |
18 | tristate "9P Virtio Transport (Experimental)" | 20 | tristate "9P Virtio Transport (Experimental)" |
19 | help | 21 | help |
20 | This builds support for a transports between | 22 | This builds support for a transports between |
21 | guest partitions and a host partition. | 23 | guest partitions and a host partition. |
22 | 24 | ||
23 | config NET_9P_RDMA | 25 | config NET_9P_RDMA |
24 | depends on NET_9P && INFINIBAND && EXPERIMENTAL | 26 | depends on INET && INFINIBAND && EXPERIMENTAL |
25 | tristate "9P RDMA Transport (Experimental)" | 27 | tristate "9P RDMA Transport (Experimental)" |
26 | help | 28 | help |
27 | This builds support for a RDMA transport. | 29 | This builds support for an RDMA transport. |
28 | 30 | ||
29 | config NET_9P_DEBUG | 31 | config NET_9P_DEBUG |
30 | bool "Debug information" | 32 | bool "Debug information" |
31 | depends on NET_9P | ||
32 | help | 33 | help |
33 | Say Y if you want the 9P subsystem to log debug information. | 34 | Say Y if you want the 9P subsystem to log debug information. |
34 | 35 | ||
36 | endif | ||
diff --git a/net/compat.c b/net/compat.c index 67fb6a3834a3..6ce1a1cadcc0 100644 --- a/net/compat.c +++ b/net/compat.c | |||
@@ -226,14 +226,14 @@ int put_cmsg_compat(struct msghdr *kmsg, int level, int type, int len, void *dat | |||
226 | return 0; /* XXX: return error? check spec. */ | 226 | return 0; /* XXX: return error? check spec. */ |
227 | } | 227 | } |
228 | 228 | ||
229 | if (level == SOL_SOCKET && type == SO_TIMESTAMP) { | 229 | if (level == SOL_SOCKET && type == SCM_TIMESTAMP) { |
230 | struct timeval *tv = (struct timeval *)data; | 230 | struct timeval *tv = (struct timeval *)data; |
231 | ctv.tv_sec = tv->tv_sec; | 231 | ctv.tv_sec = tv->tv_sec; |
232 | ctv.tv_usec = tv->tv_usec; | 232 | ctv.tv_usec = tv->tv_usec; |
233 | data = &ctv; | 233 | data = &ctv; |
234 | len = sizeof(ctv); | 234 | len = sizeof(ctv); |
235 | } | 235 | } |
236 | if (level == SOL_SOCKET && type == SO_TIMESTAMPNS) { | 236 | if (level == SOL_SOCKET && type == SCM_TIMESTAMPNS) { |
237 | struct timespec *ts = (struct timespec *)data; | 237 | struct timespec *ts = (struct timespec *)data; |
238 | cts.tv_sec = ts->tv_sec; | 238 | cts.tv_sec = ts->tv_sec; |
239 | cts.tv_nsec = ts->tv_nsec; | 239 | cts.tv_nsec = ts->tv_nsec; |
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 31f29d2989fd..4dfb6b4d4559 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c | |||
@@ -878,7 +878,9 @@ static int do_setlink(struct net_device *dev, struct ifinfomsg *ifm, | |||
878 | if (ifm->ifi_change) | 878 | if (ifm->ifi_change) |
879 | flags = (flags & ifm->ifi_change) | | 879 | flags = (flags & ifm->ifi_change) | |
880 | (dev->flags & ~ifm->ifi_change); | 880 | (dev->flags & ~ifm->ifi_change); |
881 | dev_change_flags(dev, flags); | 881 | err = dev_change_flags(dev, flags); |
882 | if (err < 0) | ||
883 | goto errout; | ||
882 | } | 884 | } |
883 | 885 | ||
884 | if (tb[IFLA_TXQLEN]) | 886 | if (tb[IFLA_TXQLEN]) |
diff --git a/net/core/scm.c b/net/core/scm.c index ab242cc1acca..b12303dd39d9 100644 --- a/net/core/scm.c +++ b/net/core/scm.c | |||
@@ -75,7 +75,6 @@ static int scm_fp_copy(struct cmsghdr *cmsg, struct scm_fp_list **fplp) | |||
75 | if (!fpl) | 75 | if (!fpl) |
76 | return -ENOMEM; | 76 | return -ENOMEM; |
77 | *fplp = fpl; | 77 | *fplp = fpl; |
78 | INIT_LIST_HEAD(&fpl->list); | ||
79 | fpl->count = 0; | 78 | fpl->count = 0; |
80 | } | 79 | } |
81 | fpp = &fpl->fp[fpl->count]; | 80 | fpp = &fpl->fp[fpl->count]; |
@@ -301,7 +300,6 @@ struct scm_fp_list *scm_fp_dup(struct scm_fp_list *fpl) | |||
301 | 300 | ||
302 | new_fpl = kmalloc(sizeof(*fpl), GFP_KERNEL); | 301 | new_fpl = kmalloc(sizeof(*fpl), GFP_KERNEL); |
303 | if (new_fpl) { | 302 | if (new_fpl) { |
304 | INIT_LIST_HEAD(&new_fpl->list); | ||
305 | for (i=fpl->count-1; i>=0; i--) | 303 | for (i=fpl->count-1; i>=0; i--) |
306 | get_file(fpl->fp[i]); | 304 | get_file(fpl->fp[i]); |
307 | memcpy(new_fpl, fpl, sizeof(*fpl)); | 305 | memcpy(new_fpl, fpl, sizeof(*fpl)); |
diff --git a/net/core/sock.c b/net/core/sock.c index 38de9c3f563b..5a6fe4dfad46 100644 --- a/net/core/sock.c +++ b/net/core/sock.c | |||
@@ -136,7 +136,6 @@ | |||
136 | static struct lock_class_key af_family_keys[AF_MAX]; | 136 | static struct lock_class_key af_family_keys[AF_MAX]; |
137 | static struct lock_class_key af_family_slock_keys[AF_MAX]; | 137 | static struct lock_class_key af_family_slock_keys[AF_MAX]; |
138 | 138 | ||
139 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | ||
140 | /* | 139 | /* |
141 | * Make lock validator output more readable. (we pre-construct these | 140 | * Make lock validator output more readable. (we pre-construct these |
142 | * strings build-time, so that runtime initialization of socket | 141 | * strings build-time, so that runtime initialization of socket |
@@ -187,7 +186,6 @@ static const char *af_family_clock_key_strings[AF_MAX+1] = { | |||
187 | "clock-AF_RXRPC" , "clock-AF_ISDN" , "clock-AF_PHONET" , | 186 | "clock-AF_RXRPC" , "clock-AF_ISDN" , "clock-AF_PHONET" , |
188 | "clock-AF_MAX" | 187 | "clock-AF_MAX" |
189 | }; | 188 | }; |
190 | #endif | ||
191 | 189 | ||
192 | /* | 190 | /* |
193 | * sk_callback_lock locking rules are per-address-family, | 191 | * sk_callback_lock locking rules are per-address-family, |
diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c index 70bedab03b09..1a58a6fa1dc0 100644 --- a/net/ipv4/ip_input.c +++ b/net/ipv4/ip_input.c | |||
@@ -209,9 +209,17 @@ static int ip_local_deliver_finish(struct sk_buff *skb) | |||
209 | 209 | ||
210 | hash = protocol & (MAX_INET_PROTOS - 1); | 210 | hash = protocol & (MAX_INET_PROTOS - 1); |
211 | ipprot = rcu_dereference(inet_protos[hash]); | 211 | ipprot = rcu_dereference(inet_protos[hash]); |
212 | if (ipprot != NULL && (net == &init_net || ipprot->netns_ok)) { | 212 | if (ipprot != NULL) { |
213 | int ret; | 213 | int ret; |
214 | 214 | ||
215 | if (!net_eq(net, &init_net) && !ipprot->netns_ok) { | ||
216 | if (net_ratelimit()) | ||
217 | printk("%s: proto %d isn't netns-ready\n", | ||
218 | __func__, protocol); | ||
219 | kfree_skb(skb); | ||
220 | goto out; | ||
221 | } | ||
222 | |||
215 | if (!ipprot->no_policy) { | 223 | if (!ipprot->no_policy) { |
216 | if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb)) { | 224 | if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb)) { |
217 | kfree_skb(skb); | 225 | kfree_skb(skb); |
diff --git a/net/ipv4/tcp_htcp.c b/net/ipv4/tcp_htcp.c index af99776146ff..937549b8a921 100644 --- a/net/ipv4/tcp_htcp.c +++ b/net/ipv4/tcp_htcp.c | |||
@@ -69,9 +69,12 @@ static u32 htcp_cwnd_undo(struct sock *sk) | |||
69 | const struct tcp_sock *tp = tcp_sk(sk); | 69 | const struct tcp_sock *tp = tcp_sk(sk); |
70 | struct htcp *ca = inet_csk_ca(sk); | 70 | struct htcp *ca = inet_csk_ca(sk); |
71 | 71 | ||
72 | ca->last_cong = ca->undo_last_cong; | 72 | if (ca->undo_last_cong) { |
73 | ca->maxRTT = ca->undo_maxRTT; | 73 | ca->last_cong = ca->undo_last_cong; |
74 | ca->old_maxB = ca->undo_old_maxB; | 74 | ca->maxRTT = ca->undo_maxRTT; |
75 | ca->old_maxB = ca->undo_old_maxB; | ||
76 | ca->undo_last_cong = 0; | ||
77 | } | ||
75 | 78 | ||
76 | return max(tp->snd_cwnd, (tp->snd_ssthresh << 7) / ca->beta); | 79 | return max(tp->snd_cwnd, (tp->snd_ssthresh << 7) / ca->beta); |
77 | } | 80 | } |
@@ -268,7 +271,10 @@ static void htcp_state(struct sock *sk, u8 new_state) | |||
268 | case TCP_CA_Open: | 271 | case TCP_CA_Open: |
269 | { | 272 | { |
270 | struct htcp *ca = inet_csk_ca(sk); | 273 | struct htcp *ca = inet_csk_ca(sk); |
271 | ca->last_cong = jiffies; | 274 | if (ca->undo_last_cong) { |
275 | ca->last_cong = jiffies; | ||
276 | ca->undo_last_cong = 0; | ||
277 | } | ||
272 | } | 278 | } |
273 | break; | 279 | break; |
274 | case TCP_CA_CWR: | 280 | case TCP_CA_CWR: |
diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c index 410046a8cc91..e44deb8d4df2 100644 --- a/net/ipv6/datagram.c +++ b/net/ipv6/datagram.c | |||
@@ -661,6 +661,11 @@ int datagram_send_ctl(struct net *net, | |||
661 | switch (rthdr->type) { | 661 | switch (rthdr->type) { |
662 | #if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE) | 662 | #if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE) |
663 | case IPV6_SRCRT_TYPE_2: | 663 | case IPV6_SRCRT_TYPE_2: |
664 | if (rthdr->hdrlen != 2 || | ||
665 | rthdr->segments_left != 1) { | ||
666 | err = -EINVAL; | ||
667 | goto exit_f; | ||
668 | } | ||
664 | break; | 669 | break; |
665 | #endif | 670 | #endif |
666 | default: | 671 | default: |
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c index 4e5eac301f91..2aa294be0c79 100644 --- a/net/ipv6/ipv6_sockglue.c +++ b/net/ipv6/ipv6_sockglue.c | |||
@@ -366,11 +366,16 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname, | |||
366 | } | 366 | } |
367 | 367 | ||
368 | /* routing header option needs extra check */ | 368 | /* routing header option needs extra check */ |
369 | retv = -EINVAL; | ||
369 | if (optname == IPV6_RTHDR && opt && opt->srcrt) { | 370 | if (optname == IPV6_RTHDR && opt && opt->srcrt) { |
370 | struct ipv6_rt_hdr *rthdr = opt->srcrt; | 371 | struct ipv6_rt_hdr *rthdr = opt->srcrt; |
371 | switch (rthdr->type) { | 372 | switch (rthdr->type) { |
372 | #if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE) | 373 | #if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE) |
373 | case IPV6_SRCRT_TYPE_2: | 374 | case IPV6_SRCRT_TYPE_2: |
375 | if (rthdr->hdrlen != 2 || | ||
376 | rthdr->segments_left != 1) | ||
377 | goto sticky_done; | ||
378 | |||
374 | break; | 379 | break; |
375 | #endif | 380 | #endif |
376 | default: | 381 | default: |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index dee6448c4eb0..b2099306def7 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -2570,14 +2570,14 @@ void ieee80211_notify_mac(struct ieee80211_hw *hw, | |||
2570 | 2570 | ||
2571 | switch (notif_type) { | 2571 | switch (notif_type) { |
2572 | case IEEE80211_NOTIFY_RE_ASSOC: | 2572 | case IEEE80211_NOTIFY_RE_ASSOC: |
2573 | rcu_read_lock(); | 2573 | rtnl_lock(); |
2574 | list_for_each_entry_rcu(sdata, &local->interfaces, list) { | 2574 | list_for_each_entry(sdata, &local->interfaces, list) { |
2575 | if (sdata->vif.type != NL80211_IFTYPE_STATION) | 2575 | if (sdata->vif.type != NL80211_IFTYPE_STATION) |
2576 | continue; | 2576 | continue; |
2577 | 2577 | ||
2578 | ieee80211_sta_req_auth(sdata, &sdata->u.sta); | 2578 | ieee80211_sta_req_auth(sdata, &sdata->u.sta); |
2579 | } | 2579 | } |
2580 | rcu_read_unlock(); | 2580 | rtnl_unlock(); |
2581 | break; | 2581 | break; |
2582 | } | 2582 | } |
2583 | } | 2583 | } |
diff --git a/net/phonet/af_phonet.c b/net/phonet/af_phonet.c index f400ff168904..62af1d8a8dd2 100644 --- a/net/phonet/af_phonet.c +++ b/net/phonet/af_phonet.c | |||
@@ -148,8 +148,8 @@ static int pn_send(struct sk_buff *skb, struct net_device *dev, | |||
148 | struct phonethdr *ph; | 148 | struct phonethdr *ph; |
149 | int err; | 149 | int err; |
150 | 150 | ||
151 | if (skb->len + 2 > 0xffff) { | 151 | if (skb->len + 2 > 0xffff /* Phonet length field limit */ || |
152 | /* Phonet length field would overflow */ | 152 | skb->len + sizeof(struct phonethdr) > dev->mtu) { |
153 | err = -EMSGSIZE; | 153 | err = -EMSGSIZE; |
154 | goto drop; | 154 | goto drop; |
155 | } | 155 | } |