Commit graph

1106352 commits

Author SHA1 Message Date
Tomer Tayar 41021f728a habanalabs: fix race between hl_get_compute_ctx() and hl_ctx_put()
hl_get_compute_ctx() is used to get the pointer to the compute context
from the hpriv object.
The function is called in code paths that are not necessarily initiated
by user, so it is possible that a context release process will happen in
parallel.
This can lead to a race condition in which hl_get_compute_ctx()
retrieves the context pointer, and just before it increments the context
refcount, the context object is released and a freed memory is accessed.

To avoid this race, add a mutex to protect the context pointer in hpriv.
With this lock, hl_get_compute_ctx() will be able to detect if the
context has been released or is about to be released.

struct hl_ctx_mgr has a mutex for contexts IDR with a similar "ctx_lock"
name, so rename it to just "lock" to avoid a confusion with the new
lock.

Signed-off-by: Tomer Tayar <ttayar@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
2022-07-12 09:09:22 +03:00
Yuri Nudelman 2bc61bc4f3 habanalabs: keep a record of completed CS outcomes
Often, the user is not interested in the completion timestamp of all
command submissions.
A common situation is, for example, when the user submits a burst of,
possibly, several thousands of commands, then request the completion
timestamp of only couple of specific key commands from all the burst.
The problem is that currently, the outcome of the early commands may be
lost, due to a large amount of later commands, that the user does not
really care about.

This patch creates a separate store with the outcomes of commands the
user has mark explicitly as interested in. This store does not mix the
marked commands with the unmarked ones, hence the data there will
survive for much longer.

Signed-off-by: Yuri Nudelman <ynudelman@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
2022-07-12 09:09:22 +03:00
Oded Gabbay 8742a75a1c habanalabs/gaudi: fix comment to reflect current code
Due to code changes in the past few years, the original comment of
how parser->user_cb_size is checked was not correct anymore.

Fix it to reflect current code and add more explanation as the code
is more complex now.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
2022-07-12 09:09:22 +03:00
Tal Cohen d0c92afc0e habanalabs: change the write flag name of error info structs
positive flags naming will make more clear code while adding
more 'error info' structures

Signed-off-by: Tal Cohen <talcohen@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
2022-07-12 09:09:21 +03:00
Tal Cohen 939ed076ea habanalabs/gaudi: move tpc assert raise into internal func
raising the tpc assert event in an internal function will make
the code cleaner as we are going to be adding more events

Signed-off-by: Tal Cohen <talcohen@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
2022-07-12 09:09:21 +03:00
Dan Rapaport 2acd21cd00 habanalabs: align ioctl uapi structures to 64-bit
The compiler is padding the members of the struct to be aligned to
64-bit. The content of the padded bytes is and not zeroed explicitly,
hence might copy undefined data. We add a padding member to the struct
to get a zeroed 64-bit align struct.

Signed-off-by: Dan Rapaport <drapaport@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
2022-07-12 09:09:21 +03:00
Dafna Hirschfeld 78d503087b habanalabs: add terminating NULL to attrs arrays
Arrays of struct attribute are expected to be NULL terminated.
This is required by API methods such as device_add_groups.
This fixes a crash when loading the driver for Goya device.

Signed-off-by: Dafna Hirschfeld <dhirschfeld@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
2022-07-12 09:09:21 +03:00
Jiapeng Chong 18b6731538 habanalabs: Fix kernel-doc
Fix the following W=1 kernel warnings:

drivers/misc/habanalabs/common/mmu/mmu_v1.c:425: warning: expecting
prototype for hl_mmu_fini(). Prototype was for hl_mmu_v1_fini() instead.

drivers/misc/habanalabs/common/mmu/mmu_v1.c:449: warning: expecting
prototype for hl_mmu_ctx_init(). Prototype was for hl_mmu_v1_ctx_init()
instead.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
2022-07-12 09:09:21 +03:00
Jiapeng Chong 858e6d4085 habanalabs: Fix kernel-doc
Fix the following W=1 kernel warnings:

drivers/misc/habanalabs/common/pci/pci.c:454: warning: expecting
prototype for hl_fw_fini(). Prototype was for hl_pci_fini() instead.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
2022-07-12 09:09:21 +03:00
Dan Carpenter a43a9f6777 habanalabs: fix double unlock on error in map_device_va()
If hl_mmu_prefetch_cache_range() fails then this code calls
mutex_unlock(&ctx->mmu_lock) when it's no longer holding the mutex.

Fixes: 9e495e2400 ("habanalabs: do MMU prefetch as deferred work")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
2022-07-12 09:09:21 +03:00
Greg Kroah-Hartman 7e724422a7 CoreSight self-hosted tracing changes for v5.20.
- Fixes LOCKDEP warnings on module unload with configfs
  - Conversion of DT bindings to DT schema
  - Branch broadcast support for perf cs_etm
  - Etm4x driver fixes for build failures with Clang and unrolled loops
 
 Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEuFy0byloRoXZHaWBxcXRZPKyBqEFAmLMNdIACgkQxcXRZPKy
 BqGkiA/9GsnZ5t1S+JD320KJ9n8Schz4ZCXv8kCvjTOnipQBixscXL4eN8V183et
 feVMGLqHsUIXLGL4TLx0y6vtNwP/A+PqBUpUBFYM12NBXSfL8H9PnGNxJmDTRcrg
 bPmWm+OzfzgeGzbBqPJMXqbXFodGk/JRvXhoKpV7BTyQv6Z46SDnB0SXeBnbzm+z
 uLOCG6vZTShiBVB1OnKjrPfWuQA50sNnnBSZbLuRtmyv6a5+duVIwCbCqj0x7m3i
 +esZ9YtMhM9fOjUQQIG5bx1iPfpsaAlmgXDWLN6yPbJ3z3itcuIaMWRXvSPo/9zq
 e7+TGkIamegz7C2hbtbazn5KXIr18PzRMeCQpRXiredzlHJA3EUmKXJaptthjafx
 ncXrYvzCuR73pWvYE3Igc9kkM+9B8wvFcqK98b/1MqfoFyNG0cWsr4dqTX2UUa2i
 0ARyZHwcC0kRusF6/RBkC07TrL0Zh5HokSea2cTobmqwzZB3h/GMB201/xXRIQ22
 Ek+1BT3hpvIns5zpFffgL0oyB5qm7eZpIscZvOaaBqnqI7pv9CLtcdu/7y9VSOqF
 Jd+ooOKWS7PjwJz4rocYPlTYp0hs0oZ/sa1DvM/zQo+6oPEG92OzLbHRBGD6+ykp
 D6qu7J86pcZ9oL3OfWsrq1CL0tox6UXF6IYEgAiijUln3FreZjk=
 =yODb
 -----END PGP SIGNATURE-----

Merge tag 'coresight-next-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux into char-misc-next

Suzuki writes:

CoreSight self-hosted tracing changes for v5.20.

 - Fixes LOCKDEP warnings on module unload with configfs
 - Conversion of DT bindings to DT schema
 - Branch broadcast support for perf cs_etm
 - Etm4x driver fixes for build failures with Clang and unrolled loops

Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>

* tag 'coresight-next-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux:
  coresight: etm4x: avoid build failure with unrolled loops
  Documentation: coresight: Expand branch broadcast documentation
  Documentation: coresight: Link config options to existing documentation
  Documentation: coresight: Turn numbered subsections into real subsections
  coresight: Add config flag to enable branch broadcast
  Documentation: coresight: Escape coresight bindings file wildcard
  dt-bindings: arm: Convert CoreSight CPU debug to DT schema
  dt-bindings: arm: Convert CoreSight bindings to DT schema
  dt-bindings: arm: Rename Coresight filenames to match compatible
  coresight: syscfg: Update load and unload operations
  coresight: configfs: Fix unload of configurations on module exit
  coresight: Clear the connection field properly
2022-07-11 20:54:28 +02:00
Greg Kroah-Hartman 4682f21368 Here is the second set of FPGA changes for 5.20-rc1
FPGA Manager core:
 - Ivan's change to support image offset and data size setting for
 reprograming. A parse_header() callback is introduced for drivers to
 specify these info.
 - Colin's immediate spelling fix for Ivan's patch.
 
 Microchip:
 - Ivan's change to add Microchip MPF FPGA manager driver. And MAINTAINERS
 entry added for the driver.
 
 All patches have been reviewed on the mailing list, and have been in the
 last linux-next releases (as part of our for-next branch).
 
 Signed-off-by: Xu Yilun <yilun.xu@intel.com>
 -----BEGIN PGP SIGNATURE-----
 
 iIkEABYIADEWIQSgSJpClIeaArXyudb8twOBpKCM2gUCYsvASxMceWlsdW4ueHVA
 aW50ZWwuY29tAAoJEPy3A4GkoIzaMyEBAMKUyN61uN77uVM0ao2PNyvcQL0oGSHa
 O+EEj4ClWLsdAQC8ZwMdjTjRfAUd1vEcosSIb2ERXmfEr9UmQAH4TN/1Cg==
 =Z3hD
 -----END PGP SIGNATURE-----

Merge tag 'fpga-late-for-5.20-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga into char-misc-next

Xu writes:

Here is the second set of FPGA changes for 5.20-rc1

