linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT] Networking
@ 2014-09-07 23:41 David Miller
  2014-09-08 21:25 ` Macvlan WARNiNGS about duplicate sysfs filenames (Was [GIT] Networking) Andres Freund, Alexander Y. Fomichev
  0 siblings, 1 reply; 8+ messages in thread
From: David Miller @ 2014-09-07 23:41 UTC (permalink / raw)
  To: torvalds; +Cc: akpm, netdev, linux-kernel


1) Fix skb leak in mac802154, from Martin Townsend.

2) Use select not depends on NF_NAT for NFT_NAT, from Pablo Neira Ayuso.

3) Fix union initializer bogosity in vxlan, from Gerhard Stenzel.

4) Fix RX checksum configuration in stmmac driver, from Giuseppe
   CAVALLARO.

5) Fix TSO with non-accelerated VLANs in e1000, e1000e, bna, ehea, i40e,
   i40evf, mvneta, and qlge, from Vlad Yasevich.

6) Fix capability checks in phy_init_eee(), from Giuseppe CAVALLARO.

7) Try high order allocations more sanely for SKBs, specifically if a high
   order allocation fails, fall back directly to zero order pages rather than
   iterating down one order at a time.  From Eric Dumazet.

8) Fix a memory leak in openvswitch, from Li RongQing.

9) amd-xgbe initializes wrong spinlock, from Thomas Lendacky.

10) RTNL locking was busted in setsockopt for anycast and multicast, fix
    from Sabrina Dubroca.

11) Fix peer address refcount leak in ipv6, from Nicolas Dichtel.

12) DocBook typo fixes, from Masanari Iida.

Please pull, thanks a lot!

The following changes since commit 451fd72219dd6f3355e2d036c598544c760ee532:

  Merge tag 'pwm/for-3.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm (2014-08-22 14:50:21 -0700)

are available in the git repository at:


  git://git.kernel.org/pub/scm/linux/kernel/git/davem/net master

for you to fetch changes up to 45ce829dd010668c3839a61b25843590eb4677dc:

  Merge tag 'master-2014-09-04' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless (2014-09-07 16:11:10 -0700)

----------------------------------------------------------------

Alexander Aring (2):
      ieee802154: 6lowpan_rtnl: fix correct errno value
      ieee802154: 6lowpan: ensure of sending 1280 packets

Alexander Y. Fomichev (1):
      net: prevent of emerging cross-namespace symlinks

Alexey Khoroshilov (1):
      at76c50x-usb: fix use after free on failure path in at76_probe()

Andy King (1):
      VMXNET3: Check for map error in vmxnet3_set_mc

Anish Bhatt (1):
      cnic : Cleanup CONFIG_IPV6 & VLAN check

Bartlomiej Zolnierkiewicz (2):
      net: sh_eth: fix driver dependencies
      net: calxedaxgmac: fix driver dependencies

Bob Copeland (1):
      mac80211: mesh_plink: handle confirm frames with new plid

Chen Gang (1):
      drivers/net/fddi/skfp/h/skfbi.h: Remove useless PCI_BASE_2ND macros

Daniel Borkmann (2):
      netfilter: x_tables: allow to use default cgroup match
      net: sctp: fix ABI mismatch through sctp_assoc_to_state helper

Daniel Hellstrom (1):
      greth: moved TX ring cleaning to NAPI rx poll func

David S. Miller (10):
      Merge branch 'tso_fix'
      mvneta: Add missing if_vlan.h include.
      Merge branch 'mlx4-net'
      Merge branch 'stmmac-eee'
      Merge tag 'master-2014-08-25' of git://git.kernel.org/.../linville/wireless
      Merge branch 'amd-xgbe-net'
      Merge branch 'cxgb4'
      Merge git://git.kernel.org/.../pablo/nf
      Merge branch 'amd-xgbe-net'
      Merge tag 'master-2014-09-04' of git://git.kernel.org/.../linville/wireless

Denton Gentry (1):
      mac80211: fix start_seq_num in Rx reorder offload

Eliad Peller (1):
      regulatory: add NUL to alpha2

Emmanuel Grumbach (2):
      Revert "iwlwifi: dvm: don't enable CTS to self"
      iwlwifi: bump firmware API version to 10 for 7000 and 8000

Eric Dumazet (1):
      net: attempt a single high order allocation

Eugene Crosser (1):
      qeth: don't query for info if hardware not ready.

Felix Fietkau (2):
      mac80211: ignore AP_VLAN in ieee80211_recalc_chanctx_chantype
      mac80211: fix smps mode check for AP_VLAN

Geert Uytterhoeven (1):
      drivers: net: NET_XGENE should depend on HAS_DMA

Gerhard Stenzel (1):
      vxlan: fix incorrect initializer in union vxlan_addr

Giuseppe CAVALLARO (11):
      stmmac: fix rx checksum programming
      stmmac: set ptp_clock to NULL while unregister
      phy: fix EEE checks inside the phy_init_eee.
      stmmac: prevent false carrier sense detection
      stmmac: fix tipo on mmc crc error
      stmmac: ptp: fix the reference clock
      stmmac: fix dma api misuse
      stmmac: never check EEE in case of a switch is attached
      stmmac: fix PLS bit setting when EEE is active
      stmmac: fix the rx csum feature
      stmmac: only remove RXCSUM feature if no rx coe is available

Guillaume Nault (1):
      l2tp: fix race while getting PMTU on PPP pseudo-wire

Hariprasad Shenai (6):
      cxgb4: Fix for handling 1Gb/s SFP+ Transceiver Modules
      cxgb4: Fixed the code to use correct length for part number
      cxgb4: Fix T5 adapter accessing T4 adapter registers
      cxgb4: Detect and display firmware reported errors
      cxgb4: Avoid dumping Write-only registers in register dump
      cxgb4: Issue mbox commands on correct mbox

Hauke Mehrtens (1):
      bcma: add PCI ID for spromless BCM43217

Himangi Saraogi (1):
      rtlwifi: btcoexist: adjust double test

Ivan Vecera (1):
      tg3: prevent ifup/ifdown during PCI error recovery

Johan Hedberg (1):
      Bluetooth: Fix hci_conn reference counting for auto-connections

Johannes Berg (2):
      Revert "mac80211: disable uAPSD if all ACs are under ACM"
      mac80211: fix agg_status debugfs file alignment

John W. Linville (3):
      Merge branch 'for-upstream' of git://git.kernel.org/.../bluetooth/bluetooth
      Merge tag 'mac80211-for-john-2014-08-29' of git://git.kernel.org/.../jberg/mac80211
      Merge branch 'for-john' of git://git.kernel.org/.../iwlwifi/iwlwifi-fixes

Jonas Jensen (4):
      net: moxa: clear DESC1 on ndo_start_xmit()
      net: moxa: replace build_skb() with netdev_alloc_skb_ip_align() / memcpy()
      net: moxa: synchronize DMA memory
      net: moxa: continue loop on skb allocation failure

Julian Anastasov (2):
      ipvs: properly declare tunnel encapsulation
      ipvs: fix ipv6 hook registration for local replies

Larry Finger (1):
      rtlwifi: rtl8192cu: Add new ID

Lendacky, Thomas (7):
      amd-xgbe: Check for Tx hardware queue flushing support
      amd-xgbe: Reported fifo size from hardware is not correct
      amd-xgbe: Fix the xpcs mmd debugfs support
      amd-xgbe: Use the Tx queue count for Tx flow control support
      amd-xgbe: Fix initialization of the wrong spin lock
      amd-xgbe: Treat certain counter registers as 64 bit
      amd-xgbe: Enable interrupts for all management counters

Li RongQing (2):
      openvswitch: fix a memory leak
      openvswitch: distinguish between the dropped and consumed skb

Maks Naumov (1):
      ath9k: fix wrong string size for strncmp in write_file_spec_scan_ctl()

Manish Chopra (1):
      bnx2x: Configure device endianity on driver load and reset endianity on removal.

Marcel Holtmann (1):
      iwlwifi: Remove module build requirement for Intel Wireless WiFi

Martin Townsend (3):
      mac802154: fixed potential skb leak with mac802154_parse_frame_start
      ieee802154: mac802154: handle the reserved dest mode by dropping the packet
      ieee802154: 6lowpan: ensure MTU of 1280 for 6lowpan

Masanari Iida (1):
      net: treewide: Fix typo found in DocBook/networking.xml

Michal Kubeček (1):
      net: fix checksum features handling in netif_skb_features()

Mika Westerberg (1):
      net: rfkill: gpio: Add more Broadcom bluetooth ACPI IDs

Neil Horman (1):
      3c59x: avoid panic in boomerang_start_xmit when finding page address:

Nicolas Dichtel (2):
      ipv6: fix a refcnt leak with peer addr
      ipv6: use addrconf_get_prefix_route() to remove peer addr

Or Gerlitz (2):
      net/mlx4: Move the tunnel steering helper function to mlx4_core
      mlx4: Set user-space raw Ethernet QPs to properly handle VXLAN traffic

Pablo Neira (1):
      netfilter: fix missing dependencies in NETFILTER_XT_TARGET_LOG

Pablo Neira Ayuso (4):
      netfilter: move NAT Kconfig switches out of the iptables scope
      netfilter: nf_tables: nat expression must select CONFIG_NF_NAT
      netfilter: NETFILTER_XT_TARGET_LOG selects NF_LOG_*
      netfilter: add explicit Kconfig for NETFILTER_XT_NAT

Roland Stigge (1):
      net: lpc_eth: Fix crash on ip link up

Sabrina Dubroca (1):
      ipv6: fix rtnl locking in setsockopt for anycast and multicast

Vlad Yasevich (8):
      e1000e: Fix TSO with non-accelerated vlans
      e1000: Fix TSO for non-accelerated vlan traffic
      bna: Support TSO and partial checksum with non-accelerated vlans.
      ehea: Fix TSO and hw checksums with non-accelerated vlan packets.
      i40e: Fix TSO and hw checksums for non-accelerated vlan packets.
      i40evf: Fix TSO and hw checksums for non-accelerated vlan packets.
      mvneta: Fix TSO and checksum for non-acceleration vlan traffic
      qlge: Fix TSO for non-accelerated vlan traffic

WANG Cong (1):
      ipv6: restore the behavior of ipv6_sock_ac_drop()

Wei Liu (1):
      xen-netback: move netif_napi_add before binding interrupt

Willem de Bruijn (1):
      net-timestamp: only report sw timestamp if reporting bit is set

Yaniv Rosner (1):
      bnx2x: Fix link problems for 1G SFP RJ45 module

Zhouyi Zhou (1):
      netfilter: HAVE_JUMP_LABEL instead of CONFIG_JUMP_LABEL

nandini sharma (2):
      stmmac: fix the EEE LPI Macro definitions.
      stmmac: fix LPI TW timer value to 20.5us.

Álvaro Fernández Rojas (1):
      ssb: add PCI ID 0x4351

 Documentation/devicetree/bindings/net/stmmac.txt      |   4 ++
 drivers/bcma/host_pci.c                               |   1 +
 drivers/infiniband/hw/mlx4/main.c                     |  30 +++++++++
 drivers/infiniband/hw/mlx4/qp.c                       |   8 ++-
 drivers/net/ethernet/3com/3c59x.c                     |   8 +--
 drivers/net/ethernet/aeroflex/greth.c                 |  86 +++++++++++++-----------
 drivers/net/ethernet/aeroflex/greth.h                 |   2 +-
 drivers/net/ethernet/amd/xgbe/xgbe-debugfs.c          |   8 +--
 drivers/net/ethernet/amd/xgbe/xgbe-dev.c              | 209 +++++++++++++++++++++++++++++++++------------------------
 drivers/net/ethernet/amd/xgbe/xgbe-drv.c              |   2 +
 drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c          |   7 +-
 drivers/net/ethernet/amd/xgbe/xgbe-main.c             |   2 +-
 drivers/net/ethernet/amd/xgbe/xgbe.h                  |   4 ++
 drivers/net/ethernet/apm/xgene/Kconfig                |   1 +
 drivers/net/ethernet/broadcom/Kconfig                 |   2 +-
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_hsi.h       |   7 +-
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c      |  74 +++++++++++---------
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.h      |   5 +-
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c      |  57 +++++++++++-----
 drivers/net/ethernet/broadcom/cnic.c                  |   4 +-
 drivers/net/ethernet/broadcom/tg3.c                   |  16 +++++
 drivers/net/ethernet/broadcom/tg3.h                   |   1 +
 drivers/net/ethernet/brocade/bna/bnad.c               |   7 +-
 drivers/net/ethernet/calxeda/Kconfig                  |   1 +
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c       |  16 +++--
 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c            |  79 ++++++++++++++++++----
 drivers/net/ethernet/chelsio/cxgb4/t4_regs.h          |   2 +
 drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h         |   4 ++
 drivers/net/ethernet/ibm/ehea/ehea_main.c             |   2 +-
 drivers/net/ethernet/intel/e1000/e1000_main.c         |  19 +++---
 drivers/net/ethernet/intel/e1000e/netdev.c            |  21 +++---
 drivers/net/ethernet/intel/i40e/i40e_txrx.c           |   2 +-
 drivers/net/ethernet/intel/i40evf/i40e_txrx.c         |   2 +-
 drivers/net/ethernet/marvell/mvneta.c                 |   8 ++-
 drivers/net/ethernet/mellanox/mlx4/en_netdev.c        |  31 +--------
 drivers/net/ethernet/mellanox/mlx4/mcg.c              |  38 +++++++++++
 drivers/net/ethernet/moxa/moxart_ether.c              |  34 +++++-----
 drivers/net/ethernet/nxp/lpc_eth.c                    |   3 +
 drivers/net/ethernet/qlogic/qlge/qlge_main.c          |   5 +-
 drivers/net/ethernet/renesas/Kconfig                  |   1 +
 drivers/net/ethernet/stmicro/stmmac/chain_mode.c      |  14 ++--
 drivers/net/ethernet/stmicro/stmmac/common.h          |  13 ++--
 drivers/net/ethernet/stmicro/stmmac/dwmac1000.h       |   2 +-
 drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c  |   6 +-
 drivers/net/ethernet/stmicro/stmmac/mmc.h             |   2 +-
 drivers/net/ethernet/stmicro/stmmac/mmc_core.c        |   2 +-
 drivers/net/ethernet/stmicro/stmmac/ring_mode.c       |  15 +++--
 drivers/net/ethernet/stmicro/stmmac/stmmac.h          |   9 ++-
 drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c  |   2 +-
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c     | 142 +++++++++++++++++++++++++++++----------
 drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c      |   1 +
 drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.h      |   2 -
 drivers/net/fddi/skfp/h/skfbi.h                       |   5 --
 drivers/net/phy/phy.c                                 |  18 ++---
 drivers/net/vmxnet3/vmxnet3_drv.c                     |  15 +++--
 drivers/net/vmxnet3/vmxnet3_int.h                     |   4 +-
 drivers/net/vxlan.c                                   |   8 +--
 drivers/net/wireless/at76c50x-usb.c                   |   3 +-
 drivers/net/wireless/ath/ath9k/spectral.c             |   2 +-
 drivers/net/wireless/iwlwifi/Kconfig                  |   2 -
 drivers/net/wireless/iwlwifi/dvm/rxon.c               |  12 ++++
 drivers/net/wireless/iwlwifi/iwl-7000.c               |   4 +-
 drivers/net/wireless/iwlwifi/iwl-8000.c               |   2 +-
 drivers/net/wireless/rtlwifi/btcoexist/halbtcoutsrc.c |   2 +-
 drivers/net/wireless/rtlwifi/rtl8192cu/sw.c           |   1 +
 drivers/net/xen-netback/interface.c                   |   6 +-
 drivers/s390/net/qeth_core.h                          |   1 +
 drivers/s390/net/qeth_core_main.c                     |  16 ++++-
 drivers/s390/net/qeth_l2_sys.c                        |   7 +-
 drivers/ssb/b43_pci_bridge.c                          |   1 +
 include/linux/mlx4/device.h                           |   3 +
 include/linux/netdevice.h                             |   4 +-
 include/linux/netfilter.h                             |   5 +-
 include/net/bluetooth/hci_core.h                      |   2 +
 include/net/netns/ieee802154_6lowpan.h                |   1 -
 include/net/regulatory.h                              |   2 +-
 include/net/sctp/sctp.h                               |  13 ++++
 include/net/sock.h                                    |   4 +-
 include/net/wimax.h                                   |   2 +-
 include/trace/events/irq.h                            |   4 +-
 net/bluetooth/hci_conn.c                              |   8 +++
 net/bluetooth/hci_core.c                              |  14 +++-
 net/bluetooth/hci_event.c                             |  17 ++++-
 net/core/datagram.c                                   |   2 +-
 net/core/dev.c                                        |  77 +++++++++++++++++++--
 net/core/gen_estimator.c                              |   2 +-
 net/core/gen_stats.c                                  |   2 +-
 net/core/skbuff.c                                     |   4 +-
 net/core/sock.c                                       |  34 +++++-----
 net/ieee802154/6lowpan_rtnl.c                         |   4 +-
 net/ieee802154/reassembly.c                           |  15 +----
 net/ipv4/netfilter/Kconfig                            | 102 +++++++++++++++-------------
 net/ipv4/netfilter/Makefile                           |   2 +-
 net/ipv6/addrconf.c                                   |  29 +++-----
 net/ipv6/anycast.c                                    |  10 +++
 net/ipv6/mcast.c                                      |  14 ++++
 net/ipv6/netfilter/Kconfig                            |  28 +++++---
 net/ipv6/netfilter/Makefile                           |   2 +-
 net/l2tp/l2tp_ppp.c                                   |   3 +-
 net/mac80211/chan.c                                   |   2 +
 net/mac80211/debugfs_sta.c                            |   2 +-
 net/mac80211/iface.c                                  |   4 +-
 net/mac80211/mesh_plink.c                             |   7 +-
 net/mac80211/mlme.c                                   |   3 +-
 net/mac80211/sta_info.c                               |   7 +-
 net/mac802154/wpan.c                                  |   6 +-
 net/netfilter/Kconfig                                 |  14 +++-
 net/netfilter/Makefile                                |   2 +-
 net/netfilter/core.c                                  |   6 +-
 net/netfilter/ipvs/ip_vs_core.c                       |   2 +-
 net/netfilter/ipvs/ip_vs_xmit.c                       |  20 ++++--
 net/netfilter/xt_cgroup.c                             |   2 +-
 net/openvswitch/datapath.c                            |  11 ++-
 net/rfkill/rfkill-gpio.c                              |   1 +
 net/sctp/socket.c                                     |   2 +-
 net/socket.c                                          |   5 +-
 116 files changed, 1082 insertions(+), 555 deletions(-)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Macvlan WARNiNGS about duplicate sysfs filenames (Was [GIT] Networking)
  2014-09-07 23:41 [GIT] Networking David Miller
@ 2014-09-08 21:25 ` Andres Freund, Alexander Y. Fomichev
  2014-09-09 22:43   ` Cong Wang
  0 siblings, 1 reply; 8+ messages in thread
From: Andres Freund, Alexander Y. Fomichev @ 2014-09-08 21:25 UTC (permalink / raw)
  To: David Miller; +Cc: torvalds, akpm, netdev, linux-kernel

Hi,

(don't have netdev archived, thus answering here, sorry)

On 2014-09-07 16:41:09 -0700, David Miller wrote:
> Alexander Y. Fomichev (1):
>       net: prevent of emerging cross-namespace symlinks

I'm seeing WARNINGs like:
[ 1005.269134] ------------[ cut here ]------------
[ 1005.269148] WARNING: CPU: 6 PID: 4213 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x64/0x80()
[ 1005.269150] sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:1c.4/0000:03:00.0/net/eth0/upper_mv-eth0'
[ 1005.269152] Modules linked in: nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack ipt_REJECT iptable_filter ip_tables snd_hda_code
c_ca0110 snd_hda_codec_realtek snd_hda_codec_generic snd_hda_codec_hdmi snd_hda_intel snd_hda_controller snd_hda_codec snd_hwdep snd_pcm acpi
_cpufreq w83793 jc42 e1000e ptp pps_core
[ 1005.269175] CPU: 6 PID: 4213 Comm: systemd-nspawn Tainted: G        W I    3.17.0-rc4-andres-00135-g35af256 #216
[ 1005.269178] Hardware name: empty empty/S7020, BIOS 'V1.03  ' 03/09/2010
[ 1005.269180]  0000000000000009 ffff8803300b3738 ffffffff81cc0ca2 ffff8803300b3780
[ 1005.269183]  ffff8803300b3770 ffffffff8111434d ffff88062ce1a000 ffff8803300b3851
[ 1005.269186]  ffff88032e5d4c30 ffff88032e5d4c30 ffffffffffffffef ffff8803300b37d0
[ 1005.269190] Call Trace:
[ 1005.269198]  [<ffffffff81cc0ca2>] dump_stack+0x45/0x56
[ 1005.269203]  [<ffffffff8111434d>] warn_slowpath_common+0x7d/0xa0
[ 1005.269206]  [<ffffffff811143bc>] warn_slowpath_fmt+0x4c/0x50
[ 1005.269209]  [<ffffffff812c5dc8>] ? kernfs_path+0x48/0x60
[ 1005.269213]  [<ffffffff812c9464>] sysfs_warn_dup+0x64/0x80
[ 1005.269216]  [<ffffffff812c97be>] sysfs_do_create_link_sd.isra.2+0x9e/0xb0
[ 1005.269219]  [<ffffffff812c97f5>] sysfs_create_link+0x25/0x50
[ 1005.269227]  [<ffffffff81b73238>] netdev_adjacent_sysfs_add+0x58/0x70
[ 1005.269232]  [<ffffffff81b75ebd>] __netdev_adjacent_dev_insert+0x15d/0x1b0
[ 1005.269236]  [<ffffffff81b75f41>] __netdev_adjacent_dev_link_lists+0x31/0x80
[ 1005.269240]  [<ffffffff81b760e6>] __netdev_upper_dev_link+0x156/0x480
[ 1005.269245]  [<ffffffff81b70cb5>] ? call_netdevice_notifiers_info+0x35/0x60
[ 1005.269250]  [<ffffffff81b76422>] netdev_upper_dev_link+0x12/0x20
[ 1005.269257]  [<ffffffff819b7822>] macvlan_common_newlink+0x182/0x3f0
[ 1005.269261]  [<ffffffff819b7a9e>] macvlan_newlink+0xe/0x10
[ 1005.269267]  [<ffffffff81b87cf4>] rtnl_newlink+0x6d4/0x790
[ 1005.269270]  [<ffffffff81b8779f>] ? rtnl_newlink+0x17f/0x790
[ 1005.269278]  [<ffffffff81b86722>] rtnetlink_rcv_msg+0x92/0x260
[ 1005.269284]  [<ffffffff81247e71>] ? __kmalloc_node_track_caller+0x181/0x210
[ 1005.269294]  [<ffffffff8160e556>] ? rhashtable_lookup_compare+0x36/0x70
[ 1005.269299]  [<ffffffff81b86690>] ? rtnetlink_rcv+0x30/0x30
[ 1005.269307]  [<ffffffff81ba5679>] netlink_rcv_skb+0xa9/0xd0
[ 1005.269312]  [<ffffffff81b86688>] rtnetlink_rcv+0x28/0x30
[ 1005.269316]  [<ffffffff81ba4bda>] netlink_unicast+0x10a/0x1a0
[ 1005.269321]  [<ffffffff81ba508c>] netlink_sendmsg+0x34c/0x780
[ 1005.269328]  [<ffffffff811fc2c6>] ? free_hot_cold_page_list+0x46/0xa0
[ 1005.269334]  [<ffffffff81b5bb03>] sock_sendmsg+0x73/0x90
[ 1005.269343]  [<ffffffff812228c3>] ? unmap_region+0xd3/0x110
[ 1005.269350]  [<ffffffff81271703>] ? __fdget+0x13/0x20
[ 1005.269355]  [<ffffffff81b5d381>] ? move_addr_to_kernel+0x31/0x90
[ 1005.269360]  [<ffffffff81b5dd23>] SyS_sendto+0x113/0x150
[ 1005.269366]  [<ffffffff81607eab>] ? trace_hardirqs_on_thunk+0x3a/0x3c
[ 1005.269374]  [<ffffffff81cceb56>] system_call_fastpath+0x1a/0x1f
[ 1005.269377] ---[ end trace 00724f5b901e5d10 ]---

which are quite justified:

# readlink -f /sys/devices/pci0000:00/0000:00:1c.4/0000:03:00.0/net/eth0/upper_mv-eth0
/sys/devices/virtual/net/mv-eth0
# ls -l /sys/devices/virtual/net/mv-eth0
ls: cannot access /sys/devices/virtual/net/mv-eth0: No such file or directory

That happened after bringing up mv-eth0 up once, then down, and then up
again. There apparently is a dangling symlink somewhere. I'd done this
via:
systemd-nspawn -b -j -D /home/andres/chroot/sid-amd64 --private-network --network-macvlan=eth0

I haven't used macvlan before, so it's not impossible that the bug has
existed for longer. It's also possible that this bug isn't the fault of
this patch. I think both aren't terribly likely though.

Greetings,

Andres Freund

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Macvlan WARNiNGS about duplicate sysfs filenames (Was [GIT] Networking)
  2014-09-08 21:25 ` Macvlan WARNiNGS about duplicate sysfs filenames (Was [GIT] Networking) Andres Freund, Alexander Y. Fomichev
