1. 31 May, 2022 2 commits
    • Kinglong Mee's avatar
      xprtrdma: treat all calls not a bcall when bc_serv is NULL · 11270e7c
      Kinglong Mee authored
      When a rdma server returns a fault format reply, nfs v3 client may
      treats it as a bcall when bc service is not exist.
      
      The debug message at rpcrdma_bc_receive_call are,
      
      [56579.837169] RPC:       rpcrdma_bc_receive_call: callback XID
      00000001, length=20
      [56579.837174] RPC:       rpcrdma_bc_receive_call: 00 00 00 01 00 00 00
      00 00 00 00 00 00 00 00 00 00 00 00 04
      
      After that, rpcrdma_bc_receive_call will meets NULL pointer as,
      
      [  226.057890] BUG: unable to handle kernel NULL pointer dereference at
      00000000000000c8
      ...
      [  226.058704] RIP: 0010:_raw_spin_lock+0xc/0x20
      ...
      [  226.059732] Call Trace:
      [  226.059878]  rpcrdma_bc_receive_call+0x138/0x327 [rpcrdma]
      [  226.060011]  __ib_process_cq+0x89/0x170 [ib_core]
      [  226.060092]  ib_cq_poll_work+0x26/0x80 [ib_core]
      [  226.060257]  process_one_work+0x1a7/0x360
      [  226.060367]  ? create_worker+0x1a0/0x1a0
      [  226.060440]  worker_thread+0x30/0x390
      [  226.060500]  ? create_worker+0x1a0/0x1a0
      [  226.060574]  kthread+0x116/0x130
      [  226.060661]  ? kthread_flush_work_fn+0x10/0x10
      [  226.060724]  ret_from_fork+0x35/0x40
      ...
      Signed-off-by: default avatarKinglong Mee <kinglongmee@gmail.com>
      Reviewed-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
      11270e7c
    • Benjamin Coddington's avatar
      NFSv4: Fix free of uninitialized nfs4_label on referral lookup. · c3ed2227
      Benjamin Coddington authored
      Send along the already-allocated fattr along with nfs4_fs_locations, and
      drop the memcpy of fattr.  We end up growing two more allocations, but this
      fixes up a crash as:
      
      PID: 790    TASK: ffff88811b43c000  CPU: 0   COMMAND: "ls"
       #0 [ffffc90000857920] panic at ffffffff81b9bfde
       #1 [ffffc900008579c0] do_trap at ffffffff81023a9b
       #2 [ffffc90000857a10] do_error_trap at ffffffff81023b78
       #3 [ffffc90000857a58] exc_stack_segment at ffffffff81be1f45
       #4 [ffffc90000857a80] asm_exc_stack_segment at ffffffff81c009de
       #5 [ffffc90000857b08] nfs_lookup at ffffffffa0302322 [nfs]
       #6 [ffffc90000857b70] __lookup_slow at ffffffff813a4a5f
       #7 [ffffc90000857c60] walk_component at ffffffff813a86c4
       #8 [ffffc90000857cb8] path_lookupat at ffffffff813a9553
       #9 [ffffc90000857cf0] filename_lookup at ffffffff813ab86b
      Suggested-by: default avatarTrond Myklebust <trondmy@hammerspace.com>
      Fixes: 9558a007 ("NFS: Remove the label from the nfs4_lookup_res struct")
      Signed-off-by: default avatarBenjamin Coddington <bcodding@redhat.com>
      Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
      c3ed2227
  2. 17 May, 2022 17 commits
  3. 16 May, 2022 1 commit
  4. 15 May, 2022 8 commits
    • Linus Torvalds's avatar
      Merge tag 'driver-core-5.18-rc7' of... · 0cdd776e
      Linus Torvalds authored
      Merge tag 'driver-core-5.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
      
      Pull driver core fixes from Greg KH:
       "Here is one fix, and three documentation updates for 5.18-rc7.
      
        The fix is for the firmware loader which resolves a long-reported
        problem where the credentials of the firmware loader could be set to a
        userspace process without enough permissions to actually load the
        firmware image. Many Android vendors have been reporting this for
        quite some time.
      
        The documentation updates are for the embargoed-hardware-issues.rst
        file to add a new entry, change an existing one, and sort the list to
        make changes easier in the future.
      
        All of these have been in linux-next for a while with no reported
        issues"
      
      * tag 'driver-core-5.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
        Documentation/process: Update ARM contact for embargoed hardware issues
        Documentation/process: Add embargoed HW contact for Ampere Computing
        Documentation/process: Make groups alphabetical and use tabs consistently
        firmware_loader: use kernel credentials when reading firmware
      0cdd776e
    • Linus Torvalds's avatar
      Merge tag 'char-misc-5.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · 5becde60
      Linus Torvalds authored
      Pull char/misc driver fixes from Greg KH:
       "Here are two small driver fixes for 5.18-rc7 that resolve reported
        problems:
      
         - slimbus driver irq bugfix
      
         - interconnect sync state bugfix
      
        Both of these have been in linux-next with no reported problems"
      
      * tag 'char-misc-5.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        slimbus: qcom: Fix IRQ check in qcom_slim_probe
        interconnect: Restore sync state by ignoring ipa-virt in provider count
      5becde60
    • Linus Torvalds's avatar
      Merge tag 'tty-5.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · 6811a466
      Linus Torvalds authored
      Pull tty/serial driver fixes from Greg KH:
       "Here are some small tty n_gsm and serial driver fixes for 5.18-rc7
        that resolve reported problems. They include:
      
         - n_gsm fixes for reported issues
      
         - 8250_mtk driver fixes for some platforms
      
         - fsl_lpuart driver fix for reported problem.
      
         - digicolor driver fix for reported problem.
      
        All have been in linux-next for a while with no reported problems"
      
      * tag 'tty-5.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        fsl_lpuart: Don't enable interrupts too early
        tty: n_gsm: fix invalid gsmtty_write_room() result
        tty: n_gsm: fix mux activation issues in gsm_config()
        tty: n_gsm: fix buffer over-read in gsm_dlci_data()
        serial: 8250_mtk: Fix register address for XON/XOFF character
        serial: 8250_mtk: Make sure to select the right FEATURE_SEL
        serial: 8250_mtk: Fix UART_EFR register address
        tty/serial: digicolor: fix possible null-ptr-deref in digicolor_uart_probe()
      6811a466
    • Linus Torvalds's avatar
      Merge tag 'usb-5.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · fc49583c
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are some small fixes for reported issues with some USB drivers.
        They include:
      
         - xhci fixes for xhci-mtk platform driver
      
         - typec driver fixes for reported problems.
      
         - cdc-wdm read-stuck fix
      
         - gadget driver fix for reported race condition
      
         - new usb-serial driver ids
      
        All of these have been in linux-next with no reported problems"
      
      * tag 'usb-5.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        usb: xhci-mtk: remove bandwidth budget table
        usb: xhci-mtk: fix fs isoc's transfer error
        usb: gadget: fix race when gadget driver register via ioctl
        usb: typec: tcpci_mt6360: Update for BMC PHY setting
        usb: gadget: uvc: allow for application to cleanly shutdown
        usb: typec: tcpci: Don't skip cleanup in .remove() on error
        usb: cdc-wdm: fix reading stuck on device close
        USB: serial: qcserial: add support for Sierra Wireless EM7590
        USB: serial: option: add Fibocom MA510 modem
        USB: serial: option: add Fibocom L610 modem
        USB: serial: pl2303: add device id for HP LM930 Display
      fc49583c
    • Linus Torvalds's avatar
      Merge tag 'powerpc-5.18-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · bc403203
      Linus Torvalds authored
      Pull powerpc fix from Michael Ellerman:
      
       - Fix KVM PR on 32-bit, which was broken by some MMU code refactoring.
      
      Thanks to: Alexander Graf, and Matt Evans.
      
      * tag 'powerpc-5.18-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        KVM: PPC: Book3S PR: Enable MSR_DR for switch_mmu_context()
      bc403203
    • Linus Torvalds's avatar
      Merge tag 'x86-urgent-2022-05-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 79dc4fc2
      Linus Torvalds authored
      Pull x86 fix from Thomas Gleixner:
       "A single fix for the handling of unpopulated sub-pmd spaces.
      
        The copy & pasta from the corresponding s390 code screwed up the
        address calculation for marking the sub-pmd ranges via memset by
        omitting the ALIGN_DOWN() to calculate the proper start address.
      
        It's a mystery why this code is not generic and shared because there
        is nothing architecture specific in there, but that's too intrusive
        for a backportable fix"
      
      * tag 'x86-urgent-2022-05-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/mm: Fix marking of unused sub-pmd ranges
      79dc4fc2
    • Linus Torvalds's avatar
      Merge tag 'sched-urgent-2022-05-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 990e798d
      Linus Torvalds authored
      Pull scheduler fix from Thomas Gleixner:
       "The recent expansion of the sched switch tracepoint inserted a new
        argument in the middle of the arguments. This reordering broke BPF
        programs which relied on the old argument list.
      
        While tracepoints are not considered stable ABI, it's not trivial to
        make BPF cope with such a change, but it's being worked on. For now
        restore the original argument order and move the new argument to the
        end of the argument list"
      
      * tag 'sched-urgent-2022-05-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/tracing: Append prev_state to tp args instead
      990e798d
    • Linus Torvalds's avatar
      Merge tag 'irq-urgent-2022-05-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · fb756280
      Linus Torvalds authored
      Pull irq fix from Thomas Gleixner:
       "A single fix for a recent (introduced in 5.16) regression in the core
        interrupt code.
      
        The consolidation of the interrupt handler invocation code added an
        unconditional warning when generic_handle_domain_irq() is invoked from
        outside hard interrupt context. That's overbroad as the requirement
        for invoking these handlers in hard interrupt context is only required
        for certain interrupt types. The subsequently called code already
        contains a warning which triggers conditionally for interrupt chips
        which indicate this requirement in their properties.
      
        Remove the overbroad one"
      
      * tag 'irq-urgent-2022-05-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        genirq: Remove WARN_ON_ONCE() in generic_handle_domain_irq()
      fb756280
  5. 14 May, 2022 1 commit
  6. 13 May, 2022 11 commits
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2022-05-14' of git://anongit.freedesktop.org/drm/drm · ec7f4961
      Linus Torvalds authored
      Pull more drm fixes from Dave Airlie:
       "Turns out I was right, some fixes hadn't made it to me yet. The vmwgfx
        ones also popped up later, but all seem like bad enough things to fix.
        The dma-buf, vc4 and nouveau ones are all pretty small.
      
        The fbdev fixes are a bit more complicated: a fix to cleanup fbdev
        devices properly, uncovered some use-after-free bugs in existing
        drivers. Then the fix for those bugs wasn't correct. This reverts that
        fix, and puts the proper fixes in place in the drivers to avoid the
        use-after-frees.
      
        This has had a fair number of eyes on it at this stage, and I'm
        confident enough that it puts things in the right place, and is less
        dangerous than reverting our way out of the initial change at this
        stage.
      
        fbdev:
         - revert NULL deref fix that turned into a use-after-free
         - prevent use-after-free in fbdev
         - efifb/simplefb/vesafb: fix cleanup paths to avoid use-after-frees
      
        dma-buf:
         - fix panic in stats setup
      
        vc4:
         - fix hdmi build
      
        nouveau:
         - tegra iommu present fix
         - fix leak in backlight name
      
        vmwgfx:
         - Black screen due to fences using FIFO checks on SVGA3
         - Random black screens on boot due to uninitialized drm_mode_fb_cmd2
         - Hangs on SVGA3 due to command buffers being used with gbobjects"
      
      * tag 'drm-fixes-2022-05-14' of git://anongit.freedesktop.org/drm/drm:
        drm/vmwgfx: Disable command buffers on svga3 without gbobjects
        drm/vmwgfx: Initialize drm_mode_fb_cmd2
        drm/vmwgfx: Fix fencing on SVGAv3
        drm/vc4: hdmi: Fix build error for implicit function declaration
        dma-buf: call dma_buf_stats_setup after dmabuf is in valid list
        fbdev: efifb: Fix a use-after-free due early fb_info cleanup
        drm/nouveau: Fix a potential theorical leak in nouveau_get_backlight_name()
        drm/nouveau/tegra: Stop using iommu_present()
        fbdev: vesafb: Cleanup fb_info in .fb_destroy rather than .remove
        fbdev: efifb: Cleanup fb_info in .fb_destroy rather than .remove
        fbdev: simplefb: Cleanup fb_info in .fb_destroy rather than .remove
        fbdev: Prevent possible use-after-free in fb_release()
        Revert "fbdev: Make fb_release() return -ENODEV if fbdev was unregistered"
      ec7f4961
    • Dave Airlie's avatar
      Merge tag 'drm-misc-fixes-2022-05-13' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes · eb7bac39
      Dave Airlie authored
      Multiple fixes to fbdev to address a regression at unregistration, an
      iommu detection improvement for nouveau, a memory leak fix for nouveau,
      pointer dereference fix for dma_buf_file_release(), and a build breakage
      fix for vc4
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      
      From: Maxime Ripard <maxime@cerno.tech>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220513073044.ymayac7x7bzatrt7@houat
      eb7bac39
    • Dave Airlie's avatar
      Merge tag 'vmwgfx-drm-fixes-5.18-2022-05-13' of... · 30c60ba3
      Dave Airlie authored
      Merge tag 'vmwgfx-drm-fixes-5.18-2022-05-13' of https://gitlab.freedesktop.org/zack/vmwgfx into drm-fixes
      
      vmwgfx fixes for:
      - Black screen due to fences using FIFO checks on SVGA3
      - Random black screens on boot due to uninitialized drm_mode_fb_cmd2
      - Hangs on SVGA3 due to command buffers being used with gbobjects
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Zack Rusin <zackr@vmware.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/a1d32799e4c74b8540216376d7576bb783ca07ba.camel@vmware.com
      30c60ba3
    • Linus Torvalds's avatar
      Merge tag 'gfs2-v5.18-rc4-fix3' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 · d928e8f3
      Linus Torvalds authored
      Pull gfs2 fixes from Andreas Gruenbacher:
       "We've finally identified commit dc732906 ("gfs2: Introduce flag
        for glock holder auto-demotion") to be the other cause of the
        filesystem corruption we've been seeing. This feature isn't strictly
        necessary anymore, so we've decided to stop using it for now.
      
        With this and the gfs_iomap_end rounding fix you've already seen
        ("gfs2: Fix filesystem block deallocation for short writes" in this
        pull request), we're corruption free again now.
      
         - Fix filesystem block deallocation for short writes.
      
         - Stop using glock holder auto-demotion for now.
      
         - Get rid of buffered writes inefficiencies due to page faults being
           disabled.
      
         - Minor other cleanups"
      
      * tag 'gfs2-v5.18-rc4-fix3' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2:
        gfs2: Stop using glock holder auto-demotion for now
        gfs2: buffered write prefaulting
        gfs2: Align read and write chunks to the page cache
        gfs2: Pull return value test out of should_fault_in_pages
        gfs2: Clean up use of fault_in_iov_iter_{read,write}able
        gfs2: Variable rename
        gfs2: Fix filesystem block deallocation for short writes
      d928e8f3
    • Andreas Gruenbacher's avatar
      gfs2: Stop using glock holder auto-demotion for now · e1fa9ea8
      Andreas Gruenbacher authored
      We're having unresolved issues with the glock holder auto-demotion mechanism
      introduced in commit dc732906.  This mechanism was assumed to be essential
      for avoiding frequent short reads and writes until commit 296abc0d
      ("gfs2: No short reads or writes upon glock contention").  Since then,
      when the inode glock is lost, it is simply re-acquired and the operation
      is resumed.  This means that apart from the performance penalty, we
      might as well drop the inode glock before faulting in pages, and
      re-acquire it afterwards.
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      e1fa9ea8
    • Andreas Gruenbacher's avatar
      gfs2: buffered write prefaulting · fa5dfa64
      Andreas Gruenbacher authored
      In gfs2_file_buffered_write, to increase the likelihood that all the
      user memory we're trying to write will be resident in memory, carry out
      the write in chunks and fault in each chunk of user memory before trying
      to write it.  Otherwise, some workloads will trigger frequent short
      "internal" writes, causing filesystem blocks to be allocated and then
      partially deallocated again when writing into holes, which is wasteful
      and breaks reservations.
      
      Neither the chunked writes nor any of the short "internal" writes are
      user visible.
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      fa5dfa64
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · f2dd0074
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Four fixes, all in drivers.
      
        These patches mosly fix error legs and exceptional conditions
        (scsi_dh_alua, qla2xxx). The lpfc fixes are for coding issues with
        lpfc features"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: lpfc: Correct BDE DMA address assignment for GEN_REQ_WQE
        scsi: lpfc: Fix split code for FLOGI on FCoE
        scsi: qla2xxx: Fix missed DMA unmap for aborted commands
        scsi: scsi_dh_alua: Properly handle the ALUA transitioning state
      f2dd0074
    • Andreas Gruenbacher's avatar
      gfs2: Align read and write chunks to the page cache · 324d116c
      Andreas Gruenbacher authored
      Align the chunks that reads and writes are carried out in to the page
      cache rather than the user buffers.  This will be more efficient in
      general, especially for allocating writes.  Optimizing the case that the
      user buffer is gfs2 backed isn't very useful; we only need to make sure
      we won't deadlock.
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      324d116c
    • Andreas Gruenbacher's avatar
      gfs2: Pull return value test out of should_fault_in_pages · 72382264
      Andreas Gruenbacher authored
      Pull the return value test of the previous read or write operation out
      of should_fault_in_pages().  In a following patch, we'll fault in pages
      before the I/O and there will be no return value to check.
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      72382264
    • Andreas Gruenbacher's avatar
      gfs2: Clean up use of fault_in_iov_iter_{read,write}able · 6d22ff47
      Andreas Gruenbacher authored
      No need to store the return value of the fault_in functions in separate
      variables.
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      6d22ff47
    • Andreas Gruenbacher's avatar
      gfs2: Variable rename · 42e4c3bd
      Andreas Gruenbacher authored
      Instead of counting the number of bytes read from the filesystem,
      functions gfs2_file_direct_read and gfs2_file_read_iter count the number
      of bytes written into the user buffer.  Conversely, functions
      gfs2_file_direct_write and gfs2_file_buffered_write count the number of
      bytes read from the user buffer.  This is nothing but confusing, so
      change the read functions to count how many bytes they have read, and
      the write functions to count how many bytes they have written.
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      42e4c3bd