FPGA Manager core:
- Ivan's change to support image offset and data size setting for
reprograming. A parse_header() callback is introduced for drivers to
specify these info.
- Colin's immediate spelling fix for Ivan's patch.

Microchip:
- Ivan's change to add Microchip MPF FPGA manager driver. And MAINTAINERS
entry added for the driver.

All patches have been reviewed on the mailing list, and have been in the
last linux-next releases (as part of our for-next branch).

Signed-off-by: Xu Yilun <yilun.xu@intel.com>

* tag 'fpga-late-for-5.20-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga:
  fpga: fpga-mgr: Fix spelling mistake "bitsream" -> "bitstream"
  MAINTAINERS: add Microchip PolarFire FPGA drivers entry
  dt-bindings: fpga: add binding doc for microchip-spi fpga mgr
  fpga: microchip-spi: add Microchip MPF FPGA manager
  docs: fpga: mgr: document parse_header() callback
  fpga: fpga-mgr: support bitstream offset in image buffer
2022-07-11 12:30:24 +02:00
Greg Kroah-Hartman f5fd903b31 MHI Host
--------
 
 Support for new modems:
 
  - Quectel EM120 FCCL based on SDX24. This product MHI configuration is same
    as EM120R-GL modem.
  - Foxconn Cinterion MV31-W. This product is same as the existing MV31-W
    modem but sold as a separate product as it uses a different firmware
    baseline.
  - Foxconn T99W175 based on SDX55.
 
 Core changes:
 
  - Moved the IRQ allocation to MHI controller registration phase. Since the
    MHI endpoint may be powered up/down several times during runtime, it
    makes sense to move the IRQ allocation to registration phase and just
    enable/disable IRQs during endpoint power up/down.
 
 MHI endpoint
 ------------
 
 Core changes:
 
  - Added error check for dev_set_name()
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEZ6VDKoFIy9ikWCeXVZ8R5v6RzvUFAmLLwEwACgkQVZ8R5v6R
 zvVduQf9F8w3t8PP06i7Lo2gUoKARhGZUKFwK/ZRv2JdpFfVgC7BHas4/yAdljDQ
 gsmUbqpge8GaidyFk8Zlo5MBOKJK5C85TWKAWVI4pmB5r1iFMFP+YI/3TXNUP3yg
 nlMabWg05RdYU89c4Db3rpZVl6S+FfADwDilrE6BN9TA+T/z91zweb2VmD1AoAgP
 XqHX5pS60LaybIBk6hNPdhLfSk3un94tibNFfgbzY1F48t0+K+3Z1CeHszqoArwt
 vEKoTCDBJc1K4LmpGm388W9HXVJl46/xhxlxj6fq24jL1cWcB9/b6puKO4bmvYwl
 7DT9kBVssrBNucKIsZRVZafTALNK3w==
 =GxUB
 -----END PGP SIGNATURE-----

Merge tag 'mhi-for-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/mani/mhi into char-misc-next

Manivannan writes:

MHI Host
--------

Support for new modems:

 - Quectel EM120 FCCL based on SDX24. This product MHI configuration is same
   as EM120R-GL modem.
 - Foxconn Cinterion MV31-W. This product is same as the existing MV31-W
   modem but sold as a separate product as it uses a different firmware
   baseline.
 - Foxconn T99W175 based on SDX55.

Core changes:

 - Moved the IRQ allocation to MHI controller registration phase. Since the
   MHI endpoint may be powered up/down several times during runtime, it
   makes sense to move the IRQ allocation to registration phase and just
   enable/disable IRQs during endpoint power up/down.

MHI endpoint
------------

Core changes:

 - Added error check for dev_set_name()

* tag 'mhi-for-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/mani/mhi:
  bus: mhi: ep: Check dev_set_name() return value
  bus: mhi: host: pci_generic: Add another Foxconn T99W175
  bus: mhi: host: Move IRQ allocation to controller registration phase
  bus: mhi: host: pci_generic: Add Cinterion MV31-W with new baseline
  bus: mhi: host: pci_generic: Add support for Quectel EM120 FCCL modem
2022-07-11 12:28:46 +02:00
Nick Desaulniers 4d45bc82df coresight: etm4x: avoid build failure with unrolled loops
When the following configs are enabled:
* CORESIGHT
* CORESIGHT_SOURCE_ETM4X
* UBSAN
* UBSAN_TRAP

Clang fails assemble the kernel with the error:
<instantiation>:1:7: error: expected constant expression in '.inst' directive
.inst (0xd5200000|((((2) << 19) | ((1) << 16) | (((((((((((0x160 + (i * 4))))) >> 2))) >> 7) & 0x7)) << 12) | ((((((((((0x160 + (i * 4))))) >> 2))) & 0xf)) << 8) | (((((((((((0x160 + (i * 4))))) >> 2))) >> 4) & 0x7)) << 5)))|(.L__reg_num_x8))
      ^
drivers/hwtracing/coresight/coresight-etm4x-core.c:702:4: note: while in
macro instantiation
etm4x_relaxed_read32(csa, TRCCNTVRn(i));
^
drivers/hwtracing/coresight/coresight-etm4x.h:403:4: note: expanded from
macro 'etm4x_relaxed_read32'
read_etm4x_sysreg_offset((offset), false)))
^
drivers/hwtracing/coresight/coresight-etm4x.h:383:12: note: expanded
from macro 'read_etm4x_sysreg_offset'
__val = read_etm4x_sysreg_const_offset((offset));       \
        ^
drivers/hwtracing/coresight/coresight-etm4x.h:149:2: note: expanded from
macro 'read_etm4x_sysreg_const_offset'
READ_ETM4x_REG(ETM4x_OFFSET_TO_REG(offset))
^
drivers/hwtracing/coresight/coresight-etm4x.h:144:2: note: expanded from
macro 'READ_ETM4x_REG'
read_sysreg_s(ETM4x_REG_NUM_TO_SYSREG((reg)))
^
arch/arm64/include/asm/sysreg.h:1108:15: note: expanded from macro
'read_sysreg_s'
asm volatile(__mrs_s("%0", r) : "=r" (__val));                  \
             ^
arch/arm64/include/asm/sysreg.h:1074:2: note: expanded from macro '__mrs_s'
"       mrs_s " v ", " __stringify(r) "\n"                      \
 ^

Consider the definitions of TRCSSCSRn and TRCCNTVRn:
drivers/hwtracing/coresight/coresight-etm4x.h:56
 #define TRCCNTVRn(n)      (0x160 + (n * 4))
drivers/hwtracing/coresight/coresight-etm4x.h:81
 #define TRCSSCSRn(n)      (0x2A0 + (n * 4))

Where the macro parameter is expanded to i; a loop induction variable
from etm4_disable_hw.

When any compiler can determine that loops may be unrolled, then the
__builtin_constant_p check in read_etm4x_sysreg_offset() defined in
drivers/hwtracing/coresight/coresight-etm4x.h may evaluate to true. This
can lead to the expression `(0x160 + (i * 4))` being passed to
read_etm4x_sysreg_const_offset. Via the trace above, this is passed
through READ_ETM4x_REG, read_sysreg_s, and finally to __mrs_s where it
is string-ified and used directly in inline asm.

Regardless of which compiler or compiler options determine whether a
loop can or can't be unrolled, which determines whether
__builtin_constant_p evaluates to true when passed an expression using a
loop induction variable, it is NEVER safe to allow the preprocessor to
construct inline asm like:
  asm volatile (".inst (0x160 + (i * 4))" : "=r"(__val));
                                 ^ expected constant expression

Instead of read_etm4x_sysreg_offset() using __builtin_constant_p(), use
__is_constexpr from include/linux/const.h instead to ensure only
expressions that are valid integer constant expressions get passed
through to read_sysreg_s().

This is not a bug in clang; it's a potentially unsafe use of the macro
arguments in read_etm4x_sysreg_offset dependent on __builtin_constant_p.

Link: https://github.com/ClangBuiltLinux/linux/issues/1310
Reported-by: Arnd Bergmann <arnd@kernel.org>
Reported-by: Tao Zhang <quic_taozha@quicinc.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20220708231520.3958391-1-ndesaulniers@google.com
2022-07-11 09:22:35 +01:00
Greg Kroah-Hartman 14facbc187 Merge 5.19-rc6 into char-misc-next
We need the misc driver fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-07-11 08:32:58 +02:00
Linus Torvalds 32346491dd Linux 5.19-rc6 2022-07-10 14:40:51 -07:00
Linus Torvalds 24f4b40ec2 Merge branch 'hot-fixes' (fixes for rc6)
This is a collection of three fixes for small annoyances.

Two of these are already pending in other trees, but I really don't want
to release another -rc with these issues pending, so I picked up the
patches for these things directly.  We'll end up with duplicate commits
eventually, I prefer that over having these issues pending.

The third one is just me getting rid of another BUG_ON() just because it
was reported and I dislike those things so much.

* merge 'hot-fixes' branch:
  ida: don't use BUG_ON() for debugging
  drm/aperture: Run fbdev removal before internal helpers
  ptrace: fix clearing of JOBCTL_TRACED in ptrace_unfreeze_traced()
2022-07-10 14:26:49 -07:00
Linus Torvalds fc82bbf4de ida: don't use BUG_ON() for debugging
This is another old BUG_ON() that just shouldn't exist (see also commit
a382f8fee4: "signal handling: don't use BUG_ON() for debugging").