@ 2014-09-09 22:43   ` Cong Wang
  2014-09-09 23:48     ` Andres Freund
  0 siblings, 1 reply; 8+ messages in thread
From: Cong Wang @ 2014-09-09 22:43 UTC (permalink / raw)
  To: Andres Freund, Alexander Y. Fomichev
  Cc: David Miller, Linus Torvalds, Andrew Morton, netdev, linux-kernel

On Mon, Sep 8, 2014 at 2:25 PM, Andres Freund <andres@anarazel.de> wrote:
> Hi,
>
> (don't have netdev archived, thus answering here, sorry)
>
> On 2014-09-07 16:41:09 -0700, David Miller wrote:
>> Alexander Y. Fomichev (1):
>>       net: prevent of emerging cross-namespace symlinks
>

Since you are quoting this change, are you saying it causes
the following kernel warning?


> I'm seeing WARNINGs like:
> [ 1005.269134] ------------[ cut here ]------------
> [ 1005.269148] WARNING: CPU: 6 PID: 4213 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x64/0x80()
> [ 1005.269150] sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:1c.4/0000:03:00.0/net/eth0/upper_mv-eth0'


Is there a network device named upper_mv-eth0 existed in your system
before you created macvlan?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Macvlan WARNiNGS about duplicate sysfs filenames (Was [GIT] Networking)
  2014-09-09 22:43   ` Cong Wang
@ 2014-09-09 23:48     ` Andres Freund
  2014-09-09 23:55       ` Andres Freund
  0 siblings, 1 reply; 8+ messages in thread
From: Andres Freund @ 2014-09-09 23:48 UTC (permalink / raw)
  To: Cong Wang
  Cc: Alexander Y. Fomichev, David Miller, Linus Torvalds,
	Andrew Morton, netdev, linux-kernel

On 2014-09-09 15:43:55 -0700, Cong Wang wrote:
> On Mon, Sep 8, 2014 at 2:25 PM, Andres Freund <andres@anarazel.de> wrote:
> > Hi,
> >
> > (don't have netdev archived, thus answering here, sorry)
> >
> > On 2014-09-07 16:41:09 -0700, David Miller wrote:
> >> Alexander Y. Fomichev (1):
> >>       net: prevent of emerging cross-namespace symlinks
> >
> 
> Since you are quoting this change, are you saying it causes
> the following kernel warning?

I thought it might be a likely candidate; but I'm not sure at all. I'll
verify it as soon as I can reboot the machine a couple of times (end of
week-ish).

> > I'm seeing WARNINGs like:
> > [ 1005.269134] ------------[ cut here ]------------
> > [ 1005.269148] WARNING: CPU: 6 PID: 4213 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x64/0x80()
> > [ 1005.269150] sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:1c.4/0000:03:00.0/net/eth0/upper_mv-eth0'
> 
> 
> Is there a network device named upper_mv-eth0 existed in your system
> before you created macvlan?

No, there wasn't any. Afaics, the sequence is:
1) macvlan mv-eth0 is created in global namespace
2) mv-eth0 is moved (by systemd-nsspawn) into a new network
   namespace. Leaving a dangling symlink in the host namespace
/devices/pci0000:00/0000:00:1c.4/0000:03:00.0/net/eth0/upper_mv-eth0 pointing toward
../mv-eth0
which doesn't exist in the external namespace. The new namespace seems
to have broken 'lower_bond0' symlink as well

This seems to be the case (and probably the actual root cause) in
slightly earlier kernels as well.
What changed seems to be that:
3) macvlan mv-eth0 is destroyed in the namespace (potentially while
   tearing it down)
4) Now there's a broken symlink that doesn't make sense in any namespace
5) mv-eth0 can't be created anew

It seems that 3-5 didn't happen that way on older kernels. The most
recent where it's not persistently broken is 3.16.0-rc7-00007 -
31dab719f. The oldest where I know it's reproducible is
3.17.0-rc4-andres-00135-g35af256.

Greetings,

Andres Freund

-- 
 Andres Freund	                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Macvlan WARNiNGS about duplicate sysfs filenames (Was [GIT] Networking)
  2014-09-09 23:48     ` Andres Freund
@ 2014-09-09 23:55       ` Andres Freund
  2014-09-10  5:56         ` Alexander Y. Fomichev
  2014-09-10  9:32         ` Alexander Y. Fomichev
  0 siblings, 2 replies; 8+ messages in thread
From: Andres Freund @ 2014-09-09 23:55 UTC (permalink / raw)
  To: Cong Wang
  Cc: Alexander Y. Fomichev, David Miller, Linus Torvalds,
	Andrew Morton, netdev, linux-kernel

On 2014-09-10 01:48:06 +0200, Andres Freund wrote:
> On 2014-09-09 15:43:55 -0700, Cong Wang wrote:
> > On Mon, Sep 8, 2014 at 2:25 PM, Andres Freund <andres@anarazel.de> wrote:
> > > Hi,
> > >
> > > (don't have netdev archived, thus answering here, sorry)
> > >
> > > On 2014-09-07 16:41:09 -0700, David Miller wrote:
> > >> Alexander Y. Fomichev (1):
> > >>       net: prevent of emerging cross-namespace symlinks
> > >
> > 
> > Since you are quoting this change, are you saying it causes
> > the following kernel warning?
> 
> I thought it might be a likely candidate; but I'm not sure at all. I'll
> verify it as soon as I can reboot the machine a couple of times (end of
> week-ish).
> 
> > > I'm seeing WARNINGs like:
> > > [ 1005.269134] ------------[ cut here ]------------
> > > [ 1005.269148] WARNING: CPU: 6 PID: 4213 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x64/0x80()
> > > [ 1005.269150] sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:1c.4/0000:03:00.0/net/eth0/upper_mv-eth0'
> > 
> > 
> > Is there a network device named upper_mv-eth0 existed in your system
> > before you created macvlan?
> 
> No, there wasn't any. Afaics, the sequence is:
> 1) macvlan mv-eth0 is created in global namespace
> 2) mv-eth0 is moved (by systemd-nsspawn) into a new network
>    namespace. Leaving a dangling symlink in the host namespace
> /devices/pci0000:00/0000:00:1c.4/0000:03:00.0/net/eth0/upper_mv-eth0 pointing toward
> ../mv-eth0
> which doesn't exist in the external namespace. The new namespace seems
> to have broken 'lower_bond0' symlink as well
> 
> This seems to be the case (and probably the actual root cause) in
> slightly earlier kernels as well.
> What changed seems to be that:
> 3) macvlan mv-eth0 is destroyed in the namespace (potentially while
>    tearing it down)
> 4) Now there's a broken symlink that doesn't make sense in any namespace
> 5) mv-eth0 can't be created anew
> 
> It seems that 3-5 didn't happen that way on older kernels. The most
> recent where it's not persistently broken is 3.16.0-rc7-00007 -
> 31dab719f. The oldest where I know it's reproducible is
> 3.17.0-rc4-andres-00135-g35af256.

I've reproduced the problem on another machine where it's perfectly
reproducible (except being about mv-bond0). After reverting only the
aforementioned 4c75431ac352063 it works again.
As I said above, I'm not sure whether 4c75431ac352063 is the actual
culprit, but it certainly made the problem visible. How are these
upper_$if/lower_$if supposed to behave when the macvlan and the
underlying device are in differing namespaces?

Greetings,

Andres Freund

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Macvlan WARNiNGS about duplicate sysfs filenames (Was [GIT] Networking)
  2014-09-09 23:55       ` Andres Freund
@ 2014-09-10  5:56         ` Alexander Y. Fomichev
  2014-09-10  9:32         ` Alexander Y. Fomichev
  1 sibling, 0 replies; 8+ messages in thread
From: Alexander Y. Fomichev @ 2014-09-10  5:56 UTC (permalink / raw)
  To: Andres Freund
  Cc: Cong Wang, David Miller, Linus Torvalds, Andrew Morton, netdev,
	linux-kernel

On Wed, Sep 10, 2014 at 3:55 AM, Andres Freund <andres@anarazel.de> wrote:
> On 2014-09-10 01:48:06 +0200, Andres Freund wrote:
>> On 2014-09-09 15:43:55 -0700, Cong Wang wrote:
>> > On Mon, Sep 8, 2014 at 2:25 PM, Andres Freund <andres@anarazel.de> wrote:
>> > > Hi,
>> > >
>> > > (don't have netdev archived, thus answering here, sorry)
>> > >
>> > > On 2014-09-07 16:41:09 -0700, David Miller wrote:
>> > >> Alexander Y. Fomichev (1):
>> > >>       net: prevent of emerging cross-namespace symlinks
>> > >
>> >
>> > Since you are quoting this change, are you saying it causes
>> > the following kernel warning?
>>
>> I thought it might be a likely candidate; but I'm not sure at all. I'll
>> verify it as soon as I can reboot the machine a couple of times (end of
>> week-ish).
>>
>> > > I'm seeing WARNINGs like:
>> > > [ 1005.269134] ------------[ cut here ]------------
>> > > [ 1005.269148] WARNING: CPU: 6 PID: 4213 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x64/0x80()
>> > > [ 1005.269150] sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:1c.4/0000:03:00.0/net/eth0/upper_mv-eth0'
>> >
>> >
>> > Is there a network device named upper_mv-eth0 existed in your system
>> > before you created macvlan?
>>
>> No, there wasn't any. Afaics, the sequence is:
>> 1) macvlan mv-eth0 is created in global namespace
>> 2) mv-eth0 is moved (by systemd-nsspawn) into a new network
>>    namespace. Leaving a dangling symlink in the host namespace
>> /devices/pci0000:00/0000:00:1c.4/0000:03:00.0/net/eth0/upper_mv-eth0 pointing toward
>> ../mv-eth0
>> which doesn't exist in the external namespace. The new namespace seems
>> to have broken 'lower_bond0' symlink as well
>>
>> This seems to be the case (and probably the actual root cause) in
>> slightly earlier kernels as well.
>> What changed seems to be that:
>> 3) macvlan mv-eth0 is destroyed in the namespace (potentially while
>>    tearing it down)
>> 4) Now there's a broken symlink that doesn't make sense in any namespace
>> 5) mv-eth0 can't be created anew
>>
>> It seems that 3-5 didn't happen that way on older kernels. The most
>> recent where it's not persistently broken is 3.16.0-rc7-00007 -
>> 31dab719f. The oldest where I know it's reproducible is
>> 3.17.0-rc4-andres-00135-g35af256.
>
> I've reproduced the problem on another machine where it's perfectly
> reproducible (except being about mv-bond0). After reverting only the
> aforementioned 4c75431ac352063 it works again.
> As I said above, I'm not sure whether 4c75431ac352063 is the actual
> culprit, but it certainly made the problem visible. How are these
> upper_$if/lower_$if supposed to behave when the macvlan and the
> underlying device are in differing namespaces?

