Commit Graph

1165241 Commits

Author SHA1 Message Date
Alex Deucher
28c708c669 drm/amdgpu/jpeg2: properly set atomics vmid field
commit e414a304f2c5368a84f03ad34d29b89f965a33c9 upstream.

This needs to be set as well if the IB uses atomics.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 35c628774e50b3784c59e8ca7973f03bcb067132)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-29 17:30:16 +02:00
Al Viro
43768fa80f memcg_write_event_control(): fix a user-triggerable oops
commit 046667c4d3196938e992fba0dfcde570aa85cd0e upstream.

we are *not* guaranteed that anything past the terminating NUL
is mapped (let alone initialized with anything sane).

Fixes: 0dea116876 ("cgroup: implement eventfd-based generic API for notifications")
Cc: stable@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-29 17:30:16 +02:00
Bas Nieuwenhuizen
922fab508e drm/amdgpu: Actually check flags for all context ops.
commit 0573a1e2ea7e35bff08944a40f1adf2bb35cea61 upstream.

Missing validation ...

Checked libdrm and it clears all the structs, so we should be
safe to just check everything.

Signed-off-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit c6b86421f1f9ddf9d706f2453159813ee39d0cf9)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-29 17:30:16 +02:00
Qu Wenruo
106140dd44 btrfs: tree-checker: add dev extent item checks
commit 008e2512dc5696ab2dc5bf264e98a9fe9ceb830e upstream.

[REPORT]
There is a corruption report that btrfs refused to mount a fs that has
overlapping dev extents:

  BTRFS error (device sdc): dev extent devid 4 physical offset 14263979671552 overlap with previous dev extent end 14263980982272
  BTRFS error (device sdc): failed to verify dev extents against chunks: -117
  BTRFS error (device sdc): open_ctree failed

[CAUSE]
The direct cause is very obvious, there is a bad dev extent item with
incorrect length.

With btrfs check reporting two overlapping extents, the second one shows
some clue on the cause:

  ERROR: dev extent devid 4 offset 14263979671552 len 6488064 overlap with previous dev extent end 14263980982272
  ERROR: dev extent devid 13 offset 2257707008000 len 6488064 overlap with previous dev extent end 2257707270144
  ERROR: errors found in extent allocation tree or chunk allocation

The second one looks like a bitflip happened during new chunk
allocation:
hex(2257707008000) = 0x20da9d30000
hex(2257707270144) = 0x20da9d70000
diff               = 0x00000040000

So it looks like a bitflip happened during new dev extent allocation,
resulting the second overlap.

Currently we only do the dev-extent verification at mount time, but if the
corruption is caused by memory bitflip, we really want to catch it before
writing the corruption to the storage.

Furthermore the dev extent items has the following key definition:

	(<device id> DEV_EXTENT <physical offset>)

Thus we can not just rely on the generic key order check to make sure
there is no overlapping.

[ENHANCEMENT]
Introduce dedicated dev extent checks, including:

- Fixed member checks
  * chunk_tree should always be BTRFS_CHUNK_TREE_OBJECTID (3)
  * chunk_objectid should always be
    BTRFS_FIRST_CHUNK_CHUNK_TREE_OBJECTID (256)

- Alignment checks
  * chunk_offset should be aligned to sectorsize
  * length should be aligned to sectorsize
  * key.offset should be aligned to sectorsize

- Overlap checks
  If the previous key is also a dev-extent item, with the same
  device id, make sure we do not overlap with the previous dev extent.

Reported: Stefan N <stefannnau@gmail.com>
Link: https://lore.kernel.org/linux-btrfs/CA+W5K0rSO3koYTo=nzxxTm1-Pdu1HYgVxEpgJ=aGc7d=E8mGEg@mail.gmail.com/
CC: stable@vger.kernel.org # 5.10+
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-29 17:30:16 +02:00
Naohiro Aota
a61ad8e074 btrfs: zoned: properly take lock to read/update block group's zoned variables
commit e30729d4bd4001881be4d1ad4332a5d4985398f8 upstream.

__btrfs_add_free_space_zoned() references and modifies bg's alloc_offset,
ro, and zone_unusable, but without taking the lock. It is mostly safe
because they monotonically increase (at least for now) and this function is
mostly called by a transaction commit, which is serialized by itself.

Still, taking the lock is a safer and correct option and I'm going to add a
change to reset zone_unusable while a block group is still alive. So, add
locking around the operations.

Fixes: 169e0da91a ("btrfs: zoned: track unusable bytes for zones")
CC: stable@vger.kernel.org # 5.15+
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-29 17:30:15 +02:00
Waiman Long
2058b4962f mm/memory-failure: use raw_spinlock_t in struct memory_failure_cpu
commit d75abd0d0bc29e6ebfebbf76d11b4067b35844af upstream.

The memory_failure_cpu structure is a per-cpu structure.  Access to its
content requires the use of get_cpu_var() to lock in the current CPU and
disable preemption.  The use of a regular spinlock_t for locking purpose
is fine for a non-RT kernel.

Since the integration of RT spinlock support into the v5.15 kernel, a
spinlock_t in a RT kernel becomes a sleeping lock and taking a sleeping
lock in a preemption disabled context is illegal resulting in the
following kind of warning.

  [12135.732244] BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:48
  [12135.732248] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 270076, name: kworker/0:0
  [12135.732252] preempt_count: 1, expected: 0
  [12135.732255] RCU nest depth: 2, expected: 2
    :
  [12135.732420] Hardware name: Dell Inc. PowerEdge R640/0HG0J8, BIOS 2.10.2 02/24/2021
  [12135.732423] Workqueue: kacpi_notify acpi_os_execute_deferred
  [12135.732433] Call Trace:
  [12135.732436]  <TASK>
  [12135.732450]  dump_stack_lvl+0x57/0x81
  [12135.732461]  __might_resched.cold+0xf4/0x12f
  [12135.732479]  rt_spin_lock+0x4c/0x100
  [12135.732491]  memory_failure_queue+0x40/0xe0
  [12135.732503]  ghes_do_memory_failure+0x53/0x390
  [12135.732516]  ghes_do_proc.constprop.0+0x229/0x3e0
  [12135.732575]  ghes_proc+0xf9/0x1a0
  [12135.732591]  ghes_notify_hed+0x6a/0x150
  [12135.732602]  notifier_call_chain+0x43/0xb0
  [12135.732626]  blocking_notifier_call_chain+0x43/0x60
  [12135.732637]  acpi_ev_notify_dispatch+0x47/0x70
  [12135.732648]  acpi_os_execute_deferred+0x13/0x20
  [12135.732654]  process_one_work+0x41f/0x500
  [12135.732695]  worker_thread+0x192/0x360
  [12135.732715]  kthread+0x111/0x140
  [12135.732733]  ret_from_fork+0x29/0x50
  [12135.732779]  </TASK>

Fix it by using a raw_spinlock_t for locking instead.

Also move the pr_err() out of the lock critical section and after
put_cpu_ptr() to avoid indeterminate latency and the possibility of sleep
with this call.