In fact, as Matthew Wilcox points out, this condition shouldn't really
even result in a warning, since a negative id allocation result is just
a normal allocation failure:

  "I wonder if we should even warn here -- sure, the caller is trying to
   free something that wasn't allocated, but we don't warn for
   kfree(NULL)"

and goes on to point out how that current error check is only causing
people to unnecessarily do their own index range checking before freeing
it.

This was noted by Itay Iellin, because the bluetooth HCI socket cookie
code does *not* do that range checking, and ends up just freeing the
error case too, triggering the BUG_ON().

The HCI code requires CAP_NET_RAW, and seems to just result in an ugly
splat, but there really is no reason to BUG_ON() here, and we have
generally striven for allocation models where it's always ok to just do

    free(alloc());

even if the allocation were to fail for some random reason (usually
obviously that "random" reason being some resource limit).

Fixes: 88eca0207c ("ida: simplified functions for id allocation")
Reported-by: Itay Iellin <ieitayie@gmail.com>
Suggested-by: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2022-07-10 13:55:49 -07:00
Linus Torvalds 952c53cd35 dmaengine fixes for v5.19
Core:
  - Revert verification of DMA_INTERRUPT capability as that was incorrect
 
 Bunch of driver fixes for:
  - ti: refcount and put_device leak
  - qcom_bam: runtime pm overflow
  - idxd: force wq context cleanup and call idxd_enable_system_pasid() on
    success
  - dw-axi-dmac: RMW on channel suspend register
  - imx-sdma: restart cyclic channel when enabled
  - at_xdma: error handling for at_xdmac_alloc_desc
  - pl330: lockdep warning
  - lgm: error handling path in probe
  - allwinner: Fix min/max typo in binding
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE+vs47OPLdNbVcHzyfBQHDyUjg0cFAmLLB+oACgkQfBQHDyUj
 g0c9URAAgNrLzEJFBFRkZW3gKw0PH66a7HZjV88roGI5d9fAZ67O8A21Sn3VKQCs
 0dUOxPWT6lAMt1kPz/AOug80oiEo8dxaf/eai45eP2kyaLFEaHvulHUGQv4ZrRRq
 YaWDoLi5iXly3LYF/skMoXY4XQrbGw6mjgGbwzfn27JqiG9pL7aPx3QAHBYtHf//
 w7O/u9AUaJmSHd7FviKJ9vcun1P4dCUMt7dy2Qhctv6+CBzUmBEMFFMc7FA7ORtP
 kQz2qk5wErG5hQfwJeLPrgKOwdfbEol7crZlyRmi7DwbewA8R9iU/ms7e7498Nhi
 Lh6G+Q9BnTeM+hwRql8Eok+8Oc56xIseWdRPrXiW6EDOpgWSNhuRI7jy0iICs4Wl
 fz9ogDjr3buQI5DrB967IuxD+lD8p80J1jMxaunWrCB5y4MxRJd7n2BuYhjAngeD
 Fsb4NQItHThTiVy86SPFhNfxQbzGOJmWyrerGU+0g3Mnxh8FdGIS5gbk+IfcBcgo
 6Ef7qbypq85DAOkmNx2ZY3E3H2amatLFvJ1cBdtxZp5Nj+rvV+dqvXXFzIped8xP
 GS96uLfWZZKgG4PwyZoK8/fOmU/vxrNsPmHXHpMt9BEa5rNmB8VDB6Txrn3pJywY
 Tm0KK5tgxXYpdUmTL7cDeslJZ4r51LlXUuAbf4wPZr/cEScQwJc=
 =knzk
 -----END PGP SIGNATURE-----

Merge tag 'dmaengine-fix-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine

Pull dmaengine fixes from Vinod Koul:
 "One core fix for DMA_INTERRUPT and rest driver fixes.

  Core:

   - Revert verification of DMA_INTERRUPT capability as that was
     incorrect

  Bunch of driver fixes for:

   - ti: refcount and put_device leak

   - qcom_bam: runtime pm overflow

   - idxd: force wq context cleanup and call idxd_enable_system_pasid()
     on success

   - dw-axi-dmac: RMW on channel suspend register

   - imx-sdma: restart cyclic channel when enabled

   - at_xdma: error handling for at_xdmac_alloc_desc

   - pl330: lockdep warning

   - lgm: error handling path in probe

   - allwinner: Fix min/max typo in binding"

* tag 'dmaengine-fix-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine:
  dt-bindings: dma: allwinner,sun50i-a64-dma: Fix min/max typo
  dmaengine: lgm: Fix an error handling path in intel_ldma_probe()
  dmaengine: pl330: Fix lockdep warning about non-static key
  dmaengine: idxd: Only call idxd_enable_system_pasid() if succeeded in enabling SVA feature
  dmaengine: at_xdma: handle errors of at_xdmac_alloc_desc() correctly
  dmaengine: imx-sdma: only restart cyclic channel when enabled
  dmaengine: dw-axi-dmac: Fix RMW on channel suspend register
  dmaengine: idxd: force wq context cleanup on device disable path
  dmaengine: qcom: bam_dma: fix runtime PM underflow
  dmaengine: imx-sdma: Allow imx8m for imx7 FW revs
  dmaengine: Revert "dmaengine: add verification of DMA_INTERRUPT capability for dmatest"
  dmaengine: ti: Add missing put_device in ti_dra7_xbar_route_allocate
  dmaengine: ti: Fix refcount leak in ti_dra7_xbar_route_allocate
2022-07-10 11:23:01 -07:00
Linus Torvalds 5867f3b88b Staging driver fix for 5.19-rc6
Here is a single staging driver fix for a reported problem that showed
 up in 5.19-rc1 in the wlan-ng driver.  It has been in linux-next for a
 week with no reported problems.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCYsruGg8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ynAQgCfXSGupNIxfeHhJAYddEBChbsXCrIAn1zzLzDc
 f8kYJqwoJiacHK0vIrBu
 =r7+w
 -----END PGP SIGNATURE-----

Merge tag 'staging-5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging driver fix from Greg KH:
 "Here is a single staging driver fix for a reported problem that showed
  up in 5.19-rc1 in the wlan-ng driver. It has been in linux-next for a
  week with no reported problems"

* tag 'staging-5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
  staging/wlan-ng: get the correct struct hfa384x in work callback
2022-07-10 09:51:56 -07:00
Linus Torvalds b41362fdf2 Char/Misc driver fixes for 5.19-rc6
Here are 4 small char/misc driver fixes for 5.19-rc6 to resolve some
 reported issues.  They only affect 2 drivers:
 	- rtsx_usb: fix for of-reported DMA warning error, the driver
 	  was handling memory buffers in odd ways, it has now been fixed
 	  up to be much simpler and correct by Shuah.
 	- at25 eeprom driver bugfix for reported problem
 
 All of these have been in linux-next for a week with no reported
 problems.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCYsrtqw8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ykJ5ACfUhLVzGk2IZYz4kddkvu1znlADdgAn2QfXNna
 zGNe/HQuoBWDjq346bGt
 =6Cx6
 -----END PGP SIGNATURE-----

Merge tag 'char-misc-5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

Pull char/misc driver fixes from Greg KH:
 "Here are four small char/misc driver fixes for 5.19-rc6 to resolve
  some reported issues. They only affect two drivers:

   - rtsx_usb: fix for of-reported DMA warning error, the driver was
     handling memory buffers in odd ways, it has now been fixed up to be
     much simpler and correct by Shuah.

   - at25 eeprom driver bugfix for reported problem

  All of these have been in linux-next for a week with no reported
  problems"

* tag 'char-misc-5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  misc: rtsx_usb: set return value in rsp_buf alloc err path
  misc: rtsx_usb: use separate command and response buffers
  misc: rtsx_usb: fix use of dma mapped buffer for usb bulk transfer
  eeprom: at25: Rework buggy read splitting
2022-07-10 09:45:29 -07:00
Linus Torvalds d9919d43cb o_uring-5.19-2022-07-09
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAmLJpHQQHGF4Ym9lQGtl
 cm5lbC5kawAKCRD301j7KXHgpmHAD/9r8+hKrvYwoBVoi0r8SD/hDkOJMJAnJOBb
 IBzpDRGcZhdLqGvMkhkdk1s83TTsKysStYSsr0jTlNMtevHNUx5jalYY0x7sIJBt
 S5WEwJ8aKbCs4G7pRU/T/wtRtYFz+JmlKT3VNGjkLWVrWn77CGEWtAHCSgzIgScn
 7QzZiQIVheDr9RsqU8xre1m21+rQWvOssip82UfuTpiYOKTYyHkb91MoNdTGd3JB
 ABrr1Ind4lSbMaXXcUtUP6iV15NU95CplEr8ln4DS9/syoM7O1ZiOdJb5uo/ywyC
 +VEh2LO+UyRn7V4me743C1UGASNTYoyOjGJs0t0en2L10gTZHx3tWLkKRvk0uF0E
 MOXJ/F8QRZxtb/RTUPX2MED/U/ZERLBbF/Jrdfunwj4NuF6mxOhM0MhFb+DCyxK0
 BmEfTIdmYzHkyKgp46OeaoJ+8cuyoHKC2DlZMoCl+mw6Fmv1XjVnnDag0Oxl2rv4
 ANCPZNGHvi5kC2t5fHu7zgOBgbb1IAkLLwcUA8SQ27dRQPfmsB6sm7YUAabuTu8N
 zc937WxpXw9FsjtmFb7JQR5yLsTIG4BYHSZFM1FF8YX6nFptm4OhKFevgYH8r3sg
 sj4qUZFVVc60xTnFR7Yr+ccBbNPQPzy1tRG70OZvMYtkPFqn+IrfxrBzZTxl6/bl
 5dWh6Y8L+A==
 =ZK3Q
 -----END PGP SIGNATURE-----

