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

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

 1) Fix route leak in xfrm_bundle_create().

 2) In mac80211, validate user rate mask before configuring it. From
    Johannes Berg.

 3) Properly enforce memory limits in fair queueing code, from Toke
    Hoiland-Jorgensen.

 4) Fix lockdep splat in inet_csk_route_req(), from Eric Dumazet.

 5) Fix TSO header allocation and management in mvpp2 driver, from Yan
    Markman.

 6) Don't take socket lock in BH handler in strparser code, from Tom
    Herbert.

 7) Don't show sockets from other namespaces in AF_UNIX code, from
    Andrei Vagin.

 8) Fix double free in error path of tap_open(), from Girish Moodalbail.

 9) Fix TX map failure path in igb and ixgbe, from Jean-Philippe Brucker
    and Alexander Duyck.

10) Fix DCB mode programming in stmmac driver, from Jose Abreu.

11) Fix err_count handling in various tunnels (ipip, ip6_gre). From Xin
    Long.

12) Properly align SKB head before building SKB in tuntap, from Jason
    Wang.

13) Avoid matching qdiscs with a zero handle during lookups, from Cong
    Wang.

14) Fix various endianness bugs in sctp, from Xin Long.

15) Fix tc filter callback races and add selftests which trigger the
    problem, from Cong Wang.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (73 commits)
  selftests: Introduce a new test case to tc testsuite
  selftests: Introduce a new script to generate tc batch file
  net_sched: fix call_rcu() race on act_sample module removal
  net_sched: add rtnl assertion to tcf_exts_destroy()
  net_sched: use tcf_queue_work() in tcindex filter
  net_sched: use tcf_queue_work() in rsvp filter
  net_sched: use tcf_queue_work() in route filter
  net_sched: use tcf_queue_work() in u32 filter
  net_sched: use tcf_queue_work() in matchall filter
  net_sched: use tcf_queue_work() in fw filter
  net_sched: use tcf_queue_work() in flower filter
  net_sched: use tcf_queue_work() in flow filter
  net_sched: use tcf_queue_work() in cgroup filter
  net_sched: use tcf_queue_work() in bpf filter
  net_sched: use tcf_queue_work() in basic filter
  net_sched: introduce a workqueue for RCU callbacks of tc filter
  sctp: fix some type cast warnings introduced since very beginning
  sctp: fix a type cast warnings that causes a_rwnd gets the wrong value
  sctp: fix some type cast warnings introduced by transport rhashtable
  sctp: fix some type cast warnings introduced by stream reconf
  ...
parents 25a5d23b 6c325f4e
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -342,7 +342,7 @@ static int sun4i_can_start(struct net_device *dev)


	/* enter the selected mode */
	/* enter the selected mode */
	mod_reg_val = readl(priv->base + SUN4I_REG_MSEL_ADDR);
	mod_reg_val = readl(priv->base + SUN4I_REG_MSEL_ADDR);
	if (priv->can.ctrlmode & CAN_CTRLMODE_PRESUME_ACK)
	if (priv->can.ctrlmode & CAN_CTRLMODE_LOOPBACK)
		mod_reg_val |= SUN4I_MSEL_LOOPBACK_MODE;
		mod_reg_val |= SUN4I_MSEL_LOOPBACK_MODE;
	else if (priv->can.ctrlmode & CAN_CTRLMODE_LISTENONLY)
	else if (priv->can.ctrlmode & CAN_CTRLMODE_LISTENONLY)
		mod_reg_val |= SUN4I_MSEL_LISTEN_ONLY_MODE;
		mod_reg_val |= SUN4I_MSEL_LISTEN_ONLY_MODE;
@@ -811,7 +811,6 @@ static int sun4ican_probe(struct platform_device *pdev)
	priv->can.ctrlmode_supported = CAN_CTRLMODE_BERR_REPORTING |
	priv->can.ctrlmode_supported = CAN_CTRLMODE_BERR_REPORTING |
				       CAN_CTRLMODE_LISTENONLY |
				       CAN_CTRLMODE_LISTENONLY |
				       CAN_CTRLMODE_LOOPBACK |
				       CAN_CTRLMODE_LOOPBACK |
				       CAN_CTRLMODE_PRESUME_ACK |
				       CAN_CTRLMODE_3_SAMPLES;
				       CAN_CTRLMODE_3_SAMPLES;
	priv->base = addr;
	priv->base = addr;
	priv->clk = clk;
	priv->clk = clk;
+8 −1
Original line number Original line Diff line number Diff line
@@ -137,6 +137,7 @@ static inline bool kvaser_is_usbcan(const struct usb_device_id *id)
#define CMD_RESET_ERROR_COUNTER		49
#define CMD_RESET_ERROR_COUNTER		49
#define CMD_TX_ACKNOWLEDGE		50
#define CMD_TX_ACKNOWLEDGE		50
#define CMD_CAN_ERROR_EVENT		51
#define CMD_CAN_ERROR_EVENT		51
#define CMD_FLUSH_QUEUE_REPLY		68


