1. 20 Dec, 2022 1 commit
  2. 15 Dec, 2022 1 commit
    • minoura makoto's avatar
      SUNRPC: ensure the matching upcall is in-flight upon downcall · b18cba09
      minoura makoto authored
      Commit 9130b8db ("SUNRPC: allow for upcalls for the same uid
      but different gss service") introduced `auth` argument to
      __gss_find_upcall(), but in gss_pipe_downcall() it was left as NULL
      since it (and auth->service) was not (yet) determined.
      
      When multiple upcalls with the same uid and different service are
      ongoing, it could happen that __gss_find_upcall(), which returns the
      first match found in the pipe->in_downcall list, could not find the
      correct gss_msg corresponding to the downcall we are looking for.
      Moreover, it might return a msg which is not sent to rpc.gssd yet.
      
      We could see mount.nfs process hung in D state with multiple mount.nfs
      are executed in parallel.  The call trace below is of CentOS 7.9
      kernel-3.10.0-1160.24.1.el7.x86_64 but we observed the same hang w/
      elrepo kernel-ml-6.0.7-1.el7.
      
      PID: 71258  TASK: ffff91ebd4be0000  CPU: 36  COMMAND: "mount.nfs"
       #0 [ffff9203ca3234f8] __schedule at ffffffffa3b8899f
       #1 [ffff9203ca323580] schedule at ffffffffa3b88eb9
       #2 [ffff9203ca323590] gss_cred_init at ffffffffc0355818 [auth_rpcgss]
       #3 [ffff9203ca323658] rpcauth_lookup_credcache at ffffffffc0421ebc
      [sunrpc]
       #4 [ffff9203ca3236d8] gss_lookup_cred at ffffffffc0353633 [auth_rpcgss]
       #5 [ffff9203ca3236e8] rpcauth_lookupcred at ffffffffc0421581 [sunrpc]
       #6 [ffff9203ca323740] rpcauth_refreshcred at ffffffffc04223d3 [sunrpc]
       #7 [ffff9203ca3237a0] call_refresh at ffffffffc04103dc [sunrpc]
       #8 [ffff9203ca3237b8] __rpc_execute at ffffffffc041e1c9 [sunrpc]
       #9 [ffff9203ca323820] rpc_execute at ffffffffc0420a48 [sunrpc]
      
      The scenario is like this. Let's say there are two upcalls for
      services A and B, A -> B in pipe->in_downcall, B -> A in pipe->pipe.
      
      When rpc.gssd reads pipe to get the upcall msg corresponding to
      service B from pipe->pipe and then writes the response, in
      gss_pipe_downcall the msg corresponding to service A will be picked
      because only uid is used to find the msg and it is before the one for
      B in pipe->in_downcall.  And the process waiting for the msg
      corresponding to service A will be woken up.
      
      Actual scheduing of that process might be after rpc.gssd processes the
      next msg.  In rpc_pipe_generic_upcall it clears msg->errno (for A).
      The process is scheduled to see gss_msg->ctx == NULL and
      gss_msg->msg.errno == 0, therefore it cannot break the loop in
      gss_create_upcall and is never woken up after that.
      
      This patch adds a simple check to ensure that a msg which is not
      sent to rpc.gssd yet is not chosen as the matching upcall upon
      receiving a downcall.
      Signed-off-by: default avatarminoura makoto <minoura@valinux.co.jp>
      Signed-off-by: default avatarHiroshi Shimamoto <h-shimamoto@nec.com>
      Tested-by: default avatarHiroshi Shimamoto <h-shimamoto@nec.com>
      Cc: Trond Myklebust <trondmy@hammerspace.com>
      Fixes: 9130b8db ("SUNRPC: allow for upcalls for same uid but different gss service")
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
      b18cba09
  3. 10 Dec, 2022 1 commit
  4. 06 Dec, 2022 12 commits
  5. 05 Dec, 2022 1 commit
  6. 28 Nov, 2022 10 commits
  7. 27 Nov, 2022 11 commits
    • Linus Torvalds's avatar
      Linux 6.1-rc7 · b7b275e6
      Linus Torvalds authored
      b7b275e6
    • Linus Torvalds's avatar
      Merge tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · cf562a45
      Linus Torvalds authored
      Pull vfs fix from Al Viro:
       "Amir's copy_file_range() fix"
      
      * tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        vfs: fix copy_file_range() averts filesystem freeze protection
      cf562a45
    • Linus Torvalds's avatar
      Merge tag 'usb-6.1-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 9066e151
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are some small USB fixes for 6.1-rc7 that resolve some reported
        problems:
      
         - cdnsp driver fixes for reported problems
      
         - dwc3 fixes for some small reported problems
      
         - uvc gadget driver fix for reported regression
      
        All of these have been in linux-next with no reported problems"
      
      * tag 'usb-6.1-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        usb: cdnsp: fix issue with ZLP - added TD_SIZE = 1
        usb: dwc3: gadget: Clear ep descriptor last
        usb: dwc3: exynos: Fix remove() function
        usb: cdnsp: Fix issue with Clear Feature Halt Endpoint
        usb: dwc3: gadget: Disable GUSB2PHYCFG.SUSPHY for End Transfer
        usb: gadget: uvc: also use try_format in set_format
      9066e151
    • Linus Torvalds's avatar
      Merge tag 'char-misc-6.1-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · db318248
      Linus Torvalds authored
      Pull char/misc driver fixes from Greg KH:
       "Here are some small driver fixes for 6.1-rc7, they include:
      
         - build warning fix for the vdso when using new versions of grep
      
         - iio driver fixes for reported issues
      
         - small nvmem driver fixes
      
         - fpga Kconfig fix
      
         - interconnect dt binding fix
      
        All of these have been in linux-next with no reported issues"
      
      * tag 'char-misc-6.1-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        lib/vdso: use "grep -E" instead of "egrep"
        nvmem: lan9662-otp: Change return type of lan9662_otp_wait_flag_clear()
        nvmem: rmem: Fix return value check in rmem_read()
        fpga: m10bmc-sec: Fix kconfig dependencies
        dt-bindings: iio: adc: Remove the property "aspeed,trim-data-valid"
        iio: adc: aspeed: Remove the trim valid dts property.
        iio: core: Fix entry not deleted when iio_register_sw_trigger_type() fails
        iio: accel: bma400: Fix memory leak in bma400_get_steps_reg()
        iio: light: rpr0521: add missing Kconfig dependencies
        iio: health: afe4404: Fix oob read in afe4404_[read|write]_raw
        iio: health: afe4403: Fix oob read in afe4403_read_raw
        iio: light: apds9960: fix wrong register for gesture gain
        dt-bindings: interconnect: qcom,msm8998-bwmon: Correct SC7280 CPU compatible
      db318248
    • Linus Torvalds's avatar
      Merge tag 'timers_urgent_for_v6.1_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 715d2d96
      Linus Torvalds authored
      Pull timer fix from Borislav Petkov:
      
       - Return the proper timer register width (31 bits) for a 32-bit signed
         register in order to avoid a timer interrupt storm on ARM XGene-1
         hardware running in NO_HZ mode
      
      * tag 'timers_urgent_for_v6.1_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        clocksource/drivers/arm_arch_timer: Fix XGene-1 TVAL register math error
      715d2d96
    • Linus Torvalds's avatar
      Merge tag 'objtool_urgent_for_v6.1_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · b465cf17
      Linus Torvalds authored
      Pull objtool fix from Borislav Petkov:
      
       - Handle different output of readelf on different distros running
         ppc64le which confuses faddr2line's function offsets conversion
      
      * tag 'objtool_urgent_for_v6.1_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        scripts/faddr2line: Fix regression in name resolution on ppc64le
      b465cf17
    • Linus Torvalds's avatar
      Merge tag 'x86_urgent_for_v6.1_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 08b06441
      Linus Torvalds authored
      Pull x86 fixes from Borislav Petkov:
      
       - ioremap: mask out the bits which are not part of the physical address
         *after* the size computation is done to prevent any hypothetical
         ioremap failures
      
       - Change the MSR save/restore functionality during suspend to rely on
         flags denoting that the related MSRs are actually supported vs
         reading them and assuming they are (an Atom one allows reading but
         not writing, thus breaking this scheme at resume time)
      
       - prevent IV reuse in the AES-GCM communication scheme between SNP
         guests and the AMD secure processor
      
      * tag 'x86_urgent_for_v6.1_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/ioremap: Fix page aligned size calculation in __ioremap_caller()
        x86/pm: Add enumeration check before spec MSRs save/restore setup
        x86/tsx: Add a feature bit for TSX control MSR support
        virt/sev-guest: Prevent IV reuse in the SNP guest driver
      08b06441
    • Linus Torvalds's avatar
      Merge tag 'perf_urgent_for_v6.1_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 5afcab22
      Linus Torvalds authored
      Pull perf fixes from Borislav Petkov:
       "Two more fixes to the perf sigtrap handling:
      
         - output the address in the sample only when it has been requested
      
         - handle the case where user-only events can hit in kernel and thus
           upset the sigtrap sanity checking"
      
      * tag 'perf_urgent_for_v6.1_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf: Consider OS filter fail
        perf: Fixup SIGTRAP and sample_flags interaction
      5afcab22
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · bf82d38c
      Linus Torvalds authored
      Pull kvm fixes from Paolo Bonzini:
       "x86:
      
         - Fixes for Xen emulation. While nobody should be enabling it in the
           kernel (the only public users of the feature are the selftests),
           the bug effectively allows userspace to read arbitrary memory.
      
         - Correctness fixes for nested hypervisors that do not intercept INIT
           or SHUTDOWN on AMD; the subsequent CPU reset can cause a
           use-after-free when it disables virtualization extensions. While
           downgrading the panic to a WARN is quite easy, the full fix is a
           bit more laborious; there are also tests. This is the bulk of the
           pull request.
      
         - Fix race condition due to incorrect mmu_lock use around
           make_mmu_pages_available().
      
        Generic:
      
         - Obey changes to the kvm.halt_poll_ns module parameter in VMs not
           using KVM_CAP_HALT_POLL, restoring behavior from before the
           introduction of the capability"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: Update gfn_to_pfn_cache khva when it moves within the same page
        KVM: x86/xen: Only do in-kernel acceleration of hypercalls for guest CPL0
        KVM: x86/xen: Validate port number in SCHEDOP_poll
        KVM: x86/mmu: Fix race condition in direct_page_fault
        KVM: x86: remove exit_int_info warning in svm_handle_exit
        KVM: selftests: add svm part to triple_fault_test
        KVM: x86: allow L1 to not intercept triple fault
        kvm: selftests: add svm nested shutdown test
        KVM: selftests: move idt_entry to header
        KVM: x86: forcibly leave nested mode on vCPU reset
        KVM: x86: add kvm_leave_nested
        KVM: x86: nSVM: harden svm_free_nested against freeing vmcb02 while still in use
        KVM: x86: nSVM: leave nested mode on vCPU free
        KVM: Obey kvm.halt_poll_ns in VMs not using KVM_CAP_HALT_POLL
        KVM: Avoid re-reading kvm->max_halt_poll_ns during halt-polling
        KVM: Cap vcpu->halt_poll_ns before halting rather than after
      bf82d38c
    • Linus Torvalds's avatar
      Merge tag '6.1-rc6-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 · 30a853c1
      Linus Torvalds authored
      Pull cifs fixes from Steve French:
       "Two small cifs/smb3 client fixes:
      
         - an unlock missing in an error path in copychunk_range found by
           xfstest 476
      
         - a fix for a use after free in a debug code path"
      
      * tag '6.1-rc6-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: fix missing unlock in cifs_file_copychunk_range()
        cifs: Use after free in debug code
      30a853c1
    • Linus Torvalds's avatar
      Merge tag 'kbuild-fixes-v6.1-4' of... · faf68e35
      Linus Torvalds authored
      Merge tag 'kbuild-fixes-v6.1-4' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
      
      Pull Kbuild fixes from Masahiro Yamada:
      
       - Fix CC_HAS_ASM_GOTO_TIED_OUTPUT test in Kconfig
      
       - Fix noisy "No such file or directory" message when
         KBUILD_BUILD_VERSION is passed
      
       - Include rust/ in source tarballs
      
       - Fix missing FORCE for ARCH=nios2 builds
      
      * tag 'kbuild-fixes-v6.1-4' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        nios2: add FORCE for vmlinuz.gz
        scripts: add rust in scripts/Makefile.package
        kbuild: fix "cat: .version: No such file or directory"
        init/Kconfig: fix CC_HAS_ASM_GOTO_TIED_OUTPUT test with dash
      faf68e35
  8. 26 Nov, 2022 3 commits