summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
13 daysselftests: mptcp: lib: dump nstat for the right testMatthieu Baerts (NGI0)
In case of errors, mptcp_lib_pr_nstat is called to dump the nstat counters, but for some tests, it was dumping the counters for all subtests, not just the current one. That's an issue for tests that don't recreate the netns for each subtest, e.g. mptcp_connect.sh. In this case, 'nstat -a' will look at the absolute counters since the creation of the netns, making debugging harder. Instead, it should dump the counters for the current test, by using the history recorded in /tmp/<ns>.nstat if available, and not using '-a' which was dumping the absolute values instead of calculating increments. While at it, rename the previous 'hist' variable to 'cache' as it was used to look at the cache, not the nstat history. Fixes: 658e53141780 ("selftests: mptcp: join: dump stats from history") Cc: stable@vger.kernel.org Reviewed-by: Geliang Tang <geliang@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://patch.msgid.link/20260908-net-mptcp-misc-fixes-7-3-rc1-v2-11-df1de70348b6@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
13 daysmptcp: remove unneeded READ_ONCE() annotationPaolo Abeni
The subflow->fully_established flag is always written under the subflow socket lock. Reading such value under the same lock does not require any ONCE annotation. Fixes: 581c8cbfa934 ("mptcp: annotate data-races around subflow->fully_established") Signed-off-by: Paolo Abeni <pabeni@redhat.com> Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://patch.msgid.link/20260908-net-mptcp-misc-fixes-7-3-rc1-v2-10-df1de70348b6@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
13 daysmptcp: pm: reset retrans_time when ADD_ADDR entry is reusedMatthieu Baerts (NGI0)
When an ADD_ADDR entry is reused, the timer is re-armed, because the goal is to re-announce an ADD_ADDR, and eventually retransmit it if needed. In this case, the retransmission counter should be reset as well, so the re-announced address gets its retransmissions back instead of relying on what was left before, and possibly not being able to retransmit it. Fixes: 304ab97f4c7c ("mptcp: allow ADD_ADDR reissuance by userspace PMs") Cc: stable@vger.kernel.org Link: https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260803-net-mptcp-misc-fixes-7-2-rc6-v2-0-b8f496d71664%40kernel.org?part=4 Reviewed-by: Mat Martineau <martineau@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://patch.msgid.link/20260908-net-mptcp-misc-fixes-7-3-rc1-v2-9-df1de70348b6@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
13 daysmptcp: pm: userspace: fix address ID overflowQing Luo
When all MPTCP address IDs (1-255) are exhausted in the userspace PM, find_next_zero_bit() returns MPTCP_PM_MAX_ADDR_ID + 1 (256). This value overflows when stored in the u8 field e->addr.id, resulting in ID 0 being stored and the entry being incorrectly added to the list. ID 0 is reserved for the initial connection in MPTCP, so this overflow can cause address conflicts. Note: the in-kernel PM already has an 'endpoints == MPTCP_PM_MAX_ADDR_ID' check in mptcp_pm_nl_append_new_local_addr() that returns -ERANGE before reaching find_next_zero_bit(), preventing this overflow. So this fix only addresses the userspace PM path. Check the find_next_zero_bit() result against MPTCP_PM_MAX_ADDR_ID and return -ENOSPC if all IDs are truly exhausted. Move the ID allocation check before the memory allocation so that the error path does not need to free the allocated entry. Fixes: 4638de5aefe5 ("mptcp: handle local addrs announced by userspace PMs") Cc: stable@vger.kernel.org Signed-off-by: Qing Luo <luoqing@kylinos.cn> Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://patch.msgid.link/20260908-net-mptcp-misc-fixes-7-3-rc1-v2-8-df1de70348b6@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
13 daysselftests: mptcp: fix an UAF in mptcp_connect.cGang Yan
At the end of 'sock_connect_mptcp()', it calls 'freeaddrinfo(addr)', the 'peer' pointer (which points into 'addr') remains. Later, the main loop uses this peer pointer for reconnection attempts. If the memory has been freed and reused, the address data could be overwritten, resulting in an invalid remote address. This patch keeps the addrinfo list allocated for the whole process lifetime so "peer" remains valid across reconnects; the memory will be released at exit() time. Fixes: 05be5e273c84 ("selftests: mptcp: add disconnect tests") Cc: stable@vger.kernel.org Suggested-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Gang Yan <yangang@kylinos.cn> Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://patch.msgid.link/20260908-net-mptcp-misc-fixes-7-3-rc1-v2-7-df1de70348b6@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
13 daysmptcp: prevent race between disconnect() and rtxPaolo Abeni
Sashiko noted that the two event can race, leading to inconsistent status. Prevent the race using the synchronous timer stop operation. Cc: stable@vger.kernel.org Fixes: b29fcfb54cd7 ("mptcp: full disconnect implementation") Signed-off-by: Paolo Abeni <pabeni@redhat.com> Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://patch.msgid.link/20260908-net-mptcp-misc-fixes-7-3-rc1-v2-6-df1de70348b6@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
13 daysmptcp: options: handle MPC data + csum reqd + no csumMatthieu Baerts (NGI0)
Before this modification, a remote peer could send an MP_CAPABLE with data, with the checksum flag set, but without adding the actual 2 bytes of checksum. As a result, uninitialised bytes could be used for the 'csum' field. That was not a critical issue, because this 'csum' field is only used to compare with the expected one, if previously negotiated in the 3WHS. Worst case, the checksum is likely wrong, a fallback is done without a reject if the negotiation was done earlier. That's OK. Yet, better to take the expected path with this case: only look at the checksum flag for MP_CAPABLEs not carrying a data-len. Such packet can be seen as a 3rd or 4th ACK. The RFC8684 mentions [1] that the 3rd packet should have the checksum flag set. When an MPC + ACK contains data, the checksum flag is redundant with the checksum field. It is not clear what should be done for the 4th ACK, nor if the flag has to be set if the checksum field is set. Therefore, it seems fine to only look at the presence of the checksum field, not to break the interaction with stacks that were not setting both. Note that linked to this checksum flag on the 3rd ACK, with the current implementation, we can have a situation where the SYN packets have no checksum flag, but the 3rd ACK has one, and this is the one that will be taken into account. First, that's clearly not directly linked to this patch, but Clashiko forced us to look at that. At the end, that seems fine to act like that: yes that's not how the negotiation should work, but being flexible without introducing side effects is also fine: fixing this would mean increasing the complexity, and that's not worth it. Fixes: 208e8f66926c ("mptcp: receive checksum for MP_CAPABLE with data") Cc: stable@vger.kernel.org Link: https://datatracker.ietf.org/doc/html/rfc8684#section-3.1-23 [1] Closes: https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260803-net-mptcp-misc-fixes-7-2-rc6-v2-0-b8f496d71664%40kernel.org?part=1 Reviewed-by: Mat Martineau <martineau@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://patch.msgid.link/20260908-net-mptcp-misc-fixes-7-3-rc1-v2-5-df1de70348b6@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
13 daysmptcp: pm: kernel: drop pending ADD_ADDR when removing ID0Kalpan Jani
The in-kernel MPTCP path manager can leave a stale ADD_ADDR announcement entry alive when removing the id 0 endpoint. This happens because the id 0 removal path does not tear down pending announcements, unlike the non-zero id path. When the PM later reselects id 0 after adding another signal endpoint, it finds the stale anno_list entry and hits WARN_ON_ONCE(mptcp_pm_is_kernel()) in mptcp_pm_announced_alloc(). Root cause: asymmetry between removal paths. - Non-zero id path: mptcp_nl_remove_subflow_and_signal_addr() calls mptcp_pm_remove_announced() to clean up. - Id 0 path: mptcp_nl_remove_id_zero_address() skips cleanup entirely. Fix by making the id 0 path symmetric: call mptcp_pm_announced_remove() and decrement add_addr_signaled before queuing the RM_ADDR. Subtle detail: signal endpoints are stored in anno_list with port 0, but msk_local carries the connection's local port. In other words, entries linked to ID0 paths should have port == 0. A follow-up patch will ensure that. mptcp_pm_announced_remove() uses use_port=true for comparison. So clear the port before the lookup. Fixes: 740d798e8767 ("mptcp: remove id 0 address") Cc: stable@vger.kernel.org Reported-by: syzbot+55c2a5c871441261ed14@syzkaller.appspotmail.com Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/620 Suggested-by: Tao Cui <cuitao@kylinos.cn> Signed-off-by: Kalpan Jani <kalpan.jani@mpiricsoftware.com> Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://patch.msgid.link/20260908-net-mptcp-misc-fixes-7-3-rc1-v2-4-df1de70348b6@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
13 daysmptcp: syncookies: remember the request backup flagMatthieu Baerts (NGI0)
Instead of using an uninitialised bit when copying the info in subflow_ulp_clone(). To fix this, no need to extend the join_entry structure: backup is coming from struct mptcp_subflow_request_sock, only one bit. Do the same here by using one bit for both. Fixes: efd340bf3d77 ("mptcp: distinguish rcv vs sent backup flag in requests") Cc: stable@vger.kernel.org Reviewed-by: Geliang Tang <geliang@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://patch.msgid.link/20260908-net-mptcp-misc-fixes-7-3-rc1-v2-3-df1de70348b6@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
13 daysmptcp: subflow: no need to copy thmac during ulp_cloneMatthieu Baerts (NGI0)
'thmac' is not used after that point. Indeed, subflow_ulp_clone() is called when the request on the passive side is over, so when the truncated HMAC is no longer needed. Note that in case of SYN cookies, thmac will not be initialised. So better to remove it to avoid a warning from debug tools like KMSAN for reading uninitialised data. Fixes: f296234c98a8 ("mptcp: Add handling of incoming MP_JOIN requests") Cc: stable@vger.kernel.org Reviewed-by: Geliang Tang <geliang@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://patch.msgid.link/20260908-net-mptcp-misc-fixes-7-3-rc1-v2-2-df1de70348b6@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
13 daysmptcp: do not reschedule the RTX timer for fallback socketsPaolo Abeni
On fallback socket the retrans timer is a quite convoluted no-op, but currently nothing prevents the MPTCP core to keep rescheduling it. Additionally gate RTX timer reset to the msk not being fallen back to TCP yet. To avoid adding multiple tests in fast-path, use a new flags bit for such condition. The RTX enable bit is clear at close time and set before the msk could start retransmitting, with a couple of caveats: - passive sockets inherit the bit from the listener msk; set the bit on such socket to avoid flipping it in the fast-path, even if the listener will obviously never retransmit. - while fastopening (MPTFO), mptcp_sendmsg_fastopen still ends-up calling mptcp_connect via tcp_sendmsg_fastopen -> __inet_stream_connect(ssk->sk_socket), and the first subflow's sk_socket points to the msk one. Fixes: b51f9b80c032 ("mptcp: introduce MPTCP retransmission timer") Cc: stable@vger.kernel.org Signed-off-by: Paolo Abeni <pabeni@redhat.com> Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://patch.msgid.link/20260908-net-mptcp-misc-fixes-7-3-rc1-v2-1-df1de70348b6@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
13 daysnet: dsa: tag_brcm: legacy FCS: request needed tailroomWeiming Shi
The legacy FCS tagger calculates the CRC over skb->len bytes starting at skb->data. When a nonlinear skb reaches the tagger, this reads past the linear head into unrelated slab memory. The tagger appends an Ethernet FCS but does not declare that tailroom. As a result, DSA leaves NETIF_F_SG and NETIF_F_FRAGLIST enabled on the user port, and nonlinear skbs can reach the CRC calculation. Declare the required tailroom. DSA will then clear those features and the networking core will linearize skbs before the tagger runs. A KASAN-enabled dsa_loop test using this tagger reports: BUG: KASAN: slab-out-of-bounds in crc32_le Read of size 1 at addr ffff8880397086c0 by task exp/135 Call Trace: crc32_le (lib/crc/crc32-main.c:38) brcm_leg_fcs_tag_xmit (net/dsa/tag_brcm.c:343) dsa_user_xmit (net/dsa/user.c:942) dev_hard_start_xmit (net/core/dev.c:3937) __dev_queue_xmit (net/core/dev.c:4926) packet_sendmsg (net/packet/af_packet.c:3110) __sys_sendto (net/socket.c:2281) The buggy address belongs to the object at ffff888039708400 which belongs to the cache skbuff_small_head of size 704 The buggy address is located 0 bytes to the right of allocated 704-byte region [ffff888039708400, ffff8880397086c0) Fixes: ef07df397a62 ("net: dsa: tag_brcm: add support for legacy FCS tags") Cc: stable@vger.kernel.org Reported-by: co+28eef7d8af9428e6@bugs.sh Closes: https://lore.kernel.org/all/jH6u350kaBRuqklDjd3k3BW4nWzp0tYRjq3p%40bugs.sh/ Signed-off-by: Weiming Shi <bestswngs@gmail.com> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> Link: https://patch.msgid.link/20260908165047.2786340-1-bestswngs@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
13 daysselftests: drv-net: warn if LOCAL_V6 has DAD or not kept on link downJakub Kicinski
napi_id.py intermittently fails to start its helper on Intel and Google HW runners: CMD: /srv/netdev/drivers/net/napi_id_helper 3001::1 37569 EXIT: 1 STDERR: bind failed: Cannot assign requested address Either keep_addr_on_down is not set or more likely the address is configured without nodad. Having to make sure that all tests always wait for DAD after impacting the link would be a whack-a-mole so we expect the env to have nodad and keep_addr_on_down set. Warn about both while validating the environment, and document this. We could fail completely but most tests don't impact the link so for quick local testing it'd be annoying to have to apply the settings. I hope the warninging stikes the right balance. Link: https://patch.msgid.link/20260908181956.1357684-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
13 daysperf python: Add flamegraph support to treportAlice Rogers
Implement a flamegraph widget that recursively walks down a tree splitting line segments based on their value (summed up periods across call chains). A visitor pattern is used so that the same logic can both draw the line segments and locate which segment had a mouse click. Add a tab for the flame graph widget. Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Co-developed-by: Ian Rogers <irogers@google.com> Signed-off-by: Ian Rogers <irogers@google.com> Signed-off-by: Alice Rogers <alice.mei.rogers@gmail.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
13 daysperf python: New treport scriptAlice Rogers
A textual app that displays the results of processing samples similar to perf report. The app displays a tree of first processes and then functions which drop down to show more detail on the functions they call. The functions with the largest number of samples are sorted first, after each function the percentage of time spent within it is highlighted. If more than one event is recorded then each event appears first, with the processes and functions sorted for that event beneath it. The app is written in python and requires the textual framework. Using the textual framework means that in most modern terminals the mouse is supported, the color scheme can be configured, and screenshots made. With perf report: ``` $ perf record -e cycles:u -g perf test -w brstack [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.008 MB perf.data (57 samples) ] $ perf report ... Samples: 57 of event 'cycles:u', Event count (approx.): 15907831 Children Self Command Shared Object Symbol - 88.86% 0.00% perf libc.so.6 [.] 0x000079b17df69ca8 0x79b17df69ca8 main handle_internal_command cmd_test - brstack - 84.27% brstack_bench - 40.69% brstack_foo brstack_bar 3.32% brstack_bar 3.31% brstack_bar 1.27% brstack_foo + 88.86% 0.00% perf perf [.] main + 88.86% 0.00% perf perf [.] handle_internal_command + 88.86% 0.00% perf perf [.] cmd_test + 88.86% 0.00% perf perf [.] brstack + 84.27% 40.26% perf perf [.] brstack_bench + 41.96% 30.71% perf perf [.] brstack_foo + 17.89% 17.89% perf perf [.] brstack_bar ``` With the treport script: ``` $ perf record -e cycles:u -g perf test -w brstack [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.008 MB perf.data (57 samples) ] $ tools/perf/python/treport.py O ReportApp Report ╸━━━━━━╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ▼ Profile └── ▼ cycles:u 100% └── ▼ perf (32963) 100% ├── ▼ /usr/lib/x86_64-linux-gnu/libc.so.6 0x79b17df6 │ └── ▼ main 56.1% │ └── ▼ handle_internal_command 56.1% │ └── ▼ cmd_test 56.1% │ └── ▼ brstack 56.1% ▁▁ │ ├── ▼ brstack_bench 52.6% │ │ ├── ▶ brstack_foo 24.6% │ │ └── brstack_bar 1.75% │ ├── brstack_foo 1.75% │ └── brstack_bar 1.75% ├── ▶ /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 ▌ ^q Quit ▏^p palette ``` Committer testing: One needs to install 'python-textual' to have this working. Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Co-developed-by: Ian Rogers <irogers@google.com> Signed-off-by: Ian Rogers <irogers@google.com> Signed-off-by: Alice Rogers <alice.mei.rogers@gmail.com> Link: https://lore.kernel.org/r/20260809051820.2436530-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
13 daysselftests: net: csum: filter packets by source address and portWillem de Bruijn
Add source address and port verification in recv_verify_packet_* and recv_udp: non-matching packets are skipped. The receiver reads from PF_PACKET and UDP sockets to verify incoming packets to test hardware checksum offload. It did not validate the packet source address or source port. During tests expecting an invalid checksum (-E) or zero checksum (-Z), background packets can fail the test. For -Z, build_packet_udp chooses a specific source port that causes the checksum to sum to zero. When running in receive-only mode (-R), call build_packet in do_rx to compute the expected source port so that source port filtering can be applied to -Z as well. Also - add an inter-packet delay to avoid drops from bursts. - remove a comment that is no longer correct. Fixes: 91a7de85600d ("selftests/net: add csum offload test") Signed-off-by: Willem de Bruijn <willemb@google.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20260908155537.813889-1-willemdebruijn.kernel@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
13 daysperf tool: Align structs in arrays in .clang-formatIan Rogers
Configure clang-format to ensure structs within arrays maintain left alignment inside tools/perf/.clang-format. This prevents standard formatting runs from arbitrarily squashing tabbed initialization pillars. Signed-off-by: Ian Rogers <irogers@google.com> Assisted-by: Antigravity:gemini-3.1-pro Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
13 daysperf tests: Improvements to build-test performanceIan Rogers
Replace hardcoded 'make' calls with '$(MAKE)' within tests/make to ensure GNU Make jobserver file descriptors are properly inherited by nested builds. Additionally, remove the notorious 'unexport MAKEFLAGS' from tools/perf/Makefile. This hack was originally added to prevent the wrapper's internal '-j$(JOBS)' override from crashing when parent jobserver tokens were present. Instead, use proper GNU Make conditionals to check for '-j' or 'jobserver' strings within MAKEFLAGS. If a jobserver is already orchestrating the build, gracefully back off and let GNU Make manage parallelism natively. Finally, optimize the 'out' target (which processes 'run_O' out-of-tree builds) by stripping sequential bottlenecks like $(call clean) from isolated tmp directories, and wrapping the target list in a parallel sub-make call. These combined changes enable 'build-test' out-of-tree targets to build completely concurrently without severing jobserver tokens. Unscientifically measured the change lowered the build-test from around 15 minutes to 10 minutes on a 28 threaded Alderlake CPU. Fixing the jobserver issues meant the machine remained somewhat usable while running the test. Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ian Rogers <irogers@google.com> Assisted-by: Antigravity:gemini-3.1-pro Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
13 daystools build: Add zstd to the binutils library feature testsArnaldo Carvalho de Melo
Recently zstd became needed with the binutils libraries, add it to the mix. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
13 daysperf tools gtk: Fix two hierarchy-view stack buffer overflowsMatt Turner
perf_gtk__show_hierarchy() builds a merged column header for the hierarchy view with unbounded strcat() calls into a 512-byte stack buffer. The pieces being appended come from tracepoint field names and sort-key headers in perf.data, so a file with enough dynamic sort keys or long enough field names overflows the buffer. perf_gtk__add_hierarchy_entries() has a related bug in the loop that formats each entry's value columns. fmt->entry()/fmt->color() return via scnprintf(), so ret is clamped to at most hpp->size - 1, but advance_hpp(hpp, ret + 2) doesn't clamp: when ret hits that maximum, ret + 2 exceeds hpp->size by one, and hpp->size (size_t) underflows to roughly SIZE_MAX. The next iteration's fmt->entry() then writes into the caller's stack buffer using that bogus size, a second overflow. That same loop also saves bf/size at the top of each iteration but only restored hpp->buf/hpp->size to them before recursing into non-leaf children. Leaf entries left the buffer state advanced from the format loop, so the next sibling in the traversal inherited a shrunk hpp->size and an already-advanced hpp->buf, eventually running hpp->size down to 0 and pointing bf past the end of the stack buffer for the strim(bf) call. Fix the header builder by tracking the write offset and using scnprintf() for each append, same pattern already used elsewhere in this file. Fix the entry loop by clamping the amount passed to advance_hpp() to what's actually left in the buffer, and by restoring hpp->buf/hpp->size unconditionally after formatting each entry instead of only before recursing. Both bugs predate the perf GTK UI's move to GTK 4; neither function is touched by that port. Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
13 daysperf tools: make the GTK4 report browser actually loadable at runtimeMatt Turner
perf report --gtk dlopen()s libperf-gtk.so, which expects to resolve symbols back against the running perf binary (callchain_param, symbol_conf, evsel__name, and friends live in perf, not the plugin). Two things broke that after the GTK 4 port: perf never passed -rdynamic, so none of its symbols were in its dynamic symbol table for a dlopen()ed plugin to find. Add -rdynamic to LDFLAGS when GTK4 support is enabled. annotated_source__hist_entry() was a static inline in annotate.h, so ui/gtk/annotate.c calling it pulled hashmap__find()'s expansion, hashmap_find(), into libperf-gtk.so as an undefined symbol. The only hashmap_find perf links against normally is libbpf's internal one (tools/lib/bpf/hashmap.c), built with -fvisibility=hidden, so it can never be exported to a dlopen()ed plugin regardless of LDFLAGS. Move annotated_source__hist_entry() into annotate.c as an ordinary exported function, so the plugin depends on it the same way it already depends on evsel__group_desc() and friends. With both fixes, a default 'make GTK4=1' build (libbpf statically linked) can dlopen() libperf-gtk.so and open the report browser without NO_LIBBPF=1 or manual LDFLAGS. Verified with perf report --gtk against real perf.data on a GTK4 desktop. Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
13 daystools: Port perf ui from GTK 2 to GTK 4Matt Turner
Port straight to GTK 4 rather than GTK 3, since GTK 4 is where new development happens and GTK 3 is old itself now. GTK 4 drops GtkContainer, GdkScreen, and the gtk_main()/ gtk_dialog_run() family perf's GTK UI relied on. Containers get per-widget setters (gtk_box_append() and friends), monitor geometry comes from GdkMonitor instead of GdkScreen, and the main and error-dialog loops become explicit GMainLoops quit from the "close-request" and "response" signals. Widgets are visible by default now, so gtk_widget_show_all()/set_no_show_all() go away, and the remaining gtk_widget_show()/gtk_widget_hide() calls become gtk_widget_set_visible() (with a small wrapper where "response" needs to pass gtk_widget_hide() as a callback, since it no longer exists as a plain function). gtk_ui_progress__finish() skips destroying a progress dialog that was never created, since gtk_window_destroy() asserts on NULL where the old widget destroy tolerated it. Two spots the GTK 2 to GTK 3 port had missed (builtin-annotate.c, ui/gtk/setup.c still using HAVE_GTK2_SUPPORT and gtk_main_quit()) are fixed to match. Runtime fallout from the new signal-driven loops: the error dialog's nested loop hung if the parent window closed (GTK_DIALOG_DESTROY_WITH_PARENT destroys without emitting "response"); gtk_info_bar_get_content_area() is gone, breaking GTK_INFO_BAR_SUPPORT; the progress dialog's static widget pointers dangled after a manual close; perf_gtk__error() and the warning functions reused an exhausted va_list when vasprintf() failed. The error loop is tracked in a list instead of a single pointer, since perf_gtk__error() can be called re-entrantly (the dialog isn't modal) and a lone global leaked the outer loop when that happened. The list is only ever touched from the main thread: perf_gtk__error() updates it while handling a dialog, and SIGINT/SIGQUIT/SIGTERM are deferred to a GLib source via g_unix_signal_add() rather than calling perf_gtk__exit() straight out of a real signal handler, so quitting on those signals is serialized with the list update instead of racing it from signal-handler context. SIGSEGV/SIGFPE keep a real handler, since they're synchronous faults with no "later" to defer to, but it's pared down to reporting and reraising the default disposition (perf_gtk__fatal_signal()): there's no safe way to run GTK/GLib code from the faulting context. stdarg.h, stdio.h, and string.h are now included explicitly where used (util.c, hists.c, annotate.c) rather than relying on transitive includes, which musl doesn't guarantee. The gtk4-infobar feature check is dropped: GtkInfoBar has existed unconditionally since GTK 3.10, so the check can only ever pass, and it was failing outright here anyway since gtk_info_bar_new() is deprecated and the check treats deprecation warnings as errors. HAVE_GTK_INFO_BAR_SUPPORT and its statusbar-only fallback go away; the info bar is now built unconditionally. Signed-off-by: Matt Turner <mattst88@gmail.com> Link: https://lore.kernel.org/r/20260908-perf-gtk2-v8-1-e90d5d155f0d@gmail.com [ Fixed up some patch fuzz ] [ Removed gtk2 from FEATURES_DISPLAY, it is opt-in use 'make VF=1' to see if it was detected ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
13 daysMerge tag 'for-net-2026-09-08' of ↵Jakub Kicinski
git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth Luiz Augusto von Dentz says: ==================== bluetooth pull request for net: Core: - hci_sysfs: Fix NULL pointer dereference in device_del() - hci_sync: Fix not setting CE length properly - btqcomsmd: destroy RPMsg endpoints before freeing hci_dev Drivers: - btmtk: Declare MT7920 (MT7961 1a) Bluetooth firmware - btusb: mediatek: Fix leaked runtime PM reference in reset - btusb: Fix leaked runtime PM reference in btusb_reset - btusb: Fix UAF of btusb_data by rx_work - btusb: Properly disable remote wakeup for MT7922/MT7925 on Ryzen platform - btintel_pcie: validate packet_len before skb_put_data - btintel_pcie: fix tx_handle bounds off-by-one - btrtl: Don't leak return code when parsing firmware format v2 * tag 'for-net-2026-09-08' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth: Bluetooth: btusb: Fix leaked runtime PM reference in btusb_reset Bluetooth: btusb: mediatek: Fix leaked runtime PM reference in reset Bluetooth: btqcomsmd: destroy RPMsg endpoints before freeing hci_dev Bluetooth: hci_sysfs: Fix NULL pointer dereference in device_del() Bluetooth: btmtk: Declare MT7920 (MT7961 1a) Bluetooth firmware Bluetooth: hci_sync: Fix not setting CE length properly Bluetooth: btintel_pcie: fix tx_handle bounds off-by-one Bluetooth: btintel_pcie: validate packet_len before skb_put_data Bluetooth: btrtl: Don't leak return code when parsing firmware format v2 Bluetooth: btusb: Fix UAF of btusb_data by rx_work Bluetooth: Properly disable remote wakeup for MT7922/MT7925 on Ryzen platform ==================== Link: https://patch.msgid.link/20260908212127.1022197-1-luiz.dentz@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
13 daysdrm/xe/sysctrl: Add helper to check oCode firmware readinessAnoop Vijay
Add xe_sysctrl_is_oobmsm_fw_ready(), a convenience wrapper around xe_sysctrl_check_app_status() to check oCode application readiness. Signed-off-by: Anoop Vijay <anoop.c.vijay@intel.com> Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com> Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com> Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com> Link: https://patch.msgid.link/20260904134935.674507-6-anoop.c.vijay@intel.com
13 daysdrm/xe/sysctrl: Add helper to query application statusAnoop Vijay
Add xe_sysctrl_check_app_status() to query the state of a System Controller application using get_app_status_by_id mailbox command. The helper maps xe_sysctrl_app_id values to firmware application IDs and returns the reported application state. Add a convenience wrapper to check diag firmware application readiness. Signed-off-by: Anoop Vijay <anoop.c.vijay@intel.com> Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com> Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com> Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com> Link: https://patch.msgid.link/20260904134935.674507-5-anoop.c.vijay@intel.com
13 daysbpf: Disallow bpf_skb_pull_data() for LWT_SEG6LOCALWeiming Shi
An LWT_SEG6LOCAL program can invalidate its cached SRH with bpf_lwt_seg6_adjust_srh() and then call bpf_skb_pull_data(). The latter may reallocate skb->head, leaving the per-CPU SRH pointer dangling. Post-program SRH validation then writes through that pointer. Disallow bpf_skb_pull_data() for LWT_SEG6LOCAL programs so the verifier rejects this unsafe helper combination. Other LWT program types continue to expose the helper through lwt_out_func_proto(). Fixes: 004d4b274e2a ("ipv6: sr: Add seg6local action End.BPF") Reported-by: co+adfca3e91be95776@bugs.sh Suggested-by: Alexei Starovoitov <alexei.starovoitov@gmail.com> Signed-off-by: Weiming Shi <bestswngs@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Reviewed-by: Emil Tsalapatis <emil@etsalapatis.com> Closes: https://lore.kernel.org/all/GCy0KRM2IcQGoJQTjJEU9D0maBxXzEDHuQpq@bugs.sh/ Link: https://lore.kernel.org/bpf/DL9COXZQXX4V.1FN45QO2Q77ZH@gmail.com/ Link: https://lore.kernel.org/bpf/20260909040807.3885815-2-bestswngs@gmail.com
13 dayshte: tegra194-test: shut down timer before GPIO releaseRunyu Xiao
tegra_hte_test_remove() releases GPIO descriptors before stopping hte.timer. gpio_timer_cb() accesses hte.gpio_out and rearms the timer, so a callback concurrent with remove can use a released descriptor and rearm after teardown. Shut down the timer before releasing the GPIO descriptors. timer_shutdown_sync() waits for a running callback and prevents it from being rearmed. Fixes: 9a75a7cd03c9 ("hte: Add Tegra HTE test driver") Cc: stable@vger.kernel.org Assisted-by: Codex:GPT-5 Signed-off-by: Runyu Xiao <runyu.xiao@seu.edu.cn> Acked-by: Dipen Patel <dipenp@nvidia.com> Signed-off-by: Dipen Patel <dipenp@nvidia.com>
13 daysMerge tag 'landlock-7.3-rc3' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux Pull Landlock fixes from Mickaël Salaün: "This fixes a use-after-free and a lockdep assert NULL dereferencing, and properly truncates too-long strings printed by a Landlock tracepoint. Most of the changes are brought by new tests" * tag 'landlock-7.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux: landlock: Test trace path output boundaries landlock: Bound escaped trace path output landlock: Clean up ruleset validation checks selftests/landlock: Test abstract socket trace name limits landlock: Fix use-after-free of the source's parent directory
13 dayswifi: ath12k: preserve PPDU state across monitor status buffersKang Yang
A monitor PPDU may span multiple status buffers. However, __ath12k_wifi7_dp_mon_process_ring() clears mon_ppdu_info before processing every buffer. As a result, continuation buffers lose PPDU state collected from earlier buffers, including ppdu_id and PHY metadata. This can cause monitor RX processing to fail when ath12k_wifi7_dp_rx_mon_dest_process() observes a PPDU ID mismatch between status and destination rings, preventing MSDUs from being delivered. It can also produce incomplete EHT metadata that triggers warnings from mac80211: Rate marked as an EHT rate but data is invalid: MCS:0, NSS:0 ath12k_wifi7_dp_mon_srng_process() already tracks status TLV continuations via ppdu_continuation. Apply the same logic here and only reinitialize mon_ppdu_info when starting a new PPDU. mon_ppdu_info persists across ar->monitor_started transitions. If monitor mode stops while a PPDU is mid-continuation, ppdu_continuation stays set and could leak into the next monitor session. Reset it when monitor mode starts. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c7-00108-QCAHMTSWPL_V1.0_V2.0_SILICONZ_UPSTREAM-3 Fixes: 78d3d907d0f1 ("wifi: ath12k: add support to reap and process monitor status ring") Signed-off-by: Kang Yang <kang.yang@oss.qualcomm.com> Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com> Reviewed-by: Tamizh Chelvam Raja <tamizh.raja@oss.qualcomm.com> Link: https://patch.msgid.link/20260828065534.1537-1-kang.yang@oss.qualcomm.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
13 dayswifi: ath12k: Free allocated external IRQs on request_irq() failureAaradhana Sahu
When external IRQ configuration fails, the driver does not release all IRQs that were successfully requested before the failure. This can leak IRQ resources during probe failure. Free previously requested external IRQs when external IRQ configuration fails. Also remove the NAPI instance with netif_napi_del() before freeing the associated netdev to properly clean up the NAPI resources. Store the IRQ number only after request_irq() succeeds to avoid recording an IRQ that was not successfully requested. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01243-QCAHKSWPL_SILICONZ-1 Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices") Signed-off-by: Aaradhana Sahu <aaradhana.sahu@oss.qualcomm.com> Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com> Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com> Link: https://patch.msgid.link/20260819110215.2485514-3-aaradhana.sahu@oss.qualcomm.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
13 dayswifi: ath12k: Free allocated CE IRQs on request_irq() failureAaradhana Sahu
When CE IRQ configuration fails, the driver does not release all IRQs that were successfully requested before the failure. This can leak IRQ resources during probe failure. Free the previously requested CE IRQs before returning from the error path to ensure that partially initialized IRQ resources are properly cleaned up during probe failure. Factor out the CE IRQ cleanup into a helper to reuse the cleanup logic during both error handling and driver teardown. Also free CE IRQs when external IRQ configuration fails, before returning from the error path. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01243-QCAHKSWPL_SILICONZ-1 Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices") Signed-off-by: Aaradhana Sahu <aaradhana.sahu@oss.qualcomm.com> Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com> Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com> Link: https://patch.msgid.link/20260819110215.2485514-2-aaradhana.sahu@oss.qualcomm.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
13 dayswifi: ath12k: fix truncated TX buffer DMA address in MSDU ext descriptorBaochen Qiang
ath12k_wifi7_hal_tx_cmd_ext_desc_setup() programs the low 32 bits of the TX buffer physical address into HAL_TX_MSDU_EXT_INFO0_BUF_PTR_LO but hardcodes the high bits field HAL_TX_MSDU_EXT_INFO1_BUF_PTR_HI to 0x0. dma_addr_t is 64-bit on platforms with CONFIG_ARCH_DMA_ADDR_T_64BIT, so whenever a TX buffer is mapped above the 4 GB boundary the upper bits of paddr are dropped and the firmware is handed a truncated address, leading to potential TX failures. Write the upper bits of paddr into BUF_PTR_HI to fix this issue. Issue found during code review, compile tested only. Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices") Signed-off-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com> Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com> Link: https://patch.msgid.link/20260818-ath12k-truncated-tx-dma-addr-v1-1-ead978969371@oss.qualcomm.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
13 dayswifi: ath12k: fix stale skb pointers after aligned TX payload shiftBaochen Qiang
ath12k_wifi7_dp_tx() caches hdr, eth, and skb_cb from the skb before calling ath12k_dp_tx_align_payload(). That function may shift skb->data in place (when headroom or tailroom is sufficient) or reallocate the buffer entirely via skb_realloc_headroom(), freeing the original skb. In either case hdr, eth, and skb_cb are left pointing into stale memory. After alignment, only hdr is refreshed, leaving eth and skb_cb stale. skb_cb is written immediately after (storing DMA addresses), and eth is re-read on every TCL ring retry via the tcl_ring_sel goto, so both accesses are use-after-free or stale-pointer bugs depending on which alignment path was taken. Refresh eth (conditionally, to preserve the encap-mode distinction) and skb_cb alongside hdr after ath12k_dp_tx_align_payload() returns, so all three point into the live skb for all subsequent accesses. Issue found during code review, compile tested only. Fixes: 38055789d151 ("wifi: ath12k: use 128 bytes aligned iova in transmit path for WCN7850") Signed-off-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com> Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com> Link: https://patch.msgid.link/20260818-ath12k-uaf-for-aligned-tx-v1-1-d6ae195b15e7@oss.qualcomm.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
13 dayswifi: ath12k: fix DMA unwind for ext MSDU descriptor retryRameshkumar Sundaram
ath12k_wifi7_dp_tx() maps the original MSDU into ti.paddr and stores the address in skb_cb->paddr. When an extended MSDU descriptor is used, the function later maps the ext descriptor and overwrites ti.paddr and ti.data_len with the ext-desc DMA address and length. If TCL ring allocation then fails, the error path first unmaps the ext-desc DMA address from skb_cb->paddr_ext_desc. It then falls through to fail_unmap_dma, which uses ti.paddr/ti.data_len for the original MSDU unmap. At that point ti.paddr still refers to the ext-desc mapping, so the ext descriptor is unmapped twice and the original MSDU mapping is left mapped. Fix the original MSDU unwind to use skb_cb->paddr and skb->len instead of ti.paddr/ti.data_len. The ti fields cannot be used after the ext descriptor is mapped because they are intentionally reused for the buffer submitted to TCL. Also clear skb_cb->paddr_ext_desc after the ext-desc unmap so a TCL ring retry cannot observe stale ext-desc DMA state from the previous attempt. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01243-QCAHKSWPL_SILICONZ-1 Fixes: 37a068fc9dc4 ("wifi: ath12k: Handle error cases during extended skb allocation") Signed-off-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com> Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com> Link: https://patch.msgid.link/20260813-ext-msdu-fix-v1-1-c5e80ccd061a@oss.qualcomm.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
13 dayswifi: ath12k: clear dangling channel pointers on error pathsLinkai Gong
On failure, ath12k_mac_setup_channels_rates() frees band channel arrays but leaves the pointers set, or clears the wrong band after a copy-paste typo (6 GHz free paired with a 2 GHz NULL). Clear the matching sbands[].channels pointer after each kfree(). Compile tested only. Signed-off-by: Linkai Gong <gonglinkai@kylinos.cn> Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com> Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com> Link: https://patch.msgid.link/20260811020523.387433-1-gonglinkai@kylinos.cn Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
13 dayswifi: ath12k: use kernel types instead of userspace stdint typesBaochen Qiang
Replace the userspace stdint types uint64_t/uint8_t with the kernel types u64/u8 to conform to the surrounding ath12k code, which uses the kernel types everywhere else. No functional changes, compile tested only. Signed-off-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com> Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com> Link: https://patch.msgid.link/20260819-ath12k-cleanup-userspace-types-v1-1-161a1e8910f5@oss.qualcomm.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
13 dayswifi: ath12k: advertise AP_VLAN interface mode for IPQ5332Kamil Bienkiewicz
Only the two QCN9274 hw_params advertise NL80211_IFTYPE_AP_VLAN; the IPQ5332 entry does not. ath12k sets SW_CRYPTO_CONTROL, so mac80211 does not add the mode on the driver's behalf either -- ieee80211_alloc_hw_nm() only does that for drivers that leave SW_CRYPTO_CONTROL clear, leaving the declaration to drivers that can transmit software-encrypted frames. AP/VLAN is therefore absent from the wiphy, and creating an AP_VLAN interface without NL80211_ATTR_4ADDR is rejected by cfg80211_iftype_allowed(): nl80211: Failed to create interface <name>: -95 (Operation not supported) That is the path hostapd uses for dynamic per-station VLANs, in hostapd_vlan_if_add(). The 4-address (WDS) case is not affected, as cfg80211_iftype_allowed() short-circuits it on WIPHY_FLAG_4ADDR_AP, which mac80211 sets unconditionally at alloc time. The QCN9274 entries already declare AP_VLAN, and the transmit path is shared Wi-Fi 7 code with no per-chip or per-bus gating, so IPQ5332 can deliver it as well. AP_VLAN is a software interface type, so no interface combination changes are needed. On a mixed-bus single-wiphy group the effect is wider still, since ath12k_mac_get_ifmodes() intersects interface_modes across all radios: one IPQ5332 masks AP_VLAN for the QCN9274 radios too. Advertise AP_VLAN on IPQ5332 as QCN9274 does. With the mode advertised, a non-4addr AP_VLAN interface can be created on an AP interface of an IPQ5332 + 2x QCN9274 single-wiphy group: # iw dev phy0.0-ap0 interface add tvlan0 type __ap_vlan # iw dev tvlan0 info Interface tvlan0 ifindex 19 wdev 0x9 addr 00:03:7f:12:0b:0b type AP/VLAN wiphy 0 Radios: 0 1 2 RADIUS-assigned dynamic VLANs were not exercised end to end. Tested-on: IPQ5332 hw1.0 AHB WLAN.WBE.1.6-01270-QCAHKSWPL_SILICONZ-1 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01243-QCAHKSWPL_SILICONZ-1 Signed-off-by: Kamil Bienkiewicz <perceivalpercy@gmail.com> Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com> Link: https://patch.msgid.link/20260828005126.1685832-1-perceivalpercy@gmail.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
13 dayswifi: ath11k: fix locking problem in ath11k_dp_rx_tid_del_func()Nicolas Escande
In this function, we iterate over dp->reo_cmd_cache_flush_list using list_for_each_entry_safe(), under dp->reo_cmd_lock for concurrent access, and for each expired entries we : - drop the lock - call ath11k_dp_reo_cache_flush() - kfree() the entry - retake the lock to keep on iterating list_for_each_entry_safe() protects us from deleting the entry during iteration but doesn't protect for concurrent access. So another thread can take the lock and modify the list in between and crash like below. To fix the issue, move all entries that needs to be freed to a local list while under the lock and then iterate over the list to free the entries without holding the lock. BUG: Unable to handle kernel paging request at virtual address 00000010ddbeef8c Call trace: ath11k_dp_rx_tid_del_func+0x164/0x3c8 ath11k_dp_process_reo_status+0x1d4/0x2fc ath11k_dp_service_srng+0x334/0x338 ath11k_pcic_ext_grp_napi_poll+0x30/0xc0 __napi_poll+0x34/0x184 napi_threaded_poll+0xb4/0x1d8 kthread+0xdc/0xe0 ret_from_fork+0x10/0x20 Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.9.0.1-01977-QCAHKSWPL_SILICONZ-1 Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Suggested-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com> Signed-off-by: Nicolas Escande <nico.escande@gmail.com> Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com> Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com> Link: https://patch.msgid.link/20260813-ath11k-locking-v2-1-f4113a0bd0f4@gmail.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
13 dayswifi: ath11k: modify null check logic in ath11k_ce_rx_post_pipe()Mikhail Lobanov
The previous logic in ath11k_ce_rx_post_pipe() incorrectly required both dest_ring and status_ring to be NULL in order to exit the function. This caused the function to continue even if only one of the pointers was NULL, potentially leading to null pointer dereferences in ath11k_ce_rx_buf_enqueue_pipe(). Fix the condition by modifying the logic so that the function returns early if either dest_ring or status_ring is NULL. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Signed-off-by: Mikhail Lobanov <m.lobanov@rosalinux.ru> Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com> Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com> Link: https://patch.msgid.link/20240909150824.28195-1-m.lobanov@rosalinux.ru Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
13 daysASoC: rt1320: avoid re-initialize in advanced modeShuming Fan
On some machines, speaker protection is enabled. We call this advanced mode, which loads the DSP firmware and changes settings based on the basic mode, including blind writes. The amplifier can retain the advanced mode settings until a POR or power loss occurs. Therefore, the driver does not need to switch from basic mode to advanced mode when the system performs a warm reboot. We only need to check the function_status to determine whether the system has undergone a cold or warm reboot. Fixes: 9b30521074f0 ("ASoC: rt1320: run the initialisation preset on the first hardware init") Signed-off-by: Shuming Fan <shumingf@realtek.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev> Link: https://patch.msgid.link/20260909091806.872977-1-shumingf@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
13 daysMerge branch 'for-7.4' into for-nextTejun Heo
13 daysselftests/sched_ext: Validate select_cpu_and mask constraintsTianyi Chen
The syscall test only prints the CPU selection result after checking whether BPF_PROG_TEST_RUN succeeds. Require -EBUSY for empty and affinity-disjoint custom masks, and allow a legal singleton candidate to be selected or busy. Reject unexpected errors and selections outside the custom mask or configured affinity. Check cpus_mask because migration disabling can temporarily narrow cpus_ptr under CONFIG_PREEMPT_RCU. Grow dynamically allocated affinity masks until sched_getaffinity() succeeds, retaining that allocation size for pinning and restoration. Restore affinity on all exits after pinning, and skip only the disjoint case when fewer than two CPUs are allowed. Assisted-by: LLM Signed-off-by: Tianyi Chen <hi@tychen.cc> Signed-off-by: Tejun Heo <tj@kernel.org>
13 dayssched_ext: Merge adjacent ifdefs in ext.hCheng-Yang Chou
6a1cda143c23 ("sched_ext: Always use SMP versions in kernel/sched/ext.h") dropped the CONFIG_SMP guard from scx_update_idle(), leaving two adjacent CONFIG_SCHED_CLASS_EXT blocks. Merge the declaration and stub into the primary ifdef block. No functional change. Signed-off-by: Cheng-Yang Chou <yphbchou0911@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
13 daysselftests/sched_ext: Drop -rdynamic and stop clobbering LDFLAGSCheng-Yang Chou
CFLAGS passes the link-time flag -rdynamic to compile steps ($(CC) -c), where it is unused. Under -Werror, Clang fails the build: $ make CC=clang-21 clang-21: error: argument unused during compilation: '-rdynamic' [-Werror,-Wunused-command-line-argument] Nothing needs the exported symbols. Separately, LDFLAGS uses '=' rather than '+=', discarding USERLDFLAGS from lib.mk. Drop -rdynamic and append LDFLAGS with '+='. This fixes builds with CC=clang-N while preserving USERLDFLAGS. v2: Drop -rdynamic instead of moving it to LDFLAGS (Tejun Heo). Signed-off-by: Cheng-Yang Chou <yphbchou0911@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
13 daysdrm/bridge: ti-sn65dsi83: Support LVDS Channel B on SN65DSI84Esben Haabendal
Add support for using SN65DSI84 in single-link mode with output to LVDS Channel B. Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Tested-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Esben Haabendal <esben@geanix.com> Link: https://patch.msgid.link/20260831-ti-sn65dsi83-fixes-v5-2-e712765d6c4f@geanix.com Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
13 daysMAINTAINERS: update memblock tree URLsMike Rapoport (Microsoft)
memblock tree moved into mm/ namespace at git.kernel.org. Update the T: entries for memblock to match it. Link: https://patch.msgid.link/20260831102143.69265-1-rppt@kernel.org Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
13 daysmm: memblock: show all region flags in debugfsMeijing Zhao
Commit 493f349e38d0 ("memblock: Add flags and nid info in memblock debugfs") made memblock_debug_show() stop after finding the first set flag. A memblock region can carry multiple flags, so the remaining flags are hidden from debugfs. Walk all bits in the region flags and print every set flag separated by "|". Keep walking beyond flagname[] so that a set flag without a known name is reported as UNKNOWN rather than silently ignored. Fixes: 493f349e38d0 ("memblock: Add flags and nid info in memblock debugfs") Signed-off-by: Meijing Zhao <zhaomeijing@lixiang.com> Link: https://patch.msgid.link/20260902075944.3742866-1-zhaomeijing100@gmail.com Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
13 daysdrm/i915: Fix memory leak in query_perf_config_list()Thorsten Blum
When krealloc() fails, free the original oa_config_ids before returning to avoid a memory leak. Fixes: 4f6ccc74a85c ("drm/i915: add support for perf configuration queries") Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Cc: <stable@vger.kernel.org> # v5.5+ Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com> Link: https://patch.msgid.link/20260823205028.178597-2-thorsten.blum@linux.dev
13 daysMerge tag 'opp-updates-7.3.rc2' of ↵Rafael J. Wysocki
git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Merge OPP updates for 7.3-rc3 from Viresh Kumar: "- Fix potential multiplication overflow when calculating freq in OPP core (Colin Ian King). - Fix use after free in _update_opp_table_clk() (Peter Griffin). - Use %pe to print symbolic error name (Sumeet Pawnikar)." * tag 'opp-updates-7.3.rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: opp: fix use after free in _update_opp_table_clk() opp: Use %pe to print symbolic error name OPP: of: Fix potential multiplication overflow when calculating freq
13 daysi2c: qcom-geni: Use modern PM operation macrosMukesh Kumar Savaliya
The driver uses the legacy SET_NOIRQ_SYSTEM_SLEEP_PM_OPS() and SET_RUNTIME_PM_OPS() helpers to initialize struct dev_pm_ops. Switch to the modern NOIRQ_SYSTEM_SLEEP_PM_OPS() and RUNTIME_PM_OPS() macros instead. These macros keep PM callbacks referenced by the compiler and help avoid potential unused-function warnings in configurations where PM support is disabled or partially enabled. No functional change intended. Signed-off-by: Mukesh Kumar Savaliya <mukesh.savaliya@oss.qualcomm.com> Reviewed-by: Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org> Link: https://patch.msgid.link/20260729073040.3227692-1-mukesh.savaliya@oss.qualcomm.com