Skip to content

Commit c356dc4

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) Fix leak of unqueued fragments in ipv6 nf_defrag, from Guillaume Nault. 2) Don't access the DDM interface unless the transceiver implements it in bnx2x, from Mauro S. M. Rodrigues. 3) Don't double fetch 'len' from userspace in sock_getsockopt(), from JingYi Hou. 4) Sign extension overflow in lio_core, from Colin Ian King. 5) Various netem bug fixes wrt. corrupted packets from Jakub Kicinski. 6) Fix epollout hang in hvsock, from Sunil Muthuswamy. 7) Fix regression in default fib6_type, from David Ahern. 8) Handle memory limits in tcp_fragment more appropriately, from Eric Dumazet. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (24 commits) tcp: refine memory limit test in tcp_fragment() inet: clear num_timeout reqsk_alloc() net: mvpp2: debugfs: Add pmap to fs dump ipv6: Default fib6_type to RTN_UNICAST when not set net: hns3: Fix inconsistent indenting net/af_iucv: always register net_device notifier net/af_iucv: build proper skbs for HiperTransport net/af_iucv: remove GFP_DMA restriction for HiperTransport net: dsa: mv88e6xxx: fix shift of FID bits in mv88e6185_g1_vtu_loadpurge() hvsock: fix epollout hang from race condition net/udp_gso: Allow TX timestamp with UDP GSO net: netem: fix use after free and double free with packet corruption net: netem: fix backlog accounting for corrupted GSO frames net: lio_core: fix potential sign-extension overflow on large shift tipc: pass tunnel dev as NULL to udp_tunnel(6)_xmit_skb ip6_tunnel: allow not to count pkts on tstats by passing dev as NULL ip_tunnel: allow not to count pkts on tstats by setting skb's dev to NULL tun: wake up waitqueues after IFF_UP is set net: remove duplicate fetch in sock_getsockopt tipc: fix issues with early FAILOVER_MSG from peer ...
2 parents 121bddf + b6653b3 commit c356dc4

File tree

25 files changed

+123
-112
lines changed

25 files changed

+123
-112
lines changed

drivers/net/dsa/mv88e6xxx/global1_vtu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ int mv88e6185_g1_vtu_loadpurge(struct mv88e6xxx_chip *chip,
415415
* VTU DBNum[7:4] are located in VTU Operation 11:8
416416
*/
417417
op |= entry->fid & 0x000f;
418-
op |= (entry->fid & 0x00f0) << 8;
418+
op |= (entry->fid & 0x00f0) << 4;
419419
}
420420

421421
return mv88e6xxx_g1_vtu_op(chip, op);

drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1609,7 +1609,8 @@ static int bnx2x_get_module_info(struct net_device *dev,
16091609
}
16101610

