1. 02 9月, 2022 6 次提交
    • D
      tipc: fix shift wrapping bug in map_get() · e2b224ab
      Dan Carpenter 提交于
      There is a shift wrapping bug in this code so anything thing above
      31 will return false.
      
      Fixes: 35c55c98 ("tipc: add neighbor monitoring framework")
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e2b224ab
    • T
      sch_sfb: Don't assume the skb is still around after enqueueing to child · 9efd2329
      Toke Høiland-Jørgensen 提交于
      The sch_sfb enqueue() routine assumes the skb is still alive after it has
      been enqueued into a child qdisc, using the data in the skb cb field in the
      increment_qlen() routine after enqueue. However, the skb may in fact have
      been freed, causing a use-after-free in this case. In particular, this
      happens if sch_cake is used as a child of sfb, and the GSO splitting mode
      of CAKE is enabled (in which case the skb will be split into segments and
      the original skb freed).
      
      Fix this by copying the sfb cb data to the stack before enqueueing the skb,
      and using this stack copy in increment_qlen() instead of the skb pointer
      itself.
      
      Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-18231
      Fixes: e13e02a3 ("net_sched: SFB flow scheduler")
      Signed-off-by: NToke Høiland-Jørgensen <toke@toke.dk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9efd2329
    • H
      Revert "net: phy: meson-gxl: improve link-up behavior" · 7fdc7766
      Heiner Kallweit 提交于
      This reverts commit 2c87c6f9.
      Meanwhile it turned out that the following commit is the proper
      workaround for the issue that 2c87c6f9 tries to address.
      a3a57bf0 ("net: stmmac: work around sporadic tx issue on link-up")
      It's nor clear why the to be reverted commit helped for one user,
      for others it didn't make a difference.
      
      Fixes: 2c87c6f9 ("net: phy: meson-gxl: improve link-up behavior")
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Link: https://lore.kernel.org/r/8deeeddc-6b71-129b-1918-495a12dc11e3@gmail.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      7fdc7766
    • L
      Merge tag 'net-6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 42e66b1c
      Linus Torvalds 提交于
      Pull networking fixes from Paolo Abeni:
       "Including fixes from bluetooth, bpf and wireless.
      
        Current release - regressions:
      
         - bpf:
            - fix wrong last sg check in sk_msg_recvmsg()
            - fix kernel BUG in purge_effective_progs()
      
         - mac80211:
            - fix possible leak in ieee80211_tx_control_port()
            - potential NULL dereference in ieee80211_tx_control_port()
      
        Current release - new code bugs:
      
         - nfp: fix the access to management firmware hanging
      
        Previous releases - regressions:
      
         - ip: fix triggering of 'icmp redirect'
      
         - sched: tbf: don't call qdisc_put() while holding tree lock
      
         - bpf: fix corrupted packets for XDP_SHARED_UMEM
      
         - bluetooth: hci_sync: fix suspend performance regression
      
         - micrel: fix probe failure
      
        Previous releases - always broken:
      
         - tcp: make global challenge ack rate limitation per net-ns and
           default disabled
      
         - tg3: fix potential hang-up on system reboot
      
         - mac802154: fix reception for no-daddr packets
      
        Misc:
      
         - r8152: add PID for the lenovo onelink+ dock"
      
      * tag 'net-6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (56 commits)
        net/smc: Remove redundant refcount increase
        Revert "sch_cake: Return __NET_XMIT_STOLEN when consuming enqueued skb"
        tcp: make global challenge ack rate limitation per net-ns and default disabled
        tcp: annotate data-race around challenge_timestamp
        net: dsa: hellcreek: Print warning only once
        ip: fix triggering of 'icmp redirect'
        sch_cake: Return __NET_XMIT_STOLEN when consuming enqueued skb
        selftests: net: sort .gitignore file
        Documentation: networking: correct possessive "its"
        kcm: fix strp_init() order and cleanup
        mlxbf_gige: compute MDIO period based on i1clk
        ethernet: rocker: fix sleep in atomic context bug in neigh_timer_handler
        net: lan966x: improve error handle in lan966x_fdma_rx_get_frame()
        nfp: fix the access to management firmware hanging
        net: phy: micrel: Make the GPIO to be non-exclusive
        net: virtio_net: fix notification coalescing comments
        net/sched: fix netdevice reference leaks in attach_default_qdiscs()
        net: sched: tbf: don't call qdisc_put() while holding tree lock
        net: Use u64_stats_fetch_begin_irq() for stats fetch.
        net: dsa: xrs700x: Use irqsave variant for u64 stats update
        ...
      42e66b1c
    • L
      Merge tag 'slab-for-6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab · d330076e
      Linus Torvalds 提交于
      Pull slab fix from Vlastimil Babka:
      
       - A fix from Waiman Long to avoid a theoretical deadlock reported by
         lockdep.
      
      * tag 'slab-for-6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab:
        mm/slab_common: Deleting kobject in kmem_cache_destroy() without holding slab_mutex/cpu_hotplug_lock
      d330076e
    • L
      Merge tag 'sound-6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 2880e1a1
      Linus Torvalds 提交于
      Pull sound fixes from Takashi Iwai:
       "Just handful changes at this time. The only major change is the
        regression fix about the x86 WC-page buffer allocation.
      
        The rest are trivial data-race fixes for ALSA sequencer core, the
        possible out-of-bounds access fixes in the new ALSA control hash code,
        and a few device-specific workarounds and fixes"
      
      * tag 'sound-6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: usb-audio: Add quirk for LH Labs Geek Out HD Audio 1V5
        ALSA: hda/realtek: Add speaker AMP init for Samsung laptops with ALC298
        ALSA: control: Re-order bounds checking in get_ctl_id_hash()
        ALSA: control: Fix an out-of-bounds bug in get_ctl_id_hash()
        ALSA: hda: intel-nhlt: Correct the handling of fmt_config flexible array
        ALSA: seq: Fix data-race at module auto-loading
        ALSA: seq: oss: Fix data-race for max_midi_devs access
        ALSA: memalloc: Revive x86-specific WC page allocations again
      2880e1a1
  2. 01 9月, 2022 18 次提交
  3. 31 8月, 2022 9 次提交
  4. 30 8月, 2022 4 次提交
  5. 29 8月, 2022 3 次提交
    • D
      Merge branch 'u64_stats-fixups' · cb10b0f9
      David S. Miller 提交于
      Sebastian Andrzej Siewior says:
      
      ====================
      net: u64_stats fixups for 32bit.
      
      while looking at the u64-stats patch
      	https://lore.kernel.org/all/20220817162703.728679-10-bigeasy@linutronix.de
      
      I noticed that u64_stats_fetch_begin() is used. That suspicious thing
      about it is that network processing, including stats update, is
      performed in NAPI and so I would expect to see
      u64_stats_fetch_begin_irq() in order to avoid updates from NAPI during
      the read. This is only needed on 32bit-UP where the seqcount is not
      used. This is address in 2/2. The remaining user take some kind of
      precaution and may use u64_stats_fetch_begin().
      
      I updated the previously mentioned patch to get rid of
      u64_stats_fetch_begin_irq(). If this is not considered stable patch
      worthy then it can be ignored and considred fixed by the other series
      which removes the special 32bit cases.
      
      The xrs700x driver reads and writes the counter from preemptible context
      so the only missing piece here is at least disable preemption on the
      writer side to avoid preemption while the writer is in progress. The
      possible reader would spin then until the writer completes its write
      critical section which is considered bad. This is addressed in 1/2 by
      using u64_stats_update_begin_irqsave() and so disable interrupts during
      the write critical section.
      The other closet resemblance I found is mdio_bus.c::mdiobus_stats_acct()
      where preemtion is disabled unconditionally. This is something I want to
      avoid since it also affects 64bit.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cb10b0f9
    • S
      net: Use u64_stats_fetch_begin_irq() for stats fetch. · 278d3ba6
      Sebastian Andrzej Siewior 提交于
      On 32bit-UP u64_stats_fetch_begin() disables only preemption. If the
      reader is in preemptible context and the writer side
      (u64_stats_update_begin*()) runs in an interrupt context (IRQ or
      softirq) then the writer can update the stats during the read operation.
      This update remains undetected.
      
      Use u64_stats_fetch_begin_irq() to ensure the stats fetch on 32bit-UP
      are not interrupted by a writer. 32bit-SMP remains unaffected by this
      change.
      
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Catherine Sullivan <csully@google.com>
      Cc: David Awogbemila <awogbemila@google.com>
      Cc: Dimitris Michailidis <dmichail@fungible.com>
      Cc: Eric Dumazet <edumazet@google.com>
      Cc: Hans Ulli Kroll <ulli.kroll@googlemail.com>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Jeroen de Borst <jeroendb@google.com>
      Cc: Johannes Berg <johannes@sipsolutions.net>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Paolo Abeni <pabeni@redhat.com>
      Cc: Simon Horman <simon.horman@corigine.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-wireless@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Cc: oss-drivers@corigine.com
      Cc: stable@vger.kernel.org
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Reviewed-by: NSimon Horman <simon.horman@corigine.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      278d3ba6
    • S
      net: dsa: xrs700x: Use irqsave variant for u64 stats update · 3f8ae9fe
      Sebastian Andrzej Siewior 提交于
      xrs700x_read_port_counters() updates the stats from a worker using the
      u64_stats_update_begin() version. This is okay on 32-UP since on the
      reader side preemption is disabled.
      On 32bit-SMP the writer can be preempted by the reader at which point
      the reader will spin on the seqcount until writer continues and
      completes the update.
      
      Assigning the mib_mutex mutex to the underlying seqcount would ensure
      proper synchronisation. The API for that on the u64_stats_init() side
      isn't available. Since it is the only user, just use disable interrupts
      during the update.
      
      Use u64_stats_update_begin_irqsave() on the writer side to ensure an
      uninterrupted update.
      
      Fixes: ee00b24f ("net: dsa: add Arrow SpeedChips XRS700x driver")
      Cc: Andrew Lunn <andrew@lunn.ch>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: George McCollister <george.mccollister@gmail.com>
      Cc: Vivien Didelot <vivien.didelot@gmail.com>
      Cc: Vladimir Oltean <olteanv@gmail.com>
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Acked-by: NGeorge McCollister <george.mccollister@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3f8ae9fe