Merge tag 'io_uring-5.19-2022-07-09' of git://git.kernel.dk/linux-block

Pull io_uring fix from Jens Axboe:
 "A single fix for an issue that came up yesterday that we should plug
  for -rc6.

  This is a regression introduced in this cycle"

* tag 'io_uring-5.19-2022-07-09' of git://git.kernel.dk/linux-block:
  io_uring: check that we have a file table when allocating update slots
2022-07-10 09:14:54 -07:00
Linus Torvalds 2fbd36dfae Kbuild fixes for v5.19 (3rd)
- Adjust gen_compile_commands.py to the format change of *.mod files
 
  - Remove unused macro in scripts/Makefile.modinst
 -----BEGIN PGP SIGNATURE-----
 
 iQJJBAABCgAzFiEEbmPs18K1szRHjPqEPYsBB53g2wYFAmLKxggVHG1hc2FoaXJv
 eUBrZXJuZWwub3JnAAoJED2LAQed4NsGb7kP/2eio4+sPt3aCPULfV22DEX9z6Ki
 BbdODt8yr/K9WnVvXfOvVszZKukTVyROPkixztUSDNuHGCpiuGeYvOFK3v0Eb8lz
 Sq3NscWw1Z+t8JF8RlFyopdgQ17pTiPDTjaYedPkL/zictRgHrVB4Jma/80kI3N4
 wmKsvUdnD2waj8aaEJ2AoGm4fmNBMR3inT6I2BnDq0jB40DNFHgCMVZQKQpgOxv8
 ACxL0jPm9PjmWS4vy/gWN10/3C4WHkFvqjQREXMNcmJEZPWYEcvZ1VIfmjBD+2mu
 NdxL0YyJOhsylhPPsWyaPVP8oUTSwisjU9GPQqnJ0YLxYFCnQLcGPuDs4CAkVYkH
 FD8au6KIQsBRu26F2qPR7YkbK7pLIcM/CkKNW34PweaC2uw0WVkSYnbhVPXe8yK0
 n2m9m9ovEAiJ0sAz8RLHRdLdD8dnaF7Y4frJAWPKsP785keicGN+kZ9/dDc/KULt
 OXrG7yU+eLp4vROWjj8UqFWsTvX2gBwSMTZY0l87twudodyURcnV1WWd7QsnoWZh
 cuNcLa6U2bSiauNrYlIo85gWDtMqGFbfI9sFJYhU/wsM0JaeXY7EW4Bosd5RFTHA
 fKtEARzl4QNiNrCtUsWNvdPiQ1H/c1a9eYsxpciz/GUm3emBNIFQVcqpkdUPUe5o
 07SxCZDhPJvCwIb6
 =Uoq2
 -----END PGP SIGNATURE-----

Merge tag 'kbuild-fixes-v5.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild

Pull Kbuild fixes from Masahiro Yamada:

 - Adjust gen_compile_commands.py to the format change of *.mod files

 - Remove unused macro in scripts/Makefile.modinst

* tag 'kbuild-fixes-v5.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
  kbuild: remove unused cmd_none in scripts/Makefile.modinst
  gen_compile_commands: handle multiple lines per .mod file
2022-07-10 08:59:02 -07:00
Linus Torvalds 2b9b31cedb IRQ urgent fixes by way of Marc Zygnier:
- Gracefully handle failure to request MMIO resources in the GICv3 driver
 
  - Make a static key static in the Apple AIC driver
 
  - Fix the Xilinx intc driver dependency on OF_ADDRESS
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEzv7L6UO9uDPlPSfHEsHwGGHeVUoFAmLKsgMACgkQEsHwGGHe
 VUo3hBAAl+01wmvn1AnCPbuF85f/q4P1gUMvXQNkEohiYpJ84KE9Xo/aCZV0LPKj
 tHf4+jECswy17v8XPdqYLTmhaQsjnZcGNMwTEmkUIKx1miiEhWYQmXWyn60fEpLL
 0xUeUVGCSMwRTOOKkctcetLvhcnHvdDAc0QlWDXgN1n9AcH+DQXl7AxGfTQwdBuq
 WiE+tBANx8ymJgY2m8v9stU32AG9NOAim39t0SgGmqJl7D0Irf142f3KIBhDgNel
 0Ol3AKnf9Vb74mXxifNB6hm4meaKCmqmMuSl2FK5SjPvGStqYI+ytKq5kxvsXu91
 jIlP+tBQFzYJUmdYlZmQ1uSreMYBWfUlGSozm5WJvGQBX5LVK1OpzI6z5G2YNmqC
 LPtbJub/c5eCIFZDsQ/pfzpLGhpWHoqhyUY6WxwK7Z3WyePlRrqaxS9gNFdtl1Sz
 7BtN6gWaERVVdGnM06duNWJ+8ZUuRUT0rTaTSrIoiq8zLMjMxIctxemy4vzhnY8I
 CuCq9l22TPu4fY30bUuWEMNUpdCAlUIDM3I2cGMmpjGE1P1arKr4oE9u6MJVd2iH
 rkua5FVKElM8wGvxwsWlkEwx5zGaEpSR1KMb2r/QegpG55LrnI7h+hGidQ9sXj3N
 1te7mqlLpWxORRmD/TUV2hLGnw2ovMJJ/yrzKMl0UXAYvMNmfnw=
 =zRMB
 -----END PGP SIGNATURE-----

Merge tag 'irq_urgent_for_v5.19_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull irq fixes from Borislav Petkov:

 - Gracefully handle failure to request MMIO resources in the GICv3
   driver

 - Make a static key static in the Apple AIC driver

 - Fix the Xilinx intc driver dependency on OF_ADDRESS

* tag 'irq_urgent_for_v5.19_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  irqchip/apple-aic: Make symbol 'use_fast_ipi' static
  irqchip/xilinx: Add explicit dependency on OF_ADDRESS
  irqchip/gicv3: Handle resource request failure consistently
2022-07-10 08:52:12 -07:00
Linus Torvalds 74a0032b85 - Prepare for and clear .brk early in order to address XenPV guests
failures where the hypervisor verifies page tables and uninitialized
 data in that range leads to bogus failures in those checks
 
 - Add any potential setup_data entries supplied at boot to the identity
 pagetable mappings to prevent kexec kernel boot failures. Usually, this
 is not a problem for the normal kernel as those mappings are part of
 the initially mapped 2M pages but if kexec gets to allocate the second
 kernel somewhere else, those setup_data entries need to be mapped there
 too.
 
 - Fix objtool not to discard text references from the __tracepoints
 section so that ENDBR validation still works
 
 - Correct the setup_data types limit as it is user-visible, before 5.19
 releases
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEzv7L6UO9uDPlPSfHEsHwGGHeVUoFAmLKpf8ACgkQEsHwGGHe
 VUrc5w/8DIVLQ8w+Balf2TGfp5Sl3mPkg+eoARH29qtXhvVBs5KJB9sbT1IGnxao
 nE4yNeiIKhH5SEd17l11E7eWuUtNgZENLsUb3aiAdsItNS+MzOWQuEOPbnAwgJmk
 oKdxiI1SHiVoPy5KVXOcyAS90PSJIkhhxwgR5MInGdmpSUzEFsx5SY82ZfOjOkZU
 L7zCsJzeDfhJdWiR4N0MXWRaFbIvRxI1uXyqgv+Lo6JK5l8dyUUSEdWyLUqZ7E4M
 GFo6LwR3lskQM2bE9vBWS0h1X00d5oDMzfono8kZzRGA/11plZHRI007PCez8yZh
 4sUnnxsfCy2YF8/8hs4IhrHZdcWW9XoN4gTUsjD0wekGTHhOEqu5qpAnVSrXbvvM
 ZfPF8vM+DLPTWQqAT0a4aj1vd1RflDIQPSXKDzJDjeF49zouAj1ae/3KSOYJDzN9
 V6NGiKBnzj1rbtm0+8jOsTQusmh/oDage7uLlmel3hTfNOc2Ay0LXrJWcvqhj66V
 4CtCd12sLeavin+mGptni6lXbsue61EolRtH44RvZJsXLVY8iclM4onl728xOrxj
 CBtJo6bd3oQYy0SQsysXGDVR7BSXtwAYfArYR8BrMTtgHxuyULt/BDoew4r7XADB
 Xxz7ADJZ3DI3Gqza5H6r89Tj6Oi3yXiBWUVUNXFCMYc6ZrqvZc0=
 =tOvF
 -----END PGP SIGNATURE-----

