Commit Graph

1280107 Commits

Author SHA1 Message Date
Honggang LI
4adcaf969d RDMA/rxe: Don't set BTH_ACK_MASK for UC or UD QPs
BTH_ACK_MASK bit is used to indicate that an acknowledge
(for this packet) should be scheduled by the responder.
Both UC and UD QPs are unacknowledged, so don't set
BTH_ACK_MASK for UC or UD QPs.

Fixes: 8700e3e7c4 ("Soft RoCE driver")
Signed-off-by: Honggang LI <honggangli@163.com>
Link: https://lore.kernel.org/r/20240624020348.494338-1-honggangli@163.com
Reviewed-by: Zhu Yanjun <yanjun.zhu@linux.dev>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2024-06-26 10:53:29 -03:00
Max Gurtovoy
58945ddd71 IB/isert: remove the handling of last WQE reached event
This event is raised for QPs that are associated with a Shared RQ (SRQ).
The iSER target does not support SRQ. Remove this dead code.

Signed-off-by: Max Gurtovoy <mgurtovoy@nvidia.com>
Link: https://lore.kernel.org/r/20240619171153.34631-3-mgurtovoy@nvidia.com
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2024-06-26 10:53:29 -03:00
Max Gurtovoy
844bc12e6d IB/core: add support for draining Shared receive queues
To avoid leakage for QPs assocoated with SRQ, according to IB spec
(section 10.3.1):

"Note, for QPs that are associated with an SRQ, the Consumer should take
the QP through the Error State before invoking a Destroy QP or a Modify
QP to the Reset State. The Consumer may invoke the Destroy QP without
first performing a Modify QP to the Error State and waiting for the Affiliated
Asynchronous Last WQE Reached Event. However, if the Consumer
does not wait for the Affiliated Asynchronous Last WQE Reached Event,
then WQE and Data Segment leakage may occur. Therefore, it is good
programming practice to teardown a QP that is associated with an SRQ
by using the following process:
 - Put the QP in the Error State;
 - wait for the Affiliated Asynchronous Last WQE Reached Event;
 - either:
   - drain the CQ by invoking the Poll CQ verb and either wait for CQ
     to be empty or the number of Poll CQ operations has exceeded
     CQ capacity size; or
   - post another WR that completes on the same CQ and wait for this
     WR to return as a WC;
 - and then invoke a Destroy QP or Reset QP."

Catch the Last WQE Reached Event in the core layer during drain QP flow.

Signed-off-by: Max Gurtovoy <mgurtovoy@nvidia.com>
Link: https://lore.kernel.org/r/20240619171153.34631-2-mgurtovoy@nvidia.com
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2024-06-26 10:53:29 -03:00
Or Har-Toov
0c5275bf75 RDMA/mlx5: Use sq timestamp as QP timestamp when RoCE is disabled
When creating a QP, one of the attributes is TS format (timestamp).
In some devices, we have a limitation that all QPs should have the same
ts_format. The ts_format is chosen based on the device's capability.
The qp_ts_format cap resides under the RoCE caps table, and the
cap will be 0 when RoCE is disabled. So when RoCE is disabled, the
value that should be queried is sq_ts_format under HCA caps.

Consider the case when the system supports REAL_TIME_TS format (0x2),
some QPs are created with REAL_TIME_TS as ts_format, and afterwards
RoCE gets disabled. When trying to construct a new QP, we can't use
the qp_ts_format, that is queried from the RoCE caps table, Since it
leads to passing 0x0 (FREE_RUNNING_TS) as the value of the qp_ts_format,
which is different than the ts_format of the previously allocated
QPs REAL_TIME_TS format (0x2).

Thus, to resolve this, read the sq_ts_format, which also reflect
the supported ts format for the QP when RoCE is disabled.

Fixes: 4806f1e2fe ("net/mlx5: Set QP timestamp mode to default")
Signed-off-by: Maher Sanalla <msanalla@nvidia.com>
Signed-off-by: Or Har-Toov <ohartoov@nvidia.com>
Link: https://lore.kernel.org/r/32801966eb767c7fd62b8dea3b63991d5fbfe213.1718554199.git.leon@kernel.org
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2024-06-26 10:53:29 -03:00
Leon Romanovsky
5953e0647c RDMA/mlx4: Fix truncated output warning in alias_GUID.c
drivers/infiniband/hw/mlx4/alias_GUID.c: In function ‘mlx4_ib_init_alias_guid_service’:
drivers/infiniband/hw/mlx4/alias_GUID.c:878:74: error: ‘%d’ directive
output may be truncated writing between 1 and 11 bytes into a region of
size 5 [-Werror=format-truncation=]
  878 |                 snprintf(alias_wq_name, sizeof alias_wq_name, "alias_guid%d", i);
      |                                                                          ^~
drivers/infiniband/hw/mlx4/alias_GUID.c:878:63: note: directive argument in the range [-2147483641, 2147483646]
  878 |                 snprintf(alias_wq_name, sizeof alias_wq_name, "alias_guid%d", i);
      |                                                               ^~~~~~~~~~~~~~
drivers/infiniband/hw/mlx4/alias_GUID.c:878:17: note: ‘snprintf’ output
between 12 and 22 bytes into a destination of size 15
  878 |                 snprintf(alias_wq_name, sizeof alias_wq_name, "alias_guid%d", i);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Fixes: a0c64a17ab ("mlx4: Add alias_guid mechanism")
Link: https://lore.kernel.org/r/1951c9500109ca7e36dcd523f8a5f2d0d2a608d1.1718554641.git.leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2024-06-26 10:53:29 -03:00
Leon Romanovsky
0d2e6992fc RDMA/mlx4: Fix truncated output warning in mad.c
Increase size of the name array to avoid truncated output warning.

drivers/infiniband/hw/mlx4/mad.c: In function ‘mlx4_ib_alloc_demux_ctx’:
drivers/infiniband/hw/mlx4/mad.c:2197:47: error: ‘%d’ directive output
may be truncated writing between 1 and 11 bytes into a region of size 4
[-Werror=format-truncation=]
 2197 |         snprintf(name, sizeof(name), "mlx4_ibt%d", port);
      |                                               ^~
drivers/infiniband/hw/mlx4/mad.c:2197:38: note: directive argument in
the range [-2147483645, 2147483647]
 2197 |         snprintf(name, sizeof(name), "mlx4_ibt%d", port);
      |                                      ^~~~~~~~~~~~
drivers/infiniband/hw/mlx4/mad.c:2197:9: note: ‘snprintf’ output between
10 and 20 bytes into a destination of size 12
 2197 |         snprintf(name, sizeof(name), "mlx4_ibt%d", port);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/infiniband/hw/mlx4/mad.c:2205:48: error: ‘%d’ directive output
may be truncated writing between 1 and 11 bytes into a region of size 3
[-Werror=format-truncation=]
 2205 |         snprintf(name, sizeof(name), "mlx4_ibwi%d", port);
      |                                                ^~
drivers/infiniband/hw/mlx4/mad.c:2205:38: note: directive argument in
the range [-2147483645, 2147483647]
 2205 |         snprintf(name, sizeof(name), "mlx4_ibwi%d", port);
      |                                      ^~~~~~~~~~~~~
drivers/infiniband/hw/mlx4/mad.c:2205:9: note: ‘snprintf’ output between
11 and 21 bytes into a destination of size 12
 2205 |         snprintf(name, sizeof(name), "mlx4_ibwi%d", port);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/infiniband/hw/mlx4/mad.c:2213:48: error: ‘%d’ directive output
may be truncated writing between 1 and 11 bytes into a region of size 3
[-Werror=format-truncation=]
 2213 |         snprintf(name, sizeof(name), "mlx4_ibud%d", port);
      |                                                ^~
drivers/infiniband/hw/mlx4/mad.c:2213:38: note: directive argument in
the range [-2147483645, 2147483647]
 2213 |         snprintf(name, sizeof(name), "mlx4_ibud%d", port);
      |                                      ^~~~~~~~~~~~~
drivers/infiniband/hw/mlx4/mad.c:2213:9: note: ‘snprintf’ output between
11 and 21 bytes into a destination of size 12
 2213 |         snprintf(name, sizeof(name), "mlx4_ibud%d", port);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[6]: *** [scripts/Makefile.build:244: drivers/infiniband/hw/mlx4/mad.o] Error 1

Fixes: fc06573dfa ("IB/mlx4: Initialize SR-IOV IB support for slaves in master context")
Link: https://lore.kernel.org/r/f3798b3ce9a410257d7e1ec7c9e285f1352e256a.1718554569.git.leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2024-06-26 10:53:29 -03:00
Leon Romanovsky
a92fbeac7e RDMA/cache: Release GID table even if leak is detected
When the table is released, we nullify pointer to GID table, it means
that in case GID entry leak is detected, we will leak table too.

Delete code that prevents table destruction.

Fixes: b150c3862d ("IB/core: Introduce GID entry reference counts")
Link: https://lore.kernel.org/r/a62560af06ba82c88ef9194982bfa63d14768ff9.1716900410.git.leon@kernel.org
Signed-off-by: Leon Romanovsky <leon@kernel.org>
2024-06-21 10:17:44 -03:00
Leon Romanovsky
b7161db2d9 Merge branch 'mlx5-next' into wip/leon-for-next
The req_transport_retries_exceeded counter shows the number of times
requester detected transport retries exceed error.

The req_rnr_retries_exceeded counter show the number of times the
requester detected RNR NAKs retries exceed error.

Signed-off-by: Leon Romanovsky <leon@kernel.org>
2024-06-16 18:54:04 +03:00
Patrisious Haddad
b339e0a39d RDMA/mlx5: Add Qcounters req_transport_retries_exceeded/req_rnr_retries_exceeded
The req_transport_retries_exceeded counter shows the number of times
requester detected transport retries exceed error.

The req_rnr_retries_exceeded counter show the number of times the
requester detected RNR NAKs retries exceed error.

Signed-off-by: Patrisious Haddad <phaddad@nvidia.com>
Link: https://lore.kernel.org/r/250466af94f4989d638fab168e246035530e912f.1718301543.git.leon@kernel.org
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
2024-06-16 18:53:23 +03:00
Chiara Meiohas
a4e540119b RDMA/mlx5: Set mkeys for dmabuf at PAGE_SIZE
Set the mkey for dmabuf at PAGE_SIZE to support any SGL
after a move operation.

ib_umem_find_best_pgsz returns 0 on error, so it is
incorrect to check the returned page_size against PAGE_SIZE

