1. 25 Apr, 2024 13 commits
  2. 24 Apr, 2024 6 commits
  3. 23 Apr, 2024 2 commits
    • Jakub Kicinski's avatar
      tools: ynl: don't ignore errors in NLMSG_DONE messages · a44f2eb1
      Jakub Kicinski authored
      NLMSG_DONE contains an error code, it has to be extracted.
      Prior to this change all dumps will end in success,
      and in case of failure the result is silently truncated.
      
      Fixes: e4b48ed4 ("tools: ynl: add a completely generic client")
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      Reviewed-by: default avatarDonald Hunter <donald.hunter@gmail.com>
      Link: https://lore.kernel.org/r/20240420020827.3288615-1-kuba@kernel.orgSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      a44f2eb1
    • Duoming Zhou's avatar
      ax25: Fix netdev refcount issue · 467324bc
      Duoming Zhou authored
      The dev_tracker is added to ax25_cb in ax25_bind(). When the
      ax25 device is detaching, the dev_tracker of ax25_cb should be
      deallocated in ax25_kill_by_device() instead of the dev_tracker
      of ax25_dev. The log reported by ref_tracker is shown below:
      
      [   80.884935] ref_tracker: reference already released.
      [   80.885150] ref_tracker: allocated in:
      [   80.885349]  ax25_dev_device_up+0x105/0x540
      [   80.885730]  ax25_device_event+0xa4/0x420
      [   80.885730]  notifier_call_chain+0xc9/0x1e0
      [   80.885730]  __dev_notify_flags+0x138/0x280
      [   80.885730]  dev_change_flags+0xd7/0x180
      [   80.885730]  dev_ifsioc+0x6a9/0xa30
      [   80.885730]  dev_ioctl+0x4d8/0xd90
      [   80.885730]  sock_do_ioctl+0x1c2/0x2d0
      [   80.885730]  sock_ioctl+0x38b/0x4f0
      [   80.885730]  __se_sys_ioctl+0xad/0xf0
      [   80.885730]  do_syscall_64+0xc4/0x1b0
      [   80.885730]  entry_SYSCALL_64_after_hwframe+0x67/0x6f
      [   80.885730] ref_tracker: freed in:
      [   80.885730]  ax25_device_event+0x272/0x420
      [   80.885730]  notifier_call_chain+0xc9/0x1e0
      [   80.885730]  dev_close_many+0x272/0x370
      [   80.885730]  unregister_netdevice_many_notify+0x3b5/0x1180
      [   80.885730]  unregister_netdev+0xcf/0x120
      [   80.885730]  sixpack_close+0x11f/0x1b0
      [   80.885730]  tty_ldisc_kill+0xcb/0x190
      [   80.885730]  tty_ldisc_hangup+0x338/0x3d0
      [   80.885730]  __tty_hangup+0x504/0x740
      [   80.885730]  tty_release+0x46e/0xd80
      [   80.885730]  __fput+0x37f/0x770
      [   80.885730]  __x64_sys_close+0x7b/0xb0
      [   80.885730]  do_syscall_64+0xc4/0x1b0
      [   80.885730]  entry_SYSCALL_64_after_hwframe+0x67/0x6f
      [   80.893739] ------------[ cut here ]------------
      [   80.894030] WARNING: CPU: 2 PID: 140 at lib/ref_tracker.c:255 ref_tracker_free+0x47b/0x6b0
      [   80.894297] Modules linked in:
      [   80.894929] CPU: 2 PID: 140 Comm: ax25_conn_rel_6 Not tainted 6.9.0-rc4-g8cd26fd9 #11
      [   80.895190] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qem4
      [   80.895514] RIP: 0010:ref_tracker_free+0x47b/0x6b0
      [   80.895808] Code: 83 c5 18 4c 89 eb 48 c1 eb 03 8a 04 13 84 c0 0f 85 df 01 00 00 41 83 7d 00 00 75 4b 4c 89 ff 9
      [   80.896171] RSP: 0018:ffff888009edf8c0 EFLAGS: 00000286
      [   80.896339] RAX: 1ffff1100141ac00 RBX: 1ffff1100149463b RCX: dffffc0000000000
      [   80.896502] RDX: 0000000000000001 RSI: 0000000000000246 RDI: ffff88800a0d6518
      [   80.896925] RBP: ffff888009edf9b0 R08: ffff88806d3288d3 R09: 1ffff1100da6511a
      [   80.897212] R10: dffffc0000000000 R11: ffffed100da6511b R12: ffff88800a4a31d4
      [   80.897859] R13: ffff88800a4a31d8 R14: dffffc0000000000 R15: ffff88800a0d6518
      [   80.898279] FS:  00007fd88b7fe700(0000) GS:ffff88806d300000(0000) knlGS:0000000000000000
      [   80.899436] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [   80.900181] CR2: 00007fd88c001d48 CR3: 000000000993e000 CR4: 00000000000006f0
      ...
      [   80.935774] ref_tracker: sp%d@000000000bb9df3d has 1/1 users at
      [   80.935774]      ax25_bind+0x424/0x4e0
      [   80.935774]      __sys_bind+0x1d9/0x270
      [   80.935774]      __x64_sys_bind+0x75/0x80
      [   80.935774]      do_syscall_64+0xc4/0x1b0
      [   80.935774]      entry_SYSCALL_64_after_hwframe+0x67/0x6f
      
      Change ax25_dev->dev_tracker to the dev_tracker of ax25_cb
      in order to mitigate the bug.
      
      Fixes: feef318c ("ax25: fix UAF bugs of net_device caused by rebinding operation")
      Signed-off-by: default avatarDuoming Zhou <duoming@zju.edu.cn>
      Link: https://lore.kernel.org/r/20240419020456.29826-1-duoming@zju.edu.cnSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      467324bc
  4. 22 Apr, 2024 11 commits
    • Paul Geurts's avatar
      NFC: trf7970a: disable all regulators on removal · 6bea4f03
      Paul Geurts authored
      During module probe, regulator 'vin' and 'vdd-io' are used and enabled,
      but the vdd-io regulator overwrites the 'vin' regulator pointer. During
      remove, only the vdd-io is disabled, as the vin regulator pointer is not
      available anymore. When regulator_put() is called during resource
      cleanup a kernel warning is given, as the regulator is still enabled.
      
      Store the two regulators in separate pointers and disable both the
      regulators on module remove.
      
      Fixes: 49d22c70 ("NFC: trf7970a: Add device tree option of 1.8 Volt IO voltage")
      Signed-off-by: default avatarPaul Geurts <paul_geurts@live.nl>
      Reviewed-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
      Link: https://lore.kernel.org/r/DB7PR09MB26847A4EBF88D9EDFEB1DA0F950E2@DB7PR09MB2684.eurprd09.prod.outlook.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      6bea4f03
    • David Christensen's avatar
      MAINTAINERS: eth: mark IBM eHEA as an Orphan · 97ec32b5
      David Christensen authored
      Current maintainer Douglas Miller has left IBM and no replacement has
      been assigned for the driver. The eHEA hardware was last used on
      IBM POWER7 systems, the last of which reached end-of-support at the
      end of 2020.
      Signed-off-by: default avatarDavid Christensen <drc@linux.ibm.com>
      Reviewed-by: default avatarPradeep Satyanarayana <pradeeps@linux.ibm.com>
      Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
      Link: https://lore.kernel.org/r/20240418195517.528577-1-drc@linux.ibm.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      97ec32b5
    • Matthias Schiffer's avatar
      net: dsa: mv88e6xx: fix supported_interfaces setup in mv88e6250_phylink_get_caps() · a4e38990
      Matthias Schiffer authored
      With the recent PHYLINK changes requiring supported_interfaces to be set,
      MV88E6250 family switches like the 88E6020 fail to probe - cmode is
      never initialized on these devices, so mv88e6250_phylink_get_caps() does
      not set any supported_interfaces flags.
      
      Instead of a cmode, on 88E6250 we have a read-only port mode value that
      encodes similar information. There is no reason to bother mapping port
      mode to the cmodes of other switch models; instead we introduce a
      mv88e6250_setup_supported_interfaces() that is called directly from
      mv88e6250_phylink_get_caps().
      
      Fixes: de5c9bf4 ("net: phylink: require supported_interfaces to be filled")
      Signed-off-by: default avatarMatthias Schiffer <matthias.schiffer@ew.tq-group.com>
      Link: https://lore.kernel.org/r/20240417103737.166651-1-matthias.schiffer@ew.tq-group.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      a4e38990
    • David S. Miller's avatar
      Merge branch 'bnxt_en-aer-fixes' · 9e91bf75
      David S. Miller authored
      Michael Chan says:
      
      ====================
      bnxt_en: AER fixes
      
      This patchset fixes issues in the AER recovery logic.  The first patch
      refactors the code to make a shutdown function available for AER fatal
      errors.  The second patch fixes the AER fatal recovery logic.  The
      third patch fixes the health register logic to fix AER recovery failure
      for the new P7 chips.
      ====================
      Signed-off-by: default avatarArınç ÜNAL <arinc.unal@arinc9.com>
      9e91bf75
    • Michael Chan's avatar
      bnxt_en: Fix error recovery for 5760X (P7) chips · 41e54045
      Michael Chan authored
      During error recovery, such as AER fatal error slot reset, we call
      bnxt_try_map_fw_health_reg() to try to get access to the health
      register to determine the firmware state.  Fix
      bnxt_try_map_fw_health_reg() to recognize the P7 chip correctly
      and set up the health register.
      
      This fixes this type of AER slot reset failure:
      
      bnxt_en 0000:04:00.0: AER: PCIe Bus Error: severity=Uncorrectable (Fatal), type=Inaccessible, (Unregistered Agent ID)
      bnxt_en 0000:04:00.0 enp4s0f0np0: PCI I/O error detected
      bnxt_en 0000:04:00.0 bnxt_re0: Handle device suspend call
      bnxt_en 0000:04:00.1 enp4s0f1np1: PCI I/O error detected
      bnxt_en 0000:04:00.1 bnxt_re1: Handle device suspend call
      pcieport 0000:00:02.0: AER: Root Port link has been reset (0)
      bnxt_en 0000:04:00.0 enp4s0f0np0: PCI Slot Reset
      bnxt_en 0000:04:00.0: enabling device (0000 -> 0002)
      bnxt_en 0000:04:00.0: Firmware not ready
      bnxt_en 0000:04:00.1 enp4s0f1np1: PCI Slot Reset
      bnxt_en 0000:04:00.1: enabling device (0000 -> 0002)
      bnxt_en 0000:04:00.1: Firmware not ready
      pcieport 0000:00:02.0: AER: device recovery failed
      
      Fixes: a432a45b ("bnxt_en: Define basic P7 macros")
      Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      41e54045
    • Vikas Gupta's avatar
      bnxt_en: Fix the PCI-AER routines · a1acdc22
      Vikas Gupta authored
      We do not support two simultaneous recoveries so check for reset
      flag, BNXT_STATE_IN_FW_RESET, and do not proceed with AER further.
      When the pci channel state is pci_channel_io_frozen, the PCIe link
      can not be trusted so we disable the traffic immediately and stop
      BAR access by calling bnxt_fw_fatal_close().  BAR access after
      AER fatal error can cause an NMI.
      
      Fixes: f75d9a0a ("bnxt_en: Re-write PCI BARs after PCI fatal error.")
      Signed-off-by: default avatarVikas Gupta <vikas.gupta@broadcom.com>
      Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a1acdc22
    • Vikas Gupta's avatar
      bnxt_en: refactor reset close code · 7474b1c8
      Vikas Gupta authored
      Introduce bnxt_fw_fatal_close() API which can be used
      to stop data path and disable device when firmware
      is in fatal state.
      Signed-off-by: default avatarVikas Gupta <vikas.gupta@broadcom.com>
      Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7474b1c8
    • Hangbin Liu's avatar
      bridge/br_netlink.c: no need to return void function · 4fd1edcd
      Hangbin Liu authored
      br_info_notify is a void function. There is no need to return.
      
      Fixes: b6d0425b ("bridge: cfm: Netlink Notifications.")
      Signed-off-by: default avatarHangbin Liu <liuhangbin@gmail.com>
      Acked-by: default avatarNikolay Aleksandrov <razor@blackwall.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4fd1edcd
    • Alex Elder's avatar
      mailmap: add entries for Alex Elder · 70dcdf5f
      Alex Elder authored
      Define my kernel.org address to be the canonical one, and add mailmap
      entries for the various addresses (including typos) that have been
      used over the years.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      70dcdf5f
    • Eric Dumazet's avatar
      icmp: prevent possible NULL dereferences from icmp_build_probe() · c58e88d4
      Eric Dumazet authored
      First problem is a double call to __in_dev_get_rcu(), because
      the second one could return NULL.
      
      if (__in_dev_get_rcu(dev) && __in_dev_get_rcu(dev)->ifa_list)
      
      Second problem is a read from dev->ip6_ptr with no NULL check:
      
      if (!list_empty(&rcu_dereference(dev->ip6_ptr)->addr_list))
      
      Use the correct RCU API to fix these.
      
      v2: add missing include <net/addrconf.h>
      
      Fixes: d329ea5b ("icmp: add response to RFC 8335 PROBE messages")
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Andreas Roeseler <andreas.a.roeseler@gmail.com>
      Reviewed-by: default avatarDavid Ahern <dsahern@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c58e88d4
    • Daniele Palmas's avatar
      net: usb: qmi_wwan: add Telit FN920C04 compositions · 0b8fe5bd
      Daniele Palmas authored
      Add the following Telit FN920C04 compositions:
      
      0x10a0: rmnet + tty (AT/NMEA) + tty (AT) + tty (diag)
      T:  Bus=03 Lev=01 Prnt=03 Port=06 Cnt=01 Dev#=  5 Spd=480  MxCh= 0
      D:  Ver= 2.01 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
      P:  Vendor=1bc7 ProdID=10a0 Rev=05.15
      S:  Manufacturer=Telit Cinterion
      S:  Product=FN920
      S:  SerialNumber=92c4c4d8
      C:  #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=500mA
      I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=50 Driver=qmi_wwan
      E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
      I:  If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=60 Driver=option
      E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=84(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
      I:  If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
      E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=86(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
      I:  If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option
      E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      
      0x10a4: rmnet + tty (AT) + tty (AT) + tty (diag)
      T:  Bus=03 Lev=01 Prnt=03 Port=06 Cnt=01 Dev#=  8 Spd=480  MxCh= 0
      D:  Ver= 2.01 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
      P:  Vendor=1bc7 ProdID=10a4 Rev=05.15
      S:  Manufacturer=Telit Cinterion
      S:  Product=FN920
      S:  SerialNumber=92c4c4d8
      C:  #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=500mA
      I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=50 Driver=qmi_wwan
      E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
      I:  If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
      E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=84(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
      I:  If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
      E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=86(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
      I:  If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option
      E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      
      0x10a9: rmnet + tty (AT) + tty (diag) + DPL (data packet logging) + adb
      T:  Bus=03 Lev=01 Prnt=03 Port=06 Cnt=01 Dev#=  9 Spd=480  MxCh= 0
      D:  Ver= 2.01 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
      P:  Vendor=1bc7 ProdID=10a9 Rev=05.15
      S:  Manufacturer=Telit Cinterion
      S:  Product=FN920
      S:  SerialNumber=92c4c4d8
      C:  #Ifs= 5 Cfg#= 1 Atr=e0 MxPwr=500mA
      I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=50 Driver=qmi_wwan
      E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
      I:  If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
      E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=84(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
      I:  If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option
      E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      I:  If#= 3 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=80 Driver=(none)
      E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      I:  If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none)
      E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      Signed-off-by: default avatarDaniele Palmas <dnlplm@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0b8fe5bd
  5. 20 Apr, 2024 6 commits
  6. 19 Apr, 2024 2 commits
    • David Bauer's avatar
      vxlan: drop packets from invalid src-address · f58f45c1
      David Bauer authored
      The VXLAN driver currently does not check if the inner layer2
      source-address is valid.
      
      In case source-address snooping/learning is enabled, a entry in the FDB
      for the invalid address is created with the layer3 address of the tunnel
      endpoint.
      
      If the frame happens to have a non-unicast address set, all this
      non-unicast traffic is subsequently not flooded to the tunnel network
      but sent to the learnt host in the FDB. To make matters worse, this FDB
      entry does not expire.
      
      Apply the same filtering for packets as it is done for bridges. This not
      only drops these invalid packets but avoids them from being learnt into
      the FDB.
      
      Fixes: d342894c ("vxlan: virtual extensible lan")
      Suggested-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarDavid Bauer <mail@david-bauer.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f58f45c1
    • Duanqiang Wen's avatar
      net: libwx: fix alloc msix vectors failed · 69197dfc
      Duanqiang Wen authored
      driver needs queue msix vectors and one misc irq vector,
      but only queue vectors need irq affinity.
      when num_online_cpus is less than chip max msix vectors,
      driver will acquire (num_online_cpus + 1) vecotrs, and
      call pci_alloc_irq_vectors_affinity functions with affinity
      params without setting pre_vectors or post_vectors, it will
      cause return error code -ENOSPC.
      Misc irq vector is vector 0, driver need to set affinity params
      .pre_vectors = 1.
      
      Fixes: 3f703186 ("net: libwx: Add irq flow functions")
      Signed-off-by: default avatarDuanqiang Wen <duanqiangwen@net-swift.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      69197dfc