id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
6695dc279820a50cb20ecd8b5250e05234dac780 | Analyze and fix the following issue in the Linux kernel code: drm/i915/display: Prevent u64 underflow in intel_fbc_stolen_end | Problem Details:
Static analysis reveals a potential integer underflow in
intel_fbc_stolen_end. This can apparently occur if
intel_parent_stolen_area_size returns zero (or, theoretically, any value
less than 2^23), as 2^23 is subtracted from the return value and stored
in a u64. While this doesn't appear to cause any... | ```diff
diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c b/drivers/gpu/drm/i915/display/intel_fbc.c
index fef2f35ff1e9..1f3f5237a1c2 100644
--- a/drivers/gpu/drm/i915/display/intel_fbc.c
+++ b/drivers/gpu/drm/i915/display/intel_fbc.c
@@ -809,19 +809,32 @@ static u64 intel_fbc_cfb_base_max(struct intel_display *dis... |
6d6ad32e22f028c525d5df471c5522616e645a6b | Analyze and fix the following issue in the Linux kernel code: selftests/pidfd: fix typo in comment | Problem Details:
Fix the typo "untill" → "until" in a comment in pidfd_info_test.c.
This typo is already listed in scripts/spelling.txt by commit
66b47b4a9dad ("checkpatch: look for common misspellings").
Link: https://lore.kernel.org/r/20260121094147.4187337-1-chenziyu@uniontech.com
Suggested-by: Cryolitia PukNgae <... | ```diff
diff --git a/tools/testing/selftests/pidfd/pidfd_info_test.c b/tools/testing/selftests/pidfd/pidfd_info_test.c
index 6571e04acd88..8bed951e06a0 100644
--- a/tools/testing/selftests/pidfd/pidfd_info_test.c
+++ b/tools/testing/selftests/pidfd/pidfd_info_test.c
@@ -229,7 +229,7 @@ static void *pidfd_info_pause_thr... |
75e7ed52ac7c1da90f304dcda2906636404df921 | Analyze and fix the following issue in the Linux kernel code: pwm: tiehrpwm: Enable pwmchip's parent device before setting configuration | Problem Details:
The period and duty cycle configurations on J7200 and J784S4 SoCs
does not get reflected after setting them using sysfs nodes.
This is because at the end of ehrpwm_pwm_config function,
the put_sync function is called which resets the hardware.
Hold the PWM controller out of low-power mode during .appl... | ```diff
diff --git a/drivers/pwm/pwm-tiehrpwm.c b/drivers/pwm/pwm-tiehrpwm.c
index 7a86cb090f76..2533c95b0ba9 100644
--- a/drivers/pwm/pwm-tiehrpwm.c
+++ b/drivers/pwm/pwm-tiehrpwm.c
@@ -237,8 +237,6 @@ static int ehrpwm_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
if (period_cycles < 1)
period_cycles... |
68b271a3a94cfd6c7695a96b6398b52feb89e2c2 | Analyze and fix the following issue in the Linux kernel code: drm/bridge: fix kdoc syntax | Problem Details:
Use the correct kdoc syntax for bullet list.
Fixes kdoc error and warning:
Documentation/gpu/drm-kms-helpers:197: ./drivers/gpu/drm/drm_bridge.c:1519: ERROR: Unexpected indentation. [docutils]
Documentation/gpu/drm-kms-helpers:197: ./drivers/gpu/drm/drm_bridge.c:1521: WARNING: Block quote ends wi... | ```diff
diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c
index 6dcf8f6d3ecf..3b165a0d1e77 100644
--- a/drivers/gpu/drm/drm_bridge.c
+++ b/drivers/gpu/drm/drm_bridge.c
@@ -1518,11 +1518,14 @@ EXPORT_SYMBOL(of_drm_find_and_get_bridge);
* The bridge returned by this function is not refcounted. Th... |
d6d0e6b9d54532264761405a1ba8ea5bd293acb1 | Analyze and fix the following issue in the Linux kernel code: dm: fix excessive blk-crypto operations for invalid keys | Problem Details:
dm_exec_wrappedkey_op() passes through the derive_sw_secret, import_key,
generate_key, and prepare_key blk-crypto operations to an underlying
device.
Currently, it calls the operation on every underlying device until one
returns success.
This logic is flawed when the operation is expected to fail, su... | ```diff
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
index 0522cd700e0e..4b70872725d0 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -1237,9 +1237,6 @@ static int dm_wrappedkey_op_callback(struct dm_target *ti, struct dm_dev *dev,
bdev_get_queue(bdev)->crypto_profile;
int err = -EO... |
98c88dc8a1ace642d9021b103b28cba7b51e3abc | Analyze and fix the following issue in the Linux kernel code: sched/fair: Fix pelt clock sync when entering idle | Problem Details:
Samuel and Alex reported regressions of the util_avg of RT rq with
commit 17e3e88ed0b6 ("sched/fair: Fix pelt lost idle time detection").
It happens that fair is updating and syncing the pelt clock with task one
when pick_next_task_fair() fails to pick a task but before the prev
scheduling class got a ... | ```diff
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index e71302282671..a148c61a8085 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -8995,12 +8995,6 @@ idle:
goto again;
}
- /*
- * rq is about to be idle, check if we need to update the
- * lost_idle_time of clock_pelt
- */
- update_... |
d06bf78e55d5159c1b00072e606ab924ffbbad35 | Analyze and fix the following issue in the Linux kernel code: perf: Fix refcount warning on event->mmap_count increment | Problem Details:
When calling refcount_inc(&event->mmap_count) inside perf_mmap_rb(), the
following warning is triggered:
refcount_t: addition on 0; use-after-free.
WARNING: lib/refcount.c:25
PoC:
struct perf_event_attr attr = {0};
int fd = syscall(__NR_perf_event_open, &attr, 0, -1, -1, 0);
... | ```diff
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 5b5cb620499e..a0fa488bce84 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -6997,6 +6997,15 @@ static int perf_mmap_rb(struct vm_area_struct *vma, struct perf_event *event,
if (data_page_nr(event->rb) != nr_pages)
return -EINV... |
0fcee2cfc4b2e16e62ff8e0cc2cd8dd24efad65e | Analyze and fix the following issue in the Linux kernel code: nvmet: fix race in nvmet_bio_done() leading to NULL pointer dereference | Problem Details:
There is a race condition in nvmet_bio_done() that can cause a NULL
pointer dereference in blk_cgroup_bio_start():
1. nvmet_bio_done() is called when a bio completes
2. nvmet_req_complete() is called, which invokes req->ops->queue_response(req)
3. The queue_response callback can re-queue and re-submit... | ```diff
diff --git a/drivers/nvme/target/io-cmd-bdev.c b/drivers/nvme/target/io-cmd-bdev.c
index 8d246b8ca604..0103815542d4 100644
--- a/drivers/nvme/target/io-cmd-bdev.c
+++ b/drivers/nvme/target/io-cmd-bdev.c
@@ -180,9 +180,10 @@ u16 blk_to_nvme_status(struct nvmet_req *req, blk_status_t blk_sts)
static void nvmet_b... |
e7e1cc18f120a415646be12470169a978a1adcd9 | Analyze and fix the following issue in the Linux kernel code: selftests/ublk: fix garbage output in foreground mode | Problem Details:
Initialize _evtfd to -1 in struct dev_ctx to prevent garbage output
when running kublk in foreground mode. Without this, _evtfd is
zero-initialized to 0 (stdin), and ublk_send_dev_event() writes
binary data to stdin which appears as garbage on the terminal.
Also fix debug message format string.
Fixes... | ```diff
diff --git a/tools/testing/selftests/ublk/kublk.c b/tools/testing/selftests/ublk/kublk.c
index 65f59e7b6972..f197ad9cc262 100644
--- a/tools/testing/selftests/ublk/kublk.c
+++ b/tools/testing/selftests/ublk/kublk.c
@@ -1274,7 +1274,7 @@ static int __cmd_dev_add(const struct dev_ctx *ctx)
}
ret = ublk_star... |
23e62cf75518825aac12e9a22bdc40f062428898 | Analyze and fix the following issue in the Linux kernel code: selftests/ublk: fix error handling for starting device | Problem Details:
Fix error handling in ublk_start_daemon() when start_dev fails:
1. Call ublk_ctrl_stop_dev() to cancel inflight uring_cmd before
cleanup. Without this, the device deletion may hang waiting for
I/O completion that will never happen.
2. Add fail_start label so that pthread_join() is called on the... | ```diff
diff --git a/tools/testing/selftests/ublk/kublk.c b/tools/testing/selftests/ublk/kublk.c
index f52431fe9b6c..65f59e7b6972 100644
--- a/tools/testing/selftests/ublk/kublk.c
+++ b/tools/testing/selftests/ublk/kublk.c
@@ -1054,7 +1054,9 @@ static int ublk_start_daemon(const struct dev_ctx *ctx, struct ublk_dev *de... |
75aad5ffe099a1b1a342257236dc260493917ed2 | Analyze and fix the following issue in the Linux kernel code: selftests/ublk: fix IO thread idle check | Problem Details:
Include cmd_inflight in ublk_thread_is_done() check. Without this,
the thread may exit before all FETCH commands are completed, which
may cause device deletion to hang.
Fixes: 6aecda00b7d1 ("selftests: ublk: add kernel selftests for ublk")
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: J... | ```diff
diff --git a/tools/testing/selftests/ublk/kublk.c b/tools/testing/selftests/ublk/kublk.c
index 185ba553686a..f52431fe9b6c 100644
--- a/tools/testing/selftests/ublk/kublk.c
+++ b/tools/testing/selftests/ublk/kublk.c
@@ -753,7 +753,7 @@ static int ublk_thread_is_idle(struct ublk_thread *t)
static int ublk_thre... |
eb89b17f283b233ba721fce358fa0d15223ae69d | Analyze and fix the following issue in the Linux kernel code: Revert "mmc: rtsx_pci: add quirk to disable MMC_CAP_AGGRESSIVE_PM for RTS525A" | Problem Details:
This reverts commit 5f0bf80cc5e04d31eeb201683e0b477c24bd18e7.
This was asked to be reverted as it is not the correct way to do this.
Fixes: 5f0bf80cc5e0 ("mmc: rtsx_pci: add quirk to disable MMC_CAP_AGGRESSIVE_PM for RTS525A")
Cc: Matthew Schwartz <matthew.schwartz@linux.dev>
Signed-off-by: Greg Kroa... | ```diff
diff --git a/drivers/misc/cardreader/rts5249.c b/drivers/misc/cardreader/rts5249.c
index 87d576a03e68..38aefd8db452 100644
--- a/drivers/misc/cardreader/rts5249.c
+++ b/drivers/misc/cardreader/rts5249.c
@@ -78,9 +78,6 @@ static void rtsx_base_fetch_vendor_settings(struct rtsx_pcr *pcr)
if (CHK_PCI_PID(pcr, PI... |
c23f0550c05d40762b141808709667759291c938 | Analyze and fix the following issue in the Linux kernel code: Revert "mmc: rtsx: reset power state on suspend" | Problem Details:
This reverts commit eac85fbd0867c25ac517f58fae401d65c627edff.
This is not the correct change, so revert it for now.
Fixes: eac85fbd0867 ("mmc: rtsx: reset power state on suspend")
Cc: Matthew Schwartz <matthew.schwartz@linux.dev>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hart... | ```diff
diff --git a/drivers/misc/cardreader/rtsx_pcr.c b/drivers/misc/cardreader/rtsx_pcr.c
index f1f4d8ed544d..f9952d76d6ed 100644
--- a/drivers/misc/cardreader/rtsx_pcr.c
+++ b/drivers/misc/cardreader/rtsx_pcr.c
@@ -1654,7 +1654,6 @@ static int __maybe_unused rtsx_pci_suspend(struct device *dev_d)
struct pci_dev *... |
ff112f1ecd10b72004eac05bae395e1c65f0c63c | Analyze and fix the following issue in the Linux kernel code: Revert "mmc: rtsx_pci_sdmmc: increase power-on settling delay to 5ms" | Problem Details:
This reverts commit aced969e9bf3701dc75cfca57c78c031b7875b9d.
It was determined that this was not the correct "fix", so should be
reverted.
Fixes: aced969e9bf3 ("mmc: rtsx_pci_sdmmc: increase power-on settling delay to 5ms")
Cc: Matthew Schwartz <matthew.schwartz@linux.dev>
Cc: Ulf Hansson <ulf.hanss... | ```diff
diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c b/drivers/mmc/host/rtsx_pci_sdmmc.c
index 767816c09491..b847d79d4d8c 100644
--- a/drivers/mmc/host/rtsx_pci_sdmmc.c
+++ b/drivers/mmc/host/rtsx_pci_sdmmc.c
@@ -947,7 +947,7 @@ static int sd_power_on(struct realtek_pci_sdmmc *host, unsigned char power_mode)
if (er... |
f5f2bad67a45cd1ef6f5b727da104694a81b3666 | Analyze and fix the following issue in the Linux kernel code: block: make the new blkzoned UAPI constants discoverable | Problem Details:
The Linux 6.19 merge window added the new BLKREPORTZONESV2 ioctl, and
with it the new BLK_ZONE_REP_CACHED and BLK_ZONE_COND_ACTIVE constants.
The two constants are defined as part of enums, which makes it very
painful for userspace to discover if they are present in the installed
system headers.
Use ... | ```diff
diff --git a/include/uapi/linux/blkzoned.h b/include/uapi/linux/blkzoned.h
index e33f02703350..663836120966 100644
--- a/include/uapi/linux/blkzoned.h
+++ b/include/uapi/linux/blkzoned.h
@@ -81,7 +81,8 @@ enum blk_zone_cond {
BLK_ZONE_COND_FULL = 0xE,
BLK_ZONE_COND_OFFLINE = 0xF,
- BLK_ZONE_COND_ACTIVE = ... |
47bdf1d29caec7207b7f112230055db36602dfc0 | Analyze and fix the following issue in the Linux kernel code: ublk: fix ublksrv pid handling for pid namespaces | Problem Details:
When ublksrv runs inside a pid namespace, START/END_RECOVERY compared
the stored init-ns tgid against the userspace pid (getpid vnr), so the
check failed and control ops could not proceed. Compare against the
caller’s init-ns tgid and store that value, then translate it back to
the caller’s pid namespa... | ```diff
diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c
index f6e5a0766721..cd1e84653002 100644
--- a/drivers/block/ublk_drv.c
+++ b/drivers/block/ublk_drv.c
@@ -2885,6 +2885,15 @@ static struct ublk_device *ublk_get_device_from_id(int idx)
return ub;
}
+static bool ublk_validate_user_pid(struct u... |
f262015b9797effdec15e8a81c81b2158ede9578 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Update wedged.mode only after successful reset policy change | Problem Details:
Previously, the driver's internal wedged.mode state was updated without
verifying whether the corresponding engine reset policy update in GuC
succeeded. This could leave the driver reporting a wedged.mode state
that doesn't match the actual reset behavior programmed in GuC.
With this change, the reset... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_debugfs.c b/drivers/gpu/drm/xe/xe_debugfs.c
index e91da9589c5f..63fd8bf13c70 100644
--- a/drivers/gpu/drm/xe/xe_debugfs.c
+++ b/drivers/gpu/drm/xe/xe_debugfs.c
@@ -256,14 +256,64 @@ static ssize_t wedged_mode_show(struct file *f, char __user *ubuf,
return simple_read_from_bu... |
772157f626d0e1a7c6d49dffb0bbe4b2343a1d44 | Analyze and fix the following issue in the Linux kernel code: drm/xe/migrate: fix job lock assert | Problem Details:
We are meant to be checking the user vm for the bind queue, but actually
we are checking the migrate vm. For various reasons this is not
currently firing but this will likely change in the future.
Now that we have the user_vm attached to the bind queue, we can fix this
by directly checking that here.
... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_migrate.c b/drivers/gpu/drm/xe/xe_migrate.c
index 5a95b08a4723..d8ee76aab4e4 100644
--- a/drivers/gpu/drm/xe/xe_migrate.c
+++ b/drivers/gpu/drm/xe/xe_migrate.c
@@ -2445,7 +2445,7 @@ void xe_migrate_job_lock(struct xe_migrate *m, struct xe_exec_queue *q)
if (is_migrate)
mu... |
6f4b7aed61817624250e590ba0ef304146d34614 | Analyze and fix the following issue in the Linux kernel code: drm/xe/uapi: disallow bind queue sharing | Problem Details:
Currently this is very broken if someone attempts to create a bind
queue and share it across multiple VMs. For example currently we assume
it is safe to acquire the user VM lock to protect some of the bind queue
state, but if allow sharing the bind queue with multiple VMs then this
quickly breaks down.... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_exec_queue.c b/drivers/gpu/drm/xe/xe_exec_queue.c
index 8724f8de67e2..779d7e7e2d2e 100644
--- a/drivers/gpu/drm/xe/xe_exec_queue.c
+++ b/drivers/gpu/drm/xe/xe_exec_queue.c
@@ -328,6 +328,7 @@ struct xe_exec_queue *xe_exec_queue_create_class(struct xe_device *xe, struct xe
* ... |
29132d16965e66fed0bf7b38242e7e57df294ba0 | Analyze and fix the following issue in the Linux kernel code: perf list: Don't write to const memory | Problem Details:
Something now detected on fedora 44, where strchr() returns const if it
is passed a const pointer:
util/print-events.c: In function 'print_sdt_events':
util/print-events.c:89:29: error: initialization discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
89 | ... | ```diff
diff --git a/tools/perf/util/print-events.c b/tools/perf/util/print-events.c
index 4bbcdbf05b84..cb27e2898aa0 100644
--- a/tools/perf/util/print-events.c
+++ b/tools/perf/util/print-events.c
@@ -97,14 +97,9 @@ void print_sdt_events(const struct print_callbacks *print_cb, void *print_state)
} else {
next_... |
a505ca2db89ad92a8d8d27fa68ebafb12e04a679 | Analyze and fix the following issue in the Linux kernel code: media: verisilicon: AV1: Fix tile info buffer size | Problem Details:
Each tile info is composed of: row_sb, col_sb, start_pos
and end_pos (4 bytes each). So the total required memory
is AV1_MAX_TILES * 16 bytes.
Use the correct #define to allocate the buffer and avoid
writing tile info in non-allocated memory.
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabo... | ```diff
diff --git a/drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c b/drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c
index 500e94bcb029..e4e21ad37323 100644
--- a/drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c
+++ b/drivers/media/platform/verisilicon/rockchip_vpu981_hw... |
d0ab89951197f0fc509a0cd732d830880e79c2d4 | Analyze and fix the following issue in the Linux kernel code: ASoC: cs35l56: Add KUnit testing of cs35l56_set_fw_suffix() | Problem Details:
Add a new KUnit test for testing the creation of firmware name
qualifiers in the cs35l56 driver. The initial set of test cases
are for cs35l56_set_fw_suffix().
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20260121132243.1256019-6-rf@opensource.cirrus.com
... | ```diff
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index 21d5b79f079d..d09de0ff5f22 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -933,6 +933,19 @@ config SND_SOC_CS35L56_CAL_SET_CTRL
On most platforms this is not needed.
If unsure select "N".
+
+config SND_SOC_... |
51b069172a4ef2c6278c64c603a41a7f20329921 | Analyze and fix the following issue in the Linux kernel code: ASoC: cs35l56: Use vendor-specific qualifier in firmware file search | Problem Details:
If cs_amp_devm_get_vendor_specific_variant_id() returns a string, use it
as part of the firmware filename. If this firmware isn't found, fall back
to the standard firmware name.
This re-uses the fwf_suffix fallback mechanism that was introduced in
commit e5d5b3aebdc8 ("ASoC: cs35l56: Use SoundWire add... | ```diff
diff --git a/sound/soc/codecs/cs35l56.c b/sound/soc/codecs/cs35l56.c
index 55b4d0d55712..abea782bcd3f 100644
--- a/sound/soc/codecs/cs35l56.c
+++ b/sound/soc/codecs/cs35l56.c
@@ -1109,27 +1109,68 @@ static const struct snd_kcontrol_new cs35l56_cal_data_restore_controls[] = {
static int cs35l56_set_fw_suffix(... |
61b76d07d2b46a86ea91267d36449fc78f8a1f6e | Analyze and fix the following issue in the Linux kernel code: driver core: faux: stop using static struct device | Problem Details:
faux_bus_root should not have been a static struct device, but rather a
dynamically created structure so that lockdep and other testing tools do
not trip over it (as well as being the right thing overall to do.) Fix
this up by making it properly dynamic.
Reported-by: Gui-Dong Han <hanguidong02@gmail.... | ```diff
diff --git a/drivers/base/faux.c b/drivers/base/faux.c
index 21dd02124231..23d725817232 100644
--- a/drivers/base/faux.c
+++ b/drivers/base/faux.c
@@ -29,9 +29,7 @@ struct faux_object {
};
#define to_faux_object(dev) container_of_const(dev, struct faux_object, faux_dev.dev)
-static struct device faux_bus_ro... |
0f1e16b3a8634d540fb0c7a11ca13412d2902974 | Analyze and fix the following issue in the Linux kernel code: dm-verity: fix section mismatch error | Problem Details:
The function "__init dm_verity_init" was calling "__exit
dm_verity_verify_sig_exit" and this triggered section mismatch error.
Fix this by dropping the "__exit" tag on dm_verity_verify_sig_exit.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Fixes: 033724b1c627A ("dm-verity: add dm-verity keyri... | ```diff
diff --git a/drivers/md/dm-verity-verify-sig.c b/drivers/md/dm-verity-verify-sig.c
index 2a2abd9864c9..b2b55c41e2cb 100644
--- a/drivers/md/dm-verity-verify-sig.c
+++ b/drivers/md/dm-verity-verify-sig.c
@@ -192,7 +192,7 @@ int __init dm_verity_verify_sig_init(void)
return 0;
}
-void __exit dm_verity_verify... |
4918cc05137cb347686462923ab3fd249ef7899d | Analyze and fix the following issue in the Linux kernel code: gpio: shared: propagate configuration to pinctrl | Problem Details:
Just toggling the descriptor's "requested" flag is not enough. We need
to properly request it in order to potentially propagate any
configuration to pinctrl via the .request() callback.
We must not take the reference to the device at this point (the device
is not ready but we're also requesting the de... | ```diff
diff --git a/drivers/gpio/gpiolib-shared.c b/drivers/gpio/gpiolib-shared.c
index 17343fdc9758..9e6544203439 100644
--- a/drivers/gpio/gpiolib-shared.c
+++ b/drivers/gpio/gpiolib-shared.c
@@ -515,7 +515,7 @@ int gpio_device_setup_shared(struct gpio_device *gdev)
{
struct gpio_shared_entry *entry;
struct gpi... |
9afbf7a9cce584e3ce7b709ea5654f2721b00694 | Analyze and fix the following issue in the Linux kernel code: drm/meson/dw-hdmi: convert to of_drm_find_and_get_bridge() | Problem Details:
of_drm_find_bridge() is deprecated. Move to its replacement
of_drm_find_and_get_bridge() which gets a bridge reference, and ensure it
is put when done.
dw_hdmi->bridge is used only in dw_hdmi_top_thread_irq(), so in order to
avoid potential use-after-free ensure the irq is freed before putting the
dw_... | ```diff
diff --git a/drivers/gpu/drm/meson/meson_dw_hdmi.c b/drivers/gpu/drm/meson/meson_dw_hdmi.c
index 0d7c68b29dff..fef1702acb14 100644
--- a/drivers/gpu/drm/meson/meson_dw_hdmi.c
+++ b/drivers/gpu/drm/meson/meson_dw_hdmi.c
@@ -778,7 +778,7 @@ static int meson_dw_hdmi_bind(struct device *dev, struct device *master,
... |
3b3ddafde1c2b5262628b4463c7b6f4ccc6430b5 | Analyze and fix the following issue in the Linux kernel code: dma-buf: add some tracepoints to debug. | Problem Details:
Since we can only inspect dmabuf by iterating over process FDs or the
dmabuf_list, we need to add our own tracepoints to track its status in
real time in production.
For example:
binder:3016_1-3102 [006] ...1. 255.126521: dma_buf_export: exp_name=qcom,system size=12685312 ino=2738
binder:30... | ```diff
diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
index 8e23580f1754..77555096e4c7 100644
--- a/drivers/dma-buf/dma-buf.c
+++ b/drivers/dma-buf/dma-buf.c
@@ -46,12 +46,10 @@
*/
#define DMA_BUF_TRACE(FUNC, ...) \
do { \
- if (FUNC##_enabled()) { \
+ /* Always expose lock if... |
7a749db26cab2334d5b356ac31e6f1147c7682da | Analyze and fix the following issue in the Linux kernel code: wifi: iwlwifi: mld: Fix primary link selection logic | Problem Details:
When assigning emlsr.primary with emlsr.selected_primary
we are checking if BIT(mld_vif->emlsr.selected_links) are
a part of vif->active_links. This is incorrect as
emlsr.selected_links is a bitmap of possibly two selected links.
Therefore, performing the BIT() operation on it does not
yield any meanin... | ```diff
diff --git a/drivers/net/wireless/intel/iwlwifi/mld/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mld/mac80211.c
index 8466345d7f21..411a2d56e5f0 100644
--- a/drivers/net/wireless/intel/iwlwifi/mld/mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mld/mac80211.c
@@ -1052,7 +1052,9 @@ int iwl_mld_assign_vif_... |
d2fcdf36554316cc51f7928b777944738d06e332 | Analyze and fix the following issue in the Linux kernel code: wifi: iwlwifi: mld: fix chandef start calculation | Problem Details:
A link pair in which both links are in 5 GHz can be used for EMLSR only
if they are separated enough.
To check this condition we calculate the start and the end of the
chandefs of both links in the pair and do some checks.
But the calculation of the start/end of the chandef is currently done
by subtr... | ```diff
diff --git a/drivers/net/wireless/intel/iwlwifi/mld/mlo.c b/drivers/net/wireless/intel/iwlwifi/mld/mlo.c
index c6b151f26921..1efefc737248 100644
--- a/drivers/net/wireless/intel/iwlwifi/mld/mlo.c
+++ b/drivers/net/wireless/intel/iwlwifi/mld/mlo.c
@@ -844,9 +844,9 @@ iwl_mld_emlsr_pair_state(struct ieee80211_vif... |
772fe513e198b83324b8c0f93a886d6c24667832 | Analyze and fix the following issue in the Linux kernel code: wifi: iwlwifi: mld: fix HE SIG-B MCS/DCM/compression | Problem Details:
These values should be taken from SIG-A, indicating how SIG-B
is encoded. The values taken from SIG-B (the corresponding
register) indicate how the data portion (for that user) is
encoded. For the SIG-B compression value the correct mask was
applied to the wrong value.
Signed-off-by: Johannes Berg <jo... | ```diff
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/rx.h b/drivers/net/wireless/intel/iwlwifi/fw/api/rx.h
index beb20eadf6d6..ac6c1ef2cbcd 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/api/rx.h
+++ b/drivers/net/wireless/intel/iwlwifi/fw/api/rx.h
@@ -1090,7 +1090,9 @@ struct iwl_vht_sigs {
struct iwl_h... |
cc10aa812472535a004b8ff8b6177912169fac0b | Analyze and fix the following issue in the Linux kernel code: wifi: iwlwifi: mld: refactor AP power type setting | Problem Details:
Fix unsafe power type mapping for iwl_txpower_constraints_cmd
that breaks if enum values change. Replace "power_type - 1" with
explicit case handling for each power type.
While on it, Add debug logging to show configured power type.
Signed-off-by: Pagadala Yesu Anjaneyulu <pagadala.yesu.anjaneyulu@int... | ```diff
diff --git a/drivers/net/wireless/intel/iwlwifi/mld/power.c b/drivers/net/wireless/intel/iwlwifi/mld/power.c
index f664b277adf7..c3318e84f4a2 100644
--- a/drivers/net/wireless/intel/iwlwifi/mld/power.c
+++ b/drivers/net/wireless/intel/iwlwifi/mld/power.c
@@ -328,6 +328,33 @@ iwl_mld_tpe_sta_cmd_data(struct iwl_... |
58192b9ce09b0f0f86e2036683bd542130b91a98 | Analyze and fix the following issue in the Linux kernel code: wifi: iwlwifi: fix 22000 series SMEM parsing | Problem Details:
If the firmware were to report three LMACs (which doesn't
exist in hardware) then using "fwrt->smem_cfg.lmac[2]" is
an overrun of the array. Reject such and use IWL_FW_CHECK
instead of WARN_ON in this function.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miria... | ```diff
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/smem.c b/drivers/net/wireless/intel/iwlwifi/fw/smem.c
index 90fd69b4860c..344ddde85b18 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/smem.c
+++ b/drivers/net/wireless/intel/iwlwifi/fw/smem.c
@@ -6,6 +6,7 @@
*/
#include "iwl-drv.h"
#include "runtime.h"
... |
0b9e07b76537f5b22f980974423778509c38a390 | Analyze and fix the following issue in the Linux kernel code: wifi: iwlwifi: mld: trigger a dump upon notification if needed | Problem Details:
The firmware can request us to trigger a dump upon specific
notifications. In order for that flow to work, we need to call the
firmware debug infra when we get a notification from the firmware.
This was missing.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenb... | ```diff
diff --git a/drivers/net/wireless/intel/iwlwifi/mld/notif.c b/drivers/net/wireless/intel/iwlwifi/mld/notif.c
index 555542dc5e37..35356b244c0a 100644
--- a/drivers/net/wireless/intel/iwlwifi/mld/notif.c
+++ b/drivers/net/wireless/intel/iwlwifi/mld/notif.c
@@ -540,6 +540,8 @@ static void iwl_mld_rx_notif(struct i... |
86a6faaf05a4c852ae5550e0ea86056eb4b83154 | Analyze and fix the following issue in the Linux kernel code: wifi: iwlwifi: fw: fix documentation reference for ap_type field | Problem Details:
Fix the documentation comment for the ap_type field
in AP_TX_POWER_CONSTRAINTS_CMD to reference the correct
enum iwl_6ghz_ap_type.
Signed-off-by: Pagadala Yesu Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rac... | ```diff
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/power.h b/drivers/net/wireless/intel/iwlwifi/fw/api/power.h
index 535864e22626..0cd8a12e0f7c 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/api/power.h
+++ b/drivers/net/wireless/intel/iwlwifi/fw/api/power.h
@@ -766,7 +766,7 @@ enum iwl_6ghz_ap_type {
... |
a1ca658d649a4d8972e2e21ac2625b633217e327 | Analyze and fix the following issue in the Linux kernel code: xfs: fix incorrect context handling in xfs_trans_roll | Problem Details:
The memalloc_nofs_save() and memalloc_nofs_restore() calls are
incorrectly paired in xfs_trans_roll.
Call path:
xfs_trans_alloc()
__xfs_trans_alloc()
// tp->t_pflags = memalloc_nofs_save();
xfs_trans_set_context()
...
xfs_defer_trans_roll()
xfs_trans_roll()
xfs_trans_dup()
... | ```diff
diff --git a/fs/xfs/xfs_trans.c b/fs/xfs/xfs_trans.c
index 2c3c29d0d4a0..bcc470f56e46 100644
--- a/fs/xfs/xfs_trans.c
+++ b/fs/xfs/xfs_trans.c
@@ -124,8 +124,6 @@ xfs_trans_dup(
ntp->t_rtx_res = tp->t_rtx_res - tp->t_rtx_res_used;
tp->t_rtx_res = tp->t_rtx_res_used;
- xfs_trans_switch_context(tp, ntp);
-
... |
3a65ea768b8094e4699e72f9ab420eb9e0f3f568 | Analyze and fix the following issue in the Linux kernel code: xfs: remove xfs_attr_leaf_hasname | Problem Details:
The calling convention of xfs_attr_leaf_hasname() is problematic, because
it returns a NULL buffer when xfs_attr3_leaf_read fails, a valid buffer
when xfs_attr3_leaf_lookup_int returns -ENOATTR or -EEXIST, and a
non-NULL buffer pointer for an already released buffer when
xfs_attr3_leaf_lookup_int fails... | ```diff
diff --git a/fs/xfs/libxfs/xfs_attr.c b/fs/xfs/libxfs/xfs_attr.c
index 866abae58fe1..9e6b18d6ae00 100644
--- a/fs/xfs/libxfs/xfs_attr.c
+++ b/fs/xfs/libxfs/xfs_attr.c
@@ -50,7 +50,6 @@ STATIC int xfs_attr_shortform_addname(xfs_da_args_t *args);
*/
STATIC int xfs_attr_leaf_get(xfs_da_args_t *args);
STATIC in... |
f39854a3fb2f06dc69b81ada002b641ba5b4696b | Analyze and fix the following issue in the Linux kernel code: xfs: mark data structures corrupt on EIO and ENODATA | Problem Details:
I learned a few things this year: first, blk_status_to_errno can return
ENODATA for critical media errors; and second, the scrub code doesn't
mark data structures as corrupt on ENODATA or EIO.
Currently, scrub failing to capture these errors isn't all that
impactful -- the checking code will exit to u... | ```diff
diff --git a/fs/xfs/scrub/btree.c b/fs/xfs/scrub/btree.c
index 8ba004979862..40f36db9f07d 100644
--- a/fs/xfs/scrub/btree.c
+++ b/fs/xfs/scrub/btree.c
@@ -42,6 +42,8 @@ __xchk_btree_process_error(
break;
case -EFSBADCRC:
case -EFSCORRUPTED:
+ case -EIO:
+ case -ENODATA:
/* Note the badness but don't a... |
c53fbeedbe9098ba2e355fe646f3fe93e57f3f0e | Analyze and fix the following issue in the Linux kernel code: xfs: set lv_bytes in xlog_write_one_vec | Problem Details:
lv_bytes is mostly just use by the CIL code, but has crept into the
low-level log writing code to decide on a full or partial iclog
write. Ensure it is valid even for the special log writes that don't
go through the CIL by initializing it in xlog_write_one_vec.
Note that even without this fix, the ch... | ```diff
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index c6fa258df844..4869eacfde24 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -858,14 +858,15 @@ xlog_write_one_vec(
struct xfs_log_vec lv = {
.lv_niovecs = 1,
.lv_iovecp = reg,
+ .lv_bytes = reg->i_len,
};
LIST_HEAD (lv_chain);
/* ac... |
a7f1bc231b666aed85358d4940ca8c37a75639f7 | Analyze and fix the following issue in the Linux kernel code: iommu: debug-pagealloc: Use page_ext_get_from_phys() | Problem Details:
Instead of calling pfn_valid() and then getting the page, call
the newly added function page_ext_get_from_phys(), which would
also check for MMIO and offline memory and return NULL in that
case.
Signed-off-by: Mostafa Saleh <smostafa@google.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> | ```diff
diff --git a/drivers/iommu/iommu-debug-pagealloc.c b/drivers/iommu/iommu-debug-pagealloc.c
index c080a38f45a4..80164df5bab1 100644
--- a/drivers/iommu/iommu-debug-pagealloc.c
+++ b/drivers/iommu/iommu-debug-pagealloc.c
@@ -30,14 +30,6 @@ struct page_ext_operations page_iommu_debug_ops = {
.need = need_iommu_d... |
99a3e3a1cfc93b8fe318c0a3a5cfb01f1d4ad53c | Analyze and fix the following issue in the Linux kernel code: slab: fix kmalloc_nolock() context check for PREEMPT_RT | Problem Details:
On PREEMPT_RT kernels, local_lock becomes a sleeping lock. The current
check in kmalloc_nolock() only verifies we're not in NMI or hard IRQ
context, but misses the case where preemption is disabled.
When a BPF program runs from a tracepoint with preemption disabled
(preempt_count > 0), kmalloc_nolock(... | ```diff
diff --git a/mm/slub.c b/mm/slub.c
index 861592ac5425..f77b7407c51b 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -5694,8 +5694,12 @@ void *kmalloc_nolock_noprof(size_t size, gfp_t gfp_flags, int node)
if (unlikely(!size))
return ZERO_SIZE_PTR;
- if (IS_ENABLED(CONFIG_PREEMPT_RT) && (in_nmi() || in_hardirq()... |
c06343be0b4e03fe319910dd7a5d5b9929e1c0cb | Analyze and fix the following issue in the Linux kernel code: clocksource: Reduce watchdog readout delay limit to prevent false positives | Problem Details:
The "valid" readout delay between the two reads of the watchdog is larger
than the valid delta between the resulting watchdog and clocksource
intervals, which results in false positive watchdog results.
Assume TSC is the clocksource and HPET is the watchdog and both have a
uncertainty margin of 250us ... | ```diff
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index a1890a073196..df7194961658 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -252,7 +252,7 @@ enum wd_read_status {
static enum wd_read_status cs_watchdog_read(struct clocksource *cs, u64 *csnow, u64 *wdnow)
{
-... |
e6e43e82c79c97917cbe356c07e8a6f3f982ab53 | Analyze and fix the following issue in the Linux kernel code: coresight: tmc-etr: Fix race condition between sysfs and perf mode | Problem Details:
When trying to run perf and sysfs mode simultaneously, the WARN_ON()
in tmc_etr_enable_hw() is triggered sometimes:
WARNING: CPU: 42 PID: 3911571 at drivers/hwtracing/coresight/coresight-tmc-etr.c:1060 tmc_etr_enable_hw+0xc0/0xd8 [coresight_tmc]
[..snip..]
Call trace:
tmc_etr_enable_hw+0xc0/0xd8 ... | ```diff
diff --git a/drivers/hwtracing/coresight/coresight-tmc-etr.c b/drivers/hwtracing/coresight/coresight-tmc-etr.c
index e0d83ee01b77..fc0a946053dd 100644
--- a/drivers/hwtracing/coresight/coresight-tmc-etr.c
+++ b/drivers/hwtracing/coresight/coresight-tmc-etr.c
@@ -1306,6 +1306,19 @@ static int tmc_enable_etr_sink... |
9dd1048bca4fe2aa67c7a286bafb3947537adedb | Analyze and fix the following issue in the Linux kernel code: drm/xe/migrate: fix job lock assert | Problem Details:
We are meant to be checking the user vm for the bind queue, but actually
we are checking the migrate vm. For various reasons this is not
currently firing but this will likely change in the future.
Now that we have the user_vm attached to the bind queue, we can fix this
by directly checking that here.
... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_migrate.c b/drivers/gpu/drm/xe/xe_migrate.c
index 00eef41a9e36..6e202428aac2 100644
--- a/drivers/gpu/drm/xe/xe_migrate.c
+++ b/drivers/gpu/drm/xe/xe_migrate.c
@@ -2499,7 +2499,7 @@ void xe_migrate_job_lock(struct xe_migrate *m, struct xe_exec_queue *q)
if (is_migrate)
mu... |
9dd08fdecc0c98d6516c2d2d1fa189c1332f8dab | Analyze and fix the following issue in the Linux kernel code: drm/xe/uapi: disallow bind queue sharing | Problem Details:
Currently this is very broken if someone attempts to create a bind
queue and share it across multiple VMs. For example currently we assume
it is safe to acquire the user VM lock to protect some of the bind queue
state, but if allow sharing the bind queue with multiple VMs then this
quickly breaks down.... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_exec_queue.c b/drivers/gpu/drm/xe/xe_exec_queue.c
index a58968a0a781..7e7e663189e4 100644
--- a/drivers/gpu/drm/xe/xe_exec_queue.c
+++ b/drivers/gpu/drm/xe/xe_exec_queue.c
@@ -412,6 +412,7 @@ struct xe_exec_queue *xe_exec_queue_create_class(struct xe_device *xe, struct xe
* ... |
00e6f8f60601b412e400873c8972f3e3802557f3 | Analyze and fix the following issue in the Linux kernel code: dt-bindings: vendor-prefixes: Add AlgolTek | Problem Details:
AlgolTek is a Taiwanese chip manufacturer specialized in high-speed
signal and power transmission and conversion.
Signed-off-by: Val Packett <val@packett.cool>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260120234029.419825-4-val@packett.cool
Signed-off-by:... | ```diff
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index c7591b2aec2a..d459886e515a 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -86,6 +86,8 @@ pattern... |
3dc4092fe5c8baf6bf4e882b44615f19564a5076 | Analyze and fix the following issue in the Linux kernel code: interconnect: qcom: qcs8300: fix the num_links for nsp icc node | Problem Details:
The qxm_nsp node is configured with an incorrect num_links value,
causing remoteproc driver to fail probing because it cannot acquire the
interconnect path for qxm_nsp -> ebi. This results in the following
error in dmesg:
platform 26300000.remoteproc: deferred probe pending:
qcom_q6v5_pas: failed ... | ```diff
diff --git a/drivers/interconnect/qcom/qcs8300.c b/drivers/interconnect/qcom/qcs8300.c
index 70a377bbcf29..bc403a9bf68c 100644
--- a/drivers/interconnect/qcom/qcs8300.c
+++ b/drivers/interconnect/qcom/qcs8300.c
@@ -629,7 +629,7 @@ static struct qcom_icc_node qxm_nsp = {
.name = "qxm_nsp",
.channels = 2,
.... |
58a17b2647ba5aac47e3ffafd0a9b92bf4a9bcbe | Analyze and fix the following issue in the Linux kernel code: PCI: dwc: Skip waiting for L2/L3 Ready if dw_pcie_rp::skip_l23_wait is true | Problem Details:
In NXP i.MX6QP and i.MX7D SoCs, LTSSM registers are not accessible once
PME_Turn_Off message is broadcasted to the link. So there is no way to
verify whether the link has entered L2/L3 Ready state or not.
Hence, add a new flag 'dw_pcie_rp::skip_l23_ready' and set it to 'true' for
the above mentioned S... | ```diff
diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c
index 4668fc9648bf..dfe814469993 100644
--- a/drivers/pci/controller/dwc/pci-imx6.c
+++ b/drivers/pci/controller/dwc/pci-imx6.c
@@ -114,6 +114,7 @@ enum imx_pcie_variants {
#define IMX_PCIE_FLAG_BROKEN_SUSPEND BIT(9)
#... |
2ccbdb612d0d95f25c38189b83666ff0fb2bfb47 | Analyze and fix the following issue in the Linux kernel code: platform/x86: ideadpad-laptop: Clean up style warnings and checks | Problem Details:
This commit makes some style changes to clean up the following
checkpatch warnings and checks at various places in ideapad.c:
- WARNING: quoted string split across lines
- WARNING: space prohibited between function name and open parenthesis '('
- WARNING: braces {} are not necessary for any arm of thi... | ```diff
diff --git a/drivers/platform/x86/lenovo/ideapad-laptop.c b/drivers/platform/x86/lenovo/ideapad-laptop.c
index 5171a077f62c..3d8a8b4f3e86 100644
--- a/drivers/platform/x86/lenovo/ideapad-laptop.c
+++ b/drivers/platform/x86/lenovo/ideapad-laptop.c
@@ -219,38 +219,32 @@ MODULE_PARM_DESC(no_bt_rfkill, "No rfkill f... |
7b85137caf110a09a4a18f00f730de4709f9afc8 | Analyze and fix the following issue in the Linux kernel code: crypto: ccp - Send PSP_CMD_TEE_RING_DESTROY when PSP_CMD_TEE_RING_INIT fails | Problem Details:
The hibernate resume sequence involves loading a resume kernel that is just
used for loading the hibernate image before shifting back to the existing
kernel.
During that hibernate resume sequence the resume kernel may have loaded
the ccp driver. If this happens the resume kernel will also have called... | ```diff
diff --git a/drivers/crypto/ccp/tee-dev.c b/drivers/crypto/ccp/tee-dev.c
index ef1430f86ad6..92ffa412622a 100644
--- a/drivers/crypto/ccp/tee-dev.c
+++ b/drivers/crypto/ccp/tee-dev.c
@@ -113,6 +113,7 @@ static int tee_init_ring(struct psp_tee_device *tee)
{
int ring_size = MAX_RING_BUFFER_ENTRIES * sizeof(st... |
0ba2035026d0ab6c7c7e65ad8b418dc73d5700d9 | Analyze and fix the following issue in the Linux kernel code: crypto: ccp - Add an S4 restore flow | Problem Details:
The system will have lost power during S4. The ring used for TEE
communications needs to be initialized before use.
Fixes: f892a21f51162 ("crypto: ccp - use generic power management")
Reported-by: Lars Francke <lars.francke@gmail.com>
Closes: https://lore.kernel.org/platform-driver-x86/CAD-Ua_gfJnQSo... | ```diff
diff --git a/drivers/crypto/ccp/psp-dev.c b/drivers/crypto/ccp/psp-dev.c
index 9e21da0e298a..5c7f7e02a7d8 100644
--- a/drivers/crypto/ccp/psp-dev.c
+++ b/drivers/crypto/ccp/psp-dev.c
@@ -351,6 +351,17 @@ struct psp_device *psp_get_master_device(void)
return sp ? sp->psp_data : NULL;
}
+int psp_restore(stru... |
5e599d7871bf852e94e8aa08b99724635f2cbf96 | Analyze and fix the following issue in the Linux kernel code: crypto: ccp - Declare PSP dead if PSP_CMD_TEE_RING_INIT fails | Problem Details:
tee_init_ring() only declares PSP dead if the command times out.
If there is any other failure it is still considered fatal though.
Set psp_dead for other failures as well.
Fixes: 949a0c8dd3c2 ("crypto: ccp - Move direct access to some PSP registers out of TEE")
Tested-by: Yijun Shen <Yijun.Shen@Dell.... | ```diff
diff --git a/drivers/crypto/ccp/tee-dev.c b/drivers/crypto/ccp/tee-dev.c
index 5e1d80724678..af881daa5855 100644
--- a/drivers/crypto/ccp/tee-dev.c
+++ b/drivers/crypto/ccp/tee-dev.c
@@ -125,6 +125,7 @@ static int tee_init_ring(struct psp_tee_device *tee)
dev_err(tee->dev, "tee: ring init command failed (%#0... |
48d229c7047128dd52eaf863881bb3e62b5896e5 | Analyze and fix the following issue in the Linux kernel code: platform/x86/amd/pmf: Prevent TEE errors after hibernate | Problem Details:
After resuming from hibernate, TEE commands can time out and cause PSP
disables. Fix this by reinitializing the Trusted Application (TA) and
cancelling the pb workqueue in the hibernate callbacks to avoid these
errors.
ccp 0000:c4:00.2: tee: command 0x5 timed out, disabling PSP
amd-pmf AMDI0107:00: TE... | ```diff
diff --git a/drivers/platform/x86/amd/pmf/core.c b/drivers/platform/x86/amd/pmf/core.c
index 9f4a1f79459a..1a59e9ea9fb3 100644
--- a/drivers/platform/x86/amd/pmf/core.c
+++ b/drivers/platform/x86/amd/pmf/core.c
@@ -315,6 +315,61 @@ int amd_pmf_init_metrics_table(struct amd_pmf_dev *dev)
return 0;
}
+static... |
67d9a39ce85fafc2d88f82c9229ace111aaa8c1f | Analyze and fix the following issue in the Linux kernel code: platform/x86: lenovo-wmi-capdata: Wire up Fan Test Data | Problem Details:
A capdata00 attribute (0x04050000) describes the presence of Fan Test
Data. Query it, and bind Fan Test Data as a component of capdata00
accordingly. The component master of capdata00 may pass a callback while
binding to retrieve fan info from Fan Test Data.
Summarizing this scheme:
lenovo-wmi-other... | ```diff
diff --git a/drivers/platform/x86/lenovo/wmi-capdata.c b/drivers/platform/x86/lenovo/wmi-capdata.c
index 478b00bc66c4..ee1fb02d8e31 100644
--- a/drivers/platform/x86/lenovo/wmi-capdata.c
+++ b/drivers/platform/x86/lenovo/wmi-capdata.c
@@ -27,6 +27,7 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <l... |
925f26a4f8c65e5686e1820f0bdc7e0a237edba7 | Analyze and fix the following issue in the Linux kernel code: phy: rockchip: samsung-hdptx: Consistently use [rk_]hdptx_[tmds_] prefixes | Problem Details:
Fix the naming inconsistencies for some of the functions and global
variables:
* Add the missing 'rk_hdptx_' prefix to ropll_tmds_cfg variable
* Replace '_ropll_tmds_' with '_tmds_ropll_' globally
* Replace 'hdtpx' with 'hdptx' globally
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.... | ```diff
diff --git a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
index 3f8a7f4f5cd8..3c6eb6dbadd0 100644
--- a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
+++ b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
@@ -32,17 +32,17 @@
#define HDPTX_O_PHY_RDY ... |
4f310f180373bd0e68311debee7a0dddb14c1656 | Analyze and fix the following issue in the Linux kernel code: phy: rockchip: samsung-hdptx: Fix coding style alignment | Problem Details:
Handle a bunch of reported checkpatch.pl complaints:
CHECK: Alignment should match open parenthesis
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260113-phy-hdptx-frl-v6-3-8d5f97419c0b@co... | ```diff
diff --git a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
index 89710066d70c..3f8a7f4f5cd8 100644
--- a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
+++ b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
@@ -1624,11 +1624,11 @@ static void rk_hdptx_... |
70b4db7d258118a7464f039112a74ddb49a95b06 | Analyze and fix the following issue in the Linux kernel code: ALSA: usb-audio: Use the right limit for PCM OOB check | Problem Details:
The recent fix commit for addressing the OOB access of PCM URB data
buffer caused a regression on Behringer UMC2020HD device, resulting in
choppy sound. The fix used ep->max_urb_frames for the upper limit
check, and this is no right value to be referred.
Use the actual buffer size (ctx->buffer_size) ... | ```diff
diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c
index 263abb36bb2d..682b6c1fe76b 100644
--- a/sound/usb/pcm.c
+++ b/sound/usb/pcm.c
@@ -1553,7 +1553,8 @@ static int prepare_playback_urb(struct snd_usb_substream *subs,
for (i = 0; i < ctx->packets; i++) {
counts = snd_usb_endpoint_next_packet_size(ep, ct... |
4dd5d4c0361af0a3fd24f45c815996abf4429770 | Analyze and fix the following issue in the Linux kernel code: phy: freescale: imx8qm-hsio: fix NULL pointer dereference | Problem Details:
During the probe the refclk_pad pointer is set to NULL if the
'fsl,refclk-pad-mode' property is not defined in the devicetree node. But
in imx_hsio_configure_clk_pad() this pointer is unconditionally used which
could result in a NULL pointer dereference. So check the pointer before to
use it.
Fixes: 8... | ```diff
diff --git a/drivers/phy/freescale/phy-fsl-imx8qm-hsio.c b/drivers/phy/freescale/phy-fsl-imx8qm-hsio.c
index 977d21d753a5..279b8ac7822d 100644
--- a/drivers/phy/freescale/phy-fsl-imx8qm-hsio.c
+++ b/drivers/phy/freescale/phy-fsl-imx8qm-hsio.c
@@ -251,7 +251,7 @@ static void imx_hsio_configure_clk_pad(struct phy... |
e2ce913452ab56b3330539cc443b97b7ea8c3a1a | Analyze and fix the following issue in the Linux kernel code: phy: mvebu-cp110-utmi: fix dr_mode property read from dts | Problem Details:
The problem with the current implementation is that it does not consider
that the USB controller can have multiple PHY handles with different
arguments count, as for example we have in our cn9131 based platform:
"phys = <&cp0_comphy1 0>, <&cp0_utmi0>;".
In such case calling "of_usb_get_dr_mode_by_phy"... | ```diff
diff --git a/drivers/phy/marvell/phy-mvebu-cp110-utmi.c b/drivers/phy/marvell/phy-mvebu-cp110-utmi.c
index 59903f86b13f..dd3e515a8e86 100644
--- a/drivers/phy/marvell/phy-mvebu-cp110-utmi.c
+++ b/drivers/phy/marvell/phy-mvebu-cp110-utmi.c
@@ -338,7 +338,7 @@ static int mvebu_cp110_utmi_phy_probe(struct platform... |
65d5727645acbc019fd17d47f47b743eb116ff14 | Analyze and fix the following issue in the Linux kernel code: soc: fsl: qe: qe_ports_ic: Consolidate chained IRQ handler install/remove | Problem Details:
The driver currently sets the handler data and the chained handler in
two separate steps. This creates a theoretical race window where an
interrupt could fire after the handler is set but before the data is
assigned, leading to a NULL pointer dereference.
Replace the two calls with irq_set_chained_han... | ```diff
diff --git a/drivers/soc/fsl/qe/qe_ports_ic.c b/drivers/soc/fsl/qe/qe_ports_ic.c
index 61dd09fec6f6..8e2107e2cde5 100644
--- a/drivers/soc/fsl/qe/qe_ports_ic.c
+++ b/drivers/soc/fsl/qe/qe_ports_ic.c
@@ -114,8 +114,7 @@ static int qepic_probe(struct platform_device *pdev)
if (!data->host)
return -ENODEV;
... |
5a50f2b61104d0d351b59ec179f67abab7870453 | Analyze and fix the following issue in the Linux kernel code: media: rkisp1: Fix filter mode register configuration | Problem Details:
The rkisp1_flt_config() function performs an initial direct write to
RKISP1_CIF_ISP_FILT_MODE without including the RKISP1_CIF_ISP_FLT_ENA
bit, which clears the filter enable bit in the hardware.
The subsequent read/modify/write sequence then reads back the register
with the enable bit already cleared... | ```diff
diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c
index c9f88635224c..6442436a5e42 100644
--- a/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c
+++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c
@@ -411,12 +411,6 @@ stat... |
ae8694393e13f563209fad681e5bc1b99d558646 | Analyze and fix the following issue in the Linux kernel code: media: dt-bindings: media: renesas,fcp: Allow three clocks for RZ/V2N SoC | Problem Details:
Update the FCP DT schema to permit three clock inputs for the RZ/V2N SoC.
The FCP block on this SoC requires three separate clocks, unlike other
variants which use only one.
Fixes: f42eddf44fbf ("media: dt-bindings: media: renesas,fcp: Document RZ/V2N SoC")
Signed-off-by: Lad Prabhakar <prabhakar.maha... | ```diff
diff --git a/Documentation/devicetree/bindings/media/renesas,fcp.yaml b/Documentation/devicetree/bindings/media/renesas,fcp.yaml
index cf92dfe69637..b5eff6fec8a9 100644
--- a/Documentation/devicetree/bindings/media/renesas,fcp.yaml
+++ b/Documentation/devicetree/bindings/media/renesas,fcp.yaml
@@ -77,6 +77,7 @@... |
debf8326a435ac746f48173e4742a574810f1ff4 | Analyze and fix the following issue in the Linux kernel code: phy: fsl-imx8mq-usb: set platform driver data | Problem Details:
Add missing platform_set_drvdata() as the data will be used in remove().
Fixes: b58f0f86fd61 ("phy: fsl-imx8mq-usb: add tca function driver for imx95")
Cc: stable@vger.kernel.org
Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260120... | ```diff
diff --git a/drivers/phy/freescale/phy-fsl-imx8mq-usb.c b/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
index 7b7b486a2078..6c5f8271c52d 100644
--- a/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
+++ b/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
@@ -696,6 +696,8 @@ static int imx8mq_usb_phy_probe(struct platform_devic... |
1d5362145de96b5d00d590605cc94cdfa572b405 | Analyze and fix the following issue in the Linux kernel code: drm/bridge: anx7625: Fix invalid EDID size | Problem Details:
DRM checks EDID block count against allocated size in drm_edid_valid
function. We have to allocate the right EDID size instead of the max
size to prevent the EDID to be reported as invalid.
Cc: stable@kernel.org
Fixes: 7c585f9a71aa ("drm/bridge: anx7625: use struct drm_edid more")
Reviewed-by: Dmitry ... | ```diff
diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c
index 6f3fdcb6afdb..4e49e4f28d55 100644
--- a/drivers/gpu/drm/bridge/analogix/anx7625.c
+++ b/drivers/gpu/drm/bridge/analogix/anx7625.c
@@ -1801,7 +1801,7 @@ static const struct drm_edid *anx7625_edid_read(struct ... |
5488a29596cdba93a60a79398dc9b69d5bdadf92 | Analyze and fix the following issue in the Linux kernel code: drm/buddy: Prevent BUG_ON by validating rounded allocation | Problem Details:
When DRM_BUDDY_CONTIGUOUS_ALLOCATION is set, the requested size is
rounded up to the next power-of-two via roundup_pow_of_two().
Similarly, for non-contiguous allocations with large min_block_size,
the size is aligned up via round_up(). Both operations can produce a
rounded size that exceeds mm->size, ... | ```diff
diff --git a/drivers/gpu/drm/drm_buddy.c b/drivers/gpu/drm/drm_buddy.c
index 8308116058cc..fd34d3755f7c 100644
--- a/drivers/gpu/drm/drm_buddy.c
+++ b/drivers/gpu/drm/drm_buddy.c
@@ -1156,6 +1156,15 @@ int drm_buddy_alloc_blocks(struct drm_buddy *mm,
order = fls(pages) - 1;
min_order = ilog2(min_block_size)... |
e1adf48853bc715f4deea074932aa1c44eb7abea | Analyze and fix the following issue in the Linux kernel code: platform/chrome: cros_typec_switch: Don't touch struct fwnode_handle::dev | Problem Details:
The 'dev' field in struct fwnode is special and related to device links,
There no driver should use it for printing messages. Fix incorrect use
of private field.
Fixes: affc804c44c8 ("platform/chrome: cros_typec_switch: Add switch driver")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.... | ```diff
diff --git a/drivers/platform/chrome/cros_typec_switch.c b/drivers/platform/chrome/cros_typec_switch.c
index 8d7c34abb0a1..d8a28d4e51a8 100644
--- a/drivers/platform/chrome/cros_typec_switch.c
+++ b/drivers/platform/chrome/cros_typec_switch.c
@@ -230,20 +230,20 @@ static int cros_typec_register_switches(struct ... |
06682206e2a1883354ed758c09efeb51f435adbd | Analyze and fix the following issue in the Linux kernel code: drm/atmel-hlcdc: don't reject the commit if the src rect has fractional parts | Problem Details:
Don’t reject the commit when the source rectangle has fractional parts.
This can occur due to scaling: drm_atomic_helper_check_plane_state() calls
drm_rect_clip_scaled(), which may introduce fractional parts while
computing the clipped source rectangle. This does not imply the commit is
invalid, so we ... | ```diff
diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
index 00dd4fcb0d31..c52da47982ee 100644
--- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
+++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
@@ -79,8 +79,6 @@ drm_plane_state_to_atmel_hlcdc_plan... |
f34e19c34e4e92338d2ceaab2b95dd7790d262de | Analyze and fix the following issue in the Linux kernel code: fork-comment-fix: remove ambiguous question mark in CLONE_CHILD_CLEARTID comment | Problem Details:
The current comment "Clear TID on mm_release()?" ends with a question
mark, implying uncertainty about whether the TID is actually cleared in
mm_release().
However, the code flow is deterministic. When a task exits, mm_release()
explicitly checks 'tsk->clear_child_tid' and clears.
Since this behavio... | ```diff
diff --git a/kernel/fork.c b/kernel/fork.c
index b1f3915d5f8e..b21eccc9e11c 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -2071,7 +2071,7 @@ __latent_entropy struct task_struct *copy_process(
p->set_child_tid = (clone_flags & CLONE_CHILD_SETTID) ? args->child_tid : NULL;
/*
- * Clear TID on mm_releas... |
e8a1e7eaa19d0b757b06a2f913e3eeb4b1c002c6 | Analyze and fix the following issue in the Linux kernel code: kallsyms/ftrace: set module buildid in ftrace_mod_address_lookup() | Problem Details:
__sprint_symbol() might access an invalid pointer when
kallsyms_lookup_buildid() returns a symbol found by
ftrace_mod_address_lookup().
The ftrace lookup function must set both @modname and @modbuildid the same
way as module_address_lookup().
Link: https://lkml.kernel.org/r/20251128135920.217303-7-pm... | ```diff
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index a3a8989e3268..dc844d7e693d 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -87,11 +87,13 @@ struct ftrace_hash;
defined(CONFIG_DYNAMIC_FTRACE)
int
ftrace_mod_address_lookup(unsigned long addr, unsigned long *size,
- u... |
cd6735896d0343942cf3dafb48ce32eb79341990 | Analyze and fix the following issue in the Linux kernel code: kallsyms/bpf: rename __bpf_address_lookup() to bpf_address_lookup() | Problem Details:
bpf_address_lookup() has been used only in kallsyms_lookup_buildid(). It
was supposed to set @modname and @modbuildid when the symbol was in a
module.
But it always just cleared @modname because BPF symbols were never in a
module. And it did not clear @modbuildid because the pointer was not
passed.
... | ```diff
diff --git a/arch/arm64/net/bpf_jit_comp.c b/arch/arm64/net/bpf_jit_comp.c
index b6eb7a465ad2..1d657bd3ce65 100644
--- a/arch/arm64/net/bpf_jit_comp.c
+++ b/arch/arm64/net/bpf_jit_comp.c
@@ -2951,7 +2951,7 @@ int bpf_arch_text_poke(void *ip, enum bpf_text_poke_type old_t,
u64 plt_target = 0ULL;
bool poking_... |
426295ef18c5d5f0b7f75ac89d09022fcfafd25c | Analyze and fix the following issue in the Linux kernel code: kallsyms: clean up @namebuf initialization in kallsyms_lookup_buildid() | Problem Details:
Patch series "kallsyms: Prevent invalid access when showing module
buildid", v3.
We have seen nested crashes in __sprint_symbol(), see below. They seem to
be caused by an invalid pointer to "buildid". This patchset cleans up
kallsyms code related to module buildid and fixes this invalid access when
... | ```diff
diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c
index 049e296f586c..9559bf947c6b 100644
--- a/kernel/kallsyms.c
+++ b/kernel/kallsyms.c
@@ -355,7 +355,12 @@ static int kallsyms_lookup_buildid(unsigned long addr,
{
int ret;
- namebuf[KSYM_NAME_LEN - 1] = 0;
+ /*
+ * kallsyms_lookus() returns pointer to ... |
a9e5620c9a9e237b3344702dec0839b89159a060 | Analyze and fix the following issue in the Linux kernel code: kernel: fix off-by-one benign bugs | Problem Details:
We were wasting a byte due to an off-by-one bug. s[c]nprintf() doesn't
write more than $2 bytes including the null byte, so trying to pass
'size-1' there is wasting one byte.
This is essentially the same as the previous commit, in a different
file.
Link: https://lkml.kernel.org/r/b4a945a4d40b7104364... | ```diff
diff --git a/kernel/kcsan/kcsan_test.c b/kernel/kcsan/kcsan_test.c
index 219d22857c98..8ef8167be745 100644
--- a/kernel/kcsan/kcsan_test.c
+++ b/kernel/kcsan/kcsan_test.c
@@ -176,7 +176,7 @@ static bool __report_matches(const struct expect_report *r)
/* Title */
cur = expect[0];
- end = &expect[0][sizeof(... |
8118f197b7b738285eb4b66a80d01a5c8f35e231 | Analyze and fix the following issue in the Linux kernel code: mm: fix benign off-by-one bugs | Problem Details:
We were wasting a byte due to an off-by-one bug. s[c]nprintf() doesn't
write more than $2 bytes including the null byte, so trying to pass
'size-1' there is wasting one byte.
Link: https://lkml.kernel.org/r/9c38dd009c17b0219889c7089d9bdde5aaf28a8e.1765449750.git.alx@kernel.org
Signed-off-by: Alejandr... | ```diff
diff --git a/mm/kfence/kfence_test.c b/mm/kfence/kfence_test.c
index 00034e37bc9f..5725a367246d 100644
--- a/mm/kfence/kfence_test.c
+++ b/mm/kfence/kfence_test.c
@@ -110,7 +110,7 @@ static bool report_matches(const struct expect_report *r)
/* Title */
cur = expect[0];
- end = &expect[0][sizeof(expect[0])... |
436debc9cad892576d4f3287446b64474922764c | Analyze and fix the following issue in the Linux kernel code: array_size.h: add ARRAY_END() | Problem Details:
Patch series "Add ARRAY_END(), and use it to fix off-by-one bugs", v6.
Add ARRAY_END(), and use it to fix off-by-one bugs
ARRAY_END() is a macro to calculate a pointer to one past the last element
of an array argument. This is a very common pointer, which is used to
iterate over all elements of an a... | ```diff
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
index c28786e0fe1c..92e446a64371 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -4802,8 +4802,6 @@ static void floppy_release_allocated_regions(int fdc, const struct io_region *p)
}
}
-#define ARRAY_END(X) (&((X)[ARRAY_SIZE(X... |
e0b0f2834c9bec51b1068de5cf5e10c7519143eb | Analyze and fix the following issue in the Linux kernel code: ocfs2: fix oob in __ocfs2_find_path | Problem Details:
syzbot constructed a corrupted image, which resulted in el->l_count from
the b-tree extent block being 0. Since the length of the l_recs array
depends on l_count, reading its member e_blkno triggered the out-of-bounds
access reported by syzbot in [1].
The loop terminates when l_count is 0, similar to... | ```diff
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c
index 58bf58b68955..b7db177d17d6 100644
--- a/fs/ocfs2/alloc.c
+++ b/fs/ocfs2/alloc.c
@@ -1812,14 +1812,15 @@ static int __ocfs2_find_path(struct ocfs2_caching_info *ci,
ret = -EROFS;
goto out;
}
- if (le16_to_cpu(el->l_next_free_rec) == 0) {
+ if (!... |
4e9f69c062150566de5870536f08a50239724537 | Analyze and fix the following issue in the Linux kernel code: ocfs2: add validate function for slot map blocks | Problem Details:
When the filesystem is being mounted, the kernel panics while the data
regarding slot map allocation to the local node, is being written to the
disk. This occurs because the value of slot map buffer head block number,
which should have been greater than or equal to `OCFS2_SUPER_BLOCK_BLKNO`
(evaluatin... | ```diff
diff --git a/fs/ocfs2/slot_map.c b/fs/ocfs2/slot_map.c
index e544c704b583..ea4a68abc25b 100644
--- a/fs/ocfs2/slot_map.c
+++ b/fs/ocfs2/slot_map.c
@@ -44,6 +44,9 @@ struct ocfs2_slot_info {
static int __ocfs2_node_num_to_slot(struct ocfs2_slot_info *si,
unsigned int node_num);
+static int ocfs2_vali... |
d3cd8de2e17e496e115f36faeccad7d219edd381 | Analyze and fix the following issue in the Linux kernel code: ocfs2: adjust ocfs2_xa_remove_entry() to match UBSAN boundary checks | Problem Details:
After introducing 2f26f58df041 ("ocfs2: annotate flexible array members
with __counted_by_le()"), syzbot has reported the following issue:
UBSAN: array-index-out-of-bounds in fs/ocfs2/xattr.c:1955:3
index 2 is out of range for type 'struct ocfs2_xattr_entry[]
__counted_by(xh_count)' (aka 'struct ocfs2... | ```diff
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
index 1b21fbc16d73..5fd85f517868 100644
--- a/fs/ocfs2/xattr.c
+++ b/fs/ocfs2/xattr.c
@@ -1971,8 +1971,7 @@ static void ocfs2_xa_remove_entry(struct ocfs2_xa_loc *loc)
ocfs2_xa_wipe_namevalue(loc);
loc->xl_entry = NULL;
- le16_add_cpu(&xh->xh_count, -1);
- ... |
1524af3685b35feac76662cc551cbc37bd14775f | Analyze and fix the following issue in the Linux kernel code: ocfs2: validate inline data i_size during inode read | Problem Details:
When reading an inode from disk, ocfs2_validate_inode_block() performs
various sanity checks but does not validate the size of inline data. If
the filesystem is corrupted, an inode's i_size can exceed the actual
inline data capacity (id_count).
This causes ocfs2_dir_foreach_blk_id() to iterate beyond... | ```diff
diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c
index c95c998811ae..03a51662ea8e 100644
--- a/fs/ocfs2/inode.c
+++ b/fs/ocfs2/inode.c
@@ -1494,12 +1494,25 @@ int ocfs2_validate_inode_block(struct super_block *sb,
goto bail;
}
- if ((le16_to_cpu(di->i_dyn_features) & OCFS2_INLINE_DATA_FL) &&
- le32_t... |
688dab01c3bb14cb559878aaf7019bfba4a79275 | Analyze and fix the following issue in the Linux kernel code: ocfs2: validate i_refcount_loc when refcount flag is set | Problem Details:
Add validation in ocfs2_validate_inode_block() to check that if an inode
has OCFS2_HAS_REFCOUNT_FL set, it must also have a valid i_refcount_loc.
A corrupted filesystem image can have this inconsistent state, which later
triggers a BUG_ON in ocfs2_remove_refcount_tree() when the inode is being
wiped d... | ```diff
diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c
index b5fcc2725a29..c95c998811ae 100644
--- a/fs/ocfs2/inode.c
+++ b/fs/ocfs2/inode.c
@@ -1529,6 +1529,13 @@ int ocfs2_validate_inode_block(struct super_block *sb,
}
}
+ if ((le16_to_cpu(di->i_dyn_features) & OCFS2_HAS_REFCOUNT_FL) &&
+ !di->i_refcount... |
fd4d53bde9128bc85d85cc3427bd592e4c3293e4 | Analyze and fix the following issue in the Linux kernel code: ocfs2: detect released suballocator BG for fh_to_[dentry|parent] | Problem Details:
After ocfs2 gained the ability to reclaim suballocator free block group
(BGs), a suballocator block group may be released. This change causes the
xfstest case generic/426 to fail.
generic/426 expects return value -ENOENT or -ESTALE, but the current code
triggers -EROFS.
Call stack before ocfs2 gaine... | ```diff
diff --git a/fs/ocfs2/export.c b/fs/ocfs2/export.c
index b95724b767e1..9c2665dd24e2 100644
--- a/fs/ocfs2/export.c
+++ b/fs/ocfs2/export.c
@@ -74,8 +74,9 @@ static struct dentry *ocfs2_get_dentry(struct super_block *sb,
* nice
*/
status = -ESTALE;
- } else
+ } else if (status != -ESTALE) {
m... |
0319227099dfa06157b7cd669072b6e899d1bba8 | Analyze and fix the following issue in the Linux kernel code: oid_registry: allow arbitrary size OIDs | Problem Details:
The current OID registry parser uses 64 bit arithmetic which limits us to
supporting 64 bit or smaller OIDs. This isn't usually a problem except
that it prevents us from representing the 2.25. prefix OIDs which are the
OID representation of UUIDs and have a 128 bit number following the
prefix. Rathe... | ```diff
diff --git a/lib/build_OID_registry b/lib/build_OID_registry
index 8267e8d71338..30493ac190c0 100755
--- a/lib/build_OID_registry
+++ b/lib/build_OID_registry
@@ -60,10 +60,12 @@ for (my $i = 0; $i <= $#names; $i++) {
# Determine the encoded length of this OID
my $size = $#components;
for (my $lo... |
6319c4f44234c3849fdb2c3f72c45353aa428d3f | Analyze and fix the following issue in the Linux kernel code: selftests/mm: fix comment for check_test_requirements | Problem Details:
The test supports arm64 as well so the comment is incorrect. And there's
a check for arm64 in va_high_addr_switch.c.
Link: https://lkml.kernel.org/r/20251221040025.3159990-5-chuhu@redhat.com
Fixes: 983e760bcdb6 ("selftest/mm: va_high_addr_switch: add ppc64 support check")
Fixes: f556acc2facd ("selfte... | ```diff
diff --git a/tools/testing/selftests/mm/va_high_addr_switch.sh b/tools/testing/selftests/mm/va_high_addr_switch.sh
index a0c93d348b11..9492c2d72634 100755
--- a/tools/testing/selftests/mm/va_high_addr_switch.sh
+++ b/tools/testing/selftests/mm/va_high_addr_switch.sh
@@ -61,9 +61,9 @@ check_supported_ppc64()
... |
dd0202a0bd81c33096f3d473c296cad997baba5b | Analyze and fix the following issue in the Linux kernel code: selftests/mm: va_high_addr_switch return fail when either test failed | Problem Details:
When the first test failed, and the hugetlb test passed, the result would
be pass, but we expect a fail. Fix this issue by returning fail if either
is not KSFT_PASS.
Link: https://lkml.kernel.org/r/20251221040025.3159990-4-chuhu@redhat.com
Signed-off-by: Chunyu Hu <chuhu@redhat.com>
Reviewed-by: Luiz... | ```diff
diff --git a/tools/testing/selftests/mm/va_high_addr_switch.c b/tools/testing/selftests/mm/va_high_addr_switch.c
index 02f290a69132..51401e081b20 100644
--- a/tools/testing/selftests/mm/va_high_addr_switch.c
+++ b/tools/testing/selftests/mm/va_high_addr_switch.c
@@ -322,7 +322,7 @@ static int supported_arch(voi... |
b1f031e33cb5ae4be039a17613ad8da84c777e70 | Analyze and fix the following issue in the Linux kernel code: selftests/mm: allocate 6 hugepages in va_high_addr_switch.sh | Problem Details:
The va_high_addr_switch test requires 6 hugepages, not 5. If running the
test directly by: ./va_high_addr_switch.sh, the test will hit a mmap 'FAIL'
caused by not enough hugepages:
mmap(addr_switch_hint - hugepagesize, 2*hugepagesize, MAP_HUGETLB): 0x7f330f800000 - OK
mmap(addr_switch_hint , 2*hug... | ```diff
diff --git a/tools/testing/selftests/mm/va_high_addr_switch.sh b/tools/testing/selftests/mm/va_high_addr_switch.sh
index f89fe078a8e6..a0c93d348b11 100755
--- a/tools/testing/selftests/mm/va_high_addr_switch.sh
+++ b/tools/testing/selftests/mm/va_high_addr_switch.sh
@@ -111,8 +111,8 @@ setup_nr_hugepages()
c... |
b47beff129c6193df3dd406f2db2628fcc09d1eb | Analyze and fix the following issue in the Linux kernel code: selftests/mm: fix va_high_addr_switch.sh return value | Problem Details:
Patch series "Fix va_high_addr_switch.sh test failure - again", v2.
The series address several issues exist for the va_high_addr_switch test:
1) the test return value is ignored in va_high_addr_switch.sh.
2) the va_high_addr_switch test requires 6 hugepages not 5.
3) the reurn value of the first test ... | ```diff
diff --git a/tools/testing/selftests/mm/va_high_addr_switch.sh b/tools/testing/selftests/mm/va_high_addr_switch.sh
index a7d4b02b21dd..f89fe078a8e6 100755
--- a/tools/testing/selftests/mm/va_high_addr_switch.sh
+++ b/tools/testing/selftests/mm/va_high_addr_switch.sh
@@ -114,4 +114,6 @@ save_nr_hugepages
# 4 ke... |
1aa1dd9cc595917882fb6db67725442956f79607 | Analyze and fix the following issue in the Linux kernel code: selftests/mm/charge_reserved_hugetlb: drop mount size for hugetlbfs | Problem Details:
charge_reserved_hugetlb.sh mounts a hugetlbfs instance at /mnt/huge with a
fixed size of 256M. On systems with large base hugepages (e.g. 512MB),
this is smaller than a single hugepage, so the hugetlbfs mount ends up
with zero capacity (often visible as size=0 in mount output).
As a result, write_to... | ```diff
diff --git a/tools/testing/selftests/mm/charge_reserved_hugetlb.sh b/tools/testing/selftests/mm/charge_reserved_hugetlb.sh
index e1fe16bcbbe8..fa6713892d82 100755
--- a/tools/testing/selftests/mm/charge_reserved_hugetlb.sh
+++ b/tools/testing/selftests/mm/charge_reserved_hugetlb.sh
@@ -290,7 +290,7 @@ function ... |
8e46adb62fae98a866baa7c23f6ed3bfe02e6f88 | Analyze and fix the following issue in the Linux kernel code: selftests/mm/write_to_hugetlbfs: parse -s as size_t | Problem Details:
Patch series "selftests/mm: hugetlb cgroup charging: robustness fixes", v3.
This series fixes a few issues in the hugetlb cgroup charging selftests
(write_to_hugetlbfs.c + charge_reserved_hugetlb.sh) that show up on
systems with large hugepages (e.g. 512MB) and when failures cause the
test to wait in... | ```diff
diff --git a/tools/testing/selftests/mm/write_to_hugetlbfs.c b/tools/testing/selftests/mm/write_to_hugetlbfs.c
index 34c91f7e6128..ecb5f7619960 100644
--- a/tools/testing/selftests/mm/write_to_hugetlbfs.c
+++ b/tools/testing/selftests/mm/write_to_hugetlbfs.c
@@ -68,7 +68,7 @@ int main(int argc, char **argv)
i... |
3bb64898f00368cd110d4b31334f93251d56b404 | Analyze and fix the following issue in the Linux kernel code: page_alloc: allow migration of smaller hugepages during contig_alloc | Problem Details:
We presently skip regions with hugepages entirely when trying to do
contiguous page allocation. This will cause otherwise-movable 2MB HugeTLB
pages to be considered unmovable, and makes 1GB gigantic page allocation
less reliable on systems utilizing both.
Commit 4d73ba5fa710 ("mm: page_alloc: skip re... | ```diff
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 3333524e879c..bc3ee3102b19 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -7136,7 +7136,8 @@ static int __alloc_contig_pages(unsigned long start_pfn,
}
static bool pfn_range_valid_contig(struct zone *z, unsigned long start_pfn,
- unsigned lon... |
9c9828d3ead69416d731b1238802af31760c823e | Analyze and fix the following issue in the Linux kernel code: mm, page_alloc, thp: prevent reclaim for __GFP_THISNODE THP allocations | Problem Details:
Since commit cc638f329ef6 ("mm, thp: tweak reclaim/compaction effort of
local-only and all-node allocations"), THP page fault allocations have
settled on the following scheme (from the commit log):
1. local node only THP allocation with no reclaim, just compaction.
2. for madvised VMA's or when synchr... | ```diff
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index e1cc0c9ed947..3333524e879c 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -4818,6 +4818,20 @@ restart:
compact_result == COMPACT_DEFERRED)
goto nopage;
+ /*
+ * THP page faults may attempt local node only first,
+ * but are then ... |
ed60c8e280248c02cd87ce7982f8fcb402cce001 | Analyze and fix the following issue in the Linux kernel code: mm/hugetlb_cgroup: fix -Wformat-truncation warning | Problem Details:
A false-positive compile warnings with -Wformat-trucation was introduced
by commit 47179fe03588 ("mm/hugetlb_cgroup: prepare cftypes based on
template") on arch s390. Suppress it by replacing snprintf() with
scnprintf().
mm/hugetlb_cgroup.c: In function 'hugetlb_cgroup_file_init':
mm/hugetlb_cgroup.c... | ```diff
diff --git a/mm/hugetlb_cgroup.c b/mm/hugetlb_cgroup.c
index 58e895f3899a..7144d7d555eb 100644
--- a/mm/hugetlb_cgroup.c
+++ b/mm/hugetlb_cgroup.c
@@ -822,7 +822,7 @@ hugetlb_cgroup_cfttypes_init(struct hstate *h, struct cftype *cft,
for (i = 0; i < tmpl_size; cft++, tmpl++, i++) {
*cft = *tmpl;
/* rebu... |
62451ae347b0015bf3d644c97cbc14e75a8287e6 | Analyze and fix the following issue in the Linux kernel code: mm: fix minor spelling mistakes in comments | Problem Details:
Correct several typos in comments across files in mm/
[akpm@linux-foundation.org: also fix comment grammar, per SeongJae]
Link: https://lkml.kernel.org/r/20251218150906.25042-1-klourencodev@gmail.com
Signed-off-by: Kevin Lourenco <klourencodev@gmail.com>
Reviewed-by: SeongJae Park <sj@kernel.org>
Acke... | ```diff
diff --git a/mm/internal.h b/mm/internal.h
index f35dbcf99a86..9ee336aa0365 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -171,7 +171,7 @@ static inline int mmap_file(struct file *file, struct vm_area_struct *vma)
/*
* OK, we tried to call the file hook for mmap(), but an error
- * arose. The mappin... |
5ec9bb6de4933b8a9bca09ce56039277d63dd5a8 | Analyze and fix the following issue in the Linux kernel code: mm/damon: fix typos in comments | Problem Details:
Correct minor spelling mistakes in several files under mm/damon. No
functional changes.
Link: https://lkml.kernel.org/r/20251217181216.47576-1-klourencodev@gmail.com
Signed-off-by: Kevin Lourenco <klourencodev@gmail.com>
Reviewed-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@li... | ```diff
diff --git a/mm/damon/core.c b/mm/damon/core.c
index f4d83e12ba0e..7f0028e23f92 100644
--- a/mm/damon/core.c
+++ b/mm/damon/core.c
@@ -284,7 +284,7 @@ struct damos_filter *damos_new_filter(enum damos_filter_type type,
}
/**
- * damos_filter_for_ops() - Return if the filter is ops-hndled one.
+ * damos_filte... |
a98ec863fdedf4940447f32ceda7d937bebd06a2 | Analyze and fix the following issue in the Linux kernel code: lib/test_vmalloc.c: minor fixes to test_vmalloc.c | Problem Details:
If PAGE_SIZE is larger than 4k and if you have a system with a large
number of CPUs, this test can require a very large amount of memory
leading to oom-killer firing. Given the type of allocation, the kernel
won't have anything to kill, causing the system to stall.
Add a parameter to the test_vmalloc... | ```diff
diff --git a/lib/test_vmalloc.c b/lib/test_vmalloc.c
index 6521c05c7816..270b6f7ca807 100644
--- a/lib/test_vmalloc.c
+++ b/lib/test_vmalloc.c
@@ -58,6 +58,9 @@ __param(int, run_test_mask, 7,
/* Add a new test case description here. */
);
+__param(int, nr_pcpu_objects, 35000,
+ "Number of pcpu objects to ... |
4a6ceb7c9744c69546d4ca43b7bd308f4db0927b | Analyze and fix the following issue in the Linux kernel code: mm/damon/core: introduce nr_snapshots damos stat | Problem Details:
Patch series "mm/damon: introduce {,max_}nr_snapshots and tracepoint for
damos stats".
Introduce three changes for improving DAMOS stat's provided information,
deterministic control, and reading usability.
DAMOS provides stats that are important for understanding its behavior.
It lacks information a... | ```diff
diff --git a/include/linux/damon.h b/include/linux/damon.h
index 3813373a9200..1d8a1515e75a 100644
--- a/include/linux/damon.h
+++ b/include/linux/damon.h
@@ -330,6 +330,8 @@ struct damos_watermarks {
* @sz_ops_filter_passed:
* Total bytes that passed ops layer-handled DAMOS filters.
* @qt_exceeds: Total... |
8b8017d7c411403731ee4d502cdbd76e9425f0e1 | Analyze and fix the following issue in the Linux kernel code: tools/mm/slabinfo: fix --partial long option mapping | Problem Details:
The long option "--partial" was incorrectly mapped to lowercase 'p' in the
opts[] array, but the getopt string and switch case handle uppercase 'P'.
This mismatch caused --partial to be rejected.
Fix the long_options mapping to use 'P' so --partial works correctly
alongside the existing -P short opti... | ```diff
diff --git a/tools/mm/slabinfo.c b/tools/mm/slabinfo.c
index 80cdbd3db82d..54c7265ab52d 100644
--- a/tools/mm/slabinfo.c
+++ b/tools/mm/slabinfo.c
@@ -1405,7 +1405,7 @@ struct option opts[] = {
{ "numa", no_argument, NULL, 'n' },
{ "lines", required_argument, NULL, 'N'},
{ "ops", no_argument, NULL, 'o' },... |
9f5edd785da3cf373285259928d7f1f08c9ce758 | Analyze and fix the following issue in the Linux kernel code: tools/mm/thp_swap_allocator_test: fix small folio alignment | Problem Details:
Use ALIGNMENT_SMALLFOLIO instead of ALIGNMENT_MTHP when allocating small
folios to ensure correct memory alignment for the test case.
Before: test allocates small folios with 64KB alignment
(ALIGNMENT_MTHP) when only 4KB alignment (ALIGNMENT_SMALLFOLIO) is
needed. This wastes address space and may ca... | ```diff
diff --git a/tools/mm/thp_swap_allocator_test.c b/tools/mm/thp_swap_allocator_test.c
index 83afc52275a5..d4434df3dcff 100644
--- a/tools/mm/thp_swap_allocator_test.c
+++ b/tools/mm/thp_swap_allocator_test.c
@@ -142,7 +142,7 @@ int main(int argc, char *argv[])
}
if (use_small_folio) {
- mem2 = aligned_all... |
6e4930e33329eec80dd245f28b52202271f5fb28 | Analyze and fix the following issue in the Linux kernel code: mm/damon/core: fix wasteful CPU calls by skipping non-existent targets | Problem Details:
Currently, DAMON does not proactively clean up invalid monitoring targets
during its runtime. When some monitored processes exit, DAMON continues
to make the following unnecessary function calls,
--damon_for_each_target--
--damon_for_each_region--
damon_do_apply_schemes
damos_apply_... | ```diff
diff --git a/mm/damon/core.c b/mm/damon/core.c
index c852cac4f82e..2379a07c2f87 100644
--- a/mm/damon/core.c
+++ b/mm/damon/core.c
@@ -2299,6 +2299,9 @@ static void kdamond_apply_schemes(struct damon_ctx *c)
mutex_lock(&c->walk_control_lock);
damon_for_each_target(t, c) {
+ if (c->ops.target_valid && c->... |
8b05d2d8af817c6a1e23032df51e7ad83030d543 | Analyze and fix the following issue in the Linux kernel code: zram: fixup read_block_state() | Problem Details:
ac_time is now in seconds, do not use ktime_to_timespec64()
[akpm@linux-foundation.org: remove now-unused local `ts']
[akpm@linux-foundation.org: fix build]
Link: https://lkml.kernel.org/r/20260115033031.3818977-1-senozhatsky@chromium.org
Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Re... | ```diff
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index df30150e6ed8..7dcfc71d2cac 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -1570,7 +1570,6 @@ static ssize_t read_block_state(struct file *file, char __user *buf,
ssize_t index, written = 0;
st... |
4932844eb87076a8c51bc6bcf8bfcf7ad30edd75 | Analyze and fix the following issue in the Linux kernel code: zram: trivial fix of recompress_slot() coding styles | Problem Details:
A minor fixup of 80-cols breakage in recompress_slot() comment and
zs_malloc() call.
Link: https://lkml.kernel.org/r/ff3254847dbdc6fbd2e3fed53c572a261d60b7b6.1765775954.git.senozhatsky@chromium.org
Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Brian Geffon <bgeffon@google.com>
Cc: D... | ```diff
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index bd9a37fca675..df30150e6ed8 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -2517,14 +2517,15 @@ static int recompress_slot(struct zram *zram, u32 index, struct page *page,
* avoid direct reclaim... |
bde60fe747216d3449a1a74f07937a5273717b69 | Analyze and fix the following issue in the Linux kernel code: zram: rename internal slot API | Problem Details:
We have a somewhat confusing internal API naming. E.g. the following
code:
zram_slot_lock()
if (zram_allocated())
zram_set_flag()
zram_slot_unlock()
may look like it does something on zram device level, but in fact it tests
and sets slot entry flags, not the device ones.
Rename API to explici... | ```diff
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index 65f99ff3e2e5..bd9a37fca675 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -56,10 +56,10 @@ static size_t huge_class_size;
static const struct block_device_operations zram_devops;
-static void... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.