[longman@redhat.com: don't hold percpu ref across pr_err(), per Miaohe]
  Link: https://lkml.kernel.org/r/20240807181130.1122660-1-longman@redhat.com
Link: https://lkml.kernel.org/r/20240806164107.1044956-1-longman@redhat.com
Fixes: 0f383b6dc9 ("locking/spinlock: Provide RT variant")
Signed-off-by: Waiman Long <longman@redhat.com>
Acked-by: Miaohe Lin <linmiaohe@huawei.com>
Cc: "Huang, Ying" <ying.huang@intel.com>
Cc: Juri Lelli <juri.lelli@redhat.com>
Cc: Len Brown <len.brown@intel.com>
Cc: Naoya Horiguchi <nao.horiguchi@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-29 17:30:15 +02:00
Zhen Lei
d6d68531f8 selinux: fix potential counting error in avc_add_xperms_decision()
commit 379d9af3f3da2da1bbfa67baf1820c72a080d1f1 upstream.

The count increases only when a node is successfully added to
the linked list.

Cc: stable@vger.kernel.org
Fixes: fa1aa143ac ("selinux: extended permissions for ioctls")
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Acked-by: Stephen Smalley <stephen.smalley.work@gmail.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-29 17:30:15 +02:00
Max Kellermann
b8a50877f6 fs/netfs/fscache_cookie: add missing "n_accesses" check
commit f71aa06398aabc2e3eaac25acdf3d62e0094ba70 upstream.

This fixes a NULL pointer dereference bug due to a data race which
looks like this:

  BUG: kernel NULL pointer dereference, address: 0000000000000008
  #PF: supervisor read access in kernel mode
  #PF: error_code(0x0000) - not-present page
  PGD 0 P4D 0
  Oops: 0000 [#1] SMP PTI
  CPU: 33 PID: 16573 Comm: kworker/u97:799 Not tainted 6.8.7-cm4all1-hp+ #43
  Hardware name: HP ProLiant DL380 Gen9/ProLiant DL380 Gen9, BIOS P89 10/17/2018
  Workqueue: events_unbound netfs_rreq_write_to_cache_work
  RIP: 0010:cachefiles_prepare_write+0x30/0xa0
  Code: 57 41 56 45 89 ce 41 55 49 89 cd 41 54 49 89 d4 55 53 48 89 fb 48 83 ec 08 48 8b 47 08 48 83 7f 10 00 48 89 34 24 48 8b 68 20 <48> 8b 45 08 4c 8b 38 74 45 49 8b 7f 50 e8 4e a9 b0 ff 48 8b 73 10
  RSP: 0018:ffffb4e78113bde0 EFLAGS: 00010286
  RAX: ffff976126be6d10 RBX: ffff97615cdb8438 RCX: 0000000000020000
  RDX: ffff97605e6c4c68 RSI: ffff97605e6c4c60 RDI: ffff97615cdb8438
  RBP: 0000000000000000 R08: 0000000000278333 R09: 0000000000000001
  R10: ffff97605e6c4600 R11: 0000000000000001 R12: ffff97605e6c4c68
  R13: 0000000000020000 R14: 0000000000000001 R15: ffff976064fe2c00
  FS:  0000000000000000(0000) GS:ffff9776dfd40000(0000) knlGS:0000000000000000
  CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
  CR2: 0000000000000008 CR3: 000000005942c002 CR4: 00000000001706f0
  Call Trace:
   <TASK>
   ? __die+0x1f/0x70
   ? page_fault_oops+0x15d/0x440
   ? search_module_extables+0xe/0x40
   ? fixup_exception+0x22/0x2f0
   ? exc_page_fault+0x5f/0x100
   ? asm_exc_page_fault+0x22/0x30
   ? cachefiles_prepare_write+0x30/0xa0
   netfs_rreq_write_to_cache_work+0x135/0x2e0
   process_one_work+0x137/0x2c0
   worker_thread+0x2e9/0x400
   ? __pfx_worker_thread+0x10/0x10
   kthread+0xcc/0x100
   ? __pfx_kthread+0x10/0x10
   ret_from_fork+0x30/0x50
   ? __pfx_kthread+0x10/0x10
   ret_from_fork_asm+0x1b/0x30
   </TASK>
  Modules linked in:
  CR2: 0000000000000008
  ---[ end trace 0000000000000000 ]---

This happened because fscache_cookie_state_machine() was slow and was
still running while another process invoked fscache_unuse_cookie();
this led to a fscache_cookie_lru_do_one() call, setting the
FSCACHE_COOKIE_DO_LRU_DISCARD flag, which was picked up by
fscache_cookie_state_machine(), withdrawing the cookie via
cachefiles_withdraw_cookie(), clearing cookie->cache_priv.

At the same time, yet another process invoked
cachefiles_prepare_write(), which found a NULL pointer in this code
line:

  struct cachefiles_object *object = cachefiles_cres_object(cres);

The next line crashes, obviously:

  struct cachefiles_cache *cache = object->volume->cache;

During cachefiles_prepare_write(), the "n_accesses" counter is
non-zero (via fscache_begin_operation()).  The cookie must not be
withdrawn until it drops to zero.

The counter is checked by fscache_cookie_state_machine() before
switching to FSCACHE_COOKIE_STATE_RELINQUISHING and
FSCACHE_COOKIE_STATE_WITHDRAWING (in "case
FSCACHE_COOKIE_STATE_FAILED"), but not for
FSCACHE_COOKIE_STATE_LRU_DISCARDING ("case
FSCACHE_COOKIE_STATE_ACTIVE").

This patch adds the missing check.  With a non-zero access counter,
the function returns and the next fscache_end_cookie_access() call
will queue another fscache_cookie_state_machine() call to handle the
still-pending FSCACHE_COOKIE_DO_LRU_DISCARD.

Fixes: 12bb21a29c ("fscache: Implement cookie user counting and resource pinning")
Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Link: https://lore.kernel.org/r/20240729162002.3436763-2-dhowells@redhat.com
cc: Jeff Layton <jlayton@kernel.org>
cc: netfs@lists.linux.dev
cc: linux-fsdevel@vger.kernel.org
cc: stable@vger.kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-29 17:30:15 +02:00
Dan Carpenter
fc575212c6 rtla/osnoise: Prevent NULL dereference in error handling
commit 90574d2a675947858b47008df8d07f75ea50d0d0 upstream.

If the "tool->data" allocation fails then there is no need to call
osnoise_free_top() and, in fact, doing so will lead to a NULL dereference.

Cc: stable@vger.kernel.org
Cc: John Kacur <jkacur@redhat.com>
Cc: "Luis Claudio R. Goncalves" <lgoncalv@redhat.com>
Cc: Clark Williams <williams@redhat.com>
Fixes: 1eceb2fc2c ("rtla/osnoise: Add osnoise top mode")
Link: https://lore.kernel.org/f964ed1f-64d2-4fde-ad3e-708331f8f358@stanley.mountain
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-29 17:30:15 +02:00
Andi Shyti
6c8aae7169 i2c: qcom-geni: Add missing geni_icc_disable in geni_i2c_runtime_resume
commit 4e91fa1ef3ce6290b4c598e54b5eb6cf134fbec8 upstream.

Add the missing geni_icc_disable() call before returning in the
geni_i2c_runtime_resume() function.

Commit 9ba48db9f77c ("i2c: qcom-geni: Add missing
geni_icc_disable in geni_i2c_runtime_resume") by Gaosheng missed
disabling the interconnect in one case.

Fixes: bf225ed357 ("i2c: i2c-qcom-geni: Add interconnect support")
Cc: Gaosheng Cui <cuigaosheng1@huawei.com>
Cc: stable@vger.kernel.org # v5.9+
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-29 17:30:15 +02:00
Al Viro
8cad3b2b3a fix bitmap corruption on close_range() with CLOSE_RANGE_UNSHARE
commit 9a2fa1472083580b6c66bdaf291f591e1170123a upstream.

copy_fd_bitmaps(new, old, count) is expected to copy the first
count/BITS_PER_LONG bits from old->full_fds_bits[] and fill
the rest with zeroes.  What it does is copying enough words
(BITS_TO_LONGS(count/BITS_PER_LONG)), then memsets the rest.
That works fine, *if* all bits past the cutoff point are
clear.  Otherwise we are risking garbage from the last word
we'd copied.

For most of the callers that is true - expand_fdtable() has
count equal to old->max_fds, so there's no open descriptors
past count, let alone fully occupied words in ->open_fds[],
which is what bits in ->full_fds_bits[] correspond to.

The other caller (dup_fd()) passes sane_fdtable_size(old_fdt, max_fds),
which is the smallest multiple of BITS_PER_LONG that covers all
opened descriptors below max_fds.  In the common case (copying on
fork()) max_fds is ~0U, so all opened descriptors will be below
it and we are fine, by the same reasons why the call in expand_fdtable()
is safe.

Unfortunately, there is a case where max_fds is less than that
and where we might, indeed, end up with junk in ->full_fds_bits[] -
close_range(from, to, CLOSE_RANGE_UNSHARE) with
	* descriptor table being currently shared
	* 'to' being above the current capacity of descriptor table
	* 'from' being just under some chunk of opened descriptors.
In that case we end up with observably wrong behaviour - e.g. spawn
a child with CLONE_FILES, get all descriptors in range 0..127 open,
then close_range(64, ~0U, CLOSE_RANGE_UNSHARE) and watch dup(0) ending
up with descriptor #128, despite #64 being observably not open.

The minimally invasive fix would be to deal with that in dup_fd().
If this proves to add measurable overhead, we can go that way, but
let's try to fix copy_fd_bitmaps() first.

* new helper: bitmap_copy_and_expand(to, from, bits_to_copy, size).
* make copy_fd_bitmaps() take the bitmap size in words, rather than
bits; it's 'count' argument is always a multiple of BITS_PER_LONG,
so we are not losing any information, and that way we can use the
same helper for all three bitmaps - compiler will see that count
is a multiple of BITS_PER_LONG for the large ones, so it'll generate
plain memcpy()+memset().

Reproducer added to tools/testing/selftests/core/close_range_test.c

Cc: stable@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-29 17:30:15 +02:00
Alexander Lobakin
8cd74c5d5e bitmap: introduce generic optimized bitmap_size()
commit a37fbe666c016fd89e4460d0ebfcea05baba46dc upstream.

The number of times yet another open coded
`BITS_TO_LONGS(nbits) * sizeof(long)` can be spotted is huge.
Some generic helper is long overdue.

Add one, bitmap_size(), but with one detail.
BITS_TO_LONGS() uses DIV_ROUND_UP(). The latter works well when both
divident and divisor are compile-time constants or when the divisor
is not a pow-of-2. When it is however, the compilers sometimes tend
to generate suboptimal code (GCC 13):

48 83 c0 3f          	add    $0x3f,%rax
48 c1 e8 06          	shr    $0x6,%rax
48 8d 14 c5 00 00 00 00	lea    0x0(,%rax,8),%rdx

%BITS_PER_LONG is always a pow-2 (either 32 or 64), but GCC still does
full division of `nbits + 63` by it and then multiplication by 8.
Instead of BITS_TO_LONGS(), use ALIGN() and then divide by 8. GCC:

8d 50 3f             	lea    0x3f(%rax),%edx
c1 ea 03             	shr    $0x3,%edx
81 e2 f8 ff ff 1f    	and    $0x1ffffff8,%edx

Now it shifts `nbits + 63` by 3 positions (IOW performs fast division
by 8) and then masks bits[2:0]. bloat-o-meter:

add/remove: 0/0 grow/shrink: 20/133 up/down: 156/-773 (-617)

Clang does it better and generates the same code before/after starting
from -O1, except that with the ALIGN() approach it uses %edx and thus
still saves some bytes:

add/remove: 0/0 grow/shrink: 9/133 up/down: 18/-538 (-520)

Note that we can't expand DIV_ROUND_UP() by adding a check and using
this approach there, as it's used in array declarations where
expressions are not allowed.
Add this helper to tools/ as well.

Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Acked-by: Yury Norov <yury.norov@gmail.com>
Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-29 17:30:14 +02:00
Alexander Lobakin
bee3a23939 btrfs: rename bitmap_set_bits() -> btrfs_bitmap_set_bits()
commit 4ca532d64648d4776d15512caed3efea05ca7195 upstream.

bitmap_set_bits() does not start with the FS' prefix and may collide
with a new generic helper one day. It operates with the FS-specific
types, so there's no change those two could do the same thing.
Just add the prefix to exclude such possible conflict.

Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Acked-by: David Sterba <dsterba@suse.com>
Reviewed-by: Yury Norov <yury.norov@gmail.com>
Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-29 17:30:14 +02:00
Alexander Lobakin
9ef08da2a3 s390/cio: rename bitmap_size() -> idset_bitmap_size()
commit c1023f5634b9bfcbfff0dc200245309e3cde9b54 upstream.

bitmap_size() is a pretty generic name and one may want to use it for
a generic bitmap API function. At the same time, its logic is not
"generic", i.e. it's not just `nbits -> size of bitmap in bytes`
converter as it would be expected from its name.
Add the prefix 'idset_' used throughout the file where the function
resides.

Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Acked-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-29 17:30:14 +02:00
Alexander Lobakin
2db69eaa3d fs/ntfs3: add prefix to bitmap_size() and use BITS_TO_U64()
commit 3f5ef5109f6a054ce58b3bec7214ed76c9cc269f upstream.

bitmap_size() is a pretty generic name and one may want to use it for
a generic bitmap API function. At the same time, its logic is
NTFS-specific, as it aligns to the sizeof(u64), not the sizeof(long)
(although it uses ideologically right ALIGN() instead of division).
Add the prefix 'ntfs3_' used for that FS (not just 'ntfs_' to not mix
it with the legacy module) and use generic BITS_TO_U64() while at it.

Suggested-by: Yury Norov <yury.norov@gmail.com> # BITS_TO_U64()
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Reviewed-by: Yury Norov <yury.norov@gmail.com>
Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-29 17:30:14 +02:00
Zhihao Cheng
437741eba6 vfs: Don't evict inode under the inode lru traversing context
commit 2a0629834cd82f05d424bbc193374f9a43d1f87d upstream.

The inode reclaiming process(See function prune_icache_sb) collects all
reclaimable inodes and mark them with I_FREEING flag at first, at that
time, other processes will be stuck if they try getting these inodes
(See function find_inode_fast), then the reclaiming process destroy the
inodes by function dispose_list(). Some filesystems(eg. ext4 with
ea_inode feature, ubifs with xattr) may do inode lookup in the inode
evicting callback function, if the inode lookup is operated under the
inode lru traversing context, deadlock problems may happen.

Case 1: In function ext4_evict_inode(), the ea inode lookup could happen
        if ea_inode feature is enabled, the lookup process will be stuck
	under the evicting context like this:

 1. File A has inode i_reg and an ea inode i_ea
 2. getfattr(A, xattr_buf) // i_ea is added into lru // lru->i_ea
 3. Then, following three processes running like this:

    PA                              PB
 echo 2 > /proc/sys/vm/drop_caches
  shrink_slab
   prune_dcache_sb
   // i_reg is added into lru, lru->i_ea->i_reg
   prune_icache_sb
    list_lru_walk_one
     inode_lru_isolate
      i_ea->i_state |= I_FREEING // set inode state
     inode_lru_isolate
      __iget(i_reg)
      spin_unlock(&i_reg->i_lock)
      spin_unlock(lru_lock)
                                     rm file A
                                      i_reg->nlink = 0
      iput(i_reg) // i_reg->nlink is 0, do evict
       ext4_evict_inode
        ext4_xattr_delete_inode
         ext4_xattr_inode_dec_ref_all
          ext4_xattr_inode_iget
           ext4_iget(i_ea->i_ino)
            iget_locked
             find_inode_fast
              __wait_on_freeing_inode(i_ea) ----→ AA deadlock
    dispose_list // cannot be executed by prune_icache_sb
     wake_up_bit(&i_ea->i_state)

Case 2: In deleted inode writing function ubifs_jnl_write_inode(), file
        deleting process holds BASEHD's wbuf->io_mutex while getting the
	xattr inode, which could race with inode reclaiming process(The
        reclaiming process could try locking BASEHD's wbuf->io_mutex in
	inode evicting function), then an ABBA deadlock problem would
	happen as following:

 1. File A has inode ia and a xattr(with inode ixa), regular file B has
    inode ib and a xattr.
 2. getfattr(A, xattr_buf) // ixa is added into lru // lru->ixa
 3. Then, following three processes running like this:

        PA                PB                        PC
                echo 2 > /proc/sys/vm/drop_caches
                 shrink_slab
                  prune_dcache_sb
                  // ib and ia are added into lru, lru->ixa->ib->ia
                  prune_icache_sb
                   list_lru_walk_one
                    inode_lru_isolate
                     ixa->i_state |= I_FREEING // set inode state
                    inode_lru_isolate
                     __iget(ib)
                     spin_unlock(&ib->i_lock)
                     spin_unlock(lru_lock)
                                                   rm file B
                                                    ib->nlink = 0
 rm file A
  iput(ia)
   ubifs_evict_inode(ia)
    ubifs_jnl_delete_inode(ia)
     ubifs_jnl_write_inode(ia)
      make_reservation(BASEHD) // Lock wbuf->io_mutex
      ubifs_iget(ixa->i_ino)
       iget_locked
        find_inode_fast
         __wait_on_freeing_inode(ixa)
          |          iput(ib) // ib->nlink is 0, do evict
          |           ubifs_evict_inode
          |            ubifs_jnl_delete_inode(ib)
          ↓             ubifs_jnl_write_inode
     ABBA deadlock ←-----make_reservation(BASEHD)
                   dispose_list // cannot be executed by prune_icache_sb
                    wake_up_bit(&ixa->i_state)

Fix the possible deadlock by using new inode state flag I_LRU_ISOLATING
to pin the inode in memory while inode_lru_isolate() reclaims its pages
instead of using ordinary inode reference. This way inode deletion
cannot be triggered from inode_lru_isolate() thus avoiding the deadlock.
evict() is made to wait for I_LRU_ISOLATING to be cleared before
proceeding with inode cleanup.

Link: https://lore.kernel.org/all/37c29c42-7685-d1f0-067d-63582ffac405@huaweicloud.com/
Link: https://bugzilla.kernel.org/show_bug.cgi?id=219022
Fixes: e50e5129f3 ("ext4: xattr-in-inode support")
Fixes: 7959cf3a75 ("ubifs: journal: Handle xattrs like files")
Cc: stable@vger.kernel.org
Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
Link: https://lore.kernel.org/r/20240809031628.1069873-1-chengzhihao@huaweicloud.com
Reviewed-by: Jan Kara <jack@suse.cz>
Suggested-by: Jan Kara <jack@suse.cz>
Suggested-by: Mateusz Guzik <mjguzik@gmail.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-29 17:30:14 +02:00
Mikulas Patocka
4296218771 dm persistent data: fix memory allocation failure
commit faada2174c08662ae98b439c69efe3e79382c538 upstream.

kmalloc is unreliable when allocating more than 8 pages of memory. It may
fail when there is plenty of free memory but the memory is fragmented.
Zdenek Kabelac observed such failure in his tests.

This commit changes kmalloc to kvmalloc - kvmalloc will fall back to
vmalloc if the large allocation fails.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
Reviewed-by: Mike Snitzer <snitzer@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-29 17:30:14 +02:00
Khazhismel Kumykov
134e8a34b4 dm resume: don't return EINVAL when signalled
commit 7a636b4f03af9d541205f69e373672e7b2b60a8a upstream.

If the dm_resume method is called on a device that is not suspended, the
method will suspend the device briefly, before resuming it (so that the
table will be swapped).

However, there was a bug that the return value of dm_suspended_md was not
checked. dm_suspended_md may return an error when it is interrupted by a
signal. In this case, do_resume would call dm_swap_table, which would
return -EINVAL.

This commit fixes the logic, so that error returned by dm_suspend is
checked and the resume operation is undone.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Khazhismel Kumykov <khazhy@google.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-29 17:30:14 +02:00
Haibo Xu
29cc21e4cb arm64: ACPI: NUMA: initialize all values of acpi_early_node_map to NUMA_NO_NODE
commit a21dcf0ea8566ebbe011c79d6ed08cdfea771de3 upstream.

Currently, only acpi_early_node_map[0] was initialized to NUMA_NO_NODE.
To ensure all the values were properly initialized, switch to initialize
all of them to NUMA_NO_NODE.

Fixes: e189624916 ("arm64: numa: rework ACPI NUMA initialization")
Cc: <stable@vger.kernel.org> # 4.19.x
Reported-by: Andrew Jones <ajones@ventanamicro.com>
Suggested-by: Andrew Jones <ajones@ventanamicro.com>
Signed-off-by: Haibo Xu <haibo1.xu@intel.com>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Reviewed-by: Hanjun Guo <guohanjun@huawei.com>
Link: https://lore.kernel.org/r/853d7f74aa243f6f5999e203246f0d1ae92d2b61.1722828421.git.haibo1.xu@intel.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-29 17:30:13 +02:00
Nam Cao
66cf236d3a riscv: change XIP's kernel_map.size to be size of the entire kernel
commit 57d76bc51fd80824bcc0c84a5b5ec944f1b51edd upstream.

With XIP kernel, kernel_map.size is set to be only the size of data part of
the kernel. This is inconsistent with "normal" kernel, who sets it to be
the size of the entire kernel.

More importantly, XIP kernel fails to boot if CONFIG_DEBUG_VIRTUAL is
enabled, because there are checks on virtual addresses with the assumption
that kernel_map.size is the size of the entire kernel (these checks are in
arch/riscv/mm/physaddr.c).

Change XIP's kernel_map.size to be the size of the entire kernel.

Signed-off-by: Nam Cao <namcao@linutronix.de>
Cc: <stable@vger.kernel.org> # v6.1+
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Link: https://lore.kernel.org/r/20240508191917.2892064-1-namcao@linutronix.de
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-29 17:30:13 +02:00
Stefan Haberland
0a228896a1 s390/dasd: fix error recovery leading to data corruption on ESE devices
commit 7db4042336580dfd75cb5faa82c12cd51098c90b upstream.

Extent Space Efficient (ESE) or thin provisioned volumes need to be
formatted on demand during usual IO processing.

The dasd_ese_needs_format function checks for error codes that signal
the non existence of a proper track format.

The check for incorrect length is to imprecise since other error cases
leading to transport of insufficient data also have this flag set.
This might lead to data corruption in certain error cases for example
during a storage server warmstart.

Fix by removing the check for incorrect length and replacing by
explicitly checking for invalid track format in transport mode.

Also remove the check for file protected since this is not a valid
ESE handling case.

Cc: stable@vger.kernel.org # 5.3+
Fixes: 5e2b17e712 ("s390/dasd: Add dynamic formatting support for ESE volumes")
Reviewed-by: Jan Hoeppner <hoeppner@linux.ibm.com>
Signed-off-by: Stefan Haberland <sth@linux.ibm.com>
Link: https://lore.kernel.org/r/20240812125733.126431-3-sth@linux.ibm.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-29 17:30:13 +02:00
Mika Westerberg
80ac8d1948 thunderbolt: Mark XDomain as unplugged when router is removed
commit e2006140ad2e01a02ed0aff49cc2ae3ceeb11f8d upstream.

I noticed that when we do discrete host router NVM upgrade and it gets
hot-removed from the PCIe side as a result of NVM firmware authentication,
if there is another host connected with enabled paths we hang in tearing
them down. This is due to fact that the Thunderbolt networking driver
also tries to cleanup the paths and ends up blocking in
tb_disconnect_xdomain_paths() waiting for the domain lock.

However, at this point we already cleaned the paths in tb_stop() so
there is really no need for tb_disconnect_xdomain_paths() to do that
anymore. Furthermore it already checks if the XDomain is unplugged and
bails out early so take advantage of that and mark the XDomain as
unplugged when we remove the parent router.

Cc: stable@vger.kernel.org
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-29 17:30:13 +02:00
Mathias Nyman
5ad898ae82 xhci: Fix Panther point NULL pointer deref at full-speed re-enumeration
commit af8e119f52e9c13e556be9e03f27957554a84656 upstream.

re-enumerating full-speed devices after a failed address device command
can trigger a NULL pointer dereference.

Full-speed devices may need to reconfigure the endpoint 0 Max Packet Size
value during enumeration. Usb core calls usb_ep0_reinit() in this case,
which ends up calling xhci_configure_endpoint().

On Panther point xHC the xhci_configure_endpoint() function will
additionally check and reserve bandwidth in software. Other hosts do
this in hardware

If xHC address device command fails then a new xhci_virt_device structure
is allocated as part of re-enabling the slot, but the bandwidth table
pointers are not set up properly here.
This triggers the NULL pointer dereference the next time usb_ep0_reinit()
is called and xhci_configure_endpoint() tries to check and reserve
bandwidth

[46710.713538] usb 3-1: new full-speed USB device number 5 using xhci_hcd
[46710.713699] usb 3-1: Device not responding to setup address.
[46710.917684] usb 3-1: Device not responding to setup address.
[46711.125536] usb 3-1: device not accepting address 5, error -71
[46711.125594] BUG: kernel NULL pointer dereference, address: 0000000000000008
[46711.125600] #PF: supervisor read access in kernel mode
[46711.125603] #PF: error_code(0x0000) - not-present page
[46711.125606] PGD 0 P4D 0
[46711.125610] Oops: Oops: 0000 [#1] PREEMPT SMP PTI
[46711.125615] CPU: 1 PID: 25760 Comm: kworker/1:2 Not tainted 6.10.3_2 #1
[46711.125620] Hardware name: Gigabyte Technology Co., Ltd.
[46711.125623] Workqueue: usb_hub_wq hub_event [usbcore]
[46711.125668] RIP: 0010:xhci_reserve_bandwidth (drivers/usb/host/xhci.c

Fix this by making sure bandwidth table pointers are set up correctly
after a failed address device command, and additionally by avoiding
checking for bandwidth in cases like this where no actual endpoints are
added or removed, i.e. only context for default control endpoint 0 is
evaluated.

Reported-by: Karel Balej <balejk@matfyz.cz>
Closes: https://lore.kernel.org/linux-usb/D3CKQQAETH47.1MUO22RTCH2O3@matfyz.cz/
Cc: stable@vger.kernel.org
Fixes: 651aaf36a7 ("usb: xhci: Handle USB transaction error on address command")
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20240815141117.2702314-2-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-29 17:30:13 +02:00
Juan José Arboleda
1f7242682a ALSA: usb-audio: Support Yamaha P-125 quirk entry
commit c286f204ce6ba7b48e3dcba53eda7df8eaa64dd9 upstream.

This patch adds a USB quirk for the Yamaha P-125 digital piano.

Signed-off-by: Juan José Arboleda <soyjuanarbol@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://patch.msgid.link/20240813161053.70256-1-soyjuanarbol@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-29 17:30:13 +02:00
Lianqin Hu
a1de71b2ef ALSA: usb-audio: Add delay quirk for VIVO USB-C-XE710 HEADSET
commit 004eb8ba776ccd3e296ea6f78f7ae7985b12824e upstream.

Audio control requests that sets sampling frequency sometimes fail on
this card. Adding delay between control messages eliminates that problem.

Signed-off-by: Lianqin Hu <hulianqin@vivo.com>
Cc: <stable@vger.kernel.org>
Link: https://patch.msgid.link/TYUPR06MB6217FF67076AF3E49E12C877D2842@TYUPR06MB6217.apcprd06.prod.outlook.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-29 17:30:13 +02:00
Eli Billauer
4267131278 char: xillybus: Check USB endpoints when probing device
commit 2374bf7558de915edc6ec8cb10ec3291dfab9594 upstream.

Ensure, as the driver probes the device, that all endpoints that the
driver may attempt to access exist and are of the correct type.

All XillyUSB devices must have a Bulk IN and Bulk OUT endpoint at
address 1. This is verified in xillyusb_setup_base_eps().

On top of that, a XillyUSB device may have additional Bulk OUT
endpoints. The information about these endpoints' addresses is deduced
from a data structure (the IDT) that the driver fetches from the device
while probing it. These endpoints are checked in setup_channels().

A XillyUSB device never has more than one IN endpoint, as all data
towards the host is multiplexed in this single Bulk IN endpoint. This is
why setup_channels() only checks OUT endpoints.

Reported-by: syzbot+eac39cba052f2e750dbe@syzkaller.appspotmail.com
Cc: stable <stable@kernel.org>
Closes: https://lore.kernel.org/all/0000000000001d44a6061f7a54ee@google.com/T/
Fixes: a53d1202ae ("char: xillybus: Add driver for XillyUSB (Xillybus variant for USB)").
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Link: https://lore.kernel.org/r/20240816070200.50695-2-eli.billauer@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-29 17:30:12 +02:00
Eli Billauer
c83d9f2d89 char: xillybus: Refine workqueue handling
commit ad899c301c880766cc709aad277991b3ab671b66 upstream.

As the wakeup work item now runs on a separate workqueue, it needs to be
flushed separately along with flushing the device's workqueue.

Also, move the destroy_workqueue() call to the end of the exit method,
so that deinitialization is done in the opposite order of
initialization.

Fixes: ccbde4b128ef ("char: xillybus: Don't destroy workqueue from work item running on it")
Cc: stable <stable@kernel.org>
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Link: https://lore.kernel.org/r/20240816070200.50695-1-eli.billauer@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-29 17:30:12 +02:00
Eli Billauer
5d3567caff char: xillybus: Don't destroy workqueue from work item running on it
commit ccbde4b128ef9c73d14d0d7817d68ef795f6d131 upstream.

Triggered by a kref decrement, destroy_workqueue() may be called from
within a work item for destroying its own workqueue. This illegal
situation is averted by adding a module-global workqueue for exclusive
use of the offending work item. Other work items continue to be queued
on per-device workqueues to ensure performance.

Reported-by: syzbot+91dbdfecdd3287734d8e@syzkaller.appspotmail.com
Cc: stable <stable@kernel.org>
Closes: https://lore.kernel.org/lkml/0000000000000ab25a061e1dfe9f@google.com/
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Link: https://lore.kernel.org/r/20240801121126.60183-1-eli.billauer@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-29 17:30:12 +02:00
Jann Horn
8314335277 fuse: Initialize beyond-EOF page contents before setting uptodate
commit 3c0da3d163eb32f1f91891efaade027fa9b245b9 upstream.

fuse_notify_store(), unlike fuse_do_readpage(), does not enable page
zeroing (because it can be used to change partial page contents).

So fuse_notify_store() must be more careful to fully initialize page
contents (including parts of the page that are beyond end-of-file)
before marking the page uptodate.

The current code can leave beyond-EOF page contents uninitialized, which
makes these uninitialized page contents visible to userspace via mmap().

This is an information leak, but only affects systems which do not
enable init-on-alloc (via CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y or the
corresponding kernel command line parameter).

Link: https://bugs.chromium.org/p/project-zero/issues/detail?id=2574
Cc: stable@kernel.org
Fixes: a1d75f2582 ("fuse: add store request")
Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-29 17:30:12 +02:00
Mathieu Othacehe
135136ba14 tty: atmel_serial: use the correct RTS flag.
commit c9f6613b16123989f2c3bd04b1d9b2365d6914e7 upstream.

In RS485 mode, the RTS pin is driven high by hardware when the transmitter
is operating. This behaviour cannot be changed. This means that the driver
should claim that it supports SER_RS485_RTS_ON_SEND and not
SER_RS485_RTS_AFTER_SEND.

Otherwise, when configuring the port with the SER_RS485_RTS_ON_SEND, one
get the following warning:

kern.warning kernel: atmel_usart_serial atmel_usart_serial.2.auto:
ttyS1 (1): invalid RTS setting, using RTS_AFTER_SEND instead

which is contradictory with what's really happening.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
Cc: stable <stable@kernel.org>
Tested-by: Alexander Dahl <ada@thorsis.com>
Fixes: af47c491e3 ("serial: atmel: Fill in rs485_supported")
Link: https://lore.kernel.org/r/20240808060637.19886-1-othacehe@gnu.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-29 17:30:12 +02:00
Greg Kroah-Hartman
47b24bf8ea Revert "net/sched: fix false lockdep warning on qdisc root lock"
This reverts commit 048b33817a which is
commit af0cb3fa3f9ed258d14abab0152e28a0f9593084 upstream.

It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.

Bug: 161946584
Change-Id: I1a0434ee7eb3b2ff625e5eba9a7d9547452f0bb3
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-08-28 07:54:10 +00:00
Greg Kroah-Hartman
0a6ad70f07 Revert "net/sched: unregister lockdep keys in qdisc_create/qdisc_alloc error path"
This reverts commit 48d3f91d83 which is
commit 86735b57c905e775f05de995df35379366b72168 upstream.

It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.

Bug: 161946584
Change-Id: Icdc66b3ac841d0fb5e94250153a3dc02b14ea750
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-08-28 07:54:10 +00:00
Greg Kroah-Hartman
325f5b8ed9 Revert "tty: add the option to have a tty reject a new ldisc"
This reverts commit 3c6332f3bb which is
commit 6bd23e0c2bb6c65d4f5754d1456bc9a4427fc59b upstream.

It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.

Bug: 161946584
Change-Id: Ia8d68d62f97da2536404bfb439f2db596033260f
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-08-28 07:54:10 +00:00
Greg Kroah-Hartman
7455bf543f Merge 6.1.96 into android14-6.1-lts
Changes in 6.1.96
	padata: Disable BH when taking works lock on MT path
	crypto: hisilicon/sec - Fix memory leak for sec resource release
	io_uring/sqpoll: work around a potential audit memory leak
	rcutorture: Fix rcu_torture_one_read() pipe_count overflow comment
	rcutorture: Make stall-tasks directly exit when rcutorture tests end
	rcutorture: Fix invalid context warning when enable srcu barrier testing
	block/ioctl: prefer different overflow check
	selftests/bpf: Prevent client connect before server bind in test_tc_tunnel.sh
	selftests/bpf: Fix flaky test btf_map_in_map/lookup_update
	batman-adv: bypass empty buckets in batadv_purge_orig_ref()
	wifi: ath9k: work around memset overflow warning
	af_packet: avoid a false positive warning in packet_setsockopt()
	drop_monitor: replace spin_lock by raw_spin_lock
	scsi: qedi: Fix crash while reading debugfs attribute
	net/sched: fix false lockdep warning on qdisc root lock
	kselftest: arm64: Add a null pointer check
	net: dsa: realtek: keep default LED state in rtl8366rb
	netpoll: Fix race condition in netpoll_owner_active
	wifi: mt76: mt7921s: fix potential hung tasks during chip recovery
	HID: Add quirk for Logitech Casa touchpad
	HID: asus: fix more n-key report descriptors if n-key quirked
	Bluetooth: ath3k: Fix multiple issues reported by checkpatch.pl
	drm/amd/display: Exit idle optimizations before HDCP execution
	platform/x86: toshiba_acpi: Add quirk for buttons on Z830
	ASoC: Intel: sof_sdw: add JD2 quirk for HP Omen 14
	drm/lima: add mask irq callback to gp and pp
	drm/lima: mask irqs in timeout path before hard reset
	ALSA: hda/realtek: Add quirks for Lenovo 13X
	powerpc/pseries: Enforce hcall result buffer validity and size
	powerpc/io: Avoid clang null pointer arithmetic warnings
	platform/x86: p2sb: Don't init until unassigned resources have been assigned
	power: supply: cros_usbpd: provide ID table for avoiding fallback match
	iommu/arm-smmu-v3: Free MSIs in case of ENOMEM
	f2fs: remove clear SB_INLINECRYPT flag in default_options
	usb: misc: uss720: check for incompatible versions of the Belkin F5U002
	Avoid hw_desc array overrun in dw-axi-dmac
	usb: dwc3: pci: Don't set "linux,phy_charger_detect" property on Lenovo Yoga Tab2 1380
	udf: udftime: prevent overflow in udf_disk_stamp_to_time()
	PCI/PM: Avoid D3cold for HP Pavilion 17 PC/1972 PCIe Ports
	MIPS: Octeon: Add PCIe link status check
	serial: imx: Introduce timeout when waiting on transmitter empty
	serial: exar: adding missing CTI and Exar PCI ids
	usb: gadget: function: Remove usage of the deprecated ida_simple_xx() API
	tty: add the option to have a tty reject a new ldisc
	MIPS: Routerboard 532: Fix vendor retry check code
	mips: bmips: BCM6358: make sure CBR is correctly set
	tracing: Build event generation tests only as modules
	ALSA: hda/realtek: Remove Framework Laptop 16 from quirks
	ALSA/hda: intel-dsp-config: Document AVS as dsp_driver option
	ice: move RDMA init to ice_idc.c
	ice: avoid IRQ collision to fix init failure on ACPI S3 resume
	cipso: fix total option length computation
	bpf: Avoid splat in pskb_pull_reason
	ALSA: hda/realtek: Enable headset mic on IdeaPad 330-17IKB 81DM
	netrom: Fix a memory leak in nr_heartbeat_expiry()
	ipv6: prevent possible NULL deref in fib6_nh_init()
	ipv6: prevent possible NULL dereference in rt6_probe()
	xfrm6: check ip6_dst_idev() return value in xfrm6_get_saddr()
	netns: Make get_net_ns() handle zero refcount net
	qca_spi: Make interrupt remembering atomic
	net: lan743x: disable WOL upon resume to restore full data path operation
	net: lan743x: Support WOL at both the PHY and MAC appropriately
	net: phy: mxl-gpy: enhance delay time required by loopback disable function
	net: phy: mxl-gpy: Remove interrupt mask clearing from config_init
	net/sched: act_api: rely on rcu in tcf_idr_check_alloc
	net/sched: act_api: fix possible infinite loop in tcf_idr_check_alloc()
	tipc: force a dst refcount before doing decryption
	sched: act_ct: add netns into the key of tcf_ct_flow_table
	ptp: fix integer overflow in max_vclocks_store
	net: stmmac: No need to calculate speed divider when offload is disabled
	virtio_net: checksum offloading handling fix
	octeontx2-pf: Add error handling to VLAN unoffload handling
	netfilter: ipset: Fix suspicious rcu_dereference_protected()
	seg6: fix parameter passing when calling NF_HOOK() in End.DX4 and End.DX6 behaviors
	ice: Fix VSI list rule with ICE_SW_LKUP_LAST type
	bnxt_en: Restore PTP tx_avail count in case of skb_pad() error
	net: usb: rtl8150 fix unintiatilzed variables in rtl8150_get_link_ksettings
	regulator: core: Fix modpost error "regulator_get_regmap" undefined
	dmaengine: idxd: Fix possible Use-After-Free in irq_process_work_list
	dmaengine: ioat: Drop redundant pci_enable_pcie_error_reporting()
	dmaengine: ioatdma: Fix leaking on version mismatch
	dmaengine: ioat: use PCI core macros for PCIe Capability
	dmaengine: ioatdma: Fix error path in ioat3_dma_probe()
	dmaengine: ioatdma: Fix kmemleak in ioat_pci_probe()
	dmaengine: ioatdma: Fix missing kmem_cache_destroy()
	regulator: bd71815: fix ramp values
	arm64: dts: imx93-11x11-evk: Remove the 'no-sdio' property
	arm64: dts: freescale: imx8mm-verdin: enable hysteresis on slow input pin
	ACPICA: Revert "ACPICA: avoid Info: mapping multiple BARs. Your kernel is fine."
	firmware: psci: Fix return value from psci_system_suspend()
	RDMA/mlx5: Add check for srq max_sge attribute
	kbuild: Remove support for Clang's ThinLTO caching
	MIPS: dts: bcm63268: Add missing properties to the TWD node
	net: stmmac: Assign configured channel value to EXTTS event
	net: usb: ax88179_178a: improve reset check
	net: do not leave a dangling sk pointer, when socket creation fails
	btrfs: retry block group reclaim without infinite loop
	cifs: fix typo in module parameter enable_gcm_256
	KVM: Fix a data race on last_boosted_vcpu in kvm_vcpu_on_spin()
	KVM: arm64: Disassociate vcpus from redistributor region on teardown
	KVM: x86: Always sync PIR to IRR prior to scanning I/O APIC routes
	ALSA: hda/realtek: fix mute/micmute LEDs don't work for ProBook 445/465 G11.
	ALSA: hda/realtek: Limit mic boost on N14AP7
	drm/i915/mso: using joiner is not possible with eDP MSO
	drm/radeon: fix UBSAN warning in kv_dpm.c
	drm/amdgpu: fix UBSAN warning in kv_dpm.c
	gcov: add support for GCC 14
	kcov: don't lose track of remote references during softirqs
	mm: mmap: allow for the maximum number of bits for randomizing mmap_base by default
	tcp: clear tp->retrans_stamp in tcp_rcv_fastopen_synack()
	mm/page_table_check: fix crash on ZONE_DEVICE
	i2c: ocores: set IACK bit after core is enabled
	dt-bindings: i2c: google,cros-ec-i2c-tunnel: correct path to i2c-controller schema
	spi: stm32: qspi: Fix dual flash mode sanity test in stm32_qspi_setup()
	arm64: dts: imx8qm-mek: fix gpio number for reg_usdhc2_vmmc
	spi: stm32: qspi: Clamp stm32_qspi_get_mode() output to CCR_BUSWIDTH_4
	perf: script: add raw|disasm arguments to --insn-trace option
	perf script: Show also errors for --insn-trace option
	ARM: dts: samsung: smdkv310: fix keypad no-autorepeat
	ARM: dts: samsung: exynos4412-origen: fix keypad no-autorepeat
	ARM: dts: samsung: smdk4412: fix keypad no-autorepeat
	pmdomain: ti-sci: Fix duplicate PD referrals
	tracing: Add MODULE_DESCRIPTION() to preemptirq_delay_test
	x86/cpu/vfm: Add new macros to work with (vendor/family/model) values
	x86/cpu: Fix x86_match_cpu() to match just X86_VENDOR_INTEL
	Revert "kheaders: substituting --sort in archive creation"
	kheaders: explicitly define file modes for archived headers
	drm/amd/display: revert Exit idle optimizations before HDCP execution
	net/sched: unregister lockdep keys in qdisc_create/qdisc_alloc error path
	hid: asus: asus_report_fixup: fix potential read out of bounds
	Revert "mm: mmap: allow for the maximum number of bits for randomizing mmap_base by default"
	Linux 6.1.96

Change-Id: I55dfcaa259f72fd6c57ec6efca60bed3e3abbd43
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-08-28 07:54:10 +00:00
Venkata Rao Kakani
3bb5a64ae9 ANDROID: Update the ABI symbol list
Adding the following symbols:
 - arch_invalidate_pmem

Bug: 361447064
Change-Id: Iaa479a803f695da5196b935c6ace261187d60816
Signed-off-by: Venkata Rao Kakani <quic_vkakani@quicinc.com>
2024-08-27 21:56:17 +00:00
Rick Yiu
6cbdf0e239 ANDROID: Update the ABI symbol list
Adding the following symbols:
  - thermal_cooling_device_register
  - __traceiter_android_vh_set_task_comm
  - __tracepoint_android_vh_set_task_comm

Bug: 357956265
Change-Id: I05890339903e11e23743b94ab81c669e0774860a
Signed-off-by: Rick Yiu <rickyiu@google.com>
2024-08-27 18:43:18 +00:00
Seiya Wang
25641a61ba ANDROID: GKI: Update symbol list for mtk
2 function symbol(s) added
  'int devm_rproc_add(struct device*, struct rproc*)'
  'struct rproc* devm_rproc_alloc(struct device*, const char*, const struct rproc_ops*, const char*, int)'

Bug: 361691226
Change-Id: Ifc5f86d8443f0495dd576c654b9fd9936bd449f7
Signed-off-by: Seiya Wang <seiya.wang@mediatek.com>
2024-08-27 18:03:20 +00:00
Will Deacon
82b9eb64eb FROMGIT: KVM: arm64: Ensure TLBI uses correct VMID after changing context
When the target context passed to enter_vmid_context() matches the
current running context, the function returns early without manipulating
the registers of the stage-2 MMU. This can result in a stale VMID due to
the lack of an ISB instruction in exit_vmid_context() after writing the
VTTBR when ARM64_WORKAROUND_SPECULATIVE_AT is not enabled.

For example, with pKVM enabled:

	// Initially running in host context
	enter_vmid_context(guest);
		-> __load_stage2(guest); isb	// Writes VTCR & VTTBR
	exit_vmid_context(guest);
		-> __load_stage2(host);		// Restores VTCR & VTTBR

	enter_vmid_context(host);
		-> Returns early as we're already in host context
	tlbi vmalls12e1is	// !!! Can use the stale VMID as we
				// haven't performed context
				// synchronisation since restoring
				// VTTBR.VMID

Add an unconditional ISB instruction to exit_vmid_context() after
restoring the VTTBR. This already existed for the
ARM64_WORKAROUND_SPECULATIVE_AT path, so we can simply hoist that onto
the common path.

Cc: Marc Zyngier <maz@kernel.org>
Cc: Oliver Upton <oliver.upton@linux.dev>
Cc: Fuad Tabba <tabba@google.com>
Fixes: 58f3b0fc3b87 ("KVM: arm64: Support TLB invalidation in guest context")
Signed-off-by: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20240814123429.20457-3-will@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
(cherry picked from commit ed49fe5a6fb9c1a1bbbf4b5b648c7d34a756cb6d
 kvmarm/next)
Bug: 311571169
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I1612ebdc5625e44694897f2c5b26fe38cdaa3179
2024-08-27 11:59:44 +00:00
Will Deacon
9920d2584e FROMGIT: KVM: arm64: Invalidate EL1&0 TLB entries for all VMIDs in nvhe hyp init
When initialising the nVHE hypervisor, we invalidate potentially stale
TLB entries for the EL1&0 regime using a 'vmalls12e1' invalidation.
However, this invalidation operation applies only to the active VMID
and therefore we could proceed with stale TLB entries for other VMIDs.

Replace the operation with an 'alle1' which applies to all entries for
the EL1&0 regime, regardless of the VMID.

Cc: Marc Zyngier <maz@kernel.org>
Cc: Oliver Upton <oliver.upton@linux.dev>
Fixes: 1025c8c0c6 ("KVM: arm64: Wrap the host with a stage 2")
Signed-off-by: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20240814123429.20457-2-will@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
(cherry picked from commit dc0dddb1d66de88c571cf1a5bc3b484521a578af
 kvmarm/next)
Bug: 311571169
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: Ib116a4b3b08501e84340ce63ea6cded67824c7aa
2024-08-27 11:59:44 +00:00
Will Deacon
1a48a88fcb FROMGIT: BACKPORT: KVM: arm64: Don't pass a TLBI level hint when zapping table entries
commit 36e008323926036650299cfbb2dca704c7aba849 upstream.

The TLBI level hints are for leaf entries only, so take care not to pass
them incorrectly after clearing a table entry.

Cc: Gavin Shan <gshan@redhat.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Quentin Perret <qperret@google.com>
Fixes: 82bb02445d ("KVM: arm64: Implement kvm_pgtable_hyp_unmap() at EL2")
Fixes: 6d9d2115c4 ("KVM: arm64: Add support for stage-2 map()/unmap() in generic page-table")
Reviewed-by: Shaoqin Huang <shahuang@redhat.com>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20240327124853.11206-3-will@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Cc: <stable@vger.kernel.org> # 6.1.y only
[will@: Use '0' instead of TLBI_TTL_UNKNOWN_to indicate "no level". Force
        level to 0 in stage2_put_pte() if we're clearing a table entry.]
Signed-off-by: Will Deacon <will@kernel.org>
(cherry picked from commit 298e875b36
 stable/linux-6.1.y)
Bug: 311571169
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: Icefe7099ccf03c4ba96e395dfc225f0015e3fccc
2024-08-27 11:59:44 +00:00
Greg Kroah-Hartman
02fcfc12fc Merge tag 'android14-6.1.93_r00' into android14-6.1
This merges up to the 6.1.93 LTS release into android14-6.1.  Included
in here are the following commits:

* 9d37e2aae7 ANDROID: add __module_get to db854c symbol list.
* 5ccfb1bf19 Revert "drm/mipi-dsi: use correct return type for the DSC functions"
* d201efdaa4 Revert "media: cec: core: avoid recursive cec_claim_log_addrs"
* dcb51feb27 Revert "Bluetooth: compute LE flow credits based on recvbuf space"
*   a4d90a8f3c Merge 6.1.93 into android14-6.1-lts
|\
| * ae9f2a70d6 Linux 6.1.93
| * ec5c95f0e7 net: ena: Fix DMA syncing in XDP path when SWIOTLB is on
| * ceab795a67 ALSA: timer: Set lower bound of start tick time
| * ea22d4195c riscv: prevent pt_regs corruption for secondary idle threads
| * b2c98bec4d hwmon: (shtc1) Fix property misspelling
| * 786d1639db powerpc/pseries/lparcfg: drop error message from guest name lookup
| * cb53706a34 ipvlan: Dont Use skb->sk in ipvlan_process_v{4,6}_outbound
| * f694cc31e7 net: ena: Fix redundant device NUMA node override
| * 3bb51b20dd net: ena: Reduce lines with longer column width boundary
| * d230da7d5d net: ena: Add dynamic recycling mechanism for rx buffers
| * 852035aba3 net: dsa: microchip: fix RGMII error in KSZ DSA driver
| * 0e355a3ce2 spi: stm32: Don't warn about spurious interrupts
| * 0713e0d191 drm/i915/guc: avoid FIELD_PREP warning
| * 4b338844af kconfig: fix comparison to constant symbols, 'm', 'n'
| * c98af7fd2f netfilter: nft_fib: allow from forward/input without iif selector
| * caf3a8afb5 netfilter: tproxy: bail out if IP has been disabled on the device
| * e017b87660 netfilter: nft_payload: skbuff vlan metadata mangle support
| * cffee0b578 netfilter: nft_payload: rebuild vlan header on h_proto access
| * 96f261d56c netfilter: nft_payload: rebuild vlan header when needed
| * de47cbfc86 netfilter: nft_payload: move struct nft_payload_set definition where it belongs
| * 07cbc55120 ice: fix accounting if a VLAN already exists
| * 50bb204a6b net:fec: Add fec_enet_deinit()
| * 6693b172f0 bpf: Allow delete from sockmap/sockhash only if update is allowed
| * f52bb074e4 net: usb: smsc95xx: fix changing LED_SEL bit value updated from EEPROM
| * ba61b44379 af_unix: Read sk->sk_hash under bindlock during bind().
| * 7077c22f84 enic: Validate length of nl attributes in enic_set_vf_port
| * ce913fd361 ALSA: hda/realtek: Adjust G814JZR to use SPI init for amp
| * 995f447cd3 ALSA: hda/realtek: Amend G634 quirk to enable rear speakers
| * ac35c81bcb ALSA: hda/realtek: Add quirk for ASUS ROG G634Z
| * 1834922d44 ALSA: core: Remove debugfs at disconnection
| * a8dda2c105 ALSA: jack: Use guard() for locking
| * 105624d7f6 bpf: Fix potential integer overflow in resolve_btfids
| * 242b304668 dma-buf/sw-sync: don't enable IRQ from sync_print_obj()
| * 42c79364df net/mlx5e: Fix UDP GSO for encapsulated packets
| * 3aa5734570 net/mlx5e: Use rx_missed_errors instead of rx_dropped for reporting buffer exhaustion
| * 1b4ab44129 net/mlx5e: Fix IPsec tunnel mode offload feature check
| * 666e19a247 net/mlx5: Lag, do bond only if slaves agree on roce state
| * 25222a9899 net: phy: micrel: set soft_reset callback to genphy_soft_reset for KSZ8061
| * ca7ad37b60 nvmet: fix ns enable/disable possible hang
| * 8e1ba9df9a dma-mapping: benchmark: handle NUMA_NO_NODE correctly
| * c57874265a dma-mapping: benchmark: fix node id validation
| * 729fdbfc18 spi: Don't mark message DMA mapped when no transfer in it is
| * 8dfcd7780d netfilter: nft_payload: restore vlan q-in-q match support
| * 68f40354a3 netfilter: nfnetlink_queue: acquire rcu_read_lock() in instance_destroy_rcu()
| * 5ef3a27c61 ice: Interpret .set_channels() input differently
| * 5d626f2b87 drivers/xen: Improve the late XenStore init protocol
| * 8d65890c94 nfc: nci: Fix handling of zero-length payload packets in nci_rx_work()
| * 20c4691a06 nfc: nci: Fix kcov check in nci_rx_work()
| * c09ddc6058 net: relax socket state check at accept time.
| * e1e80e7ff2 inet: factor out locked section of inet_accept() in a new helper
| * 335c8f1566 tls: fix missing memory barrier in tls_init
| * 4f11834e6b net: fec: avoid lock evasion when reading pps_enable
| * eeae2526e8 Revert "ixgbe: Manual AN-37 for troublesome link partners for X550 SFI"
| * 2ae3749f37 riscv: stacktrace: fixed walk_stackframe()
| * 62bcc5c9f5 riscv: stacktrace: Make walk_stackframe cross pt_regs frame
| * abf001651a virtio: delete vq in vp_find_vqs_msix() when request_irq() fails
| * e63c10851f rv: Update rv_en(dis)able_monitor doc to match kernel-doc
| * 3fd487ffaa arm64: asm-bug: Add .align 2 to the end of __BUG_ENTRY
| * b4ff9af8e7 openvswitch: Set the skbuff pkt_type for proper pmtud support.
| * 1d20ba6017 pNFS/filelayout: fixup pNfs allocation modes
| * e65d13ec00 tcp: Fix shift-out-of-bounds in dctcp_update_alpha().
| * 599a565421 ipv6: sr: fix memleak in seg6_hmac_init_algo
| * 4bf6964451 af_unix: Update unix_sk(sk)->oob_skb under sk_receive_queue lock.
| * cdc0234964 rpcrdma: fix handling for RDMA_CM_EVENT_DEVICE_REMOVAL
| * 3c92f3a59d sunrpc: fix NFSACL RPC retry on soft mount
| * 99530e42e1 nfs: keep server info for remounts
| * b72a3a25c2 NFSv4: Fixup smatch warning for ambiguous return
| * 7995b66f4f ASoC: tas2552: Add TX path for capturing AUDIO-OUT data
| * e8c8e0d0d2 nfc: nci: Fix uninit-value in nci_rx_work
| * 47c5707d44 selftests: net: kill smcrouted in the cleanup logic in amt.sh
| * 8f1fc3b86e ipv6: sr: fix missing sk_buff release in seg6_input_core
| * d2223fd3dd net: Always descend into dsa/ folder with CONFIG_NET_DSA enabled
| * fde26c4ae3 x86/kconfig: Select ARCH_WANT_FRAME_POINTERS again when UNWINDER_FRAME_POINTER=y
| * f23f182baa perf/arm-dmc620: Fix lockdep assert in ->event_init()
| * e9774d1531 regulator: bd71828: Don't overwrite runtime voltages
| * 60c406bb08 ASoC: mediatek: mt8192: fix register configuration for tdm
| * 191dc1b2ff ALSA: hda/cs_dsp_ctl: Use private_free for control cleanup
| * 1056e52028 null_blk: Fix the WARNING: modpost: missing MODULE_DESCRIPTION()
| * 247849eeb3 drm/msm/a6xx: Avoid a nullptr dereference when speedbin setting fails
| * 7904aee9cc drm/msm: Enable clamp_to_idle for 7c3
| * ac9de7b29e Revert "drm/bridge: ti-sn65dsi83: Fix enable error path"
| * 3f56c18a39 media: cec: core: avoid confusing "transmit timed out" message
| * 302077d270 media: cec: core: avoid recursive cec_claim_log_addrs
| * 6d6ddabcec media: cec: cec-api: add locking in cec_release()
| * 1e1e7a6ec2 media: cec: cec-adap: always cancel work in cec_transmit_msg_fh
| * a19d05e18d media: sunxi: a83-mips-csi2: also select GENERIC_PHY
| * 1ffee510fa um: Fix the declaration of kasan_map_memory
| * 68bc383a75 um: Fix the -Wmissing-prototypes warning for get_thread_reg
| * b6eda6dee3 um: Fix the -Wmissing-prototypes warning for __switch_mm
| * 1d168e682c powerpc/pseries: Add failure related checks for h_get_mpp and h_get_ppp
| * 64c0cbc5a5 media: flexcop-usb: fix sanity check of bNumEndpoints
| * 9400caf566 Input: cyapa - add missing input core locking to suspend/resume functions
| * 4693aea93c scsi: qla2xxx: Replace all non-returning strlcpy() with strscpy()
| * b504518a39 media: stk1160: fix bounds checking in stk1160_copy_video()
| * fe1d4a8a60 drm/bridge: tc358775: fix support for jeida-18 and jeida-24
| * 3839a9b19a fs/ntfs3: Use variable length array instead of fixed size
| * 98db3155b5 fs/ntfs3: Use 64 bit variable to avoid 32 bit overflow
| * 42c5571981 um: vector: fix bpfflash parameter evaluation
| * 0c02d425a2 um: Add winch to winch_handlers before registering winch IRQ
| * a62a85b29c um: Fix return value in ubd_init()
| * a9ef192c48 drm/mediatek: dp: Fix mtk_dp_aux_transfer return value
| * 93ac25c29f drm/mediatek: dp: Add support for embedded DisplayPort aux-bus
| * a5bd618458 drm/mediatek: dp: Move PHY registration to new function
| * 0f2c694d69 drm/msm/dpu: Always flush the slave INTF on the CTL
| * 5e3aa39154 drm/msm/dsi: Print dual-DSI-adjusted pclk instead of original mode pclk
| * ce0503f825 Input: pm8xxx-vibrator - correct VIB_MAX_LEVELS calculation
| * a8951a036b mmc: sdhci_am654: Fix ITAPDLY for HS400 timing
| * 2251a6af08 mmc: sdhci_am654: Add ITAPDLYSEL in sdhci_j721e_4bit_set_clock
| * 3465401e7e mmc: sdhci_am654: Add OTAP/ITAP delay enable
| * 9b8590cb9f mmc: sdhci_am654: Drop lookup for deprecated ti,otap-del-sel
| * 3eb2922ba9 mmc: sdhci_am654: Write ITAPDLY for DDR52 timing
| * 3c436cc8ab mmc: sdhci_am654: Add tuning algorithm for delay chain
| * f172f4fa22 Input: ioc3kbd - add device table
| * 767daf9c71 Input: ioc3kbd - convert to platform remove callback returning void
| * df9ce976d6 Input: ims-pcu - fix printf string overflow
| * 0a88433d60 s390/boot: Remove alt_stfle_fac_list from decompressor
| * 34ab36f9f3 s390/ipl: Fix incorrect initialization of nvme dump block
| * a88e11b97b s390/ipl: Fix incorrect initialization of len fields in nvme reipl block
| * a9e6068190 s390/vdso: Use standard stack frame layout
| * 8a598bf5ac s390/vdso: Generate unwind information for C modules
| * c7a162b3ae s390/vdso64: filter out munaligned-symbols flag for vdso
| * 926f7fea26 s390/vdso: filter out mno-pic-data-is-text-relative cflag
| * 886f9ee3c5 LoongArch: Fix callchain parse error with kernel tracepoint events again
| * 2477cc49c8 perf stat: Don't display metric header for non-leader uncore events
| * 4b3d568d40 f2fs: fix to add missing iput() in gc_data_segment()
| * 14cdd01c7b perf daemon: Fix file leak in daemon_session__control
| * f192396d5b libsubcmd: Fix parse-options memory leak
| * 3cb6516b84 serial: sh-sci: protect invalidating RXDMA on shutdown
| * 3ccf5210dc f2fs: compress: don't allow unaligned truncation on released compress inode
| * a61d0d6648 f2fs: fix to release node block count in error path of f2fs_new_node_page()
| * 5d47d63883 f2fs: compress: fix to cover {reserve,release}_compress_blocks() w/ cp_rwsem lock
| * ea394c8698 f2fs: compress: fix to update i_compr_blocks correctly
| * d939659ef9 perf report: Avoid SEGV in report__setup_sample_type()
| * 8641d8d39d perf ui browser: Avoid SEGV on title
| * afb634b085 PCI/EDR: Align EDR_PORT_LOCATE_DSM with PCI Firmware r3.3
| * bdfaba14d8 PCI/EDR: Align EDR_PORT_DPC_ENABLE_DSM with PCI Firmware r3.3
| * 01f7e5732f extcon: max8997: select IRQ_DOMAIN instead of depending on it
| * 598eb7d520 perf ui browser: Don't save pointer to stack memory
| * b84c5140fd perf bench internals inject-build-id: Fix trap divide when collecting just one DSO
| * df9329247d ppdev: Add an error check in register_device
| * 27181d7119 ppdev: Remove usage of the deprecated ida_simple_xx() API
| * 4bfd48bb6e stm class: Fix a double free in stm_register_device()
| * 469f34d984 usb: gadget: u_audio: Clear uac pointer when freed.
| * 89e6680968 usb: gadget: u_audio: Fix race condition use of controls after free during gadget unbind.
| * 5aae3129c3 watchdog: sa1100: Fix PTR_ERR_OR_ZERO() vs NULL check in sa1100dog_probe()
| * 1c991befa1 watchdog: bd9576: Drop "always-running" property
| * d2bfc8ee11 dt-bindings: pinctrl: mediatek: mt7622: fix array properties
| * 91bc100044 VMCI: Fix an error handling path in vmci_guest_probe_device()
| * 049680a943 ovl: remove upper umask handling from ovl_create_upper()
| * a65ca8a943 perf intel-pt: Fix unassigned instruction op (discovered by MemorySanitizer)
| * 1c4ce8d08f microblaze: Remove early printk call from cpuinfo-static.c
| * 1cd87f3854 microblaze: Remove gcc flag for non existing early_printk.c file
| * 75a001914a fpga: region: add owner module and take its refcount
| * 44dccf7eb4 coresight: etm4x: Fix access to resource selector registers
| * 3a8a24cbdd coresight: etm4x: Safe access for TRCQCLTR
| * cf9a077ab5 coresight: etm4x: Do not save/restore Data trace control registers
| * ecbfb465f5 coresight: etm4x: Do not hardcode IOMEM access for register restore
| * d3ea59a95d iio: pressure: dps310: support negative temperature values
| * 08ccc5d4d1 perf docs: Document bpf event modifier
| * 4df97442a0 coresight: etm4x: Fix unbalanced pm_runtime_enable()
| * b6eb572f38 iio: adc: stm32: Fixing err code to not indicate success
| * d52358d6da f2fs: fix to check pinfile flag in f2fs_move_file_range()
| * 89548270b0 f2fs: fix to relocate check condition in f2fs_fallocate()
| * aaeab70ad2 f2fs: fix typos in comments
| * 0661153777 f2fs: compress: fix to relocate check condition in f2fs_ioc_{,de}compress_file()
| * 3192c383f3 f2fs: compress: fix to relocate check condition in f2fs_{release,reserve}_compress_blocks()
| * b8f7a95d23 dt-bindings: PCI: rcar-pci-host: Add missing IOMMU properties
| * b9a1acadd0 dt-bindings: PCI: rcar-pci-host: Add optional regulators
| * e80cc8298e perf tests: Make "test data symbol" more robust on Neoverse N1
| * da665815cf perf test: Add 'datasym' test workload
| * 587edbeab8 perf test: Add 'brstack' test workload
| * 33b33bd5b7 perf test: Add 'sqrtloop' test workload
| * a80152003a perf test: Add 'leafloop' test workload
| * ee9d68456c perf test: Add 'thloop' test workload
| * e46035c226 perf test: Add -w/--workload option
| * 338656b35f arm64: dts: meson: fix S4 power-controller node
| * 66a7e9aade interconnect: qcom: qcm2290: Fix mas_snoc_bimc QoS port assignment
| * 3c080bd43b serial: sc16is7xx: add proper sched.h include for sched_set_fifo()
| * 905ec77eda PCI: tegra194: Fix probe path for Endpoint mode
| * b54f3b1682 greybus: arche-ctrl: move device table to its right location
| * cb3cc5e92a serial: max3100: Fix bitwise types
| * b6eb7aff23 serial: max3100: Update uart_driver_registered on driver removal
| * 8296bb9e59 serial: max3100: Lock port->lock when calling uart_handle_cts_change()
| * 758c5d1451 firmware: dmi-id: add a release callback function
| * 1aceff5b77 dmaengine: idma64: Add check for dma_set_max_seg_size
| * 2ebcaa0e5d soundwire: cadence: fix invalid PDI offset
| * 03bf7d260f perf annotate: Get rid of duplicate --group option item
| * d9b7185811 counter: linux/counter.h: fix Excess kernel-doc description warning
| * 49642cc366 f2fs: fix to wait on page writeback in __clone_blkaddrs()
| * 1a9225fdd0 f2fs: multidev: fix to recognize valid zero block address
| * 9b41a9b9c8 greybus: lights: check return of get_channel_from_mode
| * 77eec3e2fa iio: core: Leave private pointer NULL when no private data supplied
| * 416b6aad33 perf probe: Add missing libgen.h header needed for using basename()
| * 4086a7af96 perf record: Delete session after stopping sideband thread
| * 3f9e48b104 scsi: ufs: ufs-qcom: Clear qunipro_g4_sel for HW major version > 5
| * be6e713226 sched/core: Fix incorrect initialization of the 'burst' parameter in cpu_max_write()
| * e72a3ebf80 sched/fair: Allow disabling sched_balance_newidle with sched_relax_domain_level
| * 04e907c4ae af_packet: do not call packet_read_pending() from tpacket_destruct_skb()
| * 3db2fc45d1 netrom: fix possible dead-lock in nr_rt_ioctl()
| * e448d1bad7 net: qrtr: ns: Fix module refcnt
| * 8ca9a750fc net: bridge: mst: fix vlan use-after-free
| * f3ffa269a4 selftests: net: bridge: increase IGMP/MLD exclude timeout membership interval
| * 28126b83f8 net: bridge: xmit: make sure we have at least eth header len bytes
| * ce83060743 net: add pskb_may_pull_reason() helper
| * 43504dae4d RDMA/IPoIB: Fix format truncation compilation errors
| * f5f95901a3 selftests/kcmp: remove unused open mode
| * 879fe60fcc SUNRPC: Fix gss_free_in_token_pages()
| * 7504fb57af ext4: fix potential unnitialized variable
| * 332f8c289b ext4: remove unused parameter from ext4_mb_new_blocks_simple()
| * 910ce50de7 ext4: try all groups in ext4_mb_new_blocks_simple
| * 227a4fa4a0 ext4: fix unit mismatch in ext4_mb_new_blocks_simple
| * 0d82a01cfa ext4: simplify calculation of blkoff in ext4_mb_new_blocks_simple
| * 00b079e990 sunrpc: removed redundant procp check
| * afeb0e6962 drivers/virt/acrn: fix PFNMAP PTE checks in acrn_vm_ram_map()
| * 96256f749a virt: acrn: stop using follow_pfn
| * 68b41ff1d8 ext4: avoid excessive credit estimate in ext4_tmpfile()
| * c884b2f721 x86/insn: Add VEX versions of VPDPBUSD, VPDPBUSDS, VPDPWSSD and VPDPWSSDS
| * c88a803ed3 x86/insn: Fix PUSH instruction in x86 instruction decoder opcode map
| * b4825f5d21 clk: qcom: mmcc-msm8998: fix venus clock issue
| * b8bf481f58 clk: qcom: dispcc-sm6350: fix DisplayPort clocks
| * 49e7685aba clk: qcom: dispcc-sm8450: fix DisplayPort clocks
| * 1a21fdeea5 lib/test_hmm.c: handle src_pfns and dst_pfns allocation failure
| * 5582914f2b clk: renesas: r9a07g043: Add clock and reset entry for PLIC
| * 1b6bd01c33 clk: renesas: r8a779a0: Fix CANFD parent clock
| * 9f41ba1dff IB/mlx5: Use __iowrite64_copy() for write combining stores
| * de144d4522 RDMA/rxe: Fix incorrect rxe_put in error path
| * 4c0d0a653a RDMA/rxe: Replace pr_xxx by rxe_dbg_xxx in rxe_net.c
| * faa8d0ecf6 RDMA/rxe: Fix seg fault in rxe_comp_queue_pkt
| * 8f50d295dd clk: rs9: fix wrong default value for clock amplitude
| * 0dd8a16724 clk: mediatek: mt8365-mm: fix DPI0 parent
| * 17f3741c65 RDMA/hns: Modify the print level of CQE error
| * b767e511ce RDMA/hns: Use complete parentheses in macros
| * e88f5ea8db RDMA/hns: Fix GMV table pagesize
| * 763780ef03 RDMA/hns: Fix UAF for cq async event
| * 756ddbe665 RDMA/hns: Fix deadlock on SRQ async events.
| * 755b313811 RDMA/hns: Fix return value in hns_roce_map_mr_sg
| * ad35e397e4 RDMA/mlx5: Adding remote atomic access flag to updatable flags
| * 9302afe52d clk: samsung: exynosautov9: fix wrong pll clock id value
| * e08f0cc0af drm/rockchip: vop2: Do not divide height twice for YUV
| * 26f73934ee drm/mipi-dsi: use correct return type for the DSC functions
| * 2dd1b312b4 drm/panel: simple: Add missing Innolux G121X1-L03 format, flags, connector
| * ed9713f81e drm/panel: novatek-nt35950: Don't log an error when DSI host can't be found
| * f0d232de73 drm/bridge: dpc3433: Don't log an error when DSI host can't be found
| * 6eb119ab4f drm/bridge: tc358775: Don't log an error when DSI host can't be found
| * b121737428 drm/bridge: lt9611uxc: Don't log an error when DSI host can't be found
| * 9cc53e34a9 drm/bridge: lt9611: Don't log an error when DSI host can't be found
| * 59176fbabe drm/bridge: lt8912b: Don't log an error when DSI host can't be found
| * 195760a41e drm/bridge: icn6211: Don't log an error when DSI host can't be found
| * 9ce1954f80 drm/bridge: anx7625: Don't log an error when DSI host can't be found
| * bf16f6e5ea ASoC: tracing: Export SND_SOC_DAPM_DIR_OUT to its value
| * 80431ea363 drm: vc4: Fix possible null pointer dereference
| * e4b52d4938 drm/arm/malidp: fix a possible null pointer dereference
| * a1ab99dcc8 media: atomisp: ssh_css: Fix a null-pointer dereference in load_video_binaries
| * ba8b4180f0 fbdev: sh7760fb: allow modular build
| * 673a409b6b media: dt-bindings: ovti,ov2680: Fix the power supply names
| * a6f2f5f762 media: ipu3-cio2: Request IRQ earlier
| * d57bc62491 drm/msm/dp: Avoid a long timeout for AUX transfer if nothing connected
| * 3ede49a75a drm/msm/dp: Return IRQ_NONE for unhandled interrupts
| * 24e810b9b1 drm/msm/dp: allow voltage swing / pre emphasis of 3
| * ca53b7efd4 drm: bridge: cdns-mhdp8546: Fix possible null pointer dereference
| * d33fbb62fb media: radio-shark2: Avoid led_names truncations
| * ff29277c3e media: rcar-vin: work around -Wenum-compare-conditional warning
| * 62fd155f2a media: ngene: Add dvb_ca_en50221_init return value check
| * 1ca59f0a20 ASoC: Intel: avs: Fix potential integer overflow
| * 3e35eb8449 ASoC: Intel: avs: Fix ASRC module initialization
| * c923f05b01 fbdev: sisfb: hide unused variables
| * f9974f9035 powerpc/fsl-soc: hide unused const variable
| * 13562c2d48 drm/mediatek: Add 0 size check to mtk_drm_gem_obj
| * 96e47f2b2f drm/meson: vclk: fix calculation of 59.94 fractional rates
| * de9987cec6 ASoC: kirkwood: Fix potential NULL dereference
| * 55dd7caeeb fbdev: shmobile: fix snprintf truncation
| * 3115fb2cc5 mtd: rawnand: hynix: fixed typo
| * 534fd7770b mtd: core: Report error if first mtd_otp_size() call fails in mtd_otp_nvmem_add()
| * a4b95e6681 ASoC: Intel: avs: ssm4567: Do not ignore route checks
| * e9fe6e6671 ASoC: Intel: Disable route checks for Skylake boards
| * 98b8a6bfd3 drm/amd/display: Fix potential index out of bounds in color transformation function
| * 743ce5a1f2 drm/panel: atna33xc20: Fix unbalanced regulator in the case HPD doesn't assert
| * 90bd113e65 drm/dp: Don't attempt AUX transfers when eDP panels are not powered
| * 083f305020 drm/panel-samsung-atna33xc20: Use ktime_get_boottime for delays
| * 9843feb28f drm/lcdif: Do not disable clocks on already suspended hardware
| * e48c88d08e dev_printk: Add and use dev_no_printk()
| * 87436e6919 printk: Let no_printk() use _printk()
| * fc61bce6ec drm/bridge: Fix improper bridge init order with pre_enable_prev_first
| * e0c379bd58 Bluetooth: qca: Fix error code in qca_read_fw_build_info()
| * 632b63f127 Bluetooth: compute LE flow credits based on recvbuf space
| * 1cfc3ab941 Bluetooth: Consolidate code around sk_alloc into a helper function
| * 80dea5ae7c mptcp: SO_KEEPALIVE: fix getsockopt support
| * 3ec437f9bb ax25: Fix reference count leak issue of net_device
| * ae467750a3 ax25: Fix reference count leak issues of ax25_dev
| * 46cdb2bee4 ax25: Use kernel universal linked list to implement ax25_dev_list
| * 01fdc6a9d1 riscv, bpf: make some atomic operations fully ordered
| * 913ad7113f s390/bpf: Emit a barrier for BPF_FETCH instructions
| * bf8aaf0ae0 net/mlx5: Discard command completions in internal error
| * 4baae687a2 net/mlx5: Add a timeout to acquire the command queue semaphore
| * e77a3ec7ad ipv6: sr: fix invalid unregister error path
| * e82d8b708c ipv6: sr: fix incorrect unregister order
| * f08ce703af ipv6: sr: add missing seg6_local_exit
| * 9ec8b0ccad net: openvswitch: fix overwriting ct original tuple for ICMPv6
| * 517e64bcc9 net: usb: smsc95xx: stop lying about skb->truesize
| * 8299e4d778 af_unix: Fix data races in unix_release_sock/unix_stream_sendmsg
| * 63470d2044 net: ethernet: cortina: Locking fixes
| * 4e3d60b618 selftests: net: move amt to socat for better compatibility
| * 476adb3bbb eth: sungem: remove .ndo_poll_controller to avoid deadlocks
| * 6758bf27a7 net: ipv6: fix wrong start position when receive hop-by-hop fragment
| * 2ceac7eac0 m68k: mac: Fix reboot hang on Mac IIci
| * 0d9ae12535 m68k: Fix spinlock race in kernel thread creation
| * 3e3f283c0b net: usb: sr9700: stop lying about skb->truesize
| * 439d2db44d usb: aqc111: stop lying about skb->truesize
| * decf64daf4 HID: amd_sfh: Handle "no sensors" in PM operations
| * a9f11a226b wifi: mwl8k: initialize cmd->addr[] properly
| * 3869da766b x86/numa: Fix SRAT lookup of CFMWS ranges with numa_fill_memblks()
| * e39d630be9 kernel/numa.c: Move logging out of numa.h
| * 888c05a172 scsi: qla2xxx: Fix debugfs output for fw_resource_count
| * d93318f19d scsi: qedf: Ensure the copied buf is NUL terminated
| * 7d3e694c4f scsi: bfa: Ensure the copied buf is NUL terminated
| * 3848c9f889 HID: intel-ish-hid: ipc: Add check for pci_alloc_irq_vectors
| * 1f2ebd3758 kunit: Fix kthread reference
| * b48efc18de selftests: default to host arch for LLVM builds
| * 9118e77618 selftests/resctrl: fix clang build failure: use LOCAL_HDRS
| * 63e48e33ea selftests/binderfs: use the Makefile's rules, not Make's implicit rules
| * fa6b979c86 libbpf: Fix error message in attach_kprobe_multi
| * 48e88dc8b0 wifi: mt76: mt7603: add wpdma tx eof flag for PSE client reset
| * e091545b16 Revert "sh: Handle calling csum_partial with misaligned data"
| * 1b682bd726 sh: kprobes: Merge arch_copy_kprobe() into arch_prepare_kprobe()
| * 34f7ebff1b wifi: ar5523: enable proper endpoint verification
| * 265c3cda47 wifi: carl9170: add a proper sanity check for endpoints
| * 787fb79efc macintosh/via-macii: Fix "BUG: sleeping function called from invalid context"
| * c74b33b4f5 net: give more chances to rcu in netdev_wait_allrefs_any()
| * 1491a01ef5 drivers/perf: hisi: hns3: Actually use devm_add_action_or_reset()
| * 3669baf308 drivers/perf: hisi: hns3: Fix out-of-bound access when valid event group
| * 3d1face00e drivers/perf: hisi_pcie: Fix out-of-bound access when valid event group
| * 10e9ecf9dd pwm: sti: Simplify probe function using devm functions
| * e07184f033 pwm: sti: Prepare removing pwm_chip from driver data
| * e173bd3ca0 pwm: sti: Convert to platform remove callback returning void
| * 131490afa2 tcp: avoid premature drops in tcp_add_backlog()
| * 3616b4e1f1 net: dsa: mv88e6xxx: Avoid EEPROM timeout without EEPROM on 88E6250-family switches
| * be16a7fd4b net: dsa: mv88e6xxx: Add support for model-specific pre- and post-reset handlers
| * f81c15d86b wifi: ath10k: populate board data for WCN3990
| * 540fe85ed8 selftests/bpf: Fix a fd leak in error paths in open_netns
| * 16e4d6b72c wifi: ath10k: Fix an error code problem in ath10k_dbg_sta_write_peer_debug_trigger()
| * 11c731386e thermal/drivers/tsens: Fix null pointer dereference
| * c8d23a7e9b x86/purgatory: Switch to the position-independent small code model
| * cf36b66875 scsi: hpsa: Fix allocation size for Scsi_Host private data
| * c0fcc7838b scsi: libsas: Fix the failure of adding phy with zero-address to port
| * 769c4f355b cppc_cpufreq: Fix possible null pointer dereference
| * 606dc69d6f udp: Avoid call to compute_score on multiple sites
| * 789afa3e00 net: remove duplicate reuseport_lookup functions
| * 1191892924 net: export inet_lookup_reuseport and inet6_lookup_reuseport
| * 0f67a567be x86/pat: Fix W^X violation false-positives when running as Xen PV guest
| * 66109531c1 x86/pat: Restructure _lookup_address_cpa()
| * 1ed308ba7b x86/pat: Introduce lookup_address_in_pgd_attr()
| * 8bc9546805 cpufreq: exit() callback is optional
| * ce087f5088 selftests/bpf: Fix umount cgroup2 error in test_sockmap
| * e2ce84ae6e x86/boot/64: Clear most of CR4 in startup_64(), except PAE, MCE and LA57
| * 15b1f35a11 gfs2: Fix "ignore unlock failures after withdraw"
| * 4b10a59fb6 gfs2: Don't forget to complete delayed withdraw
| * 39a12a9ba8 ACPI: disable -Wstringop-truncation
| * 3eecd40d13 irqchip/loongson-pch-msi: Fix off-by-one on allocation error path
| * 10a52dc487 irqchip/alpine-msi: Fix off-by-one in allocation error path
| * 4ade4cfe23 ACPI: LPSS: Advertise number of chip selects via property
| * 6eae7a54cc scsi: ufs: core: Perform read back after disabling UIC_COMMAND_COMPL
| * 00e7b0eb92 scsi: ufs: core: Perform read back after disabling interrupts
| * 5ec91312a5 scsi: ufs: cdns-pltfrm: Perform read back after writing HCLKDIV
| * ec6be64a14 scsi: ufs: qcom: Perform read back after writing CGC enable
| * 44db6b5888 scsi: ufs: qcom: Perform read back after writing unipro mode
| * 9c4e9090af scsi: ufs: ufs-qcom: Clear qunipro_g4_sel for HW version major 5
| * 1e33175a8c scsi: ufs: ufs-qcom: Fix the Qcom register name for offset 0xD0
| * b52ce65b46 scsi: ufs: qcom: Perform read back after writing REG_UFS_SYS1CLK_1US
| * bfda254ceb scsi: ufs: qcom: Perform read back after writing reset bit
| * 90098f0a16 bpf: Pack struct bpf_fib_lookup
| * 1385768312 wifi: carl9170: re-fix fortified-memset warning
| * a353cd9ff7 bitops: add missing prototype check
| * 542598a559 mlx5: stop warning for 64KB pages
| * f3141f00f3 net/mlx5e: Fail with messages when params are not valid for XSK
| * 82bb344ff3 qed: avoid truncating work queue length
| * b752f7fc15 ACPI: Fix Generic Initiator Affinity _OSC bit
| * 94833a31d7 sched/fair: Add EAS checks before updating root_domain::overutilized
| * 388eb05c27 x86/boot: Ignore relocations in .notes sections in walk_relocs() too
| * 75d015f2f1 bpftool: Fix missing pids during link show
| * 4d753cf502 wifi: ath11k: don't force enable power save on non-running vdevs
| * 0eb2c0528e wifi: brcmfmac: pcie: handle randbuf allocation failure
| * 0c94d93b5d wifi: ath10k: poll service ready message before failing
| * 9a97008dbf block: support to account io_ticks precisely
| * 56aacead05 block: open code __blk_account_io_done()
| * 4e4c9bf71a block: open code __blk_account_io_start()
| * 71e8e4f288 md: fix resync softlockup when bitmap size is less than array size
| * 8b5405bf0d null_blk: Fix missing mutex_destroy() at module removal
| * 3603c03acd soc: mediatek: cmdq: Fix typo of CMDQ_JUMP_RELATIVE
| * f06969df2e jffs2: prevent xattr node from overflowing the eraseblock
| * 36840a727c ARM: configs: sunxi: Enable DRM_DW_HDMI
| * e2228ed3fe rcu: Fix buffer overflow in print_cpu_stall_info()
| * 08186d0c5f rcu-tasks: Fix show_rcu_tasks_trace_gp_kthread buffer overflow
| * 91f1edfa38 io_uring: use the right type for work_llist empty check
| * 0c9ce8f239 io_uring: don't use TIF_NOTIFY_SIGNAL to test for availability of task_work
| * 007a23d38a s390/cio: fix tracepoint subchannel type field
| * 891b2c9d39 crypto: x86/sha512-avx2 - add missing vzeroupper
| * f8daeb40b4 crypto: x86/sha256-avx2 - add missing vzeroupper
| * c38667181b crypto: x86/nh-avx2 - add missing vzeroupper
| * eeaf1f604f crypto: ccp - drop platform ifdef checks
| * ecebbacac1 parisc: add missing export of __cmpxchg_u8()
| * 6f48c67414 nilfs2: fix out-of-range warning
| * 0d0f8ba042 ecryptfs: Fix buffer size for tag 66 packet
| * a89bece5a6 firmware: raspberrypi: Use correct device for DMA mappings
| * 4d8e9c2aa6 mm/slub, kunit: Use inverted data to corrupt kmem cache
| * 49833a8da6 crypto: bcm - Fix pointer arithmetic
| * 24119acfc7 openpromfs: finish conversion to the new mount API
| * de9bf32eab nvmet: prevent sprintf() overflow in nvmet_subsys_nsid_exists()
| * 559214eb4e epoll: be better about file lifetimes
| * ae63c25cb0 nvmet: fix nvme status code when namespace is disabled
| * 11f62e1818 nvmet-tcp: fix possible memory leak when tearing down a controller
| * 8244dfd22c nvmet-auth: replace pr_debug() with pr_err() to report an error.
| * 068095539a nvmet-auth: return the error code to the nvmet_auth_host_hash() callers
| * 226a12bf62 nvme: find numa distance only if controller has valid numa id
| * e8b799f42a x86/mm: Remove broken vsyscall emulation code from the page fault code
| * 6ce4f190f0 drm/amdkfd: Flush the process wq before creating a kfd_process
| * 6170ef8490 drm/amd/display: Add VCO speed parameter for DCN31 FPU
| * 3fa799b54a drm/amd/display: Add dtbclk access to dcn315
| * 68195bb960 ALSA: hda: intel-dsp-config: harden I2C/I2S codec detection
| * 32b4a8888f ASoC: da7219-aad: fix usage of device_get_named_child_node()
| * 805ef55a82 softirq: Fix suspicious RCU usage in __do_softirq()
| * 1572a4a3b8 fpga: dfl-pci: add PCI subdevice ID for Intel D5005 card
| * e9c96d01d5 genirq/cpuhotplug, x86/vector: Prevent vector leak during CPU offline
| * 117e7a43cd KVM: x86: Don't advertise guest.MAXPHYADDR as host.MAXPHYADDR in CPUID
| * b8938d6f57 efi: libstub: only free priv.runtime_map when allocated
| * 6f9881cb4d x86/efistub: Omit physical KASLR when memory reservations exist
| * ce4e200f37 KVM: selftests: Add test for uaccesses to non-existent vgic-v2 CPUIF
| * b3c8774eb2 ASoC: rt715-sdca: volume step modification
| * ac6c005a55 ASoC: rt715: add vendor clear control register
| * ee8363381f regulator: vqmmc-ipq4019: fix module autoloading
| * 7341c2c685 ASoC: dt-bindings: rt5645: add cbj sleeve gpio property
| * b26f1c63e6 ASoC: rt5645: Fix the electric noise due to the CBJ contacts floating
| * d611f95f97 regulator: irq_helpers: duplicate IRQ name
| * ff6e684326 ASoC: Intel: bytcr_rt5640: Apply Asus T100TA quirk to Asus T100TAM too
| * e3decad6ab sched/isolation: Fix boot crash when maxcpus < first housekeeping CPU
| * e477e2e426 selftests: sud_test: return correct emulated syscall value on RISC-V
| * 1c4ee6acdb LoongArch: Lately init pmu after smp is online
| * 70b1bf6d9e drm/amdgpu/mes: fix use-after-free issue
| * 4e68e749a8 drm/amdgpu: Fix the ring buffer size for queue VM flush
| * 3bec2fc83b drm/amdgpu: Update BO eviction priorities
| * 85a37f59d7 drm/amd/display: Set color_mgmt_changed to true on unsuspend
| * b7dd8659df net: usb: qmi_wwan: add Telit FN920C04 compositions
| * e032c4cfb1 dt-bindings: rockchip: grf: Add missing type to 'pcie-phy' node
| * ac260a819a wifi: cfg80211: fix the order of arguments for trace events of the tx_rx_evt class
| * f5273fe5f6 wifi: mac80211: ensure beacon is non-S1G prior to extracting the beacon timestamp field
| * 79b1584879 wifi: mac80211: don't use rate mask for scanning
| * 2f01314049 KEYS: asymmetric: Add missing dependencies of FIPS_SIGNATURE_SELFTEST
| * c2fb439f4f ALSA: Fix deadlocks with kctl removals at disconnection
| * e007476725 ALSA: core: Fix NULL module pointer assignment at card init
| * c0d7ab900c ALSA: hda/realtek: fix mute/micmute LEDs don't work for ProBook 440/460 G11.
| * a734ec0654 ksmbd: ignore trailing slashes in share paths
| * 14bcd802aa ksmbd: avoid to send duplicate oplock break notifications
| * 8f54c5f3c6 fs/ntfs3: Break dir enumeration if directory contents error
| * c494fe4ccd fs/ntfs3: Fix case when index is reused during tree transformation
| * df40783dc3 fs/ntfs3: Taking DOS names into account during link counting
| * 1c29c6287a fs/ntfs3: Remove max link count info display during driver init
| * 1c3844c5f4 nilfs2: fix potential hang in nilfs_detach_log_writer()
| * 61196139d7 nilfs2: fix unexpected freezing of nilfs_segctor_sync()
| * 35471c0ff1 net: smc91x: Fix m68k kernel compilation for ColdFire CPU
| * 5996b2b2da tools/nolibc/stdlib: fix memory error in realloc()
| * b7a0a5cf9e tools/latency-collector: Fix -Wformat-security compile warns
| * 54c64967ba ring-buffer: Fix a race between readers and resize checks
| * 0c48185a95 r8169: Fix possible ring buffer corruption on fragmented Tx packets.
| * 69ed8fc12b Revert "r8169: don't try to disable interrupts if NAPI is, scheduled already"
| * 0db279c7c2 io_uring: fail NOP if non-zero op flags is passed in
| * 28cbe126ce serial: 8520_mtk: Set RTS on shutdown for Rx in-band wakeup
| * 78a933a618 serial: 8250_bcm7271: use default_mux_rate if possible
| * 3726f75a1c speakup: Fix sizeof() vs ARRAY_SIZE() bug
| * 8a6e6b1644 tty: n_gsm: fix missing receive state reset after mode switch
| * 46f52c89a7 tty: n_gsm: fix possible out-of-bounds in gsm0_receive()
| * dbff5f0bfb ftrace: Fix possible use-after-free issue in ftrace_location()
| * af542630b7 x86/tsc: Trust initial offset in architectural TSC-adjust MSRs
| * f9977e4e0c SUNRPC: Fix loop termination condition in gss_free_in_token_pages()
* | 2061a20382 Revert "xfs: use iomap_valid method to detect stale cached iomaps"
* | ca48ea3afb Revert "iomap: write iomap validity checks"
* | c1eefaf65b Revert "binder: fix max_thread type inconsistency"
* | e4ceb55393 Merge 6.1.92 into android14-6.1-lts
|\|
| * 88690811da Linux 6.1.92
| * b1c74dad43 docs: kernel_include.py: Cope with docutils 0.21
| * cd82e9620e admin-guide/hw-vuln/core-scheduling: fix return type of PR_SCHED_CORE_GET
| * 681935009f KEYS: trusted: Do not use WARN when encode fails
| * 1d9e2de245 remoteproc: mediatek: Make sure IPI buffer fits in L2TCM
| * a6b9c5de4a serial: kgdboc: Fix NMI-safety problems from keyboard reset code
| * 3f4be9dbef usb: typec: tipd: fix event checking for tps6598x
| * f099b8127d usb: typec: ucsi: displayport: Fix potential deadlock
| * 17466488ae net: usb: ax88179_178a: fix link status when link is set to down/up
| * 341eb08dbc usb: dwc3: Wait unconditionally after issuing EndXfer command
| * e78531e8ca binder: fix max_thread type inconsistency
| * 92cb363d16 drm/amdgpu: Fix possible NULL dereference in amdgpu_ras_query_error_status_helper()
| * a94cf76604 arm64: atomics: lse: remove stale dependency on JUMP_LABEL
| * d9a85a8d82 xfs: short circuit xfs_growfs_data_private() if delta is zero
| * fbdf080691 xfs: get root inode correctly at bulkstat
| * 7430ff84c2 xfs: fix log recovery when unknown rocompat bits are set
| * 4db0e08ef9 xfs: allow inode inactivation during a ro mount log recovery
| * 2cc027623e xfs: invalidate xfs_bufs when allocating cow extents
| * 537baedb3e xfs: estimate post-merge refcounts correctly
| * 131a854c09 xfs: hoist refcount record merge predicates
| * 0d889ae85f xfs: fix super block buf log item UAF during force shutdown
| * 2f1eb71ae8 xfs: wait iclog complete before tearing down AIL
| * e62c784a56 xfs: attach dquots to inode before reading data/cow fork mappings
| * 5465403341 xfs: invalidate block device page cache during unmount
| * 781f80e519 xfs: fix incorrect i_nlink caused by inode racing
| * 42163ff6c6 xfs: fix sb write verify for lazysbcount
| * 77d31f0c70 xfs: fix incorrect error-out in xfs_remove
| * e2ae64993c xfs: fix off-by-one-block in xfs_discard_folio()
| * e811fec51c xfs: drop write error injection is unfixable, remove it
| * ea67e73129 xfs: use iomap_valid method to detect stale cached iomaps
| * 54a37e5d07 iomap: write iomap validity checks
| * 580f40b4c9 xfs: xfs_bmap_punch_delalloc_range() should take a byte range
| * 38be53c3fd iomap: buffered write failure should not truncate the page cache
| * 12339ec6fe xfs,iomap: move delalloc punching to iomap
| * 8b6afad39b xfs: use byte ranges for write cleanup ranges
| * 142eafd24d xfs: punching delalloc extents on write failure is racy
| * 495e934c66 xfs: write page faults in iomap are not buffered writes
| * 493a8172e5 mmc: core: Add HS400 tuning in HS400es initialization
| * 5d91238b59 KEYS: trusted: Fix memory leak in tpm2_key_encode()
| * 104ef3d8cd nfsd: don't allow nfsd threads to be signalled.
| * cf8e6ae857 mfd: stpmic1: Fix swapped mask/unmask in irq chip
| * 026caf92c6 pinctrl: core: handle radix_tree_insert() errors in pinctrl_register_one_pin()
| * 90cbd4c081 ice: remove unnecessary duplicate checks for VF VSI ID
| * 59161a21ca ice: pass VSI pointer into ice_vc_isvalid_q_id
| * 8a94fc9d20 net: ks8851: Fix another TX stall caused by wrong ISR flag handling
| * 91402e0e5d drm/amd/display: Fix division by zero in setup_dsc_config
* | 6b10c7f4b9 ANDROID: GKI: add wait_for_completion_interruptible_timeout to db845c symbol list
* | e757b335e0 Revert "Reapply "timers: Rename del_timer_sync() to timer_delete_sync()""
* | 2587385ace Revert "timers: Rename del_timer() to timer_delete()"
* | 38eb9de84b Revert "Bluetooth: qca: add support for QCA2066"
* | 0bf7f66897 Revert "spi: introduce new helpers with using modern naming"
* | 6971d8bfbd Revert "spi: axi-spi-engine: Convert to platform remove callback returning void"
* | 31e3fe5faa Revert "spi: spi-axi-spi-engine: switch to use modern name"
* | 97cb39500a Revert "spi: spi-axi-spi-engine: Use helper function devm_clk_get_enabled()"
* | b0e59b447d Revert "spi: axi-spi-engine: simplify driver data allocation"
* | 948d41cbb2 Revert "spi: axi-spi-engine: use devm_spi_alloc_host()"
* | 3a5b2c1e21 Revert "spi: axi-spi-engine: move msg state to new struct"
* | 44b32d88b0 Revert "spi: axi-spi-engine: use common AXI macros"
* | af6c59d699 Revert "spi: axi-spi-engine: fix version format string"
* | f66f5edf10 Revert "spi: Merge spi_controller.{slave,target}_abort()"
* | c313757fce Revert "mm/hugetlb: add folio support to hugetlb specific flag macros"
* | 323d7963f9 Revert "mm: add private field of first tail to struct page and struct folio"
* | edd74f93c0 Revert "mm/hugetlb: add hugetlb_folio_subpool() helpers"
* | 366b3a6494 Revert "mm/hugetlb: add folio_hstate()"
* | 6d38b404ee Revert "mm/hugetlb_cgroup: convert __set_hugetlb_cgroup() to folios"
* | d1bebbc8ed Revert "mm/hugetlb_cgroup: convert hugetlb_cgroup_from_page() to folios"
* | 563a9907e2 Revert "mm/hugetlb: convert free_huge_page to folios"
* | dd84aa68cd Revert "mm/hugetlb_cgroup: convert hugetlb_cgroup_uncharge_page() to folios"
* | 00ebd8ec69 Revert "mm/hugetlb: fix missing hugetlb_lock for resv uncharge"
* | 0010b838db Merge 6.1.91 into android14-6.1-lts
|\|
| * 4078fa637f Linux 6.1.91
| * 8064a711c4 net: bcmgenet: synchronize UMAC_CMD access
| * 9ed299be99 net: bcmgenet: synchronize use of bcmgenet_set_rx_mode()
| * 714e053565 net: bcmgenet: synchronize EXT_RGMII_OOB_CTRL access
| * ed804e9d8b net: bcmgenet: Clear RGMII_LINK upon link down
| * beaf11969f md: fix kmemleak of rdev->serial
| * ea92809e29 mm,swapops: update check in is_pfn_swap_entry for hwpoison entries
| * 2effe407f7 mm/hugetlb: fix DEBUG_LOCKS_WARN_ON(1) when dissolve_free_hugetlb_folio()
| * 0391c9085a btrfs: do not wait for short bulk allocation
| * e4519a0166 keys: Fix overwrite of key expiration on instantiation
| * 5056d23893 dmaengine: idxd: add a write() method for applications to submit work
| * 3e4368832e dmaengine: idxd: add a new security check to deal with a hardware erratum
| * 9ff3c42aa3 VFIO: Add the SPR_DSA and SPR_IAX devices to the denylist
| * 064688d70c Bluetooth: qca: fix firmware check error path
| * 57062aa13e Bluetooth: qca: fix info leak when fetching fw build id
| * bcccdc947d Bluetooth: qca: fix info leak when fetching board id
| * 29a475688a Bluetooth: qca: fix NVM configuration parsing
| * 1caceadfb5 Bluetooth: qca: add missing firmware sanity checks
| * 94eb9f83a4 ksmbd: do not grant v2 lease if parent lease key and epoch are not set
| * 3ae4f87ac2 ksmbd: avoid to send duplicate lease break notifications
| * a86743458b ksmbd: off ipv6only for both ipv4/ipv6 binding
| * 4e73c01b61 spi: microchip-core-qspi: fix setting spi bus clock rate
| * 07b933a1b6 regulator: core: fix debugfs creation regression
| * 7629ef6dda mm: use memalloc_nofs_save() in page_cache_ra_order()
| * a2740fe937 hwmon: (pmbus/ucd9000) Increase delay from 250 to 500us
| * 2d60ff5874 net: fix out-of-bounds access in ops_init
| * ce740545c0 drm/amd/display: Handle Y carry-over in VCP X.Y calculation
| * d8cdbd0f6c drm/i915/bios: Fix parsing backlight BDB data
| * 0dbfc73670 drm/vmwgfx: Fix invalid reads in fence signaled events
| * 89fffbdf53 drm/amdkfd: don't allow mapping the MMIO HDP page with large pages
| * c42a8c6baa mei: me: add lunar lake point M DID
| * eedaabee28 slimbus: qcom-ngd-ctrl: Add timeout for wait operation
| * a66c869b17 dyndbg: fix old BUG_ON in >control parser
| * 0b47bbc91f ASoC: ti: davinci-mcasp: Fix race condition during probe
| * 9c301fd3b0 ASoC: tegra: Fix DSPK 16-bit playback
| * 21ea04aad8 tipc: fix UAF in error path
| * 50a436d05f kmsan: compiler_types: declare __no_sanitize_or_inline
| * b56d4991cf iio: accel: mxc4005: Interrupt handling fixes
| * 50fa09df1a iio:imu: adis16475: Fix sync mode setting
| * 4b71dbe482 dt-bindings: iio: health: maxim,max30102: fix compatible check
| * 39ca83ed73 mptcp: ensure snd_nxt is properly initialized on connect
| * 9f6eb0ab4f mm/slab: make __free(kfree) accept error pointers
| * 25090e9bb0 btrfs: add missing mutex_unlock in btrfs_relocate_sys_chunks()
| * f0c6aae9e4 ALSA: hda/realtek: Fix mute led of HP Laptop 15-da3001TU
| * d56d2ca03c usb: typec: tcpm: Check for port partner validity before consuming it
| * cfcd544a99 usb: typec: tcpm: unregister existing source caps before re-registration
| * d9efd3c899 usb: dwc3: core: Prevent phy suspend during init
| * bf3b0ab6fb usb: xhci-plat: Don't include xhci.h
| * 4e2ae9ff79 usb: gadget: f_fs: Fix a race condition when processing setup packets.
| * 9dac7678e1 usb: gadget: composite: fix OS descriptors w_value logic
| * 5f1d68ef5d USB: core: Fix access violation during port device removal
| * 3e7bbab8bb usb: ohci: Prevent missed ohci interrupts
| * 32a22b9f6c usb: Fix regression caused by invalid ep0 maxpacket in virtual SuperSpeed device
| * 85e6aa4f6e usb: typec: ucsi: Fix connector check on init
| * 91a7af8cb3 usb: typec: ucsi: Check for notifications after init
| * 398248fc45 rust: macros: fix soundness issue in `module!` macro
| * ca99731c13 rust: module: place generated init_module() function in .init.text
| * 15eb8edb09 btf, scripts: rust: drop is_rust_module.sh
| * 0a0464cd41 rust: fix regexp in scripts/is_rust_module.sh
| * 8762bf944a rust: error: Rename to_kernel_errno() -> to_errno()
| * b548c53bc3 Reapply "drm/qxl: simplify qxl_fence_wait"
| * 4ee0941da1 firewire: nosy: ensure user_length is taken into account when fetching packet contents
| * 53f2bfce46 btrfs: fix kvcalloc() arguments order in btrfs_ioctl_send()
| * 5c25b169f9 drm/amdgpu: once more fix the call oder in amdgpu_ttm_move() v2
| * f82f7220af MAINTAINERS: add leah to 6.1 MAINTAINERS file
| * 02f5300f68 drm/amd/display: Atom Integrated System Info v2_2 for DCN35
| * 1a51e24404 gpiolib: cdev: fix uninitialised kfifo
| * 9ed256d294 gpiolib: cdev: relocate debounce_period_us from struct gpio_desc
| * a35ebde68c gpiolib: cdev: Add missing header(s)
| * 12bb8b6a2e dm/amd/pm: Fix problems with reboot/shutdown for some SMU 13.0.4/13.0.11 users
| * 58cf43f758 drm/connector: Add \n to message about demoting connector force-probes
| * 35c614caea drm/meson: dw-hdmi: add bandgap setting for g12
| * be9b56b034 drm/meson: dw-hdmi: power up phy on device init
| * 72ede790f5 net: hns3: fix kernel crash when devlink reload during initialization
| * fa2c7e7646 net: hns3: fix port vlan filter not disabled issue
| * 98987f7808 net: hns3: use appropriate barrier function after setting a bit value
| * 0bb8751de1 net: hns3: release PTP resources if pf initialization failed
| * 549a2179de net: hns3: change type of numa_node_mask as nodemask_t
| * 5daf064afe net: hns3: direct return when receive a unknown mailbox message
| * 7d90032f7c net: hns3: using user configure after hardware reset
| * d5a466ab6e net/smc: fix neighbour and rtable leak in smc_ib_find_route()
| * ea0cb87402 ipv6: prevent NULL dereference in ip6_output()
| * d7ae8e8502 ipv6: annotate data-races around cnf.disable_ipv6
| * 5136ea7fa5 hsr: Simplify code for announcing HSR nodes timer setup
| * ca4e781f15 net-sysfs: convert dev->operstate reads to lockless ones
| * b086d1e82f timers: Rename del_timer() to timer_delete()
| * e2591243ce timers: Get rid of del_singleshot_timer_sync()
| * 7e3242c139 ipv6: fib6_rules: avoid possible NULL dereference in fib6_rule_action()
| * bd78696348 net: bridge: fix corrupted ethernet header on multicast-to-unicast
| * 728a83160f phonet: fix rtm_phonet_notify() skb allocation
| * 544895ba02 hwmon: (corsair-cpro) Protect ccp->wait_input_report with a spinlock
| * a6c70251c9 hwmon: (corsair-cpro) Use complete_all() instead of complete() in ccp_raw_event()
| * 95c5fc8835 hwmon: (corsair-cpro) Use a separate buffer for sending commands
| * 6e4c719395 rtnetlink: Correct nested IFLA_VF_VLAN_LIST attribute validation
| * 8a3ff43dcb net: ks8851: Queue RX packets in IRQ handler instead of disabling BHs
| * 8960ff650a Bluetooth: l2cap: fix null-ptr-deref in l2cap_chan_timeout
| * e3880b531b Bluetooth: msft: fix slab-use-after-free in msft_do_close()
| * bfab2c1f79 Bluetooth: Fix use-after-free bugs caused by sco_sock_timeout
| * 13ed7cdf07 tcp: Use refcount_inc_not_zero() in tcp_twsk_unique().
| * 3fe4ef0568 tcp: defer shutdown(SEND_SHUTDOWN) for TCP_SYN_RECV sockets
| * ad702338fe ARM: 9381/1: kasan: clear stale stack poison
| * 179db49d7e xfrm: Preserve vlan tags for transport mode software GRO
| * bd8f78c71d qibfs: fix dentry leak
| * f269a8ce52 perf unwind-libdw: Handle JIT-generated DSOs properly
| * cf731a5dce perf unwind-libunwind: Fix base address for .eh_frame
| * 2f5e8322cd spi: Merge spi_controller.{slave,target}_abort()
| * 53ce433a6d kbuild: rust: avoid creating temporary files
| * 56633a5e15 net:usb:qmi_wwan: support Rolling modules
| * 04fa2cfc26 drm/nouveau/dp: Don't probe eDP ports twice harder
| * ba2adb4422 fs/9p: drop inodes immediately on non-.L too
| * d063d13af7 clk: Don't hold prepare_lock when calling kref_put()
| * e4e82ef35a gpio: crystalcove: Use -ENOTSUPP consistently
| * 8ebcd16238 gpio: wcove: Use -ENOTSUPP consistently
| * f3b0226fc9 9p: explicitly deny setlease attempts
| * 5d74f4d80a fs/9p: translate O_TRUNC into OTRUNC
| * ca9b5c81f0 fs/9p: only translate RWX permissions for plain 9P2000
| * 3aba6c4ec5 iommu: mtk: fix module autoloading
| * 2f622008bf Drivers: hv: vmbus: Don't free ring buffers that couldn't be re-encrypted
| * dabf12bf99 uio_hv_generic: Don't free decrypted memory
| * 1999644d95 Drivers: hv: vmbus: Track decrypted status in vmbus_gpadl
| * 1f3484dec9 selftests: timers: Fix valid-adjtimex signed left-shift undefined behavior
| * 45289683c7 drm/amdgpu: Refine IB schedule error logging
| * a513ccd915 tools/power/turbostat: Fix uncore frequency file string
| * b002a1b321 MIPS: scall: Save thread_info.syscall unconditionally on entry
| * df541b658d gpu: host1x: Do not setup DMA for virtual devices
| * f6add0a6f7 blk-iocost: avoid out of bounds shift
| * 62b8582d93 scsi: target: Fix SELinux error when systemd-modules loads the target module
| * d38ca15be1 memblock tests: fix undefined reference to `BIT'
| * 223550f0e9 memblock tests: fix undefined reference to `panic'
| * 701248485b memblock tests: fix undefined reference to `early_pfn_to_nid'
| * e04539f513 btrfs: always clear PERTRANS metadata during commit
| * 66619d8ad3 btrfs: make btrfs_clear_delalloc_extent() free delalloc reserve
| * bc40c15851 tools/power turbostat: Fix Bzy_MHz documentation typo
| * fcdeb34d14 tools/power turbostat: Increase the limit for fd opened
| * 768b167281 tools/power turbostat: Fix added raw MSR output
| * 6fafe36617 firewire: ohci: mask bus reset interrupts between ISR and bottom half
| * 337f84a0ef ata: sata_gemini: Check clk_enable() result
| * 9c08b9a943 net: bcmgenet: Reset RBUF on first open
| * 8a26198186 block: fix overflow in blk_ioctl_discard()
| * 07e72fe943 ALSA: line6: Zero-initialize message buffers
| * c30a4ca93d scsi: ufs: core: WLUN suspend dev/link state error recovery
| * 7ec2581823 kbuild: Disable KCSAN for autogenerated *.mod.c intermediaries
| * fa6995eeb6 bpf: Check bloom filter map value size
| * 681fb3c25d btrfs: return accurate error code on open failure in open_fs_devices()
| * 1150606d47 scsi: bnx2fc: Remove spin_lock_bh while releasing resources after upload
| * 5f0266044d scsi: mpi3mr: Avoid memcpy field-spanning write WARNING
| * 2a1dc2e942 net: mark racy access on sk->sk_rcvbuf
| * d6275e1028 wifi: cfg80211: fix rdev_dump_mpp() arguments order
| * ec9727406e wifi: mac80211: fix ieee80211_bss_*_flags kernel-doc
| * 5f1d833429 gfs2: Fix invalid metadata access in punch_hole
| * 6503c39398 scsi: lpfc: Release hbalock before calling lpfc_worker_wake_up()
| * e25dca8db0 scsi: lpfc: Replace hbalock with ndlp lock in lpfc_nvme_unregister_port()
| * 645b6a5e02 scsi: lpfc: Update lpfc_ramp_down_queue_handler() logic
| * 0936809d96 scsi: lpfc: Move NPIV's transport unregistration to after resource clean up
| * 3a5b0378ac KVM: arm64: vgic-v2: Check for non-NULL vCPU in vgic_v2_parse_attr()
| * a2184f533f KVM: arm64: vgic-v2: Use cpuid from userspace as vcpu_id
| * 7fb5793c53 powerpc/pseries/iommu: LPAR panics during boot up with a frozen PE
| * 15e1f8425f powerpc/pseries: make max polling consistent for longer H_CALLs
| * 0b59ae6b5f powerpc/pseries: Move PLPKS constants to header file
| * 5aa59e14ec powerpc/pseries: replace kmalloc with kzalloc in PLPKS driver
| * 70f64cb290 clk: sunxi-ng: h6: Reparent CPUX during PLL CPUX rate change
| * 463c15af49 net: gro: add flush check in udp_gro_receive_segment
| * 3a1ea8a265 drm/panel: ili9341: Use predefined error codes
| * f51181ac91 drm/panel: ili9341: Respect deferred probe
| * 10cb803aff s390/qeth: Fix kernel panic after setting hsuid
| * 51ad57c9b0 vxlan: Pull inner IP header in vxlan_rcv().
| * d03a82f4f8 tipc: fix a possible memleak in tipc_buf_append
| * 989bf6fd1e net: core: reject skb_copy(_expand) for fraglist GSO skbs
| * cd37a5a08c net: bridge: fix multicast-to-unicast with fraglist GSO
| * e005d6754e spi: fix null pointer dereference within spi_sync
| * 7e52c09c28 net: dsa: mv88e6xxx: Fix number of databases for 88E6141 / 88E6341
| * 3636dcdafb cxgb4: Properly lock TX queue for the selftest.
| * 10452edd17 s390/cio: Ensure the copied buf is NUL terminated
| * 722d33c442 ALSA: hda: intel-sdw-acpi: fix usage of device_get_named_child_node()
| * 21d458ecf4 ASoC: meson: cards: select SND_DYNAMIC_MINORS
| * 46071eeb0b ASoC: meson: axg-tdm-interface: manage formatters in trigger
| * f0f8ec97ac ASoC: meson: axg-card: make links nonatomic
| * d41a1d5c45 ASoC: meson: axg-fifo: use threaded irq to check periods
| * 821b719884 ASoC: meson: axg-fifo: use FIELD helpers
| * 52f6ac8639 net: qede: use return from qede_parse_actions()
| * 3f4a70e2ff net: qede: use return from qede_parse_flow_attr() for flow_spec
| * de5f3a63a9 net: qede: use return from qede_parse_flow_attr() for flower
| * 3b588a16ac net: qede: sanitize 'rc' in qede_add_tc_flower_fltr()
| * 160e19b95b s390/vdso: Add CFI for RA register to asm macro vdso_func
| * 39a055e607 net l2tp: drop flow hash on forward
| * 37ed6f244e nsh: Restore skb->{protocol,data,mac_header} for outer header in nsh_gso_segment().
| * 8f11fe3ea3 octeontx2-af: avoid off-by-one read from userspace
| * 06cb37e2ba bna: ensure the copied buf is NUL terminated
| * 272bfb019f xdp: use flags field to disambiguate broadcast redirect
| * a4b30f548a s390/mm: Fix clearing storage keys for huge pages
| * 5dbc158805 s390/mm: Fix storage key clearing for guest huge pages
| * 67a8dbe10b bpf, arm64: Fix incorrect runtime stats
| * d97e7ab8c8 spi: hisi-kunpeng: Delete the dump interface of data registers in debugfs
| * 5d6e336b9e spi: axi-spi-engine: fix version format string
| * 0308cf64a1 spi: axi-spi-engine: use common AXI macros
| * cde20c4150 spi: axi-spi-engine: move msg state to new struct
| * 657f211713 spi: axi-spi-engine: use devm_spi_alloc_host()
| * be632e909c spi: axi-spi-engine: simplify driver data allocation
| * aec8b34ec0 spi: spi-axi-spi-engine: Use helper function devm_clk_get_enabled()
| * d8309051f7 spi: spi-axi-spi-engine: switch to use modern name
| * 4a680d305e spi: axi-spi-engine: Convert to platform remove callback returning void
| * 1a8183ccf0 spi: introduce new helpers with using modern naming
| * 77fe00227f bpf: Fix a verifier verbose message
| * 264327b716 nvme: fix warn output about shared namespaces without CONFIG_NVME_MULTIPATH
| * 39dc9e1442 bpf, skmsg: Fix NULL pointer dereference in sk_psock_skb_ingress_enqueue
| * a81bcc6abf bpf, kconfig: Fix DEBUG_INFO_BTF_MODULES Kconfig definition
| * a4a645d96b regulator: change devm_regulator_get_enable_optional() stub to return Ok
| * 2ec0e92dc5 regulator: change stubbed devm_regulator_get_enable to return Ok
| * ed6877bce6 regulator: mt6360: De-capitalize devicetree regulator subnodes
| * 518d5ddafe pinctrl: devicetree: fix refcount leak in pinctrl_dt_to_map()
| * 22975a1eb6 power: supply: mt6360_charger: Fix of_match for usb-otg-vbus regulator
| * 030017a83d power: rt9455: hide unused rt9455_boost_voltage_values
| * 39460d43df pinctrl: baytrail: Fix selecting gpio pinctrl state
| * 91a0840a3c pinctrl: intel: Make use of struct pinfunction and PINCTRL_PINFUNCTION()
| * 6322e368f0 pinctrl: Introduce struct pinfunction and PINCTRL_PINFUNCTION() macro
| * 8ae63bd858 nfs: Handle error of rpc_proc_register() in nfs_net_init().
| * 2b7f2d663a nfs: make the rpc_stat per net namespace
| * 9dd86e9d34 nfs: expose /proc/net/sunrpc/nfs in net namespaces
| * 5720cd5264 sunrpc: add a struct rpc_stats arg to rpc_create_args
| * 8a6c8f2876 pinctrl: mediatek: paris: Rework support for PIN_CONFIG_{INPUT,OUTPUT}_ENABLE
| * 4880cc2233 pinctrl: mediatek: paris: Fix PIN_CONFIG_INPUT_SCHMITT_ENABLE readback
| * ac7d657958 pinctrl: core: delete incorrect free in pinctrl_enable()
| * 8d93303fd0 pinctrl/meson: fix typo in PDM's pin name
| * ee2b22d388 pinctrl: pinctrl-aspeed-g6: Fix register offset for pinconf of GPIOR-T
| * 98c7ed29cd smb3: missing lock when picking channel
| * ff03a8b422 cifs: use the least loaded channel for sending requests
| * fe73628b30 kbuild: specify output names separately for each emission type from rustc
| * d73ba54dad kbuild: refactor host*_flags
| * 4c806333ef mm/hugetlb: fix missing hugetlb_lock for resv uncharge
| * cc8f0d90ba mm/hugetlb_cgroup: convert hugetlb_cgroup_uncharge_page() to folios
| * 10de76f4cd mm/hugetlb: convert free_huge_page to folios
| * fc50e09b8b mm/hugetlb_cgroup: convert hugetlb_cgroup_from_page() to folios
| * 8080591648 mm/hugetlb_cgroup: convert __set_hugetlb_cgroup() to folios
| * 6b27a1f253 mm/hugetlb: add folio_hstate()
| * 6a8af731a1 mm/hugetlb: add hugetlb_folio_subpool() helpers
| * 271227f13f mm: add private field of first tail to struct page and struct folio
| * 3283a9894d mm/hugetlb: add folio support to hugetlb specific flag macros
| * ad643241d4 Bluetooth: qca: add support for QCA2066
| * c43e5028f5 eeprom: at24: fix memory corruption race condition
| * 8a9ae7e741 eeprom: at24: Probe for DDR3 thermal sensor in the SPD case
| * 7b05bb82ac eeprom: at24: Use dev_err_probe for nvmem register failure
| * e26c2fadef rust: kernel: require `Send` for `Module` implementations
| * b0db4caa10 wifi: nl80211: don't free NULL coalescing rule
| * c376f7ab28 dmaengine: Revert "dmaengine: pl330: issue_pending waits until WFP state"
| * 24369172a0 dmaengine: pl330: issue_pending waits until WFP state
* f35d32242b Reapply "timers: Rename del_timer_sync() to timer_delete_sync()"
* 5b7c58806e Merge branch 'android14-6.1' into branch 'android14-6.1-lts'
* 2b896ed3a2 Merge branch 'android14-6.1' into branch 'android14-6.1-lts'

Change-Id: I0ccb668b0bd397871bf4cdf9b68176edb682cd7a
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-08-27 11:55:58 +00:00
Rick Yiu
42515e9246 ANDROID: sched: Add android_vh_set_task_comm
Vendor may have specific actions after task renamed.

Bug: 357956265
Change-Id: I78263dc023af6fd1ee2db03eee4ccb3ca3ebb278
Signed-off-by: Rick Yiu <rickyiu@google.com>
2024-08-26 19:43:55 +00:00
John Stultz
0f23336b97 BACKPORT: UPSTREAM: sched: Move psi_account_irqtime() out of update_rq_clock_task() hotpath
It was reported that in moving to 6.1, a larger then 10%
regression was seen in the performance of
clock_gettime(CLOCK_THREAD_CPUTIME_ID,...).

Using a simple reproducer, I found:
5.10:
100000000 calls in 24345994193 ns => 243.460 ns per call
100000000 calls in 24288172050 ns => 242.882 ns per call
100000000 calls in 24289135225 ns => 242.891 ns per call

6.1:
100000000 calls in 28248646742 ns => 282.486 ns per call
100000000 calls in 28227055067 ns => 282.271 ns per call
100000000 calls in 28177471287 ns => 281.775 ns per call

The cause of this was finally narrowed down to the addition of
psi_account_irqtime() in update_rq_clock_task(), in commit
52b1364ba0 ("sched/psi: Add PSI_IRQ to track IRQ/SOFTIRQ
pressure").

In my initial attempt to resolve this, I leaned towards moving
all accounting work out of the clock_gettime() call path, but it
wasn't very pretty, so it will have to wait for a later deeper
rework. Instead, Peter shared this approach:

Rework psi_account_irqtime() to use its own psi_irq_time base
for accounting, and move it out of the hotpath, calling it
instead from sched_tick() and __schedule().

In testing this, we found the importance of ensuring
psi_account_irqtime() is run under the rq_lock, which Johannes
Weiner helpfully explained, so also add some lockdep annotations
to make that requirement clear.

With this change the performance is back in-line with 5.10:
6.1+fix:
100000000 calls in 24297324597 ns => 242.973 ns per call
100000000 calls in 24318869234 ns => 243.189 ns per call
100000000 calls in 24291564588 ns => 242.916 ns per call

Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Juri Lelli <juri.lelli@redhat.com>
Cc: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Ben Segall <bsegall@google.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Daniel Bristot de Oliveira <bristot@redhat.com>
Cc: Valentin Schneider <vschneid@redhat.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Chengming Zhou <zhouchengming@bytedance.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Frederic Weisbecker <frederic@kernel.org>
Cc: Qais Yousef <qyousef@layalina.io>
Cc: Joel Fernandes <joel@joelfernandes.org>
Cc: kernel-team@android.com

Reported-by: Jimmy Shiu <jimmyshiu@google.com>
Originally-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: John Stultz <jstultz@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Chengming Zhou <chengming.zhou@linux.dev>
Reviewed-by: Qais Yousef <qyousef@layalina.io>
Link: https://lore.kernel.org/r/20240618215909.4099720-1-jstultz@google.com
Change-Id: I5c4f04d047ca0aa11fccaec9a034dfe60dbeb295
Bug: 343748421
(cherry picked from commit ddae0ca2a8fe12d0e24ab10ba759c3fbd755ada8)
[jstultz: Backported and reworked to use per-cpu values instead of
 adding a field to the struct rq]
Signed-off-by: John Stultz <jstultz@google.com>
2024-08-26 17:50:58 +00:00
Carlos Llamas
370ea8bc2e FROMLIST: binder: fix UAF caused by offsets overwrite
Binder objects are processed and copied individually into the target
buffer during transactions. Any raw data in-between these objects is
copied as well. However, this raw data copy lacks an out-of-bounds
check. If the raw data exceeds the data section size then the copy
overwrites the offsets section. This eventually triggers an error that
attempts to unwind the processed objects. However, at this point the
offsets used to index these objects are now corrupted.

Unwinding with corrupted offsets can result in decrements of arbitrary
nodes and lead to their premature release. Other users of such nodes are
left with a dangling pointer triggering a use-after-free. This issue is
made evident by the following KASAN report (trimmed):

  ==================================================================
  BUG: KASAN: slab-use-after-free in _raw_spin_lock+0xe4/0x19c
  Write of size 4 at addr ffff47fc91598f04 by task binder-util/743

  CPU: 9 UID: 0 PID: 743 Comm: binder-util Not tainted 6.11.0-rc4 #1
  Hardware name: linux,dummy-virt (DT)
  Call trace:
   _raw_spin_lock+0xe4/0x19c
   binder_free_buf+0x128/0x434
   binder_thread_write+0x8a4/0x3260
   binder_ioctl+0x18f0/0x258c
  [...]

  Allocated by task 743:
   __kmalloc_cache_noprof+0x110/0x270
   binder_new_node+0x50/0x700
   binder_transaction+0x413c/0x6da8
   binder_thread_write+0x978/0x3260
   binder_ioctl+0x18f0/0x258c
  [...]

  Freed by task 745:
   kfree+0xbc/0x208
   binder_thread_read+0x1c5c/0x37d4
   binder_ioctl+0x16d8/0x258c
  [...]
  ==================================================================

To avoid this issue, let's check that the raw data copy is within the
boundaries of the data section.

Fixes: 6d98eb95b4 ("binder: avoid potential data leakage when copying txn")
Cc: Todd Kjos <tkjos@google.com>
Cc: stable@vger.kernel.org
Signed-off-by: Carlos Llamas <cmllamas@google.com>

Bug: 352520660
Link: https://lore.kernel.org/all/20240822182353.2129600-1-cmllamas@google.com/
Change-Id: I1b2dd8403b63e5eeb58904558b7b542141c83fc2
Signed-off-by: Carlos Llamas <cmllamas@google.com>
2024-08-26 16:41:49 +00:00
Carlos Llamas
f8f9a197f4 ANDROID: binder: fix KMI-break due to proc->dmap
Add 'struct binder_proc_wrap' to support the addition of new members in
'struct binder_proc' without breaking the KMI. In this case, proc->dmap
was backported from upstream and needs to be migrated into this wrapper.

Avoids the following KMI issue:

  function symbol 'int __traceiter_binder_transaction_received(void*, struct binder_transaction*)' changed
    CRC changed from 0x74e9c98b to 0x7af6cf5a

  type 'struct binder_proc' changed
    byte size changed from 584 to 600
    member 'struct dbitmap dmap' was added
    16 members ('struct list_head todo' .. 'u64 android_oem_data1') changed
      offset changed by 128

Bug: 298520209
Change-Id: Icbbee14a8f16d0881faf8d5673582e785f98e8cf
Signed-off-by: Carlos Llamas <cmllamas@google.com>
(cherry picked from commit af55892f201c8f709725d75d306b1cdd20984b97)
[cmllamas: merge binder_proc_wrap_entry() with new proc_wrapper()]
Signed-off-by: Carlos Llamas <cmllamas@google.com>
2024-08-23 16:56:13 +00:00
Carlos Llamas
a55053f3a8 UPSTREAM: binder: fix descriptor lookup for context manager
In commit 15d9da3f818c ("binder: use bitmap for faster descriptor
lookup"), it was incorrectly assumed that references to the context
manager node should always get descriptor zero assigned to them.

However, if the context manager dies and a new process takes its place,
then assigning descriptor zero to the new context manager might lead to
collisions, as there could still be references to the older node. This
issue was reported by syzbot with the following trace:

  kernel BUG at drivers/android/binder.c:1173!
  Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP
  Modules linked in:
  CPU: 1 PID: 447 Comm: binder-util Not tainted 6.10.0-rc6-00348-g31643d84b8c3 #10
  Hardware name: linux,dummy-virt (DT)
  pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
  pc : binder_inc_ref_for_node+0x500/0x544
  lr : binder_inc_ref_for_node+0x1e4/0x544
  sp : ffff80008112b940
  x29: ffff80008112b940 x28: ffff0e0e40310780 x27: 0000000000000000
  x26: 0000000000000001 x25: ffff0e0e40310738 x24: ffff0e0e4089ba34
  x23: ffff0e0e40310b00 x22: ffff80008112bb50 x21: ffffaf7b8f246970
  x20: ffffaf7b8f773f08 x19: ffff0e0e4089b800 x18: 0000000000000000
  x17: 0000000000000000 x16: 0000000000000000 x15: 000000002de4aa60
  x14: 0000000000000000 x13: 2de4acf000000000 x12: 0000000000000020
  x11: 0000000000000018 x10: 0000000000000020 x9 : ffffaf7b90601000
  x8 : ffff0e0e48739140 x7 : 0000000000000000 x6 : 000000000000003f
  x5 : ffff0e0e40310b28 x4 : 0000000000000000 x3 : ffff0e0e40310720
  x2 : ffff0e0e40310728 x1 : 0000000000000000 x0 : ffff0e0e40310710
  Call trace:
   binder_inc_ref_for_node+0x500/0x544
   binder_transaction+0xf68/0x2620
   binder_thread_write+0x5bc/0x139c
   binder_ioctl+0xef4/0x10c8
  [...]

This patch adds back the previous behavior of assigning the next
non-zero descriptor if references to previous context managers still
exist. It amends both strategies, the newer dbitmap code and also the
legacy slow_desc_lookup_olocked(), by allowing them to start looking
for available descriptors at a given offset.

Fixes: 15d9da3f818c ("binder: use bitmap for faster descriptor lookup")
Cc: stable@vger.kernel.org
Reported-and-tested-by: syzbot+3dae065ca76952a67257@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/all/000000000000c1c0a0061d1e6979@google.com/
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Link: https://lore.kernel.org/r/20240722150512.4192473-1-cmllamas@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 298520209
Change-Id: I5b888c138163eff263239ebcc85c59cd7f26d64f
(cherry picked from commit 11512c197d387b59569d3a93af93de204d3bdaa6)
Signed-off-by: Carlos Llamas <cmllamas@google.com>
2024-08-23 16:56:03 +00:00
Carlos Llamas
c5f1e68340 BACKPORT: binder: use bitmap for faster descriptor lookup
When creating new binder references, the driver assigns a descriptor id
that is shared with userspace. Regrettably, the driver needs to keep the
descriptors small enough to accommodate userspace potentially using them
as Vector indexes. Currently, the driver performs a linear search on the
rb-tree of references to find the smallest available descriptor id. This
approach, however, scales poorly as the number of references grows.

This patch introduces the usage of bitmaps to boost the performance of
descriptor assignments. This optimization results in notable performance
gains, particularly in processes with a large number of references. The
following benchmark with 100,000 references showcases the difference in
latency between the dbitmap implementation and the legacy approach:

  [  587.145098] get_ref_desc_olocked: 15us (dbitmap on)
  [  602.788623] get_ref_desc_olocked: 47343us (dbitmap off)

Note the bitmap size is dynamically adjusted in line with the number of
references, ensuring efficient memory usage. In cases where growing the
bitmap is not possible, the driver falls back to the slow legacy method.

A previous attempt to solve this issue was proposed in [1]. However,
such method involved adding new ioctls which isn't great, plus older
userspace code would not have benefited from the optimizations either.

Link: https://lore.kernel.org/all/20240417191418.1341988-1-cmllamas@google.com/ [1]
Cc: Tim Murray <timmurray@google.com>
Cc: Arve Hjønnevåg <arve@android.com>
Cc: Alice Ryhl <aliceryhl@google.com>
Cc: Martijn Coenen <maco@android.com>
Cc: Todd Kjos <tkjos@android.com>
Cc: John Stultz <jstultz@google.com>
Cc: Steven Moreland <smoreland@google.com>
Suggested-by: Nick Chen <chenjia3@oppo.com>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Link: https://lore.kernel.org/r/20240612042535.1556708-1-cmllamas@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 298520209
Change-Id: Iaf32794ab7786c603706f6806cabec9d031559a2
(cherry picked from commit 15d9da3f818cae676f822a04407d3c17b53357d2)
[cmllamas: fixed trivial conflicts with KMI work-around]
Signed-off-by: Carlos Llamas <cmllamas@google.com>
2024-08-23 16:55:46 +00:00
Peter Zijlstra
514bdc80b9 UPSTREAM: perf/core: Fix potential NULL deref
Smatch is awesome.

BUG: 361274701
(cherry picked from commit a71ef31485)
Fixes: 32671e3799 ("perf: Disallow mis-matched inherited group reads")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Change-Id: I7691e0aaaee70f1d0db3d1e33983d7236f72ed0c
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: 杨辉 <yanghui10@xiaomi.corp-partner.google.com>
2024-08-22 17:25:38 +00:00
Peter Wang
faf32723dc BACKPORT: scsi: ufs: core: Fix ufshcd_abort_one racing issue
When ufshcd_abort_one is racing with the completion ISR, the completed tag
of the request's mq_hctx pointer will be set to NULL by ISR.  Return
success when request is completed by ISR because ufshcd_abort_one does not
need to do anything.

The racing flow is:

Thread A
ufshcd_err_handler					step 1
	...
	ufshcd_abort_one
		ufshcd_try_to_abort_task
			ufshcd_cmd_inflight(true)	step 3
		ufshcd_mcq_req_to_hwq
			blk_mq_unique_tag
				rq->mq_hctx->queue_num	step 5

Thread B
ufs_mtk_mcq_intr(cq complete ISR)			step 2
	scsi_done
		...
		__blk_mq_free_request
			rq->mq_hctx = NULL;		step 4

Below is KE back trace.
  ufshcd_try_to_abort_task: cmd at tag 41 not pending in the device.
  ufshcd_try_to_abort_task: cmd at tag=41 is cleared.
  Aborting tag 41 / CDB 0x28 succeeded
  Unable to handle kernel NULL pointer dereference at virtual address 0000000000000194
  pc : [0xffffffddd7a79bf8] blk_mq_unique_tag+0x8/0x14
  lr : [0xffffffddd6155b84] ufshcd_mcq_req_to_hwq+0x1c/0x40 [ufs_mediatek_mod_ise]
   do_mem_abort+0x58/0x118
   el1_abort+0x3c/0x5c
   el1h_64_sync_handler+0x54/0x90
   el1h_64_sync+0x68/0x6c
   blk_mq_unique_tag+0x8/0x14
   ufshcd_err_handler+0xae4/0xfa8 [ufs_mediatek_mod_ise]
   process_one_work+0x208/0x4fc
   worker_thread+0x228/0x438
   kthread+0x104/0x1d4
   ret_from_fork+0x10/0x20

Bug: 361140026

Fixes: 93e6c0e19d5b ("scsi: ufs: core: Clear cmd if abort succeeds in MCQ mode")
Suggested-by: Bart Van Assche <bvanassche@acm.org>
Change-Id: I42f9b93dae33eac8cf41ac3085858b6adf0ee9ee
Signed-off-by: Peter Wang <peter.wang@mediatek.com>
Link: https://lore.kernel.org/r/20240628070030.30929-3-peter.wang@mediatek.com
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 74736103fb4123c71bf11fb7a6abe7c884c5269e)
[ Resolved minor conflict in drivers/ufs/core/ufshcd.c ]
2024-08-21 18:22:23 +00:00
Peter Wang
4d735ca7bb BACKPORT: scsi: ufs: core: Fix ufshcd_clear_cmd racing issue
When ufshcd_clear_cmd is racing with the completion ISR, the completed tag
of the request's mq_hctx pointer will be set to NULL by the ISR.  And
ufshcd_clear_cmd's call to ufshcd_mcq_req_to_hwq will get NULL pointer KE.
Return success when the request is completed by ISR because sq does not
need cleanup.

The racing flow is:

Thread A
ufshcd_err_handler					step 1
	ufshcd_try_to_abort_task
		ufshcd_cmd_inflight(true)		step 3
		ufshcd_clear_cmd
			...
			ufshcd_mcq_req_to_hwq
			blk_mq_unique_tag
				rq->mq_hctx->queue_num	step 5

Thread B
ufs_mtk_mcq_intr(cq complete ISR)			step 2
	scsi_done
		...
		__blk_mq_free_request
			rq->mq_hctx = NULL;		step 4

Below is KE back trace:

  ufshcd_try_to_abort_task: cmd pending in the device. tag = 6
  Unable to handle kernel NULL pointer dereference at virtual address 0000000000000194
   pc : [0xffffffd589679bf8] blk_mq_unique_tag+0x8/0x14
   lr : [0xffffffd5862f95b4] ufshcd_mcq_sq_cleanup+0x6c/0x1cc [ufs_mediatek_mod_ise]
   Workqueue: ufs_eh_wq_0 ufshcd_err_handler [ufs_mediatek_mod_ise]
   Call trace:
    dump_backtrace+0xf8/0x148
    show_stack+0x18/0x24
    dump_stack_lvl+0x60/0x7c
    dump_stack+0x18/0x3c
    mrdump_common_die+0x24c/0x398 [mrdump]
    ipanic_die+0x20/0x34 [mrdump]
    notify_die+0x80/0xd8
    die+0x94/0x2b8
    __do_kernel_fault+0x264/0x298
    do_page_fault+0xa4/0x4b8
    do_translation_fault+0x38/0x54
    do_mem_abort+0x58/0x118
    el1_abort+0x3c/0x5c
    el1h_64_sync_handler+0x54/0x90
    el1h_64_sync+0x68/0x6c
    blk_mq_unique_tag+0x8/0x14
    ufshcd_clear_cmd+0x34/0x118 [ufs_mediatek_mod_ise]
    ufshcd_try_to_abort_task+0x2c8/0x5b4 [ufs_mediatek_mod_ise]
    ufshcd_err_handler+0xa7c/0xfa8 [ufs_mediatek_mod_ise]
    process_one_work+0x208/0x4fc
    worker_thread+0x228/0x438
    kthread+0x104/0x1d4
    ret_from_fork+0x10/0x20

Bug: 361140026

Fixes: 8d72903489 ("scsi: ufs: mcq: Add supporting functions for MCQ abort")
Suggested-by: Bart Van Assche <bvanassche@acm.org>
Change-Id: I59fc0a8246d2fc2421e38c42b619b2393d2b22e6
Signed-off-by: Peter Wang <peter.wang@mediatek.com>
Link: https://lore.kernel.org/r/20240628070030.30929-2-peter.wang@mediatek.com
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 9307a998cb9846a2557fdca286997430bee36a2a)
[ Resolved minor conflict in drivers/ufs/core/ufshcd.c ]
2024-08-21 18:22:23 +00:00