Fixes: 90da7dc820 ("RDMA/mlx5: Support dma-buf based userspace memory region")
Signed-off-by: Chiara Meiohas <cmeiohas@nvidia.com>
Reviewed-by: Michael Guralnik <michaelgur@nvidia.com>
Link: https://lore.kernel.org/r/1e2289b9133e89f273a4e68d459057d032cbc2ce.1718301631.git.leon@kernel.org
Signed-off-by: Leon Romanovsky <leon@kernel.org>
2024-06-16 18:39:29 +03:00
Jianbo Liu
5895e70f2e IB/mlx5: Allocate resources just before first QP/SRQ is created
Previously, all IB dev resources are initialized on driver load. As
they are not always used, move the initialization to the time when
they are needed.

To be more specific, move PD (p0) and CQ (c0) initialization to the
time when the first SRQ is created. and move SRQs(s0 and s1)
initialization to the time first QP is created. To avoid concurrent
creations, two new mutexes are also added.

Signed-off-by: Jianbo Liu <jianbol@nvidia.com>
Link: https://lore.kernel.org/r/98c3e53a8cc0bdfeb6dec6e5bb8b037d78ab00d8.1717409369.git.leon@kernel.org
Signed-off-by: Leon Romanovsky <leon@kernel.org>
2024-06-16 18:37:57 +03:00
Jianbo Liu
638420115c IB/mlx5: Create UMR QP just before first reg_mr occurs
UMR QP is not used in some cases, so move QP and its CQ creations from
driver load flow to the time first reg_mr occurs, that is when MR
interfaces are first called.

The initialization of dev->umrc.pd and dev->umrc.lock is still done in
driver load because pd is needed for mlx5_mkey_cache_init and the lock
is reused to protect against the concurrent creation.

When testing 4G bytes memory registration latency with rtool [1] and 8
threads in parallel, there is minor performance degradation (<5% for
the max latency) is seen for the first reg_mr with this change.

Link: https://github.com/paravmellanox/rtool [1]

Signed-off-by: Jianbo Liu <jianbol@nvidia.com>
Link: https://lore.kernel.org/r/55d3c4f8a542fd974d8a4c5816eccfb318a59b38.1717409369.git.leon@kernel.org
Signed-off-by: Leon Romanovsky <leon@kernel.org>
2024-06-16 18:37:50 +03:00
Leon Romanovsky
ae6f6dd5fd Delay mlx5_ib internal resources allocations
From: Leon Romanovsky <leonro@nvidia.com>

Internal mlx5_ib resources are created during mlx5_ib module load. This
behavior is not optimal because it consumes resources that are not
needed when SFs are created. This patch series delays the creation of
mlx5_ib internal resources to the stage when they actually used.

Signed-off-by: Leon Romanovsky <leon@kernel.org>
2024-06-16 18:35:47 +03:00
Jianbo Liu
d98995b4bf net/mlx5: Reimplement write combining test
The test of write combining was added before in mlx5_ib driver. It
opens UD QP and posts NOP WQEs, and uses BlueFlame doorbell. When
BlueFlame is used, WQEs get written directly to a PCI BAR of the
device (in addition to memory) so that the device handles them without
having to access memory.

In this test, the WQEs written in memory are different from the ones
written to the BlueFlame which request CQE update. By checking the
completion reports posted on CQ, we can know if BlueFlame succeeds or
not. The write combining must be supported if BlueFlame succeeds as
its register is written using write combining.

This patch reimplements the test in the same way, but using a pair of
SQ and CQ only. It is moved to mlx5_core as a general feature used by
both mlx5_core and mlx5_ib.

Besides, save write combine test result of the PCI function, so that
its thousands of child functions such as SF can query without paying
the time and resource penalty by itself. The test function is called
only after failing to get the cached result. With this enhancement,
all thousands of SFs of the PF attached to same driver no longer need
to perform WC check explicitly, which is already done in the system.
This saves several commands per SF, thereby speeds up SF creation and
also saves completion EQ creation.

Signed-off-by: Jianbo Liu <jianbol@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://lore.kernel.org/r/4ff5a8cc4c5b5b0d98397baa45a5019bcdbf096e.1717409369.git.leon@kernel.org
Signed-off-by: Leon Romanovsky <leon@kernel.org>
2024-06-16 18:33:59 +03:00
Leon Romanovsky
ef5513526b Merge branch 'mana-shared' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma
Leon Romanovsky says:

====================
net: mana: Allow variable size indirection table

Like we talked, I created new shared branch for this patch:
https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git/log/?h=mana-shared

* 'mana-shared' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
   net: mana: Allow variable size indirection table
====================

Link: https://lore.kernel.org/all/20240612183051.GE4966@unreal
Signed-off-by: Leon Romanovsky <leon@kernel.org>
2024-06-16 10:51:25 +03:00
Shradha Gupta
7fc45cb686 net: mana: Allow variable size indirection table
Allow variable size indirection table allocation in MANA instead
of using a constant value MANA_INDIRECT_TABLE_SIZE.
The size is now derived from the MANA_QUERY_VPORT_CONFIG and the
indirection table is allocated dynamically.

Signed-off-by: Shradha Gupta <shradhagupta@linux.microsoft.com>
Link: https://lore.kernel.org/r/1718015319-9609-1-git-send-email-shradhagupta@linux.microsoft.com
Reviewed-by: Dexuan Cui <decui@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
2024-06-12 21:08:42 +03:00
Linus Torvalds
83a7eefedc Linux 6.10-rc3 2024-06-09 14:19:43 -07:00
Linus Torvalds
b8481381d4 perf tools fixes for v6.10: 2nd batch
- Update copies of kernel headers, which resulted in support for the new
   'mseal' syscall, SUBVOL statx return mask bit, RISC-V and PPC prctls,
   fcntl's DUPFD_QUERY, POSTED_MSI_NOTIFICATION IRQ vector, 'map_shadow_stack'
   syscall for x86-32.
 
 - Revert perf.data record memory allocation optimization that ended up
   causing a regression, work is being done to re-introduce it in the
   next merge window.
 
 - Fix handling of minimal vmlinux.h file used with BPF's CO-RE when
   interrupting the build.
 
 Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQR2GiIUctdOfX2qHhGyPKLppCJ+JwUCZmWw9QAKCRCyPKLppCJ+
 J/bcAP4vftSGYZ0BDlfLT7KjEUDdc03nvgd5kHAkYM1OyVNgzAD/XRBe2c1f4pUK
 DWj5rjMAFpMfcGTv4TefQoopMZxYXgs=
 =cFei
 -----END PGP SIGNATURE-----

Merge tag 'perf-tools-fixes-for-v6.10-2-2024-06-09' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools

Pull perf tools fixes from Arnaldo Carvalho de Melo:

 - Update copies of kernel headers, which resulted in support for the
   new 'mseal' syscall, SUBVOL statx return mask bit, RISC-V and PPC
   prctls, fcntl's DUPFD_QUERY, POSTED_MSI_NOTIFICATION IRQ vector,
   'map_shadow_stack' syscall for x86-32.

 - Revert perf.data record memory allocation optimization that ended up
   causing a regression, work is being done to re-introduce it in the
   next merge window.

 - Fix handling of minimal vmlinux.h file used with BPF's CO-RE when
   interrupting the build.

* tag 'perf-tools-fixes-for-v6.10-2-2024-06-09' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools:
  perf bpf: Fix handling of minimal vmlinux.h file when interrupting the build
  Revert "perf record: Reduce memory for recording PERF_RECORD_LOST_SAMPLES event"
  tools headers arm64: Sync arm64's cputype.h with the kernel sources
  tools headers uapi: Sync linux/stat.h with the kernel sources to pick STATX_SUBVOL
  tools headers UAPI: Update i915_drm.h with the kernel sources
  tools headers UAPI: Sync kvm headers with the kernel sources
  tools arch x86: Sync the msr-index.h copy with the kernel sources
  tools headers: Update the syscall tables and unistd.h, mostly to support the new 'mseal' syscall
  perf trace beauty: Update the arch/x86/include/asm/irq_vectors.h copy with the kernel sources to pick POSTED_MSI_NOTIFICATION
  perf beauty: Update copy of linux/socket.h with the kernel sources
  tools headers UAPI: Sync fcntl.h with the kernel sources to pick F_DUPFD_QUERY
  tools headers UAPI: Sync linux/prctl.h with the kernel sources
  tools include UAPI: Sync linux/stat.h with the kernel sources
2024-06-09 09:04:51 -07:00
Linus Torvalds
637c2dfcd9 - Convert PCI core error codes to proper error numbers since latter get
propagated all the way up to the module loading functions
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEzv7L6UO9uDPlPSfHEsHwGGHeVUoFAmZldWsACgkQEsHwGGHe
 VUosPRAAkB7aKg5Z+AO1NOrVzPRIRy4khOELcaLR9mjc8aKEM5cgVH96tyb/gDRC
 r/0hqaggMYPu8xqKdl54tiCiVjhR11tdy22pTkh9B6aMOHVp4PyHYmB2GrhI+tgS
 w18ksk29gZl/lcc/tcanMqgrS91K2IiWp9USv3DlzTB/PEqvZd5yPo7iOiCeCTXV
 VGQZCgI7QnA5d09F6M577vV0Ox7al5r2RA3iqlJ1fv3KLbHwfIGzV8U8qSK8vma0
 mX8tu0up8ApzW5P/CxQ/VOfWGWsJK+jdABBlbXWKmY7ABGCGob9cMSPNFWHoAc+F
 3OqVEIJeW0vS6/VlZjqbmc6sV67acLwLtB21xuXpVX8tDgp9U7brXFGYCJ5z/GWf
 Uft7yXymk7y+QQ82TDF3EDjBMASLMdaioj3i9FMGi/nhbgQdNl88ebHL+G1bq2nU
 Yy6fcdTiladVT2WvXLwnwn3QE6SHiK6vbiBai9WN5n1aCByiurm0S71uqU9w34cl
 YTMojEH1GqooAkeCzHSHd0Vv4Lijtjw9N+UlDpJdhjRDWCPFQ7Bvtn3dNcL/PlDK
 L8aU2bQoiW9Cey3012i+gYl8bEgaZ/x63kUoJ37XuwmR5JpniOOt3r2uRiyr2w3k
 9VtOfyRjy4ISMxmL3rvNwMFm7pwC4t7FpyWedSO79rfvy+8hrVs=
 =TDV6
 -----END PGP SIGNATURE-----

Merge tag 'edac_urgent_for_v6.10_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras

Pull EDAC fixes from Borislav Petkov:

 - Convert PCI core error codes to proper error numbers since latter get
   propagated all the way up to the module loading functions

* tag 'edac_urgent_for_v6.10_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras:
  EDAC/igen6: Convert PCIBIOS_* return codes to errnos
  EDAC/amd64: Convert PCIBIOS_* return codes to errnos
