1. 02 Feb, 2021 24 commits
  2. 01 Feb, 2021 6 commits
    • Aleksandr Loktionov's avatar
      i40e: Revert "i40e: don't report link up for a VF who hasn't enabled queues" · f559a356
      Aleksandr Loktionov authored
      This reverts commit 2ad1274f
      
      VF queues were not brought up when PF was brought up after being
      downed if the VF driver disabled VFs queues during PF down.
      This could happen in some older or external VF driver implementations.
      The problem was that PF driver used vf->queues_enabled as a condition
      to decide what link-state it would send out which caused the issue.
      
      Remove the check for vf->queues_enabled in the VF link notify.
      Now VF will always be notified of the current link status.
      Also remove the queues_enabled member from i40e_vf structure as it is
      not used anymore. Otherwise VNF implementation was broken and caused
      a link flap.
      
      The original commit was a workaround to avoid breaking existing VFs though
      it's really a fault of the VF code not the PF. The commit should be safe to
      revert as all of the VFs we know of have been fixed. Also, since we now
      know there is a related bug in the workaround, removing it is preferred.
      
      Fixes: 2ad1274f ("i40e: don't report link up for a VF who hasn't enabled")
      Signed-off-by: default avatarAleksandr Loktionov <aleksandr.loktionov@intel.com>
      Signed-off-by: default avatarArkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
      Tested-by: default avatarKonrad Jankowski <konrad0.jankowski@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      f559a356
    • Hans de Goede's avatar
      staging: rtl8723bs: Move wiphy setup to after reading the regulatory settings from the chip · 50af06d4
      Hans de Goede authored
      Commit 81f153fa ("staging: rtl8723bs: fix wireless regulatory API
      misuse") moved the wiphy_apply_custom_regulatory() call to earlier in the
      driver's init-sequence, so that it gets called before wiphy_register().
      
      But at this point in time the eFuses which code the regulatory-settings
      for the chip have not been read by the driver yet, causing
      _rtw_reg_apply_flags() to set the IEEE80211_CHAN_DISABLED flag on *all*
      channels.
      
      On the device where I initially tested the fix, a Jumper EZpad 7 tablet,
      this does not cause any problems because shortly after init the
      rtw_reg_notifier() gets called fixing things up. I guess this happens
      into response to receiving a (broadcast) packet with regulatory info
      from the access-point ?
      
      But on another device with a RTL8723BS wifi chip, an Acer Switch 10E
      (SW3-016), the rtw_reg_notifier() never gets called. I assume that some
      fuse has been set on this device to ignore regulatory info received from
      access-points.
      
      This means that on the Acer the driver is stuck in a state with all
      channels disabled, leading to non working Wifi.
      
      We cannot move the wiphy_apply_custom_regulatory() call back, because
      that call must be made before the wiphy_register() call.
      
      Instead move the entire rtw_wdev_alloc() call to after the Efuses have
      been read, fixing all channels being disabled in the initial channel-map.
      
      Fixes: 81f153fa ("staging: rtl8723bs: fix wireless regulatory API misuse")
      Cc: Johannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Link: https://lore.kernel.org/r/20210201152956.370186-2-hdegoede@redhat.comSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      50af06d4
    • Kevin Lo's avatar
      igc: check return value of ret_val in igc_config_fc_after_link_up · b8811456
      Kevin Lo authored
      Check return value from ret_val to make error check actually work.
      
      Fixes: 4eb80801 ("igc: Add setup link functionality")
      Signed-off-by: default avatarKevin Lo <kevlo@kevlo.org>
      Acked-by: default avatarSasha Neftin <sasha.neftin@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      b8811456
    • Kevin Lo's avatar
      igc: set the default return value to -IGC_ERR_NVM in igc_write_nvm_srwr · ebc8d125
      Kevin Lo authored
      This patch sets the default return value to -IGC_ERR_NVM in
      igc_write_nvm_srwr. Without this change it wouldn't lead to a shadow RAM
      write EEWR timeout.
      
      Fixes: ab405612 ("igc: Add NVM support")
      Signed-off-by: default avatarKevin Lo <kevlo@kevlo.org>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      ebc8d125
    • Kai-Heng Feng's avatar
      igc: Report speed and duplex as unknown when device is runtime suspended · 2e99dedc
      Kai-Heng Feng authored
      Similar to commit 165ae7a8 ("igb: Report speed and duplex as unknown
      when device is runtime suspended"), if we try to read speed and duplex
      sysfs while the device is runtime suspended, igc will complain and
      stops working:
      
      [  123.449883] igc 0000:03:00.0 enp3s0: PCIe link lost, device now detached
      [  123.450052] BUG: kernel NULL pointer dereference, address: 0000000000000008
      [  123.450056] #PF: supervisor read access in kernel mode
      [  123.450058] #PF: error_code(0x0000) - not-present page
      [  123.450059] PGD 0 P4D 0
      [  123.450064] Oops: 0000 [#1] SMP NOPTI
      [  123.450068] CPU: 0 PID: 2525 Comm: udevadm Tainted: G     U  W  OE     5.10.0-1002-oem #2+rkl2-Ubuntu
      [  123.450078] RIP: 0010:igc_rd32+0x1c/0x90 [igc]
      [  123.450080] Code: c0 5d c3 b8 fd ff ff ff c3 0f 1f 44 00 00 0f 1f 44 00 00 55 89 f0 48 89 e5 41 56 41 55 41 54 49 89 c4 53 48 8b 57 08 48 01 d0 <44> 8b 28 41 83 fd ff 74 0c 5b 44 89 e8 41 5c 41 5d 4
      
      [  123.450083] RSP: 0018:ffffb0d100d6fcc0 EFLAGS: 00010202
      [  123.450085] RAX: 0000000000000008 RBX: ffffb0d100d6fd30 RCX: 0000000000000000
      [  123.450087] RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffff945a12716c10
      [  123.450089] RBP: ffffb0d100d6fce0 R08: ffff945a12716550 R09: ffff945a09874000
      [  123.450090] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000008
      [  123.450092] R13: ffff945a12716000 R14: ffff945a037da280 R15: ffff945a037da290
      [  123.450094] FS:  00007f3b34c868c0(0000) GS:ffff945b89200000(0000) knlGS:0000000000000000
      [  123.450096] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  123.450098] CR2: 0000000000000008 CR3: 00000001144de006 CR4: 0000000000770ef0
      [  123.450100] PKRU: 55555554
      [  123.450101] Call Trace:
      [  123.450111]  igc_ethtool_get_link_ksettings+0xd6/0x1b0 [igc]
      [  123.450118]  __ethtool_get_link_ksettings+0x71/0xb0
      [  123.450123]  duplex_show+0x74/0xc0
      [  123.450129]  dev_attr_show+0x1d/0x40
      [  123.450134]  sysfs_kf_seq_show+0xa1/0x100
      [  123.450137]  kernfs_seq_show+0x27/0x30
      [  123.450142]  seq_read+0xb7/0x400
      [  123.450148]  ? common_file_perm+0x72/0x170
      [  123.450151]  kernfs_fop_read+0x35/0x1b0
      [  123.450155]  vfs_read+0xb5/0x1b0
      [  123.450157]  ksys_read+0x67/0xe0
      [  123.450160]  __x64_sys_read+0x1a/0x20
      [  123.450164]  do_syscall_64+0x38/0x90
      [  123.450168]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
      [  123.450170] RIP: 0033:0x7f3b351fe142
      [  123.450173] Code: c0 e9 c2 fe ff ff 50 48 8d 3d 3a ca 0a 00 e8 f5 19 02 00 0f 1f 44 00 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 0f 05 <48> 3d 00 f0 ff ff 77 56 c3 0f 1f 44 00 00 48 83 ec 28 48 89 54 24
      [  123.450174] RSP: 002b:00007fffef2ec138 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
      [  123.450177] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f3b351fe142
      [  123.450179] RDX: 0000000000001001 RSI: 00005644c047f070 RDI: 0000000000000003
      [  123.450180] RBP: 00007fffef2ec340 R08: 00005644c047f070 R09: 00007f3b352d9320
      [  123.450182] R10: 00005644c047c010 R11: 0000000000000246 R12: 00005644c047cbf0
      [  123.450184] R13: 00005644c047e6d0 R14: 0000000000000003 R15: 00007fffef2ec140
      [  123.450189] Modules linked in: rfcomm ccm cmac algif_hash algif_skcipher af_alg bnep toshiba_acpi industrialio toshiba_haps hp_accel lis3lv02d btusb btrtl btbcm btintel bluetooth ecdh_generic ecc joydev input_leds nls_iso8859_1 snd_sof_pci snd_sof_intel_byt snd_sof_intel_ipc snd_sof_intel_hda_common snd_soc_hdac_hda snd_hda_codec_hdmi snd_sof_xtensa_dsp snd_sof_intel_hda snd_sof snd_hda_ext_core snd_soc_acpi_intel_match snd_soc_acpi snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio snd_hda_intel snd_intel_dspcfg soundwire_intel soundwire_generic_allocation soundwire_cadence snd_hda_codec snd_hda_core ath10k_pci snd_hwdep intel_rapl_msr intel_rapl_common ath10k_core soundwire_bus snd_soc_core x86_pkg_temp_thermal ath intel_powerclamp snd_compress ac97_bus snd_pcm_dmaengine mac80211 snd_pcm coretemp snd_seq_midi snd_seq_midi_event snd_rawmidi kvm_intel cfg80211 snd_seq snd_seq_device snd_timer mei_hdcp kvm libarc4 snd crct10dif_pclmul ghash_clmulni_intel aesni_intel
       mei_me dell_wmi
      [  123.450266]  dell_smbios soundcore sparse_keymap dcdbas crypto_simd cryptd mei dell_uart_backlight glue_helper ee1004 wmi_bmof intel_wmi_thunderbolt dell_wmi_descriptor mac_hid efi_pstore acpi_pad acpi_tad intel_cstate sch_fq_codel parport_pc ppdev lp parport ip_tables x_tables autofs4 btrfs blake2b_generic raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear dm_mirror dm_region_hash dm_log hid_generic usbhid hid i915 i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops cec crc32_pclmul rc_core drm intel_lpss_pci i2c_i801 ahci igc intel_lpss i2c_smbus idma64 xhci_pci libahci virt_dma xhci_pci_renesas wmi video pinctrl_tigerlake
      [  123.450335] CR2: 0000000000000008
      [  123.450338] ---[ end trace 9f731e38b53c35cc ]---
      
      The more generic approach will be wrap get_link_ksettings() with begin()
      and complete() callbacks, and calls runtime resume and runtime suspend
      routine respectively. However, igc is like igb, runtime resume routine
      uses rtnl_lock() which upper ethtool layer also uses.
      
      So to prevent a deadlock on rtnl, take a different approach, use
      pm_runtime_suspended() to avoid reading register while device is runtime
      suspended.
      
      Fixes: 8c5ad0da ("igc: Add ethtool support")
      Signed-off-by: default avatarKai-Heng Feng <kai.heng.feng@canonical.com>
      Acked-by: default avatarSasha Neftin <sasha.neftin@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      2e99dedc
    • Felix Fietkau's avatar
      mac80211: fix station rate table updates on assoc · 18fe0fae
      Felix Fietkau authored
      If the driver uses .sta_add, station entries are only uploaded after the sta
      is in assoc state. Fix early station rate table updates by deferring them
      until the sta has been uploaded.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
      Link: https://lore.kernel.org/r/20210201083324.3134-1-nbd@nbd.name
      [use rcu_access_pointer() instead since we won't dereference here]
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      18fe0fae
  3. 30 Jan, 2021 4 commits
  4. 29 Jan, 2021 1 commit
  5. 28 Jan, 2021 5 commits
    • Linus Torvalds's avatar
      Merge tag 'net-5.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 909b447d
      Linus Torvalds authored
      Pull networking fixes from Jakub Kicinski:
       "Networking fixes including fixes from can, xfrm, wireless,
        wireless-drivers and netfilter trees. Nothing scary, Intel
        WiFi-related fixes seemed most notable to the users.
      
        Current release - regressions:
      
         - dsa: microchip: ksz8795: fix KSZ8794 port map again to program the
           CPU port correctly
      
        Current release - new code bugs:
      
         - iwlwifi: pcie: reschedule in long-running memory reads
      
        Previous releases - regressions:
      
         - iwlwifi: dbg: don't try to overwrite read-only FW data
      
         - iwlwifi: provide gso_type to GSO packets
      
         - octeontx2: make sure the buffer is 128 byte aligned
      
         - tcp: make TCP_USER_TIMEOUT accurate for zero window probes
      
         - xfrm: fix wraparound in xfrm_policy_addr_delta()
      
         - xfrm: fix oops in xfrm_replay_advance_bmp due to a race between
           CPUs in presence of packet reorder
      
         - tcp: fix TLP timer not set when CA_STATE changes from DISORDER to
           OPEN
      
         - wext: fix NULL-ptr-dereference with cfg80211's lack of commit()
      
        Previous releases - always broken:
      
         - igc: fix link speed advertising
      
         - stmmac: configure EHL PSE0 GbE and PSE1 GbE to 32 bits DMA
           addressing
      
         - team: protect features update by RCU to avoid deadlock
      
         - xfrm: fix disable_xfrm sysctl when used on xfrm interfaces
           themselves
      
         - fec: fix temporary RMII clock reset on link up
      
         - can: dev: prevent potential information leak in can_fill_info()
      
        Misc:
      
         - mrp: fix bad packing of MRP test packet structures
      
         - uapi: fix big endian definition of ipv6_rpl_sr_hdr
      
         - add David Ahern to IPv4/IPv6 maintainers"
      
      * tag 'net-5.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (86 commits)
        rxrpc: Fix memory leak in rxrpc_lookup_local
        mlxsw: spectrum_span: Do not overwrite policer configuration
        selftests: forwarding: Specify interface when invoking mausezahn
        stmmac: intel: Configure EHL PSE0 GbE and PSE1 GbE to 32 bits DMA addressing
        net: usb: cdc_ether: added support for Thales Cinterion PLSx3 modem family.
        ibmvnic: Ensure that CRQ entry read are correctly ordered
        MAINTAINERS: add missing header for bonding
        net: decnet: fix netdev refcount leaking on error path
        net: switchdev: don't set port_obj_info->handled true when -EOPNOTSUPP
        can: dev: prevent potential information leak in can_fill_info()
        net: fec: Fix temporary RMII clock reset on link up
        net: lapb: Add locking to the lapb module
        team: protect features update by RCU to avoid deadlock
        MAINTAINERS: add David Ahern to IPv4/IPv6 maintainers
        net/mlx5: CT: Fix incorrect removal of tuple_nat_node from nat rhashtable
        net/mlx5e: Revert parameters on errors when changing MTU and LRO state without reset
        net/mlx5e: Revert parameters on errors when changing trust state without reset
        net/mlx5e: Correctly handle changing the number of queues when the interface is down
        net/mlx5e: Fix CT rule + encap slow path offload and deletion
        net/mlx5e: Disable hw-tc-offload when MLX5_CLS_ACT config is disabled
        ...
      909b447d
    • Takeshi Misawa's avatar
      rxrpc: Fix memory leak in rxrpc_lookup_local · b8323f72
      Takeshi Misawa authored
      Commit 9ebeddef ("rxrpc: rxrpc_peer needs to hold a ref on the rxrpc_local record")
      Then release ref in __rxrpc_put_peer and rxrpc_put_peer_locked.
      
      	struct rxrpc_peer *rxrpc_alloc_peer(struct rxrpc_local *local, gfp_t gfp)
      	-               peer->local = local;
      	+               peer->local = rxrpc_get_local(local);
      
      rxrpc_discard_prealloc also need ref release in discarding.
      
      syzbot report:
      BUG: memory leak
      unreferenced object 0xffff8881080ddc00 (size 256):
        comm "syz-executor339", pid 8462, jiffies 4294942238 (age 12.350s)
        hex dump (first 32 bytes):
          00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
          00 00 00 00 0a 00 00 00 00 c0 00 08 81 88 ff ff  ................
        backtrace:
          [<000000002b6e495f>] kmalloc include/linux/slab.h:552 [inline]
          [<000000002b6e495f>] kzalloc include/linux/slab.h:682 [inline]
          [<000000002b6e495f>] rxrpc_alloc_local net/rxrpc/local_object.c:79 [inline]
          [<000000002b6e495f>] rxrpc_lookup_local+0x1c1/0x760 net/rxrpc/local_object.c:244
          [<000000006b43a77b>] rxrpc_bind+0x174/0x240 net/rxrpc/af_rxrpc.c:149
          [<00000000fd447a55>] afs_open_socket+0xdb/0x200 fs/afs/rxrpc.c:64
          [<000000007fd8867c>] afs_net_init+0x2b4/0x340 fs/afs/main.c:126
          [<0000000063d80ec1>] ops_init+0x4e/0x190 net/core/net_namespace.c:152
          [<00000000073c5efa>] setup_net+0xde/0x2d0 net/core/net_namespace.c:342
          [<00000000a6744d5b>] copy_net_ns+0x19f/0x3e0 net/core/net_namespace.c:483
          [<0000000017d3aec3>] create_new_namespaces+0x199/0x4f0 kernel/nsproxy.c:110
          [<00000000186271ef>] unshare_nsproxy_namespaces+0x9b/0x120 kernel/nsproxy.c:226
          [<000000002de7bac4>] ksys_unshare+0x2fe/0x5c0 kernel/fork.c:2957
          [<00000000349b12ba>] __do_sys_unshare kernel/fork.c:3025 [inline]
          [<00000000349b12ba>] __se_sys_unshare kernel/fork.c:3023 [inline]
          [<00000000349b12ba>] __x64_sys_unshare+0x12/0x20 kernel/fork.c:3023
          [<000000006d178ef7>] do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
          [<00000000637076d4>] entry_SYSCALL_64_after_hwframe+0x44/0xa9
      
      Fixes: 9ebeddef ("rxrpc: rxrpc_peer needs to hold a ref on the rxrpc_local record")
      Signed-off-by: default avatarTakeshi Misawa <jeliantsurux@gmail.com>
      Reported-and-tested-by: syzbot+305326672fed51b205f7@syzkaller.appspotmail.com
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Link: https://lore.kernel.org/r/161183091692.3506637.3206605651502458810.stgit@warthog.procyon.org.ukSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      b8323f72
    • Jakub Kicinski's avatar
      Merge branch 'mlxsw-various-fixes' · 924b171c
      Jakub Kicinski authored
      Ido Schimmel says:
      
      ====================
      mlxsw: Various fixes
      
      Patch #1 fixes wrong invocation of mausezahn in a couple of selftests.
      The tests started failing after Fedora updated their libnet package from
      version 1.1.6 to 1.2.1. With the fix the tests pass regardless of libnet
      version.
      
      Patch #2 fixes an issue in the mirroring to CPU code that results in
      policer configuration being overwritten.
      ====================
      
      Link: https://lore.kernel.org/r/20210128144820.3280295-1-idosch@idosch.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      924b171c
    • Ido Schimmel's avatar
      mlxsw: spectrum_span: Do not overwrite policer configuration · b6f6881a
      Ido Schimmel authored
      The purpose of the delayed work in the SPAN module is to potentially
      update the destination port and various encapsulation parameters of SPAN
      agents that point to a VLAN device or a GRE tap. The destination port
      can change following the insertion of a new route, for example.
      
      SPAN agents that point to a physical port or the CPU port are static and
      never change throughout the lifetime of the SPAN agent. Therefore, skip
      over them in the delayed work.
      
      This fixes an issue where the delayed work overwrites the policer
      that was set on a SPAN agent pointing to the CPU. Modifying the delayed
      work to inherit the original policer configuration is error-prone, as
      the same will be needed for any new parameter.
      
      Fixes: 4039504e ("mlxsw: spectrum_span: Allow setting policer on a SPAN agent")
      Reviewed-by: default avatarPetr Machata <petrm@nvidia.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      b6f6881a
    • Danielle Ratson's avatar
      selftests: forwarding: Specify interface when invoking mausezahn · 11df27f7
      Danielle Ratson authored
      Specify the interface through which packets should be transmitted so
      that the test will pass regardless of the libnet version against which
      mausezahn is linked.
      
      Fixes: cab14d10 ("selftests: Add version of router_multipath.sh using nexthop objects")
      Fixes: 3d578d87 ("selftests: forwarding: Test IPv4 weighted nexthops")
      Signed-off-by: default avatarDanielle Ratson <danieller@nvidia.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      11df27f7