Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3c7a9f32 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull networking fixes from David Miller:

 1) In order to avoid problems in the future, make cgroup bpf overriding
    explicit using BPF_F_ALLOW_OVERRIDE. From Alexei Staovoitov.

 2) LLC sets skb->sk without proper skb->destructor and this explodes,
    fix from Eric Dumazet.

 3) Make sure when we have an ipv4 mapped source address, the
    destination is either also an ipv4 mapped address or
    ipv6_addr_any(). Fix from Jonathan T. Leighton.

 4) Avoid packet loss in fec driver by programming the multicast filter
    more intelligently. From Rui Sousa.

 5) Handle multiple threads invoking fanout_add(), fix from Eric
    Dumazet.

 6) Since we can invoke the TCP input path in process context, without
    BH being disabled, we have to accomodate that in the locking of the
    TCP probe. Also from Eric Dumazet.

 7) Fix erroneous emission of NETEVENT_DELAY_PROBE_TIME_UPDATE when we
    aren't even updating that sysctl value. From Marcus Huewe.

 8) Fix endian bugs in ibmvnic driver, from Thomas Falcon.

[ This is the second version of the pull that reverts the nested
  rhashtable changes that looked a bit too scary for this late in the
  release  - Linus ]

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (27 commits)
  rhashtable: Revert nested table changes.
  ibmvnic: Fix endian errors in error reporting output
  ibmvnic: Fix endian error when requesting device capabilities
  net: neigh: Fix netevent NETEVENT_DELAY_PROBE_TIME_UPDATE notification
  net: xilinx_emaclite: fix freezes due to unordered I/O
  net: xilinx_emaclite: fix receive buffer overflow
  bpf: kernel header files need to be copied into the tools directory
  tcp: tcp_probe: use spin_lock_bh()
  uapi: fix linux/if_pppol2tp.h userspace compilation errors
  packet: fix races in fanout_add()
  ibmvnic: Fix initial MTU settings
  net: ethernet: ti: cpsw: fix cpsw assignment in resume
  kcm: fix a null pointer dereference in kcm_sendmsg()
  net: fec: fix multicast filtering hardware setup
  ipv6: Handle IPv4-mapped src to in6addr_any dst.
  ipv6: Inhibit IPv4-mapped src address on the wire.
  net/mlx5e: Disable preemption when doing TC statistics upcall
  rhashtable: Add nested tables
  tipc: Fix tipc_sk_reinit race conditions
  gfs2: Use rhashtable walk interface in glock_hash_walk
  ...
parents 747ae0a9 bf3f14d6
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -2478,12 +2478,11 @@ S: D-90453 Nuernberg
S: Germany

N: Arnaldo Carvalho de Melo
E: acme@ghostprotocols.net
E: acme@kernel.org
E: arnaldo.melo@gmail.com
E: acme@redhat.com
W: http://oops.ghostprotocols.net:81/blog/
P: 1024D/9224DF01 D5DF E3BB E3C8 BCBB F8AD  841A B6AB 4681 9224 DF01
D: IPX, LLC, DCCP, cyc2x, wl3501_cs, net/ hacks
D: tools/, IPX, LLC, DCCP, cyc2x, wl3501_cs, net/ hacks
S: Brazil

N: Karsten Merker
+6 −9
Original line number Diff line number Diff line
@@ -877,8 +877,8 @@ S: Odd fixes
F:	drivers/hwmon/applesmc.c

APPLETALK NETWORK LAYER
M:	Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
S:	Maintained
L:	netdev@vger.kernel.org
S:	Odd fixes
F:	drivers/net/appletalk/
F:	net/appletalk/

@@ -6727,9 +6727,8 @@ S: Odd Fixes
F:	drivers/tty/ipwireless/

IPX NETWORK LAYER
M:	Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
L:	netdev@vger.kernel.org
S:	Maintained
S:	Odd fixes
F:	include/net/ipx.h
F:	include/uapi/linux/ipx.h
F:	net/ipx/
@@ -7501,8 +7500,8 @@ S: Maintained
F:	drivers/misc/lkdtm*