supposed to be destroyed before moving device into new net_ns
and created just after but only if both lower/upper devices has the same netns.
whether i understood you correctly that you see lowar_/upper_ links
just after new
container is up?

> Greetings,
>
> Andres Freund



-- 
Best regards.
       Alexander Y. Fomichev <git.user@gmail.com>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Macvlan WARNiNGS about duplicate sysfs filenames (Was [GIT] Networking)
  2014-09-09 23:55       ` Andres Freund
  2014-09-10  5:56         ` Alexander Y. Fomichev
@ 2014-09-10  9:32         ` Alexander Y. Fomichev
  2014-09-11 12:51           ` Andres Freund
  1 sibling, 1 reply; 8+ messages in thread
From: Alexander Y. Fomichev @ 2014-09-10  9:32 UTC (permalink / raw)
  To: Andres Freund
  Cc: Cong Wang, David Miller, Linus Torvalds, Andrew Morton, netdev,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 4502 bytes --]

On Wed, Sep 10, 2014 at 3:55 AM, Andres Freund <andres@anarazel.de> wrote:
> On 2014-09-10 01:48:06 +0200, Andres Freund wrote:
>> On 2014-09-09 15:43:55 -0700, Cong Wang wrote:
>> > On Mon, Sep 8, 2014 at 2:25 PM, Andres Freund <andres@anarazel.de> wrote:
>> > > Hi,
>> > >
>> > > (don't have netdev archived, thus answering here, sorry)
>> > >
>> > > On 2014-09-07 16:41:09 -0700, David Miller wrote:
>> > >> Alexander Y. Fomichev (1):
>> > >>       net: prevent of emerging cross-namespace symlinks
>> > >
>> >
>> > Since you are quoting this change, are you saying it causes
>> > the following kernel warning?
>>
>> I thought it might be a likely candidate; but I'm not sure at all. I'll
>> verify it as soon as I can reboot the machine a couple of times (end of
>> week-ish).
>>
>> > > I'm seeing WARNINGs like:
>> > > [ 1005.269134] ------------[ cut here ]------------
>> > > [ 1005.269148] WARNING: CPU: 6 PID: 4213 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x64/0x80()
>> > > [ 1005.269150] sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:1c.4/0000:03:00.0/net/eth0/upper_mv-eth0'
>> >
>> >
>> > Is there a network device named upper_mv-eth0 existed in your system
>> > before you created macvlan?
>>
>> No, there wasn't any. Afaics, the sequence is:
>> 1) macvlan mv-eth0 is created in global namespace
>> 2) mv-eth0 is moved (by systemd-nsspawn) into a new network
>>    namespace. Leaving a dangling symlink in the host namespace
>> /devices/pci0000:00/0000:00:1c.4/0000:03:00.0/net/eth0/upper_mv-eth0 pointing toward
>> ../mv-eth0
>> which doesn't exist in the external namespace. The new namespace seems
>> to have broken 'lower_bond0' symlink as well
>>
>> This seems to be the case (and probably the actual root cause) in
>> slightly earlier kernels as well.
>> What changed seems to be that:
>> 3) macvlan mv-eth0 is destroyed in the namespace (potentially while
>>    tearing it down)
>> 4) Now there's a broken symlink that doesn't make sense in any namespace
>> 5) mv-eth0 can't be created anew
>>
>> It seems that 3-5 didn't happen that way on older kernels. The most
>> recent where it's not persistently broken is 3.16.0-rc7-00007 -
>> 31dab719f. The oldest where I know it's reproducible is
>> 3.17.0-rc4-andres-00135-g35af256.
>
> I've reproduced the problem on another machine where it's perfectly
> reproducible (except being about mv-bond0).

