Skip to content
  1. Jan 28, 2023
    • Andrei Gherzan's avatar
      selftest: net: Improve IPV6_TCLASS/IPV6_HOPLIMIT tests apparmor compatibility · a6efc42a
      Andrei Gherzan authored
      
      
      "tcpdump" is used to capture traffic in these tests while using a random,
      temporary and not suffixed file for it. This can interfere with apparmor
      configuration where the tool is only allowed to read from files with
      'known' extensions.
      
      The MINE type application/vnd.tcpdump.pcap was registered with IANA for
      pcap files and .pcap is the extension that is both most common but also
      aligned with standard apparmor configurations. See TCPDUMP(8) for more
      details.
      
      This improves compatibility with standard apparmor configurations by
      using ".pcap" as the file extension for the tests' temporary files.
      
      Signed-off-by: default avatarAndrei Gherzan <andrei.gherzan@canonical.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a6efc42a
    • David S. Miller's avatar
      Merge branch 't7xx-pm-fixes' · 906ad3c9
      David S. Miller authored
      Kornel Dulęba says:
      
      ====================
      net: wwan: t7xx: Fix Runtime PM implementation
      
      d10b3a69
      
       ("net: wwan: t7xx: Runtime PM") introduced support for
      Runtime PM for this driver, but due to a bug in the initialization logic
      the usage refcount would never reach 0, leaving the feature unused.
      This patchset addresses that, together with a bug found after runtime
      suspend was enabled.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      906ad3c9
    • Kornel Dulęba's avatar
      net: wwan: t7xx: Fix Runtime PM initialization · e3d6d152
      Kornel Dulęba authored
      For PCI devices the Runtime PM refcount is incremented twice:
      1. During device enumeration with a call to pm_runtime_forbid.
      2. Just before a driver probe logic is called.
      Because of that in order to enable Runtime PM on a given device
      we have to call both pm_runtime_allow and pm_runtime_put_noidle,
      once it's ready to be runtime suspended.
      The former was missing causing the pm refcount to never reach 0.
      
      Fixes: d10b3a69
      
       ("net: wwan: t7xx: Runtime PM")
      Signed-off-by: default avatarKornel Dulęba <mindal@semihalf.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e3d6d152
    • Kornel Dulęba's avatar
      net: wwan: t7xx: Fix Runtime PM resume sequence · 364d0221
      Kornel Dulęba authored
      Resume device before calling napi_schedule, instead of doing in the napi
      poll routine. Polling is done in softrq context. We can't call the PM
      resume logic from there as it's blocking and not irq safe.
      In order to make it work modify the interrupt handler to be run from irq
      handler thread.
      
      Fixes: 5545b7b9
      
       ("net: wwan: t7xx: Add NAPI support")
      Signed-off-by: default avatarKornel Dulęba <mindal@semihalf.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      364d0221
    • Jeremy Kerr's avatar
      net: mctp: purge receive queues on sk destruction · 60bd1d90
      Jeremy Kerr authored
      We may have pending skbs in the receive queue when the sk is being
      destroyed; add a destructor to purge the queue.
      
      MCTP doesn't use the error queue, so only the receive_queue is purged.
      
      Fixes: 833ef3b9
      
       ("mctp: Populate socket implementation")
      Signed-off-by: default avatarJeremy Kerr <jk@codeconstruct.com.au>
      Reviewed-by: default avatarPavan Chebbi <pavan.chebbi@broadcom.com>
      Link: https://lore.kernel.org/r/20230126064551.464468-1-jk@codeconstruct.com.au
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      60bd1d90
    • Andre Kalb's avatar
      net: phy: dp83822: Fix null pointer access on DP83825/DP83826 devices · 422ae7d9
      Andre Kalb authored
      The probe() function is only used for the DP83822 PHY, leaving the
      private data pointer uninitialized for the smaller DP83825/26 models.
      While all uses of the private data structure are hidden in 82822 specific
      callbacks, configuring the interrupt is shared across all models.
      This causes a NULL pointer dereference on the smaller PHYs as it accesses
      the private data unchecked. Verifying the pointer avoids that.
      
      Fixes: 5dc39fd5
      
       ("net: phy: DP83822: Add ability to advertise Fiber connection")
      Signed-off-by: default avatarAndre Kalb <andre.kalb@sma.de>
      Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
      Link: https://lore.kernel.org/r/Y9FzniUhUtbaGKU7@pc6682
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      422ae7d9
    • Natalia Petrova's avatar
      net: qrtr: free memory on error path in radix_tree_insert() · 29de68c2
      Natalia Petrova authored
      Function radix_tree_insert() returns errors if the node hasn't
      been initialized and added to the tree.
      
      "kfree(node)" and return value "NULL" of node_get() help
      to avoid using unclear node in other calls.
      
      Found by Linux Verification Center (linuxtesting.org) with SVACE.
      
      Cc: <stable@vger.kernel.org> # 5.7
      Fixes: 0c2204a4
      
       ("net: qrtr: Migrate nameservice to kernel from userspace")
      Signed-off-by: default avatarNatalia Petrova <n.petrova@fintech.ru>
      Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
      Reviewed-by: default avatarManivannan Sadhasivam <mani@kernel.org>
      Link: https://lore.kernel.org/r/20230125134831.8090-1-n.petrova@fintech.ru
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      29de68c2
    • Hyunwoo Kim's avatar
      net/rose: Fix to not accept on connected socket · 14caefcf
      Hyunwoo Kim authored
      
      
      If you call listen() and accept() on an already connect()ed
      rose socket, accept() can successfully connect.
      This is because when the peer socket sends data to sendmsg,
      the skb with its own sk stored in the connected socket's
      sk->sk_receive_queue is connected, and rose_accept() dequeues
      the skb waiting in the sk->sk_receive_queue.
      
      This creates a child socket with the sk of the parent
      rose socket, which can cause confusion.
      
      Fix rose_listen() to return -EINVAL if the socket has
      already been successfully connected, and add lock_sock
      to prevent this issue.
      
      Signed-off-by: default avatarHyunwoo Kim <v4bel@theori.io>
      Reviewed-by: default avatarKuniyuki Iwashima <kuniyu@amazon.com>
      Link: https://lore.kernel.org/r/20230125105944.GA133314@ubuntu
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      14caefcf
    • Íñigo Huguet's avatar
      sfc: correctly advertise tunneled IPv6 segmentation · ffffd245
      Íñigo Huguet authored
      Recent sfc NICs are TSO capable for some tunnel protocols. However, it
      was not working properly because the feature was not advertised in
      hw_enc_features, but in hw_features only.
      
      Setting up a GENEVE tunnel and using iperf3 to send IPv4 and IPv6 traffic
      to the tunnel show, with tcpdump, that the IPv4 packets still had ~64k
      size but the IPv6 ones had only ~1500 bytes (they had been segmented by
      software, not offloaded). With this patch segmentation is offloaded as
      expected and the traffic is correctly received at the other end.
      
      Fixes: 24b2c375
      
       ("sfc: advertise encapsulated offloads on EF10")
      Reported-by: default avatarTianhao Zhao <tizhao@redhat.com>
      Signed-off-by: default avatarÍñigo Huguet <ihuguet@redhat.com>
      Acked-by: default avatarMartin Habets <habetsm.xilinx@gmail.com>
      Link: https://lore.kernel.org/r/20230125143513.25841-1-ihuguet@redhat.com
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      ffffd245
    • Jakub Kicinski's avatar
      Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf · 0548c5f2
      Jakub Kicinski authored
      
      
      Daniel Borkmann says:
      
      ====================
      bpf 2023-01-27
      
      We've added 10 non-merge commits during the last 9 day(s) which contain
      a total of 10 files changed, 170 insertions(+), 59 deletions(-).
      
      The main changes are:
      
      1) Fix preservation of register's parent/live fields when copying
         range-info, from Eduard Zingerman.
      
      2) Fix an off-by-one bug in bpf_mem_cache_idx() to select the right
         cache, from Hou Tao.
      
      3) Fix stack overflow from infinite recursion in sock_map_close(),
         from Jakub Sitnicki.
      
      4) Fix missing btf_put() in register_btf_id_dtor_kfuncs()'s error path,
         from Jiri Olsa.
      
      5) Fix a splat from bpf_setsockopt() via lsm_cgroup/socket_sock_rcv_skb,
         from Kui-Feng Lee.
      
      6) Fix bpf_send_signal[_thread]() helpers to hold a reference on the task,
         from Yonghong Song.
      
      * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf:
        bpf: Fix the kernel crash caused by bpf_setsockopt().
        selftests/bpf: Cover listener cloning with progs attached to sockmap
        selftests/bpf: Pass BPF skeleton to sockmap_listen ops tests
        bpf, sockmap: Check for any of tcp_bpf_prots when cloning a listener
        bpf, sockmap: Don't let sock_map_{close,destroy,unhash} call itself
        bpf: Add missing btf_put to register_btf_id_dtor_kfuncs
        selftests/bpf: Verify copy_register_state() preserves parent/live fields
        bpf: Fix to preserve reg parent/live fields when copying range info
        bpf: Fix a possible task gone issue with bpf_send_signal[_thread]() helpers
        bpf: Fix off-by-one error in bpf_mem_cache_idx()
      ====================
      
      Link: https://lore.kernel.org/r/20230127215820.4993-1-daniel@iogearbox.net
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      0548c5f2
    • Alexander Duyck's avatar
      skb: Do mix page pool and page referenced frags in GRO · 7d2c89b3
      Alexander Duyck authored
      GSO should not merge page pool recycled frames with standard reference
      counted frames. Traditionally this didn't occur, at least not often.
      However as we start looking at adding support for wireless adapters there
      becomes the potential to mix the two due to A-MSDU repartitioning frames in
      the receive path. There are possibly other places where this may have
      occurred however I suspect they must be few and far between as we have not
      seen this issue until now.
      
      Fixes: 53e0961d
      
       ("page_pool: add frag page recycling support in page pool")
      Reported-by: default avatarFelix Fietkau <nbd@nbd.name>
      Signed-off-by: default avatarAlexander Duyck <alexanderduyck@fb.com>
      Acked-by: default avatarIlias Apalodimas <ilias.apalodimas@linaro.org>
      Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
      Link: https://lore.kernel.org/r/167475990764.1934330.11960904198087757911.stgit@localhost.localdomain
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      7d2c89b3
    • Arınç ÜNAL's avatar
      net: dsa: mt7530: fix tristate and help description · ff445b83
      Arınç ÜNAL authored
      
      
      Fix description for tristate and help sections which include inaccurate
      information.
      
      Signed-off-by: default avatarArınç ÜNAL <arinc.unal@arinc9.com>
      Link: https://lore.kernel.org/r/20230126190110.9124-1-arinc.unal@arinc9.com
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      ff445b83
    • Jakub Kicinski's avatar
      Merge branch 'net-xdp-execute-xdp_do_flush-before-napi_complete_done' · 3ac77ecd
      Jakub Kicinski authored
      
      
      Magnus Karlsson says:
      
      ====================
      net: xdp: execute xdp_do_flush() before napi_complete_done()
      
      Make sure that xdp_do_flush() is always executed before
      napi_complete_done(). This is important for two reasons. First, a
      redirect to an XSKMAP assumes that a call to xdp_do_redirect() from
      napi context X on CPU Y will be followed by a xdp_do_flush() from the
      same napi context and CPU. This is not guaranteed if the
      napi_complete_done() is executed before xdp_do_flush(), as it tells
      the napi logic that it is fine to schedule napi context X on another
      CPU. Details from a production system triggering this bug using the
      veth driver can be found in [1].
      
      The second reason is that the XDP_REDIRECT logic in itself relies on
      being inside a single NAPI instance through to the xdp_do_flush() call
      for RCU protection of all in-kernel data structures. Details can be
      found in [2].
      
      The drivers have only been compile-tested since I do not own any of
      the HW below. So if you are a maintainer, it would be great if you
      could take a quick look to make sure I did not mess something up.
      
      Note that these were the drivers I found that violated the ordering by
      running a simple script and manually checking the ones that came up as
      potential offenders. But the script was not perfect in any way. There
      might still be offenders out there, since the script can generate
      false negatives.
      
      [1] https://lore.kernel.org/r/20221220185903.1105011-1-sbohrer@cloudflare.com
      [2] https://lore.kernel.org/all/20210624160609.292325-1-toke@redhat.com/
      ====================
      
      Link: https://lore.kernel.org/r/20230125074901.2737-1-magnus.karlsson@gmail.com
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      3ac77ecd
    • Magnus Karlsson's avatar
      dpaa2-eth: execute xdp_do_flush() before napi_complete_done() · a3191c4d
      Magnus Karlsson authored
      Make sure that xdp_do_flush() is always executed before
      napi_complete_done(). This is important for two reasons. First, a
      redirect to an XSKMAP assumes that a call to xdp_do_redirect() from
      napi context X on CPU Y will be followed by a xdp_do_flush() from the
      same napi context and CPU. This is not guaranteed if the
      napi_complete_done() is executed before xdp_do_flush(), as it tells
      the napi logic that it is fine to schedule napi context X on another
      CPU. Details from a production system triggering this bug using the
      veth driver can be found following the first link below.
      
      The second reason is that the XDP_REDIRECT logic in itself relies on
      being inside a single NAPI instance through to the xdp_do_flush() call
      for RCU protection of all in-kernel data structures. Details can be
      found in the second link below.
      
      Fixes: d678be1d
      
       ("dpaa2-eth: add XDP_REDIRECT support")
      Signed-off-by: default avatarMagnus Karlsson <magnus.karlsson@intel.com>
      Acked-by: default avatarToke Høiland-Jørgensen <toke@redhat.com>
      Link: https://lore.kernel.org/r/20221220185903.1105011-1-sbohrer@cloudflare.com
      Link: https://lore.kernel.org/all/20210624160609.292325-1-toke@redhat.com/
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      a3191c4d
    • Magnus Karlsson's avatar
      dpaa_eth: execute xdp_do_flush() before napi_complete_done() · b5340137
      Magnus Karlsson authored
      Make sure that xdp_do_flush() is always executed before
      napi_complete_done(). This is important for two reasons. First, a
      redirect to an XSKMAP assumes that a call to xdp_do_redirect() from
      napi context X on CPU Y will be followed by a xdp_do_flush() from the
      same napi context and CPU. This is not guaranteed if the
      napi_complete_done() is executed before xdp_do_flush(), as it tells
      the napi logic that it is fine to schedule napi context X on another
      CPU. Details from a production system triggering this bug using the
      veth driver can be found following the first link below.
      
      The second reason is that the XDP_REDIRECT logic in itself relies on
      being inside a single NAPI instance through to the xdp_do_flush() call
      for RCU protection of all in-kernel data structures. Details can be
      found in the second link below.
      
      Fixes: a1e031ff
      
       ("dpaa_eth: add XDP_REDIRECT support")
      Signed-off-by: default avatarMagnus Karlsson <magnus.karlsson@intel.com>
      Acked-by: default avatarToke Høiland-Jørgensen <toke@redhat.com>
      Link: https://lore.kernel.org/r/20221220185903.1105011-1-sbohrer@cloudflare.com
      Link: https://lore.kernel.org/all/20210624160609.292325-1-toke@redhat.com/
      Acked-by: default avatarCamelia Groza <camelia.groza@nxp.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      b5340137
    • Magnus Karlsson's avatar
      virtio-net: execute xdp_do_flush() before napi_complete_done() · ad7e615f
      Magnus Karlsson authored
      Make sure that xdp_do_flush() is always executed before
      napi_complete_done(). This is important for two reasons. First, a
      redirect to an XSKMAP assumes that a call to xdp_do_redirect() from
      napi context X on CPU Y will be followed by a xdp_do_flush() from the
      same napi context and CPU. This is not guaranteed if the
      napi_complete_done() is executed before xdp_do_flush(), as it tells
      the napi logic that it is fine to schedule napi context X on another
      CPU. Details from a production system triggering this bug using the
      veth driver can be found following the first link below.
      
      The second reason is that the XDP_REDIRECT logic in itself relies on
      being inside a single NAPI instance through to the xdp_do_flush() call
      for RCU protection of all in-kernel data structures. Details can be
      found in the second link below.
      
      Fixes: 186b3c99
      
       ("virtio-net: support XDP_REDIRECT")
      Signed-off-by: default avatarMagnus Karlsson <magnus.karlsson@intel.com>
      Acked-by: default avatarToke Høiland-Jørgensen <toke@redhat.com>
      Link: https://lore.kernel.org/r/20221220185903.1105011-1-sbohrer@cloudflare.com
      Link: https://lore.kernel.org/all/20210624160609.292325-1-toke@redhat.com/
      Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      ad7e615f
    • Magnus Karlsson's avatar
      lan966x: execute xdp_do_flush() before napi_complete_done() · 12b57179
      Magnus Karlsson authored
      Make sure that xdp_do_flush() is always executed before
      napi_complete_done(). This is important for two reasons. First, a
      redirect to an XSKMAP assumes that a call to xdp_do_redirect() from
      napi context X on CPU Y will be followed by a xdp_do_flush() from the
      same napi context and CPU. This is not guaranteed if the
      napi_complete_done() is executed before xdp_do_flush(), as it tells
      the napi logic that it is fine to schedule napi context X on another
      CPU. Details from a production system triggering this bug using the
      veth driver can be found following the first link below.
      
      The second reason is that the XDP_REDIRECT logic in itself relies on
      being inside a single NAPI instance through to the xdp_do_flush() call
      for RCU protection of all in-kernel data structures. Details can be
      found in the second link below.
      
      Fixes: a825b611
      
       ("net: lan966x: Add support for XDP_REDIRECT")
      Signed-off-by: default avatarMagnus Karlsson <magnus.karlsson@intel.com>
      Acked-by: default avatarToke Høiland-Jørgensen <toke@redhat.com>
      Acked-by: default avatarSteen Hegelund <Steen.Hegelund@microchip.com>
      Link: https://lore.kernel.org/r/20221220185903.1105011-1-sbohrer@cloudflare.com
      Link: https://lore.kernel.org/all/20210624160609.292325-1-toke@redhat.com/
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      12b57179
    • Magnus Karlsson's avatar
      qede: execute xdp_do_flush() before napi_complete_done() · 2ccce20d
      Magnus Karlsson authored
      Make sure that xdp_do_flush() is always executed before
      napi_complete_done(). This is important for two reasons. First, a
      redirect to an XSKMAP assumes that a call to xdp_do_redirect() from
      napi context X on CPU Y will be followed by a xdp_do_flush() from the
      same napi context and CPU. This is not guaranteed if the
      napi_complete_done() is executed before xdp_do_flush(), as it tells
      the napi logic that it is fine to schedule napi context X on another
      CPU. Details from a production system triggering this bug using the
      veth driver can be found following the first link below.
      
      The second reason is that the XDP_REDIRECT logic in itself relies on
      being inside a single NAPI instance through to the xdp_do_flush() call
      for RCU protection of all in-kernel data structures. Details can be
      found in the second link below.
      
      Fixes: d1b25b79
      
       ("qede: add .ndo_xdp_xmit() and XDP_REDIRECT support")
      Signed-off-by: default avatarMagnus Karlsson <magnus.karlsson@intel.com>
      Acked-by: default avatarToke Høiland-Jørgensen <toke@redhat.com>
      Link: https://lore.kernel.org/r/20221220185903.1105011-1-sbohrer@cloudflare.com
      Link: https://lore.kernel.org/all/20210624160609.292325-1-toke@redhat.com/
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      2ccce20d
  2. Jan 27, 2023
    • Kui-Feng Lee's avatar
      bpf: Fix the kernel crash caused by bpf_setsockopt(). · 5416c9ae
      Kui-Feng Lee authored
      
      
      The kernel crash was caused by a BPF program attached to the
      "lsm_cgroup/socket_sock_rcv_skb" hook, which performed a call to
      `bpf_setsockopt()` in order to set the TCP_NODELAY flag as an
      example. Flags like TCP_NODELAY can prompt the kernel to flush a
      socket's outgoing queue, and this hook
      "lsm_cgroup/socket_sock_rcv_skb" is frequently triggered by
      softirqs. The issue was that in certain circumstances, when
      `tcp_write_xmit()` was called to flush the queue, it would also allow
      BH (bottom-half) to run. This could lead to our program attempting to
      flush the same socket recursively, which caused a `skbuff` to be
      unlinked twice.
      
      `security_sock_rcv_skb()` is triggered by `tcp_filter()`. This occurs
      before the sock ownership is checked in `tcp_v4_rcv()`. Consequently,
      if a bpf program runs on `security_sock_rcv_skb()` while under softirq
      conditions, it may not possess the lock needed for `bpf_setsockopt()`,
      thus presenting an issue.
      
      The patch fixes this issue by ensuring that a BPF program attached to
      the "lsm_cgroup/socket_sock_rcv_skb" hook is not allowed to call
      `bpf_setsockopt()`.
      
      The differences from v1 are
       - changing commit log to explain holding the lock of the sock,
       - emphasizing that TCP_NODELAY is not the only flag, and
       - adding the fixes tag.
      
      v1: https://lore.kernel.org/bpf/20230125000244.1109228-1-kuifeng@meta.com/
      
      Signed-off-by: default avatarKui-Feng Lee <kuifeng@meta.com>
      Fixes: 9113d7e4
      
       ("bpf: expose bpf_{g,s}etsockopt to lsm cgroup")
      Link: https://lore.kernel.org/r/20230127001732.4162630-1-kuifeng@meta.com
      Signed-off-by: default avatarMartin KaFai Lau <martin.lau@kernel.org>
      5416c9ae
    • Linus Torvalds's avatar
      Merge tag 'net-6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 28b4387f
      Linus Torvalds authored
      Pull networking fixes from Paolo Abeni:
       "Including fixes from netfilter.
      
        Current release - regressions:
      
         - sched: sch_taprio: do not schedule in taprio_reset()
      
        Previous releases - regressions:
      
         - core: fix UaF in netns ops registration error path
      
         - ipv4: prevent potential spectre v1 gadgets
      
         - ipv6: fix reachability confirmation with proxy_ndp
      
         - netfilter: fix for the set rbtree
      
         - eth: fec: use page_pool_put_full_page when freeing rx buffers
      
         - eth: iavf: fix temporary deadlock and failure to set MAC address
      
        Previous releases - always broken:
      
         - netlink: prevent potential spectre v1 gadgets
      
         - netfilter: fixes for SCTP connection tracking
      
         - mctp: struct sock lifetime fixes
      
         - eth: ravb: fix possible hang if RIS2_QFF1 happen
      
         - eth: tg3: resolve deadlock in tg3_reset_task() during EEH
      
        Misc:
      
         - Mat stepped out as MPTCP co-maintainer"
      
      * tag 'net-6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (40 commits)
        net: mdio-mux-meson-g12a: force internal PHY off on mux switch
        docs: networking: Fix bridge documentation URL
        tsnep: Fix TX queue stop/wake for multiple queues
        net/tg3: resolve deadlock in tg3_reset_task() during EEH
        net: mctp: mark socks as dead on unhash, prevent re-add
        net: mctp: hold key reference when looking up a general key
        net: mctp: move expiry timer delete to unhash
        net: mctp: add an explicit reference from a mctp_sk_key to sock
        net: ravb: Fix possible hang if RIS2_QFF1 happen
        net: ravb: Fix lack of register setting after system resumed for Gen3
        net/x25: Fix to not accept on connected socket
        ice: move devlink port creation/deletion
        sctp: fail if no bound addresses can be used for a given scope
        net/sched: sch_taprio: do not schedule in taprio_reset()
        Revert "Merge branch 'ethtool-mac-merge'"
        netrom: Fix use-after-free of a listening socket.
        netfilter: conntrack: unify established states for SCTP paths
        Revert "netfilter: conntrack: add sctp DATA_SENT state"
        netfilter: conntrack: fix bug in for_each_sctp_chunk
        netfilter: conntrack: fix vtag checks for ABORT/SHUTDOWN_COMPLETE
        ...
      28b4387f
    • Linus Torvalds's avatar
      treewide: fix up files incorrectly marked executable · 262b42e0
      Linus Torvalds authored
      I'm not exactly clear on what strange workflow causes people to do it,
      but clearly occasionally some files end up being committed as executable
      even though they clearly aren't.
      
      This is a reprise of commit 90fda63f
      
       ("treewide: fix up files
      incorrectly marked executable"), just with a different set of files (but
      with the same trivial shell scripting).
      
      So apparently we need to re-do this every five years or so, and Joe
      needs to just keep reminding me to do so ;)
      
      Reported-by: default avatarJoe Perches <joe@perches.com>
      Fixes: 523375c9 ("drm/vmwgfx: Port vmwgfx to arm64")
      Fixes: 5c439937
      
       ("ASoC: codecs: add support for ES8326")
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      262b42e0
  3. Jan 26, 2023
    • Jerome Brunet's avatar
      net: mdio-mux-meson-g12a: force internal PHY off on mux switch · 7083df59
      Jerome Brunet authored
      Force the internal PHY off then on when switching to the internal path.
      This fixes problems where the PHY ID is not properly set.
      
      Fixes: 70904251
      
       ("net: phy: add amlogic g12a mdio mux support")
      Suggested-by: default avatarQi Duan <qi.duan@amlogic.com>
      Co-developed-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: default avatarJerome Brunet <jbrunet@baylibre.com>
      Link: https://lore.kernel.org/r/20230124101157.232234-1-jbrunet@baylibre.com
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      7083df59
    • Ivan Vecera's avatar
      docs: networking: Fix bridge documentation URL · aee2770d
      Ivan Vecera authored
      
      
      Current documentation URL [1] is no longer valid.
      
      [1] https://www.linuxfoundation.org/collaborate/workgroups/networking/bridge
      
      Signed-off-by: default avatarIvan Vecera <ivecera@redhat.com>
      Reviewed-by: default avatarPavan Chebbi <pavan.chebbi@broadcom.com>
      Link: https://lore.kernel.org/r/20230124145127.189221-1-ivecera@redhat.com
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      aee2770d
    • Gerhard Engleder's avatar
      tsnep: Fix TX queue stop/wake for multiple queues · 3d53aaef
      Gerhard Engleder authored
      netif_stop_queue() and netif_wake_queue() act on TX queue 0. This is ok
      as long as only a single TX queue is supported. But support for multiple
      TX queues was introduced with 76203137 and I missed to adapt stop
      and wake of TX queues.
      
      Use netif_stop_subqueue() and netif_tx_wake_queue() to act on specific
      TX queue.
      
      Fixes: 76203137
      
       ("tsnep: Support multiple TX/RX queue pairs")
      Signed-off-by: default avatarGerhard Engleder <gerhard@engleder-embedded.com>
      Link: https://lore.kernel.org/r/20230124191440.56887-1-gerhard@engleder-embedded.com
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      3d53aaef
    • David Christensen's avatar
      net/tg3: resolve deadlock in tg3_reset_task() during EEH · 6c4ca03b
      David Christensen authored
      During EEH error injection testing, a deadlock was encountered in the tg3
      driver when tg3_io_error_detected() was attempting to cancel outstanding
      reset tasks:
      
      crash> foreach UN bt
      ...
      PID: 159    TASK: c0000000067c6000  CPU: 8   COMMAND: "eehd"
      ...
       #5 [c00000000681f990] __cancel_work_timer at c00000000019fd18
       #6 [c00000000681fa30] tg3_io_error_detected at c00800000295f098 [tg3]
       #7 [c00000000681faf0] eeh_report_error at c00000000004e25c
      ...
      
      PID: 290    TASK: c000000036e5f800  CPU: 6   COMMAND: "kworker/6:1"
      ...
       #4 [c00000003721fbc0] rtnl_lock at c000000000c940d8
       #5 [c00000003721fbe0] tg3_reset_task at c008000002969358 [tg3]
       #6 [c00000003721fc60] process_one_work at c00000000019e5c4
      ...
      
      PID: 296    TASK: c000000037a65800  CPU: 21  COMMAND: "kworker/21:1"
      ...
       #4 [c000000037247bc0] rtnl_lock at c000000000c940d8
       #5 [c000000037247be0] tg3_reset_task at c008000002969358 [tg3]
       #6 [c000000037247c60] process_one_work at c00000000019e5c4
      ...
      
      PID: 655    TASK: c000000036f49000  CPU: 16  COMMAND: "kworker/16:2"
      ...:1
      
       #4 [c0000000373ebbc0] rtnl_lock at c000000000c940d8
       #5 [c0000000373ebbe0] tg3_reset_task at c008000002969358 [tg3]
       #6 [c0000000373ebc60] process_one_work at c00000000019e5c4
      ...
      
      Code inspection shows that both tg3_io_error_detected() and
      tg3_reset_task() attempt to acquire the RTNL lock at the beginning of
      their code blocks.  If tg3_reset_task() should happen to execute between
      the times when tg3_io_error_deteced() acquires the RTNL lock and
      tg3_reset_task_cancel() is called, a deadlock will occur.
      
      Moving tg3_reset_task_cancel() call earlier within the code block, prior
      to acquiring RTNL, prevents this from happening, but also exposes another
      deadlock issue where tg3_reset_task() may execute AFTER
      tg3_io_error_detected() has executed:
      
      crash> foreach UN bt
      PID: 159    TASK: c0000000067d2000  CPU: 9   COMMAND: "eehd"
      ...
       #4 [c000000006867a60] rtnl_lock at c000000000c940d8
       #5 [c000000006867a80] tg3_io_slot_reset at c0080000026c2ea8 [tg3]
       #6 [c000000006867b00] eeh_report_reset at c00000000004de88
      ...
      PID: 363    TASK: c000000037564000  CPU: 6   COMMAND: "kworker/6:1"
      ...
       #3 [c000000036c1bb70] msleep at c000000000259e6c
       #4 [c000000036c1bba0] napi_disable at c000000000c6b848
       #5 [c000000036c1bbe0] tg3_reset_task at c0080000026d942c [tg3]
       #6 [c000000036c1bc60] process_one_work at c00000000019e5c4
      ...
      
      This issue can be avoided by aborting tg3_reset_task() if EEH error
      recovery is already in progress.
      
      Fixes: db84bf43
      
       ("tg3: tg3_reset_task() needs to use rtnl_lock to synchronize")
      Signed-off-by: default avatarDavid Christensen <drc@linux.vnet.ibm.com>
      Reviewed-by: default avatarPavan Chebbi <pavan.chebbi@broadcom.com>
      Link: https://lore.kernel.org/r/20230124185339.225806-1-drc@linux.vnet.ibm.com
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      6c4ca03b
    • Linus Torvalds's avatar
      Merge tag 'fs.fuse.acl.v6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping · 7c46948a
      Linus Torvalds authored
      Pull fuse ACL fix from Christian Brauner:
       "The new posix acl API doesn't depend on the xattr handler
        infrastructure anymore and instead only relies on the posix acl inode
        operations. As a result daemons without FUSE_POSIX_ACL are unable to
        use posix acls like they used to.
      
        Fix this by copying what we did for overlayfs during the posix acl api
        conversion. Make fuse implement a dedicated ->get_inode_acl() method
        as does overlayfs. Fuse can then also uses this to express different
        needs for vfs permission checking during lookup and acl based
        retrieval via the regular system call path.
      
        This allows fuse to continue to refuse retrieving posix acls for
        daemons that don't set FUSE_POSXI_ACL for permission checking while
        also allowing a fuse server to retrieve it via the usual system calls"
      
      * tag 'fs.fuse.acl.v6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping:
        fuse: fixes after adapting to new posix acl api
      7c46948a
  4. Jan 25, 2023