LLC (802.2)
M:	Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
S:	Maintained
L:	netdev@vger.kernel.org
S:	Odd fixes
F:	include/linux/llc.h
F:	include/uapi/linux/llc.h
F:	include/net/llc*
@@ -13373,10 +13372,8 @@ S: Maintained
F:	drivers/input/misc/wistron_btns.c

WL3501 WIRELESS PCMCIA CARD DRIVER
M:	Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
L:	linux-wireless@vger.kernel.org
W:	http://oops.ghostprotocols.net:81/blog
S:	Maintained
S:	Odd fixes
F:	drivers/net/wireless/wl3501*

WOLFSON MICROELECTRONICS DRIVERS
+9 −14
Original line number Diff line number Diff line
@@ -2910,6 +2910,7 @@ static void set_multicast_list(struct net_device *ndev)
	struct netdev_hw_addr *ha;
	unsigned int i, bit, data, crc, tmp;
	unsigned char hash;
	unsigned int hash_high = 0, hash_low = 0;

	if (ndev->flags & IFF_PROMISC) {
		tmp = readl(fep->hwp + FEC_R_CNTRL);
@@ -2932,11 +2933,7 @@ static void set_multicast_list(struct net_device *ndev)
		return;
	}

	/* Clear filter and add the addresses in hash register
	 */
	writel(0, fep->hwp + FEC_GRP_HASH_TABLE_HIGH);
	writel(0, fep->hwp + FEC_GRP_HASH_TABLE_LOW);

	/* Add the addresses in hash register */
	netdev_for_each_mc_addr(ha, ndev) {
		/* calculate crc32 value of mac address */
		crc = 0xffffffff;
@@ -2954,16 +2951,14 @@ static void set_multicast_list(struct net_device *ndev)
		 */
		hash = (crc >> (32 - FEC_HASH_BITS)) & 0x3f;

		if (hash > 31) {
			tmp = readl(fep->hwp + FEC_GRP_HASH_TABLE_HIGH);
			tmp |= 1 << (hash - 32);
			writel(tmp, fep->hwp + FEC_GRP_HASH_TABLE_HIGH);
		} else {
			tmp = readl(fep->hwp + FEC_GRP_HASH_TABLE_LOW);
			tmp |= 1 << hash;
			writel(tmp, fep->hwp + FEC_GRP_HASH_TABLE_LOW);
		}
		if (hash > 31)
			hash_high |= 1 << (hash - 32);
		else
			hash_low |= 1 << hash;
	}

	writel(hash_high, fep->hwp + FEC_GRP_HASH_TABLE_HIGH);
	writel(hash_low, fep->hwp + FEC_GRP_HASH_TABLE_LOW);
}

/* Set a MAC change in hardware. */
+21 −22
Original line number Diff line number Diff line
@@ -189,9 +189,10 @@ static int alloc_long_term_buff(struct ibmvnic_adapter *adapter,
	}
	ltb->map_id = adapter->map_id;
	adapter->map_id++;

	init_completion(&adapter->fw_done);
	send_request_map(adapter, ltb->addr,
			 ltb->size, ltb->map_id);
	init_completion(&adapter->fw_done);
	wait_for_completion(&adapter->fw_done);
	return 0;
}
@@ -505,7 +506,7 @@ static int ibmvnic_open(struct net_device *netdev)
	adapter->rx_pool = NULL;
rx_pool_arr_alloc_failed:
	for (i = 0; i < adapter->req_rx_queues; i++)
		napi_enable(&adapter->napi[i]);
		napi_disable(&adapter->napi[i]);
