Skip to content
  1. Mar 20, 2019
    • Eric Dumazet's avatar
      dccp: do not use ipv6 header for ipv4 flow · e0aa6770
      Eric Dumazet authored
      When a dual stack dccp listener accepts an ipv4 flow,
      it should not attempt to use an ipv6 header or
      inet6_iif() helper.
      
      Fixes: 3df80d93
      
       ("[DCCP]: Introduce DCCPv6")
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e0aa6770
    • Eric Dumazet's avatar
      tcp: do not use ipv6 header for ipv4 flow · 89e41309
      Eric Dumazet authored
      When a dual stack tcp listener accepts an ipv4 flow,
      it should not attempt to use an ipv6 header or tcp_v6_iif() helper.
      
      Fixes: 1397ed35 ("ipv6: add flowinfo for tcp6 pkt_options for all cases")
      Fixes: df3687ff ("ipv6: add the IPV6_FL_F_REFLECT flag to IPV6_FL_A_GET")
      Fixes: 1da177e4
      
       ("Linux-2.6.12-rc2")
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      89e41309
    • Aditya Pakki's avatar
      nfc: Fix to check for kmemdup failure · d7737d42
      Aditya Pakki authored
      
      
      In case of kmemdup failure while setting the service name the patch
      returns -ENOMEM upstream for processing.
      
      Signed-off-by: default avatarAditya Pakki <pakki001@umn.edu>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d7737d42
    • YueHaibing's avatar
      net-sysfs: call dev_hold if kobject_init_and_add success · a3e23f71
      YueHaibing authored
      
      
      In netdev_queue_add_kobject and rx_queue_add_kobject,
      if sysfs_create_group failed, kobject_put will call
      netdev_queue_release to decrease dev refcont, however
      dev_hold has not be called. So we will see this while
      unregistering dev:
      
      unregister_netdevice: waiting for bcsh0 to become free. Usage count = -1
      
      Reported-by: default avatarHulk Robot <hulkci@huawei.com>
      Fixes: d0d66837
      
       ("net: don't decrement kobj reference count on init failure")
      Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a3e23f71
    • Aaro Koskinen's avatar
      net: stmmac: fix memory corruption with large MTUs · 223a960c
      Aaro Koskinen authored
      When using 16K DMA buffers and ring mode, the DES3 refill is not working
      correctly as the function is using a bogus pointer for checking the
      private data. As a result stale pointers will remain in the RX descriptor
      ring, so DMA will now likely overwrite/corrupt some already freed memory.
      
      As simple reproducer, just receive some UDP traffic:
      
      	# ifconfig eth0 down; ifconfig eth0 mtu 9000; ifconfig eth0 up
      	# iperf3 -c 192.168.253.40 -u -b 0 -R
      
      If you didn't crash by now check the RX descriptors to find non-contiguous
      RX buffers:
      
      	cat /sys/kernel/debug/stmmaceth/eth0/descriptors_status
      	[...]
      	1 [0x2be5020]: 0xa3220321 0x9ffc1ffc 0x72d70082 0x130e207e
      					     ^^^^^^^^^^^^^^^^^^^^^
      	2 [0x2be5040]: 0xa3220321 0x9ffc1ffc 0x72998082 0x1311a07e
      					     ^^^^^^^^^^^^^^^^^^^^^
      
      A simple ping test will now report bad data:
      
      	# ping -s 8200 192.168.253.40
      	PING 192.168.253.40 (192.168.253.40) 8200(8228) bytes of data.
      	8208 bytes from 192.168.253.40: icmp_seq=1 ttl=64 time=1.00 ms
      	wrong data byte #8144 should be 0xd0 but was 0x88
      
      Fix the wrong pointer. Also we must refill DES3 only if the DMA buffer
      size is 16K.
      
      Fixes: 54139cf3
      
       ("net: stmmac: adding multiple buffers for rx")
      Signed-off-by: default avatarAaro Koskinen <aaro.koskinen@nokia.com>
      Acked-by: default avatarJose Abreu <joabreu@synopsys.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      223a960c
    • Arnd Bergmann's avatar
      mlxsw: core: mlxsw: core: avoid -Wint-in-bool-context warning · 7442c483
      Arnd Bergmann authored
      A recently added function in mlxsw triggers a harmless compiler warning:
      
      In file included from drivers/net/ethernet/mellanox/mlxsw/core.h:17,
                       from drivers/net/ethernet/mellanox/mlxsw/core_env.c:7:
      drivers/net/ethernet/mellanox/mlxsw/core_env.c: In function 'mlxsw_env_module_temp_thresholds_get':
      drivers/net/ethernet/mellanox/mlxsw/reg.h:8015:45: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context]
       #define MLXSW_REG_MTMP_TEMP_TO_MC(val) (val * 125)
                                              ~~~~~^~~~~~
      drivers/net/ethernet/mellanox/mlxsw/core_env.c:116:8: note: in expansion of macro 'MLXSW_REG_MTMP_TEMP_TO_MC'
         if (!MLXSW_REG_MTMP_TEMP_TO_MC(module_temp)) {
              ^~~~~~~~~~~~~~~~~~~~~~~~~
      
      The warning is normally disabled, but it would be nice to enable
      it to find real bugs, and there are no other known instances at
      the moment.
      
      Replace the negation with a zero-comparison, which also matches
      the comment above it.
      
      Fixes: d93c19a1
      
       ("mlxsw: core: Add API for QSFP module temperature thresholds reading")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7442c483
    • David S. Miller's avatar
      Merge tag 'wireless-drivers-for-davem-2019-03-19' of... · 22781f07
      David S. Miller authored
      
      Merge tag 'wireless-drivers-for-davem-2019-03-19' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers
      
      Kalle Valo says:
      
      ====================
      wireless-drivers fixes for 5.1
      
      First set of fixes for 5.1. Lots of fixes for mt76 this time.
      
      iwlwifi
      
      * fix warning with do_div()
      
      mt7601u
      
      * avoid using hardware which is supported by mt76
      
      mt76
      
      * more fixes for hweight8() usage
      
      * fix hardware restart for mt76x2
      
      * fix writing txwi on USB devices
      
      * fix (and disable by default) ED/CCA support on 76x2
      
      * fix powersave issues on 7603
      
      * fix return value check for ioremap on 7603
      
      * fix duplicate USB device IDs
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      22781f07
    • David S. Miller's avatar
      Merge branch 'ieee802154-for-davem-2019-03-19' of... · e8629d29
      David S. Miller authored
      
      Merge branch 'ieee802154-for-davem-2019-03-19' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan
      
      Stefan Schmidt says:
      
      ====================
      pull-request: ieee802154 for net 2019-03-19
      
      An update from ieee802154 for your *net* tree.
      
      Kangjie Lu fixed a potential NULL pointer deref in the adf7242 driver and Li
      RongQing make sure we propagate a netlink return code to the caller.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e8629d29
  2. Mar 19, 2019