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

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

 1) Fix RTNL locking in batman-adv, from Matthias Schiffer.

 2) Don't allow non-passthrough macvlan devices to set NOPROMISC via
    netlink, otherwise we can end up with corrupted promisc counter
    values on the device.  From Michael S Tsirkin.

 3) Fix stmmac driver build with debugging defines enabled, from Dinh
    Nguyen.

 4) Make sure name string we give in socket address in AF_PACKET is NULL
    terminated, from Daniel Borkmann.

 5) Fix leaking of two uninitialized bytes of memory to userspace in
    l2tp, from Guillaume Nault.

 6) Clear IPCB(skb) before tunneling otherwise we touch dangling IP
    options state and crash.  From Saurabh Mohan.

 7) Fix suspend/resume for davinci_mdio by using suspend_late and
    resume_early.  From Mugunthan V N.

 8) Don't tag ip_tunnel_init_net and ip_tunnel_delete_net with
    __net_{init,exit}, they can be called outside of those contexts.
    From Eric Dumazet.

 9) Fix RX length error in sh_eth driver, from Yoshihiro Shimoda.

10) Fix missing sctp_outq initialization in some code paths of SCTP
    stack, from Neil Horman.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (21 commits)
  sctp: fully initialize sctp_outq in sctp_outq_init
  netiucv: Hold rtnl between name allocation and device registration.
  tulip: Properly check dma mapping result
  net: sh_eth: fix incorrect RX length error if R8A7740
  ip_tunnel: remove __net_init/exit from exported functions
  drivers: net: davinci_mdio: restore mdio clk divider in mdio resume
  drivers: net: davinci_mdio: moving mdio resume earlier than cpsw ethernet driver
  net/ipv4: ip_vti clear skb cb before tunneling.
  tg3: Wait for boot code to finish after power on
  l2tp: Fix sendmsg() return value
  l2tp: Fix PPP header erasure and memory leak
  bonding: fix igmp_retrans type and two related races
  bonding: reset master mac on first enslave failure
  packet: packet_getname_spkt: make sure string is always 0-terminated
  net: ethernet: stmicro: stmmac: Fix compile error when STMMAC_XMIT_DEBUG used
  be2net: Fix 32-bit DMA Mask handling
  xen-netback: don't de-reference vif pointer after having called xenvif_put()
  macvlan: don't touch promisc without passthrough
  batman-adv: Don't handle address updates when bla is disabled
  batman-adv: forward late OGMs from best next hop
  ...
parents 5938930e c5c7774d
Loading
Loading
Loading
Loading
+15 −4
Original line number Diff line number Diff line
@@ -764,8 +764,8 @@ static void bond_resend_igmp_join_requests(struct bonding *bond)
	struct net_device *bond_dev, *vlan_dev, *upper_dev;
	struct vlan_entry *vlan;

	rcu_read_lock();
	read_lock(&bond->lock);
	rcu_read_lock();

	bond_dev = bond->dev;

@@ -787,12 +787,19 @@ static void bond_resend_igmp_join_requests(struct bonding *bond)
		if (vlan_dev)
			__bond_resend_igmp_join_requests(vlan_dev);
	}
	rcu_read_unlock();

	if (--bond->igmp_retrans > 0)
	/* We use curr_slave_lock to protect against concurrent access to
	 * igmp_retrans from multiple running instances of this function and
	 * bond_change_active_slave
	 */
	write_lock_bh(&bond->curr_slave_lock);
	if (bond->igmp_retrans > 1) {
		bond->igmp_retrans--;
		queue_delayed_work(bond->wq, &bond->mcast_work, HZ/5);

	}
	write_unlock_bh(&bond->curr_slave_lock);
	read_unlock(&bond->lock);
	rcu_read_unlock();
}

static void bond_resend_igmp_join_requests_delayed(struct work_struct *work)
@@ -1957,6 +1964,10 @@ err_free:

err_undo_flags:
	bond_compute_features(bond);
	/* Enslave of first slave has failed and we need to fix master's mac */
	if (bond->slave_cnt == 0 &&
	    ether_addr_equal(bond_dev->dev_addr, slave_dev->dev_addr))
		eth_hw_addr_random(bond_dev);

	return res;
}
+1 −1
Original line number Diff line number Diff line
@@ -225,7 +225,7 @@ struct bonding {
	rwlock_t curr_slave_lock;
	u8	 send_peer_notif;
	s8	 setup_by_slave;
	s8       igmp_retrans;
	u8       igmp_retrans;
#ifdef CONFIG_PROC_FS
	struct   proc_dir_entry *proc_entry;
	char     proc_file_name[IFNAMSIZ];
+10 −0
Original line number Diff line number Diff line
@@ -1800,6 +1800,9 @@ static int tg3_poll_fw(struct tg3 *tp)
	int i;
	u32 val;

	if (tg3_flag(tp, NO_FWARE_REPORTED))
		return 0;

	if (tg3_flag(tp, IS_SSB_CORE)) {
		/* We don't use firmware. */
		return 0;
@@ -10404,6 +10407,13 @@ static int tg3_reset_hw(struct tg3 *tp, bool reset_phy)
 */
static int tg3_init_hw(struct tg3 *tp, bool reset_phy)
{
	/* Chip may have been just powered on. If so, the boot code may still
	 * be running initialization. Wait for it to finish to avoid races in
	 * accessing the hardware.
	 */
	tg3_enable_register_access(tp);
	tg3_poll_fw(tp);

	tg3_switch_clocks(tp);

	tw32(TG3PCI_MEM_WIN_BASE_ADDR, 0);
+6 −0
Original line number Diff line number Diff line
@@ -76,6 +76,12 @@ int tulip_refill_rx(struct net_device *dev)

			mapping = pci_map_single(tp->pdev, skb->data, PKT_BUF_SZ,
						 PCI_DMA_FROMDEVICE);
			if (dma_mapping_error(&tp->pdev->dev, mapping)) {
				dev_kfree_skb(skb);
				tp->rx_buffers[entry].skb = NULL;
				break;
			}

			tp->rx_buffers[entry].mapping = mapping;

			tp->rx_ring[entry].buffer1 = cpu_to_le32(mapping);
+3 −0
Original line number Diff line number Diff line
@@ -4262,6 +4262,9 @@ static int be_probe(struct pci_dev *pdev, const struct pci_device_id *pdev_id)
		netdev->features |= NETIF_F_HIGHDMA;
	} else {
		status = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32));
		if (!status)
			status = dma_set_coherent_mask(&pdev->dev,
						       DMA_BIT_MASK(32));
		if (status) {
			dev_err(&pdev->dev, "Could not set PCI DMA Mask\n");
			goto free_netdev;
Loading