diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-07-06 19:46:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-07-06 19:46:57 -0400 |
commit | eeaecb8619fb679006ab24a11ed292e37c74703c (patch) | |
tree | 13e8028af87707eedb938a0f4937aa9e74f1a313 /net | |
parent | dc53fffc105f68cb08ca872acd51550e89aa2e67 (diff) | |
parent | 0ca1b08eba627b4245efd0f71b55a062bf163777 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (39 commits)
Revert "p54: Use SKB list handling helpers instead of by-hand code."
sctp: fix warning at inet_sock_destruct() while release sctp socket
tun/tap: Fix crashes if open() /dev/net/tun and then poll() it.
dsa: fix 88e6xxx statistics counter snapshotting
forcedeth: Fix NAPI race.
drivers/net/smsc911x.c: Fix resource size off by 1 error
pcnet_cs: add new id
bnx2x: Fix the maximal values of coalescing timeouts.
bnx2x: Disable HC coalescing when setting timeout to zero.
tun: Fix device unregister race
be2net: fix spurious interrupt handling in intx mode
e1000e: disable K1 at 1000Mbps for 82577/82578
e1000e: delay second read of PHY_STATUS register on failure of first read
e1000e: prevent NVM corruption on sectors larger than 4K
e1000e: do not write SmartSpeed register bits on parts without support
e1000e: delay after LCD reset and proper checks for PHY configuration done
e1000e: PHY loopback broken on 82578
ixgbe: Not allow 8259x unsupported wol options change from ethtool
ixgbe: fix inconsistent SFP/SFP+ failure results.
ixgbe: fix regression on some 82598 adapters
...
Diffstat (limited to 'net')
-rw-r--r-- | net/9p/trans_fd.c | 14 | ||||
-rw-r--r-- | net/dsa/mv88e6xxx.c | 2 | ||||
-rw-r--r-- | net/ipv4/xfrm4_policy.c | 3 | ||||
-rw-r--r-- | net/ipv6/addrconf.c | 30 | ||||
-rw-r--r-- | net/ipv6/xfrm6_policy.c | 6 | ||||
-rw-r--r-- | net/sctp/socket.c | 25 |
6 files changed, 44 insertions, 36 deletions
diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c index a2a1814c7a8d..8c2588e4edc0 100644 --- a/net/9p/trans_fd.c +++ b/net/9p/trans_fd.c | |||
@@ -735,12 +735,14 @@ static int parse_opts(char *params, struct p9_fd_opts *opts) | |||
735 | if (!*p) | 735 | if (!*p) |
736 | continue; | 736 | continue; |
737 | token = match_token(p, tokens, args); | 737 | token = match_token(p, tokens, args); |
738 | r = match_int(&args[0], &option); | 738 | if (token != Opt_err) { |
739 | if (r < 0) { | 739 | r = match_int(&args[0], &option); |
740 | P9_DPRINTK(P9_DEBUG_ERROR, | 740 | if (r < 0) { |
741 | "integer field, but no integer?\n"); | 741 | P9_DPRINTK(P9_DEBUG_ERROR, |
742 | ret = r; | 742 | "integer field, but no integer?\n"); |
743 | continue; | 743 | ret = r; |
744 | continue; | ||
745 | } | ||
744 | } | 746 | } |
745 | switch (token) { | 747 | switch (token) { |
746 | case Opt_port: | 748 | case Opt_port: |
diff --git a/net/dsa/mv88e6xxx.c b/net/dsa/mv88e6xxx.c index 4e4d8b5ad03d..efe661a9def4 100644 --- a/net/dsa/mv88e6xxx.c +++ b/net/dsa/mv88e6xxx.c | |||
@@ -418,7 +418,7 @@ static int mv88e6xxx_stats_wait(struct dsa_switch *ds) | |||
418 | int i; | 418 | int i; |
419 | 419 | ||
420 | for (i = 0; i < 10; i++) { | 420 | for (i = 0; i < 10; i++) { |
421 | ret = REG_READ(REG_GLOBAL2, 0x1d); | 421 | ret = REG_READ(REG_GLOBAL, 0x1d); |
422 | if ((ret & 0x8000) == 0) | 422 | if ((ret & 0x8000) == 0) |
423 | return 0; | 423 | return 0; |
424 | } | 424 | } |
diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c index 60d918c96a4f..0071ee6f441f 100644 --- a/net/ipv4/xfrm4_policy.c +++ b/net/ipv4/xfrm4_policy.c | |||
@@ -136,7 +136,8 @@ _decode_session4(struct sk_buff *skb, struct flowi *fl, int reverse) | |||
136 | case IPPROTO_TCP: | 136 | case IPPROTO_TCP: |
137 | case IPPROTO_SCTP: | 137 | case IPPROTO_SCTP: |
138 | case IPPROTO_DCCP: | 138 | case IPPROTO_DCCP: |
139 | if (pskb_may_pull(skb, xprth + 4 - skb->data)) { | 139 | if (xprth + 4 < skb->data || |
140 | pskb_may_pull(skb, xprth + 4 - skb->data)) { | ||
140 | __be16 *ports = (__be16 *)xprth; | 141 | __be16 *ports = (__be16 *)xprth; |
141 | 142 | ||
142 | fl->fl_ip_sport = ports[!!reverse]; | 143 | fl->fl_ip_sport = ports[!!reverse]; |
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 3883b4036a74..43b3c9f89c12 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -1916,8 +1916,32 @@ ok: | |||
1916 | update_lft = 1; | 1916 | update_lft = 1; |
1917 | else if (stored_lft <= MIN_VALID_LIFETIME) { | 1917 | else if (stored_lft <= MIN_VALID_LIFETIME) { |
1918 | /* valid_lft <= stored_lft is always true */ | 1918 | /* valid_lft <= stored_lft is always true */ |
1919 | /* XXX: IPsec */ | 1919 | /* |
1920 | update_lft = 0; | 1920 | * RFC 4862 Section 5.5.3e: |
1921 | * "Note that the preferred lifetime of | ||
1922 | * the corresponding address is always | ||
1923 | * reset to the Preferred Lifetime in | ||
1924 | * the received Prefix Information | ||
1925 | * option, regardless of whether the | ||
1926 | * valid lifetime is also reset or | ||
1927 | * ignored." | ||
1928 | * | ||
1929 | * So if the preferred lifetime in | ||
1930 | * this advertisement is different | ||
1931 | * than what we have stored, but the | ||
1932 | * valid lifetime is invalid, just | ||
1933 | * reset prefered_lft. | ||
1934 | * | ||
1935 | * We must set the valid lifetime | ||
1936 | * to the stored lifetime since we'll | ||
1937 | * be updating the timestamp below, | ||
1938 | * else we'll set it back to the | ||
1939 | * minumum. | ||
1940 | */ | ||
1941 | if (prefered_lft != ifp->prefered_lft) { | ||
1942 | valid_lft = stored_lft; | ||
1943 | update_lft = 1; | ||
1944 | } | ||
1921 | } else { | 1945 | } else { |
1922 | valid_lft = MIN_VALID_LIFETIME; | 1946 | valid_lft = MIN_VALID_LIFETIME; |
1923 | if (valid_lft < prefered_lft) | 1947 | if (valid_lft < prefered_lft) |
@@ -3085,7 +3109,7 @@ restart: | |||
3085 | spin_unlock(&ifp->lock); | 3109 | spin_unlock(&ifp->lock); |
3086 | continue; | 3110 | continue; |
3087 | } else if (age >= ifp->prefered_lft) { | 3111 | } else if (age >= ifp->prefered_lft) { |
3088 | /* jiffies - ifp->tsamp > age >= ifp->prefered_lft */ | 3112 | /* jiffies - ifp->tstamp > age >= ifp->prefered_lft */ |
3089 | int deprecate = 0; | 3113 | int deprecate = 0; |
3090 | 3114 | ||
3091 | if (!(ifp->flags&IFA_F_DEPRECATED)) { | 3115 | if (!(ifp->flags&IFA_F_DEPRECATED)) { |
diff --git a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c index b4b16a43f277..3a3c677bc0f2 100644 --- a/net/ipv6/xfrm6_policy.c +++ b/net/ipv6/xfrm6_policy.c | |||
@@ -157,7 +157,8 @@ _decode_session6(struct sk_buff *skb, struct flowi *fl, int reverse) | |||
157 | ipv6_addr_copy(&fl->fl6_dst, reverse ? &hdr->saddr : &hdr->daddr); | 157 | ipv6_addr_copy(&fl->fl6_dst, reverse ? &hdr->saddr : &hdr->daddr); |
158 | ipv6_addr_copy(&fl->fl6_src, reverse ? &hdr->daddr : &hdr->saddr); | 158 | ipv6_addr_copy(&fl->fl6_src, reverse ? &hdr->daddr : &hdr->saddr); |
159 | 159 | ||
160 | while (pskb_may_pull(skb, nh + offset + 1 - skb->data)) { | 160 | while (nh + offset + 1 < skb->data || |
161 | pskb_may_pull(skb, nh + offset + 1 - skb->data)) { | ||
161 | nh = skb_network_header(skb); | 162 | nh = skb_network_header(skb); |
162 | exthdr = (struct ipv6_opt_hdr *)(nh + offset); | 163 | exthdr = (struct ipv6_opt_hdr *)(nh + offset); |
163 | 164 | ||
@@ -177,7 +178,8 @@ _decode_session6(struct sk_buff *skb, struct flowi *fl, int reverse) | |||
177 | case IPPROTO_TCP: | 178 | case IPPROTO_TCP: |
178 | case IPPROTO_SCTP: | 179 | case IPPROTO_SCTP: |
179 | case IPPROTO_DCCP: | 180 | case IPPROTO_DCCP: |
180 | if (!onlyproto && pskb_may_pull(skb, nh + offset + 4 - skb->data)) { | 181 | if (!onlyproto && (nh + offset + 4 < skb->data || |
182 | pskb_may_pull(skb, nh + offset + 4 - skb->data))) { | ||
181 | __be16 *ports = (__be16 *)exthdr; | 183 | __be16 *ports = (__be16 *)exthdr; |
182 | 184 | ||
183 | fl->fl_ip_sport = ports[!!reverse]; | 185 | fl->fl_ip_sport = ports[!!reverse]; |
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 35ba035970a2..971890dbfea0 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c | |||
@@ -6652,21 +6652,6 @@ static void sctp_wait_for_close(struct sock *sk, long timeout) | |||
6652 | finish_wait(sk->sk_sleep, &wait); | 6652 | finish_wait(sk->sk_sleep, &wait); |
6653 | } | 6653 | } |
6654 | 6654 | ||
6655 | static void sctp_sock_rfree_frag(struct sk_buff *skb) | ||
6656 | { | ||
6657 | struct sk_buff *frag; | ||
6658 | |||
6659 | if (!skb->data_len) | ||
6660 | goto done; | ||
6661 | |||
6662 | /* Don't forget the fragments. */ | ||
6663 | skb_walk_frags(skb, frag) | ||
6664 | sctp_sock_rfree_frag(frag); | ||
6665 | |||
6666 | done: | ||
6667 | sctp_sock_rfree(skb); | ||
6668 | } | ||
6669 | |||
6670 | static void sctp_skb_set_owner_r_frag(struct sk_buff *skb, struct sock *sk) | 6655 | static void sctp_skb_set_owner_r_frag(struct sk_buff *skb, struct sock *sk) |
6671 | { | 6656 | { |
6672 | struct sk_buff *frag; | 6657 | struct sk_buff *frag; |
@@ -6776,7 +6761,6 @@ static void sctp_sock_migrate(struct sock *oldsk, struct sock *newsk, | |||
6776 | sctp_skb_for_each(skb, &oldsk->sk_receive_queue, tmp) { | 6761 | sctp_skb_for_each(skb, &oldsk->sk_receive_queue, tmp) { |
6777 | event = sctp_skb2event(skb); | 6762 | event = sctp_skb2event(skb); |
6778 | if (event->asoc == assoc) { | 6763 | if (event->asoc == assoc) { |
6779 | sctp_sock_rfree_frag(skb); | ||
6780 | __skb_unlink(skb, &oldsk->sk_receive_queue); | 6764 | __skb_unlink(skb, &oldsk->sk_receive_queue); |
6781 | __skb_queue_tail(&newsk->sk_receive_queue, skb); | 6765 | __skb_queue_tail(&newsk->sk_receive_queue, skb); |
6782 | sctp_skb_set_owner_r_frag(skb, newsk); | 6766 | sctp_skb_set_owner_r_frag(skb, newsk); |
@@ -6807,7 +6791,6 @@ static void sctp_sock_migrate(struct sock *oldsk, struct sock *newsk, | |||
6807 | sctp_skb_for_each(skb, &oldsp->pd_lobby, tmp) { | 6791 | sctp_skb_for_each(skb, &oldsp->pd_lobby, tmp) { |
6808 | event = sctp_skb2event(skb); | 6792 | event = sctp_skb2event(skb); |
6809 | if (event->asoc == assoc) { | 6793 | if (event->asoc == assoc) { |
6810 | sctp_sock_rfree_frag(skb); | ||
6811 | __skb_unlink(skb, &oldsp->pd_lobby); | 6794 | __skb_unlink(skb, &oldsp->pd_lobby); |
6812 | __skb_queue_tail(queue, skb); | 6795 | __skb_queue_tail(queue, skb); |
6813 | sctp_skb_set_owner_r_frag(skb, newsk); | 6796 | sctp_skb_set_owner_r_frag(skb, newsk); |
@@ -6822,15 +6805,11 @@ static void sctp_sock_migrate(struct sock *oldsk, struct sock *newsk, | |||
6822 | 6805 | ||
6823 | } | 6806 | } |
6824 | 6807 | ||
6825 | sctp_skb_for_each(skb, &assoc->ulpq.reasm, tmp) { | 6808 | sctp_skb_for_each(skb, &assoc->ulpq.reasm, tmp) |
6826 | sctp_sock_rfree_frag(skb); | ||
6827 | sctp_skb_set_owner_r_frag(skb, newsk); | 6809 | sctp_skb_set_owner_r_frag(skb, newsk); |
6828 | } | ||
6829 | 6810 | ||
6830 | sctp_skb_for_each(skb, &assoc->ulpq.lobby, tmp) { | 6811 | sctp_skb_for_each(skb, &assoc->ulpq.lobby, tmp) |
6831 | sctp_sock_rfree_frag(skb); | ||
6832 | sctp_skb_set_owner_r_frag(skb, newsk); | 6812 | sctp_skb_set_owner_r_frag(skb, newsk); |
6833 | } | ||
6834 | 6813 | ||
6835 | /* Set the type of socket to indicate that it is peeled off from the | 6814 | /* Set the type of socket to indicate that it is peeled off from the |
6836 | * original UDP-style socket or created with the accept() call on a | 6815 | * original UDP-style socket or created with the accept() call on a |