id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
a311a08a4237241fb5b9d219d3e33346de6e83e0 | Analyze and fix the following issue in the Linux kernel code: iomap: constrain the file range passed to iomap_file_unshare | Problem Details:
File contents can only be shared (i.e. reflinked) below EOF, so it makes
no sense to try to unshare ranges beyond EOF. Constrain the file range
parameters here so that we don't have to do that in the callers.
Fixes: 5f4e5752a8a3 ("fs: add iomap_file_dirty")
Signed-off-by: Darrick J. Wong <djwong@kern... | ```diff
diff --git a/fs/dax.c b/fs/dax.c
index becb4a6920c6..c62acd2812f8 100644
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -1305,11 +1305,15 @@ int dax_file_unshare(struct inode *inode, loff_t pos, loff_t len,
struct iomap_iter iter = {
.inode = inode,
.pos = pos,
- .len = len,
.flags = IOMAP_WRITE | IOMAP_UNSHA... |
a0ffa68c70b367358b2672cdab6fa5bc4c40de2c | Analyze and fix the following issue in the Linux kernel code: net/ncsi: Disable the ncsi work before freeing the associated structure | Problem Details:
The work function can run after the ncsi device is freed, resulting
in use-after-free bugs or kernel panic.
Fixes: 2d283bdd079c ("net/ncsi: Resource management")
Signed-off-by: Eddie James <eajames@linux.ibm.com>
Link: https://patch.msgid.link/20240925155523.1017097-1-eajames@linux.ibm.com
Signed-off-... | ```diff
diff --git a/net/ncsi/ncsi-manage.c b/net/ncsi/ncsi-manage.c
index 5ecf611c8820..5cf55bde366d 100644
--- a/net/ncsi/ncsi-manage.c
+++ b/net/ncsi/ncsi-manage.c
@@ -1954,6 +1954,8 @@ void ncsi_unregister_dev(struct ncsi_dev *nd)
list_del_rcu(&ndp->node);
spin_unlock_irqrestore(&ncsi_dev_lock, flags);
+ disa... |
11bfc4a2cfeaa012113d9b64fc30a5e6e742fc19 | Analyze and fix the following issue in the Linux kernel code: drm/xe/ct: drop irq usage of xa_erase() | Problem Details:
Unclear why disabling interrupts is needed here. Nothing seems to be
touching fence_lookup and its corresponding lock from an irq so there
should be no risk of deadlock.
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Badal Nilawar <badal.nilawar@in... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_guc_ct.c b/drivers/gpu/drm/xe/xe_guc_ct.c
index d3de2e6d690f..3fd1d4e97528 100644
--- a/drivers/gpu/drm/xe/xe_guc_ct.c
+++ b/drivers/gpu/drm/xe/xe_guc_ct.c
@@ -890,7 +890,7 @@ retry_same_fence:
goto retry_same_fence;
if (!g2h_fence_needs_alloc(&g2h_fence))
- xa_eras... |
f040327238b1a8311598c40ac94464e77fff368c | Analyze and fix the following issue in the Linux kernel code: drm/xe/guc_submit: fix xa_store() error checking | Problem Details:
Looks like we are meant to use xa_err() to extract the error encoded in
the ptr.
Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Badal Nilawar <badal.nilawar@intel.com>
Cc: <s... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
index 80062e1d3f66..8a5c21a87977 100644
--- a/drivers/gpu/drm/xe/xe_guc_submit.c
+++ b/drivers/gpu/drm/xe/xe_guc_submit.c
@@ -393,7 +393,6 @@ static void __release_guc_id(struct xe_guc *guc, struct xe_exec_queue *q, u32 xa
sta... |
1aa4b7864707886fa40d959483591f3d3937fa28 | Analyze and fix the following issue in the Linux kernel code: drm/xe/ct: fix xa_store() error checking | Problem Details:
Looks like we are meant to use xa_err() to extract the error encoded in
the ptr.
Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Badal Nilawar <badal.nilawar@intel.com>
Cc: <s... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_guc_ct.c b/drivers/gpu/drm/xe/xe_guc_ct.c
index 44263b3cd8c7..d3de2e6d690f 100644
--- a/drivers/gpu/drm/xe/xe_guc_ct.c
+++ b/drivers/gpu/drm/xe/xe_guc_ct.c
@@ -667,16 +667,12 @@ static int __guc_ct_send_locked(struct xe_guc_ct *ct, const u32 *action,
num_g2h = 1;
if (g... |
52789ce35c55ccd30c4b67b9cc5b2af55e0122ea | Analyze and fix the following issue in the Linux kernel code: drm/xe/ct: prevent UAF in send_recv() | Problem Details:
Ensure we serialize with completion side to prevent UAF with fence going
out of scope on the stack, since we have no clue if it will fire after
the timeout before we can erase from the xa. Also we have some dependent
loads and stores for which we need the correct ordering, and we lack the
needed barrie... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_guc_ct.c b/drivers/gpu/drm/xe/xe_guc_ct.c
index 4b95f75b1546..44263b3cd8c7 100644
--- a/drivers/gpu/drm/xe/xe_guc_ct.c
+++ b/drivers/gpu/drm/xe/xe_guc_ct.c
@@ -903,16 +903,26 @@ retry_same_fence:
}
ret = wait_event_timeout(ct->g2h_fence_wq, g2h_fence.done, HZ);
+
+ /*
+ ... |
ccda9910d8490f4fb067131598e4b2e986faa5a0 | Analyze and fix the following issue in the Linux kernel code: ceph: fix cap ref leak via netfs init_request | Problem Details:
Log recovered from a user's cluster:
<7>[ 5413.970692] ceph: get_cap_refs 00000000958c114b ret 1 got Fr
<7>[ 5413.970695] ceph: start_read 00000000958c114b, no cache cap
...
<7>[ 5473.934609] ceph: my wanted = Fr, used = Fr, dirty -
<7>[ 5473.934616] ceph: revocation: pAsLsXsF... | ```diff
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index 1d97a53d1b29..c2a9e2cc03de 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -489,8 +489,11 @@ static int ceph_init_request(struct netfs_io_request *rreq, struct file *file)
rreq->io_streams[0].sreq_max_len = fsc->mount_options->rsize;
out:
- if (ret < 0... |
3e8800273c4b473342e2dbffa83a87f651d811c7 | Analyze and fix the following issue in the Linux kernel code: ALSA: hda: Add missing parameter description for snd_hdac_stream_timecounter_init() | Problem Details:
Add the missing description for the new parameter "start" of
snd_hdac_stream_timecounter_init() in the previous patch.
Fixes: df5215618fbe ("ALSA: hda: fix trigger_tstamp_latched")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202410031300.ecLmATNd-lkp@in... | ```diff
diff --git a/sound/hda/hdac_stream.c b/sound/hda/hdac_stream.c
index 0411a8fe9d6f..2670792f43b4 100644
--- a/sound/hda/hdac_stream.c
+++ b/sound/hda/hdac_stream.c
@@ -657,6 +657,7 @@ static void azx_timecounter_init(struct hdac_stream *azx_dev,
* snd_hdac_stream_timecounter_init - initialize time counter
* ... |
a6f3b2527375c786f2eff77d3ee8b805bcfe026d | Analyze and fix the following issue in the Linux kernel code: drm/xe: Fix memory leak when aborting binds | Problem Details:
Make sure to call xe_pt_update_ops_fini in xe_pt_update_ops_abort to
free any memory the bind allocated.
Caught by kmemleak when running Vulkan CTS tests on LNL. The leak
seems to happen only when there's some kind of failure happening, like
the lack of memory. Example output:
unreferenced object 0xf... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_pt.c b/drivers/gpu/drm/xe/xe_pt.c
index d6353e8969f0..f27f579f4d85 100644
--- a/drivers/gpu/drm/xe/xe_pt.c
+++ b/drivers/gpu/drm/xe/xe_pt.c
@@ -2188,5 +2188,5 @@ void xe_pt_update_ops_abort(struct xe_tile *tile, struct xe_vma_ops *vops)
pt_op->num_entries);
}
- xe... |
7257d9c9a3c6cfe26c428e9b7ae21d61f2f55a79 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Prevent null pointer access in xe_migrate_copy | Problem Details:
xe_migrate_copy designed to copy content of TTM resources. When source
resource is null, it will trigger a NULL pointer dereference in
xe_migrate_copy. To avoid this situation, update lacks source flag to
true for this case, the flag will trigger xe_migrate_clear rather than
xe_migrate_copy.
Issue tra... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c
index f379df3a12bf..e5f51fd23c65 100644
--- a/drivers/gpu/drm/xe/xe_bo.c
+++ b/drivers/gpu/drm/xe/xe_bo.c
@@ -680,8 +680,8 @@ static int xe_bo_move(struct ttm_buffer_object *ttm_bo, bool evict,
tt_has_data = ttm && (ttm_tt_is_populated(ttm) ... |
8135f1c09dd2eecee7cb637f7ec9a29e57300eb8 | Analyze and fix the following issue in the Linux kernel code: drm/xe/oa: Don't reset OAC_CONTEXT_ENABLE on OA stream close | Problem Details:
Mesa testing on Xe2+ revealed that when OA metrics are collected for an
exec_queue, after the OA stream is closed, future batch buffers submitted
on that exec_queue do not complete. Not resetting OAC_CONTEXT_ENABLE on OA
stream close resolves these hangs and should not have any adverse effects.
v2: Ma... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_oa.c b/drivers/gpu/drm/xe/xe_oa.c
index eae38a49ee8e..2804f14f8f29 100644
--- a/drivers/gpu/drm/xe/xe_oa.c
+++ b/drivers/gpu/drm/xe/xe_oa.c
@@ -709,8 +709,7 @@ static int xe_oa_configure_oar_context(struct xe_oa_stream *stream, bool enable)
{
RING_CONTEXT_CONTROL(stream... |
67801fa67b94ebd0e4da7a77ac2d9f321b75fbe0 | Analyze and fix the following issue in the Linux kernel code: drm/xe/queue: move xa_alloc to prevent UAF | Problem Details:
Evil user can guess the next id of the queue before the ioctl completes
and then call queue destroy ioctl to trigger UAF since create ioctl is
still referencing the same queue. Move the xa_alloc all the way to the end
to prevent this.
v2:
- Rebase
Fixes: 2149ded63079 ("drm/xe: Fix use after free whe... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_exec_queue.c b/drivers/gpu/drm/xe/xe_exec_queue.c
index 7743ebdcbf4b..d098d2dd1b2d 100644
--- a/drivers/gpu/drm/xe/xe_exec_queue.c
+++ b/drivers/gpu/drm/xe/xe_exec_queue.c
@@ -635,12 +635,14 @@ int xe_exec_queue_create_ioctl(struct drm_device *dev, void *data,
}
}
+ q->... |
74231870cf4976f69e83aa24f48edb16619f652f | Analyze and fix the following issue in the Linux kernel code: drm/xe/vm: move xa_alloc to prevent UAF | Problem Details:
Evil user can guess the next id of the vm before the ioctl completes and
then call vm destroy ioctl to trigger UAF since create ioctl is still
referencing the same vm. Move the xa_alloc all the way to the end to
prevent this.
v2:
- Rebase
Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for ... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
index 31fe31db3fdc..ce9dca4d4e87 100644
--- a/drivers/gpu/drm/xe/xe_vm.c
+++ b/drivers/gpu/drm/xe/xe_vm.c
@@ -1765,10 +1765,6 @@ int xe_vm_create_ioctl(struct drm_device *dev, void *data,
if (IS_ERR(vm))
return PTR_ERR(vm);
- err = xa_a... |
1b30f87e088b499eb74298db256da5c98e8276e2 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Resume TDR after GT reset | Problem Details:
Not starting the TDR after GT reset on exec queue which have been
restarted can lead to jobs being able to be run forever. Fix this by
restarting the TDR.
Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Nirmo... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_gpu_scheduler.c b/drivers/gpu/drm/xe/xe_gpu_scheduler.c
index c518d1d16d82..50361b4638f9 100644
--- a/drivers/gpu/drm/xe/xe_gpu_scheduler.c
+++ b/drivers/gpu/drm/xe/xe_gpu_scheduler.c
@@ -90,6 +90,11 @@ void xe_sched_submission_stop(struct xe_gpu_scheduler *sched)
cancel_wor... |
6ef5a04221aaeb858d1a825b2ecb7e200cac80f8 | Analyze and fix the following issue in the Linux kernel code: drm/xe/xe2: Add performance tuning for L3 cache flushing | Problem Details:
A recommended performance tuning for LNL related to L3 cache flushing
was recently introduced in Bspec. Implement it.
Unlike the other existing tuning settings, we limit this one for LNL
only, since there is no info about whether this would be applicable to
other platforms yet. In the future we can co... | ```diff
diff --git a/drivers/gpu/drm/xe/regs/xe_gt_regs.h b/drivers/gpu/drm/xe/regs/xe_gt_regs.h
index 5a1d4639e916..ac9c437e103d 100644
--- a/drivers/gpu/drm/xe/regs/xe_gt_regs.h
+++ b/drivers/gpu/drm/xe/regs/xe_gt_regs.h
@@ -380,6 +380,9 @@
#define L3SQCREG3 XE_REG_MCR(0xb108)
#define COMPPWOVERFETCHEN REG_B... |
3bf90935aafc750c838c8831e96c3ac36cfd48d5 | Analyze and fix the following issue in the Linux kernel code: drm/xe/xe2: Extend performance tuning to media GT | Problem Details:
With exception of "Tuning: L3 cache - media", we are currently applying
recommended performance tuning settings only for the primary GT. Let's
also implement them for the media GT when applicable.
According to our spec, media GT registers CCCHKNREG1 and L3SQCREG* exist
only in Xe2_LPM and their offset... | ```diff
diff --git a/drivers/gpu/drm/xe/regs/xe_gt_regs.h b/drivers/gpu/drm/xe/regs/xe_gt_regs.h
index 660ff42e45a6..5a1d4639e916 100644
--- a/drivers/gpu/drm/xe/regs/xe_gt_regs.h
+++ b/drivers/gpu/drm/xe/regs/xe_gt_regs.h
@@ -169,6 +169,8 @@
#define XEHP_SLICE_COMMON_ECO_CHICKEN1 XE_REG_MCR(0x731c, XE_REG_OPTION_MAS... |
0f18ac78aa974660a948dafcc45f4dc6e2c5858d | Analyze and fix the following issue in the Linux kernel code: drm/xe: Use helper for ASID -> VM in GPU faults and access counters | Problem Details:
Normalize both code paths with a helper. Fixes a possible leak access
counter path too.
Suggested-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/2024... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_gt_pagefault.c b/drivers/gpu/drm/xe/xe_gt_pagefault.c
index 5c3af2bb5402..79c426dc2505 100644
--- a/drivers/gpu/drm/xe/xe_gt_pagefault.c
+++ b/drivers/gpu/drm/xe/xe_gt_pagefault.c
@@ -185,6 +185,21 @@ unlock_dma_resv:
return err;
}
+static struct xe_vm *asid_to_vm(struct ... |
2d2be279f1ca9e7288282d4214f16eea8a727cdb | Analyze and fix the following issue in the Linux kernel code: drm/xe: fix UAF around queue destruction | Problem Details:
We currently do stuff like queuing the final destruction step on a
random system wq, which will outlive the driver instance. With bad
timing we can teardown the driver with one or more work workqueue still
being alive leading to various UAF splats. Add a fini step to ensure
user queues are properly tor... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
index 70d4e4d46c3c..74e593caf87c 100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -298,6 +298,9 @@ static void xe_device_destroy(struct drm_device *dev, void *dummy)
if (xe->unordered_wq)
destroy... |
790533e44bfc7af929842fccd9674c9f424d4627 | Analyze and fix the following issue in the Linux kernel code: drm/xe/guc_submit: add missing locking in wedged_fini | Problem Details:
Any non-wedged queue can have a zero refcount here and can be running
concurrently with an async queue destroy, therefore dereferencing the
queue ptr to check wedge status after the lookup can trigger UAF if
queue is not wedged. Fix this by keeping the submission_state lock held
around the check to po... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
index fbbe6a487bbb..715c761dc7d6 100644
--- a/drivers/gpu/drm/xe/xe_guc_submit.c
+++ b/drivers/gpu/drm/xe/xe_guc_submit.c
@@ -290,9 +290,15 @@ static void guc_submit_wedged_fini(void *arg)
struct xe_exec_queue *q;
unsigned ... |
cffa8e83df9fe525afad1e1099097413f9174f57 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Restore pci state upon resume | Problem Details:
The pci state was saved, but not restored. Restore
right after the power state transition request like
every other driver.
v2: Use right fixes tag, since this was there initialy, but
accidentally removed.
Fixes: f6761c68c0ac ("drm/xe/display: Improve s2idle handling.")
Cc: Maarten Lankhorst <maar... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
index 937c3e064f0d..5e962e72c97e 100644
--- a/drivers/gpu/drm/xe/xe_pci.c
+++ b/drivers/gpu/drm/xe/xe_pci.c
@@ -924,6 +924,8 @@ static int xe_pci_resume(struct device *dev)
if (err)
return err;
+ pci_restore_state(pdev);
+
err = pci... |
ea1829d4d413bc38774703acfc266472f7bc0bb5 | Analyze and fix the following issue in the Linux kernel code: cppc_cpufreq: Remove HiSilicon CPPC workaround | Problem Details:
Since commit 6c8d750f9784 ("cpufreq / cppc: Work around for Hisilicon CPPC
cpufreq"), we introduce a workround for HiSilicon platforms that do not
support performance feedback counters, whereas they can get the actual
frequency from the desired perf register. Later on, FIE is disabled in
that workarou... | ```diff
diff --git a/drivers/cpufreq/cppc_cpufreq.c b/drivers/cpufreq/cppc_cpufreq.c
index 646b466002c6..fd3e328a2d57 100644
--- a/drivers/cpufreq/cppc_cpufreq.c
+++ b/drivers/cpufreq/cppc_cpufreq.c
@@ -36,33 +36,15 @@ static LIST_HEAD(cpu_data_list);
static bool boost_supported;
-struct cppc_workaround_oem_info {... |
c47195631960b626058c335aec31f186fa854f97 | Analyze and fix the following issue in the Linux kernel code: cppc_cpufreq: Use desired perf if feedback ctrs are 0 or unchanged | Problem Details:
The CPPC performance feedback counters could be 0 or unchanged when the
target cpu is in a low-power idle state, e.g. power-gated or clock-gated.
When the counters are 0, cppc_cpufreq_get_rate() returns 0 KHz, which makes
cpufreq_online() get a false error and fail to generate a cpufreq policy.
When ... | ```diff
diff --git a/drivers/cpufreq/cppc_cpufreq.c b/drivers/cpufreq/cppc_cpufreq.c
index 1a5ad184d28f..646b466002c6 100644
--- a/drivers/cpufreq/cppc_cpufreq.c
+++ b/drivers/cpufreq/cppc_cpufreq.c
@@ -118,6 +118,9 @@ static void cppc_scale_freq_workfn(struct kthread_work *work)
perf = cppc_perf_from_fbctrs(cpu_da... |
8daf110a44e744664f5f4158ac5e1302ee0e2081 | Analyze and fix the following issue in the Linux kernel code: bus: mhi: host: Fix typos in the comments | Problem Details:
Correctly spelled comments make it easier for the reader to understand
the code.
Fix typos:
'Normaly' ==> 'Normally',
'gurantee' ==> 'guarantee',
'guranteed' ==> 'guaranteed'.
Signed-off-by: Yan Zhen <yanzhen@vivo.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Link: https://lore.kernel.org/r... | ```diff
diff --git a/drivers/bus/mhi/host/boot.c b/drivers/bus/mhi/host/boot.c
index dedd29ca8db3..e8c92972f9df 100644
--- a/drivers/bus/mhi/host/boot.c
+++ b/drivers/bus/mhi/host/boot.c
@@ -82,9 +82,9 @@ static int __mhi_download_rddm_in_panic(struct mhi_controller *mhi_cntrl)
* other cores to shutdown while we're ... |
d28786606a51620df7b7a3e7231338d9bc081656 | Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix trans_commit disk accounting revert | Problem Details:
We only are applying JSET_ENTRY_TYPE_write_buffer_keys, revert path was
missed.
Fixes: a3581ca35d2b ("bcachefs: Fix BCH_TRANS_COMMIT_skip_accounting_apply")
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> | ```diff
diff --git a/fs/bcachefs/btree_trans_commit.c b/fs/bcachefs/btree_trans_commit.c
index 1a74a1a252ee..9bf471fa4361 100644
--- a/fs/bcachefs/btree_trans_commit.c
+++ b/fs/bcachefs/btree_trans_commit.c
@@ -832,7 +832,8 @@ revert_fs_usage:
for (struct jset_entry *entry2 = trans->journal_entries;
entry2 != ... |
3b1425a4eb4e9750db8620c26e39390411eea185 | Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix bch2_inode_is_open() check | Problem Details:
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> | ```diff
diff --git a/fs/bcachefs/fsck.c b/fs/bcachefs/fsck.c
index c6c98ee87ec9..351de61c7ed1 100644
--- a/fs/bcachefs/fsck.c
+++ b/fs/bcachefs/fsck.c
@@ -1106,7 +1106,7 @@ static int check_inode(struct btree_trans *trans,
if (ret)
goto err;
} else {
- if (fsck_err_on(bch2_inode_is_open(c, k.k->p),
+ if... |
abaa6d4f6ab8371c5b73afb726ff1c012526e999 | Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix return type of dirent_points_to_inode_nowarn() | Problem Details:
we're returning an error code now, not a bool
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> | ```diff
diff --git a/fs/bcachefs/fsck.c b/fs/bcachefs/fsck.c
index 0d8b782b63fb..c6c98ee87ec9 100644
--- a/fs/bcachefs/fsck.c
+++ b/fs/bcachefs/fsck.c
@@ -28,8 +28,8 @@ static bool inode_points_to_dirent(struct bch_inode_unpacked *inode,
inode->bi_dir_offset == d.k->p.offset;
}
-static bool dirent_points_to_inode... |
fa7dfeae041c91e425db9fbb95fb3f57b821c386 | Analyze and fix the following issue in the Linux kernel code: net: phy: qt2025: Fix warning: unused import DeviceId | Problem Details:
Fix the following warning when the driver is compiled as built-in:
warning: unused import: `DeviceId`
--> drivers/net/phy/qt2025.rs:18:5
|
18 | DeviceId, Driver,
| ^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
device_table in module_phy_driv... | ```diff
diff --git a/drivers/net/phy/qt2025.rs b/drivers/net/phy/qt2025.rs
index 28d8981f410b..1ab065798175 100644
--- a/drivers/net/phy/qt2025.rs
+++ b/drivers/net/phy/qt2025.rs
@@ -15,7 +15,7 @@ use kernel::firmware::Firmware;
use kernel::net::phy::{
self,
reg::{Mmd, C45},
- DeviceId, Driver,
+ Drive... |
a1e40ac5b5e9077fe1f7ae0eb88034db0f9ae1ab | Analyze and fix the following issue in the Linux kernel code: gso: fix udp gso fraglist segmentation after pull from frag_list | Problem Details:
Detect gso fraglist skbs with corrupted geometry (see below) and
pass these to skb_segment instead of skb_segment_list, as the first
can segment them correctly.
Valid SKB_GSO_FRAGLIST skbs
- consist of two or more segments
- the head_skb holds the protocol headers plus first gso_size
- one or more fra... | ```diff
diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c
index d842303587af..a5be6e4ed326 100644
--- a/net/ipv4/udp_offload.c
+++ b/net/ipv4/udp_offload.c
@@ -296,8 +296,26 @@ struct sk_buff *__udp_gso_segment(struct sk_buff *gso_skb,
return NULL;
}
- if (skb_shinfo(gso_skb)->gso_type & SKB_GSO_FRAGL... |
555f45d24ba7cd5527716553031641cdebbe76c7 | Analyze and fix the following issue in the Linux kernel code: bridge: mcast: Fail MDB get request on empty entry | Problem Details:
When user space deletes a port from an MDB entry, the port is removed
synchronously. If this was the last port in the entry and the entry is
not joined by the host itself, then the entry is scheduled for deletion
via a timer.
The above means that it is possible for the MDB get netlink request to
retri... | ```diff
diff --git a/net/bridge/br_mdb.c b/net/bridge/br_mdb.c
index bc37e47ad829..1a52a0bca086 100644
--- a/net/bridge/br_mdb.c
+++ b/net/bridge/br_mdb.c
@@ -1674,7 +1674,7 @@ int br_mdb_get(struct net_device *dev, struct nlattr *tb[], u32 portid, u32 seq,
spin_lock_bh(&br->multicast_lock);
mp = br_mdb_ip_get(br... |
b04c4d9eb4f25b950b33218e33b04c94e7445e51 | Analyze and fix the following issue in the Linux kernel code: vrf: revert "vrf: Remove unnecessary RCU-bh critical section" | Problem Details:
This reverts commit 504fc6f4f7f681d2a03aa5f68aad549d90eab853.
dev_queue_xmit_nit is expected to be called with BH disabled.
__dev_queue_xmit has the following:
/* Disable soft irqs for various locks below. Also
* stops preemption for RCU.
*/
rcu_read_lock_bh();
VRF ... | ```diff
diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c
index 4d8ccaf9a2b4..4087f72f0d2b 100644
--- a/drivers/net/vrf.c
+++ b/drivers/net/vrf.c
@@ -608,7 +608,9 @@ static void vrf_finish_direct(struct sk_buff *skb)
eth_zero_addr(eth->h_dest);
eth->h_proto = skb->protocol;
+ rcu_read_lock_bh();
dev_queue_... |
3c97fe4f9fbc2bbc555b51268a9556e61cd3ca4e | Analyze and fix the following issue in the Linux kernel code: net: ethernet: ti: am65-cpsw: Fix forever loop in cleanup code | Problem Details:
This error handling has a typo. It should i++ instead of i--. In the
original code the error handling will loop until it crashes.
Fixes: da70d184a8c3 ("net: ethernet: ti: am65-cpsw: Introduce multi queue Rx")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Alexander Sverdlin <al... | ```diff
diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
index cbe99017cbfa..d253727b160f 100644
--- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c
+++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
@@ -763,7 +763,7 @@ fail_tx:
k3_udma_glue_disable_rx_chn(rx_chn->rx_chn);
fa... |
c283782fc5d60c4d8169137c6f955aa3553d3b3d | Analyze and fix the following issue in the Linux kernel code: net: phy: realtek: Check the index value in led_hw_control_get | Problem Details:
Just like rtl8211f_led_hw_is_supported() and
rtl8211f_led_hw_control_set(), the rtl8211f_led_hw_control_get() also
needs to check the index value, otherwise the caller is likely to get
an incorrect rules.
Fixes: 17784801d888 ("net: phy: realtek: Add support for PHY LEDs on RTL8211F")
Signed-off-by: Hu... | ```diff
diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c
index 25e5bfbb6f89..c15d2f66ef0d 100644
--- a/drivers/net/phy/realtek.c
+++ b/drivers/net/phy/realtek.c
@@ -527,6 +527,9 @@ static int rtl8211f_led_hw_control_get(struct phy_device *phydev, u8 index,
{
int val;
+ if (index >= RTL8211F_LED_C... |
aec7291003df78cb71fd461d7b672912bde55807 | Analyze and fix the following issue in the Linux kernel code: ppp: do not assume bh is held in ppp_channel_bridge_input() | Problem Details:
Networking receive path is usually handled from BH handler.
However, some protocols need to acquire the socket lock, and
packets might be stored in the socket backlog is the socket was
owned by a user process.
In this case, release_sock(), __release_sock(), and sk_backlog_rcv()
might call the sk->sk_b... | ```diff
diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c
index 4b2971e2bf48..0d5cd705decb 100644
--- a/drivers/net/ppp/ppp_generic.c
+++ b/drivers/net/ppp/ppp_generic.c
@@ -2269,7 +2269,7 @@ static bool ppp_channel_bridge_input(struct channel *pch, struct sk_buff *skb)
if (!pchb)
goto out... |
8ed7cf66f4841bcc8c15a89be0732b933703b51c | Analyze and fix the following issue in the Linux kernel code: selftests: rds: move include.sh to TEST_FILES | Problem Details:
The include.sh file is generated for inclusion and should not be executable.
Otherwise, it will be added to kselftest-list.txt. Additionally, add the
executable bit for test.py at the same time to ensure proper functionality.
Fixes: 3ade6ce1255e ("selftests: rds: add testing infrastructure")
Signed-of... | ```diff
diff --git a/tools/testing/selftests/net/rds/Makefile b/tools/testing/selftests/net/rds/Makefile
index da9714bc7aad..cf30307a829b 100644
--- a/tools/testing/selftests/net/rds/Makefile
+++ b/tools/testing/selftests/net/rds/Makefile
@@ -4,9 +4,10 @@ all:
@echo mk_build_dir="$(shell pwd)" > include.sh
TEST_PR... |
49d14b54a527289d09a9480f214b8c586322310a | Analyze and fix the following issue in the Linux kernel code: net: test for not too small csum_start in virtio_net_hdr_to_skb() | Problem Details:
syzbot was able to trigger this warning [1], after injecting a
malicious packet through af_packet, setting skb->csum_start and thus
the transport header to an incorrect value.
We can at least make sure the transport header is after
the end of the network header (with a estimated minimal size).
[1]
[ ... | ```diff
diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h
index 276ca543ef44..02a9f4dc594d 100644
--- a/include/linux/virtio_net.h
+++ b/include/linux/virtio_net.h
@@ -103,8 +103,10 @@ static inline int virtio_net_hdr_to_skb(struct sk_buff *skb,
if (!skb_partial_csum_set(skb, start, off))
re... |
17bd3bd82f9f79f3feba15476c2b2c95a9b11ff8 | Analyze and fix the following issue in the Linux kernel code: net: gso: fix tcp fraglist segmentation after pull from frag_list | Problem Details:
Detect tcp gso fraglist skbs with corrupted geometry (see below) and
pass these to skb_segment instead of skb_segment_list, as the first
can segment them correctly.
Valid SKB_GSO_FRAGLIST skbs
- consist of two or more segments
- the head_skb holds the protocol headers plus first gso_size
- one or more... | ```diff
diff --git a/net/ipv4/tcp_offload.c b/net/ipv4/tcp_offload.c
index e4ad3311e148..2308665b51c5 100644
--- a/net/ipv4/tcp_offload.c
+++ b/net/ipv4/tcp_offload.c
@@ -101,8 +101,14 @@ static struct sk_buff *tcp4_gso_segment(struct sk_buff *skb,
if (!pskb_may_pull(skb, sizeof(struct tcphdr)))
return ERR_PTR(-EI... |
c26339faed11fae01fafd61e5e97ac3ba7b23ef3 | Analyze and fix the following issue in the Linux kernel code: mmc: core: Only set maximum DMA segment size if DMA is supported | Problem Details:
Since upstream commit 334304ac2bac ("dma-mapping: don't return errors
from dma_set_max_seg_size") calling dma_set_max_seg_size() on a device
not supporting DMA results in a warning traceback. This is seen when
booting the sifive_u machine from SD. The underlying SPI controller
(sifive,spi0 compatible) ... | ```diff
diff --git a/drivers/mmc/core/queue.c b/drivers/mmc/core/queue.c
index d0b3ca8a11f0..4d6844261912 100644
--- a/drivers/mmc/core/queue.c
+++ b/drivers/mmc/core/queue.c
@@ -388,7 +388,8 @@ static struct gendisk *mmc_alloc_disk(struct mmc_queue *mq,
blk_queue_rq_timeout(mq->queue, 60 * HZ);
- dma_set_max_seg... |
d29d92df410e2fb523f640478b18f70c1823e55e | Analyze and fix the following issue in the Linux kernel code: perf trace: Keep exited threads for summary | Problem Details:
Since 9ffa6c7512ca ("perf machine thread: Remove exited threads by
default") perf cleans exited threads up, but as said, sometimes they
are necessary to be kept. The mentioned commit does not cover all the
cases, we also need the information to construct the summary table in
perf-trace.
Before:
# ... | ```diff
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index f6e847529073..0b30297b4ecb 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -5449,6 +5449,10 @@ init_augmented_syscall_tp:
if (trace.summary_only)
trace.summary = trace.summary_only;
+ /* Keep exited thr... |
1334ee91694c21777d2df1da20bc5d5a7022a1e5 | Analyze and fix the following issue in the Linux kernel code: perf test: Fix memory leaks on event-times error paths | Problem Details:
These error paths occur without sufficient permissions. Fix the memory
leaks to make leak sanitizer happier.
Signed-off-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20241001052327.7052-3-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org> | ```diff
diff --git a/tools/perf/tests/event-times.c b/tools/perf/tests/event-times.c
index e155f0e0e04d..deefe5003bfc 100644
--- a/tools/perf/tests/event-times.c
+++ b/tools/perf/tests/event-times.c
@@ -126,6 +126,7 @@ static int attach__cpu_disabled(struct evlist *evlist)
evsel->core.attr.disabled = 1;
err = evs... |
7f6ccb70e465bd8c9cf8973aee1c01224e4bdb3c | Analyze and fix the following issue in the Linux kernel code: perf stat: Fix affinity memory leaks on error path | Problem Details:
Missed cleanup when an error occurs.
Fixes: 49de179577e7 ("perf stat: No need to setup affinities when starting a workload")
Signed-off-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20241001052327.7052-2-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org> | ```diff
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 1521b6df2606..3e6b9f216e80 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -827,6 +827,7 @@ try_again_reset:
}
}
affinity__cleanup(affinity);
+ affinity = NULL;
evlist__for_each_entry(evsel_list, counte... |
8d7f85e323ea402005fa83ddbdf5d00292d77098 | Analyze and fix the following issue in the Linux kernel code: perf jevents: Don't stop at the first matched pmu when searching a events table | Problem Details:
The "perf all PMU test" fails on a Coffee Lake machine.
The failure is caused by the below change in the commit e2641db83f18
("perf vendor events: Add/update skylake events/metrics").
+ {
+ "BriefDescription": "This 48-bit fixed counter counts the UCLK cycles",
+ "Counter": "FIXED",
... | ```diff
diff --git a/tools/perf/pmu-events/empty-pmu-events.c b/tools/perf/pmu-events/empty-pmu-events.c
index c592079982fb..873e9fb2041f 100644
--- a/tools/perf/pmu-events/empty-pmu-events.c
+++ b/tools/perf/pmu-events/empty-pmu-events.c
@@ -380,7 +380,7 @@ int pmu_events_table__for_each_event(const struct pmu_events_... |
2985b1844f3f3447f2d938eff1ef6762592065a5 | Analyze and fix the following issue in the Linux kernel code: PCI: Fix reset_method_store() memory leak | Problem Details:
In reset_method_store(), a string is allocated via kstrndup() and assigned
to the local "options". options is then used in with strsep() to find
spaces:
while ((name = strsep(&options, " ")) != NULL) {
If there are no remaining spaces, then options is set to NULL by strsep(),
so the subsequent kfre... | ```diff
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 7d85c04fbba2..0e6562ff3dcf 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -5244,7 +5244,7 @@ static ssize_t reset_method_store(struct device *dev,
const char *buf, size_t count)
{
struct pci_dev *pdev = to_pci_dev(dev);
- char *option... |
1117b916f541fc8e4ce812843555432022e5aa0e | Analyze and fix the following issue in the Linux kernel code: soc: fsl: cpm1: qmc: Fix unused data compilation warning | Problem Details:
In some configuration, compilation raises warnings related to unused
data. Indeed, depending on configuration, those data can be unused.
mark those data as __maybe_unused to avoid compilation warnings.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202409... | ```diff
diff --git a/drivers/soc/fsl/qe/qmc.c b/drivers/soc/fsl/qe/qmc.c
index 659c579d751d..19cc581b06d0 100644
--- a/drivers/soc/fsl/qe/qmc.c
+++ b/drivers/soc/fsl/qe/qmc.c
@@ -2055,7 +2055,7 @@ static void qmc_remove(struct platform_device *pdev)
qmc_exit_xcc(qmc);
}
-static const struct qmc_data qmc_data_cpm1 ... |
122019f051bdae3c700ec4a8246b74e3e6f29d9b | Analyze and fix the following issue in the Linux kernel code: soc: fsl: cpm1: qmc: Do not use IS_ERR_VALUE() on error pointers | Problem Details:
ppc64_book3e_allmodconfig:
drivers/soc/fsl/qe/qmc.c: In function ‘qmc_qe_init_resources’:
include/linux/err.h:28:49: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
28 | #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MA... | ```diff
diff --git a/drivers/soc/fsl/qe/qmc.c b/drivers/soc/fsl/qe/qmc.c
index 3dffebb48b0d..659c579d751d 100644
--- a/drivers/soc/fsl/qe/qmc.c
+++ b/drivers/soc/fsl/qe/qmc.c
@@ -1761,10 +1761,9 @@ static int qmc_qe_init_resources(struct qmc *qmc, struct platform_device *pdev)
*/
info = devm_qe_muram_alloc(qmc->de... |
e934a35e3cc1fe0bfb1bc771e64f3ba6e70c40e2 | Analyze and fix the following issue in the Linux kernel code: perf cs-etm: Fix the assert() to handle captured and unprocessed cpu trace | Problem Details:
If one builds perf with DEBUG=1, captures data on multiple CPUs and
finally runs 'perf report -C <cpu>' for only one of the cpus, assert()
aborts the program. This happens because there are empty queues with
format set.
This patch changes the condition to abort only if a queue is not empty
and if the ... | ```diff
diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c
index 90f32f327b9b..40f047baef81 100644
--- a/tools/perf/util/cs-etm.c
+++ b/tools/perf/util/cs-etm.c
@@ -3323,7 +3323,7 @@ static int cs_etm__create_decoders(struct cs_etm_auxtrace *etm)
* Don't create decoders for empty queues, mainly becaus... |
a530337ba9ef601c93ec378fd941be43f587d563 | Analyze and fix the following issue in the Linux kernel code: perf build: Fix build feature-dwarf_getlocations fail for old libdw | Problem Details:
For libdw versions below 0.177, need to link libdl.a in addition to
libbebl.a during static compilation, otherwise
feature-dwarf_getlocations compilation will fail.
Before:
$ make LDFLAGS=-static
BUILD: Doing 'make -j20' parallel build
<SNIP>
Makefile.config:483: Old libdw.h, finding vari... | ```diff
diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
index 6f1c961f0ede..1658596188bf 100644
--- a/tools/build/feature/Makefile
+++ b/tools/build/feature/Makefile
@@ -181,6 +181,9 @@ ifeq ($(findstring -static,${LDFLAGS}),-static)
ifeq ($(shell test $(LIBDW_VERSION_2) -lt 177; echo $$?),0... |
43f6564f18bf5b27e1675ef6f4baf68e786396b2 | Analyze and fix the following issue in the Linux kernel code: perf build: Fix static compilation error when libdw is not installed | Problem Details:
If libdw is not installed in build environment, the output of
'pkg-config --modversion libdw' is empty, causing LIBDW_VERSION_2 to be
empty and the shell test will have the following error:
/bin/sh: 1: test: -lt: unexpected operator
Before:
$ pkg-config --modversion libdw
Package libdw was not... | ```diff
diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
index 5938cf799dc6..6f1c961f0ede 100644
--- a/tools/build/feature/Makefile
+++ b/tools/build/feature/Makefile
@@ -172,7 +172,7 @@ DWARFLIBS := -ldw
ifeq ($(findstring -static,${LDFLAGS}),-static)
DWARFLIBS += -lelf -lz -llzma -lbz2 -lz... |
008979cc6911987152eb7485943c85b9c92c1e9b | Analyze and fix the following issue in the Linux kernel code: perf dwarf-aux: Fix build with !HAVE_DWARF_GETLOCATIONS_SUPPORT | Problem Details:
The linked fixes commit added an #include "dwarf-aux.h" to disasm.h
which gets picked up in a lot of places. Without
HAVE_DWARF_GETLOCATIONS_SUPPORT the stubs return an errno, so include
errno.h to fix the following build error:
In file included from util/disasm.h:8,
from util/annot... | ```diff
diff --git a/tools/perf/util/dwarf-aux.h b/tools/perf/util/dwarf-aux.h
index 336a3a183a78..bd7505812569 100644
--- a/tools/perf/util/dwarf-aux.h
+++ b/tools/perf/util/dwarf-aux.h
@@ -9,6 +9,7 @@
#include <elfutils/libdw.h>
#include <elfutils/libdwfl.h>
#include <elfutils/version.h>
+#include <errno.h>
str... |
06783dc52057045edd9cfcdd8f90899d04bc8678 | Analyze and fix the following issue in the Linux kernel code: pinctrl: imx1: Fix too generic defines | Problem Details:
The "PC" define is colliding with the (apparently broadcased)
define for "program counter" on Loongarch, so let's rename all
these 2-letter defines so they don't collide with stuff.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202410020940.wGISlWfV-lkp@i... | ```diff
diff --git a/drivers/pinctrl/freescale/pinctrl-imx1.c b/drivers/pinctrl/freescale/pinctrl-imx1.c
index 1e2b0fe9ffd6..bd39cadf1f34 100644
--- a/drivers/pinctrl/freescale/pinctrl-imx1.c
+++ b/drivers/pinctrl/freescale/pinctrl-imx1.c
@@ -12,122 +12,122 @@
#include "pinctrl-imx1.h"
#define PAD_ID(port, pin) ((p... |
49ebeb0c15e86548822a8fc8c5ac34c70709c1aa | Analyze and fix the following issue in the Linux kernel code: bpf: selftests: send packet to devmap redirect XDP | Problem Details:
The current xdp_devmap_attach test attaches a program
that redirects to another program via devmap.
It is, however, never executed, so do that to catch
any bugs that might occur during execution.
Also, execute the same for a veth pair so that we
also cover the non-generic path.
Warning: Running this... | ```diff
diff --git a/tools/testing/selftests/bpf/prog_tests/xdp_devmap_attach.c b/tools/testing/selftests/bpf/prog_tests/xdp_devmap_attach.c
index ce6812558287..27ffed17d4be 100644
--- a/tools/testing/selftests/bpf/prog_tests/xdp_devmap_attach.c
+++ b/tools/testing/selftests/bpf/prog_tests/xdp_devmap_attach.c
@@ -1,6 +... |
2314dca1b36629f352b0f919cdab16ca3fcaea42 | Analyze and fix the following issue in the Linux kernel code: pm: cpupower: bindings: Improve disable c_state block | Problem Details:
This commit fixes a bad comment, removes an unneeded code block, and
catches a few more states that cpuidle_state_disable with the test
script. Part of the motivation for this commit was I kept forgetting to
use sudo.
Signed-off-by: "John B. Wyatt IV" <jwyatt@redhat.com>
Signed-off-by: "John B. Wyatt ... | ```diff
diff --git a/tools/power/cpupower/bindings/python/test_raw_pylibcpupower.py b/tools/power/cpupower/bindings/python/test_raw_pylibcpupower.py
index 3d6f62b9556a..bb2b26db8b10 100755
--- a/tools/power/cpupower/bindings/python/test_raw_pylibcpupower.py
+++ b/tools/power/cpupower/bindings/python/test_raw_pylibcpupo... |
ca9984c5f0ab3690d98b13937b2485a978c8dd73 | Analyze and fix the following issue in the Linux kernel code: bpf: devmap: provide rxq after redirect | Problem Details:
rxq contains a pointer to the device from where
the redirect happened. Currently, the BPF program
that was executed after a redirect via BPF_MAP_TYPE_DEVMAP*
does not have it set.
This is particularly bad since accessing ingress_ifindex, e.g.
SEC("xdp")
int prog(struct xdp_md *pkt)
{
return b... | ```diff
diff --git a/kernel/bpf/devmap.c b/kernel/bpf/devmap.c
index 9e0e3b0a18e4..7878be18e9d2 100644
--- a/kernel/bpf/devmap.c
+++ b/kernel/bpf/devmap.c
@@ -333,9 +333,11 @@ static int dev_map_hash_get_next_key(struct bpf_map *map, void *key,
static int dev_map_bpf_prog_run(struct bpf_prog *xdp_prog,
struct x... |
c66be905cda24fb782b91053b196bd2e966f95b7 | Analyze and fix the following issue in the Linux kernel code: selftests: breakpoints: use remaining time to check if suspend succeed | Problem Details:
step_after_suspend_test fails with device busy error while
writing to /sys/power/state to start suspend. The test believes
it failed to enter suspend state with
$ sudo ./step_after_suspend_test
TAP version 13
Bail out! Failed to enter Suspend state
However, in the kernel message, I indeed see the sys... | ```diff
diff --git a/tools/testing/selftests/breakpoints/step_after_suspend_test.c b/tools/testing/selftests/breakpoints/step_after_suspend_test.c
index dfec31fb9b30..8d275f03e977 100644
--- a/tools/testing/selftests/breakpoints/step_after_suspend_test.c
+++ b/tools/testing/selftests/breakpoints/step_after_suspend_test... |
a19008256d05e726f29f43c6a307e45482c082c3 | Analyze and fix the following issue in the Linux kernel code: kselftest/devices/probe: Fix SyntaxWarning in regex strings for Python3 | Problem Details:
Insert raw strings to prevent Python3 from interpreting string literals
as Unicode strings and "\d" as invalid escaped sequence.
Fix the warnings:
tools/testing/selftests/devices/probe/test_discoverable_devices.py:48:
SyntaxWarning: invalid escape sequence '\d' usb_controller_sysfs_dir =
"usb[\d]+"
... | ```diff
diff --git a/tools/testing/selftests/devices/probe/test_discoverable_devices.py b/tools/testing/selftests/devices/probe/test_discoverable_devices.py
index d94a74b8a054..d7a2bb91c807 100755
--- a/tools/testing/selftests/devices/probe/test_discoverable_devices.py
+++ b/tools/testing/selftests/devices/probe/test_d... |
5efa23224bf573d4bceb51bc646dd67b6ccb83b5 | Analyze and fix the following issue in the Linux kernel code: dt-bindings: PCI: mediatek-gen3: Allow exact number of clocks only | Problem Details:
In MediaTek PCIe gen3 bindings, "clocks" accepts a range of 1-6 clocks
across all SoCs. But in practice, each SoC requires a particular number of
clocks as defined in "clock-names", and the length of "clocks" and
"clock-names" can be inconsistent with current bindings.
For example:
- MT8188, MT8192... | ```diff
diff --git a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml
index 898c1be2d6a4..f05aab2b1add 100644
--- a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml
+++ b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.ya... |
abc0742c79bdb3b164eacab24aea0916d2ec1cb5 | Analyze and fix the following issue in the Linux kernel code: drm/i915/hdcp: fix connector refcounting | Problem Details:
We acquire a connector reference before scheduling an HDCP prop work,
and expect the work function to release the reference.
However, if the work was already queued, it won't be queued multiple
times, and the reference is not dropped.
Release the reference immediately if the work was already queued.
... | ```diff
diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c b/drivers/gpu/drm/i915/display/intel_hdcp.c
index 00d4c9ac6c45..ed6aa87403e2 100644
--- a/drivers/gpu/drm/i915/display/intel_hdcp.c
+++ b/drivers/gpu/drm/i915/display/intel_hdcp.c
@@ -1097,7 +1097,8 @@ static void intel_hdcp_update_value(struct intel_connec... |
76959aff14a0012ad6b984ec7686d163deccdc16 | Analyze and fix the following issue in the Linux kernel code: ACPI: battery: Fix possible crash when unregistering a battery hook | Problem Details:
When a battery hook returns an error when adding a new battery, then
the battery hook is automatically unregistered.
However the battery hook provider cannot know that, so it will later
call battery_hook_unregister() on the already unregistered battery
hook, resulting in a crash.
Fix this by using the... | ```diff
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index dda59ee5a11e..1c45ff6dbb83 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -715,7 +715,7 @@ static void battery_hook_unregister_unlocked(struct acpi_battery_hook *hook)
if (!hook->remove_battery(battery->bat, hook))
po... |
fcbc423577ce28b5e470a2a47fed6724430cccdb | Analyze and fix the following issue in the Linux kernel code: sched_ext: Add __weak markers to BPF helper function decalarations | Problem Details:
Fix build errors by adding __weak markers to BPF helper function
declarations in header files. This resolves static assertion failures
in scx_qmap.bpf.c and scx_flatcg.bpf.c where functions like
scx_bpf_dispatch_from_dsq_set_slice, scx_bpf_dispatch_from_dsq_set_vtime,
and scx_bpf_task_cgroup were missi... | ```diff
diff --git a/tools/sched_ext/include/scx/common.bpf.h b/tools/sched_ext/include/scx/common.bpf.h
index 225f61f9bfca..27749c51c3ec 100644
--- a/tools/sched_ext/include/scx/common.bpf.h
+++ b/tools/sched_ext/include/scx/common.bpf.h
@@ -41,8 +41,8 @@ void scx_bpf_dispatch_vtime(struct task_struct *p, u64 dsq_id, ... |
3f7f36a4559ef78a6418c5f0447fbfbdcf671956 | Analyze and fix the following issue in the Linux kernel code: Revert "ALSA: hda: Conditionally use snooping for AMD HDMI" | Problem Details:
This reverts commit 478689b5990deb626a0b3f1ebf165979914d6be4.
The fix seems leading to regressions for other systems.
Also, the way to check the presence of IOMMU via get_dma_ops() isn't
reliable and it's no longer applicable for 6.12. After all, it's no
right fix, so let's revert it at first.
To be... | ```diff
diff --git a/sound/pci/hda/hda_controller.h b/sound/pci/hda/hda_controller.h
index 68c883f202ca..c2d0109866e6 100644
--- a/sound/pci/hda/hda_controller.h
+++ b/sound/pci/hda/hda_controller.h
@@ -28,7 +28,7 @@
#else
#define AZX_DCAPS_I915_COMPONENT 0 /* NOP */
#endif
-#define AZX_DCAPS_AMD_ALLOC_FIX (1 << 14... |
1ca4169c391c370e0f3a92938df2862900575096 | Analyze and fix the following issue in the Linux kernel code: netfs: Fix missing wakeup after issuing writes | Problem Details:
After dividing up a proposed write into subrequests, netfslib sets
NETFS_RREQ_ALL_QUEUED to indicate to the collector that it can move on to
the final cleanup once it has emptied the subrequest queues.
Now, whilst the collector will normally end up running at least once after
this bit is set just beca... | ```diff
diff --git a/fs/netfs/write_issue.c b/fs/netfs/write_issue.c
index 6293f547e4c3..bf6d507578e5 100644
--- a/fs/netfs/write_issue.c
+++ b/fs/netfs/write_issue.c
@@ -508,6 +508,30 @@ static int netfs_write_folio(struct netfs_io_request *wreq,
return 0;
}
+/*
+ * End the issuing of writes, letting the collecto... |
cac39b0706f186ce01b9dd1c3802846528d1bbca | Analyze and fix the following issue in the Linux kernel code: slub/kunit: skip test_kfree_rcu when the slub kunit test is built-in | Problem Details:
Guenter Roeck reports that the new slub kunit tests added by commit
4e1c44b3db79 ("kunit, slub: add test_kfree_rcu() and
test_leak_destroy()") cause a lockup on boot on several architectures
when the kunit tests are configured to be built-in and not modules.
The test_kfree_rcu test invokes kfree_rcu()... | ```diff
diff --git a/lib/slub_kunit.c b/lib/slub_kunit.c
index 85d51ec09846..80e39f003344 100644
--- a/lib/slub_kunit.c
+++ b/lib/slub_kunit.c
@@ -164,10 +164,16 @@ struct test_kfree_rcu_struct {
static void test_kfree_rcu(struct kunit *test)
{
- struct kmem_cache *s = test_kmem_cache_create("TestSlub_kfree_rcu",
-... |
3f1dd33f99677e7025b45a2b8d2baa04985ff4dc | Analyze and fix the following issue in the Linux kernel code: mm, slab: suppress warnings in test_leak_destroy kunit test | Problem Details:
The test_leak_destroy kunit test intends to test the detection of stray
objects in kmem_cache_destroy(), which normally produces a warning. The
other slab kunit tests suppress the warnings in the kunit test context,
so suppress warnings and related printk output in this test as well.
Automated test run... | ```diff
diff --git a/lib/slub_kunit.c b/lib/slub_kunit.c
index 6e3a1e5a7142..85d51ec09846 100644
--- a/lib/slub_kunit.c
+++ b/lib/slub_kunit.c
@@ -177,13 +177,13 @@ static void test_kfree_rcu(struct kunit *test)
static void test_leak_destroy(struct kunit *test)
{
- struct kmem_cache *s = test_kmem_cache_create("Tes... |
462763212dd71c41f092b48eaa352bc1f5ed5d66 | Analyze and fix the following issue in the Linux kernel code: Revert: "dm-verity: restart or panic on an I/O error" | Problem Details:
This reverts commit e6a3531dd542cb127c8de32ab1e54a48ae19962b.
The problem that the commit e6a3531dd542cb127c8de32ab1e54a48ae19962b
fixes was reported as a security bug, but Google engineers working on
Android and ChromeOS didn't want to change the default behavior, they
want to get -EIO rather than re... | ```diff
diff --git a/drivers/md/dm-verity-target.c b/drivers/md/dm-verity-target.c
index 36e4ddfe2d15..24ba9a10444c 100644
--- a/drivers/md/dm-verity-target.c
+++ b/drivers/md/dm-verity-target.c
@@ -273,10 +273,8 @@ out:
if (v->mode == DM_VERITY_MODE_LOGGING)
return 0;
- if (v->mode == DM_VERITY_MODE_RESTART) {
... |
9af48210ea5f1539e1999154b0acd343efdb370b | Analyze and fix the following issue in the Linux kernel code: xen: Fix config option reference in XEN_PRIVCMD definition | Problem Details:
Commit 2fae6bb7be32 ("xen/privcmd: Add new syscall to get gsi from dev")
adds a weak reverse dependency to the config XEN_PRIVCMD definition,
referring to CONFIG_XEN_PCIDEV_BACKEND. In Kconfig files, one refers to
config options without the CONFIG prefix, though. So in its current form,
this does not c... | ```diff
diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig
index 62035fe16bb8..72ddee4c1544 100644
--- a/drivers/xen/Kconfig
+++ b/drivers/xen/Kconfig
@@ -261,7 +261,7 @@ config XEN_SCSI_BACKEND
config XEN_PRIVCMD
tristate "Xen hypercall passthrough driver"
depends on XEN
- imply CONFIG_XEN_PCIDEV_BACKEND
+ im... |
63e0695597a044c96bf369e4d8ba031291449d95 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Fix memory leak when aborting binds | Problem Details:
Make sure to call xe_pt_update_ops_fini in xe_pt_update_ops_abort to
free any memory the bind allocated.
Caught by kmemleak when running Vulkan CTS tests on LNL. The leak
seems to happen only when there's some kind of failure happening, like
the lack of memory. Example output:
unreferenced object 0xf... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_pt.c b/drivers/gpu/drm/xe/xe_pt.c
index d6353e8969f0..f27f579f4d85 100644
--- a/drivers/gpu/drm/xe/xe_pt.c
+++ b/drivers/gpu/drm/xe/xe_pt.c
@@ -2188,5 +2188,5 @@ void xe_pt_update_ops_abort(struct xe_tile *tile, struct xe_vma_ops *vops)
pt_op->num_entries);
}
- xe... |
6d6e54fc71ad1ab0a87047fd9c211e75d86084a3 | Analyze and fix the following issue in the Linux kernel code: aoe: fix the potential use-after-free problem in more places | Problem Details:
For fixing CVE-2023-6270, f98364e92662 ("aoe: fix the potential
use-after-free problem in aoecmd_cfg_pkts") makes tx() calling dev_put()
instead of doing in aoecmd_cfg_pkts(). It avoids that the tx() runs
into use-after-free.
Then Nicolai Stange found more places in aoe have potential use-after-free
p... | ```diff
diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c
index cc9077b588d7..d1f4ddc57645 100644
--- a/drivers/block/aoe/aoecmd.c
+++ b/drivers/block/aoe/aoecmd.c
@@ -361,6 +361,7 @@ ata_rw_frameinit(struct frame *f)
}
ah->cmdstat = ATA_CMD_PIO_READ | writebit | extbit;
+ dev_hold(t->ifp->nd);... |
14d57ec3b86369d0037567f12caae0c9e9eaad9e | Analyze and fix the following issue in the Linux kernel code: blk_iocost: remove some duplicate irq disable/enables | Problem Details:
These are called from blkcg_print_blkgs() which already disables IRQs so
disabling it again is wrong. It means that IRQs will be enabled slightly
earlier than intended, however, so far as I can see, this bug is harmless.
Fixes: 35198e323001 ("blk-iocost: read params inside lock in sysfs apis")
Signed... | ```diff
diff --git a/block/blk-iocost.c b/block/blk-iocost.c
index 9dc9323f84ac..384aa15e8260 100644
--- a/block/blk-iocost.c
+++ b/block/blk-iocost.c
@@ -3166,7 +3166,7 @@ static u64 ioc_qos_prfill(struct seq_file *sf, struct blkg_policy_data *pd,
if (!dname)
return 0;
- spin_lock_irq(&ioc->lock);
+ spin_lock(&... |
6eabf656048d904d961584de2e1d45bc0854f9fb | Analyze and fix the following issue in the Linux kernel code: irqchip/sifive-plic: Return error code on failure | Problem Details:
Set error to -ENOMEM if kcalloc() fails or if irq_domain_add_linear()
fails inside of plic_probe() instead of returning 0.
Fixes: 4d936f10ff80 ("irqchip/sifive-plic: Probe plic driver early for Allwinner D1 platform")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpe... | ```diff
diff --git a/drivers/irqchip/irq-sifive-plic.c b/drivers/irqchip/irq-sifive-plic.c
index 2f6ef5c495bd..0b730e305748 100644
--- a/drivers/irqchip/irq-sifive-plic.c
+++ b/drivers/irqchip/irq-sifive-plic.c
@@ -626,8 +626,10 @@ static int plic_probe(struct fwnode_handle *fwnode)
handler->enable_save = kcalloc(... |
0ab42843003f27db509e42f2060bb3fa6ffad38d | Analyze and fix the following issue in the Linux kernel code: block: fix blk_rq_map_integrity_sg kernel-doc | Problem Details:
Fix the documentation to match the new function signature.
Fixes: 76c313f658d2752 ("blk-integrity: improved sg segment mapping")
Signed-off-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20240922141800.3622319-1-kbusch@meta.com
Signed-of... | ```diff
diff --git a/block/blk-integrity.c b/block/blk-integrity.c
index 0a2b1c5d0ebf..83b696ba0cac 100644
--- a/block/blk-integrity.c
+++ b/block/blk-integrity.c
@@ -56,8 +56,7 @@ new_segment:
/**
* blk_rq_map_integrity_sg - Map integrity metadata into a scatterlist
- * @q: request queue
- * @bio: bio with integ... |
cad3f4a22cfa4081cc2d465d1118cf31708fd82b | Analyze and fix the following issue in the Linux kernel code: inotify: Fix possible deadlock in fsnotify_destroy_mark | Problem Details:
[Syzbot reported]
WARNING: possible circular locking dependency detected
6.11.0-rc4-syzkaller-00019-gb311c1b497e5 #0 Not tainted
------------------------------------------------------
kswapd0/78 is trying to acquire lock:
ffff88801b8d8930 (&group->mark_mutex){+.+.}-{3:3}, at: fsnotify_group_lock includ... | ```diff
diff --git a/fs/nfsd/filecache.c b/fs/nfsd/filecache.c
index 19bb88c7eebd..ea1ca374cdab 100644
--- a/fs/nfsd/filecache.c
+++ b/fs/nfsd/filecache.c
@@ -792,7 +792,7 @@ nfsd_file_cache_init(void)
}
nfsd_file_fsnotify_group = fsnotify_alloc_group(&nfsd_file_fsnotify_ops,
- FSNOTIFY_GROUP_NOFS);
+ ... |
4a1361e9a5c5dbb5c9f647762ae0cb1a605101fa | Analyze and fix the following issue in the Linux kernel code: irqchip/riscv-imsic: Fix output text of base address | Problem Details:
The "per-CPU IDs ... at base ..." info log is outputting a physical
address, not a PPN.
Fixes: 027e125acdba ("irqchip/riscv-imsic: Add device MSI domain support for platform devices")
Signed-off-by: Andrew Jones <ajones@ventanamicro.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by:... | ```diff
diff --git a/drivers/irqchip/irq-riscv-imsic-platform.c b/drivers/irqchip/irq-riscv-imsic-platform.c
index 64905e6f52d7..c708780e8760 100644
--- a/drivers/irqchip/irq-riscv-imsic-platform.c
+++ b/drivers/irqchip/irq-riscv-imsic-platform.c
@@ -341,7 +341,7 @@ int imsic_irqdomain_init(void)
imsic->fwnode, glob... |
35ceae44742e1101f9d20adadbbbd92c05d7d659 | Analyze and fix the following issue in the Linux kernel code: fsnotify: Avoid data race between fsnotify_recalc_mask() and fsnotify_object_watched() | Problem Details:
When __fsnotify_recalc_mask() recomputes the mask on the watched object,
the compiler can "optimize" the code to perform partial updates to the
mask (including zeroing it at the beginning). Thus places checking
the object mask without conn->lock such as fsnotify_object_watched()
could see invalid state... | ```diff
diff --git a/fs/notify/fsnotify.c b/fs/notify/fsnotify.c
index 272c8a1dab3c..82ae8254c068 100644
--- a/fs/notify/fsnotify.c
+++ b/fs/notify/fsnotify.c
@@ -183,8 +183,10 @@ static bool fsnotify_event_needs_parent(struct inode *inode, __u32 mnt_mask,
BUILD_BUG_ON(FS_EVENTS_POSS_ON_CHILD & ~FS_EVENTS_POSS_TO_PAR... |
9e9c4666abb5bb444dac37e2d7eb5250c8d52a45 | Analyze and fix the following issue in the Linux kernel code: irqchip/ocelot: Fix trigger register address | Problem Details:
Controllers, supported by this driver, have two sets of registers:
* (main) interrupt registers control peripheral interrupt sources.
* device interrupt registers configure per-device (network interface)
interrupts and act as an extra stage before the main interrupt
registers.
In the driver ... | ```diff
diff --git a/drivers/irqchip/irq-mscc-ocelot.c b/drivers/irqchip/irq-mscc-ocelot.c
index 4d0c3532dbe7..c19ab379e8c5 100644
--- a/drivers/irqchip/irq-mscc-ocelot.c
+++ b/drivers/irqchip/irq-mscc-ocelot.c
@@ -37,7 +37,7 @@ static struct chip_props ocelot_props = {
.reg_off_ena_clr = 0x1c,
.reg_off_ena_set = 0... |
2c0b2b484b164072ba6cf52af1bde85158fc75d4 | Analyze and fix the following issue in the Linux kernel code: ASoC: intel: sof_sdw: Add check devm_kasprintf() returned value | Problem Details:
devm_kasprintf() can return a NULL pointer on failure but this
returned value is not checked.
Fixes: b359760d95ee ("ASoC: intel: sof_sdw: Add simple DAI link creation helper")
Signed-off-by: Charles Han <hanchunchao@inspur.com>
Link: https://patch.msgid.link/20240925080030.11262-1-hanchunchao@inspur.c... | ```diff
diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c
index 5196d96f5c0e..35d707d3ae9c 100644
--- a/sound/soc/intel/boards/sof_sdw.c
+++ b/sound/soc/intel/boards/sof_sdw.c
@@ -800,6 +800,9 @@ static int create_ssp_dailinks(struct snd_soc_card *card,
char *cpu_dai_name = devm_kaspri... |
47d7d3fd72afc7dcd548806291793ee6f3848215 | Analyze and fix the following issue in the Linux kernel code: ASoC: imx-card: Set card.owner to avoid a warning calltrace if SND=m | Problem Details:
In most Linux distribution kernels, the SND is set to m, in such a
case, when booting the kernel on i.MX8MP EVK board, there is a
warning calltrace like below:
Call trace:
snd_card_init+0x484/0x4cc [snd]
snd_card_new+0x70/0xa8 [snd]
snd_soc_bind_card+0x310/0xbd0 [snd_soc_core]
snd_soc_register_car... | ```diff
diff --git a/sound/soc/fsl/imx-card.c b/sound/soc/fsl/imx-card.c
index 98b37dd2b901..a7215bad6484 100644
--- a/sound/soc/fsl/imx-card.c
+++ b/sound/soc/fsl/imx-card.c
@@ -710,6 +710,7 @@ static int imx_card_probe(struct platform_device *pdev)
data->plat_data = plat_data;
data->card.dev = &pdev->dev;
+ dat... |
17d8adc4cd5181c13c1041b197b76efc09eaf8a8 | Analyze and fix the following issue in the Linux kernel code: ASoC: dt-bindings: davinci-mcasp: Fix interrupts property | Problem Details:
My understanding of the interrupts property is that it can either be:
1/ - TX
2/ - TX
- RX
3/ - Common/combined.
There are very little chances that either:
- TX
- Common/combined
or even
- TX
- RX
- Common/combined
could be a thing.
Looking at the interrupt-names definition (which u... | ```diff
diff --git a/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.yaml b/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.yaml
index 7735e08d35ba..ab3206ffa4af 100644
--- a/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.yaml
+++ b/Documentation/devicetree/bindings/sound/davinci-mc... |
1a2dc9bf3b15d8d6683adeb29dc680decd19d5ae | Analyze and fix the following issue in the Linux kernel code: backlight: ktz8866: Fix module autoloading | Problem Details:
Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded
based on the alias from of_device_id table.
Signed-off-by: Liao Chen <liaochen4@huawei.com>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Reviewed-by: Jianhua Lu <lujianhua000@gmail.com>
Link: https://lore.kernel.org/r/2024... | ```diff
diff --git a/drivers/video/backlight/ktz8866.c b/drivers/video/backlight/ktz8866.c
index 2e508741c0af..351c2b4d63ed 100644
--- a/drivers/video/backlight/ktz8866.c
+++ b/drivers/video/backlight/ktz8866.c
@@ -190,6 +190,7 @@ static const struct of_device_id ktz8866_match_table[] = {
},
{},
};
+MODULE_DEVICE_... |
264db9d666ad9a35075cc9ed9ec09d021580fbb1 | Analyze and fix the following issue in the Linux kernel code: udf: fix uninit-value use in udf_get_fileshortad | Problem Details:
Check for overflow when computing alen in udf_current_aext to mitigate
later uninit-value use in udf_get_fileshortad KMSAN bug[1].
After applying the patch reproducer did not trigger any issue[2].
[1] https://syzkaller.appspot.com/bug?extid=8901c4560b7ab5c2f9df
[2] https://syzkaller.appspot.com/x/log.... | ```diff
diff --git a/fs/udf/inode.c b/fs/udf/inode.c
index 75c8cccfebd4..70c907fe8af9 100644
--- a/fs/udf/inode.c
+++ b/fs/udf/inode.c
@@ -2255,12 +2255,15 @@ int udf_current_aext(struct inode *inode, struct extent_position *epos,
alen = udf_file_entry_alloc_offset(inode) +
iinfo->i_lenAlloc;
} else {
+ s... |
c226964ec786f3797ed389a16392ce4357697d24 | Analyze and fix the following issue in the Linux kernel code: udf: refactor inode_bmap() to handle error | Problem Details:
Refactor inode_bmap() to handle error since udf_next_aext() can return
error now. On situations like ftruncate, udf_extend_file() can now
detect errors and bail out early without resorting to checking for
particular offsets and assuming internal behavior of these functions.
Reported-by: syzbot+7a4842f... | ```diff
diff --git a/fs/udf/directory.c b/fs/udf/directory.c
index c6950050e7ae..632453aa3893 100644
--- a/fs/udf/directory.c
+++ b/fs/udf/directory.c
@@ -246,6 +246,7 @@ int udf_fiiter_init(struct udf_fileident_iter *iter, struct inode *dir,
{
struct udf_inode_info *iinfo = UDF_I(dir);
int err = 0;
+ int8_t etype... |
55ed774d0130adaa4ef12aefeb8e0638011cbe43 | Analyze and fix the following issue in the Linux kernel code: firmware: xilinx: fix feature check logic for TF-A specific APIs | Problem Details:
Currently, Linux is passing only API ID for feature of TF-A specific
APIs but for feature check of TF-A specific APIs, TF-A is checking
for Module ID + API ID as a result incorrect version is received for
all TF-A specific APIs. So, fix feature check logic to pass valid
arguments to get correct version... | ```diff
diff --git a/drivers/firmware/xilinx/zynqmp.c b/drivers/firmware/xilinx/zynqmp.c
index 5022bd717054..cdb565c41119 100644
--- a/drivers/firmware/xilinx/zynqmp.c
+++ b/drivers/firmware/xilinx/zynqmp.c
@@ -225,11 +225,14 @@ static int __do_feature_check_call(const u32 api_id, u32 *ret_payload)
* Feature check o... |
e8415a8aecdb73cadfcfd1f1e1307d84413a5eb8 | Analyze and fix the following issue in the Linux kernel code: firmware: xilinx: add a warning print for unsupported feature | Problem Details:
As per the current code base, feature check API is used to check the
version in zynqmp_pm_pinctrl_set_config() before requesting the
firmware, and if the expected version is not found then it will
return an error. So now when the latest kernel tries to access the
tri-state functionality with older firm... | ```diff
diff --git a/drivers/firmware/xilinx/zynqmp.c b/drivers/firmware/xilinx/zynqmp.c
index c8be32d9c6af..920aba92feee 100644
--- a/drivers/firmware/xilinx/zynqmp.c
+++ b/drivers/firmware/xilinx/zynqmp.c
@@ -1118,8 +1118,11 @@ int zynqmp_pm_pinctrl_set_config(const u32 pin, const u32 param,
if (pm_family_code == Z... |
df5215618fbe425875336d3a2d31bd599ae8c401 | Analyze and fix the following issue in the Linux kernel code: ALSA: hda: fix trigger_tstamp_latched | Problem Details:
When the trigger_tstamp_latched flag is set, the PCM core code assumes that
the low-level driver handles the trigger timestamping itself. Ensure that
runtime->trigger_tstamp is always updated.
Buglink: https://github.com/alsa-project/alsa-lib/issues/387
Reported-by: Zeno Endemann <zeno.endemann@mailbo... | ```diff
diff --git a/include/sound/hdaudio.h b/include/sound/hdaudio.h
index 7e39d486374a..b098ceadbe74 100644
--- a/include/sound/hdaudio.h
+++ b/include/sound/hdaudio.h
@@ -590,7 +590,7 @@ void snd_hdac_stream_sync_trigger(struct hdac_stream *azx_dev, bool set,
void snd_hdac_stream_sync(struct hdac_stream *azx_dev, ... |
500580c7ae7bbd38c7641102059fa9308f35d26c | Analyze and fix the following issue in the Linux kernel code: pmdomain: qcom-cpr: Fix the return of uninitialized variable | Problem Details:
The of_property_read_u64() can fail and remain the variable uninitialized,
which will then be returned. Initializing the variable "rate" to zero to
fix this problem.
Fixes: 181c8148556a ("pmdomain: qcom-cpr: Use scope based of_node_put() to simplify code.")
Reported-by: Dan Carpenter <dan.carpenter@li... | ```diff
diff --git a/drivers/pmdomain/qcom/cpr.c b/drivers/pmdomain/qcom/cpr.c
index e1fca65b80be..26a60a101e42 100644
--- a/drivers/pmdomain/qcom/cpr.c
+++ b/drivers/pmdomain/qcom/cpr.c
@@ -1052,7 +1052,7 @@ static unsigned long cpr_get_opp_hz_for_req(struct dev_pm_opp *ref,
of_parse_phandle(child_np, "required-op... |
5a431e50e9d4189800be1607eef9deaf95959fc3 | Analyze and fix the following issue in the Linux kernel code: gpio: davinci: Fix condition for irqchip registration | Problem Details:
Since commit d29e741cad3f ("gpio: davinci: drop platform data support"),
irqchip is no longer being registered on platforms what don't use
unbanked gpios. Fix this.
Reported-by: Sabeeh Khan <sabeeh-khan@ti.com>
Fixes: d29e741cad3f ("gpio: davinci: drop platform data support")
Signed-off-by: Vignesh Ra... | ```diff
diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
index 790595f3b949..76b58c70b257 100644
--- a/drivers/gpio/gpio-davinci.c
+++ b/drivers/gpio/gpio-davinci.c
@@ -472,7 +472,7 @@ static int davinci_gpio_irq_setup(struct platform_device *pdev)
return PTR_ERR(clk);
}
- if (chips->gpio_u... |
d4ac164bde7a12ec0a238a7ead5aa26819bbb1c1 | Analyze and fix the following issue in the Linux kernel code: sched/eevdf: Fix wakeup-preempt by checking cfs_rq->nr_running | Problem Details:
Commit 85e511df3cec ("sched/eevdf: Allow shorter slices to wakeup-preempt")
introduced a mechanism that a wakee with shorter slice could preempt
the current running task. It also lower the bar for the current task
to be preempted, by checking the rq->nr_running instead of cfs_rq->nr_running
when the cu... | ```diff
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index b63a7ac31162..ab497fafa7be 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -1247,7 +1247,7 @@ static void update_curr(struct cfs_rq *cfs_rq)
account_cfs_rq_runtime(cfs_rq, delta_exec);
- if (rq->nr_running == 1)
+ if (cfs_rq->nr_ru... |
9b5ce1a37e904fac32d560668134965f4e937f6c | Analyze and fix the following issue in the Linux kernel code: sched: Fix sched_delayed vs cfs_bandwidth | Problem Details:
Meeting an unfinished DELAY_DEQUEUE treated entity in unthrottle_cfs_rq()
leads to a couple terminal scenarios. Finish it first, so ENQUEUE_WAKEUP
can proceed as it would have sans DELAY_DEQUEUE treatment.
Fixes: 152e11f6df29 ("sched/fair: Implement delayed dequeue")
Reported-by: Venkat Rao Bagalkote... | ```diff
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 225b31aaee55..b63a7ac31162 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -6058,10 +6058,13 @@ void unthrottle_cfs_rq(struct cfs_rq *cfs_rq)
for_each_sched_entity(se) {
struct cfs_rq *qcfs_rq = cfs_rq_of(se);
- if (se->on_rq) {
... |
ec1a37b3cd0cf9a1bf88816a5342fb06e3316b34 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: mt8183: Add port node to dpi node | Problem Details:
Add the port node to fix the binding schema check.
Fixes: 009d855a26fd ("arm64: dts: mt8183: add dpi node to mt8183")
Signed-off-by: Pin-yen Lin <treapking@chromium.org>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202409110843.Hm5W9upr-lkp@intel.com/
Li... | ```diff
diff --git a/arch/arm64/boot/dts/mediatek/mt8183.dtsi b/arch/arm64/boot/dts/mediatek/mt8183.dtsi
index 266441e999f2..0a6578aacf82 100644
--- a/arch/arm64/boot/dts/mediatek/mt8183.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8183.dtsi
@@ -1845,6 +1845,10 @@
<&mmsys CLK_MM_DPI_MM>,
<&apmixedsys CLK_APMIX... |
377548f05bd0905db52a1d50e5b328b9b4eb049d | Analyze and fix the following issue in the Linux kernel code: arm64: dts: mediatek: mt8183-kukui: Disable DPI display interface | Problem Details:
Commit 009d855a26fd ("arm64: dts: mt8183: add dpi node to mt8183") adds
a device-tree node for the DPI display interface that feeds the external
display pipeline, to enable HDMI support on the Pumpkin board.
However, the external display is not fully described on Chrome devices,
blocked by further wor... | ```diff
diff --git a/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi b/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi
index 22924f61ec9e..07ae3c8e897b 100644
--- a/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi
@@ -290,6 +290,11 @@
};
};
+&dpi0 {
+ /* TODO Re-ena... |
c14ab45f5d458073248ddc62d31045d5d616806f | Analyze and fix the following issue in the Linux kernel code: arm64: dts: mt8195: Fix dtbs_check error for infracfg_ao node | Problem Details:
The infracfg_ao node in mt8195.dtsi was causing a dtbs_check error.
The error message was:
syscon@10001000: compatible: ['mediatek,mt8195-infracfg_ao', 'syscon',
'simple-mfd'] is too long
To resolve this, remove 'simple-mfd' from the 'compatible' property of the
infracfg_ao node.
Fi... | ```diff
diff --git a/arch/arm64/boot/dts/mediatek/mt8195.dtsi b/arch/arm64/boot/dts/mediatek/mt8195.dtsi
index 3a2ba8aac66b..ade685ed2190 100644
--- a/arch/arm64/boot/dts/mediatek/mt8195.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8195.dtsi
@@ -487,7 +487,7 @@
};
infracfg_ao: syscon@10001000 {
- compatible = "m... |
0fc557b539a1e11bdc5053a308b12d84ea754786 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: mt8195: Fix dtbs_check error for mutex node | Problem Details:
The mutex node in mt8195.dtsi was triggering a dtbs_check error:
mutex@1c101000: 'clock-names', 'reg-names' do not match any of the
regexes: 'pinctrl-[0-9]+'
This seems no need by inspecting the DT schemas and other reference boards,
so drop 'clock-names' and 'reg-names' in mt8195.... | ```diff
diff --git a/arch/arm64/boot/dts/mediatek/mt8195.dtsi b/arch/arm64/boot/dts/mediatek/mt8195.dtsi
index e89ba384c4aa..3a2ba8aac66b 100644
--- a/arch/arm64/boot/dts/mediatek/mt8195.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8195.dtsi
@@ -3331,11 +3331,9 @@
mutex1: mutex@1c101000 {
compatible = "mediatek,mt8... |
752804acea010959bb3a00c65acdf78086a8474c | Analyze and fix the following issue in the Linux kernel code: arm64: dts: mediatek: mt8395-genio-1200-evk: Fix dtbs_check error for phy | Problem Details:
The ethernet-phy node in mt8395-genio-1200-evk.dts was triggering a
dtbs_check error. The error message was:
eth-phy0@1: $nodename:0: 'eth-phy0@1' does not match
'^ethernet-phy(@[a-f0-9]+)?$'
Fix this issue by replacing 'eth-phy' node to generic 'ethernet-phy'.
Fixes: f2b543a191b6 ("ar... | ```diff
diff --git a/arch/arm64/boot/dts/mediatek/mt8395-genio-1200-evk.dts b/arch/arm64/boot/dts/mediatek/mt8395-genio-1200-evk.dts
index 1ef6262b65c9..b4b48eb93f3c 100644
--- a/arch/arm64/boot/dts/mediatek/mt8395-genio-1200-evk.dts
+++ b/arch/arm64/boot/dts/mediatek/mt8395-genio-1200-evk.dts
@@ -187,7 +187,7 @@
co... |
c1134cbf001082925656c6ac4f38e8751d87b0f9 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: mediatek: mt8188: Update vppsys node names to syscon | Problem Details:
The MediaTek mmsys is more than just a clock controller; it's a
system controller. In addition to clock controls, it provides display
pipeline routing controls and other miscellaneous control registers.
On the MT8188 and MT8195 SoCs, the mmsys blocks utilize the same mmsys
driver but have been aliased... | ```diff
diff --git a/arch/arm64/boot/dts/mediatek/mt8188.dtsi b/arch/arm64/boot/dts/mediatek/mt8188.dtsi
index ba9c0ca91b04..b159f9b11fe6 100644
--- a/arch/arm64/boot/dts/mediatek/mt8188.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8188.dtsi
@@ -1779,8 +1779,8 @@
#clock-cells = <1>;
};
- vppsys0: clock-controlle... |
4007651c25553b10dbc6e7bff6b7abd2863c1702 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: mediatek: mt8188: Fix wrong clock provider in MFG1 power domain | Problem Details:
The clock index "CLK_APMIXED_MFGPLL" belongs to the "apmixedsys" provider,
so fix the index.
In addition, add a "mfg1" label so following commits could set
domain-supply for MFG1 power domain.
Fixes: eaf73e4224a3 ("arm64: dts: mediatek: mt8188: Add support for SoC power domains")
Signed-off-by: Pablo... | ```diff
diff --git a/arch/arm64/boot/dts/mediatek/mt8188.dtsi b/arch/arm64/boot/dts/mediatek/mt8188.dtsi
index cd27966d2e3c..02a5bb4dbd1f 100644
--- a/arch/arm64/boot/dts/mediatek/mt8188.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8188.dtsi
@@ -956,9 +956,9 @@
#size-cells = <0>;
#power-domain-cells = <1>;
-... |
6a797bdfde77041a0a9711082d7919162d1d7061 | Analyze and fix the following issue in the Linux kernel code: drm/panthor: add sysfs knob for enabling job profiling | Problem Details:
This commit introduces a DRM device sysfs attribute that lets UM control
the job accounting status in the device. The knob variable had been brought
in as part of a previous commit, but now we're able to fix it manually.
As sysfs files are part of a driver's uAPI, describe its legitimate input
values ... | ```diff
diff --git a/Documentation/ABI/testing/sysfs-driver-panthor-profiling b/Documentation/ABI/testing/sysfs-driver-panthor-profiling
new file mode 100644
index 000000000000..af05fccedc15
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-driver-panthor-profiling
@@ -0,0 +1,10 @@
+What: /sys/bus/platform/drivers/p... |
de7e071ad5e46515e2d930862820c65fa53dbe2a | Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: Add Powkiddy RGB20SX | Problem Details:
The Powkiddy RGB20SX is a portable game console extremely similar to
the existing RGB30 console. The key differences from the RGB30 are
as follows:
- Realtek RTW8723DS WiFi and Bluetooth.
- UART pads for debug console (UART2).
- A function button (ADC channel 0).
- A much larger battery (5000 mAh)... | ```diff
diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
index 423cc6866a43..d9e66bb1c771 100644
--- a/arch/arm64/boot/dts/rockchip/Makefile
+++ b/arch/arm64/boot/dts/rockchip/Makefile
@@ -91,6 +91,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-pinenote-v1.2.dtb
dtb-$(CONFIG_ARCH_... |
badf752b5e4b17d281f93f409d4718388ff912e6 | Analyze and fix the following issue in the Linux kernel code: microblaze: Export xmb_manager functions | Problem Details:
When TMR_MANAGER is enabled as module there is a need to export functions
which are present in architecture code.
It has been found by running:
make W=1 C=1 allmodconfig
sed -i -e 's/WERROR=y/WERROR=n/g' .config
make C=1 W=1
which errors out like this:
ERROR: modpost: "xmb_manager_register" [drivers/... | ```diff
diff --git a/arch/microblaze/kernel/microblaze_ksyms.c b/arch/microblaze/kernel/microblaze_ksyms.c
index c892e173ec99..a8553f54152b 100644
--- a/arch/microblaze/kernel/microblaze_ksyms.c
+++ b/arch/microblaze/kernel/microblaze_ksyms.c
@@ -16,6 +16,7 @@
#include <asm/page.h>
#include <linux/ftrace.h>
#include... |
848f2bbb363d4cdb4202db328a103fd3c34e21a2 | Analyze and fix the following issue in the Linux kernel code: firmware: xilinx: Add missing debug firmware interfaces | Problem Details:
Add missing PM EEMI APIs interface in debug firmware driver.
The debugfs firmware driver interface is intended for testing and
debugging the EEMI APIs only. This interface does not contain any
checking regarding improper usage, and the number, type and valid
ranges of the arguments. This interface mus... | ```diff
diff --git a/drivers/firmware/xilinx/zynqmp-debug.c b/drivers/firmware/xilinx/zynqmp-debug.c
index 8528850af889..22853ae0efdf 100644
--- a/drivers/firmware/xilinx/zynqmp-debug.c
+++ b/drivers/firmware/xilinx/zynqmp-debug.c
@@ -31,12 +31,50 @@ static char debugfs_buf[PAGE_SIZE];
#define PM_API(id) {id, #id,... |
44ed4f90a97ff6f339e50ac01db71544e0990efc | Analyze and fix the following issue in the Linux kernel code: drivers: soc: xilinx: add the missing kfree in xlnx_add_cb_for_suspend() | Problem Details:
If we fail to allocate memory for cb_data by kmalloc, the memory
allocation for eve_data is never freed, add the missing kfree()
in the error handling path.
Fixes: 05e5ba40ea7a ("driver: soc: xilinx: Add support of multiple callbacks for same event in event management driver")
Signed-off-by: Gaosheng ... | ```diff
diff --git a/drivers/soc/xilinx/xlnx_event_manager.c b/drivers/soc/xilinx/xlnx_event_manager.c
index f529e1346247..85df6b9c04ee 100644
--- a/drivers/soc/xilinx/xlnx_event_manager.c
+++ b/drivers/soc/xilinx/xlnx_event_manager.c
@@ -188,8 +188,10 @@ static int xlnx_add_cb_for_suspend(event_cb_func_t cb_fun, void ... |
984ed20ece1c6c20789ece040cbff3eb1a388fa9 | Analyze and fix the following issue in the Linux kernel code: kconfig: qconf: fix buffer overflow in debug links | Problem Details:
If you enable "Option -> Show Debug Info" and click a link, the program
terminates with the following error:
*** buffer overflow detected ***: terminated
The buffer overflow is caused by the following line:
strcat(data, "$");
The buffer needs one more byte to accommodate the additional char... | ```diff
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 7dba8014ead4..e260cab1c2af 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -1166,7 +1166,7 @@ void ConfigInfoView::clicked(const QUrl &url)
{
QByteArray str = url.toEncoded();
const std::size_t count = str.size()... |
d75dba49744478c32f6ce1c16b5f391c2d5cef5f | Analyze and fix the following issue in the Linux kernel code: ALSA: hda/realtek: Add a quirk for HP Pavilion 15z-ec200 | Problem Details:
Add the quirk for HP Pavilion Gaming laptop 15z-ec200 for
enabling the mute led. The fix apply the ALC285_FIXUP_HP_MUTE_LED
quirk for this model.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=219303
Signed-off-by: Abhishek Tamboli <abhishektamboli9@gmail.com>
Cc: <stable@vger.kernel.org>
Link: htt... | ```diff
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index eb45a41533dc..5e2e927656cd 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -10348,6 +10348,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x8896, "HP EliteBoo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.