Merge tag 'x86_urgent_for_v5.19_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Borislav Petkov:

 - Prepare for and clear .brk early in order to address XenPV guests
   failures where the hypervisor verifies page tables and uninitialized
   data in that range leads to bogus failures in those checks

 - Add any potential setup_data entries supplied at boot to the identity
   pagetable mappings to prevent kexec kernel boot failures. Usually,
   this is not a problem for the normal kernel as those mappings are
   part of the initially mapped 2M pages but if kexec gets to allocate
   the second kernel somewhere else, those setup_data entries need to be
   mapped there too.

 - Fix objtool not to discard text references from the __tracepoints
   section so that ENDBR validation still works

 - Correct the setup_data types limit as it is user-visible, before 5.19
   releases

* tag 'x86_urgent_for_v5.19_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/boot: Fix the setup data types max limit
  x86/ibt, objtool: Don't discard text references from tracepoint section
  x86/compressed/64: Add identity mappings for setup_data entries
  x86: Fix .brk attribute in linker script
  x86: Clear .brk area at early boot
  x86/xen: Use clear_bss() for Xen PV guests
2022-07-10 08:43:52 -07:00
Masahiro Yamada f5a4618587 kbuild: remove unused cmd_none in scripts/Makefile.modinst
Commit 65ce9c3832 ("kbuild: move module strip/compression code into
scripts/Makefile.modinst") added this unused code.

Perhaps, I thought cmd_none was useful for CONFIG_MODULE_COMPRESS_NONE,
but I did not use it after all.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
2022-07-10 21:25:15 +09:00
Borislav Petkov cb8a4beac3 x86/boot: Fix the setup data types max limit
Commit in Fixes forgot to change the SETUP_TYPE_MAX definition which
contains the highest valid setup data type.

Correct that.

Fixes: 5ea98e01ab ("x86/boot: Add Confidential Computing type to setup_data")
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/ddba81dd-cc92-699c-5274-785396a17fb5@zytor.com
2022-07-10 11:17:40 +02:00
Linus Torvalds b1c428b6c3 Two I2C driver bugfixes preventing resource leaks
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmLJwtgACgkQFA3kzBSg
 KbYUWw//Vmbr/juumYEqQ0L62zNU1TBFJNZe8tD5+tIP2a3bivUWLWoJkcEuvmmP
 No3c0Bq6384CE91xcO2rFKgoZWhg86C4b++8i98eckUA5QJjHguXemCxUqm1yJWS
 qEbpeEhWYAVnY8ptWRD8ov9d5PT6aPQta1WYT7T3wYLFl5h1kCZy/lTKmZDluh3u
 zMJQQg1SLoI0zfbK7unl9AHDtMpcc/9NwhXii7TCWEJmrmFnsGAi0JoEwWXsHsTL
 bLM8qsRsnVI25yX1T+5dR05RSc0a1bBrDctRgFs0aqun9ZoL12c9MzZUg0UQ1ETh
 zm7TuB97kYxNhnD8rU0JniqqqcP+dMHRmQFyRXPr5BH+XtgHP3inkDvO5Ju1MhiC
 dqSlsGvqCi1TlgbpU0or3kzkz3CQBawzsUnmrYRJ3tPRAY+4Z48Qj+Fdin7Hitz/
 gEm1Qf/vKv9uHOqUHQLaBTRQuVYKZVvpioX6hasZLoaIsKGxm/0UYqdd+7MviPZv
 hXck4kOKqBMaOQtBIQUTiryM51bkRxn4X/Nm6TMOZBHWJKfnJHdvG0N4yjdtXRjy
 0NDrEHLMK0p4BfRoUtWSFgNWWgjryNpCfne3CsXBFuSxsLE0OmZWVb7KwPydsH6s
 iVooxoB1LDGVWzGMK1fudnSScgE+ByDn9x/8q6zgx6ybXKKpdQo=
 =4AoP
 -----END PGP SIGNATURE-----

Merge tag 'i2c-for-5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux

Pull i2c fixes from Wolfram Sang:
 "Two I2C driver bugfixes preventing resource leaks"

* tag 'i2c-for-5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: cadence: Unregister the clk notifier in error path
  i2c: piix4: Fix a memory leak in the EFCH MMIO support
2022-07-09 11:20:15 -07:00
Thomas Zimmermann 84499c5d22 drm/aperture: Run fbdev removal before internal helpers
Always run fbdev removal first to remove simpledrm via sysfb_disable().
This clears the internal state.

The later call to drm_aperture_detach_drivers() then does nothing.
Otherwise, with drm_aperture_detach_drivers() running first, the call to
sysfb_disable() uses inconsistent state.

Example backtrace show below:

  BUG: KASAN: use-after-free in device_del+0x79/0x5f0
  Read of size 8 at addr ffff888108185050 by task systemd-udevd/311
  CPU: 0 PID: 311 Comm: systemd-udevd Tainted: G            E     5.19.0-rc2-1-default+ #1689
  Hardware name: HP ProLiant DL120 G7, BIOS J01 04/21/2011
  Call Trace:
    device_del+0x79/0x5f0
    platform_device_del.part.0+0x19/0xe0
    platform_device_unregister+0x1c/0x30
    sysfb_disable+0x2d/0x70
    remove_conflicting_framebuffers+0x1c/0xf0
    remove_conflicting_pci_framebuffers+0x130/0x1a0
    drm_aperture_remove_conflicting_pci_framebuffers+0x86/0xb0
    mgag200_pci_probe+0x2d/0x140 [mgag200]

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: 873eb3b118 ("fbdev: Disable sysfb device registration when removing conflicting FBs")
Cc: Javier Martinez Canillas <javierm@redhat.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Helge Deller <deller@gmx.de>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Zhen Lei <thunder.leizhen@huawei.com>
Cc: Changcheng Deng <deng.changcheng@zte.com.cn>
Reviewed-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2022-07-09 11:12:05 -07:00
Sven Schnelle de2a34771f ptrace: fix clearing of JOBCTL_TRACED in ptrace_unfreeze_traced()
CI reported the following splat while running the strace testsuite:

  WARNING: CPU: 1 PID: 3570031 at kernel/ptrace.c:272 ptrace_check_attach+0x12e/0x178
  CPU: 1 PID: 3570031 Comm: strace Tainted: G           OE     5.19.0-20220624.rc3.git0.ee819a77d4e7.300.fc36.s390x #1
  Hardware name: IBM 3906 M04 704 (z/VM 7.1.0)
  Call Trace:
   [<00000000ab4b645a>] ptrace_check_attach+0x132/0x178
  ([<00000000ab4b6450>] ptrace_check_attach+0x128/0x178)
   [<00000000ab4b6cde>] __s390x_sys_ptrace+0x86/0x160
   [<00000000ac03fcec>] __do_syscall+0x1d4/0x200
   [<00000000ac04e312>] system_call+0x82/0xb0
  Last Breaking-Event-Address:
   [<00000000ab4ea3c8>] wait_task_inactive+0x98/0x190

This is because JOBCTL_TRACED is set, but the task is not in TASK_TRACED
state. Caused by ptrace_unfreeze_traced() which does:

	task->jobctl &= ~TASK_TRACED

but it should be:

	task->jobctl &= ~JOBCTL_TRACED

Fixes: 31cae1eaae ("sched,signal,ptrace: Rework TASK_TRACED, TASK_STOPPED state")
Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Tested-by: Alexander Gordeev <agordeev@linux.ibm.com>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: Eric Biederman <ebiederm@xmission.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Kees Cook <keescook@chromium.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2022-07-09 11:06:19 -07:00
Linus Torvalds d9cdc3b125 powerpc fixes for 5.19 #5
- On Power8 bare metal, fix creation of RNG platform devices, which are needed
    for the /dev/hwrng driver to probe correctly.
 
 Thanks to: Jason A. Donenfeld, Sachin Sant.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEJFGtCPCthwEv2Y/bUevqPMjhpYAFAmLJSdATHG1wZUBlbGxl
 cm1hbi5pZC5hdQAKCRBR6+o8yOGlgDIzEACy0D2CLdJq1YSvjVfuTbon6WpzUkBq
 5ld1cIst+tLkmq9ixpwaGe+x0/7eELRL5/yfdp1/cFTLirKX1fJOlM2/P52Q+ehN
 DOJfSlDLBHP+os4klKw1g3HrbyP5IBLL0Up6fiebd83SpRHHQ8gmANlfb0KZH5MD
 mUH33cE0egSqkZmTIeMW5cCOq9tnppaM/2CFl5ijxXs5xdJodZAR1HV6uhfxhf0N
 Gqj2O44VVHyckMEVrdd2NmqXeOufWCObGAI/4WYVAijMyyewMnJDnTpso5ZBcgGv
 Y2cX5kCdN1D6rfBEKqTVkECt+Q340KbB86kIJqnPuc7T7ay7Ky4mfVOTRF2EXDQs
 mc0+MUTn1W0ydEuktO2A8lXN/3y/Y4S3SzkPDPKCLJ0+iKMx5Hij6aBqyV+gxyBp
 oc7XC4VCMNChnpxgqVzEuweTUf/3YiEDI0pQqG7pt2E/SLFoi98r4T3OH23PjdWM
 13HjilUFKVD4DNWSLCtdS9+TksvYirL7SiRhqL6x1e1qHKsvWaNwP346kEmKG5Gl
 sls152oyiNrLLiIZucuzLsJthlqJIWH+r5GNBtvxx/TO8i7O82c24wyohJm+U4lt
 liwyPQtudDTnPkA4fbTevNqQlPRMXv1/w5B2LMfJiLmbbh0fVHWaU7beHwyDji73
 xF4zYtzEp4zmIQ==
 =rqGK
 -----END PGP SIGNATURE-----

Merge tag 'powerpc-5.19-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux

Pull powerpc fix from Michael Ellerman:

 - On Power8 bare metal, fix creation of RNG platform devices, which are
   needed for the /dev/hwrng driver to probe correctly.

Thanks to Jason A. Donenfeld, and Sachin Sant.

* tag 'powerpc-5.19-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  powerpc/powernv: delay rng platform device creation until later in boot
2022-07-09 10:34:08 -07:00
Jens Axboe d785a773be io_uring: check that we have a file table when allocating update slots
If IORING_FILE_INDEX_ALLOC is set asking for an allocated slot, the
helper doesn't check if we actually have a file table or not. The non
alloc path does do that correctly, and returns -ENXIO if we haven't set
one up.

Do the same for the allocated path, avoiding a NULL pointer dereference
when trying to find a free bit.

Fixes: a7c41b4687 ("io_uring: let IORING_OP_FILES_UPDATE support choosing fixed file slots")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-09 07:02:10 -06:00
Bo Liu 2ebb36ea41 bus: mhi: ep: Check dev_set_name() return value
It's possible that dev_set_name() returns -ENOMEM, catch and handle this.

Signed-off-by: Bo Liu <liubo03@inspur.com>
Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
Link: https://lore.kernel.org/r/20220708015948.4091-1-liubo03@inspur.com
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
2022-07-09 11:57:54 +05:30
Linus Torvalds e5524c2a1f fscache fixes
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEqG5UsNXhtOCrfGQP+7dXa6fLC2sFAmLInYwACgkQ+7dXa6fL
 C2tbmxAAlBkMvoIeyOlkMeAB3l1aK5CAYmgddjWOxY6UHNIGgXqWlGJCoxYngTmy
 j+5Uz1mMNh7TamSJpCTXUBbiLWxzoHI34oie+NT9VUXTTVw0/GQ//jQPlvE+HeJG
 Hmi0HR4lby1O6X9r63obzvDctJPhsVLdgJFtZ3UidwzgY2zYnScxwyCuwSfLUVnF
 YJACZWPFj1oWxOiS2bQZgnvCJpfJ6J0I5asmO0lI1tQDS0o4RoiRvDPTx8Z6K3KO
 8CSm5tvu+vYrbZ5aNCN9f0MZfNl+YZiNQyxEiIP9Phu9iZFRe9UgXvDrE9346uQM
 /Vxa5nvyj+D0Hg+l1jBFXvwoKxLHTZ/BaK74h2/QzRKgxKrHTAyYOgxqt7U/YCsa
 S489eHOGNwbqIKACljBcMX9YZeCdeixt4aK/VIRr+d1f2Ui30Z05ExuYOfGn4wBq
 VcSsBgAALwcyqrpi61URYvKduHTa2D8ATKNKXNM/i1Wv6KQDeom5jyKj3mE7UNsI
 WAgWE2xy74kjYs1Lc0izsfieyZrt1MqZiyYFjS86Cnt0wVmdAQYrQ3wciN5D9IJN
 MiUYuienGRf1MNM2tmFK+N7e+pa/waKcl15/d3Zal94rlATpR2bFOI1zJ9qJ8rpi
 k8B/eydAZx+oUthxWvfIdLwIREJzA49jzBHgfAy/CMjqPCj7gZ8=
 =FDkz
 -----END PGP SIGNATURE-----

Merge tag 'fscache-fixes-20220708' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs

Pull fscache fixes from David Howells:

 - Fix a check in fscache_wait_on_volume_collision() in which the
   polarity is reversed. It should complain if a volume is still marked
   acquisition-pending after 20s, but instead complains if the mark has
   been cleared (ie. the condition has cleared).

   Also switch an open-coded test of the ACQUIRE_PENDING volume flag to
   use the helper function for consistency.

 - Not a fix per se, but neaten the code by using a helper to check for
   the DROPPED state.

 - Fix cachefiles's support for erofs to only flush requests associated
   with a released control file, not all requests.

 - Fix a race between one process invalidating an object in the cache
   and another process trying to look it up.

* tag 'fscache-fixes-20220708' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs:
  fscache: Fix invalidation/lookup race
  cachefiles: narrow the scope of flushed requests when releasing fd
  fscache: Introduce fscache_cookie_is_dropped()
  fscache: Fix if condition in fscache_wait_on_volume_collision()
2022-07-08 16:08:48 -07:00
Linus Torvalds 525496a030 ACPI fixes for 5.19-rc6
- Prevent _CPC from being used if the platform firmware does not
    confirm CPPC v2 support via _OSC (Mario Limonciello).
 
  - Allow systems with X86_FEATURE_CPPC set to use _CPC even if CPPC
    support cannot be agreed on via _OSC (Mario Limonciello).
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAmLIgTwSHHJqd0Byand5
 c29ja2kubmV0AAoJEILEb/54YlRxmDAP/1OEgChbdJNvhg7no4BHEwSyuArAVcRD
 +D5bCiPq8x5dSNke3BrN4n789fhsHphXucqI5yTq7lX1AonyO1EHkc+oG+EGrZ+8
 dyw+6Nx4WdJkOLKrEwQm3QQYuBK/k4pCUwhWBBg5FEsn4QldBE2pzEC8aP7gNgN6
 gAxs+6nC7r/9fMoRo8+SG9Xrr1FH1mddru4WTp6croLNrlLVXTaoAHwXMB4qk8in
 JC8bvfnWSWXn05fvJ+nYf8wb93tjBsuyx/Om7kmP7V1WT30fidv+BdP50x6kFq9/
 nE0iTAAgqiO1SpRpUHfYc63GUvBC9d9ZUsbSyT7fMEqZCqLRsKukUA5xFxgQORBi
 fKWVVSjOaQUFk0eeivdqWTgpaIRkjxVCmLFxGN/vY3T1pqAmJIdoY5x7ZzxuOrBW
 6h1zOT0Qm9LURrlnXhcFHXALXFAGVpYCoP4X0PhNi9fZCSrjraG77dar0fj5KgHv
 pUnLTL1qHxrzX/Ax7LJ/Usc+mKO8s/Wd790CvtFElHIsH5p7Bx/l3BDdQHbGK2l2
 ToO9WQQCumccXs6SHCVYQJIH1pr0UIB2X15FNrmLVem8WkEBFJ7DwrZ/nitenOV3
 c9BsQr+rJ3s9S9aSYvIAadurPzC6x5lKu0GKMUfM2GUl/vVcFrzkzlAATD467/IC
 Z7gsfL1UtOwx
 =yWsx
 -----END PGP SIGNATURE-----

Merge tag 'acpi-5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI fixes from Rafael Wysocki:
 "These fix two recent regressions related to CPPC support.

  Specifics:

   - Prevent _CPC from being used if the platform firmware does not
     confirm CPPC v2 support via _OSC (Mario Limonciello)

   - Allow systems with X86_FEATURE_CPPC set to use _CPC even if CPPC
     support cannot be agreed on via _OSC (Mario Limonciello)"

* tag 'acpi-5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI: CPPC: Don't require _OSC if X86_FEATURE_CPPC is supported
  ACPI: CPPC: Only probe for _CPC if CPPC v2 is acked
2022-07-08 13:05:56 -07:00
Linus Torvalds 3784fad934 Power management fixes for 5.19-rc6
- Fix NULL pointer dereference related to printing a diagnostic
    message in the exynos-bus devfreq driver (Christian Marangi).
 
  - Fix race condition in the runtime PM framework which in some
    cases may cause a supplier device to be suspended when its
    consumer is still active (Rafael Wysocki).
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAmLIgKMSHHJqd0Byand5
 c29ja2kubmV0AAoJEILEb/54YlRxNgAP/R4t7jx+LyeQbX9JzdY/bA6NTGIdkMbJ
 RhA9Nc3Sbsb+KXulsccq108O4CZwjiCEngvZHkOJJtzgRzLL7jxV6J63tNfLLS60
 oJS4EAOAZ0c1JiO/Fh9G/c6stKdPAajs4PNSHpGcsq8m1e8CktmWPqW40OPD6kDk
 YbkdMkO/7KJtOBX4IwzF67lYMQsulUGi2TAsq6sxsC00KA2A1CoXTWzoamDKtOD3
 8y5JKKRCg7nYhZ7/qxy1zlnhHFJGzVppWbSv98DdZdvsKyizAkk7agBOP4Ld3iPT
 ZtA1L0Pgjx6qUoQ7D7rUgNrmnHGCk77aluAkg/gtS2GI61bvbtT3apyYusJVC0jg
 IKI3MHZZTwqdsEyoBxxWXuRciv1HXXrcwSMB3S9pBAwZEES+GwDFO9MwStkAv8zi
 acceNirUiawODs6qNZjS8Ycsaz56DHCjcsBBCvmP5NnNA8kFdqxB4muz1SRmqubE
 N9BPNDLFCoZArUkwg35QL9EZZLYjLjf5YtF9Xe3lPCaQdbPaIc+4MfXkEp4HHYC3
 V1vvbyZbkq/xSNNCjXRoF4n1x2IZvz7SpsdPjxqADpVNxpL/d/dET8/NBXGxAwJE
 KLh/iElyuIL17mgqH/fXpYNI6bqphxhe+sasH/nFpKOewdEQDtnYqmz6GQQGH469
 /42eiBC4saNB
 =iyaY
 -----END PGP SIGNATURE-----

Merge tag 'pm-5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull power management fixes from Rafael Wysocki:
 "These fix a NULL pointer dereference in a devfreq driver and a runtime
  PM framework issue that may cause a supplier device to be suspended
  before its consumer.

  Specifics:

   - Fix NULL pointer dereference related to printing a diagnostic
     message in the exynos-bus devfreq driver (Christian Marangi)

   - Fix race condition in the runtime PM framework which in some cases
     may cause a supplier device to be suspended when its consumer is
     still active (Rafael Wysocki)"

* tag 'pm-5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  PM / devfreq: exynos-bus: Fix NULL pointer dereference
  PM: runtime: Fix supplier device management during consumer probe
  PM: runtime: Redefine pm_runtime_release_supplier()
2022-07-08 13:01:04 -07:00
Linus Torvalds 483e4a1d83 cxl fixes for 5.19-rc6
- Update MAINTAINERS for Ben's email
 
 - Fix cleanup of port devices on failure to probe driver
 
 - Fix endianness in get/set LSA mailbox command structures
 
 - Fix memregion_free() fallback definition
 
 - Fix missing variable payload checks in CXL cmd size validation
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQT9vPEBxh63bwxRYEEPzq5USduLdgUCYsiAcQAKCRAPzq5USduL
 duFHAP9Szd4QqD4hrqjkUeAHqwm6Sa9xgReB+Pbk3VuMbR25YwD9FhLA5fy9UL7Q
 oG8srdh0SqTB/kdOs2hnHUTEnonBGAw=
 =fso6
 -----END PGP SIGNATURE-----

Merge tag 'cxl-fixes-for-5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl

Pull cxl fixes from Vishal Verma:

 - Update MAINTAINERS for Ben's email

 - Fix cleanup of port devices on failure to probe driver

 - Fix endianness in get/set LSA mailbox command structures

 - Fix memregion_free() fallback definition

 - Fix missing variable payload checks in CXL cmd size validation

* tag 'cxl-fixes-for-5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl:
  cxl/mbox: Fix missing variable payload checks in cmd size validation
  memregion: Fix memregion_free() fallback definition
  cxl/mbox: Use __le32 in get,set_lsa mailbox structures
  cxl/core: Use is_endpoint_decoder
  cxl: Fix cleanup of port devices on failure to probe driver.
  MAINTAINERS: Update Ben's email address
2022-07-08 12:55:25 -07:00
Linus Torvalds f5645edf6c IOMMU Fixes for Linux v5.19-rc5
Including:
 
 	- Patch for the Intel VT-d driver to fix device setup failures
 	  when the PASID table is shared
 
 	- Fix for Intel VT-d device hot-add failure due to wrong device
 	  notifier order
 
 	- Remove the old IOMMU mailing list from the MAINTAINERS file
 	  now that it has been retired
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEr9jSbILcajRFYWYyK/BELZcBGuMFAmLIUbYACgkQK/BELZcB
 GuPSYBAAo5HfhNcdBaecojN/bPxvOpZBm00Tta1XQ6KnEKGiD+qgE3EhZZgmeaEq
 yrpomHhGzb6Der+eq0mdKSYGTY4RTPFbwTpmZh/VtCm5aLnhjeyjgk5y3fFDlsiU
 wZfKr1BrBZvJ+yAgpAdvIKsZEjsNyK+2cwvLz36WlMHqzMtNtqaU0OF3oxF+DC08
 CzFOlRSqOiyp2Ct4FP9yEXU8sVwvqnHQbuekn8L+loQB5zm5SgIOVy7ttb4idPEn
 Q2Kg6imxRVSA8MXvMR8OleQrnOTZrMZVr5OuMbsFPQ2H9RxX7Bq92AMPSReYGRhi
 ep6WOVaAq14PxlL4y4HyEd6RYkiNYyz0hdnoXgezJF3k0hoG6hZLdG/SSK5l7zGY
 +hrMmKgnF7uPz1M7YFenoy5p5EudzRBafIRgXrOZNZoXUdwNhh8hqJfjRev4op/y
 t8Mt1j6goX9icUonPK5SN8MrDo8EaQj0BgC0d2ihScA3uOhVGSfCzLfhNDkGg5Jy
 b936bgBzwv8Q7kBORPMmzK1+sNu28/NJnSmURGeSGGwZnsSOEd/GRjZkf7iGc9u7
 RrRpW4dH3RlwcUY/ug6UcGqq7xaQPSS//PIVQ/dmjCjX32Xk95jurt1v/hLf0Cm8
 eXSp1Q69kQAiNsu4uvZMfYRsVzh9Z2+UgdpoVXQH20ct94M92vA=
 =KPue
 -----END PGP SIGNATURE-----

Merge tag 'iommu-fixes-v5.19-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu

Pull iommu fixes from Joerg Roedel:

 - fix device setup failures in the Intel VT-d driver when the PASID
   table is shared

 - fix Intel VT-d device hot-add failure due to wrong device notifier
   order

 - remove the old IOMMU mailing list from the MAINTAINERS file now that
   it has been retired

* tag 'iommu-fixes-v5.19-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
  MAINTAINERS: Remove iommu@lists.linux-foundation.org
  iommu/vt-d: Fix RID2PASID setup/teardown failure
  iommu/vt-d: Fix PCI bus rescan device hot add
2022-07-08 12:49:00 -07:00
Linus Torvalds 2b93fe647c gpio fixes for v5.19-rc6
- fix a build error in gpio-vf610
 - fix a null-pointer dereference in the GPIO character device code
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEFp3rbAvDxGAT0sefEacuoBRx13IFAmLIQ2YACgkQEacuoBRx
 13KmMRAAqP0dMz9xocZWIif2feUYy4EAHGidIh0AN2ehTW0urmb6e8KAzOL4t0h6
 O7ODeCHXvtM7xGqmeFPveyY+yygSfB1oitQQWawePpUHtG0jHicG6gtV70S7k0BA
 MZbBhWHmJ0iC0s3x5DPnXlJ2/jqBjaF7UZi4bHVMMMfjB049YVTKQJ3mS/KTEFv8
 Wn5GBwSACwSlYYA9opjJNK7fxxU4z7tbiycORLFKoiG66AdOGz7aZeI9Rr06EZ3T
 ftkawIfxOtBivvcRdQmqKF3pvYju/aWnSTfCErmuifHP+sSsna8EZke+qvyx2YJp
 +Q95QObc/7sghKWjSNz1vvGRdT27kzyJdquopzVDdV5+vM6X7OGS/leSmGTo5m0f
 WAt8ZCmyGcTAsK3eL814vhntYls9aTiCeHLYD3i5k+cVym8qHxzGLe8vls8+Mmvy
 U/S0obfFHbe2dur4ET2f71vjF4niEJmDwNYTe5tCzTNP/9fWcw8LLMOKfdjLldu7
 44ennv+FAKE9eLRrRjQ8CkpXxUl++IV/TEtbTTY780ocSG4Olr951Ns7YQQC4aV3
 ro3SzmgBaeO7UDvelCUsxhQT1G3faBmhwaJh57CegGFSKQYN1waCmT/oispz4U0p
 08Xa7f2iNnWjBqI4nLWe2vad7+2Lq0SwH9jhp9oIw2qmVGGnz0I=
 =Fq0O
 -----END PGP SIGNATURE-----

Merge tag 'gpio-fixes-for-v5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux

Pull gpio fixes from Bartosz Golaszewski:

 - fix a build error in gpio-vf610

 - fix a null-pointer dereference in the GPIO character device code

* tag 'gpio-fixes-for-v5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
  gpiolib: cdev: fix null pointer dereference in linereq_free()
  gpio: vf610: fix compilation error
2022-07-08 12:39:52 -07:00
Rafael J. Wysocki fe7c758c07 Merge branch 'pm-core'
Merge a runtime PM framework cleanup and fix related to device links.

* pm-core:
  PM: runtime: Fix supplier device management during consumer probe
  PM: runtime: Redefine pm_runtime_release_supplier()
2022-07-08 20:38:51 +02:00
Linus Torvalds a471da3100 block-5.19-2022-07-08
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAmLIJFEQHGF4Ym9lQGtl
 cm5lbC5kawAKCRD301j7KXHgpgIPD/9InvUKGh8y27bZT+y5F7aucRm1wAZGa016
 EESTOapGUb0lWo3X3JGDjwfnpUhCWwxsHs5R13ZEdrwEWh1q55TJiCc9MGt2X+NB
 f5fJHeoa9hWTlG/iFi7+ElkuTER1TcKqxysL3Gci6JWlQ1ObYVBOZAi9/9v5r5t8
 3Cv7KfkhhclVOFpEMio00YTSl54axKToqFoNr0jE10lVXZtZtIsPlRAt8QvG66qA
 K10rbznRrKmtKJvzHKx+3PrTj77QIaifcH9bqRu4KWqs2SsoEUIjlVKUkbz8F16g
 +YmhfktYaatrPI/G3/tACKkdCi537HdUVyJFRFNw1439+DSETJNi2nQjeVdatsTe
 kEL+5RlrUfjUnQpEWUBOmW4T5mNB0sryxSiOjSNQx0X8Mulp6SI7CaNovioI0SWS
 7lydZZpb3difQjdrA1iGU8dpLtyDPRPeQZOJV9jPodhMYzr5UB4qTX2NkWTFSnr3
 tiIflRdEdbGCVc5E41OVMpIAzdyLQWQDRn3r/3T/hScN99mKKAEv31HoPP4etmRw
 M8mvwrJwNRrbOd+1QiAgblh/3ozqafmFEAI3LZBtCbupb1fWG2qaqXer5KPWpCXv
 Kor+Q6dGWK0pQFSxoMaFwjDUo7gZiL9RxkmZEpkr+w1rKA3gqlx4b+NlZV7RbJez
 2tijGLQtQA==
 =UQiB
 -----END PGP SIGNATURE-----

Merge tag 'block-5.19-2022-07-08' of git://git.kernel.dk/linux-block

Pull block fixes from Jens Axboe:
 "NVMe pull request with another id quirk addition, and a tracing fix"

* tag 'block-5.19-2022-07-08' of git://git.kernel.dk/linux-block:
  nvme: use struct group for generic command dwords
  nvme-pci: phison e16 has bogus namespace ids
2022-07-08 11:32:23 -07:00
Linus Torvalds 29837019d5 io_uring-5.19-2022-07-08
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAmLIJGcQHGF4Ym9lQGtl
 cm5lbC5kawAKCRD301j7KXHgpgS1D/9E2MxaWaHR+A35AXignJLaXxiLWlzTAwxr
 /ioT6omgogbiaoTrxVZMbW+6vAPbUamXA9yqv2fC/4RERBfz3Z6UBLa8Hp6SFCMQ
 vb/LSwRwnUuMr/HyF3hLjwISOi4oYs/uo3E7IpOPbpC/e0nDpJnGWx1UfQn0tJSH
 WVwZsLbUe8T9fhHA0uSHbMoMSvLQGqfwwY+MET2+j+ZDwMoet194yka22jJwfDbF
 l3cnUe2TQh6orRdzuagWX9WmdnWWyQM3DTqW2cSA0hepyxGMWkCMhMuyV5yqUXhD
 noHshcyL76h8WQi/BwYDAGYqGy1+FkOkuV3DmVnjHVQory17Ze8ijtImMoEWpkgl
 TwTTd2+o0ivcEd0JHLeqLHkTXKUENeUMTpJVuLotLMMdupIvF0jrdNWTWCM7uBto
 Q9JxIkEs+16bRqT+yzC4cNuzSQRL6+qQ5jVO5BsNmJoNvs15KN7vgAQ+uR4NCCIv
 GqHbTiBVsi7DYipS6jNi/bWnxDtIsNsn48WCdx52OYpd1NbkY3oEHMqBZ6rnsPJH
 /uek3VLajRZfG61EMUGlazitQdW3/z31wM0iP8Y8xPyvSNCbsJkFtrNO13jpuy9p
 0YRP3peXYb2eEzYpq355RSCCpyActDYp77hjcyYQP3gJcnoViZ6rBUHr5Rw5W6lN
 siwWz7aNXg==
 =w3SQ
 -----END PGP SIGNATURE-----

Merge tag 'io_uring-5.19-2022-07-08' of git://git.kernel.dk/linux-block

Pull io_uring tweak from Jens Axboe:
 "Just a minor tweak to an addition made in this release cycle: padding
  a 32-bit value that's in a 64-bit union to avoid any potential
  funkiness from that"

* tag 'io_uring-5.19-2022-07-08' of git://git.kernel.dk/linux-block:
  io_uring: explicit sqe padding for ioctl commands
2022-07-08 11:25:01 -07:00
Linus Torvalds 086ff84617 fbdev fixes and updates for kernel v5.19-rc6:
fbcon now prevents switching to screen resolutions which are smaller
 than the font size, and prevents enabling a font which is bigger than
 the current screen resolution. This fixes vmalloc-out-of-bounds accesses
 found by KASAN.
 
 Guiling Deng fixed a bug where the centered fbdev logo wasn't displayed
 correctly if the screen size matched the logo size.
 
 Hsin-Yi Wang provided a patch to include errno.h to fix build when
 CONFIG_OF isn't enabled.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQS86RI+GtKfB8BJu973ErUQojoPXwUCYsfdCgAKCRD3ErUQojoP
 XxhvAP9HYH0XcfHGEIQ3YSyFRY4JpyLb0TcTD7mnrYwPgAw+KAD7Bw9EE7WhGZLC
 7iuDn30/mdCFqiz3IuTjoRKYuG2ceg8=
 =yrqq
 -----END PGP SIGNATURE-----

Merge tag 'for-5.19/fbdev-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev

Pull fbdev fixes from Helge Deller:

 - fbcon now prevents switching to screen resolutions which are smaller
   than the font size, and prevents enabling a font which is bigger than
   the current screen resolution. This fixes vmalloc-out-of-bounds
   accesses found by KASAN.

 - Guiling Deng fixed a bug where the centered fbdev logo wasn't
   displayed correctly if the screen size matched the logo size.

 - Hsin-Yi Wang provided a patch to include errno.h to fix build when
   CONFIG_OF isn't enabled.

* tag 'for-5.19/fbdev-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev:
  fbcon: Use fbcon_info_from_console() in fbcon_modechange_possible()
  fbmem: Check virtual screen sizes in fb_set_var()
  fbcon: Prevent that screen size is smaller than font size
  fbcon: Disallow setting font bigger than screen size
  video: of_display_timing.h: include errno.h
  fbdev: fbmem: Fix logo center image dx issue
2022-07-08 11:03:26 -07:00
AngeloGioacchino Del Regno f5c97da803 nvmem: mtk-efuse: Simplify with devm_platform_get_and_ioremap_resource()
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.

No functional changes.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220706100627.6534-8-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-07-08 15:45:05 +02:00
Allen-KH Cheng 38b4c8a470 dt-bindings: nvmem: mediatek: efuse: add support for mt8186
Add compatible for mt8186 SoC.

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220706100627.6534-7-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-07-08 15:45:05 +02:00
Chunfeng Yun cf35ec15a1 dt-bindings: nvmem: mediatek: efuse: add support mt8183
Add "mediatek,mt8183-efuse" to fix dtbs check warning.

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220706100627.6534-6-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-07-08 15:45:05 +02:00
Chunfeng Yun 9c5fc8e1ac dt-bindings: nvmem: convert mtk-efuse.txt to YAML schema
Convert mtk-efuse.txt to YAML schema mediatek,efuse.yaml

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220706100627.6534-5-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-07-08 15:45:05 +02:00
Lukas Bulwahn 38f91750d5 MAINTAINERS: rectify file pattern in MICROCHIP OTPC DRIVER
Commit 6b291610dd57 ("nvmem: microchip-otpc: add support") adds the
Microchip otpc driver and a corresponding MAINTAINERS section, but slips
in a slightly wrong file pattern.

Hence, ./scripts/get_maintainer.pl --self-test=patterns complains about a
broken reference.

Rectify this file pattern in MICROCHIP OTPC DRIVER.

Acked-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220706100627.6534-4-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-07-08 15:45:05 +02:00
Claudiu Beznea 98830350d3 nvmem: microchip-otpc: add support
Add support for Microchip OTP controller available on SAMA7G5. The OTPC
controls the access to a non-volatile memory. The memory behind OTPC is
organized into packets, packets are composed by a fixed length header
(4 bytes long) and a variable length payload (payload length is available
in the header). When software request the data at an offset in memory
the OTPC will return (via header + data registers) the whole packet that
has a word at that offset. For the OTP memory layout like below:

offset  OTP Memory layout

         .           .
         .    ...    .
         .           .
0x0E     +-----------+	<--- packet X
         | header  X |
0x12     +-----------+
         | payload X |
0x16     |           |
         |           |
0x1A     |           |
         +-----------+
         .           .
         .    ...    .
         .           .

if user requests data at address 0x16 the data started at 0x0E will be
returned by controller. User will be able to fetch the whole packet
starting at 0x0E (or parts of the packet) via proper registers. The same
packet will be returned if software request the data at offset 0x0E or
0x12 or 0x1A.

The OTP will be populated by Microchip with at least 2 packets first one
being boot configuration packet and the 2nd one being temperature
calibration packet. The packet order will be preserved b/w different chip
revisions but the packet sizes may change.

For the above reasons and to keep the same software able to work on all
chip variants the read function of the driver is working with a packet
id instead of an offset in OTP memory.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220706100627.6534-3-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-07-08 15:45:05 +02:00
Claudiu Beznea 4d5e3b06e1 dt-bindings: microchip-otpc: document Microchip OTPC
Document Microchip OTP controller.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220706100627.6534-2-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-07-08 15:45:04 +02:00