1. 30 Jan, 2023 3 commits
    • John Harrison's avatar
      drm/i915: Fix request ref counting during error capture & debugfs dump · 86d8ddc7
      John Harrison authored
      When GuC support was added to error capture, the reference counting
      around the request object was broken. Fix it up.
      
      The context based search manages the spinlocking around the search
      internally. So it needs to grab the reference count internally as
      well. The execlist only request based search relies on external
      locking, so it needs an external reference count but within the
      spinlock not outside it.
      
      The only other caller of the context based search is the code for
      dumping engine state to debugfs. That code wasn't previously getting
      an explicit reference at all as it does everything while holding the
      execlist specific spinlock. So, that needs updaing as well as that
      spinlock doesn't help when using GuC submission. Rather than trying to
      conditionally get/put depending on submission model, just change it to
      always do the get/put.
      
      v2: Explicitly document adding an extra blank line in some dense code
      (Andy Shevchenko). Fix multiple potential null pointer derefs in case
      of no request found (some spotted by Tvrtko, but there was more!).
      Also fix a leaked request in case of !started and another in
      __guc_reset_context now that intel_context_find_active_request is
      actually reference counting the returned request.
      v3: Add a _get suffix to intel_context_find_active_request now that it
      grabs a reference (Daniele).
      v4: Split the intel_guc_find_hung_context change to a separate patch
      and rename intel_context_find_active_request_get to
      intel_context_get_active_request (Tvrtko).
      v5: s/locking/reference counting/ in commit message (Tvrtko)
      
      Fixes: dc0dad36 ("drm/i915/guc: Fix for error capture after full GPU reset with GuC")
      Fixes: 573ba126 ("drm/i915/guc: Capture error state on context reset")
      Signed-off-by: default avatarJohn Harrison <John.C.Harrison@Intel.com>
      Reviewed-by: default avatarDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
      Acked-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Matthew Brost <matthew.brost@intel.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: Andrzej Hajda <andrzej.hajda@intel.com>
      Cc: Matthew Auld <matthew.auld@intel.com>
      Cc: Matt Roper <matthew.d.roper@intel.com>
      Cc: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
      Cc: Michael Cheng <michael.cheng@intel.com>
      Cc: Lucas De Marchi <lucas.demarchi@intel.com>
      Cc: Tejas Upadhyay <tejaskumarx.surendrakumar.upadhyay@intel.com>
      Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: Aravind Iddamsetty <aravind.iddamsetty@intel.com>
      Cc: Alan Previn <alan.previn.teres.alexis@intel.com>
      Cc: Bruce Chang <yu.bruce.chang@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20230127002842.3169194-3-John.C.Harrison@Intel.com
      (cherry picked from commit 3700e353)
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      86d8ddc7
    • John Harrison's avatar
      drm/i915/guc: Fix locking when searching for a hung request · 87b04e53
      John Harrison authored
      intel_guc_find_hung_context() was not acquiring the correct spinlock
      before searching the request list. So fix that up. While at it, add
      some extra whitespace padding for readability.
      
      Fixes: dc0dad36 ("drm/i915/guc: Fix for error capture after full GPU reset with GuC")
      Signed-off-by: default avatarJohn Harrison <John.C.Harrison@Intel.com>
      Reviewed-by: default avatarDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
      Acked-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Matthew Brost <matthew.brost@intel.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: Matt Roper <matthew.d.roper@intel.com>
      Cc: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
      Cc: Michael Cheng <michael.cheng@intel.com>
      Cc: Lucas De Marchi <lucas.demarchi@intel.com>
      Cc: Tejas Upadhyay <tejaskumarx.surendrakumar.upadhyay@intel.com>
      Cc: Chris Wilson <chris.p.wilson@intel.com>
      Cc: Bruce Chang <yu.bruce.chang@intel.com>
      Cc: Alan Previn <alan.previn.teres.alexis@intel.com>
      Cc: Matthew Auld <matthew.auld@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20230127002842.3169194-2-John.C.Harrison@Intel.com
      (cherry picked from commit d1c37175)
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      87b04e53
    • Rob Clark's avatar
      drm/i915: Avoid potential vm use-after-free · 41d41938
      Rob Clark authored
      Adding the vm to the vm_xa table makes it visible to userspace, which
      could try to race with us to close the vm.  So we need to take our extra
      reference before putting it in the table.
      Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
      Reviewed-by: default avatarMatthew Auld <matthew.auld@intel.com>
      Fixes: 9ec8795e ("drm/i915: Drop __rcu from gem_context->vm")
      Cc: <stable@vger.kernel.org> # v5.16+
      Signed-off-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20230119173321.2825472-1-robdclark@gmail.com
      (cherry picked from commit 99343c46)
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      41d41938
  2. 29 Jan, 2023 6 commits
  3. 28 Jan, 2023 7 commits
    • Linus Torvalds's avatar
      Fix up more non-executable files marked executable · c9661827
      Linus Torvalds authored
      Joe found another DT file that shouldn't be executable, and that
      frustrated me enough that I went hunting with this script:
      
          git ls-files -s |
              grep '^100755' |
              cut -f2 |
              xargs grep -L '^#!'
      
      and that found another file that shouldn't have been marked executable
      either, despite being in the scripts directory.
      
      Maybe these two are the last ones at least for now.  But I'm sure we'll
      be back in a few years, fixing things up again.
      
      Fixes: 8c6789f4 ("ASoC: dt-bindings: Add Everest ES8326 audio CODEC")
      Fixes: 4d8e5cd2 ("locking/atomics: Fix scripts/atomic/ script permissions")
      Reported-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      c9661827
    • Linus Torvalds's avatar
      Merge tag '6.2-rc5-ksmbd-server-fixes' of git://git.samba.org/ksmbd · 2543fdbd
      Linus Torvalds authored
      Pull ksmbd server fixes from Steve French:
       "Four smb3 server fixes, all also for stable:
      
         - fix for signing bug
      
         - fix to more strictly check packet length
      
         - add a max connections parm to limit simultaneous connections
      
         - fix error message flood that can occur with newer Samba xattr
           format"
      
      * tag '6.2-rc5-ksmbd-server-fixes' of git://git.samba.org/ksmbd:
        ksmbd: downgrade ndr version error message to debug
        ksmbd: limit pdu length size according to connection status
        ksmbd: do not sign response to session request for guest login
        ksmbd: add max connections parameter
      2543fdbd
    • Linus Torvalds's avatar
      Merge tag '6.2-rc5-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 · 5af6ce70
      Linus Torvalds authored
      Pull cifs fix from Steve French:
       "Fix for reconnect oops in smbdirect (RDMA), also is marked for stable"
      
      * tag '6.2-rc5-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: Fix oops due to uncleared server->smbd_conn in reconnect
      5af6ce70
    • Linus Torvalds's avatar
      Merge tag 'block-6.2-2023-01-27' of git://git.kernel.dk/linux · 90aaef4e
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "Minor tweaks for this release:
      
         - NVMe pull request via Christoph:
              - Flush initial scan_work for async probe (Keith Busch)
              - Fix passthrough csi check (Keith Busch)
              - Fix nvme-fc initialization order (Ross Lagerwall)
      
         - Fix for tearing down non-started device in ublk (Ming)"
      
      * tag 'block-6.2-2023-01-27' of git://git.kernel.dk/linux:
        block: ublk: move ublk_chr_class destroying after devices are removed
        nvme: fix passthrough csi check
        nvme-pci: flush initial scan_work for async probe
        nvme-fc: fix initialization order
      90aaef4e
    • Linus Torvalds's avatar
      Merge tag 'io_uring-6.2-2023-01-27' of git://git.kernel.dk/linux · f851453b
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
       "Two small fixes for this release:
      
         - Sanitize how async prep is done for drain requests, so we ensure
           that it always gets done (Dylan)
      
         - A ring provided buffer recycling fix for multishot receive (me)"
      
      * tag 'io_uring-6.2-2023-01-27' of git://git.kernel.dk/linux:
        io_uring: always prep_async for drain requests
        io_uring/net: cache provided buffer group value for multishot receives
      f851453b
    • Linus Torvalds's avatar
      Merge tag 'hardening-v6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux · 28cca23d
      Linus Torvalds authored
      Pull hardening fixes from Kees Cook:
      
       - Split slow memcpy tests into MEMCPY_SLOW_KUNIT_TEST
      
       - Reorganize gcc-plugin includes for GCC 13
      
       - Silence bcache memcpy run-time false positive warnings
      
      * tag 'hardening-v6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
        bcache: Silence memcpy() run-time false positive warnings
        gcc-plugins: Reorganize gimple includes for GCC 13
        kunit: memcpy: Split slow memcpy tests into MEMCPY_SLOW_KUNIT_TEST
      28cca23d
    • Linus Torvalds's avatar
      Merge tag 'trace-v6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace · d786f0fe
      Linus Torvalds authored
      Pull tracing fixes from Steven Rostedt:
      
       - Fix filter memory leak by calling ftrace_free_filter()
      
       - Initialize trace_printk() earlier so that ftrace_dump_on_oops shows
         data on early crashes.
      
       - Update the outdated instructions in scripts/tracing/ftrace-bisect.sh
      
       - Add lockdep_is_held() to fix lockdep warning
      
       - Add allocation failure check in create_hist_field()
      
       - Don't initialize pointer that gets set right away in enabled_monitors_write()
      
       - Update MAINTAINER entries
      
       - Fix help messages in Kconfigs
      
       - Fix kernel-doc header for update_preds()
      
      * tag 'trace-v6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
        bootconfig: Update MAINTAINERS file to add tree and mailing list
        rv: remove redundant initialization of pointer ptr
        ftrace: Maintain samples/ftrace
        tracing/filter: fix kernel-doc warnings
        lib: Kconfig: fix spellos
        trace_events_hist: add check for return value of 'create_hist_field'
        tracing/osnoise: Use built-in RCU list checking
        tracing: Kconfig: Fix spelling/grammar/punctuation
        ftrace/scripts: Update the instructions for ftrace-bisect.sh
        tracing: Make sure trace_printk() can output as soon as it can be used
        ftrace: Export ftrace_free_filter() to modules
      d786f0fe
  4. 27 Jan, 2023 20 commits
  5. 26 Jan, 2023 4 commits
    • Jens Axboe's avatar
      Merge tag 'nvme-6.2-2023-01-26' of git://git.infradead.org/nvme into block-6.2 · db3ba974
      Jens Axboe authored
      Pull NVMe fixes from Christoph:
      
      "nvme fixes for Linux 6.2
      
       - flush initial scan_work for async probe (Keith Busch)
       - fix passthrough csi check (Keith Busch)
       - fix nvme-fc initialization order (Ross Lagerwall)"
      
      * tag 'nvme-6.2-2023-01-26' of git://git.infradead.org/nvme:
        nvme: fix passthrough csi check
        nvme-pci: flush initial scan_work for async probe
        nvme-fc: fix initialization order
      db3ba974
    • Linus Torvalds's avatar
      Merge tag 'platform-drivers-x86-v6.2-3' of... · 83abd4d4
      Linus Torvalds authored
      Merge tag 'platform-drivers-x86-v6.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
      
      Pull x86 platform driver fixes from Hans de Goede:
      
       -  Fix false positive apple_gmux backlight detection on older iGPU only
          MacBook models
      
       -  Various other small fixes and hardware-id additions
      
      * tag 'platform-drivers-x86-v6.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
        platform/x86: thinkpad_acpi: Fix profile modes on Intel platforms
        ACPI: video: Fix apple gmux detection
        platform/x86: apple-gmux: Add apple_gmux_detect() helper
        platform/x86: apple-gmux: Move port defines to apple-gmux.h
        platform/x86: hp-wmi: Fix cast to smaller integer type warning
        platform/x86/amd: pmc: Add a module parameter to disable workarounds
        platform/x86/amd: pmc: Disable IRQ1 wakeup for RN/CZN
        platform/x86: asus-wmi: Fix kbd_dock_devid tablet-switch reporting
        platform/x86: gigabyte-wmi: add support for B450M DS3H WIFI-CF
        platform/x86: hp-wmi: Handle Omen Key event
        platform/x86: dell-wmi: Add a keymap for KEY_MUTE in type 0x0010 table
      83abd4d4
    • 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