2024-06-09 08:49:13 -07:00
Konstantin Taranov
2a1251e3db RDMA/mana_ib: Process QP error events in mana_ib
Process QP fatal events from the error event queue.
For that, find the QP, using QPN from the event, and then call its
event_handler. To find the QPs, store created RC QPs in an xarray.

Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com>
Link: https://lore.kernel.org/r/1717754897-19858-1-git-send-email-kotaranov@linux.microsoft.com
Reviewed-by: Wei Hu <weh@microsoft.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
2024-06-09 13:46:44 +03:00
Bart Van Assche
aee2424246 RDMA/iwcm: Fix a use-after-free related to destroying CM IDs
iw_conn_req_handler() associates a new struct rdma_id_private (conn_id) with
an existing struct iw_cm_id (cm_id) as follows:

        conn_id->cm_id.iw = cm_id;
        cm_id->context = conn_id;
        cm_id->cm_handler = cma_iw_handler;

rdma_destroy_id() frees both the cm_id and the struct rdma_id_private. Make
sure that cm_work_handler() does not trigger a use-after-free by only
freeing of the struct rdma_id_private after all pending work has finished.

Cc: stable@vger.kernel.org
Fixes: 59c68ac31e ("iw_cm: free cm_id resources on the last deref")
Reviewed-by: Zhu Yanjun <yanjun.zhu@linux.dev>
Tested-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20240605145117.397751-6-bvanassche@acm.org
Signed-off-by: Leon Romanovsky <leon@kernel.org>
2024-06-09 11:25:10 +03:00
Bart Van Assche
a1babdb5b6 RDMA/iwcm: Simplify cm_work_handler()
Instead of complicating the code to avoid a spin_lock_irqsave() /
spin_lock_irqrestore() pair before returning, simplify the code by removing
the local variable 'empty'.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20240605145117.397751-5-bvanassche@acm.org
Signed-off-by: Leon Romanovsky <leon@kernel.org>
2024-06-09 11:15:27 +03:00
Bart Van Assche
e1168f09b3 RDMA/iwcm: Simplify cm_event_handler()
queue_work() can test efficiently whether or not work is pending. Hence,
simplify cm_event_handler() by always calling queue_work() instead of only
if the list with pending work is empty.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20240605145117.397751-4-bvanassche@acm.org
Signed-off-by: Leon Romanovsky <leon@kernel.org>
2024-06-09 11:15:27 +03:00
Bart Van Assche
fc772e38bc RDMA/iwcm: Change the return type of iwcm_deref_id()
Since iwcm_deref_id() returns either 0 or 1, change its return type from
'int' into 'bool'.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20240605145117.397751-3-bvanassche@acm.org
Reviewed-by: Zhu Yanjun <yanjun.zhu@linux.dev>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
2024-06-09 11:15:27 +03:00
Bart Van Assche
b1bc15f8fb RDMA/iwcm: Use list_first_entry() where appropriate
Improve source code readability by using list_first_entry() where appropriate.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20240605145117.397751-2-bvanassche@acm.org
Reviewed-by: Zhu Yanjun <yanjun.zhu@linux.dev>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
2024-06-09 11:15:27 +03:00
Linus Torvalds
771ed66105 One fix for the SiFive PRCI clocks so that the device boots again. This
driver was registering clkdev lookups that were always going to be
 useless. This wasn't a problem until clkdev started returning an error
 in these cases, causing this driver to fail probe, and thus boot to fail
 because clks are essential for most drivers. The fix is simple, don't
 use clkdev because this is a DT based system where clkdev isn't used.
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEE9L57QeeUxqYDyoaDrQKIl8bklSUFAmZlBJoRHHNib3lkQGtl
 cm5lbC5vcmcACgkQrQKIl8bklSWECBAAswaNxK8xcEC60H9reH6UxyMNRxlDA3cv
 NW2Jmv5+Q1uSyTlsEmq3IDzqbURdR+e8A+bh9ZcJzZiTZC30WMC+CNU9nWe67nA7
 0eLNcSlerOKa+I9wc8wq5xwE9fCADkPpjyWXccUkngRrhFxWcsJNZjnc6Ki+o1IO
 +Uk4YQWFn7IG1xKtdwLpkpjHSjpZGloPrJClWCOfu4334VX9vS7lKJK7bmkQYciU
 dwPgVfcbtwYT5LHP6urmOjcxWcxOM1TrxA0sCsb3vTh1kWBrIcsunR0msATrWEgK
 sKQhEgwOFb5qrtabJaxoCrR3yB3VTfyecZYeuiVq+gnnWEPlHuzBpuC5DDdiy39q
 Va+sgC5Qi9+85BWwk/dXcjOYH/A/5aJZFtUI6MDwAPbNzyfiCwgc8aUiMIQ0EDtU
 yyviKIzWKBHq2OSoYAifd8UiO4ayy4DsB/azDSzHNJWQn1CrisH/Atu7kO/K7V+H
 KCH51ASfk/H60EJkfUJB8o/YvxdgaVRvK05912N0JlJqZesUc56KLIQer8vuItlz
 T7gDd1v+Z+lmCf+8U64YLXo6/RbVor6rVVWWHo7gnPl1dv4NS9hH4JMGYvI6LG2m
 yp7skURw8IQSoxMROmMDNU4GqalpvH/5Pyu4Lmrmg5SlA5NTX/YDHozL17ZgbzOZ
 u0vo/5IXWgU=
 =J4Wh
 -----END PGP SIGNATURE-----

Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux

Pull clk fix from Stephen Boyd:
 "One fix for the SiFive PRCI clocks so that the device boots again.

  This driver was registering clkdev lookups that were always going to
  be useless. This wasn't a problem until clkdev started returning an
  error in these cases, causing this driver to fail probe, and thus boot
  to fail because clks are essential for most drivers. The fix is
  simple, don't use clkdev because this is a DT based system where
  clkdev isn't used"

* tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
  clk: sifive: Do not register clkdevs for PRCI clocks
2024-06-08 19:14:02 -07:00
Linus Torvalds
c5dbc2ed00 Two small smb3 client fixes
-----BEGIN PGP SIGNATURE-----
 
 iQGzBAABCgAdFiEE6fsu8pdIjtWE/DpLiiy9cAdyT1EFAmZk6z0ACgkQiiy9cAdy
 T1HtugwAn30am2MtXR51/20SEuJezAdVjuTFfQIAl0ChvtylMPjnu7cwyu+S5BJm
 lBHY76UoNP9E3l0TttRo1VGQ5zvbwCvUZgQgC+HNVmmndhjnEK3x34KqdDDx65qU
 42gj+q+2Wy/rRx1U1lttMLd5NhOYmIuKekPG8sFAc6AaMu+t0cfgC4dfiRcCZq5J
 R9N7C/7y53MbjW746P6pe1yF/TbKCw0wtWhEztXhOWDadRr6TBol4ahGiaC9xVOE
 7GijJIkKZXsYNYSxjUpU7cYcHK/DD6S7wE6wJV8/feViOCCQjt/OwXDxjndSt5GY
 faDzXD7/OdDXnZVeZ2dhj/9e3DwnLOfpI3k3s7onG3q9CS/e7ZbquTF76ZN2d2MZ
 UT+9+JVLAvG3xdEXshNb3wBuoz/NCx+xCamyzeRWd6FDQFb4zPLhAbDKXU4gO71v
 OmUTpX9n8H840JJURvQcr4qScPm/F4LlCTfH9fexenIJkFT+vnQFQp9oUqgAOX6T
 d7xb0Pho
 =MpUp
 -----END PGP SIGNATURE-----

Merge tag '6.10-rc2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6

Pull smb client fixes from Steve French:
 "Two small smb3 client fixes:

   - fix deadlock in umount

   - minor cleanup due to netfs change"

* tag '6.10-rc2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
  cifs: Don't advance the I/O iterator before terminating subrequest
  smb: client: fix deadlock in smb2_find_smb_tcon()
2024-06-08 19:07:18 -07:00
Linus Torvalds
061d1af7b0 for-linus-2024060801
-----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEoEVH9lhNrxiMPSyI7MXwXhnZSjYFAmZklEoTHGJlbnRpc3NA
 a2VybmVsLm9yZwAKCRDsxfBeGdlKNq36D/sFCIZn48y+wh0lrkvrOkcchEuvluJ2
 oUoLY12WKli/03oKIcigMKXjieNmKPx4sfnJh1LLahBa2HDfN1D5lPULaFGc8PJY
 56VIDvnziqN13tFv3wIK05zSrgl9tWBe7HxCrh0SFWNq1BTe5jNzi/BVv00X1EAt
 AHha+V+EsV1B+v8wQ0lTkJRqSX4+LvIA/cNFgjKIuq18xTvZGJO82RY/uy8MrgPE
 c0WIO7SHvQ5kjRgyKihWQwuFPANmtJ7g5SWO3Z0LGAoZfRMsLMb3HO+Zd296LkBr
 k724wNuZ9RhAONk0XXiDpZ7VREAA003H2YLmozFAc6/c6D2We6jjGO2Irusjt8M6
 h9oow8TLz2KgW3jsbMt+sp8XMdDQFn1H3Cw8QRqYznV0Ji+wGGDhto39RAlzmeg/
 n5dUIUkBRHS/Zn22VCi/c+Uyp/tnT50aZ2BLlJ2g1oyLSQ8HcA8w47GpaaPHP1CI
 VMEKowaVqh8elVlrDQsHHsOMM9hQ6hQISg7TpRGAC9ard7hXNWeQ5mE8iP4N+g35
 y+pcZ9eRwNIJDHZtk4Hyg7zY5JngDSgO2rouzDV8EAmXk9jEy0zcKR8pFTWT4nhL
 yIQuQyC7rn6jJUo9PZtK0d52mnelCyC1fVuHdJeCwSP83k4YzcAsKL5/dZbWUGRD
 cBxNTv3U/pCp3g==
 =J35N
 -----END PGP SIGNATURE-----

Merge tag 'for-linus-2024060801' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid

Pull HID fixes from Benjamin Tissoires:

 - fix potential read out of bounds in hid-asus (Andrew Ballance)

 - fix endian-conversion on little endian systems in intel-ish-hid (Arnd
   Bergmann)

 - A couple of new input event codes (Aseda Aboagye)

 - errors handling fixes in hid-nvidia-shield (Chen Ni), hid-nintendo
   (Christophe JAILLET), hid-logitech-dj (José Expósito)

 - current leakage fix while the device is in suspend on a i2c-hid
   laptop (Johan Hovold)

 - other assorted smaller fixes and device ID / quirk entry additions

