Skip to content

Commit 23469de

Browse files
committed
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"
2 parents b0d04fb + d2fb4fb commit 23469de

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

net/core/neighbour.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1148,8 +1148,7 @@ int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new,
11481148
neigh->nud_state = new;
11491149
err = 0;
11501150
notify = old & NUD_VALID;
1151-
if (((old & (NUD_INCOMPLETE | NUD_PROBE)) ||
1152-
(flags & NEIGH_UPDATE_F_ADMIN)) &&
1151+
if ((old & (NUD_INCOMPLETE | NUD_PROBE)) &&
11531152
(new & NUD_FAILED)) {
11541153
neigh_invalidate(neigh);
11551154
notify = 1;

net/core/netpoll.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,6 @@ void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,
312312
/* It is up to the caller to keep npinfo alive. */
313313
struct netpoll_info *npinfo;
314314

315-
rcu_read_lock_bh();
316315
lockdep_assert_irqs_disabled();
317316

318317
npinfo = rcu_dereference_bh(np->dev->npinfo);
@@ -357,7 +356,6 @@ void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,
357356
skb_queue_tail(&npinfo->txq, skb);
358357
schedule_delayed_work(&npinfo->tx_work,0);
359358
}
360-
rcu_read_unlock_bh();
361359
}
362360
EXPORT_SYMBOL(netpoll_send_skb_on_dev);
363361

net/core/skbuff.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1846,8 +1846,9 @@ int pskb_trim_rcsum_slow(struct sk_buff *skb, unsigned int len)
18461846
if (skb->ip_summed == CHECKSUM_COMPLETE) {
18471847
int delta = skb->len - len;
18481848

1849-
skb->csum = csum_sub(skb->csum,
1850-
skb_checksum(skb, len, delta, 0));
1849+
skb->csum = csum_block_sub(skb->csum,
1850+
skb_checksum(skb, len, delta, 0),
1851+
len);
18511852
}
18521853
return __pskb_trim(skb, len);
18531854
}

net/ipv6/addrconf.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4928,8 +4928,8 @@ static int in6_dump_addrs(struct inet6_dev *idev, struct sk_buff *skb,
49284928

49294929
/* unicast address incl. temp addr */
49304930
list_for_each_entry(ifa, &idev->addr_list, if_list) {
4931-
if (++ip_idx < s_ip_idx)
4932-
continue;
4931+
if (ip_idx < s_ip_idx)
4932+
goto next;
49334933
err = inet6_fill_ifaddr(skb, ifa,
49344934
NETLINK_CB(cb->skb).portid,
49354935
cb->nlh->nlmsg_seq,
@@ -4938,6 +4938,8 @@ static int in6_dump_addrs(struct inet6_dev *idev, struct sk_buff *skb,
49384938
if (err < 0)
49394939
break;
49404940
nl_dump_check_consistent(cb, nlmsg_hdr(skb));
4941+
next:
4942+
ip_idx++;
49414943
}
49424944
break;
49434945
}

0 commit comments

Comments
 (0)