id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
4de9ff76067b40c3660df73efaea57389e62ea7a | Analyze and fix the following issue in the Linux kernel code: sched/deadline: Avoid double update_rq_clock() | Problem Details:
When setup_new_dl_entity() is called from enqueue_task_dl() ->
enqueue_dl_entity(), the rq-clock should already be updated, and
calling update_rq_clock() again is not right.
Move the update_rq_clock() to the one other caller of
setup_new_dl_entity(): sched_init_dl_server().
Fixes: 9f239df55546 ("sche... | ```diff
diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index b7acf74b6527..5d6f3cced740 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -752,8 +752,6 @@ static inline void setup_new_dl_entity(struct sched_dl_entity *dl_se)
struct dl_rq *dl_rq = dl_rq_of_se(dl_se);
struct rq *rq... |
375410bb9a403009a44af3cc7f087090da076e09 | Analyze and fix the following issue in the Linux kernel code: sched/deadline: Ensure get_prio_dl() is up-to-date | Problem Details:
Pratheek tripped a WARN and noted the following issue:
> Inspecting the set of events that led to the warning being triggered
> showed the following:
>
> systemd-1 [008] dN.31 ...: do_set_cpus_allowed: set_cpus_allowed begin!
>
> systemd-1 [008] dN.31 ...: sched_change_begin: Begin!
> sy... | ```diff
diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index b5c19b17e386..b7acf74b6527 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -3296,6 +3296,12 @@ static void switched_to_dl(struct rq *rq, struct task_struct *p)
static u64 get_prio_dl(struct rq *rq, struct task_struct *... |
2a62345b30529e488beb6a1220577b3495933724 | Analyze and fix the following issue in the Linux kernel code: KVM: guest_memfd: GUP source pages prior to populating guest memory | Problem Details:
Currently the post-populate callbacks handle copying source pages into
private GPA ranges backed by guest_memfd, where kvm_gmem_populate()
acquires the filemap invalidate lock, then calls a post-populate
callback which may issue a get_user_pages() on the source pages prior to
copying them into the priv... | ```diff
diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c
index b4409bc652d1..0ab7c89262fb 100644
--- a/arch/x86/kvm/svm/sev.c
+++ b/arch/x86/kvm/svm/sev.c
@@ -2268,7 +2268,7 @@ struct sev_gmem_populate_args {
};
static int sev_gmem_post_populate(struct kvm *kvm, gfn_t gfn, kvm_pfn_t pfn,
- void __u... |
47c9ef95a79a72653a5e5274e46f013df6b04626 | Analyze and fix the following issue in the Linux kernel code: thermal: intel: fix typo "nagative" in comment for cpu argument | Problem Details:
Fix typo "nagative" -> "negative" for cpu argument value in
comment section.
Signed-off-by: Sumeet Pawnikar <sumeet4linux@gmail.com>
[ rjw: Subject tweak ]
Link: https://patch.msgid.link/20260111160739.15984-1-sumeet4linux@gmail.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> | ```diff
diff --git a/drivers/thermal/intel/intel_tcc.c b/drivers/thermal/intel/intel_tcc.c
index b2a615aea7c1..ab61fb122937 100644
--- a/drivers/thermal/intel/intel_tcc.c
+++ b/drivers/thermal/intel/intel_tcc.c
@@ -172,7 +172,7 @@ static u32 get_temp_mask(bool pkg)
/**
* intel_tcc_get_tjmax() - returns the default... |
07e5e811f86dcd6f595c3bbd71cde294e8545889 | Analyze and fix the following issue in the Linux kernel code: powercap: Replace sprintf() with sysfs_emit() in sysfs show functions | Problem Details:
Replace all sprintf() calls with sysfs_emit() in sysfs show functions.
sysfs_emit() is preferred over sprintf() for formatting sysfs output
as it provides better bounds checking and prevents potential buffer
overflows.
Also, replace sprintf() with sysfs_emit() in show_constraint_name()
and simplify t... | ```diff
diff --git a/drivers/powercap/powercap_sys.c b/drivers/powercap/powercap_sys.c
index 1ff369880beb..f3b2ae635305 100644
--- a/drivers/powercap/powercap_sys.c
+++ b/drivers/powercap/powercap_sys.c
@@ -27,7 +27,7 @@ static ssize_t _attr##_show(struct device *dev, \
\
if (power_zone->ops->get_##_attr) { \
if... |
c303e89f7f17c29981d09f8beaaf60937ae8b1f2 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: sdm845-db845c: specify power for WiFi CH1 | Problem Details:
Specify power supply for the second chain / antenna output of the
onboard WiFi chip.
Fixes: 3f72e2d3e682 ("arm64: dts: qcom: Add Dragonboard 845c")
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://lore.kernel.... | ```diff
diff --git a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
index ad283a79bcdb..5118b776a9bb 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
@@ -379,6 +379,12 @@
regulator-initial-mode = <RPMH_REGULATOR_MODE_HP... |
8bfb696ccdc5bcfad7a45b84c2c8a36757070e19 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: sdm845-db845c: drop CS from SPIO0 | Problem Details:
On SDM845 SPI uses hardware-provided chip select, while specifying
cs-gpio makes the driver request GPIO pin, which on DB845c conflicts
with the normal host controllers pinctrl entry.
Drop the cs-gpios property to restore SPI functionality.
Fixes: cb29e7106d4e ("arm64: dts: qcom: db845c: Add support ... | ```diff
diff --git a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
index ce23f87e0316..ad283a79bcdb 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
@@ -850,7 +850,6 @@
status = "okay";
pinctrl-names = "default";
pin... |
c5dc4812f6bf397b82290c540085e9ec98b47b30 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: qrb4210-rb2: Fix UART3 wakeup IRQ storm | Problem Details:
Follow commit 9c92d36b0b1e ("arm64: dts: qcom: qrb2210-rb1: Fix UART3
wakeup IRQ storm") and apply the similar fix to the RB2 platform.
Having RX / TX pins as pull up and wakup interrupt as high-level
triggered generates an interrupt storm when trying to suspend the
device. Avoid the storm by using th... | ```diff
diff --git a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts
index 0cd36c54632f..5f8613150bdd 100644
--- a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts
+++ b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts
@@ -694,7 +694,7 @@
&uart3 {
interrupts-extended = <&intc GIC_SPI 330 IRQ_TY... |
7cb776b74c666c04c9fa10482b0e4d9f049d4fc2 | Analyze and fix the following issue in the Linux kernel code: thermal: Replace sprintf() with sysfs_emit() for sysfs show functions | Problem Details:
Replace all sprintf() calls with sysfs_emit() and sysfs_emit_at() in
sysfs show functions.
sysfs_emit() and sysfs_emit_at() are preferred over sprintf() for
formatting sysfs output as they provide better bounds checking and
prevent potential buffer overflows.
Signed-off-by: Sumeet Pawnikar <sumeet4li... | ```diff
diff --git a/drivers/thermal/thermal_hwmon.c b/drivers/thermal/thermal_hwmon.c
index 64cc3ab949fe..faf1d0083890 100644
--- a/drivers/thermal/thermal_hwmon.c
+++ b/drivers/thermal/thermal_hwmon.c
@@ -63,7 +63,7 @@ temp_input_show(struct device *dev, struct device_attribute *attr, char *buf)
if (ret)
return ... |
d5811e6297f3fd9020ac31f51fc317dfdb260cb0 | Analyze and fix the following issue in the Linux kernel code: NFS: Fix size read races in truncate, fallocate and copy offload | Problem Details:
If the pre-operation file size is read before locking the inode and
quiescing O_DIRECT writes, then nfs_truncate_last_folio() might end up
overwriting valid file data.
Fixes: b1817b18ff20 ("NFS: Protect against 'eof page pollution'")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> | ```diff
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 84049f3cd340..de2cce1d08f4 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -716,7 +716,7 @@ nfs_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
{
struct inode *inode = d_inode(dentry);
struct nfs_fattr *fattr;
- loff_t oldsize = i_size_read(ino... |
5a741f8cc6fe62542f955cd8d24933a1b6589cbd | Analyze and fix the following issue in the Linux kernel code: soc: microchip: mpfs: Fix memory leak in mpfs_sys_controller_probe() | Problem Details:
In mpfs_sys_controller_probe(), if of_get_mtd_device_by_node() fails,
the function returns immediately without freeing the allocated memory
for sys_controller, leading to a memory leak.
Fix this by jumping to the out_free label to ensure the memory is
properly freed.
Also, consolidate the error handl... | ```diff
diff --git a/drivers/soc/microchip/mpfs-sys-controller.c b/drivers/soc/microchip/mpfs-sys-controller.c
index 30bc45d17d34..81636cfecd37 100644
--- a/drivers/soc/microchip/mpfs-sys-controller.c
+++ b/drivers/soc/microchip/mpfs-sys-controller.c
@@ -142,8 +142,10 @@ static int mpfs_sys_controller_probe(struct plat... |
7a3d1b04d938f31e112fe09c0ffc1af830ba1f6d | Analyze and fix the following issue in the Linux kernel code: ASoC: SDCA: Handle CONFIG_PM_SLEEP not being set | Problem Details:
If CONFIG_PM_SLEEP is not set the completion used will not exist. Update
the code to avoid the build error this introduces, without PM_SLEEP it
should be safe to always run the conditional code.
Fixes: ffd7e8a10111 ("ASoC: SDCA: Device boot into the system suspend process")
Reported-by: kernel test ro... | ```diff
diff --git a/sound/soc/sdca/sdca_interrupts.c b/sound/soc/sdca/sdca_interrupts.c
index cc40732c30cc..d9e22cf40f77 100644
--- a/sound/soc/sdca/sdca_interrupts.c
+++ b/sound/soc/sdca/sdca_interrupts.c
@@ -198,6 +198,18 @@ error:
return irqret;
}
+#ifdef CONFIG_PM_SLEEP
+static bool no_pm_in_progress(struct d... |
60e8451be1f7af4b51540f2cfd65c9c85af752e9 | Analyze and fix the following issue in the Linux kernel code: ASoC: dt-bindings: mt8192-afe-pcm: Fix clocks and clock-names | Problem Details:
Both clocks and clock-names are missing (a lot of) entries: add
all the used audio clocks and their description and also fix the
example node.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Fixes: c861af7861aa ("ASoC: dt-bindings: mediatek: mt8192: re-add audio afe... | ```diff
diff --git a/Documentation/devicetree/bindings/sound/mt8192-afe-pcm.yaml b/Documentation/devicetree/bindings/sound/mt8192-afe-pcm.yaml
index 8ddf49b0040d..16ae3328f70d 100644
--- a/Documentation/devicetree/bindings/sound/mt8192-afe-pcm.yaml
+++ b/Documentation/devicetree/bindings/sound/mt8192-afe-pcm.yaml
@@ -4... |
54cf7900c6eff4832a349806bef85e0e123aa626 | Analyze and fix the following issue in the Linux kernel code: drm/i915/dp: Add intel_dp_dsc_get_slice_config() | Problem Details:
Add intel_dp_dsc_get_slice_config() to compute the detailed slice
configuration and determine the slices-per-line value (returned by
intel_dp_dsc_get_slice_count()) using this function.
v2: Fix incorrectly returning false from intel_dp_dsc_min_slice_count()
due to rebase fail. (Jouni)
Cc: Jouni H... | ```diff
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 2c50e380fb39..0ea9c4e3b7d3 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -1019,9 +1019,11 @@ static int intel_dp_dsc_min_slice_count(const struct intel_con... |
e89aacd1ecdd3d13e8f347aa082687878621e03c | Analyze and fix the following issue in the Linux kernel code: drm/xe: Reduce LRC timestamp stuck message on VFs to notice | Problem Details:
An LRC timestamp getting stuck is a somewhat normal occurrence. If a
single VF submits a job that does not get timesliced, the LRC timestamp
will not increment. Reduce the LRC timestamp stuck message on VFs to
notice (same log level as job timeout) to avoid false CI bugs in tests
where a VF submits a j... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
index a27ea931b956..1b2f66f4425b 100644
--- a/drivers/gpu/drm/xe/xe_guc_submit.c
+++ b/drivers/gpu/drm/xe/xe_guc_submit.c
@@ -1317,9 +1317,14 @@ static bool check_timeout(struct xe_exec_queue *q, struct xe_sched_job *job)
c... |
fc31008d5f57e71afa124550ca01b4399434435e | Analyze and fix the following issue in the Linux kernel code: i2c: rtl9300: remove const cast | Problem Details:
These casts are used to remove const for no good reason. Fix the types
instead.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20251217063027.37987-2-rosenp@g... | ```diff
diff --git a/drivers/i2c/busses/i2c-rtl9300.c b/drivers/i2c/busses/i2c-rtl9300.c
index 4723e48cfe18..f2aa341a7cdd 100644
--- a/drivers/i2c/busses/i2c-rtl9300.c
+++ b/drivers/i2c/busses/i2c-rtl9300.c
@@ -129,7 +129,7 @@ static int rtl9310_i2c_select_scl(struct rtl9300_i2c *i2c, u8 scl)
static int rtl9300_i2c_... |
41ee77b75308354054f4fe03a05b8016a0d41573 | Analyze and fix the following issue in the Linux kernel code: block: fix blk_zone_cond_str() comment | Problem Details:
Fix the comment for blk_zone_cond_str() by replacing the meaningless
BLK_ZONE_ZONE_XXX comment with the correct BLK_ZONE_COND_name, thus also
replacing the XXX with what that actually means.
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Cha... | ```diff
diff --git a/block/blk-zoned.c b/block/blk-zoned.c
index 1c54678fae6b..ef3872c53244 100644
--- a/block/blk-zoned.c
+++ b/block/blk-zoned.c
@@ -112,12 +112,12 @@ static inline unsigned int disk_zone_wplugs_hash_size(struct gendisk *disk)
#define BLK_ZONE_WPLUG_UNHASHED (1U << 2)
/**
- * blk_zone_cond_str - ... |
b110e28c3bf52c984c232ee633139ea10f754c0c | Analyze and fix the following issue in the Linux kernel code: ACPICA: Fix Segmentation Fault error related to DTPR | Problem Details:
Fix Segmentation Fault error, caused by invalid buffer lenght in DTPR
Table Template:
* Update buffer length for TPR Table, which invalid value caused
Segmentation Fault, during ASL file production.
* Refactor invalid values of TPR instances, arrays and serialization
requests count and TPR Ba... | ```diff
diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h
index 89541cd0c9b0..59fbd64405be 100644
--- a/include/acpi/actbl1.h
+++ b/include/acpi/actbl1.h
@@ -2057,12 +2057,12 @@ struct acpi_tprn_limit_reg {
*******************************************************************************/
struct acpi_tpr_ser... |
c3bc5f6d893b8e42890bf0a1097e6cc4ec33fe0b | Analyze and fix the following issue in the Linux kernel code: ACPICA: Fix asltests using the Fatal() opcode | Problem Details:
Some asltests test the behavior of the Fatal() opcode and thus require
that said opcode does not return an error when called.
Introduce a compile-time option called ACPI_CONTINUE_ON_FATAL to
instruct the executor to continue the execution of AML bytecode when
encountering a Fatal() opcode. Also update... | ```diff
diff --git a/drivers/acpi/acpica/exoparg3.c b/drivers/acpi/acpica/exoparg3.c
index c8c8c4e49563..2fc8070814e3 100644
--- a/drivers/acpi/acpica/exoparg3.c
+++ b/drivers/acpi/acpica/exoparg3.c
@@ -72,11 +72,18 @@ acpi_status acpi_ex_opcode_3A_0T_0R(struct acpi_walk_state *walk_state)
acpi_os_signal(ACPI_SIGN... |
091c4af3562d0b8484c7098fd16cf3cf9f39e7c9 | Analyze and fix the following issue in the Linux kernel code: ACPICA: ACPI 6.4: PPTT: include all fields in subtable type1 | Problem Details:
In PPTT version 3 an extra field, Cache ID, was added to the Cache Type
Structure. The struct, struct acpi_pptt_cache_v1, contains only this field. This
differs from the treatment of other versioned structures and is unexpected
for linux which reuses the actbl2.h header file. Include all the fields of... | ```diff
diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h
index 617be4bd3d4a..15856ae8b1e1 100644
--- a/include/acpi/actbl2.h
+++ b/include/acpi/actbl2.h
@@ -2953,6 +2953,15 @@ struct acpi_pptt_cache {
/* 1: Cache Type Structure for PPTT version 3 */
struct acpi_pptt_cache_v1 {
+ struct acpi_subtable_heade... |
026ad376a6a48538b576f3589331daa94daae6f0 | Analyze and fix the following issue in the Linux kernel code: ACPICA: Abort AML bytecode execution when executing AML_FATAL_OP | Problem Details:
The ACPI specification states that when executing AML_FATAL_OP,
the OS should log the fatal error event and shutdown in a timely
fashion.
Windows complies with this requirement by immediatly entering a
Bso_d, effectively aborting the execution of the AML bytecode in
question.
ACPICA however might con... | ```diff
diff --git a/drivers/acpi/acpica/exoparg3.c b/drivers/acpi/acpica/exoparg3.c
index bf08110ed6d2..c8c8c4e49563 100644
--- a/drivers/acpi/acpica/exoparg3.c
+++ b/drivers/acpi/acpica/exoparg3.c
@@ -10,6 +10,7 @@
#include <acpi/acpi.h>
#include "accommon.h"
#include "acinterp.h"
+#include <acpi/acoutput.h>
#inc... |
f851e03bce968ff9b3faad1b616062e1244fd38d | Analyze and fix the following issue in the Linux kernel code: ACPICA: Fix NULL pointer dereference in acpi_ev_address_space_dispatch() | Problem Details:
Cover a missed execution path with a new check.
Fixes: 0acf24ad7e10 ("ACPICA: Add support for PCC Opregion special context data")
Link: https://github.com/acpica/acpica/commit/f421dd9dd897
Signed-off-by: Alexey Simakov <bigalex934@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com... | ```diff
diff --git a/drivers/acpi/acpica/evregion.c b/drivers/acpi/acpica/evregion.c
index fa3475da7ea9..b6198f73c81d 100644
--- a/drivers/acpi/acpica/evregion.c
+++ b/drivers/acpi/acpica/evregion.c
@@ -163,7 +163,9 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
return_ACPI_STATUS(AE_NOT_E... |
05390d31d77ebd4cbd0bff54cbdcfd4283c9a93f | Analyze and fix the following issue in the Linux kernel code: ACPICA: ACPICA: replace ACPI_FREE() with acpi_ut_delete_object_desc() | Problem Details:
acpi_ut_create_internal_object() may allocate memory from a slab cache
via kmem_cache_zalloc(), but the code currently frees it with ACPI_FREE(),
which calls kfree().
This mismatch prevents the object from being released properly and may
lead to memory leaks or other issues.
Fix this by replacing ACP... | ```diff
diff --git a/drivers/acpi/acpica/nsxfname.c b/drivers/acpi/acpica/nsxfname.c
index 1db831545ec8..b6895a48ae68 100644
--- a/drivers/acpi/acpica/nsxfname.c
+++ b/drivers/acpi/acpica/nsxfname.c
@@ -601,7 +601,7 @@ acpi_status acpi_install_method(u8 *buffer)
error_exit:
ACPI_FREE(aml_buffer);
- ACPI_FREE(metho... |
2150467fc61ddb473145ace99afdcde88b54af8e | Analyze and fix the following issue in the Linux kernel code: Revert "arm64: tegra: Add interconnect properties for Tegra210" | Problem Details:
Commit 59a42707a094 ("arm64: tegra: Add interconnect properties for
Tegra210") populated interconnect properties for Tegra210 and this is
preventing the Tegra DRM driver from probing successfully. The following
error is observed on boot ...
drm drm: failed to initialize 54240000.dc: -517
For now rev... | ```diff
diff --git a/arch/arm64/boot/dts/nvidia/tegra210.dtsi b/arch/arm64/boot/dts/nvidia/tegra210.dtsi
index 709da31d5785..137aa8375257 100644
--- a/arch/arm64/boot/dts/nvidia/tegra210.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra210.dtsi
@@ -202,19 +202,6 @@
nvidia,outputs = <&dsia &dsib &sor0 &sor1>;
nvidia... |
ebbcaece84738f71b35f32339bdeb8776004e641 | Analyze and fix the following issue in the Linux kernel code: KVM: arm64: Fix MTE flag initialization for protected VMs | Problem Details:
The function pkvm_init_features_from_host() initializes guest
features, propagating them from the host. The logic to propagate
KVM_ARCH_FLAG_MTE_ENABLED (Memory Tagging Extension)
has a couple of issues.
First, the check was in the common path, before the divergence for
protected and non-protected VMs... | ```diff
diff --git a/arch/arm64/kvm/hyp/nvhe/pkvm.c b/arch/arm64/kvm/hyp/nvhe/pkvm.c
index 6bd539646204..d99137dddb1f 100644
--- a/arch/arm64/kvm/hyp/nvhe/pkvm.c
+++ b/arch/arm64/kvm/hyp/nvhe/pkvm.c
@@ -340,9 +340,6 @@ static void pkvm_init_features_from_host(struct pkvm_hyp_vm *hyp_vm, const struc
/* Preserve the vg... |
e913c7ce9e6f62038a486218f43f699fc443e3e1 | Analyze and fix the following issue in the Linux kernel code: KVM: arm64: Fix Trace Buffer trap polarity for protected VMs | Problem Details:
The E2TB bits in MDCR_EL2 control trapping of Trace Buffer system
register accesses. These accesses are trapped to EL2 when the bits are
clear.
The trap initialization logic for protected VMs in pvm_init_traps_mdcr()
had the polarity inverted. When a guest did not support the Trace Buffer
feature, the... | ```diff
diff --git a/arch/arm64/kvm/hyp/nvhe/pkvm.c b/arch/arm64/kvm/hyp/nvhe/pkvm.c
index f0bfab99c334..6bd539646204 100644
--- a/arch/arm64/kvm/hyp/nvhe/pkvm.c
+++ b/arch/arm64/kvm/hyp/nvhe/pkvm.c
@@ -118,7 +118,7 @@ static void pvm_init_traps_mdcr(struct kvm_vcpu *vcpu)
val |= MDCR_EL2_TTRF;
if (!kvm_has_feat... |
288eb55483c05bc37379a781d0d18b8e6c280f92 | Analyze and fix the following issue in the Linux kernel code: KVM: arm64: Fix Trace Buffer trapping for protected VMs | Problem Details:
For protected VMs in pKVM, the hypervisor should trap accesses to trace
buffer system registers if Trace Buffer isn't supported by the VM.
However, the current code only traps if Trace Buffer External Mode isn't
supported.
Fix this by checking for FEAT_TRBE (Trace Buffer) rather than
FEAT_TRBE_EXT.
F... | ```diff
diff --git a/arch/arm64/kvm/hyp/nvhe/pkvm.c b/arch/arm64/kvm/hyp/nvhe/pkvm.c
index 8911338961c5..f0bfab99c334 100644
--- a/arch/arm64/kvm/hyp/nvhe/pkvm.c
+++ b/arch/arm64/kvm/hyp/nvhe/pkvm.c
@@ -117,7 +117,7 @@ static void pvm_init_traps_mdcr(struct kvm_vcpu *vcpu)
if (!kvm_has_feat(kvm, ID_AA64DFR0_EL1, Trac... |
b2b8d247ad8ee1abe860598cae70e2dbe8a09128 | Analyze and fix the following issue in the Linux kernel code: dt-bindings: gpio-mmio: Correct opencores GPIO | Problem Details:
In commit f48b5e8bc2e1 ("dt-bindings: gpio-mmio: Add compatible string
for opencores,gpio") we marked opencores,gpio to be allowed with
brcm,bcm6345-gpio. This was wrong, opencores,gpio is not compatible with
brcm,bcm6345-gpio. It has a different register map and is 8-bit vs
Broadcom which is 32-bit. C... | ```diff
diff --git a/Documentation/devicetree/bindings/gpio/gpio-mmio.yaml b/Documentation/devicetree/bindings/gpio/gpio-mmio.yaml
index 7ee40b9bc562..1b2d253b19c1 100644
--- a/Documentation/devicetree/bindings/gpio/gpio-mmio.yaml
+++ b/Documentation/devicetree/bindings/gpio/gpio-mmio.yaml
@@ -18,16 +18,12 @@ descripti... |
bdc0c634612e3a9ecf318387a2c9cc0321ebf212 | Analyze and fix the following issue in the Linux kernel code: i2c: tegra: remove unused rst | Problem Details:
Since commit 56344e241c54 ("i2c: tegra: Fix reset error handling with
ACPI") replace reset_control_reset() with device_reset(), the rst
is no longer used, remove it.
Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20... | ```diff
diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
index e533460bccc3..9e39ac7a0a69 100644
--- a/drivers/i2c/busses/i2c-tegra.c
+++ b/drivers/i2c/busses/i2c-tegra.c
@@ -240,7 +240,6 @@ struct tegra_i2c_hw_feature {
* @div_clk: clock reference for div clock of I2C controller
* @cloc... |
be55257fab181b93af38f8c4b1b3cb453a78d742 | Analyze and fix the following issue in the Linux kernel code: ftrace: Do not over-allocate ftrace memory | Problem Details:
The pg_remaining calculation in ftrace_process_locs() assumes that
ENTRIES_PER_PAGE multiplied by 2^order equals the actual capacity of the
allocated page group. However, ENTRIES_PER_PAGE is PAGE_SIZE / ENTRY_SIZE
(integer division). When PAGE_SIZE is not a multiple of ENTRY_SIZE (e.g.
4096 / 24 = 170 ... | ```diff
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index ef2d5dca6f70..aa758efc3731 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -1148,7 +1148,6 @@ struct ftrace_page {
};
#define ENTRY_SIZE sizeof(struct dyn_ftrace)
-#define ENTRIES_PER_PAGE (PAGE_SIZE / ENTRY_SIZE)
static s... |
ec19ed2b3e2af8ec5380400cdee9cb6560144506 | Analyze and fix the following issue in the Linux kernel code: rnbd-clt: fix refcount underflow in device unmap path | Problem Details:
During device unmapping (triggered by module unload or explicit unmap),
a refcount underflow occurs causing a use-after-free warning:
[14747.574913] ------------[ cut here ]------------
[14747.574916] refcount_t: underflow; use-after-free.
[14747.574917] WARNING: lib/refcount.c:28 at refcount_wa... | ```diff
diff --git a/drivers/block/rnbd/rnbd-clt.c b/drivers/block/rnbd/rnbd-clt.c
index d1c354636315..8194a970f002 100644
--- a/drivers/block/rnbd/rnbd-clt.c
+++ b/drivers/block/rnbd/rnbd-clt.c
@@ -1662,7 +1662,6 @@ static void destroy_sysfs(struct rnbd_clt_dev *dev,
/* To avoid deadlock firstly remove itself */
... |
f6b625639e39bc384a7bddbf134a698d40258b3b | Analyze and fix the following issue in the Linux kernel code: spi: spi-cadence: enable SPI_CONTROLLER_MUST_TX | Problem Details:
During an SPI read operation, even if the xspi->txbuf passed to the
cdns_spi_writerinterface is empty, it is still necessary to call
cdns_spi_write(xspi, CDNS_SPI_TXD, txw); otherwise, the read operation
will fail to obtain data correctly due to a lack of clocks.
Fixes: 4e00135b2dd1 ("spi: spi-cadence... | ```diff
diff --git a/drivers/spi/spi-cadence.c b/drivers/spi/spi-cadence.c
index 47054da630d0..41b5b58cbfac 100644
--- a/drivers/spi/spi-cadence.c
+++ b/drivers/spi/spi-cadence.c
@@ -729,6 +729,7 @@ static int cdns_spi_probe(struct platform_device *pdev)
ctlr->unprepare_transfer_hardware = cdns_unprepare_transfer_har... |
f7fffd2e3f92ff526bf3a620e5bdd58bbbb96ccd | Analyze and fix the following issue in the Linux kernel code: platform/x86: asus-wmi: fix sending OOBE at probe | Problem Details:
Disabling OOBE is an important step to be able to fully control the
hardware in TUF laptops that requires this command, but the command
has been incorrectly tied to deprecated attributes: restore sending
the OOBE exit command.
Fixes: c683651b6791 ("platform/x86: asus-wmi: deprecate bios features")
Sig... | ```diff
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index 4aec7ec69250..0775fadedd10 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -4889,7 +4889,6 @@ static int asus_wmi_add(struct platform_device *pdev)
asus->egpu_enable_available = asus_wmi_... |
2bf1877b7094c684e1d652cac6912cfbc507ad3e | Analyze and fix the following issue in the Linux kernel code: platform/x86/amd: Fix memory leak in wbrf_record() | Problem Details:
The tmp buffer is allocated using kcalloc() but is not freed if
acpi_evaluate_dsm() fails. This causes a memory leak in the error path.
Fix this by explicitly freeing the tmp buffer in the error handling
path of acpi_evaluate_dsm().
Fixes: 58e82a62669d ("platform/x86/amd: Add support for AMD ACPI bas... | ```diff
diff --git a/drivers/platform/x86/amd/wbrf.c b/drivers/platform/x86/amd/wbrf.c
index dd197b3aebe0..0f58d252b620 100644
--- a/drivers/platform/x86/amd/wbrf.c
+++ b/drivers/platform/x86/amd/wbrf.c
@@ -104,8 +104,10 @@ static int wbrf_record(struct acpi_device *adev, uint8_t action, struct wbrf_ran
obj = acpi_ev... |
3113bcf4ccf06c938f0bc0c34cf6efe03278badc | Analyze and fix the following issue in the Linux kernel code: platform/mellanox: Fix SN5640/SN5610 LED platform data | Problem Details:
In SN5640/SN5610 platforms should be used XDR style LED data with
predefined slot index per led_fan.
Fixes: 317bbe169c46 ("platform: mellanox: mlx-platform: Add support for new Nvidia system")
Signed-off-by: Oleksandr Shamray <oleksandrs@nvidia.com>
Reviewed-by: Vadim Pasternak <vadimp@nvidia.com>
Li... | ```diff
diff --git a/drivers/platform/mellanox/mlx-platform.c b/drivers/platform/mellanox/mlx-platform.c
index d0df18be93c7..efd0c074ad93 100644
--- a/drivers/platform/mellanox/mlx-platform.c
+++ b/drivers/platform/mellanox/mlx-platform.c
@@ -7381,7 +7381,7 @@ static int __init mlxplat_dmi_ng400_hi171_matched(const str... |
e0a99a2b72f3c6365d9f4d6943ed45f7fc286b70 | Analyze and fix the following issue in the Linux kernel code: KVM: selftests: Fix typos and stale comments in kvm_util | Problem Details:
Fix minor documentation errors in `kvm_util.h` and `kvm_util.c`.
- Correct the argument description for `vcpu_args_set` in `kvm_util.h`,
which incorrectly listed `vm` instead of `vcpu`.
- Fix a typo in the comment for `kvm_selftest_arch_init` ("exeucting" ->
"executing").
- Correct the return valu... | ```diff
diff --git a/tools/testing/selftests/kvm/include/kvm_util.h b/tools/testing/selftests/kvm/include/kvm_util.h
index 747effa614f1..97f9251eb073 100644
--- a/tools/testing/selftests/kvm/include/kvm_util.h
+++ b/tools/testing/selftests/kvm/include/kvm_util.h
@@ -939,7 +939,7 @@ void *vcpu_map_dirty_ring(struct kvm_... |
582b39463f1c0774e0b3cb5be2118e8564b7941e | Analyze and fix the following issue in the Linux kernel code: KVM: riscv: selftests: Fix incorrect rounding in page_align() | Problem Details:
The implementation of `page_align()` in `processor.c` calculates
alignment incorrectly for values that are already aligned. Specifically,
`(v + vm->page_size) & ~(vm->page_size - 1)` aligns to the *next* page
boundary even if `v` is already page-aligned, potentially wasting a page
of memory.
Fix the c... | ```diff
diff --git a/tools/testing/selftests/kvm/lib/riscv/processor.c b/tools/testing/selftests/kvm/lib/riscv/processor.c
index 2eac7d4b59e9..d5e8747b5e69 100644
--- a/tools/testing/selftests/kvm/lib/riscv/processor.c
+++ b/tools/testing/selftests/kvm/lib/riscv/processor.c
@@ -28,7 +28,7 @@ bool __vcpu_has_ext(struct ... |
dd0c5d04d13cae8ff2694ef83d1ae5804d6d9798 | Analyze and fix the following issue in the Linux kernel code: KVM: arm64: selftests: Fix incorrect rounding in page_align() | Problem Details:
The implementation of `page_align()` in `processor.c` calculates
alignment incorrectly for values that are already aligned. Specifically,
`(v + vm->page_size) & ~(vm->page_size - 1)` aligns to the *next* page
boundary even if `v` is already page-aligned, potentially wasting a page
of memory.
Fix the c... | ```diff
diff --git a/tools/testing/selftests/kvm/lib/arm64/processor.c b/tools/testing/selftests/kvm/lib/arm64/processor.c
index 5b379da8cb90..607a4e462984 100644
--- a/tools/testing/selftests/kvm/lib/arm64/processor.c
+++ b/tools/testing/selftests/kvm/lib/arm64/processor.c
@@ -23,7 +23,7 @@ static vm_vaddr_t exception... |
57c31e6d620f132dcf610b2c52b4cdbd203c6f4a | Analyze and fix the following issue in the Linux kernel code: ACPI: scan: Use acpi_setup_gpe_for_wake() for buttons | Problem Details:
After starting to use platform devices for representing buttons
enumerated via ACPI, acpi_mark_gpe_for_wake() is insufficient for
preparing their GPEs to wake up the system from sleep because it
does not change the "dispatch type" of the given GPE to
ACPI_GPE_DISPATCH_NOTIFY. Subsequently, this causes... | ```diff
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 360d82378e56..b4301c797701 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -999,15 +999,11 @@ static int acpi_bus_extract_wakeup_device_power_package(struct acpi_device *dev)
return err;
}
-/* Do not use a button for S5 wakeup */
-#... |
e1c9223adf1c2b7d84f29f2e7e6d9a4f749da2c0 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: mediatek: mt7988a: Fix PCI-Express T-PHY node address | Problem Details:
The PCIe and USB TPHYs are under the soc bus, which provides MMIO,
and all nodes under that must use the bus, otherwise those would
clearly be out of place.
Add ranges to both the tphy(s) and assign the address to the main
node to silence a dtbs_check warning, and fix the children to
use the MMIO rang... | ```diff
diff --git a/arch/arm64/boot/dts/mediatek/mt7988a.dtsi b/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
index bec590d26659..8c9a5aba2579 100644
--- a/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
@@ -629,20 +629,20 @@
tphy: t-phy@11c50000 {
compatible = "mediatek,mt... |
44e3f867fd3f75123b0e8e460f723a115b0d8cd4 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: meson-s4-s905y4-khadas-vim1s: add initial device tree | Problem Details:
The Khadas VIM1S uses the Amlogic S905Y4 SoC, based on the
Amlogic S4 SoC family, on a board with the same form factor as the
VIM/VIM2/VIM3/VIM4 models. Serial debug console, ethernet, SD card
work with this initial device tree.
It features:
- 2GB LPDDR4 RAM
- 16GB eMMC 5.1 storage
- 32MB SPI flash... | ```diff
diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
index 219fb088c704..15f9c817e502 100644
--- a/arch/arm64/boot/dts/amlogic/Makefile
+++ b/arch/arm64/boot/dts/amlogic/Makefile
@@ -85,6 +85,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxm-ugoos-am3.dtb
dtb-$(CONFIG_ARCH_MESON) +... |
861d21c43c98478eef70e68e31d4ff86400c6ef7 | Analyze and fix the following issue in the Linux kernel code: pmdomain:rockchip: Fix init genpd as GENPD_STATE_ON before regulator ready | Problem Details:
RK3588_PD_NPU initialize as GENPD_STATE_ON before regulator ready.
rknn_iommu initlized success and suspend RK3588_PD_NPU. When rocket
driver register, it will resume rknn_iommu.
If regulator is still not ready at this point, rknn_iommu resume fail,
pm runtime status will be error: -EPROBE_DEFER.
Thi... | ```diff
diff --git a/drivers/pmdomain/rockchip/pm-domains.c b/drivers/pmdomain/rockchip/pm-domains.c
index 4f1336a0f49a..997e93c12951 100644
--- a/drivers/pmdomain/rockchip/pm-domains.c
+++ b/drivers/pmdomain/rockchip/pm-domains.c
@@ -879,6 +879,16 @@ static int rockchip_pm_add_one_domain(struct rockchip_pmu *pmu,
p... |
a4cd9860fa085f0d04d2065f4c151fcde9fcdf4a | Analyze and fix the following issue in the Linux kernel code: firewire: ohci: fix index of pages for dma address to 1394 OHCI IT context | Problem Details:
The index of pages for dma address was changed wrongly. This commit
corrents it.
Fixes: ef6bdffbb88d ("firewire: core: stop using page private to store DMA mapping address")
Link: https://lore.kernel.org/r/20260114131729.16133-1-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamo... | ```diff
diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c
index a43fe680d508..339047a2e768 100644
--- a/drivers/firewire/ohci.c
+++ b/drivers/firewire/ohci.c
@@ -3272,7 +3272,7 @@ static int queue_iso_transmit(struct iso_context *ctx,
min(next_page_index, payload_end_index) - payload_index;
pd[i].re... |
8ca7515d3c76a8b629f703ff8301a75f503bcc50 | Analyze and fix the following issue in the Linux kernel code: platform/x86: hp-wmi: fix platform profile values for Omen 16-wf1xxx | Problem Details:
HP Omen 16-wf1xxx (board ID 8C78) currently sends the incorrect
Victus-specific thermal profile values via WMI, leading to a logical
inconsistency when switching between platform profiles.
The driver currently uses Victus S values:
0x00 => Balanced / Low-Power
0x01 => Performance
However, Omen Gaming... | ```diff
diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c
index 45ab644ff10e..31c6cca6ec34 100644
--- a/drivers/platform/x86/hp/hp-wmi.c
+++ b/drivers/platform/x86/hp/hp-wmi.c
@@ -58,6 +58,66 @@ MODULE_ALIAS("wmi:5FB7F034-2C63-45E9-BE91-3D44E2C707E4");
#define zero_if_sup(tmp) (zero_in... |
be5a39e7994ec9f003c8569b670c794a4e5d1551 | Analyze and fix the following issue in the Linux kernel code: ASoC: rt5640: Fix duplicate clock properties in DT binding | Problem Details:
Not quite overlapping changes to the rt5640 binding resulted in duplicate
definitions of the clocks and clock-names properties. Delete one of them,
preferring the simpler one.
Reported-by: Jon Hunter <jonathanh@nvidia.com>
Closes: https://lore.kernel.org/r/0e68c5f4-f68d-4544-bc7a-40694829db75@nvidia.c... | ```diff
diff --git a/Documentation/devicetree/bindings/sound/realtek,rt5640.yaml b/Documentation/devicetree/bindings/sound/realtek,rt5640.yaml
index 02591d6be12b..2eb631950963 100644
--- a/Documentation/devicetree/bindings/sound/realtek,rt5640.yaml
+++ b/Documentation/devicetree/bindings/sound/realtek,rt5640.yaml
@@ -4... |
f972bde7326e9cd3498c137a052f2034f975ebae | Analyze and fix the following issue in the Linux kernel code: RDMA/mana_ib: Take CQ type from the device type | Problem Details:
Get CQ type from the used gdma device. The MANA_IB_CREATE_RNIC_CQ
flag is ignored. It was used in older kernel versions where
the mana_ib was shared between ethernet and rnic.
Fixes: d4293f96ce0b ("RDMA/mana_ib: unify mana_ib functions to support any gdma device")
Signed-off-by: Konstantin Taranov <ko... | ```diff
diff --git a/drivers/infiniband/hw/mana/cq.c b/drivers/infiniband/hw/mana/cq.c
index 1becc8779123..2dce1b677115 100644
--- a/drivers/infiniband/hw/mana/cq.c
+++ b/drivers/infiniband/hw/mana/cq.c
@@ -24,6 +24,7 @@ int mana_ib_create_cq(struct ib_cq *ibcq, const struct ib_cq_init_attr *attr,
cq->comp_vector =... |
0d26ca8ec461c01f682402f73a89643f4fefbbb3 | Analyze and fix the following issue in the Linux kernel code: LoongArch: Remove redundant code in head.S | Problem Details:
SETUP_MODES already setup the initial values of CSR.CRMD, CSR.PRMD and
CSR.EUEN, so the redundant open code can be removed.
Fixes: 7b2afeafaf9c2d5 ("LoongArch: Adjust boot & setup for 32BIT/64BIT")
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn> | ```diff
diff --git a/arch/loongarch/kernel/head.S b/arch/loongarch/kernel/head.S
index 7f288e89573b..4eed7bc312a8 100644
--- a/arch/loongarch/kernel/head.S
+++ b/arch/loongarch/kernel/head.S
@@ -126,14 +126,6 @@ SYM_CODE_START(smpboot_entry)
LONG_LI t1, CSR_STFILL
csrxchg t0, t1, LOONGARCH_CSR_IMPCTL1
#endif
- /... |
31911d3c394d6556a67ff63cf0093049ef6dcdd7 | Analyze and fix the following issue in the Linux kernel code: x86/paravirt: Use XOR r32,r32 to clear register in pv_vcpu_is_preempted() | Problem Details:
x86_64 zero extends 32bit operations, so for 64bit operands, XOR r32,r32 is
functionally equal to XOR r64,r64, but avoids a REX prefix byte when legacy
registers are used.
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Juergen Gross <jgr... | ```diff
diff --git a/arch/x86/include/asm/paravirt-spinlock.h b/arch/x86/include/asm/paravirt-spinlock.h
index 458b888aba84..7beffcb08ed6 100644
--- a/arch/x86/include/asm/paravirt-spinlock.h
+++ b/arch/x86/include/asm/paravirt-spinlock.h
@@ -45,7 +45,7 @@ static __always_inline void pv_queued_spin_unlock(struct qspinl... |
ab2be3af8c4ea57f779474cd2a2fe8dd4ad537a6 | Analyze and fix the following issue in the Linux kernel code: ALSA: hda/realtek: Add quirk for HP Pavilion x360 to enable mute LED | Problem Details:
This quirk enables mute LED on HP Pavilion x360 2-in-1 Laptop 14-ek0xxx,
which use ALC245 codec.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=220220
Cc: <stable@vger.kernel.org>
Signed-off-by: Zhang Heng <zhangheng@kylinos.cn>
Link: https://patch.msgid.link/20260115015844.3129890-1-zhangheng@kyli... | ```diff
diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index dbbe8b498583..29469e549791 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -6613,6 +6613,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x8a2e, "H... |
7874eeacfa42177565c01d5198726671acf7adf2 | Analyze and fix the following issue in the Linux kernel code: RDMA/iwcm: Fix workqueue list corruption by removing work_list | Problem Details:
The commit e1168f0 ("RDMA/iwcm: Simplify cm_event_handler()")
changed the work submission logic to unconditionally call
queue_work() with the expectation that queue_work() would
have no effect if work was already pending. The problem is
that a free list of struct iwcm_work is used (for which
struct wor... | ```diff
diff --git a/drivers/infiniband/core/iwcm.c b/drivers/infiniband/core/iwcm.c
index 62410578dec3..eb942ab9c405 100644
--- a/drivers/infiniband/core/iwcm.c
+++ b/drivers/infiniband/core/iwcm.c
@@ -95,7 +95,6 @@ static struct workqueue_struct *iwcm_wq;
struct iwcm_work {
struct work_struct work;
struct iwcm_i... |
0beefd0e15d962f497aad750b2d5e9c3570b66d1 | Analyze and fix the following issue in the Linux kernel code: RDMA/rxe: Fix double free in rxe_srq_from_init | Problem Details:
In rxe_srq_from_init(), the queue pointer 'q' is assigned to
'srq->rq.queue' before copying the SRQ number to user space.
If copy_to_user() fails, the function calls rxe_queue_cleanup()
to free the queue, but leaves the now-invalid pointer in
'srq->rq.queue'.
The caller of rxe_srq_from_init() (rxe_cre... | ```diff
diff --git a/drivers/infiniband/sw/rxe/rxe_srq.c b/drivers/infiniband/sw/rxe/rxe_srq.c
index 2a234f26ac10..c9a7cd38953d 100644
--- a/drivers/infiniband/sw/rxe/rxe_srq.c
+++ b/drivers/infiniband/sw/rxe/rxe_srq.c
@@ -77,9 +77,6 @@ int rxe_srq_from_init(struct rxe_dev *rxe, struct rxe_srq *srq,
goto err_free;
... |
e82d0477fd80707221c3d110f56d05506de2698c | Analyze and fix the following issue in the Linux kernel code: tpm/tpm_ftpm_tee: Fix kdoc after function renames | Problem Details:
Recently ftpm_tee_probe() and ftpm_tee_remove() grew a suffix in their
function name but I failed to adapt the kernel doc when doing so. This
change aligns the kernel doc to the actual function name (again).
Fixes: 92fad96aea24 ("tpm/tpm_ftpm_tee: Make use of tee bus methods")
Reported-by: kernel test... | ```diff
diff --git a/drivers/char/tpm/tpm_ftpm_tee.c b/drivers/char/tpm/tpm_ftpm_tee.c
index 20294d1953a3..b82490439633 100644
--- a/drivers/char/tpm/tpm_ftpm_tee.c
+++ b/drivers/char/tpm/tpm_ftpm_tee.c
@@ -163,7 +163,7 @@ static int ftpm_tee_match(struct tee_ioctl_version_data *ver, const void *data)
}
/**
- * ftp... |
4156c3745f06bc197094b9ee97a9584e69ed00bf | Analyze and fix the following issue in the Linux kernel code: virtio_net: Fix misalignment bug in struct virtnet_info | Problem Details:
Use the new TRAILING_OVERLAP() helper to fix a misalignment bug
along with the following warning:
drivers/net/virtio_net.c:429:46: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
This helper creates a union between a flexib... | ```diff
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index ca92b4a1879c..db88dcaefb20 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -425,9 +425,6 @@ struct virtnet_info {
u16 rss_indir_table_size;
u32 rss_hash_types_supported;
u32 rss_hash_types_saved;
- struct virtio... |
10d6d2416db2137a5a0ef9162662e5b7fee56dd4 | Analyze and fix the following issue in the Linux kernel code: perf/x86/intel/uncore: Convert comma to semicolon | Problem Details:
Replace comma between expressions with semicolons.
Using a ',' in place of a ';' can have unintended side effects.
Although that is not the case here, it is seems best to use ';'
unless ',' is intended.
Found by inspection.
No functional change intended.
Compile tested only.
Fixes: e7d5f2ea0923 ("pe... | ```diff
diff --git a/arch/x86/events/intel/uncore_snb.c b/arch/x86/events/intel/uncore_snb.c
index e8e44741200e..3dbc6bacbd9d 100644
--- a/arch/x86/events/intel/uncore_snb.c
+++ b/arch/x86/events/intel/uncore_snb.c
@@ -2005,11 +2005,11 @@ static struct intel_uncore_type *nvl_msr_uncores[] = {
void nvl_uncore_cpu_init(... |
4960626f956d63dce57f099016c2ecbe637a8229 | Analyze and fix the following issue in the Linux kernel code: perf/core: Fix slow perf_event_task_exit() with LBR callstacks | Problem Details:
I got a report that a task is stuck in perf_event_exit_task() waiting
for global_ctx_data_rwsem. On large systems with lots threads, it'd
have performance issues when it grabs the lock to iterate all threads
in the system to allocate the context data.
And it'd block task exit path which is problemati... | ```diff
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 101da5c1ab50..da013b9a595f 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -5421,9 +5421,20 @@ attach_task_ctx_data(struct task_struct *task, struct kmem_cache *ctx_cache,
return -ENOMEM;
for (;;) {
- if (try_cmpxchg((struct ... |
1809c82aa073a11b7d335ae932d81ce51a588a4a | Analyze and fix the following issue in the Linux kernel code: net: can: j1939: j1939_xtp_rx_rts_session_active(): deactivate session upon receiving the second rts | Problem Details:
Since j1939_session_deactivate_activate_next() in j1939_tp_rxtimer() is
called only when the timer is enabled, we need to call
j1939_session_deactivate_activate_next() if we cancelled the timer.
Otherwise, refcount for j1939_session leaks, which will later appear as
| unregister_netdevice: waiting for... | ```diff
diff --git a/net/can/j1939/transport.c b/net/can/j1939/transport.c
index 613a911dda10..8656ab388c83 100644
--- a/net/can/j1939/transport.c
+++ b/net/can/j1939/transport.c
@@ -1695,8 +1695,16 @@ static int j1939_xtp_rx_rts_session_active(struct j1939_session *session,
j1939_session_timers_cancel(session);
... |
faba5860fcf9a0ae49d2e484397bce44293367ff | Analyze and fix the following issue in the Linux kernel code: can: raw: instantly reject disabled CAN frames | Problem Details:
For real CAN interfaces the CAN_CTRLMODE_FD and CAN_CTRLMODE_XL control
modes indicate whether an interface can handle those CAN FD/XL frames.
In the case a CAN XL interface is configured in CANXL-only mode with
disabled error-signalling neither CAN CC nor CAN FD frames can be sent.
The checks are no... | ```diff
diff --git a/net/can/raw.c b/net/can/raw.c
index f36a83d3447c..12293363413c 100644
--- a/net/can/raw.c
+++ b/net/can/raw.c
@@ -49,8 +49,8 @@
#include <linux/if_arp.h>
#include <linux/skbuff.h>
#include <linux/can.h>
+#include <linux/can/can-ml.h>
#include <linux/can/core.h>
-#include <linux/can/dev.h> /* fo... |
166e87329ce6f1eaa3475ba2d14ed30e54727c0d | Analyze and fix the following issue in the Linux kernel code: can: propagate CAN device capabilities via ml_priv | Problem Details:
Commit 1a620a723853 ("can: raw: instantly reject unsupported CAN frames")
caused a sequence of dependency and linker fixes.
Instead of accessing CAN device internal data structures which caused the
dependency problems this patch introduces capability information into the
CAN specific ml_priv data whic... | ```diff
diff --git a/drivers/net/can/dev/dev.c b/drivers/net/can/dev/dev.c
index 091f30e94c61..7ab9578f5b89 100644
--- a/drivers/net/can/dev/dev.c
+++ b/drivers/net/can/dev/dev.c
@@ -375,6 +375,32 @@ void can_set_default_mtu(struct net_device *dev)
}
}
+void can_set_cap_info(struct net_device *dev)
+{
+ struct can... |
4650ff58a1b9ee68b2d3a207047998dd42e939b2 | Analyze and fix the following issue in the Linux kernel code: Revert "can: raw: instantly reject unsupported CAN frames" | Problem Details:
This reverts commit 1a620a723853a0f49703c317d52dc6b9602cbaa8
and its follow-up fixes for the introduced dependency issues.
commit 1a620a723853 ("can: raw: instantly reject unsupported CAN frames")
commit cb2dc6d2869a ("can: Kconfig: select CAN driver infrastructure by default")
commit 6abd4577bccc ("... | ```diff
diff --git a/drivers/net/can/Kconfig b/drivers/net/can/Kconfig
index cfaea6178a71..e15e320db476 100644
--- a/drivers/net/can/Kconfig
+++ b/drivers/net/can/Kconfig
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-only
menuconfig CAN_DEV
- bool "CAN Device Drivers"
+ tristate "CAN Device Drivers"
default ... |
3c941feaa363f1573a501452391ddf513394c84b | Analyze and fix the following issue in the Linux kernel code: arm64: dts: amlogic: g12: assign the MMC A signal clock | Problem Details:
The amlogic MMC driver operate with the assumption that MMC clock
is configured to provide 24MHz. It uses this path for low
rates such as 400kHz.
Assign the clock to make sure it is properly configured
Fixes: 8a6b3ca2d361 ("arm64: dts: meson: g12a: add SDIO controller")
Signed-off-by: Jerome Brunet <... | ```diff
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
index 0085612cf735..00609d2da674 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
@@ -2431,6 +2431,9 @@
<&clkc CLKID_FCLK... |
be2ff5fdb0e83e32d4ec4e68a69875cec0d14621 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: amlogic: g12: assign the MMC B and C signal clocks | Problem Details:
The amlogic MMC driver operate with the assumption that MMC clock
is configured to provide 24MHz. It uses this path for low
rates such as 400kHz.
Assign the clocks to make sure they are properly configured
Fixes: 4759fd87b928 ("arm64: dts: meson: g12a: add mmc nodes")
Signed-off-by: Jerome Brunet <jb... | ```diff
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
index ca455f634834..0085612cf735 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
@@ -2443,6 +2443,9 @@
<&clkc CLKID_FCLK... |
406706559046eebc09a31e8ae5e78620bfd746fe | Analyze and fix the following issue in the Linux kernel code: arm64: dts: amlogic: gx: assign the MMC signal clocks | Problem Details:
The amlogic MMC driver operate with the assumption that MMC clock
is configured to provide 24MHz. It uses this path for low
rates such as 400kHz.
Assign the clocks to make sure they are properly configured
Fixes: 50662499f911 ("ARM64: dts: meson-gx: Use correct mmc clock source 0")
Signed-off-by: Jer... | ```diff
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
index f69923da07fe..a9c830a570cc 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
@@ -824,6 +824,9 @@
<&clkc CLKID_FCLK_DIV2>;
clock-names = "cor... |
13d3fe2318ef6e46d6fcfe13bc373827fdf2aeac | Analyze and fix the following issue in the Linux kernel code: arm64: dts: amlogic: axg: assign the MMC signal clocks | Problem Details:
The amlogic MMC driver operate with the assumption that MMC clock
is configured to provide 24MHz. It uses this path for low
rates such as 400kHz.
Assign the clocks to make sure they are properly configured
Fixes: 221cf34bac54 ("ARM64: dts: meson-axg: enable the eMMC controller")
Signed-off-by: Jerome... | ```diff
diff --git a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
index e95c91894968..cc72491eaf6f 100644
--- a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
@@ -1960,6 +1960,9 @@
<&clkc CLKID_FCLK_DIV2>;
clock-names = "... |
69330fd2368371c4eb47d60ace6bca09763d24a0 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: amlogic: c3: assign the MMC signal clocks | Problem Details:
The amlogic MMC driver operate with the assumption that MMC clock
is configured to provide 24MHz. It uses this path for low
rates such as 400kHz.
Assign the clocks to make sure they are properly configured
Fixes: 520b792e8317 ("arm64: dts: amlogic: add some device nodes for C3")
Signed-off-by: Jerome... | ```diff
diff --git a/arch/arm64/boot/dts/amlogic/amlogic-c3.dtsi b/arch/arm64/boot/dts/amlogic/amlogic-c3.dtsi
index 11e5323f95b7..4e6757a57fb9 100644
--- a/arch/arm64/boot/dts/amlogic/amlogic-c3.dtsi
+++ b/arch/arm64/boot/dts/amlogic/amlogic-c3.dtsi
@@ -969,6 +969,10 @@
no-sd;
resets = <&reset RESET_SD_EMMC_... |
12ffd561d2de28825f39e15e8d22346d26b09688 | Analyze and fix the following issue in the Linux kernel code: mshv: handle gpa intercepts for arm64 | Problem Details:
The mshv driver now uses movable pages for guests. For arm64 guests
to be functional, handle gpa intercepts for arm64 too (the current
code implements handling only for x86).
Move some arch-agnostic functions out of #ifdefs so that they can be
re-used.
Fixes: b9a66cd5ccbb ("mshv: Add support for mova... | ```diff
diff --git a/drivers/hv/mshv_root_main.c b/drivers/hv/mshv_root_main.c
index 99fdbc3988aa..681b58154d5e 100644
--- a/drivers/hv/mshv_root_main.c
+++ b/drivers/hv/mshv_root_main.c
@@ -611,7 +611,6 @@ mshv_partition_region_by_gfn(struct mshv_partition *partition, u64 gfn)
return NULL;
}
-#ifdef CONFIG_X86_64... |
d2999c0fbcb2a84b0994ad3ec0d30c190ccd5e67 | Analyze and fix the following issue in the Linux kernel code: mshv: Add __user attribute to argument passed to access_ok() | Problem Details:
access_ok() expects its first argument to have the __user attribute
since it is checking access to user space. Current code passes an
argument that lacks that attribute, resulting in 'sparse' flagging
the incorrect usage. However, the compiler doesn't generate code
based on the attribute, so there's no... | ```diff
diff --git a/drivers/hv/mshv_root_main.c b/drivers/hv/mshv_root_main.c
index 1134a82c7881..99fdbc3988aa 100644
--- a/drivers/hv/mshv_root_main.c
+++ b/drivers/hv/mshv_root_main.c
@@ -1280,7 +1280,7 @@ mshv_map_user_memory(struct mshv_partition *partition,
long ret;
if (mem.flags & BIT(MSHV_SET_MEM_BIT_UNM... |
e020f604abaa6da9b7d579d9d73ffaf37072f520 | Analyze and fix the following issue in the Linux kernel code: mshv: Store the result of vfs_poll in a variable of type __poll_t | Problem Details:
vfs_poll() returns a result of type __poll_t, but current code is using
an "unsigned int" local variable. The difference is that __poll_t carries
the "bitwise" attribute. This attribute is not interpreted by the C
compiler; it is only used by 'sparse' to flag incorrect usage of the
return value. The re... | ```diff
diff --git a/drivers/hv/mshv_eventfd.c b/drivers/hv/mshv_eventfd.c
index d93a18f09c76..0b75ff1edb73 100644
--- a/drivers/hv/mshv_eventfd.c
+++ b/drivers/hv/mshv_eventfd.c
@@ -388,7 +388,7 @@ static int mshv_irqfd_assign(struct mshv_partition *pt,
{
struct eventfd_ctx *eventfd = NULL, *resamplefd = NULL;
st... |
259add0d982cbe83170f0c2a9f160834f0f83dd4 | Analyze and fix the following issue in the Linux kernel code: mshv: Align huge page stride with guest mapping | Problem Details:
Ensure that a stride larger than 1 (huge page) is only used when page
points to a head of a huge page and both the guest frame number (gfn) and
the operation size (page_count) are aligned to the huge page size
(PTRS_PER_PMD). This matches the hypervisor requirement that map/unmap
operations for huge pa... | ```diff
diff --git a/drivers/hv/mshv_regions.c b/drivers/hv/mshv_regions.c
index 30bacba6aec3..adba3564d9f1 100644
--- a/drivers/hv/mshv_regions.c
+++ b/drivers/hv/mshv_regions.c
@@ -19,6 +19,41 @@
#define MSHV_MAP_FAULT_IN_PAGES PTRS_PER_PMD
+/**
+ * mshv_chunk_stride - Compute stride for mapping guest memory
... |
49f49d47af67f8a7b221db1d758fc634242dc91a | Analyze and fix the following issue in the Linux kernel code: Drivers: hv: Always do Hyper-V panic notification in hv_kmsg_dump() | Problem Details:
hv_kmsg_dump() currently skips the panic notification entirely if it
doesn't get any message bytes to pass to Hyper-V due to an error from
kmsg_dump_get_buffer(). Skipping the notification is undesirable because
it leaves the Hyper-V host uncertain about the state of a panic'ed guest.
Fix this by alwa... | ```diff
diff --git a/drivers/hv/hv_common.c b/drivers/hv/hv_common.c
index 0a3ab7efed46..f1c17fb60dc1 100644
--- a/drivers/hv/hv_common.c
+++ b/drivers/hv/hv_common.c
@@ -195,13 +195,15 @@ static void hv_kmsg_dump(struct kmsg_dumper *dumper,
/*
* Write dump contents to the page. No need to synchronize; panic sho... |
fc558188f251f5df6dd11ac409d668733d9baac7 | Analyze and fix the following issue in the Linux kernel code: Drivers: hv: vmbus: fix typo in function name reference | Problem Details:
Replace cmxchg by cmpxchg.
Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
Reviewed-by: Roman Kisel <vdso@mailbox.org>
Signed-off-by: Wei Liu <wei.liu@kernel.org> | ```diff
diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h
index b2862e0a317a..cdbc5f5c3215 100644
--- a/drivers/hv/hyperv_vmbus.h
+++ b/drivers/hv/hyperv_vmbus.h
@@ -375,7 +375,7 @@ static inline void vmbus_signal_eom(struct hv_message *msg, u32 old_msg_type)
return;
/*
- * The cmxchg() above d... |
3e8e590fd65d0572584ab7bba89a35e6d19931f1 | Analyze and fix the following issue in the Linux kernel code: drivers/dax: add some missing kerneldoc comment fields for struct dev_dax | Problem Details:
Add the missing @align and @memmap_on_memory fields to kerneldoc comment
header for struct dev_dax.
Also, some other fields were followed by '-' and others by ':'. Fix all
to be ':' for actual kerneldoc compliance.
Link: https://lkml.kernel.org/r/20260110191804.5739-1-john@groves.net
Fixes: 33cf94d71... | ```diff
diff --git a/drivers/dax/dax-private.h b/drivers/dax/dax-private.h
index 0867115aeef2..c6ae27c982f4 100644
--- a/drivers/dax/dax-private.h
+++ b/drivers/dax/dax-private.h
@@ -67,14 +67,16 @@ struct dev_dax_range {
/**
* struct dev_dax - instance data for a subdivision of a dax region, and
* data while the ... |
f46c26f1bcd9164d7f3377f15ca75488a3e44362 | Analyze and fix the following issue in the Linux kernel code: mm: numa,memblock: include <asm/numa.h> for 'numa_nodes_parsed' | Problem Details:
The 'numa_nodes_parsed' is defined in <asm/numa.h> but this file
is not included in mm/numa_memblks.c (build x86_64) so add this
to the incldues to fix the following sparse warning:
mm/numa_memblks.c:13:12: warning: symbol 'numa_nodes_parsed' was not declared. Should it be static?
Link: https://lkml.... | ```diff
diff --git a/mm/numa_memblks.c b/mm/numa_memblks.c
index 5b009a9cd8b4..8f5735fda0a2 100644
--- a/mm/numa_memblks.c
+++ b/mm/numa_memblks.c
@@ -7,6 +7,8 @@
#include <linux/numa.h>
#include <linux/numa_memblks.h>
+#include <asm/numa.h>
+
int numa_distance_cnt;
static u8 *numa_distance;
``` |
18e87bceae6cdeceb9d31803bf81e2968073c191 | Analyze and fix the following issue in the Linux kernel code: mailmap: add entry for Daniel Thompson | Problem Details:
My linaro address stopped working a long time ago but I didn't update my
mailmap entry. Fix that.
Link: https://lkml.kernel.org/r/20260108-mailmap-daniel_thompson_linaro-org-v1-1-83f610876377@kernel.org
Signed-off-by: Daniel Thompson <danielt@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-found... | ```diff
diff --git a/.mailmap b/.mailmap
index bc94004bc4c2..4a8a160f28ed 100644
--- a/.mailmap
+++ b/.mailmap
@@ -207,6 +207,7 @@ Daniel Borkmann <daniel@iogearbox.net> <daniel.borkmann@tik.ee.ethz.ch>
Daniel Borkmann <daniel@iogearbox.net> <dborkmann@redhat.com>
Daniel Borkmann <daniel@iogearbox.net> <dborkman@redh... |
21c68ad1d9771d331198cc73cbf6e908d7915f35 | Analyze and fix the following issue in the Linux kernel code: tools/testing/selftests: fix gup_longterm for unknown fs | Problem Details:
Commit 66bce7afbaca ("selftests/mm: fix test result reporting in
gup_longterm") introduced a small bug causing unknown filesystems to
always result in a test failure.
This is because do_test() was updated to use a common reporting path, but
this case appears to have been missed.
This is problematic f... | ```diff
diff --git a/tools/testing/selftests/mm/gup_longterm.c b/tools/testing/selftests/mm/gup_longterm.c
index 6279893a0adc..f61150d28eb2 100644
--- a/tools/testing/selftests/mm/gup_longterm.c
+++ b/tools/testing/selftests/mm/gup_longterm.c
@@ -179,7 +179,7 @@ static void do_test(int fd, size_t size, enum test_type t... |
038a102535eb49e10e93eafac54352fcc5d78847 | Analyze and fix the following issue in the Linux kernel code: mm/page_alloc: prevent pcp corruption with SMP=n | Problem Details:
The kernel test robot has reported:
BUG: spinlock trylock failure on UP on CPU#0, kcompactd0/28
lock: 0xffff888807e35ef0, .magic: dead4ead, .owner: kcompactd0/28, .owner_cpu: 0
CPU: 0 UID: 0 PID: 28 Comm: kcompactd0 Not tainted 6.18.0-rc5-00127-ga06157804399 #1 PREEMPT 8cc09ef94dcec767faa911515ce... | ```diff
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 3dce96f3be49..f65c4edf199d 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -167,6 +167,33 @@ static inline void __pcp_trylock_noop(unsigned long *flags) { }
pcp_trylock_finish(UP_flags); \
})
+/*
+ * With the UP spinlock implementation, when we... |
4b5c493ff762bb0433529ca6870b284f0a2a5ca8 | Analyze and fix the following issue in the Linux kernel code: iommu/sva: include mmu_notifier.h header | Problem Details:
A call to mmu_notifier_arch_invalidate_secondary_tlbs() was introduced in
commit e37d5a2d60a3 ("iommu/sva: invalidate stale IOTLB entries for kernel
address space") but without explicitly adding its corresponding header
file <linux/mmu_notifier.h>. This was evidenced while trying to enable
compile tes... | ```diff
diff --git a/drivers/iommu/iommu-sva.c b/drivers/iommu/iommu-sva.c
index d236aef80a8d..e1e63c2be82b 100644
--- a/drivers/iommu/iommu-sva.c
+++ b/drivers/iommu/iommu-sva.c
@@ -3,6 +3,7 @@
* Helpers for IOMMU drivers implementing SVA
*/
#include <linux/mmu_context.h>
+#include <linux/mmu_notifier.h>
#includ... |
4795d205d78690a46b60164f44b8bb7b3e800865 | Analyze and fix the following issue in the Linux kernel code: mm: kmsan: fix poisoning of high-order non-compound pages | Problem Details:
kmsan_free_page() is called by the page allocator's free_pages_prepare()
during page freeing. Its job is to poison all the memory covered by the
page. It can be called with an order-0 page, a compound high-order page
or a non-compound high-order page. But page_size() only works for order-0
and compo... | ```diff
diff --git a/mm/kmsan/shadow.c b/mm/kmsan/shadow.c
index e7f554a31bb4..9e1c5f2b7a41 100644
--- a/mm/kmsan/shadow.c
+++ b/mm/kmsan/shadow.c
@@ -207,7 +207,7 @@ void kmsan_free_page(struct page *page, unsigned int order)
if (!kmsan_enabled || kmsan_in_runtime())
return;
kmsan_enter_runtime();
- kmsan_inter... |
fb39444732f02c32a8312c168d97e33d872c14d3 | Analyze and fix the following issue in the Linux kernel code: tools/testing/selftests: add forked (un)/faulted VMA merge tests | Problem Details:
Now we correctly handle forked faulted/unfaulted merge on mremap(),
exhaustively assert that we handle this correctly.
Do this in the less duplicative way by adding a new merge_with_fork
fixture and forked/unforked variants, and abstract the forking logic as
necessary to avoid code duplication with th... | ```diff
diff --git a/tools/testing/selftests/mm/merge.c b/tools/testing/selftests/mm/merge.c
index 22be149f7109..10b686102b79 100644
--- a/tools/testing/selftests/mm/merge.c
+++ b/tools/testing/selftests/mm/merge.c
@@ -22,12 +22,37 @@ FIXTURE(merge)
struct procmap_fd procmap;
};
+static char *map_carveout(unsigned... |
3b617fd3d317bf9dd7e2c233e56eafef05734c9d | Analyze and fix the following issue in the Linux kernel code: mm/vma: enforce VMA fork limit on unfaulted,faulted mremap merge too | Problem Details:
The is_mergeable_anon_vma() function uses vmg->middle as the source VMA.
However when merging a new VMA, this field is NULL.
In all cases except mremap(), the new VMA will either be newly established
and thus lack an anon_vma, or will be an expansion of an existing VMA thus
we do not care about wheth... | ```diff
diff --git a/mm/vma.c b/mm/vma.c
index 9df9e3b78604..dc92f3dd8514 100644
--- a/mm/vma.c
+++ b/mm/vma.c
@@ -67,18 +67,13 @@ struct mmap_state {
.state = VMA_MERGE_START, \
}
-/*
- * If, at any point, the VMA had unCoW'd mappings from parents, it will maintain
- * more than one anon_vma_chain connecting... |
0ace8f2db6b3b4b0677e559d1a7ab7fd625d61ec | Analyze and fix the following issue in the Linux kernel code: tools/testing/selftests: add tests for !tgt, src mremap() merges | Problem Details:
Test that mremap()'ing a VMA into a position such that the target VMA on
merge is unfaulted and the source faulted is correctly performed.
We cover 4 cases:
1. Previous VMA unfaulted:
copied -----|
v
|-----------|.............|
... | ```diff
diff --git a/tools/testing/selftests/mm/merge.c b/tools/testing/selftests/mm/merge.c
index 363c1033cc7d..22be149f7109 100644
--- a/tools/testing/selftests/mm/merge.c
+++ b/tools/testing/selftests/mm/merge.c
@@ -1171,4 +1171,236 @@ TEST_F(merge, mremap_correct_placed_faulted)
ASSERT_EQ(procmap->query.vma_end, ... |
61f67c230a5e7c741c352349ea80147fbe65bfae | Analyze and fix the following issue in the Linux kernel code: mm/vma: fix anon_vma UAF on mremap() faulted, unfaulted merge | Problem Details:
Patch series "mm/vma: fix anon_vma UAF on mremap() faulted, unfaulted
merge", v2.
Commit 879bca0a2c4f ("mm/vma: fix incorrectly disallowed anonymous VMA
merges") introduced the ability to merge previously unavailable VMA merge
scenarios.
However, it is handling merges incorrectly when it comes to mre... | ```diff
diff --git a/mm/vma.c b/mm/vma.c
index fc90befd162f..9df9e3b78604 100644
--- a/mm/vma.c
+++ b/mm/vma.c
@@ -829,6 +829,8 @@ static __must_check struct vm_area_struct *vma_merge_existing_range(
VM_WARN_ON_VMG(middle &&
!(vma_iter_addr(vmg->vmi) >= middle->vm_start &&
vma_iter_addr(vmg->vmi) < mid... |
590b13669b813d55844fecd9142c56abd567914d | Analyze and fix the following issue in the Linux kernel code: mm/zswap: fix error pointer free in zswap_cpu_comp_prepare() | Problem Details:
crypto_alloc_acomp_node() may return ERR_PTR(), but the fail path checks
only for NULL and can pass an error pointer to crypto_free_acomp(). Use
IS_ERR_OR_NULL() to only free valid acomp instances.
Link: https://lkml.kernel.org/r/20251231074638.2564302-1-pbutsykin@cloudlinux.com
Fixes: 779b9955f643 (... | ```diff
diff --git a/mm/zswap.c b/mm/zswap.c
index 5d0f8b13a958..ac9b7a60736b 100644
--- a/mm/zswap.c
+++ b/mm/zswap.c
@@ -787,7 +787,7 @@ static int zswap_cpu_comp_prepare(unsigned int cpu, struct hlist_node *node)
return 0;
fail:
- if (acomp)
+ if (!IS_ERR_OR_NULL(acomp))
crypto_free_acomp(acomp);
kfree(buf... |
392b3d9d595f34877dd745b470c711e8ebcd225c | Analyze and fix the following issue in the Linux kernel code: mm/damon/sysfs-scheme: cleanup access_pattern subdirs on scheme dir setup failure | Problem Details:
When a DAMOS-scheme DAMON sysfs directory setup fails after setup of
access_pattern/ directory, subdirectories of access_pattern/ directory are
not cleaned up. As a result, DAMON sysfs interface is nearly broken until
the system reboots, and the memory for the unremoved directory is leaked.
Cleanup t... | ```diff
diff --git a/mm/damon/sysfs-schemes.c b/mm/damon/sysfs-schemes.c
index 2c7a2b54be57..3a699dcd5a7f 100644
--- a/mm/damon/sysfs-schemes.c
+++ b/mm/damon/sysfs-schemes.c
@@ -2152,7 +2152,7 @@ static int damon_sysfs_scheme_add_dirs(struct damon_sysfs_scheme *scheme)
return err;
err = damos_sysfs_set_dests(sche... |
dc7e1d75fd8c505096d0cddeca9e2efb2b55aaf9 | Analyze and fix the following issue in the Linux kernel code: mm/damon/sysfs-scheme: cleanup quotas subdirs on scheme dir setup failure | Problem Details:
When a DAMOS-scheme DAMON sysfs directory setup fails after setup of
quotas/ directory, subdirectories of quotas/ directory are not cleaned up.
As a result, DAMON sysfs interface is nearly broken until the system
reboots, and the memory for the unremoved directory is leaked.
Cleanup the directories un... | ```diff
diff --git a/mm/damon/sysfs-schemes.c b/mm/damon/sysfs-schemes.c
index 30d20f5b3192..2c7a2b54be57 100644
--- a/mm/damon/sysfs-schemes.c
+++ b/mm/damon/sysfs-schemes.c
@@ -2158,7 +2158,7 @@ static int damon_sysfs_scheme_add_dirs(struct damon_sysfs_scheme *scheme)
goto put_dests_out;
err = damon_sysfs_scheme... |
9814cc832b88bd040fc2a1817c2b5469d0f7e862 | Analyze and fix the following issue in the Linux kernel code: mm/damon/sysfs: cleanup attrs subdirs on context dir setup failure | Problem Details:
When a context DAMON sysfs directory setup is failed after setup of attrs/
directory, subdirectories of attrs/ directory are not cleaned up. As a
result, DAMON sysfs interface is nearly broken until the system reboots,
and the memory for the unremoved directory is leaked.
Cleanup the directories unde... | ```diff
diff --git a/mm/damon/sysfs.c b/mm/damon/sysfs.c
index a669de068770..95fd9375a7d8 100644
--- a/mm/damon/sysfs.c
+++ b/mm/damon/sysfs.c
@@ -950,7 +950,7 @@ static int damon_sysfs_context_add_dirs(struct damon_sysfs_context *context)
err = damon_sysfs_context_set_targets(context);
if (err)
- goto put_attrs... |
a24ca8ebb0cd5ea07a1462b77be0f0823c40f319 | Analyze and fix the following issue in the Linux kernel code: mm/damon/sysfs: cleanup intervals subdirs on attrs dir setup failure | Problem Details:
Patch series "mm/damon/sysfs: free setup failures generated zombie sub-sub
dirs".
Some DAMON sysfs directory setup functions generates its sub and sub-sub
directories. For example, 'monitoring_attrs/' directory setup creates
'intervals/' and 'intervals/intervals_goal/' directories under
'monitoring_a... | ```diff
diff --git a/mm/damon/sysfs.c b/mm/damon/sysfs.c
index e2bd2d7becdd..a669de068770 100644
--- a/mm/damon/sysfs.c
+++ b/mm/damon/sysfs.c
@@ -792,7 +792,7 @@ static int damon_sysfs_attrs_add_dirs(struct damon_sysfs_attrs *attrs)
nr_regions_range = damon_sysfs_ul_range_alloc(10, 1000);
if (!nr_regions_range) {
... |
f9132fbc2e83baf2c45a77043672a63a675c9394 | Analyze and fix the following issue in the Linux kernel code: mm/damon/core: remove call_control in inactive contexts | Problem Details:
If damon_call() is executed against a DAMON context that is not running,
the function returns error while keeping the damon_call_control object
linked to the context's call_controls list. Let's suppose the object is
deallocated after the damon_call(), and yet another damon_call() is
executed against t... | ```diff
diff --git a/mm/damon/core.c b/mm/damon/core.c
index fd09bd106ad5..84f80a20f233 100644
--- a/mm/damon/core.c
+++ b/mm/damon/core.c
@@ -1431,6 +1431,35 @@ bool damon_is_running(struct damon_ctx *ctx)
return running;
}
+/*
+ * damon_call_handle_inactive_ctx() - handle DAMON call request that added to
+ * ... |
e561383a39ed6e5c85a0b2369720743b694327ae | Analyze and fix the following issue in the Linux kernel code: powerpc/watchdog: add support for hardlockup_sys_info sysctl | Problem Details:
Commit a9af76a78760 ("watchdog: add sys_info sysctls to dump sys info on
system lockup") adds 'hardlock_sys_info' systcl knob for general kernel
watchdog to control what kinds of system debug info to be dumped on
hardlockup.
Add similar support in powerpc watchdog code to make the sysctl knob more
gen... | ```diff
diff --git a/arch/powerpc/kernel/watchdog.c b/arch/powerpc/kernel/watchdog.c
index 2429cb1c7baa..764001deb060 100644
--- a/arch/powerpc/kernel/watchdog.c
+++ b/arch/powerpc/kernel/watchdog.c
@@ -26,6 +26,7 @@
#include <linux/delay.h>
#include <linux/processor.h>
#include <linux/smp.h>
+#include <linux/sys_in... |
f171b55f1441294344b86edfeaa575ea9673fd23 | Analyze and fix the following issue in the Linux kernel code: mips: fix HIGHMEM initialization | Problem Details:
Commit 6faea3422e3b ("arch, mm: streamline HIGHMEM freeing") overzealously
removed mem_init_free_highmem() function that beside freeing high memory
pages checked for CPU support for high memory as a prerequisite.
Partially restore mem_init_free_highmem() with a new highmem_init() name
and make it disc... | ```diff
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index a673d3d68254..8986048f9b11 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -425,6 +425,28 @@ void __init paging_init(void)
static struct kcore_list kcore_kseg0;
#endif
+static inline void __init highmem_init(void)
+{
+#ifdef CONFIG_H... |
b02019169284df8f4ce972a60da31d28bd5b5979 | Analyze and fix the following issue in the Linux kernel code: mm/hugetlb: ignore hugepage kernel args if hugepages are unsupported | Problem Details:
Skip processing hugepage kernel arguments (hugepagesz, hugepages, and
default_hugepagesz) when hugepages are not supported by the architecture.
Some architectures may need to disable hugepages based on conditions
discovered during kernel boot. The hugepages_supported() helper allows
architecture code... | ```diff
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 51273baec9e5..e0ab14020513 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -4286,6 +4286,11 @@ static int __init hugepages_setup(char *s)
unsigned long tmp;
char *p = s;
+ if (!hugepages_supported()) {
+ pr_warn("HugeTLB: hugepages unsupported, ignoring huge... |
a38be546269073bf8edc3c49eaf18cdfce905777 | Analyze and fix the following issue in the Linux kernel code: mm/damon/core: get memcg reference before access | Problem Details:
The commit b74a120bcf507 ("mm/damon/core: implement
DAMOS_QUOTA_NODE_MEMCG_USED_BP") added accesses to memcg structure without
getting reference to it. This is unsafe. Let's get the reference before
accessing the memcg.
Link: https://lkml.kernel.org/r/20251225002904.139543-1-shakeel.butt@linux.dev
F... | ```diff
diff --git a/mm/damon/core.c b/mm/damon/core.c
index f9fc0375890a..fd09bd106ad5 100644
--- a/mm/damon/core.c
+++ b/mm/damon/core.c
@@ -2051,13 +2051,15 @@ static unsigned long damos_get_node_memcg_used_bp(
rcu_read_lock();
memcg = mem_cgroup_from_id(goal->memcg_id);
- rcu_read_unlock();
- if (!memcg) {
+ ... |
582f0f3864110e1c6e4af3af768e1c2453ba2306 | Analyze and fix the following issue in the Linux kernel code: kho: validate preserved memory map during population | Problem Details:
If the previous kernel enabled KHO but did not call kho_finalize() (e.g.,
CONFIG_LIVEUPDATE=n or userspace skipped the finalization step), the
'preserved-memory-map' property in the FDT remains empty/zero.
Previously, kho_populate() would succeed regardless of the memory map's
state, reserving the inc... | ```diff
diff --git a/kernel/liveupdate/kexec_handover.c b/kernel/liveupdate/kexec_handover.c
index 9dc51fab604f..d4482b6e3cae 100644
--- a/kernel/liveupdate/kexec_handover.c
+++ b/kernel/liveupdate/kexec_handover.c
@@ -460,27 +460,23 @@ static void __init deserialize_bitmap(unsigned int order,
}
}
-/* Return true ... |
777a8560fd29738350c5094d4166fe5499452409 | Analyze and fix the following issue in the Linux kernel code: lib/buildid: use __kernel_read() for sleepable context | Problem Details:
Prevent a "BUG: unable to handle kernel NULL pointer dereference in
filemap_read_folio".
For the sleepable context, convert freader to use __kernel_read() instead
of direct page cache access via read_cache_folio(). This simplifies the
faultable code path by using the standard kernel file reading inte... | ```diff
diff --git a/lib/buildid.c b/lib/buildid.c
index aaf61dfc0919..818331051afe 100644
--- a/lib/buildid.c
+++ b/lib/buildid.c
@@ -5,6 +5,7 @@
#include <linux/elf.h>
#include <linux/kernel.h>
#include <linux/pagemap.h>
+#include <linux/fs.h>
#include <linux/secretmem.h>
#define BUILD_ID 3
@@ -46,20 +47,9 @@ ... |
6cfab50e1440fde19af7c614aacd85e11aa4dcea | Analyze and fix the following issue in the Linux kernel code: mm, kfence: describe @slab parameter in __kfence_obj_info() | Problem Details:
Sphinx reports kernel-doc warning:
WARNING: ./include/linux/kfence.h:220 function parameter 'slab' not described in '__kfence_obj_info'
Fix it by describing @slab parameter.
Link: https://lkml.kernel.org/r/20251219014006.16328-6-bagasdotme@gmail.com
Fixes: 2dfe63e61cc3 ("mm, kfence: support kmem_dum... | ```diff
diff --git a/include/linux/kfence.h b/include/linux/kfence.h
index 0ad1ddbb8b99..e5822f6e7f27 100644
--- a/include/linux/kfence.h
+++ b/include/linux/kfence.h
@@ -211,6 +211,7 @@ struct kmem_obj_info;
* __kfence_obj_info() - fill kmem_obj_info struct
* @kpp: kmem_obj_info to be filled
* @object: the objec... |
eb3f781ab73e7ed970070a0b9a7d951f980e717a | Analyze and fix the following issue in the Linux kernel code: mm: vmalloc: fix up vrealloc_node_align() kernel-doc macro name | Problem Details:
Sphinx reports kernel-doc warning:
WARNING: ./mm/vmalloc.c:4284 expecting prototype for vrealloc_node_align_noprof(). Prototype was for vrealloc_node_align() instead
Fix the macro name in vrealloc_node_align_noprof() kernel-doc comment.
Link: https://lkml.kernel.org/r/20251219014006.16328-5-bagasdot... | ```diff
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 41dd01e8430c..628f96e83b11 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -4248,7 +4248,7 @@ void *vzalloc_node_noprof(unsigned long size, int node)
EXPORT_SYMBOL(vzalloc_node_noprof);
/**
- * vrealloc_node_align_noprof - reallocate virtually contiguous memory... |
f26528478bb102c28e7ac0cbfc8ec8185afdafc7 | Analyze and fix the following issue in the Linux kernel code: textsearch: describe @list member in ts_ops search | Problem Details:
Sphinx reports kernel-doc warning:
WARNING: ./include/linux/textsearch.h:49 struct member 'list' not described in 'ts_ops'
Describe @list member to fix it.
Link: https://lkml.kernel.org/r/20251219014006.16328-4-bagasdotme@gmail.com
Fixes: 2de4ff7bd658 ("[LIB]: Textsearch infrastructure.")
Signed-off... | ```diff
diff --git a/include/linux/textsearch.h b/include/linux/textsearch.h
index 6673e4d4ac2e..4933777404d6 100644
--- a/include/linux/textsearch.h
+++ b/include/linux/textsearch.h
@@ -35,6 +35,7 @@ struct ts_state
* @get_pattern: return head of pattern
* @get_pattern_len: return length of pattern
* @owner: mod... |
e2fb7836b01747815f8bb94981c35f2688afb120 | Analyze and fix the following issue in the Linux kernel code: mm: describe @flags parameter in memalloc_flags_save() | Problem Details:
Patch series "mm kernel-doc fixes".
Here are kernel-doc fixes for mm subsystem. I'm also including textsearch
fix since there's currently no maintainer for include/linux/textsearch.h
(get_maintainer.pl only shows LKML).
This patch (of 4):
Sphinx reports kernel-doc warning:
WARNING: ./include/linu... | ```diff
diff --git a/include/linux/sched/mm.h b/include/linux/sched/mm.h
index 0e1d73955fa5..95d0040df584 100644
--- a/include/linux/sched/mm.h
+++ b/include/linux/sched/mm.h
@@ -325,6 +325,7 @@ static inline void might_alloc(gfp_t gfp_mask)
/**
* memalloc_flags_save - Add a PF_* flag to current->flags, save old v... |
697a5284ad9697609324739e38e341612cd342a6 | Analyze and fix the following issue in the Linux kernel code: io_uring: fix IOPOLL with passthrough I/O | Problem Details:
A previous commit improving IOPOLL made an incorrect assumption that
task_work isn't used with IOPOLL. This can cause crashes when doing
passthrough I/O on nvme, where queueing the completion task_work will
trample on the same memory that holds the completed list of requests.
Fix it up by shuffling th... | ```diff
diff --git a/include/linux/io_uring_types.h b/include/linux/io_uring_types.h
index e4c804f99c30..211686ad89fd 100644
--- a/include/linux/io_uring_types.h
+++ b/include/linux/io_uring_types.h
@@ -713,13 +713,10 @@ struct io_kiocb {
atomic_t refs;
bool cancel_seq_set;
- /*
- * IOPOLL doesn't use task_... |
27b75ca4e51e3e4554dc85dbf1a0246c66106fd3 | Analyze and fix the following issue in the Linux kernel code: fs/ntfs3: prevent infinite loops caused by the next valid being the same | Problem Details:
When processing valid within the range [valid : pos), if valid cannot
be retrieved correctly, for example, if the retrieved valid value is
always the same, this can trigger a potential infinite loop, similar
to the hung problem reported by syzbot [1].
Adding a check for the valid value within the loop... | ```diff
diff --git a/fs/ntfs3/file.c b/fs/ntfs3/file.c
index 58fa4da114bb..1be77f865d78 100644
--- a/fs/ntfs3/file.c
+++ b/fs/ntfs3/file.c
@@ -1016,8 +1016,12 @@ static ssize_t ntfs_compress_write(struct kiocb *iocb, struct iov_iter *from)
goto out;
if (lcn == SPARSE_LCN) {
- ni->i_valid = valid =
- frame... |
1dad2fff0261568e7fa6a1760619d88d0ef0aff3 | Analyze and fix the following issue in the Linux kernel code: fs/ntfs3: make ntfs_writeback_ops static | Problem Details:
Fix below sparse warnings:
fs/ntfs3/inode.c:972:34: sparse: sparse: symbol 'ntfs_writeback_ops' was not declared.
Should it be static?
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202601061424.nbKLNwC5-lkp@intel.com/
Signed-off-by: sunliming <sunliming@k... | ```diff
diff --git a/fs/ntfs3/inode.c b/fs/ntfs3/inode.c
index b969ad7c3258..636aa77e20e4 100644
--- a/fs/ntfs3/inode.c
+++ b/fs/ntfs3/inode.c
@@ -969,7 +969,7 @@ static ssize_t ntfs_writeback_range(struct iomap_writepage_ctx *wpc,
}
-const struct iomap_writeback_ops ntfs_writeback_ops = {
+static const struct iom... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.