* tag 'for-linus-2024060801' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid:
  HID: Ignore battery for ELAN touchscreens 2F2C and 4116
  HID: i2c-hid: elan: fix reset suspend current leakage
  dt-bindings: HID: i2c-hid: elan: add 'no-reset-on-power-off' property
  dt-bindings: HID: i2c-hid: elan: add Elan eKTH5015M
  dt-bindings: HID: i2c-hid: add dedicated Ilitek ILI2901 schema
  input: Add support for "Do Not Disturb"
  input: Add event code for accessibility key
  hid: asus: asus_report_fixup: fix potential read out of bounds
  HID: logitech-hidpp: add missing MODULE_DESCRIPTION() macro
  HID: intel-ish-hid: fix endian-conversion
  HID: nintendo: Fix an error handling path in nintendo_hid_probe()
  HID: logitech-dj: Fix memory leak in logi_dj_recv_switch_to_dj_mode()
  HID: core: remove unnecessary WARN_ON() in implement()
  HID: nvidia-shield: Add missing check for input_ff_create_memless
  HID: intel-ish-hid: Fix build error for COMPILE_TEST
2024-06-08 10:48:11 -07:00
Linus Torvalds
329f70c5be Kbuild fixes for v6.10 (second)
- Fix the initial state of the save button in 'make gconfig'
 
  - Improve the Kconfig documentation
 
  - Fix a Kconfig bug regarding property visibility
 
  - Fix build breakage for systems where 'sed' is not installed in /bin
 
  - Fix a false warning about missing MODULE_DESCRIPTION()
 -----BEGIN PGP SIGNATURE-----
 
 iQJJBAABCgAzFiEEbmPs18K1szRHjPqEPYsBB53g2wYFAmZkjoAVHG1hc2FoaXJv
 eUBrZXJuZWwub3JnAAoJED2LAQed4NsGEQgQAI6724AWOTd5pAkTxSGxNdzl12NB
 fzk3Sh/r1448QmzpXUbeGONHVXhwBRipl2oAZVwo/8YgwHOqUlAp/73GYD4ryz6P
 WCMHhVQ++yYSx9H1XvZ1hMM6RZI9hnBxk7KfSu+OYbg49shEq6MpToKBD8N/Fdlm
 HEmJWZXtGvANsxItRMpcZ1zHxYEDKcFmmyTc7vWEK929FLg0WAxj15C0vT+RAGs3
 byLsGsg84g/K3FNIjobXnBhKSV2qDbl0si+1T1DGmAHu2i/6i2bin6qqKt9P+CAa
 DY8GQfP07VdO/HPVUsCC2AxiNIsPycTPwF+1H0UGSNX8J3xguzdtwkNdn4dxenrn
 vV8JWyCyr2oMdhxlV9NmO5e7xWcg6c1gYJas8ilMmqCotV2NddY8EMLA3ta+/73n
 0Qvqiixy4J2K/8bNlHoDkn+Xnm82qcyU2w4qTB7+TUjYx/jsr+gnXYFqQBgjXQF8
 DGiyFhqGv5rd/dWoeKmSAhWjmOwOCXtx3T4s/PTpN+FIC+rMSX6l7lIrMBSiaTfM
 gLnytpUXdfSMUv071cqo/bizelLG44x8M8qv0+b/WaKO9U7YxwqxBMOyTzBwgnRB
 VGdEpROK/8FlKtRpk38AS884kn/1RStzjy868nvmmEZ582jO9FlqFMfK6sxD7uP1
 GOnXYcgDIKqmIROA
 =RzRM
 -----END PGP SIGNATURE-----

Merge tag 'kbuild-fixes-v6.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild

Pull Kbuild fixes from Masahiro Yamada:

 - Fix the initial state of the save button in 'make gconfig'

 - Improve the Kconfig documentation

 - Fix a Kconfig bug regarding property visibility

 - Fix build breakage for systems where 'sed' is not installed in /bin

 - Fix a false warning about missing MODULE_DESCRIPTION()

* tag 'kbuild-fixes-v6.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
  modpost: do not warn about missing MODULE_DESCRIPTION() for vmlinux.o
  kbuild: explicitly run mksysmap as sed script from link-vmlinux.sh
  kconfig: remove wrong expr_trans_bool()
  kconfig: doc: document behavior of 'select' and 'imply' followed by 'if'
  kconfig: doc: fix a typo in the note about 'imply'
  kconfig: gconf: give a proper initial state to the Save button
  kconfig: remove unneeded code for user-supplied values being out of range
2024-06-08 10:12:33 -07:00
Linus Torvalds
1e7ccdd325 media fixes for v6.10-rc3
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE+QmuaPwR3wnBdVwACF8+vY7k4RUFAmZi4D8ACgkQCF8+vY7k
 4RXFYxAAnyyNn2GxGkc9tBbUMUC9O2GV8TYMDNcaUoD94dWQ4oMCH3ExdxjDAKEP
 +fR+ytKwbmb7/og0X5o0MTyJD4ttRkiAJwMNSoF+2Da8+KJhrHQOx9NL8Kpg3J/B
 ZsKtzEyVmxWx7+FwSA50hv1g0GdEtOS7F0fxgZYwt0tpZyYorW46DthqipA7N8Yl
 S50bV9rWy1n3Tt8XqVKqmZd0e77FpR8p6D899mLFxm3Q0NPkjtvmescamsmWpkzG
 r+KKeXqPOSCSPa/zRq+JMYXIeIXaK7akW9FQY+XWmP2nwWuwFb1EQXtlRVuatLK7
 P6PggXMzq1wP0+rGizooAFV79gaMb/HP00v9qGeaEdr3R502wLeRSbbQsnfL3ENe
 oaZ01ckms/dAYH8ph2trwS2ViUnfICiuV684VHVQJGZEsV74mVL5YyNmWftnRaJz
 xhtDptaTp0aICC36sqRg9CixU/ATPPuLoDpphgEQ/DAcEJphrSzXHZcZub1gAnMY
 RIECNp6YnLh7YwwRRaxgLE+n3xnppelyArKWbG498dOl/T5ccUvbKbfLWq9YDaPY
 JG3CZveYDr9FMCOQZuEROSMTFFpoyInBRUSUlROskRNp/+rPdkX3UrsQmvH+9+cb
 OspJZEkIPiFJZOfUP+PaUz24hpwSViABjeERHHVFmShZqXIG+zk=
 =4Zki
 -----END PGP SIGNATURE-----

Merge tag 'media/v6.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

Pull media fixes from Mauro Carvalho Chehab:

 - fixes for the new ipu6 driver (and related fixes to mei csi driver)

 - fix a double debugfs remove logic at mgb4 driver

 - a documentation fix

* tag 'media/v6.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
  media: intel/ipu6: add csi2 port sanity check in notifier bound
  media: intel/ipu6: update the maximum supported csi2 port number to 6
  media: mei: csi: Warn less verbosely of a missing device fwnode
  media: mei: csi: Put the IPU device reference
  media: intel/ipu6: fix the buffer flags caused by wrong parentheses
  media: intel/ipu6: Fix an error handling path in isys_probe()
  media: intel/ipu6: Move isys_remove() close to isys_probe()
  media: intel/ipu6: Fix some redundant resources freeing in ipu6_pci_remove()
  media: Documentation: v4l: Fix ACTIVE route flag
  media: mgb4: Fix double debugfs remove
2024-06-08 09:57:09 -07:00
Linus Torvalds
36714d69b1 Miscellaneous fixes:
- Fix possible memory leak the riscv-intc irqchip driver load failures
 
  - Fix boot crash in the sifive-plic irqchip driver caused by recently
    changed boot initialization order
 
  - Fix race condition in the gic-v3-its irqchip driver
 
 Signed-off-by: Ingo Molnar <mingo@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCgAvFiEEBpT5eoXrXCwVQwEKEnMQ0APhK1gFAmZkDTMRHG1pbmdvQGtl
 cm5lbC5vcmcACgkQEnMQ0APhK1hPsRAAoHgcHw9KGhI9+y7Xnnjt4W9Ud6S3W8cs
 AcmP9x83+iilnPQrrWlB/v5p02qBPPdpqnDvOnB/7bITxJGxnSBXj1awUuV45qX2
 QRS4sIDq6zkDH6pX0diiwqLbfWZwpcbvtnR3nXSGImOK0jI3yQiSLEc8vswt88Jr
 HnYg9UdvKCt7j+jbqf9PzPHJP8z/U+Kx6eMPF4H/6R+nccedtQ0D2BdR5RSKFVZM
 aQwpZp6LTTapp3B1lXOx6IJaVTkRMeEm9J2Zc4R/pD3dvKof0xpEwJ+dqBrPAjb0
 +ospUJcPz4Sw9XhBIrqq4A+LUewiVa9grI3t1qit+VtbXkVHfLK9mUlyXfQzgMFz
 JTlUgt3V4vpbceUbFZsefXeB2TDGAPpFQvwgNozvEx+IgEZjryrSa2SgAuhl4Y6b
 nIxwBYFMlG6GI8CIDVGyl3XK/DcKUXM1XloJwTRDWjN/cZloxaZjRIpIiACr+SYW
 S1axryYDqDG4VU3vfTEqb75VGm4rPtHLXqRDmu/ZL8/BIQ7CQqnD0eMGIQ79aEXj
 Ia5CccTWqu0dufA5rxl47lcacPEKYlVFTkTul1ujzM2ymllmwjTpPKvSEhcwUC6J
 XRR7iv372AUo1xnk1G34Wl6Mp9nbxW2DXNinX/eDuV0AqV/1EKxs6vqgddGKhOuX
 K+ER8F+is64=
 =98O/
 -----END PGP SIGNATURE-----

Merge tag 'irq-urgent-2024-06-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull irq fixes from Ingo Molnar:

 - Fix possible memory leak the riscv-intc irqchip driver load failures

 - Fix boot crash in the sifive-plic irqchip driver caused by recently
   changed boot initialization order

 - Fix race condition in the gic-v3-its irqchip driver

* tag 'irq-urgent-2024-06-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  irqchip/gic-v3-its: Fix potential race condition in its_vlpi_prop_update()
  irqchip/sifive-plic: Chain to parent IRQ after handlers are ready
  irqchip/riscv-intc: Prevent memory leak when riscv_intc_init_common() fails
