1. 26 May, 2020 4 commits
    • Eric Dumazet's avatar
      tcp: allow traceroute -Mtcp for unpriv users · 45af29ca
      Eric Dumazet authored
      Unpriv users can use traceroute over plain UDP sockets, but not TCP ones.
      
      $ traceroute -Mtcp 8.8.8.8
      You do not have enough privileges to use this traceroute method.
      
      $ traceroute -n -Mudp 8.8.8.8
      traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 60 byte packets
       1  192.168.86.1  3.631 ms  3.512 ms  3.405 ms
       2  10.1.10.1  4.183 ms  4.125 ms  4.072 ms
       3  96.120.88.125  20.621 ms  19.462 ms  20.553 ms
       4  96.110.177.65  24.271 ms  25.351 ms  25.250 ms
       5  69.139.199.197  44.492 ms  43.075 ms  44.346 ms
       6  68.86.143.93  27.969 ms  25.184 ms  25.092 ms
       7  96.112.146.18  25.323 ms 96.112.146.22  25.583 ms 96.112.146.26  24.502 ms
       8  72.14.239.204  24.405 ms 74.125.37.224  16.326 ms  17.194 ms
       9  209.85.251.9  18.154 ms 209.85.247.55  14.449 ms 209.85.251.9  26.296 ms^C
      
      We can easily support traceroute over TCP, by queueing an error message
      into socket error queue.
      
      Note that applications need to set IP_RECVERR/IPV6_RECVERR option to
      enable this feature, and that the error message is only queued
      while in SYN_SNT state.
      
      socket(AF_INET6, SOCK_STREAM, IPPROTO_IP) = 3
      setsockopt(3, SOL_IPV6, IPV6_RECVERR, [1], 4) = 0
      setsockopt(3, SOL_SOCKET, SO_TIMESTAMP_OLD, [1], 4) = 0
      setsockopt(3, SOL_IPV6, IPV6_UNICAST_HOPS, [5], 4) = 0
      connect(3, {sa_family=AF_INET6, sin6_port=htons(8787), sin6_flowinfo=htonl(0),
              inet_pton(AF_INET6, "2002:a05:6608:297::", &sin6_addr), sin6_scope_id=0}, 28) = -1 EHOSTUNREACH (No route to host)
      recvmsg(3, {msg_name={sa_family=AF_INET6, sin6_port=htons(8787), sin6_flowinfo=htonl(0),
              inet_pton(AF_INET6, "2002:a05:6608:297::", &sin6_addr), sin6_scope_id=0},
              msg_namelen=1024->28, msg_iov=[{iov_base="`\r\337\320\0004\6\1&\7\370\260\200\231\16\27\0\0\0\0\0\0\0\0 \2\n\5f\10\2\227"..., iov_len=1024}],
              msg_iovlen=1, msg_control=[{cmsg_len=32, cmsg_level=SOL_SOCKET, cmsg_type=SO_TIMESTAMP_OLD, cmsg_data={tv_sec=1590340680, tv_usec=272424}},
                                         {cmsg_len=60, cmsg_level=SOL_IPV6, cmsg_type=IPV6_RECVERR}],
              msg_controllen=96, msg_flags=MSG_ERRQUEUE}, MSG_ERRQUEUE) = 144
      
      Suggested-by: Maciej Żenczykowski <maze@google.com
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Willem de Bruijn <willemb@google.com>
      Reviewed-by: default avatarMaciej Żenczykowski <maze@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      45af29ca
    • Eric Dumazet's avatar
      bnx2x: allow bnx2x_bsc_read() to schedule · 880f8f99
      Eric Dumazet authored
      bnx2x_warpcore_read_sfp_module_eeprom() can call bnx2x_bsc_read()
      three times before giving up.
      
      This causes latency blips of at least 31 ms (58 ms being reported
      by our teams)
      
      Convert the long lasting loops of udelay() to usleep_range() ones,
      and breaks the loops on precise time tracking.
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Ariel Elior <aelior@marvell.com>
      Cc: Sudarsana Kalluru <skalluru@marvell.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      880f8f99
    • Dan Carpenter's avatar
      ipv4: potential underflow in compat_ip_setsockopt() · 6a1015b0
      Dan Carpenter authored
      The value of "n" is capped at 0x1ffffff but it checked for negative
      values.  I don't think this causes a problem but I'm not certain and
      it's harmless to prevent it.
      
      Fixes: 2e041728 ("ipv4: do compat setsockopt for MCAST_MSFILTER directly")
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6a1015b0
    • Sven Auhagen's avatar
      mvneta: MVNETA_SKB_HEADROOM set last 3 bits to zero · ca23cb0b
      Sven Auhagen authored
      For XDP the MVNETA_SKB_HEADROOM is used as an offset for
      the received data.
      The MVNETA manual states that the last 3 bits assumed to be 0.
      
      This is currently the case but lets make it explicit in the definition
      to prevent future problems.
      Signed-off-by: default avatarSven Auhagen <sven.auhagen@voleatech.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ca23cb0b
  2. 25 May, 2020 13 commits
  3. 24 May, 2020 5 commits
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 13209a8f
      David S. Miller authored
      The MSCC bug fix in 'net' had to be slightly adjusted because the
      register accesses are done slightly differently in net-next.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      13209a8f
    • Linus Torvalds's avatar
      Merge tag 'efi-urgent-2020-05-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 98790bba
      Linus Torvalds authored
      Pull EFI fixes from Thomas Gleixner:
       "A set of EFI fixes:
      
         - Don't return a garbage screen info when EFI framebuffer is not
           available
      
         - Make the early EFI console work properly with wider fonts instead
           of drawing garbage
      
         - Prevent a memory buffer leak in allocate_e820()
      
         - Print the firmware error record properly so it can be decoded by
           users
      
         - Fix a symbol clash in the host tool build which only happens with
           newer compilers.
      
         - Add a missing check for the event log version of TPM which caused
           boot failures on several Dell systems due to an attempt to decode
           SHA-1 format with the crypto agile algorithm"
      
      * tag 'efi-urgent-2020-05-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        tpm: check event log version before reading final events
        efi: Pull up arch-specific prototype efi_systab_show_arch()
        x86/boot: Mark global variables as static
        efi: cper: Add support for printing Firmware Error Record Reference
        efi/libstub/x86: Avoid EFI map buffer alloc in allocate_e820()
        efi/earlycon: Fix early printk for wider fonts
        efi/libstub: Avoid returning uninitialized data from setup_graphics()
      98790bba
    • Linus Torvalds's avatar
      Merge tag 'x86-urgent-2020-05-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 667b6249
      Linus Torvalds authored
      Pull x86 fixes from Thomas Gleixner:
       "Two fixes for x86:
      
         - Unbreak stack dumps for inactive tasks by interpreting the special
           first frame left by __switch_to_asm() correctly.
      
           The recent change not to skip the first frame so ORC and frame
           unwinder behave in the same way caused all entries to be
           unreliable, i.e. prepended with '?'.
      
         - Use cpumask_available() instead of an implicit NULL check of a
           cpumask_var_t in mmio trace to prevent a Clang build warning"
      
      * tag 'x86-urgent-2020-05-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/unwind/orc: Fix unwind_get_return_address_ptr() for inactive tasks
        x86/mmiotrace: Use cpumask_available() for cpumask_var_t variables
      667b6249
    • Linus Torvalds's avatar
      Merge tag 'sched-urgent-2020-05-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 9e61d12b
      Linus Torvalds authored
      Pull scheduler fixes from Thomas Gleixner:
       "A set of fixes for the scheduler:
      
         - Fix handling of throttled parents in enqueue_task_fair() completely.
      
           The recent fix overlooked a corner case where the first iteration
           terminates due to an entity already being on the runqueue which
           makes the list management incomplete and later triggers the
           assertion which checks for completeness.
      
         - Fix a similar problem in unthrottle_cfs_rq().
      
         - Show the correct uclamp values in procfs which prints the effective
           value twice instead of requested and effective"
      
      * tag 'sched-urgent-2020-05-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/fair: Fix unthrottle_cfs_rq() for leaf_cfs_rq list
        sched/debug: Fix requested task uclamp values shown in procfs
        sched/fair: Fix enqueue_task_fair() warning some more
      9e61d12b
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · caffb99b
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Fix RCU warnings in ipv6 multicast router code, from Madhuparna
          Bhowmik.
      
       2) Nexthop attributes aren't being checked properly because of
          mis-initialized iterator, from David Ahern.
      
       3) Revert iop_idents_reserve() change as it caused performance
          regressions and was just working around what is really a UBSAN bug
          in the compiler. From Yuqi Jin.
      
       4) Read MAC address properly from ROM in bmac driver (double iteration
          proceeds past end of address array), from Jeremy Kerr.
      
       5) Add Microsoft Surface device IDs to r8152, from Marc Payne.
      
       6) Prevent reference to freed SKB in __netif_receive_skb_core(), from
          Boris Sukholitko.
      
       7) Fix ACK discard behavior in rxrpc, from David Howells.
      
       8) Preserve flow hash across packet scrubbing in wireguard, from Jason
          A. Donenfeld.
      
       9) Cap option length properly for SO_BINDTODEVICE in AX25, from Eric
          Dumazet.
      
      10) Fix encryption error checking in kTLS code, from Vadim Fedorenko.
      
      11) Missing BPF prog ref release in flow dissector, from Jakub Sitnicki.
      
      12) dst_cache must be used with BH disabled in tipc, from Eric Dumazet.
      
      13) Fix use after free in mlxsw driver, from Jiri Pirko.
      
      14) Order kTLS key destruction properly in mlx5 driver, from Tariq
          Toukan.
      
      15) Check devm_platform_ioremap_resource() return value properly in
          several drivers, from Tiezhu Yang.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (71 commits)
        net: smsc911x: Fix runtime PM imbalance on error
        net/mlx4_core: fix a memory leak bug.
        net: ethernet: ti: cpsw: fix ASSERT_RTNL() warning during suspend
        net: phy: mscc: fix initialization of the MACsec protocol mode
        net: stmmac: don't attach interface until resume finishes
        net: Fix return value about devm_platform_ioremap_resource()
        net/mlx5: Fix error flow in case of function_setup failure
        net/mlx5e: CT: Correctly get flow rule
        net/mlx5e: Update netdev txq on completions during closure
        net/mlx5: Annotate mutex destroy for root ns
        net/mlx5: Don't maintain a case of del_sw_func being null
        net/mlx5: Fix cleaning unmanaged flow tables
        net/mlx5: Fix memory leak in mlx5_events_init
        net/mlx5e: Fix inner tirs handling
        net/mlx5e: kTLS, Destroy key object after destroying the TIS
        net/mlx5e: Fix allowed tc redirect merged eswitch offload cases
        net/mlx5: Avoid processing commands before cmdif is ready
        net/mlx5: Fix a race when moving command interface to events mode
        net/mlx5: Add command entry handling completion
        rxrpc: Fix a memory leak in rxkad_verify_response()
        ...
      caffb99b
  4. 23 May, 2020 18 commits
    • Heiner Kallweit's avatar
      ethtool: propagate get_coalesce return value · 31610711
      Heiner Kallweit authored
      get_coalesce returns 0 or ERRNO, but the return value isn't checked.
      The returned coalesce data may be invalid if an ERRNO is set,
      therefore better check and propagate the return value.
      Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      31610711
    • David S. Miller's avatar
      Merge branch 'net-provide-a-devres-variant-of-register_netdev' · c0096a28
      David S. Miller authored
      Bartosz Golaszewski says:
      
      ====================
      net: provide a devres variant of register_netdev()
      
      Using devres helpers allows to shrink the probing code, avoid memory leaks in
      error paths make sure the order in which resources are freed is the exact
      opposite of their allocation. This series proposes to add a devres variant
      of register_netdev() that will only work with net_device structures whose
      memory is also managed.
      
      First we add the missing documentation entry for the only other networking
      devres helper: devm_alloc_etherdev().
      
      Next we move devm_alloc_etherdev() into a separate source file.
      
      We then use a proxy structure in devm_alloc_etherdev() to improve readability.
      
      Last: we implement devm_register_netdev() and use it in mtk-eth-mac driver.
      
      v1 -> v2:
      - rebase on top of net-next after driver rename, no functional changes
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c0096a28
    • Bartosz Golaszewski's avatar
      net: ethernet: mtk_star_emac: use devm_register_netdev() · 9250dccc
      Bartosz Golaszewski authored
      Use the new devres variant of register_netdev() in the mtk-star-emac
      driver and shrink the code by a couple lines.
      Signed-off-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9250dccc
    • Bartosz Golaszewski's avatar
      net: devres: provide devm_register_netdev() · cd16627f
      Bartosz Golaszewski authored
      Provide devm_register_netdev() - a device resource managed variant
      of register_netdev(). This new helper will only work for net_device
      structs that are also already managed by devres.
      Signed-off-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cd16627f
    • Bartosz Golaszewski's avatar
      net: devres: define a separate devres structure for devm_alloc_etherdev() · f75063ab
      Bartosz Golaszewski authored
      Not using a proxy structure to store struct net_device doesn't save
      anything in terms of compiled code size or memory usage but significantly
      decreases the readability of the code with all the pointer casting.
      
      Define struct net_device_devres and use it in devm_alloc_etherdev_mqs().
      Signed-off-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f75063ab
    • Bartosz Golaszewski's avatar
      net: move devres helpers into a separate source file · cb8a14b2
      Bartosz Golaszewski authored
      There's currently only a single devres helper in net/ - devm variant
      of alloc_etherdev. Let's move it to net/devres.c with the intention of
      assing a second one: devm_register_netdev(). This new routine will need
      to know the address of the release function of devm_alloc_etherdev() so
      that it can verify (using devres_find()) that the struct net_device
      that's being passed to it is also resource managed.
      Signed-off-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cb8a14b2
    • Bartosz Golaszewski's avatar
      Documentation: devres: add a missing section for networking helpers · 7eef3d09
      Bartosz Golaszewski authored
      Add a new section for networking devres helpers to devres.rst and list
      the two existing devm functions.
      Signed-off-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7eef3d09
    • David S. Miller's avatar
      Merge branch 'r8169-remove-mask-argument-from-few-ERI-OCP-functions' · 54b9aca0
      David S. Miller authored
      Heiner Kallweit says:
      
      ====================
      r8169: remove mask argument from few ERI/OCP functions
      
      Few ERI/OCP functions have a mask argument that isn't needed.
      Remove it to simplify the functions.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      54b9aca0
    • Heiner Kallweit's avatar
      r8169: remove mask argument from r8168ep_ocp_read · 787c0c04
      Heiner Kallweit authored
      Remove the mask argument as it's not used by r8168ep_ocp_read().
      Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      787c0c04
    • Heiner Kallweit's avatar
      r8169: remove mask argument from r8168dp_ocp_read · a15aaa03
      Heiner Kallweit authored
      All callers read the full 32bit value, therefore the mask argument can
      be removed.
      Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a15aaa03
    • Heiner Kallweit's avatar
      r8169: remove mask argument from rtl_w0w1_eri · 54113ded
      Heiner Kallweit authored
      rtl_eri_read() returns the full 32bit value, therefore there's no
      benefit in writing back parts of it only. handle it like the vendor
      driver and write the full 32 bit always. Omitting the mask argument
      avoids some overhead and makes the code better readable.
      Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      54113ded
    • Dinghao Liu's avatar
      net: smsc911x: Fix runtime PM imbalance on error · 539d39ad
      Dinghao Liu authored
      Remove runtime PM usage counter decrement when the
      increment function has not been called to keep the
      counter balanced.
      Signed-off-by: default avatarDinghao Liu <dinghao.liu@zju.edu.cn>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      539d39ad
    • David S. Miller's avatar
      Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue · 2b1a7f74
      David S. Miller authored
      Jeff Kirsher says:
      
      ====================
      100GbE Intel Wired LAN Driver Updates 2020-05-22
      
      This series contains updates to virtchnl and the ice driver.
      
      Geert Uytterhoeven fixes a data structure alignment issue in the
      virtchnl structures.
      
      Henry adds Flow Director support which allows for the redirection on
      ntuple rules over six patches.  Initially Henry adds the initial
      infrastructure for Flow Director, and then later adds IPv4 and IPv6
      support, as well as being able to display the ntuple rules.
      
      Bret add Accelerated Receive Flow Steering (aRFS) support which is used
      to steer receive flows to a specific queue.  Fixes a transmit timeout
      when the VF link transitions from up/down/up because the transmit and
      receive queue interrupts are not enabled as part of VF's link up.  Fixed
      an issue when the default VF LAN address is changed and after reset the
      PF will attempt to add the new MAC, which fails because it already
      exists. This causes the VF to be disabled completely until it is removed
      and enabled via sysfs.
      
      Anirudh (Ani) makes a fix where the ice driver needs to call set_mac_cfg
      to enable jumbo frames, so ensure it gets called during initialization
      and after reset.  Fix bad register reads during a register dump in
      ethtool by removing the bad registers.
      
      Paul fixes an issue where the receive Malicious Driver Detection (MDD)
      auto reset message was not being logged because it occurred after the VF
      reset.
      
      Victor adds a check for compatibility between the Dynamic Device
      Personalization (DDP) package and the NIC firmware to ensure that
      everything aligns.
      
      Jesse fixes a administrative queue string call with the appropriate
      error reporting variable.  Also fixed the loop variables that are
      comparing or assigning signed against unsigned values.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2b1a7f74
    • David S. Miller's avatar
      Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue · 098205f3
      David S. Miller authored
      Jeff Kirsher says:
      
      ====================
      1GbE Intel Wired LAN Driver Updates 2020-05-22
      
      This series contains updates to e1000e, igc and igb.
      
      Many of the patches in this series are fixes, but many of the igc fixes
      are based on the recent filter rule handling Andre has been working,
      which will not backport to earlier/stable kernels.  The remaining fixes
      for e1000e and igb have CC'd stable where applicable.
      
      Andre continue with his refactoring of the filter rule code to help with
      reducing the complexity, in multiple patches.  Fix the inconsistent size
      of a struct field.  Fixed an issue where filter rules stay active in the
      hardware, even after it was deleted, so make sure to disable the filter
      rule before deleting.  Fixed an issue with NFC rules which were dropping
      valid multicast MAC address.  Fixed how the NFC rules are restored after
      the NIC is reset or brought up, so that they are restored in the same order
      they were initially setup in.  Fix a potential memory leak when the
      driver is unloaded and the NFC rules are not flushed from memory
      properly.  Fixed how NFC rule validation handles when a request to
      overwrite an existing rule.  Changed the locking around the NFC rule API
      calls from spin_locks to mutex locks to avoid unnecessary busy waiting
      on lock contention.
      
      Sasha clean up more unused code in the igc driver.
      
      Kai-Heng Feng from Canonical provides three fixes, first has igb report
      the speed and duplex as unknown when in runtime suspend.  Fixed e1000e
      to pass up the error when disabling ULP mode.  Fixed e1000e performance
      by disabling TSO by default for certain MACs.
      
      Vitaly disables S0ix entry and exit flows for ME systems.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      098205f3
    • David S. Miller's avatar
      Merge tag 'mlx5-fixes-2020-05-22' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux · e3181e9a
      David S. Miller authored
      Saeed Mahameed says:
      
      ====================
      mlx5 fixes 2020-05-22
      
      This series introduces some fixes to mlx5 driver.
      
      Please pull and let me know if there is any problem.
      
      For -stable v4.13
         ('net/mlx5: Add command entry handling completion')
      
      For -stable v5.2
         ('net/mlx5: Fix error flow in case of function_setup failure')
         ('net/mlx5: Fix memory leak in mlx5_events_init')
      
      For -stable v5.3
         ('net/mlx5e: Update netdev txq on completions during closure')
         ('net/mlx5e: kTLS, Destroy key object after destroying the TIS')
         ('net/mlx5e: Fix inner tirs handling')
      
      For -stable v5.6
         ('net/mlx5: Fix cleaning unmanaged flow tables')
         ('net/mlx5: Fix a race when moving command interface to events mode')
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e3181e9a
    • David S. Miller's avatar
      Merge tag 'mlx5-updates-2020-05-22' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux · 46c54f95
      David S. Miller authored
      Saeed Mahameed says:
      
      ====================
      mlx5-updates-2020-05-22
      
      This series includes two updates and one cleanup patch
      
      1) Tang Bim, clean-up with IS_ERR() usage
      
      2) Vlad introduces a new mlx5 kconfig flag for TC support
      
         This is required due to the high volume of current and upcoming
         development in the eswitch and representors areas where some of the
         feature are TC based such as the downstream patches of MPLSoUDP and
         the following representor bonding support for VF live migration and
         uplink representor dynamic loading.
         For this Vlad kept TC specific code in tc.c and rep/tc.c and
         organized non TC code in representors specific files.
      
      3) Eli Cohen adds support for MPLS over UPD encap and decap TC offloads.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      46c54f95
    • Randy Dunlap's avatar
      net: psample: fix build error when CONFIG_INET is not enabled · 07a7f308
      Randy Dunlap authored
      Fix psample build error when CONFIG_INET is not set/enabled by
      bracketing the tunnel code in #ifdef CONFIG_NET / #endif.
      
      ../net/psample/psample.c: In function ‘__psample_ip_tun_to_nlattr’:
      ../net/psample/psample.c:216:25: error: implicit declaration of function ‘ip_tunnel_info_opts’; did you mean ‘ip_tunnel_info_opts_set’? [-Werror=implicit-function-declaration]
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Cc: Yotam Gigi <yotam.gi@gmail.com>
      Cc: Cong Wang <xiyou.wangcong@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      07a7f308
    • Qiushi Wu's avatar
      net/mlx4_core: fix a memory leak bug. · febfd9d3
      Qiushi Wu authored
      In function mlx4_opreq_action(), pointer "mailbox" is not released,
      when mlx4_cmd_box() return and error, causing a memory leak bug.
      Fix this issue by going to "out" label, mlx4_free_cmd_mailbox() can
      free this pointer.
      
      Fixes: fe6f700d ("net/mlx4_core: Respond to operation request by firmware")
      Signed-off-by: default avatarQiushi Wu <wu000273@umn.edu>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      febfd9d3