#define CMD_LEAF_USB_THROTTLE		77
#define CMD_LEAF_USB_THROTTLE		77
#define CMD_LEAF_LOG_MESSAGE		106
#define CMD_LEAF_LOG_MESSAGE		106
@@ -1301,6 +1302,11 @@ static void kvaser_usb_handle_message(const struct kvaser_usb *dev,
			goto warn;
			goto warn;
		break;
		break;


	case CMD_FLUSH_QUEUE_REPLY:
		if (dev->family != KVASER_LEAF)
			goto warn;
		break;

	default:
	default:
warn:		dev_warn(dev->udev->dev.parent,
warn:		dev_warn(dev->udev->dev.parent,
			 "Unhandled message (%d)\n", msg->id);
			 "Unhandled message (%d)\n", msg->id);
@@ -1609,7 +1615,8 @@ static int kvaser_usb_close(struct net_device *netdev)
	if (err)
	if (err)
		netdev_warn(netdev, "Cannot flush queue, error %d\n", err);
		netdev_warn(netdev, "Cannot flush queue, error %d\n", err);


	if (kvaser_usb_send_simple_msg(dev, CMD_RESET_CHIP, priv->channel))
	err = kvaser_usb_send_simple_msg(dev, CMD_RESET_CHIP, priv->channel);
	if (err)
		netdev_warn(netdev, "Cannot reset card, error %d\n", err);
		netdev_warn(netdev, "Cannot reset card, error %d\n", err);


	err = kvaser_usb_stop_chip(priv);
	err = kvaser_usb_stop_chip(priv);
+4 −5
Original line number Original line Diff line number Diff line
@@ -1824,11 +1824,12 @@ static void e1000_get_ethtool_stats(struct net_device *netdev,
{
{
	struct e1000_adapter *adapter = netdev_priv(netdev);
	struct e1000_adapter *adapter = netdev_priv(netdev);
	int i;
	int i;
	char *p = NULL;
	const struct e1000_stats *stat = e1000_gstrings_stats;
	const struct e1000_stats *stat = e1000_gstrings_stats;


	e1000_update_stats(adapter);
	e1000_update_stats(adapter);
	for (i = 0; i < E1000_GLOBAL_STATS_LEN; i++) {
	for (i = 0; i < E1000_GLOBAL_STATS_LEN; i++, stat++) {
		char *p;

		switch (stat->type) {
		switch (stat->type) {
		case NETDEV_STATS:
		case NETDEV_STATS:
			p = (char *)netdev + stat->stat_offset;
			p = (char *)netdev + stat->stat_offset;
@@ -1839,15 +1840,13 @@ static void e1000_get_ethtool_stats(struct net_device *netdev,
		default:
		default:
			WARN_ONCE(1, "Invalid E1000 stat type: %u index %d\n",
			WARN_ONCE(1, "Invalid E1000 stat type: %u index %d\n",
				  stat->type, i);
				  stat->type, i);
			break;
			continue;
		}
		}


		if (stat->sizeof_stat == sizeof(u64))
		if (stat->sizeof_stat == sizeof(u64))
			data[i] = *(u64 *)p;
			data[i] = *(u64 *)p;
		else
		else
			data[i] = *(u32 *)p;
			data[i] = *(u32 *)p;

		stat++;
	}
	}
/* BUG_ON(i != E1000_STATS_LEN); */
/* BUG_ON(i != E1000_STATS_LEN); */
}
}
+9 −2
Original line number Original line Diff line number Diff line
@@ -520,8 +520,6 @@ void e1000_down(struct e1000_adapter *adapter)
	struct net_device *netdev = adapter->netdev;
	struct net_device *netdev = adapter->netdev;
	u32 rctl, tctl;
	u32 rctl, tctl;


	netif_carrier_off(netdev);

	/* disable receives in the hardware */
	/* disable receives in the hardware */
	rctl = er32(RCTL);
	rctl = er32(RCTL);
	ew32(RCTL, rctl & ~E1000_RCTL_EN);
	ew32(RCTL, rctl & ~E1000_RCTL_EN);
@@ -537,6 +535,15 @@ void e1000_down(struct e1000_adapter *adapter)
	E1000_WRITE_FLUSH();
	E1000_WRITE_FLUSH();
	msleep(10);
	msleep(10);


	/* Set the carrier off after transmits have been disabled in the
	 * hardware, to avoid race conditions with e1000_watchdog() (which
	 * may be running concurrently to us, checking for the carrier
	 * bit to decide whether it should enable transmits again). Such
	 * a race condition would result into transmission being disabled
	 * in the hardware until the next IFF_DOWN+IFF_UP cycle.
	 */
	netif_carrier_off(netdev);

	napi_disable(&adapter->napi);
	napi_disable(&adapter->napi);


	e1000_irq_disable(adapter);
	e1000_irq_disable(adapter);
+2 −1
Original line number Original line Diff line number Diff line
@@ -2102,6 +2102,7 @@ static int i40e_clean_rx_irq(struct i40e_ring *rx_ring, int budget)


		if (unlikely(i40e_rx_is_programming_status(qword))) {
		if (unlikely(i40e_rx_is_programming_status(qword))) {
			i40e_clean_programming_status(rx_ring, rx_desc, qword);
			i40e_clean_programming_status(rx_ring, rx_desc, qword);
			cleaned_count++;
			continue;
			continue;
		}
		}
		size = (qword & I40E_RXD_QW1_LENGTH_PBUF_MASK) >>
		size = (qword & I40E_RXD_QW1_LENGTH_PBUF_MASK) >>
@@ -2269,7 +2270,7 @@ static inline void i40e_update_enable_itr(struct i40e_vsi *vsi,
		goto enable_int;
		goto enable_int;
	}
	}


	if (ITR_IS_DYNAMIC(tx_itr_setting)) {
	if (ITR_IS_DYNAMIC(rx_itr_setting)) {
		rx = i40e_set_new_dynamic_itr(&q_vector->rx);
		rx = i40e_set_new_dynamic_itr(&q_vector->rx);
		rxval = i40e_buildreg_itr(I40E_RX_ITR, q_vector->rx.itr);
		rxval = i40e_buildreg_itr(I40E_RX_ITR, q_vector->rx.itr);
	}
	}
Loading