2024-06-08 09:44:50 -07:00
Linus Torvalds
7cedb020d5 Miscellaneous fixes:
- Fix kexec() crash if call depth tracking is enabled
 
  - Fix SMN reads on inaccessible registers on certain AMD systems
 
 Signed-off-by: Ingo Molnar <mingo@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCgAvFiEEBpT5eoXrXCwVQwEKEnMQ0APhK1gFAmZkC+0RHG1pbmdvQGtl
 cm5lbC5vcmcACgkQEnMQ0APhK1iPHA/+P+lT60i13QPX9HICpAKLC0ZPpBj+OXco
 jo/2MJddO04EVvYkojjzvvKVHEz4Q8O15IUprqeXbhp49xSdhX5Yn8o46xPrXoYz
 WkHphX6qiMKBeNE+i6hYzUKl+vfpyVQwUazUlfS/xk7H5CaolHdhOd5riIx6D9M1
 XYx9CT+8bWLppxL5LGTS1G1g03S+WnWDK0yr7FIY7i1SCzPqu0v2IUGFrvNhTrhu
 Ejj3YyVHDwBokkhDbzdV2rAUHzC7JkufipOM6I7TgFVRO783wP/o23b8syc+OtQD
 aNZUAyH7pNWiPUlUz4r3FjRUzqGIcQTKNZdHqGTDaHqH7dT/e09CYJ9LTiUEL0z4
 mx68gHemn8NKG+QuOixd78HiPTV27qhdivpwgVzFZyXZYILI38UTqqK55eKdsgba
 c0jtID74FGWTNpR06Ahs6G3uldQEqkZ5po08S7YTstw75vTb+c5iQznJffVwDKnb
 +fpBVfJBYIoVMZ7oWonEV3zPa3fMCkfnAByTcKqBNnAIkr7xgAuQuCOqgv+4b/7Y
 yDXbGlrdLCjoOdDVXVrpVPNXONd93M2wR8dXBeNJ+lp05ElfzNRyWriFBGA3kSOb
 H3T8XVN3O4nHWHNQfSwSrAqmChpV+W3TuBUjKtEHVAeQ3Ub31ja2us+RpbhQc1Jm
 iXMw3zNITeQ=
 =Gvh6
 -----END PGP SIGNATURE-----

Merge tag 'x86-urgent-2024-06-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Ingo Molnar:
 "Miscellaneous fixes:

   - Fix kexec() crash if call depth tracking is enabled

   - Fix SMN reads on inaccessible registers on certain AMD systems"

* tag 'x86-urgent-2024-06-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/amd_nb: Check for invalid SMN reads
  x86/kexec: Fix bug with call depth tracking
2024-06-08 09:36:08 -07:00
Linus Torvalds
7cec2e16cb Fix race between perf_event_free_task() and perf_event_release_kernel()
that can result in missed wakeups and hung tasks.
 
 Signed-off-by: Ingo Molnar <mingo@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCgAvFiEEBpT5eoXrXCwVQwEKEnMQ0APhK1gFAmZkCmARHG1pbmdvQGtl
 cm5lbC5vcmcACgkQEnMQ0APhK1hrsBAAsOlZWV+VN0l6TGUqqVZZuuZO03Nk3TX3
 kk4iq/xj9pRNmq1bizfsyCFEH3lK7fSYK2I0/iK145vHASzqyeXT1EbtGv61g7EJ
 Z42oYdmAxhXcBOZRffZYI2t8zOcVBUV5s/aDmim11fftYdXkaX73pAHVJdhg/e0v
 tfgFeJwihG4ynCPa8HrRzBUEXwtKngB8II8mmHyL7E5SsoRsO0ubZBU2MW6P5NA9
 9f27ab9Uxj8YWAKa/1Yn6VKgAird8ao+kUu7hYDjZyZTEOvrXU3HrM+VXptnn1S8
 2UPSRPNlV2MGDn7Uo3AskIFkF4QlZ3DZFGKCn2n/1Qf/OqeD3d39DoCKzg7lTx+9
 gSd7cAtKkrsA1bwfz6uZVPEY9M4eVNqZ5aIo7K28q6zSvSFYy2LI0LCzFVwRgAyK
 q8+XyR0aH9R9BYT1Tj0i6z9uZY/h8KROO/M/bU0egG/JRe4WX7X7mjVEQAapHi5F
 xLvPH0I9wo3jDVuxr7hPaT30Xv67F8V9WSKQ6HlMDN/etXNNLysCyOxDmXSXJ6Z7
 9IWaLrHKJG36vj+rKOpPn6Tm+fGAxlm2lDfXExZkYnyzAI59mmf6XEHQBdPly/Q6
 mXZVi3APTOn0REUo3tqi6UiaLL56HD0yvzwSmqSAFke3Nv+za+SeerwgjS2JoYWr
 hJPmkc9fLBY=
 =uVD+
 -----END PGP SIGNATURE-----

Merge tag 'perf-urgent-2024-06-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull perf event fix from Ingo Molnar:
 "Fix race between perf_event_free_task() and perf_event_release_kernel()
  that can result in missed wakeups and hung tasks"

* tag 'perf-urgent-2024-06-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf/core: Fix missing wakeup when waiting for context reference
2024-06-08 09:26:59 -07:00
Linus Torvalds
bbc5332b8c Fix typos in the kerneldoc of some of the atomic APIs.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCgAvFiEEBpT5eoXrXCwVQwEKEnMQ0APhK1gFAmZkCU0RHG1pbmdvQGtl
 cm5lbC5vcmcACgkQEnMQ0APhK1iRYg/+JW80HkMgv4nbbfq8Iy4j2DhVPPG/FHTt
 p9c60/aJvVPK2jIBEhORECSgHZXsg4jREpSmI4Nbkw37F25tjNf1fblxA7mEfmiT
 IEPBrNhP98cYTq53h/JD+EwIJIANhg1XQ+J6O3z+M8sVQ3ENUzKM28FQuJ+77zZ3
 ghfzd2+MHLgfIhuGlA2wvYymg7urNfEABODnTmmrkYSKasQFpIC5fTsAzmLpHzT7
 9TjOybmSNNUmGYnFILBdTqLh72jjWogFC6avx3O00jqMfjzK6AYRlD/GnHgzey36
 ULUHUlrLUq3JzsrTXG1Xrvs9n8YLal6c7iE6QfK7kO/eejSdwZSUn3PM9Q3M6444
 Ud3ZtTYcRXH//KwixaCKvcbJMs6OuJLOD68cDMNAmYQ47YptSvgjWK/HEyLa7KHv
 x7ByG+d7cX8Vmm2QEvLWBfd0ctEibDgx0Rw0b90ZBtYp8BG6x8WtmDYlqB5MnVw6
 N14Rr0xjnVripJ8Af5oXnPQmt1QeoPa+0Ophgit5x4ohkBGn1TlHcGtoCDT6Yq4h
 2L7HJ5TNYBsWKruy4nLIwpbfWZf7rJN69iqu7REAMVaJet+s1AI/LTcaEpLsebdu
 woN43pB7WUYo+l9ooqH942LpYK53reMoCeRzzAxZxCP0ky2JbWtR33AwQ7PvMMVR
 bg8lWsaz0Ig=
 =oiVl
 -----END PGP SIGNATURE-----

Merge tag 'locking-urgent-2024-06-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull locking doc fix from Ingo Molnar:
 "Fix typos in the kerneldoc of some of the atomic APIs"

* tag 'locking-urgent-2024-06-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  locking/atomic: scripts: fix ${atomic}_sub_and_test() kerneldoc
2024-06-08 09:03:46 -07:00
Linus Torvalds
dc772f8237 14 hotfixes, 6 of which are cc:stable.
All except the nilfs2 fix affect MM and all are singletons - see the
 chagelogs for details.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQTTMBEPP41GrTpTJgfdBJ7gKXxAjgUCZmOJLgAKCRDdBJ7gKXxA
 jinQAQC0AjAhN7zuxfCb9ljCsqyyAfsWbeyXAlqdhuRt2xZONgD+Nv2XwSUw0ZUv
 xHGgPodMCrmEvuLo048qRpdJRbYo8gw=
 =sM9B
 -----END PGP SIGNATURE-----

Merge tag 'mm-hotfixes-stable-2024-06-07-15-24' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Pull misc fixes from Andrew Morton:
 "14 hotfixes, 6 of which are cc:stable.

  All except the nilfs2 fix affect MM and all are singletons - see the
  chagelogs for details"