did you mean this is a macvlan which has bond as a real device?
hmm... current implementation of bonding unconditionally
refuses to switch ns due to NETIF_F_NETNS_LOCAL flag afaik,
macvlan steals flags from lowerdev so it should behave the same.
just to clarify: custom patches?

btw, could i ask you to try attached patch?
in short, my initial assumption we don't need check ns
in __netdev_adjacent_dev_insert was incorrect, I do really forgot (at
least) this :(

/* When creating macvlans or macvtaps on top of other macvlans - use
* the real device as the lowerdev.

so we can create broken links playing with macvlan in container.

diff --git a/net/core/dev.c b/net/core/dev.c
index ab9a165..12f496f 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4841,7 +4841,9 @@ static int __netdev_adjacent_dev_insert(struct
net_device *dev,
        pr_debug("dev_hold for %s, because of link added from %s to %s\n",
                 adj_dev->name, dev->name, adj_dev->name);

-       if (netdev_adjacent_is_neigh_list(dev, dev_list)) {
+       if (netdev_adjacent_is_neigh_list(dev, dev_list) &&
+           net_eq(dev_net(dev),dev_net(adj_dev))) {
+
                ret = netdev_adjacent_sysfs_add(dev, adj_dev, dev_list);
                if (ret)
                        goto free_adj;
@@ -4862,7 +4864,8 @@ static int __netdev_adjacent_dev_insert(struct
net_device *dev,
        return 0;

 remove_symlinks:
-       if (netdev_adjacent_is_neigh_list(dev, dev_list))
+       if (netdev_adjacent_is_neigh_list(dev, dev_list) &&
+           net_eq(dev_net(dev),dev_net(adj_dev)))
                netdev_adjacent_sysfs_del(dev, adj_dev->name, dev_list);
 free_adj:
        kfree(adj);

> After reverting only the
> aforementioned 4c75431ac352063 it works again.
> As I said above, I'm not sure whether 4c75431ac352063 is the actual
> culprit, but it certainly made the problem visible. How are these
> upper_$if/lower_$if supposed to behave when the macvlan and the
> underlying device are in differing namespaces?
>
> Greetings,
>
> Andres Freund



-- 
Best regards.
       Alexander Y. Fomichev <git.user@gmail.com>

[-- Attachment #2: netdev_adjacent_dev_insert.patch --]
[-- Type: application/x-download, Size: 924 bytes --]

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: Macvlan WARNiNGS about duplicate sysfs filenames (Was [GIT] Networking)
  2014-09-10  9:32         ` Alexander Y. Fomichev
@ 2014-09-11 12:51           ` Andres Freund
  0 siblings, 0 replies; 8+ messages in thread
From: Andres Freund @ 2014-09-11 12:51 UTC (permalink / raw)
  To: Alexander Y. Fomichev, Vlad Yasevich
  Cc: Cong Wang, David Miller, Linus Torvalds, Andrew Morton, netdev,
	linux-kernel

On 2014-09-10 13:32:00 +0400, Alexander Y. Fomichev wrote:
> > I've reproduced the problem on another machine where it's perfectly
> > reproducible (except being about mv-bond0).
> 
> did you mean this is a macvlan which has bond as a real device?

Only on the other machine where I tried it. It's not dependent on that.

Here's a reproducer running in a stock kernel:
# ip netns add testns
# ip link add link eth0 name eth0-mv1 netns testns type macvlan
# readlink -f /sys/class/net/eth0/upper_eth0-mv1
/sys/devices/virtual/net/eth0-mv1
# ls -l /sys/devices/virtual/net/eth0-mv1
ls: cannot access /sys/devices/virtual/net/eth0-mv1: No such file or directory
# ip netns exec testns readlink -f /sys/class/net/eth0-mv1/lower_eth0
/sys/devices/pci0000:00/0000:00:1c.4/0000:03:00.0/net/eth0
# ip netns exec testns ls -l /sys/devices/pci0000:00/0000:00:1c.4/0000:03:00.0/net/eth0
ls: cannot access /sys/devices/pci0000:00/0000:00:1c.4/0000:03:00.0/net/eth0: No such file or directory
# ip netns exec testns ip link delete eth0-mv1
# ip link add link eth0 name eth0-mv1 netns testns type macvlan
RTNETLINK answers: File exists

Afaics the behaviour with the broken symlinks is old, and the actual
root cause for the bug. The new thing is that it causes re-adding the
same interface to fail.

Note that the issue is *not* reproducible when moving the interface into
the namespace after creation. So I guess that's the problem.

> hmm... current implementation of bonding unconditionally
> refuses to switch ns due to NETIF_F_NETNS_LOCAL flag afaik,
> macvlan steals flags from lowerdev so it should behave the same.
> just to clarify: custom patches?

No custom patches. And this really isn't related to bonding - the only
reason bond0 was mentioned was because one of the machines I could
reboot used bonding. As seen above it's independant of that.

> btw, could i ask you to try attached patch?

I'll try later. Thought it made sense to give you the above reproducer
alone.

Greetings,

Andres Freund

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-09-11 12:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-07 23:41 [GIT] Networking David Miller
2014-09-08 21:25 ` Macvlan WARNiNGS about duplicate sysfs filenames (Was [GIT] Networking) Andres Freund, Alexander Y. Fomichev
2014-09-09 22:43   ` Cong Wang
2014-09-09 23:48     ` Andres Freund
2014-09-09 23:55       ` Andres Freund
2014-09-10  5:56         ` Alexander Y. Fomichev
2014-09-10  9:32         ` Alexander Y. Fomichev
2014-09-11 12:51           ` Andres Freund

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).