summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
14 daysphy: starfive: Fix runtime PM cleanup in JH7110 DPHY TX probeCan Peng
stf_dphy_probe() enables runtime PM before getting the clock and reset controls, creating the PHY and registering the PHY provider. If any of those steps fails, probe returns with runtime PM still enabled. The driver also has no remove callback, so runtime PM is left enabled on driver unbind after a successful probe. Use devm_pm_runtime_enable() so runtime PM is disabled automatically on later probe failures and on driver unbind. Fixes: d3ab79553308 ("phy: starfive: Add mipi dphy tx support") Signed-off-by: Can Peng <pengcan@kylinos.cn> Reviewed-by: Changhuang Liang <changhuang.liang@starfivetech.com> Link: https://patch.msgid.link/20260718090054.444513-2-pengcan@kylinos.cn Signed-off-by: Vinod Koul <vkoul@kernel.org>
14 daysphy: qcom: qmp-pcie: Add QMP PCIe PHY support for HawiMatthew Leung
Add the QMP PCIe PHY support for the Gen3 x2 and Gen4 x1 PHY found on the Hawi platform. Signed-off-by: Matthew Leung <matthew.leung@oss.qualcomm.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Link: https://patch.msgid.link/20260707-hawi-phy-pcie-v4-4-8d9cc6324947@oss.qualcomm.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
14 daysphy: qcom-qmp: Add v10.60 register offsetsMatthew Leung
Hawi SoC uses v10.60 register definitions for PCIe Gen4 x1. Add the new register offset headers for all four sub-blocks: - QSERDES-COM offsets - QSERDES TX/RX offsets - PCS offsets - PCS PCIe-specific offsets Signed-off-by: Matthew Leung <matthew.leung@oss.qualcomm.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Link: https://patch.msgid.link/20260707-hawi-phy-pcie-v4-3-8d9cc6324947@oss.qualcomm.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
14 daysphy: qcom-qmp: Add v10 register offsetsMatthew Leung
Hawi SoC uses v10 register definitions for PCIe Gen3 x2. Add the new register offset headers for all four sub-blocks: - QSERDES-COM offsets - QSERDES TX/RX offsets - PCS offsets - PCS PCIe-specific offsets Signed-off-by: Matthew Leung <matthew.leung@oss.qualcomm.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Link: https://patch.msgid.link/20260707-hawi-phy-pcie-v4-2-8d9cc6324947@oss.qualcomm.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
14 daysdt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Add Hawi compatiblesMatthew Leung
Document the compatibles for the Gen3 x2 and Gen4 x1 QMP PCIe PHYs found on the Hawi platform. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Signed-off-by: Matthew Leung <matthew.leung@oss.qualcomm.com> Link: https://patch.msgid.link/20260707-hawi-phy-pcie-v4-1-8d9cc6324947@oss.qualcomm.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
14 daysarm64: defconfig: Enable drivers for BeagleBadgeJudith Mendez
Enable drivers used on BeagleBadge[1]: - LED PWM Multicolor driver as a module - MCP SPI IO Expander driver as a module - Seven Segment display GPIO driver as module - Temperature Sensor driver as a module [1] https://www.beagleboard.org/boards/beaglebadge Signed-off-by: Judith Mendez <jm@ti.com> Link: https://www.beagleboard.org/boards/beaglebadge Link: https://patch.msgid.link/20260603192305.1347908-4-jm@ti.com Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
14 daysdrm/i915/backlight: Remove DP_EDP_BACKLIGHT_AUX_ENABLE_CAP check for DPCD ↵Suraj Kandpal
backlight Turns out some panels allow only AUX based backlight by just setting the DP_EDP_BACKLIGHT_BRIGHTNESS_AUX_SET_CAP and not setting the DP_EDP_BACKLIGHT_AUX_ENABLE_CAP. If we make DP_EDP_BACKLIGHT_AUX_ENABLE_CAP a necessity for AUX based DPCD backlight these panels loose the ability to manipulate backlight via AUX, especially ones with no PWM controller. Remove this check from function so that panels who do not advertise DP_EDP_BACKLIGHT_AUX_ENABLE_CAP but advertise DP_EDP_BACKLIGHT_BRIGHTNESS_AUX_SET_CAP are able to manipulate backlight again. Fixes: ed8be780bdbc ("drm/i915/backlight: Fix VESA backlight possible check condition") Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/work_items/16507 Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Reviewed-by: Michał Grzelak <michal.grzelak@intel.com> Link: https://patch.msgid.link/20260716030959.436430-1-suraj.kandpal@intel.com (cherry picked from commit 7d594b24c915afb4b0c5fb8875403253daef5b24) Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
14 daysxfrm: drop ESP-in-TCP packets with no ingress deviceZhiling Zou
ESP-in-TCP receives records through the TCP strparser. handle_esp() restores skb->dev from the saved skb_iif before passing the packet into the XFRM input path. Queued TCP data can be processed after the original ingress device has been removed, for example during veth or net namespace teardown. In that case dev_get_by_index_rcu() returns NULL. The XFRM IPv4 and IPv6 input paths both expect skb->dev to be valid while building the route lookup, so queued ESP-in-TCP data can dereference a NULL device. Drop the packet if the saved ingress device can no longer be resolved. Such a packet can no longer be routed through the normal XFRM receive path, and this preserves the existing behaviour for packets whose ingress device still exists. Fixes: e27cca96cd68 ("xfrm: add espintcp (RFC 8229)") Cc: stable@vger.kernel.org Reported-by: Vega <vega@nebusec.ai> Signed-off-by: Zhiling Zou <roxy520tt@gmail.com> Assisted-by: Codex:gpt-5.4 Reviewed-by: Ren Wei <enjou1224z@gmail.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
14 daysxfrm: espintcp: fix UAF during closeSabrina Dubroca
ZDI reported and analyzed a race condition during close for espintcp sockets: espintcp_close() frees emsg->skb via kfree_skb() without holding any socket lock. Concurrently, the xfrm_trans_reinject work queue invokes esp_output_tcp_finish() -> espintcp_push_skb() -> espintcp_push_msgs() -> skb_send_sock_locked(), which reads the same skb as a data source. Fix this by adding a synchronize_rcu() call after resetting sk_prot, since esp_output_tcp_finish() runs under RCU and won't use a socket with sk_prot == &tcp_prot. Simply taking the socket lock in espintcp_close() could lead to leaks, if esp_output_tcp_finish() re-adds an skb in the slot we just freed. After this, the existing barrier() is no longer needed. Cc: stable@vger.kernel.org Fixes: e27cca96cd68 ("xfrm: add espintcp (RFC 8229)") Reported-by: zdi-disclosures@trendmicro.com Signed-off-by: Sabrina Dubroca <sd@queasysnail.net> Reviewed-by: Breno Leitao <leitao@debian.org> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
14 daysgpio: kunit: add test cases verifying swnode devlink supportBartosz Golaszewski
The software node fw_devlink support already has its own kunit suite, but that verifies the fwnode links in isolation. Add GPIO tests that prove the ordering works in a real-life use-case: a GPIO consumer that references its provider via a software node. The first suite registers the provider's software node, adds the consumer device first and checks that fw_devlink defers its probe until the provider has been added and bound. The second covers the fallback: with the provider's software node not yet registered no supplier link is created, so the consumer probes, devm_gpiod_get() returns -EPROBE_DEFER and the consumer only binds once the provider shows up. While at it: the existing gpio_unbind_with_consumers() test keeps the consumer bound while the provider goes away and then operates the orphaned descriptor. With software nodes now being covered by fw_devlink that would instead force-unbind the consumer along with the provider, so opt it out by setting FWNODE_FLAG_LINKS_ADDED. Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: David Gow <david@davidgow.net> Link: https://patch.msgid.link/20260720-swnode-fw-devlink-v5-1-ec250ae6af91@oss.qualcomm.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
14 daysgenirq/msi: Move misplaced EXPORT_SYMBOL_GPL for msi_domain_free_irqs_all()Li RongQing
EXPORT_SYMBOL_GPL(msi_domain_free_irqs_all) was mistakenly placed after msi_domain_free_irqs_range() instead of after its intended function msi_domain_free_irqs_all(). Signed-off-by: Li RongQing <lirongqing@baidu.com> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Reviewed-by: Radu Rendec <radu@rendec.net> Link: https://patch.msgid.link/20260717143157.1718-1-lirongqing@baidu.com
14 daysxfs: propagate errors from xfs_rtginode_loadGuanghui Yang
xfs_rtginode_ensure() treats every xfs_rtginode_load() error other than -ENOENT as success. This can leave the realtime group inode unset after an I/O, allocation, or corruption error. Growfs then continues as though the inode had been loaded. Only -ENOENT means that the inode needs to be created. Return all other errors to the growfs caller. Fixes: ae897e0bed0f ("xfs: support creating per-RTG files in growfs") Cc: stable@vger.kernel.org Signed-off-by: Guanghui Yang <3497809730@qq.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: "Darrick J. Wong" <djwong@kernel.org> Signed-off-by: Carlos Maiolino <cem@kernel.org>
14 daysdt-bindings: nvmem: qfprom: Add ipq5210 & ipq9650 compatibleVaradarajan Narayanan
Document compatible string for the QFPROM on ipq5210 & ipq9650 platforms. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com> Signed-off-by: Srinivas Kandagatla <srini@kernel.org>
14 daysnvmem: brcm_nvram: fix out-of-bounds access on malformed flash dataRosen Penev
The length check in brcm_nvram_parse() validated header->len against priv->nvmem_size (the full partition size) instead of priv->data_len (the actual allocated data buffer). A malformed flash partition with header->len between the two would pass the check, causing brcm_nvram_add_cells() to read and write priv->data[len - 1] beyond the heap allocation. Also add a minimum bound: len < sizeof(*header) could underflow the data[len - 1] access. Fix both bounds by rejecting len outside [sizeof(*header), priv->data_len]. Assisted-by: opencode:big-pickle Signed-off-by: Rosen Penev <rosenp@gmail.com> Signed-off-by: Srinivas Kandagatla <srini@kernel.org>
14 daysnvmem: brcm_nvram: reject empty NVRAM partitionRosen Penev
If the partition is completely erased (all padding bytes), the trimming loop reduces data_len to 0. devm_kzalloc(dev, 0, GFP_KERNEL) returns ZERO_SIZE_PTR ((void *)16), which is non-NULL and bypasses the NULL check. The subsequent cast of priv->data to struct brcm_nvram_header * and dereference of header->magic causes a page fault on address 0x10. Reject data_len smaller than the header before allocating. Assisted-by: opencode:big-pickle Signed-off-by: Rosen Penev <rosenp@gmail.com> Signed-off-by: Srinivas Kandagatla <srini@kernel.org>
14 daysplatform/x86: thinkpad_acpi: Fix USB-C Security probe failure on unsupported ↵Vishnu Sankar
platforms On systems where the USCS ACPI method is absent, acpi_evalf() returns AE_NOT_FOUND which maps to -EIO. This caused tpacpi_usbc_security_init() to propagate the error and thinkpad_acpi failed to probe entirely on unsupported platforms. Fix this by checking for USCS method presence with acpi_has_method() before attempting to call it, returning -ENODEV immediately if absent. This follows the same pattern used by other subdrivers in thinkpad_acpi.c. Fixes: 67e8d1e9cacd ("platform/x86: thinkpad_acpi: Add USB-C Security (USCS) support") Reported-by: Oliver Lin <oliver@liuxiaozhen.dev> Closes: https://lore.kernel.org/platform-driver-x86/239c8162-e1e6-4b49-8292-35547c5a525c@liuxiaozhen.dev/ Tested-by: Oliver Lin <oliver@liuxiaozhen.dev> Signed-off-by: Vishnu Sankar <vishnuocv@gmail.com> Link: https://patch.msgid.link/20260715010205.514132-1-vishnuocv@gmail.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
14 daysALSA: timer: drain a slave's callback before its master detaches itNorbert Szetei
snd_timer_close_locked() drains the closing instance's own in-flight callback (IFLG_CALLBACK) before freeing it, but not its slaves'. When a master instance is closed, remove_slave_links() clears each slave's ->timer; the slave's own close then reads timer == NULL and takes the branch that skips the drain entirely (snd_timer_stop_slave() also no-ops on a NULL timer). So a slave whose callback is still running when the master is closed is freed underneath the live callback, leading to use-after-free. Drain the slaves too before remove_slave_links() severs them. snd_timer_stop() has already taken this instance off the active list, so no new slave callback can be queued. Take the slaves off the ack list so a pending one can't fire either, then wait for any that is already in flight. Fixes: 37745918e0e7 ("ALSA: timer: Introduce virtual userspace-driven timers") Cc: stable@vger.kernel.org Assisted-by: Claude:claude-opus-4-8 Signed-off-by: Norbert Szetei <norbert@doyensec.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/D26598EB-DBF7-4D76-9F71-8E4BD59822D4@doyensec.com
14 daysALSA: timer: don't re-enter an instance callback that is still runningNorbert Szetei
The userspace-driven timer (utimer) TRIGGER ioctl calls snd_timer_interrupt() directly with no serialization, so two threads triggering the same utimer can run snd_timer_interrupt() on one snd_timer concurrently. snd_timer_process_callbacks() drops timer->lock around each instance callback and marks the in-flight callback with the single SNDRV_TIMER_IFLG_CALLBACK bit; snd_timer_close_locked() waits on that bit to drain an in-flight callback before freeing the instance. The bit cannot represent two concurrent callbacks: when a second interrupt re-queues an instance whose callback is still running, both run at once, the first to finish clears the bit, and the close-path drain then frees the instance (and its callback_data) while the other callback is still live - a use-after-free reachable by any user able to open /dev/snd/timer, both via a user timer instance and via a sequencer queue timer bound to the utimer. snd_timer_interrupt() sets IFLG_CALLBACK before dropping timer->lock, so a concurrent interrupt already observes it under the lock. Skip re-queuing an instance (and its slaves) to the ack/sack list while its callback is in flight; the accumulated pticks are delivered on the next tick, so no event is lost. Fixes: 37745918e0e7 ("ALSA: timer: Introduce virtual userspace-driven timers") Cc: stable@vger.kernel.org Suggested-by: Takashi Iwai <tiwai@suse.de> Assisted-by: Claude:claude-opus-4-8 Signed-off-by: Norbert Szetei <norbert@doyensec.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/6F9B6501-8E65-4265-B02C-7EFB240D1664@doyensec.com
14 dayssysctl: repair some kernel-doc commentsRandy Dunlap
Convert a non-kernel-comment to use "/*" instead. Don't use kernel-doc for the nested @type enum values since they aren't part of the struct. Warning: ./include/linux/sysctl.h:62 Cannot find identifier on line: * Warning: ./include/linux/sysctl.h:63 Cannot find identifier on line: * "dir" originates from read_iter (dir = 0) or write_iter (dir = 1) Warning: ./include/linux/sysctl.h:64 This comment starts with '/**', but isn't a kernel-doc comment. * in the file_operations struct at proc/proc_sysctl.c. Its value means Warning: ./include/linux/sysctl.h:274 Excess struct member 'type.SYSCTL_TABLE_TYPE_DEFAULT' description in 'ctl_table_header' Warning: ./include/linux/sysctl.h:274 Excess struct member 'type.SYSCTL_TABLE_TYPE_PERMANENTLY_EMPTY' description in 'ctl_table_header' Note: This still leaves 7 struct members in ctl_table_header that are not described. E.g.: Warning: include/linux/sysctl.h:274 struct member 'unregistering' not described in 'ctl_table_header' Warning: include/linux/sysctl.h:274 struct member 'ctl_table_arg' not described in 'ctl_table_header' Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Joel Granados <joel.granados@kernel.org>
14 daysMerge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/netPaolo Abeni
Cross-merge networking fixes after downstream PR (net-7.2-rc4). No conflicts. Signed-off-by: Paolo Abeni <pabeni@redhat.com>
14 daysMerge tag 'swnode-7.3-rc1' of ↵Bartosz Golaszewski
https://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core into gpio/for-next software node: provide support for fw_devlink This series extends software node support to use fw_devlink and adds test coverage for the new behaviour. This is a stable tag for other trees to merge.
14 daysMerge branch 'for-7.3' into for-nextTejun Heo
14 dayssched_ext: Rename the cid-form cgroup ops to cpuctl_*Tejun Heo
Two unrelated things go by "cgroup" in the cid form. Sub-schedulers attach to cgroups, and the cgroup_*() ops deliver cpu controller events. While the ops names suggest cgroup2 hierarchy, they actually operate on the cpu controller. Rename them to cpuctl_* in struct sched_ext_ops_cid, which has no users outside scx_qmap yet. The cpu form is deployed ABI and keeps the old names. The layout is unchanged and the kernel keeps calling through the cpu-form union view. Signed-off-by: Tejun Heo <tj@kernel.org> Reviewed-by: Andrea Righi <arighi@nvidia.com>
14 daystools/sched_ext: Add SCX_OPS_CID_OPEN for cid-form schedulersTejun Heo
SCX_OPS_OPEN() clears compat-gated ops fields which the running kernel lacks. The clears dereference cpu-form member names and compile for cid-form skeletons only because both ops structs currently name their cgroup ops identically, which an upcoming rename will end. No load-time fix-up can apply to a cid-form scheduler anyway as the cid form postdates every compat-gated op. Factor the skeleton open path out of SCX_OPS_OPEN() and add SCX_OPS_CID_OPEN() which uses only that shared part. Switch scx_qmap, the only cid-form scheduler, over. Signed-off-by: Tejun Heo <tj@kernel.org> Reviewed-by: Andrea Righi <arighi@nvidia.com>
14 daystools/sched_ext: scx_qmap - Add init fault injection modesTejun Heo
Add -J init-fail which makes ops.init_task() fail with -ENOMEM for tasks whose comm starts with "qmfail", and -J cgrp-init-fail which does the same in ops.cgroup_init() for cgroups named "qmfail*". The former exercises the migration veto path: the cgroup.procs write must fail with the injected errno while the destination sched stays up and the task stays put. The latter exercises the ownership-return failure path: a parent failing to re-init a returned cgroup leaves it unowned, and moves and set_* ops against it must be skipped instead of dereferencing the missing owner. Matching on "qmfail" names keeps the injecting scheduler's own enable unaffected. Signed-off-by: Tejun Heo <tj@kernel.org> Reviewed-by: Andrea Righi <arighi@nvidia.com>
14 daystools/sched_ext: scx_qmap - Consume cgroup weights through set_weightTejun Heo
With the set_* ops delivered to the parent's sched, a parent qmap instance now receives cgroup_set_weight for its child subs' attach points. Update the matching sub_sched_ctx weight and redistribute() in-kernel, and drop the userspace feed_weights() polling. This exercises the knob routing end to end. The self weight is fixed at 100: a cgroup's weight is its parent's knob and not the scheduler's own business. This drops the self-weight polling and the repartition PROG_RUN poke with it. sub_attach seeds the slot with the cgroup's current weight, read through bpf_cgroup_from_id(), so a weight set before the sub attaches is picked up. A write racing the attach can still be lost until the next value-changing cpu.weight write. Acceptable for a demo. While at it, add a traced ops.cgroup_move() so tests can observe move delivery. Signed-off-by: Tejun Heo <tj@kernel.org> Reviewed-by: Andrea Righi <arighi@nvidia.com>
14 dayssched_ext: Hand over cgroups at sub-scheduler enable/disableTejun Heo
Sub-schedulers don't get cgroups yet: every task_group is inited on the root sched and the routing added by the previous patches always resolves to it. Add the handover: an enabling sub-scheduler takes over the cgroups in its subtree and a disabling one returns them to its parent. scx_cgroup_claim_subtree() runs while the sub enables, after the subtree's cgrp->scx_sched's are set and before any task is claimed. It inits each subtree task_group on the sub, exits it from the parent and updates tg->scx.sched. A failed ops.cgroup_init() unwinds the sub-side inits and aborts the enable with the parent untouched. Disabling reverses it with scx_cgroup_return_subtree(): exit each cgroup from the sub, then re-init it on the parent with the current tg->scx.* values, resyncing weight and bandwidth changes made while the sub had it. When a re-init fails, the parent is failed and the remaining task_groups still transfer uninited and get no cgroup ops - the same punting done for tasks. The dying parent's own disable moves them onward. The handover walks include dying but not yet offlined task_groups, the same as root's bulk walks: a removed cgroup keeps hosting scheduling events until its dying tasks finish their final context switches, and its ops.cgroup_exit() must follow the last of them. tg on/offlining is excluded through cgroup_lock(), so either ordering against an rmdir of a subtree cgroup delivers balanced init/exit pairs. Signed-off-by: Tejun Heo <tj@kernel.org> Reviewed-by: Andrea Righi <arighi@nvidia.com>
14 dayssched_ext: Deliver cgroup ops to each task_group's schedTejun Heo
With sub-schedulers claiming cgroup subtrees, cgroup ops must be delivered to each task_group's sched rather than always to root. Add tg->scx.sched to track which sched initialized the task_group. It is set and cleared together with SCX_TG_INITED. Deliver the ops accordingly: - ops.cgroup_exit() goes to the sched whose ops.cgroup_init() it pairs with. - ops.cgroup_prep_move/move/cancel_move() go to the task's sched, and only for moves that don't re-home the task. A re-homing move is reported through the ops.exit_task/init_task() pair instead. The cgroups passed to the move ops can be outside the sched's inited set as the cpu controller can be coarser than the sub-scheduler topology. - Knobs of a cgroup belong to the parent, so ops.set_weight/idle/bandwidth() go to the parent task_group's sched. All task_groups currently resolve to the root sched, so no behavior changes until sub-schedulers start claiming cgroups. While at it, scx_cgroup_init() is restructured so both paths share the recording. Signed-off-by: Tejun Heo <tj@kernel.org> Reviewed-by: Andrea Righi <arighi@nvidia.com>
14 dayssched_ext: Re-home tasks on cgroup migrationTejun Heo
A task's sched (p->scx.sched) must match its cgroup's owner (cgrp->scx_sched). cgroup migration breaks the invariant: scx_cgroup_move_task() only fires root's ops.cgroup_move() and never re-homes the task, leading to wrong-sched scheduling and, once the stale sched is freed, a use-after-free. Hook into the new cgroup task migration events and re-home each task whose destination cgroup is owned by a different sched. The events map naturally to the transfer: MIGRATING runs the fallible init for the destination sched, letting it reject the migration the same way ops.cgroup_prep_move() can, MIGRATED does the re-home, which can't fail, and CANCELED undoes the init when the migration falls through. Pre-commit, the task's task_group still reflects the source, so __scx_init_task() grows an explicit cgroup argument for the migration path to hand ops.init_task() the destination cgroup. Signed-off-by: Tejun Heo <tj@kernel.org> Closes: https://lore.kernel.org/r/alnxrsexEe_nQwqL@gpd4 Reviewed-by: Andrea Righi <arighi@nvidia.com>
14 dayssched_ext: Relocate scx_cgroup_enabledTejun Heo
scx_cgroup_enabled is in the CONFIG_EXT_GROUP_SCHED block. The upcoming cgroup migration re-homing needs the gate outside the block. Move the definition and flag flips outside CONFIG_EXT_GROUP_SCHED. No functional changes. Signed-off-by: Tejun Heo <tj@kernel.org> Reviewed-by: Andrea Righi <arighi@nvidia.com>
14 dayssched_ext: Factor out scx_rehome_task() and scx_punt_task()Tejun Heo
Factor out scx_rehome_task() and scx_punt_task() from the sub-disable re-home loop and scx_fail_parent(). The upcoming cgroup migration re-homing also needs scx_rehome_task(). No functional changes. Signed-off-by: Tejun Heo <tj@kernel.org> Reviewed-by: Andrea Righi <arighi@nvidia.com>
14 dayscgroup: Add cgroup_task_notifier and task migration eventsTejun Heo
A subsystem can attach to the cgroup hierarchy itself, independent of which controllers are enabled where - BPF hooks already behave this way and sched_ext sub-schedulers do too. Controller callbacks can't track task migrations for them: sched_ext must re-home a task whose migration crosses a sub-scheduler boundary, but the cpu controller's attach callbacks fire only when the task_group changes and miss moves whenever the controller topology is coarser than the sub-scheduler topology. Add cgroup_task_notifier with per-task migration events mirroring the can_attach/attach/cancel_attach phases so that a consumer which prepares per-task state can also veto a migration: CGROUP_TASK_MIGRATING fires pre-commit, CGROUP_TASK_MIGRATED post-commit and CGROUP_TASK_MIGRATE_CANCELED unwinds a failed migration. Only migrations that change a task's dfl cgroup are reported. Signed-off-by: Tejun Heo <tj@kernel.org> Reviewed-by: Andrea Righi <arighi@nvidia.com>
14 daysALSA: sis7019: Use pcim_iomap_region() for MMIO BARRosen Penev
Replace the open-coded pcim_request_all_regions() + devm_ioremap() pair with per-BAR pcim helpers: reserve BAR0 (the I/O port region, used via inl/outl) with pcim_request_region(), and reserve + iomap BAR1 (MMIO) with a single pcim_iomap_region() call. This folds the BAR1 reserve and iomap into one managed call. The error check moves from a NULL test to IS_ERR(), since pcim_iomap_region() returns an IOMEM_ERR_PTR on failure. Assisted-by: opencode:hy3-free Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://patch.msgid.link/20260720000929.1432533-1-rosenp@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 daysmedia: i2c: saa7115: Add missing media_entity_cleanup()Biren Pandya
The remove function is missing a call to media_entity_cleanup(). Add it. Signed-off-by: Biren Pandya <birenpandya@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
14 daysmedia: i2c: mt9v011: Add missing media_entity_cleanup()Biren Pandya
The remove function is missing a call to media_entity_cleanup(). Add it. Signed-off-by: Biren Pandya <birenpandya@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
14 daysmedia: i2c: msp3400-driver: Add missing media_entity_cleanup()Biren Pandya
The remove function and the probe error path are missing calls to media_entity_cleanup(). Add them. Signed-off-by: Biren Pandya <birenpandya@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
14 daysmedia: i2c: max9286: Add missing media_entity_cleanup()Biren Pandya
The remove function is missing a call to media_entity_cleanup(). Add it. Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Biren Pandya <birenpandya@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
14 daysmedia: i2c: cx25840-core: Add missing media_entity_cleanup()Biren Pandya
The remove function is missing a call to media_entity_cleanup(). Add it. Signed-off-by: Biren Pandya <birenpandya@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
6 daysmedia: dvb-core: fix feed leak on failed DMX_ADD_PIDRituparna Warwatkar
dvb_dmxdev_add_pid() allocates a new dmxdev_feed, links it into filter->feed.ts and, when the filter is already running, immediately starts the feed. If starting the feed fails, the newly allocated feed remains on the list. Subsequent restart and rollback paths may then operate on this stale entry, leaving feed resources allocated and causing leaks in drivers that allocate resources from ->start_feed() and release them from ->stop_feed(). Remove the feed from the list and free it when dvb_dmxdev_start_feed() fails. Reported-by: syzbot+e9a1f5e196de6663631b@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=e9a1f5e196de6663631b Signed-off-by: Rituparna Warwatkar <rwarwatkar@gmail.com> Link: https://patch.msgid.link/20260714141059.63582-1-rwarwatkar@gmail.com Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Message-ID: <20260714141059.63582-1-rwarwatkar@gmail.com>
7 daysmedia: s2255: bound JPEG frame size before copying into the bufferHyeongJun An
s2255_fillbuff() memcpy()s vc->jpg_size bytes of a captured JPEG/MJPEG frame into the vb2 plane. vc->jpg_size is taken verbatim from the S2255_MARKER_FRAME header the device sends (pdword[4] in save_frame()) and, unlike the frame payload length just above it, is never bounded: payload = le32_to_cpu(pdword[3]); if (payload > vc->req_image_size) /* payload is checked ... */ return -EINVAL; vc->pkt_size = payload; vc->jpg_size = le32_to_cpu(pdword[4]); /* ... jpg_size is not */ A malicious or malfunctioning device can therefore report a jpg_size larger than the destination vb2 plane, and the memcpy() writes past it. jpg_size is a signed int, so a value with the top bit set also turns into a huge length. Reject a frame whose jpg_size is negative or exceeds the plane size before copying it. Fixes: 38f993ad8b1f ("V4L/DVB (8125): This driver adds support for the Sensoray 2255 devices.") Cc: stable@vger.kernel.org Assisted-by: Claude:claude-opus-4-8 Signed-off-by: HyeongJun An <sammiee5311@gmail.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 daysmedia: go7007: s2250: propagate control I/O failuresYousef Alhouseen
The brightness and contrast paths use oldvalue after read_reg_fp() without checking whether the read succeeded. A failed read leaves oldvalue uninitialized and can write arbitrary reserved register bits. Return read and write errors from every control path so failed hardware access cannot be reported as a successful control update. Signed-off-by: Yousef Alhouseen <alhouseenyousef@gmail.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 daysmedia: s2255: Replace bare 'unsigned' with 'unsigned int'Lei Huang
Fix 'WARNING: Prefer 'unsigned int' to bare use of 'unsigned'' reported by checkpatch.pl in s2255drv.c. Signed-off-by: Lei Huang <huanglei@kylinos.cn> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 daysmedia: s2255: Remove unnecessary braces from single-statement blocksLei Huang
Fix all 4 'WARNING: braces {} are not necessary for single statement blocks' issues reported by checkpatch.pl in s2255drv.c. Remove braces from single-statement if blocks where they are not needed. Signed-off-by: Lei Huang <huanglei@kylinos.cn> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 daysmedia: s2255: Remove unnecessary debug logging and out-of-memory messagesLei Huang
Fix all 5 'WARNING: Unnecessary ftrace-like logging - prefer using ftrace' issues reported by checkpatch.pl in s2255drv.c. Remove dprintk/dev_info calls that only print the function name, as ftrace can provide the same function tracing information. Fix all 3 'WARNING: Possible unnecessary 'out of memory' message' issues reported by checkpatch.pl in s2255drv.c. The kernel's memory allocator already prints a warning on allocation failure, making these messages redundant. Signed-off-by: Lei Huang <huanglei@kylinos.cn> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 daysmedia: s2255: Remove unnecessary return statements from void functionsLei Huang
Fix all 7 'WARNING: void function return statements are not generally useful' issues reported by checkpatch.pl in s2255drv.c. Remove trailing 'return;' statements that immediately precede the closing brace in void functions. Signed-off-by: Lei Huang <huanglei@kylinos.cn> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 daysmedia: s2255: Fix block comment style to kernel formatLei Huang
Fix all 'WARNING: Block comments use * on subsequent lines' and 'WARNING: Block comments use a trailing */ on a separate line' issues reported by checkpatch.pl in s2255drv.c. Convert block comments to kernel-style format with leading '*' on continuation lines and '*/' on its own line. Convert banner-style separator comments to single-line format. Signed-off-by: Lei Huang <huanglei@kylinos.cn> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 daysmedia: s2255: Add blank lines after variable declarationsLei Huang
Fix all 22 'WARNING: Missing a blank line after declarations' issues reported by checkpatch.pl in s2255drv.c. Insert a blank line between local variable declarations and the first statement in each function. Signed-off-by: Lei Huang <huanglei@kylinos.cn> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 daysmedia: s2255: Parenthesize macro argument to avoid precedence issuesLei Huang
Fix 'CHECK: Macro argument 'dev' may be better as '(dev)' to avoid precedence issues' reported by checkpatch.pl in s2255drv.c. Wrap the 'dev' macro argument in parentheses in the dprintk macro. Signed-off-by: Lei Huang <huanglei@kylinos.cn> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 daysmedia: s2255: Remove unnecessary parentheses around conditionsLei Huang
Fix all 11 'CHECK: Unnecessary parentheses around' issues reported by checkpatch.pl in s2255drv.c. Remove redundant inner parentheses from if-condition expressions where operator precedence already guarantees the correct evaluation order. Signed-off-by: Lei Huang <huanglei@kylinos.cn> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 daysmedia: s2255: Add spaces around multiplication operatorsLei Huang
Fix all 3 'CHECK: spaces preferred around that '*' (ctx:VxV)' issues reported by checkpatch.pl in s2255drv.c. Add spaces around the multiplication operators in the SYS_FRAMES_MAXSIZE macro. Signed-off-by: Lei Huang <huanglei@kylinos.cn> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>