16111611
if (!sff8472_comp ||
1612-
(diag_type & SFP_EEPROM_DIAG_ADDR_CHANGE_REQ)) {
1612+
(diag_type & SFP_EEPROM_DIAG_ADDR_CHANGE_REQ) ||
1613+
!(diag_type & SFP_EEPROM_DDM_IMPLEMENTED)) {
16131614
modinfo->type = ETH_MODULE_SFF_8079;
16141615
modinfo->eeprom_len = ETH_MODULE_SFF_8079_LEN;
16151616
} else {

drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
#define SFP_EEPROM_DIAG_TYPE_ADDR 0x5c
6363
#define SFP_EEPROM_DIAG_TYPE_SIZE 1
6464
#define SFP_EEPROM_DIAG_ADDR_CHANGE_REQ (1<<2)
65+
#define SFP_EEPROM_DDM_IMPLEMENTED (1<<6)
6566
#define SFP_EEPROM_SFF_8472_COMP_ADDR 0x5e
6667
#define SFP_EEPROM_SFF_8472_COMP_SIZE 1
6768

drivers/net/ethernet/cavium/liquidio/lio_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -964,7 +964,7 @@ static void liquidio_schedule_droq_pkt_handlers(struct octeon_device *oct)
964964

965965
if (droq->ops.poll_mode) {
966966
droq->ops.napi_fn(droq);
967-
oct_priv->napi_mask |= (1 << oq_no);
967+
oct_priv->napi_mask |= BIT_ULL(oq_no);
968968
} else {
969969
tasklet_schedule(&oct_priv->droq_tasklet);
970970
}

drivers/net/ethernet/hisilicon/hns3/hns3_enet.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3803,7 +3803,7 @@ static int hns3_client_init(struct hnae3_handle *handle)
38033803
ret = hns3_client_start(handle);
38043804
if (ret) {
38053805
dev_err(priv->dev, "hns3_client_start fail! ret=%d\n", ret);
3806-
goto out_client_start;
3806+
goto out_client_start;
38073807
}
38083808

38093809
hns3_dcbnl_setup(handle);

drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,9 @@ static int mvpp2_dbgfs_prs_entry_init(struct dentry *parent,
566566
debugfs_create_file("hits", 0444, prs_entry_dir, entry,
567567
&mvpp2_dbgfs_prs_hits_fops);
568568

569+
debugfs_create_file("pmap", 0444, prs_entry_dir, entry,
570+
&mvpp2_dbgfs_prs_pmap_fops);
571+
569572
return 0;
570573
}
571574

drivers/net/tun.c

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,18 +1014,8 @@ static void tun_net_uninit(struct net_device *dev)
10141014
/* Net device open. */
10151015
static int tun_net_open(struct net_device *dev)
10161016
{
1017-
struct tun_struct *tun = netdev_priv(dev);
1018-
int i;
1019-
10201017
netif_tx_start_all_queues(dev);
10211018

1022-
for (i = 0; i < tun->numqueues; i++) {
1023-
struct tun_file *tfile;
1024-
1025-
tfile = rtnl_dereference(tun->tfiles[i]);
1026-
tfile->socket.sk->sk_write_space(tfile->socket.sk);
1027-
}
1028-
10291019
return 0;
10301020
}
10311021

@@ -3634,6 +3624,7 @@ static int tun_device_event(struct notifier_block *unused,
36343624
{
36353625
struct net_device *dev = netdev_notifier_info_to_dev(ptr);
36363626
struct tun_struct *tun = netdev_priv(dev);
3627+
int i;
36373628

36383629
if (dev->rtnl_link_ops != &tun_link_ops)
36393630
return NOTIFY_DONE;
@@ -3643,6 +3634,14 @@ static int tun_device_event(struct notifier_block *unused,
36433634
if (tun_queue_resize(tun))
36443635
return NOTIFY_BAD;
36453636
break;
3637+
case NETDEV_UP:
3638+
for (i = 0; i < tun->numqueues; i++) {
3639+
struct tun_file *tfile;
3640+
3641+
tfile = rtnl_dereference(tun->tfiles[i]);
3642+
tfile->socket.sk->sk_write_space(tfile->socket.sk);
3643+
}
3644+
break;
36463645
default:
36473646
break;
36483647
}

include/net/ip6_tunnel.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,12 @@ static inline void ip6tunnel_xmit(struct sock *sk, struct sk_buff *skb,
158158
memset(skb->cb, 0, sizeof(struct inet6_skb_parm));
159159
pkt_len = skb->len - skb_inner_network_offset(skb);
160160
err = ip6_local_out(dev_net(skb_dst(skb)->dev), sk, skb);
161-
if (unlikely(net_xmit_eval(err)))
162-
pkt_len = -1;
163-
iptunnel_xmit_stats(dev, pkt_len);
161+
162+
if (dev) {
163+
if (unlikely(net_xmit_eval(err)))
164+
pkt_len = -1;
165+
iptunnel_xmit_stats(dev, pkt_len);
166+
}
164167
}
165168
#endif
166169
#endif

include/net/request_sock.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ reqsk_alloc(const struct request_sock_ops *ops, struct sock *sk_listener,
9797
sk_node_init(&req_to_sk(req)->sk_node);
9898
sk_tx_queue_clear(req_to_sk(req));
9999
req->saved_syn = NULL;
100+
req->num_timeout = 0;
101+
req->num_retrans = 0;
102+
req->sk = NULL;
100103
refcount_set(&req->rsk_refcnt, 0);
101104

102105
return req;

net/core/sock.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1477,9 +1477,6 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
14771477
{
14781478
u32 meminfo[SK_MEMINFO_VARS];
14791479

1480-
if (get_user(len, optlen))
1481-
return -EFAULT;
1482-
14831480
sk_get_meminfo(sk, meminfo);
14841481

14851482
len = min_t(unsigned int, len, sizeof(meminfo));

0 commit comments

Comments
 (0)