alloc_napi_failed:
	return -ENOMEM;
}
@@ -1121,10 +1122,10 @@ static void ibmvnic_get_ethtool_stats(struct net_device *dev,
	crq.request_statistics.ioba = cpu_to_be32(adapter->stats_token);
	crq.request_statistics.len =
	    cpu_to_be32(sizeof(struct ibmvnic_statistics));
	ibmvnic_send_crq(adapter, &crq);

	/* Wait for data to be written */
	init_completion(&adapter->stats_done);
	ibmvnic_send_crq(adapter, &crq);
	wait_for_completion(&adapter->stats_done);

	for (i = 0; i < ARRAY_SIZE(ibmvnic_stats); i++)
@@ -1496,7 +1497,7 @@ static void init_sub_crqs(struct ibmvnic_adapter *adapter, int retry)
		adapter->req_rx_queues = adapter->opt_rx_comp_queues;
		adapter->req_rx_add_queues = adapter->max_rx_add_queues;

		adapter->req_mtu = adapter->max_mtu;
		adapter->req_mtu = adapter->netdev->mtu + ETH_HLEN;
	}

	total_queues = adapter->req_tx_queues + adapter->req_rx_queues;
@@ -2185,12 +2186,12 @@ static void handle_error_info_rsp(union ibmvnic_crq *crq,

	if (!found) {
		dev_err(dev, "Couldn't find error id %x\n",
			crq->request_error_rsp.error_id);
			be32_to_cpu(crq->request_error_rsp.error_id));
		return;
	}

	dev_err(dev, "Detailed info for error id %x:",
		crq->request_error_rsp.error_id);
		be32_to_cpu(crq->request_error_rsp.error_id));

	for (i = 0; i < error_buff->len; i++) {
		pr_cont("%02x", (int)error_buff->buff[i]);
@@ -2269,8 +2270,8 @@ static void handle_error_indication(union ibmvnic_crq *crq,
	dev_err(dev, "Firmware reports %serror id %x, cause %d\n",
		crq->error_indication.
		    flags & IBMVNIC_FATAL_ERROR ? "FATAL " : "",
		crq->error_indication.error_id,
		crq->error_indication.error_cause);
		be32_to_cpu(crq->error_indication.error_id),
		be16_to_cpu(crq->error_indication.error_cause));

	error_buff = kmalloc(sizeof(*error_buff), GFP_ATOMIC);
	if (!error_buff)
@@ -2388,10 +2389,10 @@ static void handle_request_cap_rsp(union ibmvnic_crq *crq,
	case PARTIALSUCCESS:
		dev_info(dev, "req=%lld, rsp=%ld in %s queue, retrying.\n",
			 *req_value,
			 (long int)be32_to_cpu(crq->request_capability_rsp.
			 (long int)be64_to_cpu(crq->request_capability_rsp.
					       number), name);
		release_sub_crqs_no_irqs(adapter);
		*req_value = be32_to_cpu(crq->request_capability_rsp.number);
		*req_value = be64_to_cpu(crq->request_capability_rsp.number);
		init_sub_crqs(adapter, 1);
		return;
	default:
@@ -2626,12 +2627,12 @@ static void handle_query_cap_rsp(union ibmvnic_crq *crq,
		break;
	case MIN_MTU:
		adapter->min_mtu = be64_to_cpu(crq->query_capability.number);
		netdev->min_mtu = adapter->min_mtu;
		netdev->min_mtu = adapter->min_mtu - ETH_HLEN;
		netdev_dbg(netdev, "min_mtu = %lld\n", adapter->min_mtu);
		break;
	case MAX_MTU:
		adapter->max_mtu = be64_to_cpu(crq->query_capability.number);
		netdev->max_mtu = adapter->max_mtu;
		netdev->max_mtu = adapter->max_mtu - ETH_HLEN;
		netdev_dbg(netdev, "max_mtu = %lld\n", adapter->max_mtu);
		break;
	case MAX_MULTICAST_FILTERS:
@@ -2799,9 +2800,9 @@ static ssize_t trace_read(struct file *file, char __user *user_buf, size_t len,
	crq.collect_fw_trace.correlator = adapter->ras_comps[num].correlator;
	crq.collect_fw_trace.ioba = cpu_to_be32(trace_tok);
	crq.collect_fw_trace.len = adapter->ras_comps[num].trace_buff_size;
	ibmvnic_send_crq(adapter, &crq);

	init_completion(&adapter->fw_done);
	ibmvnic_send_crq(adapter, &crq);
	wait_for_completion(&adapter->fw_done);

	if (*ppos + len > be32_to_cpu(adapter->ras_comps[num].trace_buff_size))
@@ -3581,9 +3582,9 @@ static int ibmvnic_dump_show(struct seq_file *seq, void *v)
	memset(&crq, 0, sizeof(crq));
	crq.request_dump_size.first = IBMVNIC_CRQ_CMD;
	crq.request_dump_size.cmd = REQUEST_DUMP_SIZE;
	ibmvnic_send_crq(adapter, &crq);

	init_completion(&adapter->fw_done);
	ibmvnic_send_crq(adapter, &crq);
	wait_for_completion(&adapter->fw_done);

	seq_write(seq, adapter->dump_data, adapter->dump_data_size);
@@ -3629,8 +3630,8 @@ static void handle_crq_init_rsp(struct work_struct *work)
		}
	}

	send_version_xchg(adapter);
	reinit_completion(&adapter->init_done);
	send_version_xchg(adapter);
	if (!wait_for_completion_timeout(&adapter->init_done, timeout)) {
		dev_err(dev, "Passive init timeout\n");
		goto task_failed;
@@ -3640,9 +3641,9 @@ static void handle_crq_init_rsp(struct work_struct *work)
		if (adapter->renegotiate) {
			adapter->renegotiate = false;
			release_sub_crqs_no_irqs(adapter);
			send_cap_queries(adapter);

			reinit_completion(&adapter->init_done);
			send_cap_queries(adapter);
			if (!wait_for_completion_timeout(&adapter->init_done,
							 timeout)) {
				dev_err(dev, "Passive init timeout\n");
@@ -3656,9 +3657,7 @@ static void handle_crq_init_rsp(struct work_struct *work)
		goto task_failed;

	netdev->real_num_tx_queues = adapter->req_tx_queues;
	netdev->mtu = adapter->req_mtu;
	netdev->min_mtu = adapter->min_mtu;
	netdev->max_mtu = adapter->max_mtu;
	netdev->mtu = adapter->req_mtu - ETH_HLEN;

	if (adapter->failover) {
		adapter->failover = false;
@@ -3772,9 +3771,9 @@ static int ibmvnic_probe(struct vio_dev *dev, const struct vio_device_id *id)
			adapter->debugfs_dump = ent;
		}
	}
	ibmvnic_send_crq_init(adapter);

	init_completion(&adapter->init_done);
	ibmvnic_send_crq_init(adapter);
	if (!wait_for_completion_timeout(&adapter->init_done, timeout))
		return 0;

@@ -3782,9 +3781,9 @@ static int ibmvnic_probe(struct vio_dev *dev, const struct vio_device_id *id)
		if (adapter->renegotiate) {
			adapter->renegotiate = false;
			release_sub_crqs_no_irqs(adapter);
			send_cap_queries(adapter);

			reinit_completion(&adapter->init_done);
			send_cap_queries(adapter);
			if (!wait_for_completion_timeout(&adapter->init_done,
							 timeout))
				return 0;
@@ -3798,7 +3797,7 @@ static int ibmvnic_probe(struct vio_dev *dev, const struct vio_device_id *id)
	}

	netdev->real_num_tx_queues = adapter->req_tx_queues;
	netdev->mtu = adapter->req_mtu;
	netdev->mtu = adapter->req_mtu - ETH_HLEN;

	rc = register_netdev(netdev);
	if (rc) {
+4 −0
Original line number Diff line number Diff line
@@ -1087,10 +1087,14 @@ int mlx5e_stats_flower(struct mlx5e_priv *priv,

	mlx5_fc_query_cached(counter, &bytes, &packets, &lastuse);

	preempt_disable();

	tcf_exts_to_list(f->exts, &actions);
	list_for_each_entry(a, &actions, list)
		tcf_action_stats_update(a, bytes, packets, lastuse);

	preempt_enable();

	return 0;
}

Loading