* tag 'mm-hotfixes-stable-2024-06-07-15-24' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
  nilfs2: fix nilfs_empty_dir() misjudgment and long loop on I/O errors
  mm: fix xyz_noprof functions calling profiled functions
  codetag: avoid race at alloc_slab_obj_exts
  mm/hugetlb: do not call vma_add_reservation upon ENOMEM
  mm/ksm: fix ksm_zero_pages accounting
  mm/ksm: fix ksm_pages_scanned accounting
  kmsan: do not wipe out origin when doing partial unpoisoning
  vmalloc: check CONFIG_EXECMEM in is_vmalloc_or_module_addr()
  mm: page_alloc: fix highatomic typing in multi-block buddies
  nilfs2: fix potential kernel bug due to lack of writeback flag waiting
  memcg: remove the lockdep assert from __mod_objcg_mlstate()
  mm: arm64: fix the out-of-bounds issue in contpte_clear_young_dirty_ptes
  mm: huge_mm: fix undefined reference to `mthp_stats' for CONFIG_SYSFS=n
  mm: drop the 'anon_' prefix for swap-out mTHP counters
2024-06-07 17:01:10 -07:00
Linus Torvalds
e60721bf3c gpio updates for v6.10-rc3
- set of interrupt handling and Kconfig fixes for gpio-tqmx86
 - add a buffer for storing output values in gpio-tqmx86 as reading back the
   registers always returns the input values
 - add missing MODULE_DESCRIPTION()s to several GPIO drivers
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEFp3rbAvDxGAT0sefEacuoBRx13IFAmZjVpUACgkQEacuoBRx
 13L8LBAAnq9EQYL4VwONmfwaVejCt27+O/c13IGfohaOPM5FXDqYnutWCDDdOay4
 HsOdqgN+1JLpYw7oAM+EIZB5TV3U+gH1t9AJOEr1Lzdcc/Rte6IZZkwcLUsyrJpR
 3AvGSCS2+Wv8+ovEFZt0FAlZbg234aYfa1YqyNB0dpl0uhMNluIxcw8FmZqdlXxA
 enpQZBHW7FdvzLLQXp9PE+fxd+ljG+GQQaw3Wwbzn5GJMAsZRZQE+zs8EeHZZkZX
 QNLOkq/pYYgIYtSalHUPZb4Ljfh3Ppa+yVgYz3WQTCnaidkl+A2fM9OGZJGFl820
 bRyZWCGxv9mhN6LYxaP4Sjt4N1pQ1wmEISc3ekWBUBO6OOWwJ2cViCNmy8SqCIvV
 s28Wd4YTkaoHo39mwmK0VkhAVWt2Jne6gdtolSCiDhQ21AIQuOoBi9xv7LV4fWd8
 oMiXsAvS/iGDN5T2opdiNQt0CKktMTlPb7/QZlyDLi39/oLtF4glHd+0p5XGcoT5
 AYs5BF+viuxGbbdbljSOhrFHcH6fis5K8S+DeBabOxTwijGKOjrtHirBU3RtT4Bu
 8mozyx6qT1RUeh00iJ4pQYQOXnXlUVbWOgAKGFbpA2gujzH81I4nPnIjUvpwVIqq
 pJZPoIPw+adHMLiQE1OC7iZhuFbVgmdAimSWvyUYa988t0wcDGg=
 =FanA
 -----END PGP SIGNATURE-----

Merge tag 'gpio-fixes-for-v6.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux

Pull gpio fixes from Bartosz Golaszewski:

 - interrupt handling and Kconfig fixes for gpio-tqmx86

 - add a buffer for storing output values in gpio-tqmx86 as reading back
   the registers always returns the input values

 - add missing MODULE_DESCRIPTION()s to several GPIO drivers

* tag 'gpio-fixes-for-v6.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
  gpio: add missing MODULE_DESCRIPTION() macros
  gpio: tqmx86: fix broken IRQ_TYPE_EDGE_BOTH interrupt type
  gpio: tqmx86: store IRQ trigger type and unmask status separately
  gpio: tqmx86: introduce shadow register for GPIO output value
  gpio: tqmx86: fix typo in Kconfig label
2024-06-07 16:54:57 -07:00
Linus Torvalds
602079a0a1 block-6.10-20240607
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAmZjEZoQHGF4Ym9lQGtl
 cm5lbC5kawAKCRD301j7KXHgpjVzEADCWIoHaw+egjkngKteauq4hRhnLzte3CdQ
 A+CTxNa+rhByJzk+XMCDj9ld89tNM1k6Bor0EN6QDG6mznHjrc6OZ0hK5zRx/Ros
 PA3dlwf5KYVvfqDLYwBt+1bvwg8kDhW7Qr4jsVSac+PuMI6GLKxrIUu6k/+fVaYK
 tSaBPEaNHtkGNC+QAbIEFeJxBmoKuZkqjaXia+RRP8/iBCkpdtSzE3LV2Q+dkNmj
 JPfPGgk9s35y357bTCBLQR4qAB3e7pGifBcQ2EzXeSClmd6PecK8WfZyKtlGB19x
 ieDTxbwHzJ6njfjrs31hYRUznIrJqZfRzdHAcpMV3EULiqU09EVtofTh4QcNfL5N
 Wo1BfU2TLZoNoTZaaN9b1qsGG3wOwAj+Eb4oue89elWJb60QoSSxL1T5u7VRL9W8
 Q3t3abavnDVeEq3kuJ1TRPkkD92pFrrAZ0S7suQ0+FXf3Vt9P12sC0gUDOFoveER
 J9quzuaD4nMbP9SBtIffLxKuvtsZB1uvkizrg7VwnLLsc25Lo8ky+UZ3lT2AX/p7
 l2oFjdLMnAloDaKWmcAdVYuOVY8zu4E+BOVYqQR+URQvkpcDSWcfj1Aj4ntoBRhQ
 Ky/0HoCpAUGU9rTSxnSVXKycbda0GUzFSnn1DH5aHdexo9W9bapsD0HbuLyRUoup
 WLU7jPXNEA==
 =aDiO
 -----END PGP SIGNATURE-----

Merge tag 'block-6.10-20240607' of git://git.kernel.dk/linux

Pull block fixes from Jens Axboe:

 - Fix for null_blk block size validation (Andreas)

 - NVMe pull request via Keith:
      - Use reserved tags for special fabrics operations (Chunguang)
      - Persistent Reservation status masking fix (Weiwen)

* tag 'block-6.10-20240607' of git://git.kernel.dk/linux:
  null_blk: fix validation of block size
  nvme: fix nvme_pr_* status code parsing
  nvme-fabrics: use reserved tag for reg read/write command
2024-06-07 16:45:48 -07:00
Linus Torvalds
e33915892d io_uring-6.10-20240607
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAmZjEaoQHGF4Ym9lQGtl
 cm5lbC5kawAKCRD301j7KXHgpoIiD/kBrju5fZvCHYSbJe9OJURAbRchPkuGJZyL
 D5ibX4NKx/AKrvp++Paqb0cq6HndJQziKiksFO/C9+4itT98oVpFvIBXQVyAUu6Q
 nnVm9aQvvg/fZyUa78J9C0Na7NIlVyHr3v/doHZKlYVhF5inOxmC+SB5ELbXv2G9
 JjqbzcFE9MQRbojZP8g3AfMeopaskGe9ZZwoyoGy1R/Vvvsz2OitydVfBvT+V43A
 y4dxGBu8pH0hR0IAMKd2GTBjxrcWu8gdB9MZfJUq9byidlCTsshpdjFbSUZ4bK5o
 GTzSiK38zeonhrAboz8ZiH1V2ADk9SvimTKtY5OtVhKJOz7TH4AgOcw+UIO7Dmc/
 6xV3WAjfzxez5ln2gulzvbDY+rMBSu7VVHswBBVbJhwcpC0CVuFBV2/wWdwVn5L5
 a+ENiZbTG4Jm//ALnxqioC8qYRNvp8V09HhnhWyG9CBpGDWBAMbCd8wopDwqXmp0
 JOjtSBFJRYNUtckH9lEEmR3LWFIgtfnB1fTY0ykVYktQ27iPUsOH4sdXoU2Ujv2n
 FvXOeXR5dIJDPoptY9dDiDILfwvZCULaZVGIEKBGcNcsaFmlijRi55IezahM5nLH
 96OGlyiCAHRCdtj/TsoAcgzuQuOR4UMEmAROJWRDcdStGV5JIIdfz4Aw/GRZcnt+
 zl0B8e/7UA==
 =GLKM
 -----END PGP SIGNATURE-----

Merge tag 'io_uring-6.10-20240607' of git://git.kernel.dk/linux

Pull io_uring fixes from Jens Axboe:

 - Fix a locking order issue with setting max async thread workers
   (Hagar)

 - Fix for a NULL pointer dereference for failed async flagged requests
   using ring provided buffers. This doesn't affect the current kernel,
   but it does affect older kernels, and is being queued up for 6.10
   just to make the stable process easier (me)

 - Fix for NAPI timeout calculations for how long to busy poll, and
   subsequently how much to sleep post that if a wait timeout is passed
   in (me)

 - Fix for a regression in this release cycle, where we could end up
   using a partially unitialized match value for io-wq (Su)

* tag 'io_uring-6.10-20240607' of git://git.kernel.dk/linux:
  io_uring: fix possible deadlock in io_register_iowq_max_workers()
  io_uring/io-wq: avoid garbage value of 'match' in io_wq_enqueue()
  io_uring/napi: fix timeout calculation
  io_uring: check for non-NULL file pointer in io_file_can_poll()
2024-06-07 16:43:07 -07:00
Linus Torvalds
07978330e6 for-6.10-rc2-tag
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE8rQSAMVO+zA4DBdWxWXV+ddtWDsFAmZjGxEACgkQxWXV+ddt
 WDt/lQ/9G5Ieozi7BoHcBTmE5BpyRXqfQ5dj9VaWFLZEH+rvdOiZlQ5QlcI1gkUg
 jbSp7SB8qhrIbBwv2b58xgnGuuUxE2dd3tPP655bBhe7o4xvAKOK8XBVyVQQxvzq
 eRI1J4daQC08FjlSNnHiY1ozl1OIOTSVllLBqkhkYOaBbIKbMByCVPpj4cwzqAvC
 5iBCmL2RalAQ/ZasYwdBid2L2VD4dWGJ9uHY6pi+i9f/Q7nxGRlXqhHo25J5T2Gl
 YE+75fS1lN9hQIkhZRlpiqOdpjJcxkkGJ0elXtRQ0t856lXUAOacIN+HW6aaLxj/
 qv8tnaZO1M/Aw8t65N/8m/ktnBQEwXeX3rAcTpvaMLKAQRGP1oZdsyN5YzLpEi0h
 0Y+yXyFdOYbTJBrGie+kRyh9RoRY3CLcQgRw/2u7ysRjBqdXPcaGXAH4ydE/67Qy
 hdD9DVwDkjzmxh/V4o8raIM+b3Ql4FuBR0X93f8A0LeanJUlgCrc4lokgdA1tPEf
 i/+epnnlEnBOpS4ht5PFn8FkpzeuKAR63AM5sKL18DYswpP5oCyyh76zMMoBh33k
 JFEwVSUDW8AH6YSMAA5eLp9bGTDOGYyvNHKBRXAv5GHQkBXq4ahjZEUh2b/r1903
 FzivbyRtUsxEh62SCsXCZqKlb1BhXRkhSqdbBFbYsKYmVEkylQo=
 =7rUb
 -----END PGP SIGNATURE-----

Merge tag 'for-6.10-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux

Pull btrfs fixes from David Sterba:

 - fix handling of folio private changes.

   The private value holds pointer to our extent buffer structure
   representing a metadata range. Release and create of the range was
   not properly synchronized when updating the private bit which ended
   up in double folio_put, leading to all sorts of breakage

 - fix a crash, reported as duplicate key in metadata, but caused by a
   race of fsync and size extending write. Requires prealloc target
   range + fsync and other conditions (log tree state, timing)

 - fix leak of qgroup extent records after transaction abort

* tag 'for-6.10-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
  btrfs: protect folio::private when attaching extent buffer folios
  btrfs: fix leak of qgroup extent records after transaction abort
  btrfs: fix crash on racing fsync and size-extending write into prealloc
2024-06-07 15:13:12 -07:00
Linus Torvalds
eecba7c070 nfsd-6.10 fixes:
- Fix an occasional memory overwrite caused by a fix added in 6.10
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEKLLlsBKG3yQ88j7+M2qzM29mf5cFAmZjB6EACgkQM2qzM29m
 f5cPXBAAstE7c7QAYCQtAwK/C/rsbr8xjAxcjivwAEOFl8znKc4ZTJ3u2tVSgAqI
 DSbjXK/JVOW10ahDLawqpnWuqTUHtGlK4CMVRdZkmfEqokulhny+FmelJ4B0ZWMQ
 fUSSdYO4ONuMRcytnFperqI0LL7XuEnSsKnE1cQ4HIybQchJyilj9c/TERIVGWzn
 eHcVke07JF+lMvHWWJoDCcHhHHtl82znDPpmrsyzOLKS+jtiaP41r2ZPtohhoPDm
 9VQmTqpSXWyexXpzgQzyu4TOWz6PPakoa701x7pW/2wZgzabdRaJhkYea64Bc8GK
 RTfr7TpSKkcnttQSb2jbb2+qG15g+f7nDbWtejqWuhEppwdj/EznuyrHi80N5Klf
 pw4+XFU8HoC15jcdltMb2Jecbv6uulQ0AcfCOLUh61E86tiy7YDChmhRLgDhzRsS
 jDvq8HxRe1CNmqoxfqIuWuWiMwyCRSSd06U7u3/eqBZeLXOxQb26bxG8GXitUPgY
 G4SCCSvExs2YqnegsZNQGB0L5YKd/zhhnkoc/Y29CU9ZhoItgHlblKODsix9kVJl
 ckN/qSZS5/rrV7IsvzsB0ywNb5VkfnkspHu7X8tlYBuwgnTHJCp25AuWVt31/6jH
 E+tW4wdvd1oBTLqpWRewclTwUrmvJYVYirS01LiTVehx/mnJdw8=
 =NvAo
 -----END PGP SIGNATURE-----

Merge tag 'nfsd-6.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux

Pull nfsd fix from Chuck Lever:

 - Fix an occasional memory overwrite caused by a fix added in 6.10

* tag 'nfsd-6.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux:
  SUNRPC: Fix loop termination condition in gss_free_in_token_pages()
2024-06-07 15:07:57 -07:00
Linus Torvalds
0a02756d91 RISC-V Fixes for 6.10-rc3
* Another fix to avoid allocating pages that overlap with ERR_PTR, which
   manifests on rv32.
 * A revert for the badaccess patch I incorrectly picked up an early
   version of.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEKzw3R0RoQ7JKlDp6LhMZ81+7GIkFAmZjGDcTHHBhbG1lckBk
 YWJiZWx0LmNvbQAKCRAuExnzX7sYiWGoD/9LuIorx3Oxtq8oWq42DpMHQDKIJU/p
 PlopOk0acCucfg13ZfAQDJ0H8PN64SLJ/Zhzh/+Ge+6s1FRD1b5pqsT0ZKUytsrk
 pdWVha8QAQYCm3YekLGvQCHHN1Lh3/dilOvZEJZN1l+ltnRFh+tfurB+E/Cre/mb
 pRMGDtAASXGUAkuEZqKfxEe7zQ4xRnyVx0DtcFl1xVjNP11ywwwbnkf7GyrhmDHT
 SITcjF3NaoqQ4zgEwD8MflL6k0fwhwECw3RBvwT23jfHX56ttPJRw0bn9l8UlY25
 HdvBw45bcIbva0COIMIBnYjpokj5wIOnaOhJSHbHllkVFTpBcaiO+CgDj440sAlJ
 4vvl7ll8Fn/DCEjzQgvePndjzWPyxEGkAU6b8f68wj0dfRU/FW16GE3nO/mYLjjx
 RWob8+/qh6kg51KsaCdDNHaASoeVG6ZYokIOYecc30rDZv2fjQv5ly81k6UpKcCu
 0v9el1vX7KaM6GYQkIhyJbnlCCTGLfKJWcWU/Sup7pw7S2HmAkwV3LnuUQwkVXrG
 Qc6GWTbD7YrfVVQF+yX/PrpmuhQWk6ZUZjoA20jmkoeN4IDUG5l1j6xy6I0dDp6T
 OYSYdQNuGfic2X6wO73iImFJTdleuqFVW5GjiD2LkZXziV5rMGpgaXVGzhwnltk8
 A+B53s9STVmbyQ==
 =tO1B
 -----END PGP SIGNATURE-----

Merge tag 'riscv-for-linus-6.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux

Pull RISC-V fixes from Palmer Dabbelt:

 - Another fix to avoid allocating pages that overlap with ERR_PTR,
   which manifests on rv32

 - A revert for the badaccess patch I incorrectly picked up an early
   version of

* tag 'riscv-for-linus-6.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
  Revert "riscv: mm: accelerate pagefault when badaccess"
  riscv: fix overlap of allocated page and PTR_ERR
2024-06-07 14:47:38 -07:00
Linus Torvalds
8d6b029e15 s390 updates for 6.10-rc3
- Do not create PT_LOAD program header for the kenel image when
   the virtual memory informaton in OS_INFO data is not available.
   That fixes stand-alone dump failures against kernels that do not
   provide the virtual memory informaton
 
 - Add KVM s390 shared zeropage selftest
 -----BEGIN PGP SIGNATURE-----
 
 iI0EABYIADUWIQQrtrZiYVkVzKQcYivNdxKlNrRb8AUCZmMO4xccYWdvcmRlZXZA
 bGludXguaWJtLmNvbQAKCRDNdxKlNrRb8ErcAQDLfDjQsjL3pJOaCuRqK2KyCgnD
 azZSDzjKZ/C03MX/vgEA505txGFI5UthiVRHLR/GEZs6E7q+C5fuHexFPbG1XQg=
 =dIuv
 -----END PGP SIGNATURE-----

Merge tag 's390-6.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux

Pull s390 fixes from Alexander Gordeev:

 - Do not create PT_LOAD program header for the kenel image when the
   virtual memory informaton in OS_INFO data is not available. That
   fixes stand-alone dump failures against kernels that do not provide
   the virtual memory informaton

 - Add KVM s390 shared zeropage selftest

* tag 's390-6.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  KVM: s390x: selftests: Add shared zeropage test
  s390/crash: Do not use VM info if os_info does not have it
2024-06-07 14:44:53 -07:00
Linus Torvalds
8d437867ba arm64 fix for -rc3
- Fix spurious CPU hotplug warning message from SETEND emulation code
 
 - Fix the build when GCC wasn't inlining our I/O accessor internals
 -----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCgAuFiEEPxTL6PPUbjXGY88ct6xw3ITBYzQFAmZi7LoQHHdpbGxAa2Vy
 bmVsLm9yZwAKCRC3rHDchMFjNHHCB/9cnPBWjVe8XK3tpZADACBUovrfT/x5cr7e
 TgdELeZ7NT1Eqmh/W1ZyUxphsCVT2Ky87E2idZaXT/NnQVo7joyPKPzePlAk5jmx
 TxRKsgnFHEoISmWjCPkka86UwKtEAo7aN50tsjRIhJlv4sJJnpDhxz0B2TqDX0U4
 u9dtcl5kr+fm9odFUkJb8FcRXnTXF28IuGVSpQArqaB8liib6HqnBBe394j9Ju8S
 7Or0vOZJQidHF+azXIhwiMCjPK5t7ajY+vmCXZTR1irQmbQsSJgBogpGl/A2Ji5c
 XjOZuYiDBlnLBi5bJau+z5ciYeSraug/92D27hZ/tRH5YyoAgzYa
 =IvZ4
 -----END PGP SIGNATURE-----

Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 fixes from Will Deacon:

 - Fix spurious CPU hotplug warning message from SETEND emulation code

 - Fix the build when GCC wasn't inlining our I/O accessor internals

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64/io: add constant-argument check
  arm64: armv8_deprecated: Fix warning in isndep cpuhp starting process
2024-06-07 14:36:57 -07:00
Linus Torvalds
96e09b8f81 platform-drivers-x86 for v6.10-3
Highlights:
  -  Default silead touchscreen driver to 10 fingers and drop 10 finger setting
     from all DMI quirks. More of a cleanup then a pure fix, but since the DMI
     quirks always get updated through the fixes branch this avoids conflicts.
  -  Kconfig fix for randconfig builds
  -  dell-smbios: Fix wrong token data in sysfs
  -  amd-hsmp: Fix driver poking unsupported hw when loaded manually
 
 The following is an automated git shortlog grouped by driver:
 
 Input:
  -  silead - Always support 10 fingers
 
 dell-smbios:
  -  Simplify error handling
  -  Fix wrong token data in sysfs
 
 platform/x86/amd/hsmp:
  -  Check HSMP support on AMD family of processors
 
 touchscreen_dmi:
  -  Use 2-argument strscpy()
  -  Drop "silead,max-fingers" property
 
 yt2-1380:
  -  add CONFIG_EXTCON dependency
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCAAyFiEEuvA7XScYQRpenhd+kuxHeUQDJ9wFAmZiz/0UHGhkZWdvZWRl
 QHJlZGhhdC5jb20ACgkQkuxHeUQDJ9xKpwf/YfoXStHjHetAZGlVw818ItNX33Xr
 OJ1e7MFKuBokpFI8A5SNu5zRHG9RLGageMJk/AkJiEGgYUtInygpPL1kgo3EXBV7
 R2ZfW/b93N9pebyX9LAlaCG99xY4nYOKMVGWbqAb+wsu6nMi/G8HdUllkorCvExB
 e3nYisEtWEn01YRlAAd2QNbn3PHeAopNXW+JFbFozKrMQJahnRAGcZjrNyJIeXWc
 Iy229mdhQGDGbhz5IfgHia3EnFduE75oMhsyS6S915qM21GbO55w7h0rAq2uB7Uh
 RQY9SA+11Kc/LfyD3a0XRh8rQut/JS734/MBj6yNOeS8J5FqqO+v6+HWiQ==
 =oc5S
 -----END PGP SIGNATURE-----

Merge tag 'platform-drivers-x86-v6.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86

Pull x86 platform driver fixes from Hans de Goede:

 -  Default silead touchscreen driver to 10 fingers and drop 10 finger
    setting from all DMI quirks. More of a cleanup then a pure fix, but
    since the DMI quirks always get updated through the fixes branch
    this avoids conflicts.

 -  Kconfig fix for randconfig builds

 -  dell-smbios: Fix wrong token data in sysfs

 -  amd-hsmp: Fix driver poking unsupported hw when loaded manually

* tag 'platform-drivers-x86-v6.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
  platform/x86/amd/hsmp: Check HSMP support on AMD family of processors
  platform/x86: dell-smbios: Simplify error handling
  platform/x86: dell-smbios: Fix wrong token data in sysfs
  platform/x86: yt2-1380: add CONFIG_EXTCON dependency
  platform/x86: touchscreen_dmi: Use 2-argument strscpy()
  platform/x86: touchscreen_dmi: Drop "silead,max-fingers" property
  Input: silead - Always support 10 fingers
2024-06-07 14:13:46 -07:00
Linus Torvalds
f24b46ea10 IOMMU Fixes for Linux v6.10-rc2
Including:
 
 	- Core:
 	  - Make iommu-dma code recognize 'force_aperture' again
 	  - Fix for potential NULL-ptr dereference from iommu_sva_bind_device()
 	    return value
 
 	- AMD IOMMU fixes:
 	  - Fix lockdep splat for invalid wait context
 	  - Add feature bit check before enabling PPR
 	  - Make workqueue name fit into buffer
 	  - Fix memory leak in sysfs code
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEr9jSbILcajRFYWYyK/BELZcBGuMFAmZiyXsACgkQK/BELZcB
 GuNHAQ//UtMczjHfRS1XzKuhvXh3Ay2kFp42bMHdaydWdEzRQfrdK9Nj0Zb2VYEV
 WiX38pteFHVs5ZKkf/vEIqQOV3crbMSIq/k/P3jrglG480yt1xj05nf4+r4ZibMJ
 aGv9adhn5t9EiFjrj4yirto9MyZHDHynr2QSHILzOhqtfvQsxNIuSW490zvAA9EO
 gMasRDPx8do1dOi5k3BnB+0URehcM06QP+vTi5KJqBBwXMp11BU1R99iRwgWOGHp
 shPkOhU+N+sQaYVXXi1n92eBuWfJfHaqTThT4DHGGoyFx0eJIIB92dKbhin+0oiv
 gFoSMtysoLo+HCzhJQ0NN9Ayv2at4oHZeRKiE5QTSJOTZ801QVR7d8k7lmQewl62
 qs1WOKR4lE0IwIk2VjLOqpY+rok5YgY1BgFy7BD5cbsIYIhN+5olzq43AH4UtKQN
 RIBedWZ/78FffrjFsE8Ut2fPpu67QVy5AqqqJ06zCbhrMBB75+o7itL8+KJhOisd
 uPXW21aAiPGpOg3BOrFcRKHejn6oqxfhuESbVkcOQttqx5rdPC9lgDnH+xzZsm/P
 fnIBuvgr2l7I9ulqk6+m9qc2N+n1dRjfKS9GdCGQH+y+o9t9gLeob0aTu+rGC4gN
 2mW4cHaet9X1LvJtdACHK04BFzAAboLP2bqclPbsaVkJPD9Ejk8=
 =67iX
 -----END PGP SIGNATURE-----

Merge tag 'iommu-fixes-v6.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu

Pull iommu fixes from Joerg Roedel:
 "Core:

   - Make iommu-dma code recognize 'force_aperture' again

   - Fix for potential NULL-ptr dereference from iommu_sva_bind_device()
     return value

  AMD IOMMU fixes:

   - Fix lockdep splat for invalid wait context

   - Add feature bit check before enabling PPR

   - Make workqueue name fit into buffer

   - Fix memory leak in sysfs code"

* tag 'iommu-fixes-v6.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
  iommu/amd: Fix Invalid wait context issue
  iommu/amd: Check EFR[EPHSup] bit before enabling PPR
  iommu/amd: Fix workqueue name
  iommu: Return right value in iommu_sva_bind_device()
  iommu/dma: Fix domain init
  iommu/amd: Fix sysfs leak in iommu init
2024-06-07 13:34:53 -07:00
Linus Torvalds
e693c5026c ata fixes for 6.10-rc3
- Fix a regression for the PATA MacIO driver were it would fail to probe
    because of the recent changes of initializing the limits in SCSI core.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQRN+ES/c4tHlMch3DzJZDGjmcZNcgUCZmLEvAAKCRDJZDGjmcZN
 ckjbAQCId46fAYeYjWnMkYocWtG1cKWVq+3Oqx0vEGEOjBKKuAEA6NsW54/LO9sx
 X7ReZBH+H9bRls6uXnWqSFXF84ufdg8=
 =ALjT
 -----END PGP SIGNATURE-----

Merge tag 'ata-6.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux

Pull ata fix from Niklas Cassel:

 - Fix a regression for the PATA MacIO driver were it would fail to
   probe because of the recent changes of initializing the limits in
   SCSI core

* tag 'ata-6.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux:
  ata: pata_macio: Fix max_segment_size with PAGE_SIZE == 64K
2024-06-07 12:47:20 -07:00
Linus Torvalds
2e32d58075 drm fixes for 6.10-rc3
xe:
 - Update the LMTT when freeing VF GT config
 
 amdgpu:
 - Fix shutdown issues on some SMU 13.x platforms
 - Silence some UBSAN flexible array warnings
 
 panel:
 - sitronix-st7789v: handle of_drm_get_panel_orientation
   failing error.
 
 vmwgfx:
 - filter modes greater than available graphics memory
 - fix 3D vs STDU enable
 - remove STDU logic from mode valid
 - logging fix
 - memcmp pointers fix
 - remove unused struct
 - screen target lifetime fix
 
 komeda:
 - unused struct removal
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEEKbZHaGwW9KfbeusDHTzWXnEhr4FAmZiaO8ACgkQDHTzWXnE
 hr4yhA/+LgXtif5TqGp2q//ILQ25xKRZ59bZTc0UUvjX+egNOk/Sp81U9ISBsNO2
 OGNmyCZ7PGC6NfsYTBHDrtXbTyqGsW+xVGH7YXe3fpSy99pNwjCSmAcdVeqycbY6
 X3dPezUoNEbWemno6HUaBpVQQlo/j7SxBchyPVmzfy9zLzp8g2nt3LKrJPciBjCm
 uxqDf+vQLeh7O0jUcEMsFHEHOlq7o6/IZZebrhhph62AyLKtWztJt5CU2C5wobMh
 5eNEc/Sp8ErwdBUZL6DaxM0TiAi2WLI2T6/fNozK358UyGe8En6cT8I87sphRprc
 ylMgfzRagqRqi8zV1Ctfr2VeyyjS6xeXYTVVEPmpjqOv6QZOsIIx2D67qffzT1bx
 2tfRo4Ix0is7ryk3BdEv7K6tTErswqOf72YAg94lLB/4AVDrv+rUOsMjNnSKpz0F
 Dm7MVz7HUi/soKC7tZh5rTtJHLRWFOnIVwpe07crTFpITGdj6PGg/KxtRqwMOkjO
 DT0zXfblzlnCJM23WQmV5YppXP/38vUTSZrchTZF4aEd378fnyb4L/7TLKuZ84R2
 mjtVMO9nGEiwIS1fTVLUg1ySXpm9FsWeMummxjGNXmhh2OBj4D3LTESulTnVLhL6
 43o2a2o3oNS3nUoZqncd4j35NkjmqjwG//Ss5+ps7iMSu69abX8=
 =iAM2
 -----END PGP SIGNATURE-----

Merge tag 'drm-fixes-2024-06-07' of https://gitlab.freedesktop.org/drm/kernel

Pull drm fixes from Dave Airlie:
 "Weekly fixes: vmwgfx leads the way this week, with minor changes in xe
  and amdgpu and a couple of other small fixes.

  Seems quiet enough.

  xe:
   - Update the LMTT when freeing VF GT config

  amdgpu:
   - Fix shutdown issues on some SMU 13.x platforms
   - Silence some UBSAN flexible array warnings

  panel:
   - sitronix-st7789v: handle of_drm_get_panel_orientation failing
     error

  vmwgfx:
   - filter modes greater than available graphics memory
   - fix 3D vs STDU enable
   - remove STDU logic from mode valid
   - logging fix
   - memcmp pointers fix
   - remove unused struct
   - screen target lifetime fix

  komeda:
   - unused struct removal"

* tag 'drm-fixes-2024-06-07' of https://gitlab.freedesktop.org/drm/kernel:
  drm/vmwgfx: Don't memcmp equivalent pointers
  drm/vmwgfx: remove unused struct 'vmw_stdu_dma'
  drm/vmwgfx: Don't destroy Screen Target when CRTC is enabled but inactive
  drm/vmwgfx: Standardize use of kibibytes when logging
  drm/vmwgfx: Remove STDU logic from generic mode_valid function
  drm/vmwgfx: 3D disabled should not effect STDU memory limits
  drm/vmwgfx: Filter modes which exceed graphics memory
  drm/amdgpu/pptable: Fix UBSAN array-index-out-of-bounds
  drm/amd: Fix shutdown (again) on some SMU v13.0.4/11 platforms
  drm/xe/pf: Update the LMTT when freeing VF GT config
  drm/panel: sitronix-st7789v: Add check for of_drm_get_panel_orientation
  drm/komeda: remove unused struct 'gamma_curve_segment'
2024-06-07 12:35:56 -07:00
Louis Dalibard
a3a5a37efb HID: Ignore battery for ELAN touchscreens 2F2C and 4116
At least ASUS Zenbook 14 (2023) and ASUS Zenbook 14 Pro (2023) are affected.

The touchscreen reports a battery status of 0% and jumps to 1% when a
stylus is used.

The device ID was added and the battery ignore quirk was enabled for it.

[jkosina@suse.com: reformatted changelog a bit]
Signed-off-by: Louis Dalibard <ontake@ontake.dev>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
2024-06-07 17:02:56 +02:00
Johan Hovold
0eafc58f21 HID: i2c-hid: elan: fix reset suspend current leakage
The Elan eKTH5015M touch controller found on the Lenovo ThinkPad X13s
shares the VCC33 supply with other peripherals that may remain powered
during suspend (e.g. when enabled as wakeup sources).

The reset line is also wired so that it can be left deasserted when the
supply is off.

This is important as it avoids holding the controller in reset for
extended periods of time when it remains powered, which can lead to
increased power consumption, and also avoids leaking current through the
X13s reset circuitry during suspend (and after driver unbind).

Use the new 'no-reset-on-power-off' devicetree property to determine
when reset needs to be asserted on power down.

Notably this also avoids wasting power on machine variants without a
touchscreen for which the driver would otherwise exit probe with reset
asserted.

Fixes: bd3cba00dc ("HID: i2c-hid: elan: Add support for Elan eKTH6915 i2c-hid touchscreens")
Cc: <stable@vger.kernel.org>	# 6.0
Cc: Douglas Anderson <dianders@chromium.org>
Tested-by: Steev Klimaszewski <steev@kali.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20240507144821.12275-5-johan+linaro@kernel.org
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
2024-06-07 11:18:11 +02:00
Johan Hovold
e538d4b85b dt-bindings: HID: i2c-hid: elan: add 'no-reset-on-power-off' property
When the power supply is shared with other peripherals the reset line
can be wired in such a way that it can remain deasserted regardless of
whether the supply is on or not.

This is important as it can be used to avoid holding the controller in
reset for extended periods of time when it remains powered, something
which can lead to increased power consumption. Leaving reset deasserted
also avoids leaking current through the reset circuitry pull-up
resistors.

Add a new 'no-reset-on-power-off' devicetree property which can be used
by the OS to determine when reset needs to be asserted on power down.

Note that this property can also be used when the supply cannot be
turned off by the OS at all.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20240507144821.12275-4-johan+linaro@kernel.org
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
2024-06-07 11:16:55 +02:00