aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-21 04:08:38 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-21 04:08:38 -0400
commit23469de647c4c7b68b5d135927b1c509f0e757e6 (patch)
treee378147b72d9569ff7d6ad5c84acd7bfc509bca3
parentb0d04fb56b3173626a15406d69f3026ca313057f (diff)
parentd2fb4fb8ee91c1b8a1dbba6afda6f5ed2eb28bdc (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
David writes: "Networking: A few straggler bug fixes: 1) Fix indexing of multi-pass dumps of ipv6 addresses, from David Ahern. 2) Revert RCU locking change for bonding netpoll, causes worse problems than it solves. 3) pskb_trim_rcsum_slow() doesn't handle odd trim offsets, resulting in erroneous bad hw checksum triggers with CHECKSUM_COMPLETE devices. From Dimitris Michailidis. 4) a revert to some neighbour code changes that adjust notifications in a way that confuses some apps." * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: Revert "neighbour: force neigh_invalidate when NUD_FAILED update is from admin" net/ipv6: Fix index counter for unicast addresses in in6_dump_addrs net: fix pskb_trim_rcsum_slow() with odd trim offset Revert "bond: take rcu lock in netpoll_send_skb_on_dev"
-rw-r--r--net/core/neighbour.c3
-rw-r--r--net/core/netpoll.c2
-rw-r--r--net/core/skbuff.c5
-rw-r--r--net/ipv6/addrconf.c6
4 files changed, 8 insertions, 8 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 91592fceeaad..4e07824eec5e 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -1148,8 +1148,7 @@ int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new,
1148 neigh->nud_state = new; 1148 neigh->nud_state = new;
1149 err = 0; 1149 err = 0;
1150 notify = old & NUD_VALID; 1150 notify = old & NUD_VALID;
1151 if (((old & (NUD_INCOMPLETE | NUD_PROBE)) || 1151 if ((old & (NUD_INCOMPLETE | NUD_PROBE)) &&
1152 (flags & NEIGH_UPDATE_F_ADMIN)) &&
1153 (new & NUD_FAILED)) { 1152 (new & NUD_FAILED)) {
1154 neigh_invalidate(neigh); 1153 neigh_invalidate(neigh);
1155 notify = 1; 1154 notify = 1;
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index de1d1ba92f2d..3ae899805f8b 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -312,7 +312,6 @@ void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,
312 /* It is up to the caller to keep npinfo alive. */ 312 /* It is up to the caller to keep npinfo alive. */
313 struct netpoll_info *npinfo; 313 struct netpoll_info *npinfo;
314 314
315 rcu_read_lock_bh();
316 lockdep_assert_irqs_disabled(); 315 lockdep_assert_irqs_disabled();
317 316
318 npinfo = rcu_dereference_bh(np->dev->npinfo); 317 npinfo = rcu_dereference_bh(np->dev->npinfo);
@@ -357,7 +356,6 @@ void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,
357 skb_queue_tail(&npinfo->txq, skb); 356 skb_queue_tail(&npinfo->txq, skb);
358 schedule_delayed_work(&npinfo->tx_work,0); 357 schedule_delayed_work(&npinfo->tx_work,0);
359 } 358 }
360 rcu_read_unlock_bh();
361} 359}
362EXPORT_SYMBOL(netpoll_send_skb_on_dev); 360EXPORT_SYMBOL(netpoll_send_skb_on_dev);
363 361
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 428094b577fc..f817f336595d 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -1846,8 +1846,9 @@ int pskb_trim_rcsum_slow(struct sk_buff *skb, unsigned int len)
1846 if (skb->ip_summed == CHECKSUM_COMPLETE) { 1846 if (skb->ip_summed == CHECKSUM_COMPLETE) {
1847 int delta = skb->len - len; 1847 int delta = skb->len - len;
1848 1848
1849 skb->csum = csum_sub(skb->csum, 1849 skb->csum = csum_block_sub(skb->csum,
1850 skb_checksum(skb, len, delta, 0)); 1850 skb_checksum(skb, len, delta, 0),
1851 len);
1851 } 1852 }
1852 return __pskb_trim(skb, len); 1853 return __pskb_trim(skb, len);
1853} 1854}
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index c63ccce6425f..4e81ff2f4588 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -4928,8 +4928,8 @@ static int in6_dump_addrs(struct inet6_dev *idev, struct sk_buff *skb,
4928 4928
4929 /* unicast address incl. temp addr */ 4929 /* unicast address incl. temp addr */
4930 list_for_each_entry(ifa, &idev->addr_list, if_list) { 4930 list_for_each_entry(ifa, &idev->addr_list, if_list) {
4931 if (++ip_idx < s_ip_idx) 4931 if (ip_idx < s_ip_idx)
4932 continue; 4932 goto next;
4933 err = inet6_fill_ifaddr(skb, ifa, 4933 err = inet6_fill_ifaddr(skb, ifa,
4934 NETLINK_CB(cb->skb).portid, 4934 NETLINK_CB(cb->skb).portid,
4935 cb->nlh->nlmsg_seq, 4935 cb->nlh->nlmsg_seq,
@@ -4938,6 +4938,8 @@ static int in6_dump_addrs(struct inet6_dev *idev, struct sk_buff *skb,
4938 if (err < 0) 4938 if (err < 0)
4939 break; 4939 break;
4940 nl_dump_check_consistent(cb, nlmsg_hdr(skb)); 4940 nl_dump_check_consistent(cb, nlmsg_hdr(skb));
4941next:
4942 ip_idx++;
4941 } 4943 }
4942 break; 4944 break;
4943 } 4945 }