1. Jun 21, 2023
    • Greg Kroah-Hartman's avatar
      Merge v6.3.9 · ece8f5ed
      Greg Kroah-Hartman authored
      
      
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ece8f5ed
    • Greg Kroah-Hartman's avatar
    • Ming Lei's avatar
      blk-cgroup: Flush stats before releasing blkcg_gq · 0f6090d9
      Ming Lei authored
      commit 20cb1c2fb7568a6054c55defe044311397e01ddb upstream.
      
      As noted by Michal, the blkg_iostat_set's in the lockless list hold
      reference to blkg's to protect against their removal. Those blkg's
      hold reference to blkcg. When a cgroup is being destroyed,
      cgroup_rstat_flush() is only called at css_release_work_fn() which
      is called when the blkcg reference count reaches 0. This circular
      dependency will prevent blkcg and some blkgs from being freed after
      they are made offline.
      
      It is less a problem if the cgroup to be destroyed also has other
      controllers like memory that will call cgroup_rstat_flush() which will
      clean up the reference count. If block is the only controller that uses
      rstat, these offline blkcg and blkgs may never be freed leaking more
      and more memory over time.
      
      To prevent this potential memory leak:
      
      - flush blkcg per-cpu stats list in __blkg_release(), when no new stat
      can be added
      
      - add global blkg_stat_lock for covering concurrent parent blkg stat
      update
      
      - don't grab bio->bi_blkg reference when adding the stats into blkcg's
      per-cpu stat list since all stats are guaranteed to be consumed before
      releasing blkg instance, and grabbing blkg reference for stats was the
      most fragile part of original patch
      
      Based on Waiman's patch:
      
      https://lore.kernel.org/linux-block/20221215033132.230023-3-longman@redhat.com/
      
      Fixes: 3b8cc629
      
       ("blk-cgroup: Optimize blkcg_rstat_flush()")
      Cc: stable@vger.kernel.org
      Reported-by: default avatarJay Shin <jaeshin@redhat.com>
      Acked-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Waiman Long <longman@redhat.com>
      Cc: mkoutny@suse.com
      Cc: Yosry Ahmed <yosryahmed@google.com>
      Signed-off-by: default avatarMing Lei <ming.lei@redhat.com>
      Link: https://lore.kernel.org/r/20230609234249.1412858-1-ming.lei@redhat.com
      
      
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      0f6090d9
    • Bob Pearson's avatar
      scsi: target: core: Fix error path in target_setup_session() · 0c7d966f
      Bob Pearson authored
      
      
      commit 91271699228bfc66f1bc8abc0327169dc156d854 upstream.
      
      In the error exits in target_setup_session(), if a branch is taken to
      free_sess: transport_free_session() may call to target_free_cmd_counter()
      and then fall through to call target_free_cmd_counter() a second time.
      This can, and does, sometimes cause seg faults since the data field in
      cmd_cnt->refcnt has been freed in the first call.
      
      Fix this problem by simply returning after the call to
      transport_free_session(). The second call is redundant for those cases.
      
      Fixes: 4edba7e4a8f3 ("scsi: target: Move cmd counter allocation")
      Signed-off-by: default avatarBob Pearson <rpearsonhpe@gmail.com>
      Link: https://lore.kernel.org/r/20230613144259.12890-1-rpearsonhpe@gmail.com
      
      
      Reviewed-by: default avatarMike Christie <michael.christie@oracle.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      0c7d966f
    • Leon Romanovsky's avatar
      neighbour: delete neigh_lookup_nodev as not used · b0ec36dd
      Leon Romanovsky authored
      commit 76b9bf965c98c9b53ef7420b3b11438dbd764f92 upstream.
      
      neigh_lookup_nodev isn't used in the kernel after removal
      of DECnet. So let's remove it.
      
      Fixes: 1202cdd6
      
       ("Remove DECnet support from kernel")
      Signed-off-by: default avatarLeon Romanovsky <leonro@nvidia.com>
      Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
      Reviewed-by: default avatarNikolay Aleksandrov <razor@blackwall.org>
      Link: https://lore.kernel.org/r/eb5656200d7964b2d177a36b77efa3c597d6d72d.1678267343.git.leonro@nvidia.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b0ec36dd
    • Konrad Dybcio's avatar
      arm64: dts: qcom: sm8550: Use the correct LLCC register scheme · 1e022fa0
      Konrad Dybcio authored
      
      
      commit 661a4f089317c877aecd598fb70cd46510cc8d29 upstream.
      
      During the ABI-breaking (for good reasons) conversion of the LLCC
      register description, SM8550 was not taken into account, resulting
      in LLCC being broken on any kernel containing the patch referenced
      in the fixes tag.
      
      Fix it by describing the regions properly.
      
      Fixes: ee13b5008707 ("qcom: llcc/edac: Fix the base address used for accessing LLCC banks")
      Signed-off-by: default avatarKonrad Dybcio <konrad.dybcio@linaro.org>
      Acked-by: default avatarManivannan Sadhasivam <mani@kernel.org>
      Signed-off-by: default avatarBjorn Andersson <andersson@kernel.org>
      Link: https://lore.kernel.org/r/20230517-topic-kailua-llcc-v1-2-d57bd860c43e@linaro.org
      
      
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1e022fa0
    • Ben Hutchings's avatar
      parisc: Delete redundant register definitions in <asm/assembly.h> · cc798303
      Ben Hutchings authored
      
      
      commit b5b2a02bcaac7c287694aa0db4837a07bf178626 upstream.
      
      We define sp and ipsw in <asm/asmregs.h> using ".reg", and when using
      current binutils (snapshot 2.40.50.20230611) the definitions in
      <asm/assembly.h> using "=" conflict with those:
      
      arch/parisc/include/asm/assembly.h: Assembler messages:
      arch/parisc/include/asm/assembly.h:93: Error: symbol `sp' is already defined
      arch/parisc/include/asm/assembly.h:95: Error: symbol `ipsw' is already defined
      
      Delete the duplicate definitions in <asm/assembly.h>.
      
      Also delete the definition of gp, which isn't used anywhere.
      
      Signed-off-by: default avatarBen Hutchings <benh@debian.org>
      Cc: stable@vger.kernel.org # v6.0+
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      cc798303
    • David Howells's avatar
      afs: Fix vlserver probe RTT handling · b246f755
      David Howells authored
      [ Upstream commit ba00b190670809c1a89326d80de96d714f6004f2 ]
      
      In the same spirit as commit ca57f022 ("afs: Fix fileserver probe
      RTT handling"), don't rule out using a vlserver just because there
      haven't been enough packets yet to calculate a real rtt.  Always set the
      server's probe rtt from the estimate provided by rxrpc_kernel_get_srtt,
      which is capped at 1 second.
      
      This could lead to EDESTADDRREQ errors when accessing a cell for the
      first time, even though the vl servers are known and have responded to a
      probe.
      
      Fixes: 1d4adfaf
      
       ("rxrpc: Make rxrpc_kernel_get_srtt() indicate validity")
      Signed-off-by: default avatarMarc Dionne <marc.dionne@auristor.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      cc: linux-afs@lists.infradead.org
      Link: http://lists.infradead.org/pipermail/linux-afs/2023-June/006746.html
      
      
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      b246f755
    • Jiasheng Jiang's avatar
      octeon_ep: Add missing check for ioremap · c7329a5c
      Jiasheng Jiang authored
      [ Upstream commit 9a36e2d44d122fe73a2a76ba73f1d50a65cf8210 ]
      
      Add check for ioremap() and return the error if it fails in order to
      guarantee the success of ioremap().
      
      Fixes: 862cd659
      
       ("octeon_ep: Add driver framework and device initialization")
      Signed-off-by: default avatarJiasheng Jiang <jiasheng@iscas.ac.cn>
      Reviewed-by: default avatarKalesh AP <kalesh-anakkur.purayil@broadcom.com>
      Link: https://lore.kernel.org/r/20230615033400.2971-1-jiasheng@iscas.ac.cn
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      c7329a5c
    • Alex Maftei's avatar
      selftests/ptp: Fix timestamp printf format for PTP_SYS_OFFSET · bd64e928
      Alex Maftei authored
      [ Upstream commit 76a4c8b82938bc5020b67663db41f451684bf327 ]
      
      Previously, timestamps were printed using "%lld.%u" which is incorrect
      for nanosecond values lower than 100,000,000 as they're fractional
      digits, therefore leading zeros are meaningful.
      
      This patch changes the format strings to "%lld.%09u" in order to add
      leading zeros to the nanosecond value.
      
      Fixes: 568ebc59 ("ptp: add the PTP_SYS_OFFSET ioctl to the testptp program")
      Fixes: 4ec54f95 ("ptp: Fix compiler warnings in the testptp utility")
      Fixes: 6ab0e475
      
       ("Documentation: fix misc. warnings")
      Signed-off-by: default avatarAlex Maftei <alex.maftei@amd.com>
      Acked-by: default avatarRichard Cochran <richardcochran@gmail.com>
      Link: https://lore.kernel.org/r/20230615083404.57112-1-alex.maftei@amd.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      bd64e928
    • Lin Ma's avatar
      net: tipc: resize nlattr array to correct size · 140f1527
      Lin Ma authored
      [ Upstream commit 44194cb1b6045dea33ae9a0d54fb7e7cd93a2e09 ]
      
      According to nla_parse_nested_deprecated(), the tb[] is supposed to the
      destination array with maxtype+1 elements. In current
      tipc_nl_media_get() and __tipc_nl_media_set(), a larger array is used
      which is unnecessary. This patch resize them to a proper size.
      
      Fixes: 1e55417d ("tipc: add media set to new netlink api")
      Fixes: 46f15c67
      
       ("tipc: add media get/dump to new netlink api")
      Signed-off-by: default avatarLin Ma <linma@zju.edu.cn>
      Reviewed-by: default avatarFlorian Westphal <fw@strlen.de>
      Reviewed-by: default avatarTung Nguyen <tung.q.nguyen@dektech.com.au>
      Link: https://lore.kernel.org/r/20230614120604.1196377-1-linma@zju.edu.cn
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      140f1527
    • Li Lingfeng's avatar
      dm: don't lock fs when the map is NULL during suspend or resume · 051f16ac
      Li Lingfeng authored
      
      
      [ Upstream commit 2760904d895279f87196f0fa9ec570c79fe6a2e4 ]
      
      As described in commit 38d11da522aa ("dm: don't lock fs when the map is
      NULL in process of resume"), a deadlock may be triggered between
      do_resume() and do_mount().
      
      This commit preserves the fix from commit 38d11da522aa but moves it to
      where it also serves to fix a similar deadlock between do_suspend()
      and do_mount().  It does so, if the active map is NULL, by clearing
      DM_SUSPEND_LOCKFS_FLAG in dm_suspend() which is called by both
      do_suspend() and do_resume().
      
      Fixes: 38d11da522aa ("dm: don't lock fs when the map is NULL in process of resume")
      Signed-off-by: default avatarLi Lingfeng <lilingfeng3@huawei.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@kernel.org>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      051f16ac
    • Íñigo Huguet's avatar
      sfc: fix XDP queues mode with legacy IRQ · 7e06e393
      Íñigo Huguet authored
      [ Upstream commit e84a1e1e683f3558e30f437d7c99df35afb8b52c ]
      
      In systems without MSI-X capabilities, xdp_txq_queues_mode is calculated
      in efx_allocate_msix_channels, but when enabling MSI-X fails, it was not
      changed to a proper default value. This was leading to the driver
      thinking that it has dedicated XDP queues, when it didn't.
      
      Fix it by setting xdp_txq_queues_mode to the correct value if the driver
      fallbacks to MSI or legacy IRQ mode. The correct value is
      EFX_XDP_TX_QUEUES_BORROWED because there are no XDP dedicated queues.
      
      The issue can be easily visible if the kernel is started with pci=nomsi,
      then a call trace is shown. It is not shown only with sfc's modparam
      interrupt_mode=2. Call trace example:
       WARNING: CPU: 2 PID: 663 at drivers/net/ethernet/sfc/efx_channels.c:828 efx_set_xdp_channels+0x124/0x260 [sfc]
       [...skip...]
       Call Trace:
        <TASK>
        efx_set_channels+0x5c/0xc0 [sfc]
        efx_probe_nic+0x9b/0x15a [sfc]
        efx_probe_all+0x10/0x1a2 [sfc]
        efx_pci_probe_main+0x12/0x156 [sfc]
        efx_pci_probe_post_io+0x18/0x103 [sfc]
        efx_pci_probe.cold+0x154/0x257 [sfc]
        local_pci_probe+0x42/0x80
      
      Fixes: 6215b608
      
       ("sfc: last resort fallback for lack of xdp tx queues")
      Reported-by: default avatarYanghang Liu <yanghliu@redhat.com>
      Signed-off-by: default avatarÍñigo Huguet <ihuguet@redhat.com>
      Acked-by: default avatarMartin Habets <habetsm.xilinx@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      7e06e393
    • Fedor Pchelkin's avatar
      net: macsec: fix double free of percpu stats · e6ebb822
      Fedor Pchelkin authored
      [ Upstream commit 0c0cf3db83f8c7c9bb141c2771a34043bcf952ef ]
      
      Inside macsec_add_dev() we free percpu macsec->secy.tx_sc.stats and
      macsec->stats on some of the memory allocation failure paths. However, the
      net_device is already registered to that moment: in macsec_newlink(), just
      before calling macsec_add_dev(). This means that during unregister process
      its priv_destructor - macsec_free_netdev() - will be called and will free
      the stats again.
      
      Remove freeing percpu stats inside macsec_add_dev() because
      macsec_free_netdev() will correctly free the already allocated ones. The
      pointers to unallocated stats stay NULL, and free_percpu() treats that
      correctly.
      
      Found by Linux Verification Center (linuxtesting.org) with Syzkaller.
      
      Fixes: 0a28bfd4 ("net/macsec: Add MACsec skb_metadata_dst Tx Data path support")
      Fixes: c09440f7
      
       ("macsec: introduce IEEE 802.1AE driver")
      Signed-off-by: default avatarFedor Pchelkin <pchelkin@ispras.ru>
      Reviewed-by: default avatarSabrina Dubroca <sd@queasysnail.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      e6ebb822
    • Eric Dumazet's avatar
      net: lapbether: only support ethernet devices · 4a9ef83a
      Eric Dumazet authored
      [ Upstream commit 9eed321cde22fc1afd76eac563ce19d899e0d6b2 ]
      
      It probbaly makes no sense to support arbitrary network devices
      for lapbether.
      
      syzbot reported:
      
      skbuff: skb_under_panic: text:ffff80008934c100 len:44 put:40 head:ffff0000d18dd200 data:ffff0000d18dd1ea tail:0x16 end:0x140 dev:bond1
      kernel BUG at net/core/skbuff.c:200 !
      Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP
      Modules linked in:
      CPU: 0 PID: 5643 Comm: dhcpcd Not tainted 6.4.0-rc5-syzkaller-g4641cff8e810 #0
      Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023
      pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
      pc : skb_panic net/core/skbuff.c:196 [inline]
      pc : skb_under_panic+0x13c/0x140 net/core/skbuff.c:210
      lr : skb_panic net/core/skbuff.c:196 [inline]
      lr : skb_under_panic+0x13c/0x140 net/core/skbuff.c:210
      sp : ffff8000973b7260
      x29: ffff8000973b7270 x28: ffff8000973b7360 x27: dfff800000000000
      x26: ffff0000d85d8150 x25: 0000000000000016 x24: ffff0000d18dd1ea
      x23: ffff0000d18dd200 x22: 000000000000002c x21: 0000000000000140
      x20: 0000000000000028 x19: ffff80008934c100 x18: ffff8000973b68a0
      x17: 0000000000000000 x16: ffff80008a43bfbc x15: 0000000000000202
      x14: 0000000000000000 x13: 0000000000000001 x12: 0000000000000001
      x11: 0000000000000201 x10: 0000000000000000 x9 : f22f7eb937cced00
      x8 : f22f7eb937cced00 x7 : 0000000000000001 x6 : 0000000000000001
      x5 : ffff8000973b6b78 x4 : ffff80008df9ee80 x3 : ffff8000805974f4
      x2 : 0000000000000001 x1 : 0000000100000201 x0 : 0000000000000086
      Call trace:
      skb_panic net/core/skbuff.c:196 [inline]
      skb_under_panic+0x13c/0x140 net/core/skbuff.c:210
      skb_push+0xf0/0x108 net/core/skbuff.c:2409
      ip6gre_header+0xbc/0x738 net/ipv6/ip6_gre.c:1383
      dev_hard_header include/linux/netdevice.h:3137 [inline]
      lapbeth_data_transmit+0x1c4/0x298 drivers/net/wan/lapbether.c:257
      lapb_data_transmit+0x8c/0xb0 net/lapb/lapb_iface.c:447
      lapb_transmit_buffer+0x178/0x204 net/lapb/lapb_out.c:149
      lapb_send_control+0x220/0x320 net/lapb/lapb_subr.c:251
      lapb_establish_data_link+0x94/0xec
      lapb_device_event+0x348/0x4e0
      notifier_call_chain+0x1a4/0x510 kernel/notifier.c:93
      raw_notifier_call_chain+0x3c/0x50 kernel/notifier.c:461
      __dev_notify_flags+0x2bc/0x544
      dev_change_flags+0xd0/0x15c net/core/dev.c:8643
      devinet_ioctl+0x858/0x17e4 net/ipv4/devinet.c:1150
      inet_ioctl+0x2ac/0x4d8 net/ipv4/af_inet.c:979
      sock_do_ioctl+0x134/0x2dc net/socket.c:1201
      sock_ioctl+0x4ec/0x858 net/socket.c:1318
      vfs_ioctl fs/ioctl.c:51 [inline]
      __do_sys_ioctl fs/ioctl.c:870 [inline]
      __se_sys_ioctl fs/ioctl.c:856 [inline]
      __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:856
      __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
      invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
      el0_svc_common+0x138/0x244 arch/arm64/kernel/syscall.c:142
      do_el0_svc+0x64/0x198 arch/arm64/kernel/syscall.c:191
      el0_svc+0x4c/0x160 arch/arm64/kernel/entry-common.c:647
      el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:665
      el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:591
      Code: aa1803e6 aa1903e7 a90023f5 947730f5 (d4210000)
      
      Fixes: 1da177e4
      
       ("Linux-2.6.12-rc2")
      Reported-by: default avatarsyzbot <syzkaller@googlegroups.com>
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Martin Schiller <ms@dev.tdt.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      4a9ef83a
    • Vladimir Oltean's avatar
      net: dsa: felix: fix taprio guard band overflow at 10Mbps with jumbo frames · 514c54ca
      Vladimir Oltean authored
      [ Upstream commit 6ac7a27a8b07588497ed53dfd885df9c72bc67e0 ]
      
      The DEV_MAC_MAXLEN_CFG register contains a 16-bit value - up to 65535.
      Plus 2 * VLAN_HLEN (4), that is up to 65543.
      
      The picos_per_byte variable is the largest when "speed" is lowest -
      SPEED_10 = 10. In that case it is (1000000L * 8) / 10 = 800000.
      
      Their product - 52434400000 - exceeds 32 bits, which is a problem,
      because apparently, a multiplication between two 32-bit factors is
      evaluated as 32-bit before being assigned to a 64-bit variable.
      In fact it's a problem for any MTU value larger than 5368.
      
      Cast one of the factors of the multiplication to u64 to force the
      multiplication to take place on 64 bits.
      
      Issue found by Coverity.
      
      Fixes: 55a515b1
      
       ("net: dsa: felix: drop oversized frames with tc-taprio instead of hanging the port")
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
      Link: https://lore.kernel.org/r/20230613170907.2413559-1-vladimir.oltean@nxp.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      514c54ca
    • Vlad Buslov's avatar
      net/sched: cls_api: Fix lockup on flushing explicitly created chain · 7c38cc7b
      Vlad Buslov authored
      [ Upstream commit c9a82bec02c339cdda99b37c5e62b3b71fc4209c ]
      
      Mingshuai Ren reports:
      
      When a new chain is added by using tc, one soft lockup alarm will be
       generated after delete the prio 0 filter of the chain. To reproduce
       the problem, perform the following steps:
      (1) tc qdisc add dev eth0 root handle 1: htb default 1
      (2) tc chain add dev eth0
      (3) tc filter del dev eth0 chain 0 parent 1: prio 0
      (4) tc filter add dev eth0 chain 0 parent 1:
      
      Fix the issue by accounting for additional reference to chains that are
      explicitly created by RTM_NEWCHAIN message as opposed to implicitly by
      RTM_NEWTFILTER message.
      
      Fixes: 726d0612
      
       ("net: sched: prevent insertion of new classifiers during chain flush")
      Reported-by: default avatarMingshuai Ren <renmingshuai@huawei.com>
      Closes: https://lore.kernel.org/lkml/87legswvi3.fsf@nvidia.com/T/
      
      
      Signed-off-by: default avatarVlad Buslov <vladbu@nvidia.com>
      Link: https://lore.kernel.org/r/20230612093426.2867183-1-vladbu@nvidia.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      7c38cc7b
    • Jakub Buchocki's avatar
      ice: Fix ice module unload · 19e6b85e
      Jakub Buchocki authored
      [ Upstream commit 24b454bc354ab7b1aa918a4fe3d7696516f592d4 ]
      
      Clearing the interrupt scheme before PFR reset,
      during the removal routine, could cause the hardware
      errors and possibly lead to system reboot, as the PF
      reset can cause the interrupt to be generated.
      
      Place the call for PFR reset inside ice_deinit_dev(),
      wait until reset and all pending transactions are done,
      then call ice_clear_interrupt_scheme().
      
      This introduces a PFR reset to multiple error paths.
      
      Additionally, remove the call for the reset from
      ice_load() - it will be a part of ice_unload() now.
      
      Error example:
      [   75.229328] ice 0000:ca:00.1: Failed to read Tx Scheduler Tree - User Selection data from flash
      [   77.571315] {1}[Hardware Error]: Hardware error from APEI Generic Hardware Error Source: 1
      [   77.571418] {1}[Hardware Error]: event severity: recoverable
      [   77.571459] {1}[Hardware Error]:  Error 0, type: recoverable
      [   77.571500] {1}[Hardware Error]:   section_type: PCIe error
      [   77.571540] {1}[Hardware Error]:   port_type: 4, root port
      [   77.571580] {1}[Hardware Error]:   version: 3.0
      [   77.571615] {1}[Hardware Error]:   command: 0x0547, status: 0x4010
      [   77.571661] {1}[Hardware Error]:   device_id: 0000:c9:02.0
      [   77.571703] {1}[Hardware Error]:   slot: 25
      [   77.571736] {1}[Hardware Error]:   secondary_bus: 0xca
      [   77.571773] {1}[Hardware Error]:   vendor_id: 0x8086, device_id: 0x347a
      [   77.571821] {1}[Hardware Error]:   class_code: 060400
      [   77.571858] {1}[Hardware Error]:   bridge: secondary_status: 0x2800, control: 0x0013
      [   77.572490] pcieport 0000:c9:02.0: AER: aer_status: 0x00200000, aer_mask: 0x00100020
      [   77.572870] pcieport 0000:c9:02.0:    [21] ACSViol                (First)
      [   77.573222] pcieport 0000:c9:02.0: AER: aer_layer=Transaction Layer, aer_agent=Receiver ID
      [   77.573554] pcieport 0000:c9:02.0: AER: aer_uncor_severity: 0x00463010
      [   77.691273] {2}[Hardware Error]: Hardware error from APEI Generic Hardware Error Source: 1
      [   77.691738] {2}[Hardware Error]: event severity: recoverable
      [   77.691971] {2}[Hardware Error]:  Error 0, type: recoverable
      [   77.692192] {2}[Hardware Error]:   section_type: PCIe error
      [   77.692403] {2}[Hardware Error]:   port_type: 4, root port
      [   77.692616] {2}[Hardware Error]:   version: 3.0
      [   77.692825] {2}[Hardware Error]:   command: 0x0547, status: 0x4010
      [   77.693032] {2}[Hardware Error]:   device_id: 0000:c9:02.0
      [   77.693238] {2}[Hardware Error]:   slot: 25
      [   77.693440] {2}[Hardware Error]:   secondary_bus: 0xca
      [   77.693641] {2}[Hardware Error]:   vendor_id: 0x8086, device_id: 0x347a
      [   77.693853] {2}[Hardware Error]:   class_code: 060400
      [   77.694054] {2}[Hardware Error]:   bridge: secondary_status: 0x0800, control: 0x0013
      [   77.719115] pci 0000:ca:00.1: AER: can't recover (no error_detected callback)
      [   77.719140] pcieport 0000:c9:02.0: AER: device recovery failed
      [   77.719216] pcieport 0000:c9:02.0: AER: aer_status: 0x00200000, aer_mask: 0x00100020
      [   77.719390] pcieport 0000:c9:02.0:    [21] ACSViol                (First)
      [   77.719557] pcieport 0000:c9:02.0: AER: aer_layer=Transaction Layer, aer_agent=Receiver ID
      [   77.719723] pcieport 0000:c9:02.0: AER: aer_uncor_severity: 0x00463010
      
      Fixes: 5b246e53
      
       ("ice: split probe into smaller functions")
      Signed-off-by: default avatarJakub Buchocki <jakubx.buchocki@intel.com>
      Reviewed-by: default avatarPrzemek Kitszel <przemyslaw.kitszel@intel.com>
      Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
      Link: https://lore.kernel.org/r/20230612171421.21570-1-anthony.l.nguyen@intel.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      19e6b85e
    • Fabio M. De Francesco's avatar
      ext4: drop the call to ext4_error() from ext4_get_group_info() · 355cb62c
      Fabio M. De Francesco authored
      
      
      [ Upstream commit f451fd97dd2b78f286379203a47d9d295c467255 ]
      
      A recent patch added a call to ext4_error() which is problematic since
      some callers of the ext4_get_group_info() function may be holding a
      spinlock, whereas ext4_error() must never be called in atomic context.
      
      This triggered a report from Syzbot: "BUG: sleeping function called from
      invalid context in ext4_update_super" (see the link below).
      
      Therefore, drop the call to ext4_error() from ext4_get_group_info(). In
      the meantime use eight characters tabs instead of nine characters ones.
      
      Reported-by: default avatar <syzbot+4acc7d910e617b360859@syzkaller.appspotmail.com>
      Closes: https://lore.kernel.org/all/00000000000070575805fdc6cdb2@google.com/
      
      
      Fixes: 5354b2af3406 ("ext4: allow ext4_get_group_info() to fail")
      Suggested-by: default avatarTheodore Ts'o <tytso@mit.edu>
      Signed-off-by: default avatarFabio M. De Francesco <fmdefrancesco@gmail.com>
      Link: https://lore.kernel.org/r/20230614100446.14337-1-fmdefrancesco@gmail.com
      
      
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      355cb62c
    • Mauro Carvalho Chehab's avatar
      Revert "media: dvb-core: Fix use-after-free on race condition at dvb_frontend" · 7cfab4c9
      Mauro Carvalho Chehab authored
      [ Upstream commit ec21a38df77a5aefbd2f70c48127003b6f259cf3 ]
      
      As reported by Thomas Voegtle <tv@lio96.de>, sometimes a DVB card does
      not initialize properly booting Linux 6.4-rc4. This is not always, maybe
      in 3 out of 4 attempts.
      
      After double-checking, the root cause seems to be related to the
      UAF fix, which is causing a race issue:
      
      [   26.332149] tda10071 7-0005: found a 'NXP TDA10071' in cold state, will try to load a firmware
      [   26.340779] tda10071 7-0005: downloading firmware from file 'dvb-fe-tda10071.fw'
      [  989.277402] INFO: task vdr:743 blocked for more than 491 seconds.
      [  989.283504]       Not tainted 6.4.0-rc5-i5 #249
      [  989.288036] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
      [  989.295860] task:vdr             state:D stack:0     pid:743   ppid:711    flags:0x00004002
      [  989.295865] Call Trace:
      [  989.295867]  <TASK>
      [  989.295869]  __schedule+0x2ea/0x12d0
      [  989.295877]  ? asm_sysvec_apic_timer_interrupt+0x16/0x20
      [  989.295881]  schedule+0x57/0xc0
      [  989.295884]  schedule_preempt_disabled+0xc/0x20
      [  989.295887]  __mutex_lock.isra.16+0x237/0x480
      [  989.295891]  ? dvb_get_property.isra.10+0x1bc/0xa50
      [  989.295898]  ? dvb_frontend_stop+0x36/0x180
      [  989.338777]  dvb_frontend_stop+0x36/0x180
      [  989.338781]  dvb_frontend_open+0x2f1/0x470
      [  989.338784]  dvb_device_open+0x81/0xf0
      [  989.338804]  ? exact_lock+0x20/0x20
      [  989.338808]  chrdev_open+0x7f/0x1c0
      [  989.338811]  ? generic_permission+0x1a2/0x230
      [  989.338813]  ? link_path_walk.part.63+0x340/0x380
      [  989.338815]  ? exact_lock+0x20/0x20
      [  989.338817]  do_dentry_open+0x18e/0x450
      [  989.374030]  path_openat+0xca5/0xe00
      [  989.374031]  ? terminate_walk+0xec/0x100
      [  989.374034]  ? path_lookupat+0x93/0x140
      [  989.374036]  do_filp_open+0xc0/0x140
      [  989.374038]  ? __call_rcu_common.constprop.91+0x92/0x240
      [  989.374041]  ? __check_object_size+0x147/0x260
      [  989.374043]  ? __check_object_size+0x147/0x260
      [  989.374045]  ? alloc_fd+0xbb/0x180
      [  989.374048]  ? do_sys_openat2+0x243/0x310
      [  989.374050]  do_sys_openat2+0x243/0x310
      [  989.374052]  do_sys_open+0x52/0x80
      [  989.374055]  do_syscall_64+0x5b/0x80
      [  989.421335]  ? __task_pid_nr_ns+0x92/0xa0
      [  989.421337]  ? syscall_exit_to_user_mode+0x20/0x40
      [  989.421339]  ? do_syscall_64+0x67/0x80
      [  989.421341]  ? syscall_exit_to_user_mode+0x20/0x40
      [  989.421343]  ? do_syscall_64+0x67/0x80
      [  989.421345]  entry_SYSCALL_64_after_hwframe+0x63/0xcd
      [  989.421348] RIP: 0033:0x7fe895d067e3
      [  989.421349] RSP: 002b:00007fff933c2ba0 EFLAGS: 00000293 ORIG_RAX: 0000000000000101
      [  989.421351] RAX: ffffffffffffffda RBX: 00007fff933c2c10 RCX: 00007fe895d067e3
      [  989.421352] RDX: 0000000000000802 RSI: 00005594acdce160 RDI: 00000000ffffff9c
      [  989.421353] RBP: 0000000000000802 R08: 0000000000000000 R09: 0000000000000000
      [  989.421353] R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000001
      [  989.421354] R13: 00007fff933c2ca0 R14: 00000000ffffffff R15: 00007fff933c2c90
      [  989.421355]  </TASK>
      
      This reverts commit 6769a0b7ee0c3b31e1b22c3fadff2bfb642de23f.
      
      Fixes: 6769a0b7ee0c ("media: dvb-core: Fix use-after-free on race condition at dvb_frontend")
      Link: https://lore.kernel.org/all/da5382ad-09d6-20ac-0d53-611594b30861@lio96.de/
      
      
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      7cfab4c9
    • Bob Pearson's avatar
      RDMA/rxe: Fix rxe_cq_post · 4fd75daf
      Bob Pearson authored
      [ Upstream commit 0c7e314a6352664e12ec465f576cf039e95f8369 ]
      
      A recent patch replaced a tasklet execution of cq->comp_handler by a
      direct call. While this made sense it let changes to cq->notify state be
      unprotected and assumed that the cq completion machinery and the ulp done
      callbacks were reentrant. The result is that in some cases completion
      events can be lost. This patch moves the cq->comp_handler call inside of
      the spinlock in rxe_cq_post which solves both issues. This is compatible
      with the matching code in the request notify verb.
      
      Fixes: 78b26a335310 ("RDMA/rxe: Remove tasklet call from rxe_cq.c")
      Link: https://lore.kernel.org/r/20230612155032.17036-1-rpearsonhpe@gmail.com
      
      
      Signed-off-by: default avatarBob Pearson <rpearsonhpe@gmail.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      4fd75daf
    • Steve French's avatar
      cifs: fix lease break oops in xfstest generic/098 · 3d90b261
      Steve French authored
      
      
      [ Upstream commit c774e6779f38bf36f0cce65e30793704bab4b0d7 ]
      
      umount can race with lease break so need to check if
      tcon->ses->server is still valid to send the lease
      break response.
      
      Reviewed-by: default avatarBharath SM <bharathsm@microsoft.com>
      Reviewed-by: default avatarShyam Prasad N <sprasad@microsoft.com>
      Fixes: 59a556aebc43 ("SMB3: drop reference to cfile before sending oplock break")
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      3d90b261
    • Danielle Ratson's avatar
      selftests: forwarding: hw_stats_l3: Set addrgenmode in a separate step · 8edf4b9f
      Danielle Ratson authored
      [ Upstream commit bef68e201e538eaa3a91f97aae8161eb2d0a8ed7 ]
      
      Setting the IPv6 address generation mode of a net device during its
      creation never worked, but after commit b0ad3c179059 ("rtnetlink: call
      validate_linkmsg in rtnl_create_link") it explicitly fails [1]. The
      failure is caused by the fact that validate_linkmsg() is called before
      the net device is registered, when it still does not have an 'inet6_dev'.
      
      Likewise, raising the net device before setting the address generation
      mode is meaningless, because by the time the mode is set, the address
      has already been generated.
      
      Therefore, fix the test to first create the net device, then set its
      IPv6 address generation mode and finally bring it up.
      
      [1]
       # ip link add name mydev addrgenmode eui64 type dummy
       RTNETLINK answers: Address family not supported by protocol
      
      Fixes: ba95e793
      
       ("selftests: forwarding: hw_stats_l3: Add a new test")
      Signed-off-by: default avatarDanielle Ratson <danieller@nvidia.com>
      Reviewed-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
      Link: https://lore.kernel.org/r/f3b05d85b2bc0c3d6168fe8f7207c6c8365703db.1686580046.git.petrm@nvidia.com
      
      
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      8edf4b9f
    • Peilin Ye's avatar
      net/sched: qdisc_destroy() old ingress and clsact Qdiscs before grafting · 4ba62831
      Peilin Ye authored
      [ Upstream commit 84ad0af0bccd3691cb951c2974c5cb2c10594d4a ]
      
      mini_Qdisc_pair::p_miniq is a double pointer to mini_Qdisc, initialized
      in ingress_init() to point to net_device::miniq_ingress.  ingress Qdiscs
      access this per-net_device pointer in mini_qdisc_pair_swap().  Similar
      for clsact Qdiscs and miniq_egress.
      
      Unfortunately, after introducing RTNL-unlocked RTM_{NEW,DEL,GET}TFILTER
      requests (thanks Hillf Danton for the hint), when replacing ingress or
      clsact Qdiscs, for example, the old Qdisc ("@old") could access the same
      miniq_{in,e}gress pointer(s) concurrently with the new Qdisc ("@new"),
      causing race conditions [1] including a use-after-free bug in
      mini_qdisc_pair_swap() reported by syzbot:
      
       BUG: KASAN: slab-use-after-free in mini_qdisc_pair_swap+0x1c2/0x1f0 net/sched/sch_generic.c:1573
       Write of size 8 at addr ffff888045b31308 by task syz-executor690/14901
      ...
       Call Trace:
        <TASK>
        __dump_stack lib/dump_stack.c:88 [inline]
        dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106
        print_address_description.constprop.0+0x2c/0x3c0 mm/kasan/report.c:319
        print_report mm/kasan/report.c:430 [inline]
        kasan_report+0x11c/0x130 mm/kasan/report.c:536
        mini_qdisc_pair_swap+0x1c2/0x1f0 net/sched/sch_generic.c:1573
        tcf_chain_head_change_item net/sched/cls_api.c:495 [inline]
        tcf_chain0_head_change.isra.0+0xb9/0x120 net/sched/cls_api.c:509
        tcf_chain_tp_insert net/sched/cls_api.c:1826 [inline]
        tcf_chain_tp_insert_unique net/sched/cls_api.c:1875 [inline]
        tc_new_tfilter+0x1de6/0x2290 net/sched/cls_api.c:2266
      ...
      
      @old and @new should not affect each other.  In other words, @old should
      never modify miniq_{in,e}gress after @new, and @new should not update
      @old's RCU state.
      
      Fixing without changing sch_api.c turned out to be difficult (please
      refer to Closes: for discussions).  Instead, make sure @new's first call
      always happen after @old's last call (in {ingress,clsact}_destroy()) has
      finished:
      
      In qdisc_graft(), return -EBUSY if @old has any ongoing filter requests,
      and call qdisc_destroy() for @old before grafting @new.
      
      Introduce qdisc_refcount_dec_if_one() as the counterpart of
      qdisc_refcount_inc_nz() used for filter requests.  Introduce a
      non-static version of qdisc_destroy() that does a TCQ_F_BUILTIN check,
      just like qdisc_put() etc.
      
      Depends on patch "net/sched: Refactor qdisc_graft() for ingress and
      clsact Qdiscs".
      
      [1] To illustrate, the syzkaller reproducer adds ingress Qdiscs under
      TC_H_ROOT (no longer possible after commit c7cfbd115001 ("net/sched:
      sch_ingress: Only create under TC_H_INGRESS")) on eth0 that has 8
      transmission queues:
      
        Thread 1 creates ingress Qdisc A (containing mini Qdisc a1 and a2),
        then adds a flower filter X to A.
      
        Thread 2 creates another ingress Qdisc B (containing mini Qdisc b1 and
        b2) to replace A, then adds a flower filter Y to B.
      
       Thread 1               A's refcnt   Thread 2
        RTM_NEWQDISC (A, RTNL-locked)
         qdisc_create(A)               1
         qdisc_graft(A)                9
      
        RTM_NEWTFILTER (X, RTNL-unlocked)
         __tcf_qdisc_find(A)          10
         tcf_chain0_head_change(A)
         mini_qdisc_pair_swap(A) (1st)
                  |
                  |                         RTM_NEWQDISC (B, RTNL-locked)
               RCU sync                2     qdisc_graft(B)
                  |                    1     notify_and_destroy(A)
                  |
         tcf_block_release(A)          0    RTM_NEWTFILTER (Y, RTNL-unlocked)
         qdisc_destroy(A)                    tcf_chain0_head_change(B)
         tcf_chain0_head_change_cb_del(A)    mini_qdisc_pair_swap(B) (2nd)
         mini_qdisc_pair_swap(A) (3rd)                |
                 ...                                 ...
      
      Here, B calls mini_qdisc_pair_swap(), pointing eth0->miniq_ingress to
      its mini Qdisc, b1.  Then, A calls mini_qdisc_pair_swap() again during
      ingress_destroy(), setting eth0->miniq_ingress to NULL, so ingress
      packets on eth0 will not find filter Y in sch_handle_ingress().
      
      This is just one of the possible consequences of concurrently accessing
      miniq_{in,e}gress pointers.
      
      Fixes: 7a096d57 ("net: sched: ingress: set 'unlocked' flag for Qdisc ops")
      Fixes: 87f37392
      
       ("net: sched: ingress: set 'unlocked' flag for clsact Qdisc ops")
      Reported-by: default avatar <syzbot+b53a9c0d1ea4ad62da8b@syzkaller.appspotmail.com>
      Closes: https://lore.kernel.org/r/0000000000006cf87705f79acf1a@google.com/
      
      
      Cc: Hillf Danton <hdanton@sina.com>
      Cc: Vlad Buslov <vladbu@mellanox.com>
      Signed-off-by: default avatarPeilin Ye <peilin.ye@bytedance.com>
      Acked-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      4ba62831
    • Peilin Ye's avatar
      net/sched: Refactor qdisc_graft() for ingress and clsact Qdiscs · 2f3eba60
      Peilin Ye authored
      
      
      [ Upstream commit 2d5f6a8d7aef7852a9ecc555f88c673a1c91754f ]
      
      Grafting ingress and clsact Qdiscs does not need a for-loop in
      qdisc_graft().  Refactor it.  No functional changes intended.
      
      Tested-by: default avatarPedro Tammela <pctammela@mojatatu.com>
      Acked-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
      Reviewed-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
      Reviewed-by: default avatarVlad Buslov <vladbu@nvidia.com>
      Signed-off-by: default avatarPeilin Ye <peilin.ye@bytedance.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      Stable-dep-of: 84ad0af0bccd ("net/sched: qdisc_destroy() old ingress and clsact Qdiscs before grafting")
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      2f3eba60
    • Paul Blakey's avatar
      net/sched: act_ct: Fix promotion of offloaded unreplied tuple · e8ce1475
      Paul Blakey authored
      [ Upstream commit 41f2c7c342d3adb1c4dd5f2e3dd831adff16a669 ]
      
      Currently UNREPLIED and UNASSURED connections are added to the nf flow
      table. This causes the following connection packets to be processed
      by the flow table which then skips conntrack_in(), and thus such the
      connections will remain UNREPLIED and UNASSURED even if reply traffic
      is then seen. Even still, the unoffloaded reply packets are the ones
      triggering hardware update from new to established state, and if
      there aren't any to triger an update and/or previous update was
      missed, hardware can get out of sync with sw and still mark
      packets as new.
      
      Fix the above by:
      1) Not skipping conntrack_in() for UNASSURED packets, but still
         refresh for hardware, as before the cited patch.
      2) Try and force a refresh by reply-direction packets that update
         the hardware rules from new to established state.
      3) Remove any bidirectional flows that didn't failed to update in
         hardware for re-insertion as bidrectional once any new packet
         arrives.
      
      Fixes: 6a9bad00
      
       ("net/sched: act_ct: offload UDP NEW connections")
      Co-developed-by: default avatarVlad Buslov <vladbu@nvidia.com>
      Signed-off-by: default avatarVlad Buslov <vladbu@nvidia.com>
      Signed-off-by: default avatarPaul Blakey <paulb@nvidia.com>
      Reviewed-by: default avatarFlorian Westphal <fw@strlen.de>
      Link: https://lore.kernel.org/r/1686313379-117663-1-git-send-email-paulb@nvidia.com
      
      
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      e8ce1475
    • Vlad Buslov's avatar
      selftests/tc-testing: Fix SFB db test · 04f5f9b0
      Vlad Buslov authored
      [ Upstream commit b39d8c41c7a8336ce85c376b5d4906089524a0ae ]
      
      Setting very small value of db like 10ms introduces rounding errors when
      converting to/from jiffies on some kernel configs. For example, on 250hz
      the actual value will be set to 12ms which causes the test to fail:
      
       # $ sudo ./tdc.py  -d eth2 -e 3410
       #  -- ns/SubPlugin.__init__
       # Test 3410: Create SFB with db setting
       #
       # All test results:
       #
       # 1..1
       # not ok 1 3410 - Create SFB with db setting
       #         Could not match regex pattern. Verify command output:
       # qdisc sfb 1: root refcnt 2 rehash 600s db 12ms limit 1000p max 25p target 20p increment 0.000503548 decrement 4.57771e-05 penalty_rate 10pps penalty_burst 20p
      
      Set the value to 100ms instead which currently seem to work on 100hz,
      250hz, 300hz and 1000hz kernel configs.
      
      Fixes: 6ad92dc5
      
       ("selftests/tc-testing: add selftests for sfb qdisc")
      Signed-off-by: default avatarVlad Buslov <vladbu@nvidia.com>
      Reviewed-by: default avatarPedro Tammela <pctammela@mojatatu.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      04f5f9b0
    • Vlad Buslov's avatar
      selftests/tc-testing: Fix Error: failed to find target LOG · 082e289a
      Vlad Buslov authored
      [ Upstream commit b849c566ee9c6ed78288a522278dcaf419f8e239 ]
      
      Add missing netfilter config dependency.
      
      Fixes following example error when running tests via tdc.sh for all XT
      tests:
      
       # $ sudo ./tdc.py -d eth2 -e 2029
       # Test 2029: Add xt action with log-prefix
       # exit: 255
       # exit: 0
       #  failed to find target LOG
       #
       # bad action parsing
       # parse_action: bad value (7:xt)!
       # Illegal "action"
       #
       # -----> teardown stage *** Could not execute: "$TC actions flush action xt"
       #
       # -----> teardown stage *** Error message: "Error: Cannot flush unknown TC action.
       # We have an error flushing
       # "
       # returncode 1; expected [0]
       #
       # -----> teardown stage *** Aborting test run.
       #
       # <_io.BufferedReader name=3> *** stdout ***
       #
       # <_io.BufferedReader name=5> *** stderr ***
       # "-----> teardown stage" did not complete successfully
       # Exception <class '__main__.PluginMgrTestFail'> ('teardown', ' failed to find target LOG\n\nbad action parsing\nparse_action: bad value (7:xt)!\nIllegal "action"\n', '"-----> teardown stage" did not complete successfully') (caught in test_runner, running test 2 2029 Add xt action with log-prefix stage teardown)
       # ---------------
       # traceback
       #   File "/images/src/linux/tools/testing/selftests/tc-testing/./tdc.py", line 495, in test_runner
       #     res = run_one_test(pm, args, index, tidx)
       #   File "/images/src/linux/tools/testing/selftests/tc-testing/./tdc.py", line 434, in run_one_test
       #     prepare_env(args, pm, 'teardown', '-----> teardown stage', tidx['teardown'], procout)
       #   File "/images/src/linux/tools/testing/selftests/tc-testing/./tdc.py", line 245, in prepare_env
       #     raise PluginMgrTestFail(
       # ---------------
       # accumulated output for this test:
       #  failed to find target LOG
       #
       # bad action parsing
       # parse_action: bad value (7:xt)!
       # Illegal "action"
       #
       # ---------------
       #
       # All test results:
       #
       # 1..1
       # ok 1 2029 - Add xt action with log-prefix # skipped - "-----> teardown stage" did not complete successfully
      
      Fixes: 910d504b
      
       ("selftests/tc-testings: add selftests for xt action")
      Signed-off-by: default avatarVlad Buslov <vladbu@nvidia.com>
      Reviewed-by: default avatarPedro Tammela <pctammela@mojatatu.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      082e289a
    • Vlad Buslov's avatar
      selftests/tc-testing: Fix Error: Specified qdisc kind is unknown. · de1f9203
      Vlad Buslov authored
      [ Upstream commit aef6e908b54200d04f2d77dab31509fcff2e60ae ]
      
      All TEQL tests assume that sch_teql module is loaded. Load module in tdc.sh
      before running qdisc tests.
      
      Fixes following example error when running tests via tdc.sh for all TEQL
      tests:
      
       # $ sudo ./tdc.py -d eth2 -e 84a0
       #  -- ns/SubPlugin.__init__
       # Test 84a0: Create TEQL with default setting
       # exit: 2
       # exit: 0
       # Error: Specified qdisc kind is unknown.
       #
       # -----> teardown stage *** Could not execute: "$TC qdisc del dev $DUMMY handle 1: root"
       #
       # -----> teardown stage *** Error message: "Error: Invalid handle.
       # "
       # returncode 2; expected [0]
       #
       # -----> teardown stage *** Aborting test run.
       #
       # <_io.BufferedReader name=3> *** stdout ***
       #
       # <_io.BufferedReader name=5> *** stderr ***
       # "-----> teardown stage" did not complete successfully
       # Exception <class '__main__.PluginMgrTestFail'> ('teardown', 'Error: Specified qdisc kind is unknown.\n', '"-----> teardown stage" did not complete successfully') (caught in test_runner, running test 2 84a0 Create TEQL with default setting stage teardown)
       # ---------------
       # traceback
       #   File "/images/src/linux/tools/testing/selftests/tc-testing/./tdc.py", line 495, in test_runner
       #     res = run_one_test(pm, args, index, tidx)
       #   File "/images/src/linux/tools/testing/selftests/tc-testing/./tdc.py", line 434, in run_one_test
       #     prepare_env(args, pm, 'teardown', '-----> teardown stage', tidx['teardown'], procout)
       #   File "/images/src/linux/tools/testing/selftests/tc-testing/./tdc.py", line 245, in prepare_env
       #     raise PluginMgrTestFail(
       # ---------------
       # accumulated output for this test:
       # Error: Specified qdisc kind is unknown.
       #
       # ---------------
       #
       # All test results:
       #
       # 1..1
       # ok 1 84a0 - Create TEQL with default setting # skipped - "-----> teardown stage" did not complete successfully
      
      Fixes: cc62fbe1
      
       ("selftests/tc-testing: add selftests for teql qdisc")
      Signed-off-by: default avatarVlad Buslov <vladbu@nvidia.com>
      Reviewed-by: default avatarVictor Nogueira <victor@mojatatu.com>
      Reviewed-by: default avatarPedro Tammela <pctammela@mojatatu.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      de1f9203
    • Dan Carpenter's avatar
      net: ethernet: ti: am65-cpsw: Call of_node_put() on error path · 019d9b7d
      Dan Carpenter authored
      [ Upstream commit 374283a1001277e4d07491387aac1fad5aa08d43 ]
      
      This code returns directly but it should instead call of_node_put()
      to drop some reference counts.
      
      Fixes: dab2b265
      
       ("net: ethernet: ti: am65-cpsw: Add support for SERDES configuration")
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
      Reviewed-by: default avatarRoger Quadros <rogerq@kernel.org>
      Link: https://lore.kernel.org/r/e3012f0c-1621-40e6-bf7d-03c276f6e07f@kili.mountain
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      019d9b7d
    • Natalia Petrova's avatar
      drm/nouveau: add nv_encoder pointer check for NULL · 8e74c4f5
      Natalia Petrova authored
      [ Upstream commit 55b94bb8c42464bad3d2217f6874aa1a85664eac ]
      
      Pointer nv_encoder could be dereferenced at nouveau_connector.c
      in case it's equal to NULL by jumping to goto label.
      This patch adds a NULL-check to avoid it.
      
      Found by Linux Verification Center (linuxtesting.org) with SVACE.
      
      Fixes: 3195c5f9
      
       ("drm/nouveau: set encoder for lvds")
      Signed-off-by: default avatarNatalia Petrova <n.petrova@fintech.ru>
      Reviewed-by: default avatarLyude Paul <lyude@redhat.com>
      [Fixed patch title]
      Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20230512103320.82234-1-n.petrova@fintech.ru
      
      
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      8e74c4f5
    • Natalia Petrova's avatar
      drm/nouveau/dp: check for NULL nv_connector->native_mode · 61a69025
      Natalia Petrova authored
      [ Upstream commit 20a2ce87fbaf81e4c3dcb631d738e423959eb320 ]
      
      Add checking for NULL before calling nouveau_connector_detect_depth() in
      nouveau_connector_get_modes() function because nv_connector->native_mode
      could be dereferenced there since connector pointer passed to
      nouveau_connector_detect_depth() and the same value of
      nv_connector->native_mode is used there.
      
      Found by Linux Verification Center (linuxtesting.org) with SVACE.
      
      Fixes: d4c2c99b
      
       ("drm/nouveau/dp: remove broken display depth function, use the improved one")
      
      Signed-off-by: default avatarNatalia Petrova <n.petrova@fintech.ru>
      Reviewed-by: default avatarLyude Paul <lyude@redhat.com>
      Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20230512111526.82408-1-n.petrova@fintech.ru
      
      
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      61a69025
    • Su Hui's avatar
      drm/bridge: ti-sn65dsi86: Avoid possible buffer overflow · b59231e8
      Su Hui authored
      [ Upstream commit 95011f267c44a4d1f9ca1769e8a29ab2c559e004 ]
      
      Smatch error:buffer overflow 'ti_sn_bridge_refclk_lut' 5 <= 5.
      
      Fixes: cea86c5b
      
       ("drm/bridge: ti-sn65dsi86: Implement the pwm_chip")
      Signed-off-by: default avatarSu Hui <suhui@nfschina.com>
      Reviewed-by: default avatarDouglas Anderson <dianders@chromium.org>
      Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20230608012443.839372-1-suhui@nfschina.com
      
      
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      b59231e8
    • Ratchanan Srirattanamet's avatar
      drm/nouveau: don't detect DSM for non-NVIDIA device · b77d8c97
      Ratchanan Srirattanamet authored
      [ Upstream commit 11d24327c2d7ad7f24fcc44fb00e1fa91ebf6525 ]
      
      The call site of nouveau_dsm_pci_probe() uses single set of output
      variables for all invocations. So, we must not write anything to them
      unless it's an NVIDIA device. Otherwise, if we are called with another
      device after the NVIDIA device, we'll clober the result of the NVIDIA
      device.
      
      For example, if the other device doesn't have _PR3 resources, the
      detection later would miss the presence of power resource support, and
      the rest of the code will keep using Optimus DSM, breaking power
      management for that machine.
      
      Also, because we're detecting NVIDIA's DSM, it doesn't make sense to run
      this detection on a non-NVIDIA device anyway. Thus, check at the
      beginning of the detection code if this is an NVIDIA card, and just
      return if it isn't.
      
      This, together with commit d22915d2 ("drm/nouveau/devinit/tu102-:
      wait for GFW_BOOT_PROGRESS == COMPLETED") developed independently and
      landed earlier, fixes runtime power management of the NVIDIA card in
      Lenovo Legion 5-15ARH05. Without this patch, the GPU resumption code
      will "timeout", sometimes hanging userspace.
      
      As a bonus, we'll also stop preventing _PR3 usage from the bridge for
      unrelated devices, which is always nice, I guess.
      
      Fixes: ccfc2d5c
      
       ("drm/nouveau: Use generic helper to check _PR3 presence")
      Signed-off-by: default avatarRatchanan Srirattanamet <peathot@hotmail.com>
      Closes: https://gitlab.freedesktop.org/drm/nouveau/-/issues/79
      
      
      Reviewed-by: default avatarKarol Herbst <kherbst@redhat.com>
      Signed-off-by: default avatarKarol Herbst <kherbst@redhat.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/DM6PR19MB2780805D4BE1E3F9B3AC96D0BC409@DM6PR19MB2780.namprd19.prod.outlook.com
      
      
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      b77d8c97
    • Maxime Chevallier's avatar
      net: phylink: use a dedicated helper to parse usgmii control word · 264f7236
      Maxime Chevallier authored
      [ Upstream commit 923454c0368b8092e9d05c020f50abca577e7290 ]
      
      Q-USGMII is a derivative of USGMII, that uses a specific formatting for
      the control word. The layout is close to the USXGMII control word, but
      doesn't support speeds over 1Gbps. Use a dedicated decoding logic for
      the USGMII control word, re-using USXGMII definitions but only considering
      10/100/1000Mbps speeds
      
      Fixes: 5e61fe15
      
       ("net: phy: Introduce QUSGMII PHY mode")
      Signed-off-by: default avatarMaxime Chevallier <maxime.chevallier@bootlin.com>
      Reviewed-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      264f7236
    • Maxime Chevallier's avatar
      net: phylink: report correct max speed for QUSGMII · efb1315e
      Maxime Chevallier authored
      [ Upstream commit b9dc1046edfeb7d9dbc2272c8d9ad5a8c47f3199 ]
      
      Q-USGMII is the quad port version of USGMII, and supports a max speed of
      1Gbps on each line. Make so that phylink_interface_max_speed() reports
      this information correctly.
      
      Fixes: ae0e4bb2
      
       ("net: phylink: Adjust link settings based on rate matching")
      Signed-off-by: default avatarMaxime Chevallier <maxime.chevallier@bootlin.com>
      Reviewed-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      efb1315e
    • Aleksandr Loktionov's avatar
      igb: fix nvm.ops.read() error handling · 85f0c05f
      Aleksandr Loktionov authored
      [ Upstream commit 48a821fd58837800750ec1b3962f0f799630a844 ]
      
      Add error handling into igb_set_eeprom() function, in case
      nvm.ops.read() fails just quit with error code asap.
      
      Fixes: 9d5c8243
      
       ("igb: PCI-Express 82575 Gigabit Ethernet driver")
      Signed-off-by: default avatarAleksandr Loktionov <aleksandr.loktionov@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      85f0c05f
    • Vinicius Costa Gomes's avatar
      igc: Fix possible system crash when loading module · 8bd9a426
      Vinicius Costa Gomes authored
      [ Upstream commit c080fe262f9e73a00934b70c16b1479cf40cd2bd ]
      
      Guarantee that when probe() is run again, PTM and PCI busmaster will be
      in the same state as it was if the driver was never loaded.
      
      Avoid an i225/i226 hardware issue that PTM requests can be made even
      though PCI bus mastering is not enabled. These unexpected PTM requests
      can crash some systems.
      
      So, "force" disable PTM and busmastering before removing the driver,
      so they can be re-enabled in the right order during probe(). This is
      more like a workaround and should be applicable for i225 and i226, in
      any platform.
      
      Fixes: 1b5d73fb
      
       ("igc: Enable PCIe PTM")
      Signed-off-by: default avatarVinicius Costa Gomes <vinicius.gomes@intel.com>
      Reviewed-by: default avatarMuhammad Husaini Zulkifli <muhammad.husaini.zulkifli@intel.com>
      Tested-by: default avatarNaama Meir <naamax.meir@linux.intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      8bd9a426
    • Muhammad Husaini Zulkifli's avatar
      igc: Clean the TX buffer and TX descriptor ring · eb22ce98
      Muhammad Husaini Zulkifli authored
      [ Upstream commit e43516f5978d11d36511ce63d31d1da4db916510 ]
      
      There could be a race condition during link down where interrupt
      being generated and igc_clean_tx_irq() been called to perform the
      TX completion. Properly clear the TX buffer/descriptor ring and
      disable the TX Queue ring in igc_free_tx_resources() to avoid that.
      
      Kernel trace:
      [  108.237177] Hardware name: Intel Corporation Tiger Lake Client Platform/TigerLake U DDR4 SODIMM RVP, BIOS TGLIFUI1.R00.4204.A00.2105270302 05/27/2021
      [  108.237178] RIP: 0010:refcount_warn_saturate+0x55/0x110
      [  108.242143] RSP: 0018:ffff9e7980003db0 EFLAGS: 00010286
      [  108.245555] Code: 84 bc 00 00 00 c3 cc cc cc cc 85 f6 74 46 80 3d 20 8c 4d 01 00 75 ee 48 c7 c7 88 f4 03 ab c6 05 10 8c 4d 01 01 e8 0b 10 96 ff <0f> 0b c3 cc cc cc cc 80 3d fc 8b 4d 01 00 75 cb 48 c7 c7 b0 f4 03
      [  108.250434]
      [  108.250434] RSP: 0018:ffff9e798125f910 EFLAGS: 00010286
      [  108.254358] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
      [  108.259325]
      [  108.259325] RAX: 0000000000000000 RBX: ffff8ddb935b8000 RCX: 0000000000000027
      [  108.261868] RDX: ffff8de250a28800 RSI: ffff8de250a1c580 RDI: ffff8de250a1c580
      [  108.265538] RDX: 0000000000000027 RSI: 0000000000000002 RDI: ffff8de250a9c588
      [  108.265539] RBP: ffff8ddb935b8000 R08: ffffffffab2655a0 R09: ffff9e798125f898
      [  108.267914] RBP: ffff8ddb8a5b8d80 R08: 0000005648eba354 R09: 0000000000000000
      [  108.270196] R10: 0000000000000001 R11: 000000002d2d2d2d R12: ffff9e798125f948
      [  108.270197] R13: ffff9e798125fa1c R14: ffff8ddb8a5b8d80 R15: 7fffffffffffffff
      [  108.273001] R10: 000000002d2d2d2d R11: 000000002d2d2d2d R12: ffff8ddb8a5b8ed4
      [  108.276410] FS:  00007f605851b740(0000) GS:ffff8de250a80000(0000) knlGS:0000000000000000
      [  108.280597] R13: 00000000000002ac R14: 00000000ffffff99 R15: ffff8ddb92561b80
      [  108.282966] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  108.282967] CR2: 00007f053c039248 CR3: 0000000185850003 CR4: 0000000000f70ee0
      [  108.286206] FS:  0000000000000000(0000) GS:ffff8de250a00000(0000) knlGS:0000000000000000
      [  108.289701] PKRU: 55555554
      [  108.289702] Call Trace:
      [  108.289704]  <TASK>
      [  108.293977] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  108.297562]  sock_alloc_send_pskb+0x20c/0x240
      [  108.301494] CR2: 00007f053c03a168 CR3: 0000000184394002 CR4: 0000000000f70ef0
      [  108.301495] PKRU: 55555554
      [  108.306464]  __ip_append_data.isra.0+0x96f/0x1040
      [  108.309441] Call Trace:
      [  108.309443]  ? __pfx_ip_generic_getfrag+0x10/0x10
      [  108.314927]  <IRQ>
      [  108.314928]  sock_wfree+0x1c7/0x1d0
      [  108.318078]  ? __pfx_ip_generic_getfrag+0x10/0x10
      [  108.320276]  skb_release_head_state+0x32/0x90
      [  108.324812]  ip_make_skb+0xf6/0x130
      [  108.327188]  skb_release_all+0x16/0x40
      [  108.330775]  ? udp_sendmsg+0x9f3/0xcb0
      [  108.332626]  napi_consume_skb+0x48/0xf0
      [  108.334134]  ? xfrm_lookup_route+0x23/0xb0
      [  108.344285]  igc_poll+0x787/0x1620 [igc]
      [  108.346659]  udp_sendmsg+0x9f3/0xcb0
      [  108.360010]  ? ttwu_do_activate+0x40/0x220
      [  108.365237]  ? __pfx_ip_generic_getfrag+0x10/0x10
      [  108.366744]  ? try_to_wake_up+0x289/0x5e0
      [  108.376987]  ? sock_sendmsg+0x81/0x90
      [  108.395698]  ? __pfx_process_timeout+0x10/0x10
      [  108.395701]  sock_sendmsg+0x81/0x90
      [  108.409052]  __napi_poll+0x29/0x1c0
      [  108.414279]  ____sys_sendmsg+0x284/0x310
      [  108.419507]  net_rx_action+0x257/0x2d0
      [  108.438216]  ___sys_sendmsg+0x7c/0xc0
      [  108.439723]  __do_softirq+0xc1/0x2a8
      [  108.444950]  ? finish_task_switch+0xb4/0x2f0
      [  108.452077]  irq_exit_rcu+0xa9/0xd0
      [  108.453584]  ? __schedule+0x372/0xd00
      [  108.460713]  common_interrupt+0x84/0xa0
      [  108.467840]  ? clockevents_program_event+0x95/0x100
      [  108.474968]  </IRQ>
      [  108.482096]  ? do_nanosleep+0x88/0x130
      [  108.489224]  <TASK>
      [  108.489225]  asm_common_interrupt+0x26/0x40
      [  108.496353]  ? __rseq_handle_notify_resume+0xa9/0x4f0
      [  108.503478] RIP: 0010:cpu_idle_poll+0x2c/0x100
      [  108.510607]  __sys_sendmsg+0x5d/0xb0
      [  108.518687] Code: 05 e1 d9 c8 00 65 8b 15 de 64 85 55 85 c0 7f 57 e8 b9 ef ff ff fb 65 48 8b 1c 25 00 cc 02 00 48 8b 03 a8 08 74 0b eb 1c f3 90 <48> 8b 03 a8 08 75 13 8b 05 77 63 cd 00 85 c0 75 ed e8 ce ec ff ff
      [  108.525817]  do_syscall_64+0x44/0xa0
      [  108.531563] RSP: 0018:ffffffffab203e70 EFLAGS: 00000202
      [  108.538693]  entry_SYSCALL_64_after_hwframe+0x72/0xdc
      [  108.546775]
      [  108.546777] RIP: 0033:0x7f605862b7f7
      [  108.549495] RAX: 0000000000000001 RBX: ffffffffab20c940 RCX: 000000000000003b
      [  108.551955] Code: 0e 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b9 0f 1f 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 51 c3 48 83 ec 28 89 54 24 1c 48 89 74 24 10
      [  108.554068] RDX: 4000000000000000 RSI: 000000002da97f6a RDI: 00000000002b8ff4
      [  108.559816] RSP: 002b:00007ffc99264058 EFLAGS: 00000246
      [  108.564178] RBP: 0000000000000000 R08: 00000000002b8ff4 R09: ffff8ddb01554c80
      [  108.571302]  ORIG_RAX: 000000000000002e
      [  108.571303] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f605862b7f7
      [  108.574023] R10: 000000000000015b R11: 000000000000000f R12: ffffffffab20c940
      [  108.574024] R13: 0000000000000000 R14: ffff8de26fbeef40 R15: ffffffffab20c940
      [  108.578727] RDX: 0000000000000000 RSI: 00007ffc992640a0 RDI: 0000000000000003
      [  108.578728] RBP: 00007ffc99264110 R08: 0000000000000000 R09: 175f48ad1c3a9c00
      [  108.581187]  do_idle+0x62/0x230
      [  108.585890] R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffc992642d8
      [  108.585891] R13: 00005577814ab2ba R14: 00005577814addf0 R15: 00007f605876d000
      [  108.587920]  cpu_startup_entry+0x1d/0x20
      [  108.591422]  </TASK>
      [  108.596127]  rest_init+0xc5/0xd0
      [  108.600490] ---[ end trace 0000000000000000 ]---
      
      Test Setup:
      
      DUT:
      - Change mac address on DUT Side. Ensure NIC not having same MAC Address
      - Running udp_tai on DUT side. Let udp_tai running throughout the test
      
      Example:
      ./udp_tai -i enp170s0 -P 100000 -p 90 -c 1 -t 0 -u 30004
      
      Host:
      - Perform link up/down every 5 second.
      
      Result:
      Kernel panic will happen on DUT Side.
      
      Fixes: 13b5b7fd
      
       ("igc: Add support for Tx/Rx rings")
      Signed-off-by: default avatarMuhammad Husaini Zulkifli <muhammad.husaini.zulkifli@intel.com>
      Tested-by: default avatarNaama Meir <naamax.meir@linux.intel.com>
      Reviewed-by: default avatarMaciej Fijalkowski <maciej.fijalkowski@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      eb22ce98
    • Dan Carpenter's avatar
      sctp: fix an error code in sctp_sf_eat_auth() · 370cacd9
      Dan Carpenter authored
      [ Upstream commit 75e6def3b26736e7ff80639810098c9074229737 ]
      
      The sctp_sf_eat_auth() function is supposed to enum sctp_disposition
      values and returning a kernel error code will cause issues in the
      caller.  Change -ENOMEM to SCTP_DISPOSITION_NOMEM.
      
      Fixes: 65b07e5d
      
       ("[SCTP]: API updates to suport SCTP-AUTH extensions.")
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
      Acked-by: default avatarXin Long <lucien.xin@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      370cacd9