1. Jun 16, 2023
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma · 93fd8eb0
      Linus Torvalds authored
      Pull rdma fixes from Jason Gunthorpe:
       "This is an unusually large bunch of bug fixes for the later rc cycle,
        rxe and mlx5 both dumped a lot of things at once. rxe continues to fix
        itself, and mlx5 is fixing a bunch of "queue counters" related bugs.
      
        There is one highly notable bug fix regarding the qkey. This small
        security check was missed in the original 2005 implementation and it
        allows some significant issues.
      
        Summary:
      
         - Two rtrs bug fixes for error unwind bugs
      
         - Several rxe bug fixes:
            * Incorrect Rx packet validation
            * Using memory without a refcount
            * Syzkaller found use before initialization
            * Regression fix for missing locking with the tasklet conversion
              from this merge window
      
         - Have bnxt report the correct link properties to userspace, this was
           a regression in v6.3
      
         - Several mlx5 bug fixes:
            * Kernel crash triggerable by userspace for the RAW ethernet
              profile
            * Defend against steering refcounting issues created by userspace
            * Incorrect change of QP port affinity parameters in some LAG
              configurations
      
         - Fix mlx5 Q counters:
            * Do not over allocate Q counters to allow userspace to use the
              full port capacity
            * Kernel crash triggered by eswitch due to mis-use of Q counters
            * Incorrect mlx5_device for Q counters in some LAG configurations
      
         - Properly implement the IBA spec restricting privileged qkeys to
           root
      
         - Always an error when reading from a disassociated device's event
           queue
      
         - isert bug fixes:
            * Avoid a deadlock with the CM handler and CM ID destruction
            * Correct list corruption due to incorrect locking
            * Fix a use after free around connection tear down"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
        RDMA/rxe: Fix rxe_cq_post
        IB/isert: Fix incorrect release of isert connection
        IB/isert: Fix possible list corruption in CMA handler
        IB/isert: Fix dead lock in ib_isert
        RDMA/mlx5: Fix affinity assignment
        IB/uverbs: Fix to consider event queue closing also upon non-blocking mode
        RDMA/uverbs: Restrict usage of privileged QKEYs
        RDMA/cma: Always set static rate to 0 for RoCE
        RDMA/mlx5: Fix Q-counters query in LAG mode
        RDMA/mlx5: Remove vport Q-counters dependency on normal Q-counters
        RDMA/mlx5: Fix Q-counters per vport allocation
        RDMA/mlx5: Create an indirect flow table for steering anchor
        RDMA/mlx5: Initiate dropless RQ for RAW Ethernet functions
        RDMA/rxe: Fix the use-before-initialization error of resp_pkts
        RDMA/bnxt_re: Fix reporting active_{speed,width} attributes
        RDMA/rxe: Fix ref count error in check_rkey()
        RDMA/rxe: Fix packet length checks
        RDMA/rtrs: Fix rxe_dealloc_pd warning
        RDMA/rtrs: Fix the last iu->buf leak in err path
      93fd8eb0
    • Linus Torvalds's avatar
      Merge tag 'spi-fix-v6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi · b7feaa49
      Linus Torvalds authored
      Pull spi fixes from Mark Brown:
       "A few more driver specific fixes.
      
        The DesignWare fix is for an issue introduced by conversion to the
        chip select accessor functions and is pretty important but the other
        two are less severe"
      
      * tag 'spi-fix-v6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
        spi: dw: Replace incorrect spi_get_chipselect with set
        spi: fsl-dspi: avoid SCK glitches with continuous transfers
        spi: cadence-quadspi: Add missing check for dma_set_mask
      b7feaa49
    • Linus Torvalds's avatar
      Merge tag 'regulator-fix-v6.4-rc6' of... · eee71c34
      Linus Torvalds authored
      Merge tag 'regulator-fix-v6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
      
      Pull regulator fix from Mark Brown:
       "The set of regulators described for the Qualcomm PM8550 just seems to
        have been completely wrong and would likely not have worked at all if
        anything tried to actually configure anything except for enabling and
        disabling at runtime"
      
      * tag 'regulator-fix-v6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
        regulator: qcom-rpmh: Fix regulators for PM8550
      eee71c34
    • Linus Torvalds's avatar
      Merge tag 'regmap-fix-v6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap · 231a1e31
      Linus Torvalds authored
      Pull regmap fix from Mark Brown:
       "Another fix for the maple tree cache, Takashi noticed that unlike
        other caches the maple tree cache didn't check for read only registers
        before trying to sync which would result in spurious syncs for read
        only registers where we don't have a default.
      
        This was due to the check being open coded in the caches, we now check
        in the shared 'does this register need sync' function so that is fixed
        for this and future caches"
      
      * tag 'regmap-fix-v6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
        regmap: regcache: Don't sync read-only registers
      231a1e31
    • Linus Torvalds's avatar
      Merge tag 'media/v6.4-6' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media · c926a55f
      Linus Torvalds authored
      Pull media fixes from Mauro Carvalho Chehab:
       "A fix for dvb-core to avoid a race condition during DVB board
        registration"
      
      * tag 'media/v6.4-6' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
        Revert "media: dvb-core: Fix use-after-free on race condition at dvb_frontend"
      c926a55f
    • Linus Torvalds's avatar
      Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · 62d87796
      Linus Torvalds authored
      Pull ext4 fixes from Ted Ts'o:
       "Fix two regressions in ext4, one report by syzkaller[1], and reported
        by multiple users (and tracked by regzbot[2])"
      
      [1] https://syzkaller.appspot.com/bug?extid=4acc7d910e617b360859
      [2] https://linux-regtracking.leemhuis.info/regzbot/regression/ZIauBR7YiV3rVAHL@glitch/
      
      * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
        ext4: drop the call to ext4_error() from ext4_get_group_info()
        Revert "ext4: remove unnecessary check in ext4_bg_num_gdb_nometa"
      62d87796
    • Linus Torvalds's avatar
      Merge tag '6.4-rc6-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 · 7a043feb
      Linus Torvalds authored
      Pull smb client fixes from Steve French:
       "Eight, mostly small, smb3 client fixes:
      
         - important fix for deferred close oops (race with unmount) found
           with xfstest generic/098 to some servers
      
         - important reconnect fix
      
         - fix problem with max_credits mount option
      
         - two multichannel (interface related) fixes
      
         - one trivial removal of confusing comment
      
         - two small debugging improvements (to better spot crediting
           problems)"
      
      * tag '6.4-rc6-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: add a warning when the in-flight count goes negative
        cifs: fix lease break oops in xfstest generic/098
        cifs: fix max_credits implementation
        cifs: fix sockaddr comparison in iface_cmp
        smb/client: print "Unknown" instead of bogus link speed value
        cifs: print all credit counters in DebugData
        cifs: fix status checks in cifs_tree_connect
        smb: remove obsolete comment
      7a043feb
  2. Jun 15, 2023
    • Fabio M. De Francesco's avatar
      ext4: drop the call to ext4_error() from ext4_get_group_info() · f451fd97
      Fabio M. De Francesco authored
      
      
      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: 5354b2af
      
       ("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
      f451fd97
    • Kemeng Shi's avatar
      Revert "ext4: remove unnecessary check in ext4_bg_num_gdb_nometa" · 19482792
      Kemeng Shi authored
      This reverts commit ad3f09be
      
      .
      
      The reverted commit was intended to simpfy the code to get group
      descriptor block number in non-meta block group by assuming
      s_gdb_count is block number used for all non-meta block group descriptors.
      However s_gdb_count is block number used for all meta *and* non-meta
      group descriptors. So s_gdb_group will be > actual group descriptor block
      number used for all non-meta block group which should be "total non-meta
      block group" / "group descriptors per block", e.g. s_first_meta_bg.
      
      Signed-off-by: default avatarKemeng Shi <shikemeng@huaweicloud.com>
      Link: https://lore.kernel.org/r/20230613225025.3859522-1-shikemeng@huaweicloud.com
      Fixes: ad3f09be
      
       ("ext4: remove unnecessary check in ext4_bg_num_gdb_nometa")
      Cc: stable@kernel.org
      Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      19482792
    • Mauro Carvalho Chehab's avatar
      Revert "media: dvb-core: Fix use-after-free on race condition at dvb_frontend" · ec21a38d
      Mauro Carvalho Chehab authored
      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 6769a0b7.
      
      Fixes: 6769a0b7 ("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>
      ec21a38d
    • Bob Pearson's avatar
      RDMA/rxe: Fix rxe_cq_post · 0c7e314a
      Bob Pearson authored
      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: 78b26a33 ("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>
      0c7e314a
  3. Jun 14, 2023
  4. Jun 13, 2023