id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
d9f59178011265344a4864757cf21523668a2a75 | Analyze and fix the following issue in the Linux kernel code: s390/vmur: Use scnprintf() instead of sprintf() | Problem Details:
Use scnprintf() instead of sprintf() for those cases where the destination
is an array and the size of the array is known at compile time.
This prevents theoretical buffer overflows, but also avoids that people
again and again spend time to figure out if the code is actually safe.
Reviewed-by: Jan Po... | ```diff
diff --git a/drivers/s390/char/vmur.c b/drivers/s390/char/vmur.c
index e3e0e9f36527..a226ff208eda 100644
--- a/drivers/s390/char/vmur.c
+++ b/drivers/s390/char/vmur.c
@@ -154,7 +154,7 @@ static struct urdev *urdev_get_from_devno(u16 devno)
struct ccw_device *cdev;
struct urdev *urd;
- sprintf(bus_id, "0.0... |
c06c303832ecd5edef90c6817a6eb0eb7fed7a64 | Analyze and fix the following issue in the Linux kernel code: ocfs2: fix xattr array entry __counted_by error | Problem Details:
Commit 2f26f58df041 ("ocfs2: annotate flexible array members with
__counted_by_le()") started annotating the flexible arrays used by
ocfs2, and now gcc complains about ocfs2_reflink_xattr_header():
In function ‘fortify_memset_chk’,
inlined from ‘ocfs2_reflink_xattr_header’ at fs/ocfs2/xattr.c:... | ```diff
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
index 73c028f452ac..dc1761e84814 100644
--- a/fs/ocfs2/xattr.c
+++ b/fs/ocfs2/xattr.c
@@ -6351,7 +6351,7 @@ static int ocfs2_reflink_xattr_header(handle_t *handle,
trace_ocfs2_reflink_xattr_header((unsigned long long)old_bh->b_blocknr,
le16_to_cpu(xh->xh... |
5e5ea7f61610239fca058011e7d4f342b34d1558 | Analyze and fix the following issue in the Linux kernel code: iommu/amd: fix SEV-TIO support reporting | Problem Details:
Commit eeb934137deb ("iommu/amd: Report SEV-TIO support") was confused
about the config options that expose amd_iommu_sev_tio_supported(), and
made the declaration (and alternative dummy function) conditional on the
CONFIG_AMD_IOMMU config option.
But the code is actually dependent on CONFIG_KVM_AMD_S... | ```diff
diff --git a/include/linux/amd-iommu.h b/include/linux/amd-iommu.h
index 0f64f09d1f34..edcee9f5335a 100644
--- a/include/linux/amd-iommu.h
+++ b/include/linux/amd-iommu.h
@@ -18,12 +18,10 @@ struct task_struct;
struct pci_dev;
extern void amd_iommu_detect(void);
-extern bool amd_iommu_sev_tio_supported(void... |
dd44d4d0c55a4ecf5eabf7856f96ed47e0684780 | Analyze and fix the following issue in the Linux kernel code: gpio: tb10x: fix OF_GPIO dependency | Problem Details:
Selecting OF_GPIO is generally not allowed, it always gets enabled
when both GPIOLIB and OF are turned on.
The tb10x driver now warns about this after it was enabled for
compile-testing:
WARNING: unmet direct dependencies detected for OF_GPIO
Depends on [n]: GPIOLIB [=y] && OF [=n] && HAS_IOMEM [=y... | ```diff
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index 0fed90ef587a..bd185482a7fd 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -737,7 +737,6 @@ config GPIO_TB10X
depends on ARC_PLAT_TB10X || COMPILE_TEST
select GPIO_GENERIC
select GENERIC_IRQ_CHIP
- select OF_GPIO
config GPIO... |
c2ae8b0df2d1bb7a063f9e356e4e9a06cd4afe11 | Analyze and fix the following issue in the Linux kernel code: sched/core: Fix psi_dequeue() for Proxy Execution | Problem Details:
Currently, if the sleep flag is set, psi_dequeue() doesn't
change any of the psi_flags.
This is because psi_task_switch() will clear TSK_ONCPU as well
as other potential flags (TSK_RUNNING), and the assumption is
that a voluntary sleep always consists of a task being dequeued
followed shortly there af... | ```diff
diff --git a/kernel/sched/stats.h b/kernel/sched/stats.h
index cbf7206b3f9d..c903f1a42891 100644
--- a/kernel/sched/stats.h
+++ b/kernel/sched/stats.h
@@ -180,8 +180,13 @@ static inline void psi_dequeue(struct task_struct *p, int flags)
* avoid walking all ancestors twice, psi_task_switch() handles
* TSK_... |
ca125231dd29fc0678dd3622e9cdea80a51dffe4 | Analyze and fix the following issue in the Linux kernel code: sched/fair: Fix unfairness caused by stalled tg_load_avg_contrib when the last task migrates out | Problem Details:
When a task is migrated out, there is a probability that the tg->load_avg
value will become abnormal. The reason is as follows:
1. Due to the 1ms update period limitation in update_tg_load_avg(), there
is a possibility that the reduced load_avg is not updated to tg->load_avg
when a task migrates... | ```diff
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 769d7b7990df..da46c3164537 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -4034,6 +4034,9 @@ static inline bool cfs_rq_is_decayed(struct cfs_rq *cfs_rq)
if (child_cfs_rq_on_list(cfs_rq))
return false;
+ if (cfs_rq->tg_load_avg_co... |
e38e5299747b23015b00b0109891815db44a2f30 | Analyze and fix the following issue in the Linux kernel code: sched/hrtick: Fix hrtick() vs. scheduling context | Problem Details:
The sched_class::task_tick() method is called on the donor
sched_class, and sched_tick() hands it rq->donor as argument,
which is consistent.
However, while hrtick() uses the donor sched_class, it then passes
rq->curr, which is inconsistent. Fix it.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infra... | ```diff
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index fc358c1b6ca9..1711e9e50100 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -878,7 +878,7 @@ static enum hrtimer_restart hrtick(struct hrtimer *timer)
rq_lock(rq, &rf);
update_rq_clock(rq);
- rq->donor->sched_class->task_tick(rq, rq... |
dde3763365d80398d1465214458d0c38cc32de9c | Analyze and fix the following issue in the Linux kernel code: sched/headers: Remove whitespace noise from kernel/sched/sched.h | Problem Details:
A single case of space-Tab noise snuck in recently.
Fixes: 36569780b0d6 ("sched: Change nr_uninterruptible type to unsigned long")
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://patch.msgid.link/176478595428.498.13816176784792752599.tip-bot2@tip-bot2 | ```diff
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 8590113e4a60..cb80666addec 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -1165,7 +1165,7 @@ struct rq {
* one CPU and if it got migrated afterwards it may decrease
* it on another CPU. Always updated under the runqueue lock:
... |
90dfeef1cd38dff19f8b3a752d13bfd79f0f7694 | Analyze and fix the following issue in the Linux kernel code: seqlock: Cure some more scoped_seqlock() optimization fails | Problem Details:
Arnd reported an x86 randconfig using gcc-15 tripped over
__scoped_seqlock_bug(). Turns out GCC chose not to inline the
scoped_seqlock helper functions and as such was not able to optimize
properly.
[ mingo: Clang fails the build too in some circumstances. ]
Reported-by: Arnd Bergmann <arnd@arndb.de>... | ```diff
diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h
index a8a8661839b6..221123660e71 100644
--- a/include/linux/seqlock.h
+++ b/include/linux/seqlock.h
@@ -1224,7 +1224,7 @@ struct ss_tmp {
spinlock_t *lock_irqsave;
};
-static inline void __scoped_seqlock_cleanup(struct ss_tmp *sst)
+static __al... |
a258a3cb1895e3acf5f2fe245d17426e894bc935 | Analyze and fix the following issue in the Linux kernel code: LoongArch: Use unsigned long for _end and _text | Problem Details:
It is better to use unsigned long rather than long for _end and _text to
calculate the kernel length.
Cc: stable@vger.kernel.org # v6.3+
Fixes: e5f02b51fa0c ("LoongArch: Add support for kernel address space layout randomization (KASLR)")
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-b... | ```diff
diff --git a/arch/loongarch/kernel/relocate.c b/arch/loongarch/kernel/relocate.c
index b5e2312a2fca..76abbb8d2931 100644
--- a/arch/loongarch/kernel/relocate.c
+++ b/arch/loongarch/kernel/relocate.c
@@ -183,7 +183,7 @@ static inline void __init *determine_relocation_address(void)
if (kaslr_disabled())
retu... |
4a71df151e703b5e7e85b33369cee59ef2665e61 | Analyze and fix the following issue in the Linux kernel code: LoongArch: Use __pmd()/__pte() for swap entry conversions | Problem Details:
The __pmd() and __pte() helper macros provide the correct initialization
syntax and abstraction for the pmd_t and pte_t types.
Use __pmd() to fix follow warning about __swp_entry_to_pmd() with gcc-15
under specific configs [1] :
In file included from ./include/linux/pgtable.h:6,
... | ```diff
diff --git a/arch/loongarch/include/asm/pgtable.h b/arch/loongarch/include/asm/pgtable.h
index 03fb60432fde..9a7029285fd5 100644
--- a/arch/loongarch/include/asm/pgtable.h
+++ b/arch/loongarch/include/asm/pgtable.h
@@ -297,9 +297,9 @@ static inline pte_t mk_swap_pte(unsigned long type, unsigned long offset)
#d... |
a91b446e359aa96cc2655318789fd37441337415 | Analyze and fix the following issue in the Linux kernel code: LoongArch: Fix arch_dup_task_struct() for CONFIG_RANDSTRUCT | Problem Details:
Now the optimized version of arch_dup_task_struct() for LoongArch
assumes 'thread' is the last member of 'task_struct'. But this is
not true if CONFIG_RANDSTRUCT is enabled after Linux-6.16.
So fix the arch_dup_task_struct() function for CONFIG_RANDSTRUCT by
copying the whole 'task_struct'.
Cc: stabl... | ```diff
diff --git a/arch/loongarch/kernel/process.c b/arch/loongarch/kernel/process.c
index efd9edf65603..d1e04f9e0f79 100644
--- a/arch/loongarch/kernel/process.c
+++ b/arch/loongarch/kernel/process.c
@@ -130,6 +130,11 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
preempt_enable();... |
3c250aecef62da81deb38ac6738ac0a88d91f1fc | Analyze and fix the following issue in the Linux kernel code: LoongArch: Fix build errors for CONFIG_RANDSTRUCT | Problem Details:
When CONFIG_RANDSTRUCT enabled, members of task_struct are randomized.
There is a chance that TASK_STACK_CANARY be out of 12bit immediate's
range and causes build errors. TASK_STACK_CANARY is naturally aligned,
so fix it by replacing ld.d/st.d with ldptr.d/stptr.d which have 14bit
immediates.
Cc: stab... | ```diff
diff --git a/arch/loongarch/kernel/switch.S b/arch/loongarch/kernel/switch.S
index 9c23cb7e432f..3007e909e0d8 100644
--- a/arch/loongarch/kernel/switch.S
+++ b/arch/loongarch/kernel/switch.S
@@ -25,8 +25,8 @@ SYM_FUNC_START(__switch_to)
stptr.d a4, a0, THREAD_SCHED_CFA
#if defined(CONFIG_STACKPROTECTOR) && !... |
3af870aedbff10bfed220e280b57a405e972229f | Analyze and fix the following issue in the Linux kernel code: nfs/localio: fix regression due to out-of-order __put_cred | Problem Details:
Commit f2060bdc21d7 ("nfs/localio: add refcounting for each iocb IO
associated with NFS pgio header") inadvertantly reintroduced the same
potential for __put_cred() triggering BUG_ON(cred == current->cred) that
commit 992203a1fba5 ("nfs/localio: restore creds before releasing pageio
data") fixed.
Fix ... | ```diff
diff --git a/fs/nfs/localio.c b/fs/nfs/localio.c
index 49ed90c6b9f2..f33bfa7b58e6 100644
--- a/fs/nfs/localio.c
+++ b/fs/nfs/localio.c
@@ -615,8 +615,11 @@ static void nfs_local_read_aio_complete(struct kiocb *kiocb, long ret)
nfs_local_pgio_aio_complete(iocb); /* Calls nfs_local_read_aio_complete_work */
}
... |
bd3b04b46c7a9940989ff4b29376e899e93d3a4a | Analyze and fix the following issue in the Linux kernel code: NFSv4: Handle NFS4ERR_NOTSUPP errors for directory delegations | Problem Details:
The error NFS4ERR_NOTSUPP will be returned for operations that are
legal, but not supported by the server.
Fixes: 156b09482933 ("NFS: Request a directory delegation on ACCESS, CREATE, and UNLINK")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> | ```diff
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index c53ddb185aa3..ec1ce593dea2 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -4533,12 +4533,17 @@ static int _nfs4_proc_getattr(struct nfs_server *server, struct nfs_fh *fhandle,
status = nfs4_do_call_sync(server->client, server, &msg,
&... |
0b873de2c02f9cc655bef6bee0eb9e404126ed6c | Analyze and fix the following issue in the Linux kernel code: nfs/localio: remove 61 byte hole from needless ____cacheline_aligned | Problem Details:
struct nfs_local_kiocb used ____cacheline_aligned on its iters[] array
and as the structure evolved it caused a 61 byte hole to form. Fix
this by removing ____cacheline_aligned and reordering iters[] before
iter_is_dio_aligned[].
Fixes: 6a218b9c3183 ("nfs/localio: do not issue misaligned DIO out-of-o... | ```diff
diff --git a/fs/nfs/localio.c b/fs/nfs/localio.c
index 512d9c5ff608..b98bb292fef0 100644
--- a/fs/nfs/localio.c
+++ b/fs/nfs/localio.c
@@ -43,8 +43,8 @@ struct nfs_local_kiocb {
size_t end_len;
short int end_iter_index;
atomic_t n_iters;
+ struct iov_iter iters[NFSLOCAL_MAX_IOS];
boo... |
f50d0328d02fe38ba196a73c143e5d87e341d4f7 | Analyze and fix the following issue in the Linux kernel code: nfs/localio: remove alignment size checking in nfs_is_local_dio_possible | Problem Details:
This check to ensure dio_offset_align isn't larger than PAGE_SIZE is
no longer relevant (older iterations of NFS Direct was allocating
misaligned head and tail pages but no longer does, so this check isn't
needed).
Fixes: c817248fc831 ("nfs/localio: add proper O_DIRECT support for READ and WRITE")
Sig... | ```diff
diff --git a/fs/nfs/localio.c b/fs/nfs/localio.c
index 656976b4f42c..512d9c5ff608 100644
--- a/fs/nfs/localio.c
+++ b/fs/nfs/localio.c
@@ -339,8 +339,6 @@ nfs_is_local_dio_possible(struct nfs_local_kiocb *iocb, int rw,
if (unlikely(!nf_dio_mem_align || !nf_dio_offset_align))
return false;
- if (unlikely(... |
04fd12df4e05dd6fd3017b637f6fbc9da10b4e65 | Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Test ambiguous associated struct_ops | Problem Details:
Add a test to make sure implicit struct_ops association does not
break backward compatibility nor return incorrect struct_ops.
struct_ops programs should still be allowed to be reused in
different struct_ops map. The associated struct_ops map set implicitly
however will be poisoned. Trying to read it t... | ```diff
diff --git a/tools/testing/selftests/bpf/prog_tests/test_struct_ops_assoc.c b/tools/testing/selftests/bpf/prog_tests/test_struct_ops_assoc.c
index 1e24a4915524..02173504f675 100644
--- a/tools/testing/selftests/bpf/prog_tests/test_struct_ops_assoc.c
+++ b/tools/testing/selftests/bpf/prog_tests/test_struct_ops_a... |
87c9e88ac4a16a7aba99862c41b33d7eeb75d375 | Analyze and fix the following issue in the Linux kernel code: ovl: pass original credentials, not mounter credentials during create | Problem Details:
When creating new files the security layer expects the original
credentials to be passed. When cleaning up the code this was accidently
changed to pass the mounter's credentials by relying on current->cred
which is already overriden at this point. Pass the original credentials
directly.
Reported-by:... | ```diff
diff --git a/fs/overlayfs/dir.c b/fs/overlayfs/dir.c
index 06b860b9ded6..ff3dbd1ca61f 100644
--- a/fs/overlayfs/dir.c
+++ b/fs/overlayfs/dir.c
@@ -581,7 +581,8 @@ out_cleanup_unlocked:
goto out_dput;
}
-static const struct cred *ovl_override_creator_creds(struct dentry *dentry, struct inode *inode, umode_t... |
81f88f6ab674973d361b6d176aa4d3ebd32253ab | Analyze and fix the following issue in the Linux kernel code: libbpf: Add debug messaging in dedup equivalence/identity matching | Problem Details:
We have seen a number of issues like [1]; failures to deduplicate
key kernel data structures like task_struct. These are often hard
to debug from pahole even with verbose output, especially when
identity/equivalence checks fail deep in a nested struct comparison.
Here we add debug messages of the for... | ```diff
diff --git a/tools/lib/bpf/btf.c b/tools/lib/bpf/btf.c
index 84a4b0abc8be..b136572e889a 100644
--- a/tools/lib/bpf/btf.c
+++ b/tools/lib/bpf/btf.c
@@ -4431,11 +4431,14 @@ static bool btf_dedup_identical_types(struct btf_dedup *d, __u32 id1, __u32 id2,
struct btf_type *t1, *t2;
int k1, k2;
recur:
- if (dept... |
abceb4297bf88340ce06016895babe292510a262 | Analyze and fix the following issue in the Linux kernel code: mshv: Fix huge page handling in memory region traversal | Problem Details:
The previous code assumed that if a region's first page was huge, the
entire region consisted of huge pages and stored this in a large_pages
flag. This premise is incorrect not only for movable regions (where
pages can be split and merged on invalidate callbacks or page faults),
but even for pinned reg... | ```diff
diff --git a/drivers/hv/mshv_regions.c b/drivers/hv/mshv_regions.c
index 35b866670840..40126c12ab33 100644
--- a/drivers/hv/mshv_regions.c
+++ b/drivers/hv/mshv_regions.c
@@ -14,6 +14,124 @@
#include "mshv_root.h"
+/**
+ * mshv_region_process_chunk - Processes a contiguous chunk of memory pages
+ * ... |
b5110eaf67530091343b519d8abd0cddd14660f2 | Analyze and fix the following issue in the Linux kernel code: Drivers: hv: use kmalloc_array() instead of kmalloc() | Problem Details:
Replace kmalloc() with kmalloc_array() to prevent potential
overflow, as recommended in Documentation/process/deprecated.rst.
Signed-off-by: Gongwei Li <ligongwei@kylinos.cn>
Signed-off-by: Wei Liu <wei.liu@kernel.org> | ```diff
diff --git a/drivers/hv/hv_util.c b/drivers/hv/hv_util.c
index 36ee89c0358b..7e9c8e169c66 100644
--- a/drivers/hv/hv_util.c
+++ b/drivers/hv/hv_util.c
@@ -586,7 +586,7 @@ static int util_probe(struct hv_device *dev,
(struct hv_util_service *)dev_id->driver_data;
int ret;
- srv->recv_buffer = kmalloc(HV_H... |
4ae4dde6f34a4124c65468ae4fa1f915fb40f900 | Analyze and fix the following issue in the Linux kernel code: cifs: Fix handling of a beyond-EOF DIO/unbuffered read over SMB2 | Problem Details:
If a DIO read or an unbuffered read request extends beyond the EOF, the
server will return a short read and a status code indicating that EOF was
hit, which gets translated to -ENODATA. Note that the client does not cap
the request at i_size, but asks for the amount requested in case there's a
race on... | ```diff
diff --git a/fs/smb/client/smb2pdu.c b/fs/smb/client/smb2pdu.c
index e8b423a28e18..dec9968ffb48 100644
--- a/fs/smb/client/smb2pdu.c
+++ b/fs/smb/client/smb2pdu.c
@@ -4695,7 +4695,7 @@ do_retry:
} else {
size_t trans = rdata->subreq.transferred + rdata->got_bytes;
if (trans < rdata->subreq.len &&
- ... |
32a60868093aed5ccaa5e57f3b57f791f22ac133 | Analyze and fix the following issue in the Linux kernel code: cifs: Do some preparation prior to organising the function declarations | Problem Details:
Make some preparatory cleanups prior to running a script to organise the
function declarations within the fs/smb/client/ headers. These include:
(1) Remove "inline" from the dummy cifs_proc_init/clean() functions as
they are in a .c file.
(2) Move should_compress()'s kdoc comment to the .c fi... | ```diff
diff --git a/fs/smb/client/cifs_debug.c b/fs/smb/client/cifs_debug.c
index 881d3a88d683..2cb234d4bd2f 100644
--- a/fs/smb/client/cifs_debug.c
+++ b/fs/smb/client/cifs_debug.c
@@ -1318,11 +1318,11 @@ static const struct proc_ops cifs_mount_params_proc_ops = {
};
#else
-inline void cifs_proc_init(void)
+void ... |
6a86a4cc281a5cfceda7af60ea6fa506b3db7430 | Analyze and fix the following issue in the Linux kernel code: cifs: Fix specification of function pointers | Problem Details:
Change the mid_receive_t, mid_callback_t and mid_handle_t function pointers
to have the pointer marker in the typedef.
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Paulo Alcantara (Red Hat) <pc@manguebit.org>
cc: linux-cifs@vger.kernel.org
Signed-off-by: Steve French <stfrench@micro... | ```diff
diff --git a/fs/smb/client/cifsglob.h b/fs/smb/client/cifsglob.h
index 1bfaf9b71f07..18ac91d0982d 100644
--- a/fs/smb/client/cifsglob.h
+++ b/fs/smb/client/cifsglob.h
@@ -1660,7 +1660,7 @@ static inline void cifs_stats_bytes_read(struct cifs_tcon *tcon,
* Returns zero on a successful receive, or an error. The... |
9d85ac939d52e93d80efb01a299c6f0bedb30487 | Analyze and fix the following issue in the Linux kernel code: cifs: Fix handling of a beyond-EOF DIO/unbuffered read over SMB1 | Problem Details:
If a DIO read or an unbuffered read request extends beyond the EOF, the
server will return a short read and a status code indicating that EOF was
hit, which gets translated to -ENODATA. Note that the client does not cap
the request at i_size, but asks for the amount requested in case there's a
race on... | ```diff
diff --git a/fs/smb/client/cifssmb.c b/fs/smb/client/cifssmb.c
index 428e582e0414..32aea71deab2 100644
--- a/fs/smb/client/cifssmb.c
+++ b/fs/smb/client/cifssmb.c
@@ -1374,7 +1374,7 @@ do_retry:
} else {
size_t trans = rdata->subreq.transferred + rdata->got_bytes;
if (trans < rdata->subreq.len &&
- ... |
c5108c58b991cb6cac78947ac3811321895190e2 | Analyze and fix the following issue in the Linux kernel code: tracing: Fix typo in trace_seq.c | Problem Details:
Fix typo "wont" to "won't".
Link: https://patch.msgid.link/20251121221835.28032-15-mhi@mailbox.org
Signed-off-by: Maurice Hieronymus <mhi@mailbox.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> | ```diff
diff --git a/kernel/trace/trace_seq.c b/kernel/trace/trace_seq.c
index c158d65a8a88..32684ef4fb9d 100644
--- a/kernel/trace/trace_seq.c
+++ b/kernel/trace/trace_seq.c
@@ -15,7 +15,7 @@
*
* A write to the buffer will either succeed or fail. That is, unlike
* sprintf() there will not be a partial write (we... |
0f17df72a7149b65e51e03d4ab7b2fd6d5cab0dc | Analyze and fix the following issue in the Linux kernel code: tracing: Fix typo in trace_probe.c | Problem Details:
Fix typo "separater" to "separator".
Link: https://patch.msgid.link/20251121221835.28032-14-mhi@mailbox.org
Signed-off-by: Maurice Hieronymus <mhi@mailbox.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> | ```diff
diff --git a/kernel/trace/trace_probe.c b/kernel/trace/trace_probe.c
index 5cbdc423afeb..abf7cf2b6b65 100644
--- a/kernel/trace/trace_probe.c
+++ b/kernel/trace/trace_probe.c
@@ -516,7 +516,7 @@ static void clear_btf_context(struct traceprobe_parse_context *ctx)
}
}
-/* Return 1 if the field separater is a... |
fa3f733d97e5482a63e8d55b86810d67999d9f07 | Analyze and fix the following issue in the Linux kernel code: tracing: Fix multiple typos in trace_osnoise.c | Problem Details:
Fix multiple typos in comments:
"Anotate" -> "Annotate"
"infor" -> "info"
"timestemp" -> "timestamp"
"tread" -> "thread"
"varaibles" -> "variables"
"wast" -> "waste"
Link: https://patch.msgid.link/20251121221835.28032-13-mhi@mailbox.org
Signed-off-by: Maurice Hieronymus <mhi@mailbox.org>
Signed-off-by... | ```diff
diff --git a/kernel/trace/trace_osnoise.c b/kernel/trace/trace_osnoise.c
index a9962d4497e8..827104d00bc0 100644
--- a/kernel/trace/trace_osnoise.c
+++ b/kernel/trace/trace_osnoise.c
@@ -329,7 +329,7 @@ static struct osnoise_data {
u64 print_stack; /* print IRQ stack if total > */
int timerlat_tracer; /* t... |
6ce5725d73734434ca91bd6d9f24524248584c27 | Analyze and fix the following issue in the Linux kernel code: tracing: Fix multiple typos in trace_events_user.c | Problem Details:
Fix multiple typos in comments:
"ambigious" -> "ambiguous"
"explictly" -> "explicitly"
"Uknown" -> "Unknown"
Link: https://patch.msgid.link/20251121221835.28032-12-mhi@mailbox.org
Signed-off-by: Maurice Hieronymus <mhi@mailbox.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> | ```diff
diff --git a/kernel/trace/trace_events_user.c b/kernel/trace/trace_events_user.c
index b15854c75d4f..dca6e50b3b21 100644
--- a/kernel/trace/trace_events_user.c
+++ b/kernel/trace/trace_events_user.c
@@ -1041,7 +1041,7 @@ static int user_field_array_size(const char *type)
static int user_field_size(const char... |
0166d3e31aaf831145520bd8c6f16f6ff5ddb1e6 | Analyze and fix the following issue in the Linux kernel code: tracing: Fix typo in trace_events_trigger.c | Problem Details:
Fix typo "componenents" to "components".
Link: https://patch.msgid.link/20251121221835.28032-11-mhi@mailbox.org
Signed-off-by: Maurice Hieronymus <mhi@mailbox.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> | ```diff
diff --git a/kernel/trace/trace_events_trigger.c b/kernel/trace/trace_events_trigger.c
index 96aad82b1628..06b75bcfc7b8 100644
--- a/kernel/trace/trace_events_trigger.c
+++ b/kernel/trace/trace_events_trigger.c
@@ -732,7 +732,7 @@ static void unregister_trigger(char *glob,
* param - text followi... |
c29e75532e98d78cc557038017247643286c4e86 | Analyze and fix the following issue in the Linux kernel code: tracing: Fix typo in trace_events_hist.c | Problem Details:
Fix typo "tigger" to "trigger".
Link: https://patch.msgid.link/20251121221835.28032-10-mhi@mailbox.org
Signed-off-by: Maurice Hieronymus <mhi@mailbox.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> | ```diff
diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c
index 289bdea98776..5e6e70540eef 100644
--- a/kernel/trace/trace_events_hist.c
+++ b/kernel/trace/trace_events_hist.c
@@ -5283,7 +5283,7 @@ hist_trigger_actions(struct hist_trigger_data *hist_data,
* on the stack, so when the his... |
86f320904e2f8795e3f1851f18ad7bf3f43d1c79 | Analyze and fix the following issue in the Linux kernel code: tracing: Fix typo in trace_events_filter.c | Problem Details:
Fix typo "singe" to "single".
Link: https://patch.msgid.link/20251121221835.28032-9-mhi@mailbox.org
Signed-off-by: Maurice Hieronymus <mhi@mailbox.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> | ```diff
diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c
index 54226b48b2d1..385af8405392 100644
--- a/kernel/trace/trace_events_filter.c
+++ b/kernel/trace/trace_events_filter.c
@@ -142,7 +142,7 @@ static bool is_not(const char *str)
}
/**
- * struct prog_entry - a singe entry i... |
d4290963d5af2f10810a8887c1037f6d70e5a9bd | Analyze and fix the following issue in the Linux kernel code: tracing: Fix multiple typos in trace_events.c | Problem Details:
Fix multiple typos in comments:
"appened" -> "appended"
"paranthesis" -> "parenthesis"
"parethesis" -> "parenthesis"
"wont" -> "won't"
Link: https://patch.msgid.link/20251121221835.28032-8-mhi@mailbox.org
Signed-off-by: Maurice Hieronymus <mhi@mailbox.org>
Signed-off-by: Steven Rostedt (Google) <roste... | ```diff
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index 9b07ad9eb284..b16a5a158040 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -360,7 +360,7 @@ static bool process_string(const char *fmt, int len, struct trace_event_call *ca
/* Anything else, this isn't... |
8d4cdbd45cd4c1671359cc408f900d51c7e1d107 | Analyze and fix the following issue in the Linux kernel code: tracing: Fix multiple typos in trace.c | Problem Details:
Fix multiple typos in comments:
"alse" -> "also"
"enabed" -> "enabled"
"instane" -> "instance"
"outputing" -> "outputting"
"seperated" -> "separated"
Link: https://patch.msgid.link/20251121221835.28032-7-mhi@mailbox.org
Signed-off-by: Maurice Hieronymus <mhi@mailbox.org>
Signed-off-by: Steven Rostedt ... | ```diff
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index cf725a33d99c..e575956ef9b5 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -125,7 +125,7 @@ cpumask_var_t __read_mostly tracing_buffer_mask;
* If there is an oops (or kernel panic) and the ftrace_dump_on_oops
* is set, then ftrac... |
81354f63359fb66b205650c62859e0ac414e6ecf | Analyze and fix the following issue in the Linux kernel code: tracing: Fix typo in ring_buffer_benchmark.c | Problem Details:
Fix typo "overwite" to "overwrite".
Link: https://patch.msgid.link/20251121221835.28032-6-mhi@mailbox.org
Signed-off-by: Maurice Hieronymus <mhi@mailbox.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> | ```diff
diff --git a/kernel/trace/ring_buffer_benchmark.c b/kernel/trace/ring_buffer_benchmark.c
index cdc3aea12c93..593e3b59e42e 100644
--- a/kernel/trace/ring_buffer_benchmark.c
+++ b/kernel/trace/ring_buffer_benchmark.c
@@ -433,7 +433,7 @@ static int __init ring_buffer_benchmark_init(void)
{
int ret;
- /* make ... |
1edb820ae9779ae29526d4285298b0bf93a8d542 | Analyze and fix the following issue in the Linux kernel code: tracing: Fix multiple typos in ring_buffer.c | Problem Details:
Fix multiple typos in comments:
"ording" -> "ordering"
"scatch" -> "scratch"
"wont" -> "won't"
Link: https://patch.msgid.link/20251121221835.28032-5-mhi@mailbox.org
Signed-off-by: Maurice Hieronymus <mhi@mailbox.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> | ```diff
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index 8688c88534de..41c9f5d079be 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -1770,7 +1770,7 @@ static bool rb_meta_init(struct trace_buffer *buffer, int scratch_size)
bmeta->total_size = total_size;
bmeta->... |
2ec7345c2d589f3e7358e753ef5b6ae7be66d846 | Analyze and fix the following issue in the Linux kernel code: tracing: Fix typo in fprobe.c | Problem Details:
Fix typo "funciton" to "function".
Link: https://patch.msgid.link/20251121221835.28032-4-mhi@mailbox.org
Signed-off-by: Maurice Hieronymus <mhi@mailbox.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> | ```diff
diff --git a/kernel/trace/fprobe.c b/kernel/trace/fprobe.c
index 5a807d62e76d..10ae831f2710 100644
--- a/kernel/trace/fprobe.c
+++ b/kernel/trace/fprobe.c
@@ -29,7 +29,7 @@
* fprobe_table: hold 'fprobe_hlist::hlist' for checking the fprobe still
* exists. The key is the address of fprobe instance.
* fpr... |
9c3f3b8fea2d615e128418a12c430e2890169859 | Analyze and fix the following issue in the Linux kernel code: tracing: Fix typo in fpgraph.c | Problem Details:
Fix typo "reservered" to "reserved".
Link: https://patch.msgid.link/20251121221835.28032-3-mhi@mailbox.org
Signed-off-by: Maurice Hieronymus <mhi@mailbox.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> | ```diff
diff --git a/kernel/trace/fgraph.c b/kernel/trace/fgraph.c
index 65ac0f04a946..cc48d16be43e 100644
--- a/kernel/trace/fgraph.c
+++ b/kernel/trace/fgraph.c
@@ -163,7 +163,7 @@ enum {
#define RET_STACK(t, offset) ((struct ftrace_ret_stack *)(&(t)->ret_stack[offset]))
/*
- * Each fgraph_ops has a reservered un... |
47ef834209e5981f443240d8a8b45bf680df22aa | Analyze and fix the following issue in the Linux kernel code: tracing: Fix fixed array of synthetic event | Problem Details:
The commit 4d38328eb442d ("tracing: Fix synth event printk format for str
fields") replaced "%.*s" with "%s" but missed removing the number size of
the dynamic and static strings. The commit e1a453a57bc7 ("tracing: Do not
add length to print format in synthetic events") fixed the dynamic part
but did n... | ```diff
diff --git a/kernel/trace/trace_events_synth.c b/kernel/trace/trace_events_synth.c
index 2f19bbe73d27..4554c458b78c 100644
--- a/kernel/trace/trace_events_synth.c
+++ b/kernel/trace/trace_events_synth.c
@@ -375,7 +375,6 @@ static enum print_line_t print_synth_event(struct trace_iterator *iter,
n_u64++;
... |
02e7769e38c87c92b82db59923d3b0598d153903 | Analyze and fix the following issue in the Linux kernel code: tracing: Fix enabling of tracing on file release | Problem Details:
The trace file will pause tracing if the tracing instance has the
"pause-on-trace" option is set. This happens when the file is opened, and
it is unpaused when the file is closed. When this was first added, there
was only one user that paused tracing. On open, the check to pause was:
if (!iter->sna... | ```diff
diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h
index 04307a19cde3..3690221ba3d8 100644
--- a/include/linux/trace_events.h
+++ b/include/linux/trace_events.h
@@ -138,6 +138,7 @@ enum trace_iter_flags {
TRACE_FILE_LAT_FMT = 1,
TRACE_FILE_ANNOTATE = 2,
TRACE_FILE_TIME_IN_NS = 4,
+ T... |
979e2ec58de2b600955b8290d1df549e33d67347 | Analyze and fix the following issue in the Linux kernel code: drm: nouveau: Replace sprintf() with sysfs_emit() | Problem Details:
Replace sprintf() calls with sysfs_emit() to follow current kernel
coding standards.
sysfs_emit() is the preferred method for formatting sysfs output as it
provides better bounds checking and is more secure.
Signed-off-by: Madhur Kumar <madhurkumar004@gmail.com>
Reviewed-by: Lyude Paul <lyude@redhat.... | ```diff
diff --git a/drivers/gpu/drm/nouveau/nouveau_hwmon.c b/drivers/gpu/drm/nouveau/nouveau_hwmon.c
index 5c07a9ee8b77..34effe6d86ad 100644
--- a/drivers/gpu/drm/nouveau/nouveau_hwmon.c
+++ b/drivers/gpu/drm/nouveau/nouveau_hwmon.c
@@ -125,7 +125,7 @@ nouveau_hwmon_get_pwm1_max(struct device *d,
if (ret < 0)
re... |
d84e47edf156a953ed340ba6a202dcd3ea39ba0a | Analyze and fix the following issue in the Linux kernel code: drm/nouveau: fix circular dep oops from vendored i2c encoder | Problem Details:
Since commit a73583107af9 ("drm/nouveau: vendor in drm_encoder_slave API")
nouveau appears to be broken for all dispnv04 GPUs (before NV50). Depending
on the kernel version, either having no display output and hanging in
kernel for a long time, or even oopsing in the cleanup path like:
Hardware name: ... | ```diff
diff --git a/drivers/gpu/drm/nouveau/dispnv04/nouveau_i2c_encoder.c b/drivers/gpu/drm/nouveau/dispnv04/nouveau_i2c_encoder.c
index e2bf99c43336..a60209097a20 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/nouveau_i2c_encoder.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/nouveau_i2c_encoder.c
@@ -94,26 +94,6 @@ fail_u... |
2bdc2c0e12fac56e41ec05fb771ead986ea6dac0 | Analyze and fix the following issue in the Linux kernel code: drm/nouveau: refactor deprecated strcpy | Problem Details:
strcpy() has been deprecated because it performs no bounds checking on the
destination buffer, which can lead to buffer overflows. Use the safer
strscpy() instead.
Signed-off-by: Madhur Kumar <madhurkumar004@gmail.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Fixes: 15a996bbb697 ("drm/nouveau: assig... | ```diff
diff --git a/drivers/gpu/drm/nouveau/nouveau_fence.c b/drivers/gpu/drm/nouveau/nouveau_fence.c
index 869d4335c0f4..4a193b7d6d9e 100644
--- a/drivers/gpu/drm/nouveau/nouveau_fence.c
+++ b/drivers/gpu/drm/nouveau/nouveau_fence.c
@@ -183,11 +183,11 @@ nouveau_fence_context_new(struct nouveau_channel *chan, struct ... |
d740d52e342bae9c88c719b015d6065783b961a1 | Analyze and fix the following issue in the Linux kernel code: ALSA: usb-audio: Initialize status1 to fix uninitialized symbol errors | Problem Details:
Initialize 'status1' with a default value to resolve the static analysis
smatch reported error "uninitialized symbol 'status1'".
The 'status1' variable is used to create a buff using "kmemdup".
So, ensure to initialize the value before it is read.
Suggested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-... | ```diff
diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c
index fe6c2cebc7f0..a6bbb82376c1 100644
--- a/sound/usb/mixer_quirks.c
+++ b/sound/usb/mixer_quirks.c
@@ -2545,6 +2545,7 @@ static int snd_rme_get_status1(struct snd_kcontrol *kcontrol,
struct usb_mixer_elem_list *list = snd_kcontrol_chip(kcontr... |
210d77cca3d0494ed30a5c628b20c1d95fa04fb1 | Analyze and fix the following issue in the Linux kernel code: ALSA: firewire-motu: fix buffer overflow in hwdep read for DSP events | Problem Details:
The DSP event handling code in hwdep_read() could write more bytes to
the user buffer than requested, when a user provides a buffer smaller
than the event header size (8 bytes).
Fix by using min_t() to clamp the copy size, This ensures we never copy
more than the user requested.
Reported-by: Yuhao Ji... | ```diff
diff --git a/sound/firewire/motu/motu-hwdep.c b/sound/firewire/motu/motu-hwdep.c
index 981c19430cb0..6675b23aad69 100644
--- a/sound/firewire/motu/motu-hwdep.c
+++ b/sound/firewire/motu/motu-hwdep.c
@@ -83,10 +83,11 @@ static long hwdep_read(struct snd_hwdep *hwdep, char __user *buf, long count,
event.motu_r... |
3ce8f4a501f61edbb5cb3fe13520f09ffb33396e | Analyze and fix the following issue in the Linux kernel code: ARM: omap1: avoid symbol clashes in fiq handler | Problem Details:
The ams-delta-fiq-handler.S file has a number of symbols with fairly
generic names, including one named 'exit' that causes a compiler warning
in some configuration options:
vmlinux.o: error: exit() function name creates ambiguity with -ffunction-sections
Change all these symbols to use a .L prefix to... | ```diff
diff --git a/arch/arm/mach-omap1/ams-delta-fiq-handler.S b/arch/arm/mach-omap1/ams-delta-fiq-handler.S
index 35c2f9574dbd..5cf6fcca602c 100644
--- a/arch/arm/mach-omap1/ams-delta-fiq-handler.S
+++ b/arch/arm/mach-omap1/ams-delta-fiq-handler.S
@@ -97,7 +97,7 @@ ENTRY(qwerty_fiqin_start)
ldr r13, [r12, #IRQ_I... |
79a45ddcdbba330f5139c7c7ff7042d69cf147b2 | Analyze and fix the following issue in the Linux kernel code: regulator: fixed: Rely on the core freeing the enable GPIO | Problem Details:
In order to simplify ownership rules for enable GPIOs supplied by drivers
regulator_register() always takes ownership of them, even if it ends up
failing for some other reason. We therefore should not free the GPIO if
registration fails but just let the core worry about things.
Fixes: 636f4618b1cd (re... | ```diff
diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c
index a2d16e9abfb5..254c0a8a4555 100644
--- a/drivers/regulator/fixed.c
+++ b/drivers/regulator/fixed.c
@@ -330,13 +330,10 @@ static int reg_fixed_voltage_probe(struct platform_device *pdev)
drvdata->dev = devm_regulator_register(&pdev->dev,... |
c34b04cc6178f33c08331568c7fd25c5b9a39f66 | Analyze and fix the following issue in the Linux kernel code: ALSA: hda: cs35l41: Fix NULL pointer dereference in cs35l41_hda_read_acpi() | Problem Details:
The acpi_get_first_physical_node() function can return NULL, in which
case the get_device() function also returns NULL, but this value is
then dereferenced without checking,so add a check to prevent a crash.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 7b2f3eb492da ("ALSA:... | ```diff
diff --git a/sound/hda/codecs/side-codecs/cs35l41_hda.c b/sound/hda/codecs/side-codecs/cs35l41_hda.c
index c0f2a3ff77a1..21e00055c0c4 100644
--- a/sound/hda/codecs/side-codecs/cs35l41_hda.c
+++ b/sound/hda/codecs/side-codecs/cs35l41_hda.c
@@ -1901,6 +1901,8 @@ static int cs35l41_hda_read_acpi(struct cs35l41_hda... |
fe93446b5ebdaa89a8f97b15668c077921a65140 | Analyze and fix the following issue in the Linux kernel code: vfs: use UAPI types for new struct delegation definition | Problem Details:
Using libc types and headers from the UAPI headers is problematic as it
introduces a dependency on a full C toolchain.
Use the fixed-width integer types provided by the UAPI headers instead.
Fixes: 1602bad16d7d ("vfs: expose delegation support to userland")
Fixes: 4be9e04ebf75 ("vfs: add needed heade... | ```diff
diff --git a/include/uapi/linux/fcntl.h b/include/uapi/linux/fcntl.h
index 5e277fd955aa..aadfbf6e0cb3 100644
--- a/include/uapi/linux/fcntl.h
+++ b/include/uapi/linux/fcntl.h
@@ -4,11 +4,7 @@
#include <asm/fcntl.h>
#include <linux/openat2.h>
-#ifdef __KERNEL__
#include <linux/types.h>
-#else
-#include <std... |
8cf01d0c4372ef5777d20c3c3a83936fd1c670f8 | Analyze and fix the following issue in the Linux kernel code: mqueue: correct the type of ro to int | Problem Details:
The ro variable, being of type bool, caused the -EROFS return value from
mnt_want_write() to be implicitly converted to 1. This prevented the file
from being correctly acquired, thus triggering the issue reported by
syzbot [1].
Changing the type of ro to int allows the system to correctly identify
the... | ```diff
diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index 56e811f9e5fa..90664d26ec07 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -893,7 +893,7 @@ static int prepare_open(struct dentry *dentry, int oflag, int ro,
}
static struct file *mqueue_file_open(struct filename *name,
- struct vfsmount *mnt, int oflag... |
3e281113f871d7f9c69ca55a4d806a72180b7e8a | Analyze and fix the following issue in the Linux kernel code: 9p: fix new mount API cache option handling | Problem Details:
After commit 4eb3117888a92, 9p needs to be able to accept numerical
cache= mount options as well as the string "shortcuts" because the option
is printed numerically in /proc/mounts rather than by string. This was
missed in the mount API conversion, which used an enum for the shortcuts
and therefore cou... | ```diff
diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c
index 2f5c5f3123b7..057487efaaeb 100644
--- a/fs/9p/v9fs.c
+++ b/fs/9p/v9fs.c
@@ -72,15 +72,6 @@ static const struct constant_table p9_versions[] = {
{}
};
-static const struct constant_table p9_cache_mode[] = {
- { "loose", CACHE_SC_LOOSE },
- { "fscache", CACHE_SC... |
f0445613314f474c1a0ec6fa8a5cd153a618f1b6 | Analyze and fix the following issue in the Linux kernel code: 9p: fix cache/debug options printing in v9fs_show_options | Problem Details:
commit 4eb3117888a92 changed the cache= option to accept either string
shortcuts or bitfield values. It also changed /proc/mounts to emit the
option as the hexadecimal numeric value rather than the shortcut string.
However, by printing "cache=%x" without the leading 0x, shortcuts such
as "cache=loose"... | ```diff
diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c
index 05fc2ba3c5d4..2f5c5f3123b7 100644
--- a/fs/9p/v9fs.c
+++ b/fs/9p/v9fs.c
@@ -132,7 +132,7 @@ int v9fs_show_options(struct seq_file *m, struct dentry *root)
struct v9fs_session_info *v9ses = root->d_sb->s_fs_info;
if (v9ses->debug)
- seq_printf(m, ",debug=%x",... |
164312662ae9764b83b84d97afb25c42eb2be473 | Analyze and fix the following issue in the Linux kernel code: fbdev: ssd1307fb: fix potential page leak in ssd1307fb_probe() | Problem Details:
The page allocated for vmem using __get_free_pages() is not freed on the
error paths after it. Fix that by adding a corresponding __free_pages()
call to the error path.
Fixes: facd94bc458a ("fbdev: ssd1307fb: Allocate page aligned video memory.")
Signed-off-by: Abdun Nihaal <nihaal@cse.iitm.ac.in>
Sig... | ```diff
diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
index aa6cc0a8151a..83dd31fa1fab 100644
--- a/drivers/video/fbdev/ssd1307fb.c
+++ b/drivers/video/fbdev/ssd1307fb.c
@@ -680,7 +680,7 @@ static int ssd1307fb_probe(struct i2c_client *client)
if (!ssd1307fb_defio) {
dev_err(dev, "... |
479acb9db3199cdb70e5478a6f633b5f20c7d8df | Analyze and fix the following issue in the Linux kernel code: drm/plane: Fix IS_ERR() vs NULL check in drm_plane_create_hotspot_properties() | Problem Details:
The drm_property_create_signed_range() function doesn't return error
pointers it returns NULL on error. Fix the error checking to match.
Fixes: 8f7179a1027d ("drm/atomic: Add support for mouse hotspots")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Javier Martinez Canillas <ja... | ```diff
diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
index a30493ed9715..4cadea997129 100644
--- a/drivers/gpu/drm/drm_plane.c
+++ b/drivers/gpu/drm/drm_plane.c
@@ -338,14 +338,14 @@ static int drm_plane_create_hotspot_properties(struct drm_plane *plane)
prop_x = drm_property_create_signed... |
35e282c1868de3c9d15f9a8812cbb2e7da06b0c1 | Analyze and fix the following issue in the Linux kernel code: drm/bridge: ti-sn65dsi83: ignore PLL_UNLOCK errors | Problem Details:
On hardware based on Toradex Verdin AM62 the recovery mechanism added by
commit ad5c6ecef27e ("drm: bridge: ti-sn65dsi83: Add error recovery
mechanism") has been reported [0] to make the display turn on and off and
and the kernel logging "Unexpected link status 0x01".
According to the report, the erro... | ```diff
diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi83.c b/drivers/gpu/drm/bridge/ti-sn65dsi83.c
index 033c44326552..fffb47b62f43 100644
--- a/drivers/gpu/drm/bridge/ti-sn65dsi83.c
+++ b/drivers/gpu/drm/bridge/ti-sn65dsi83.c
@@ -429,7 +429,14 @@ static void sn65dsi83_handle_errors(struct sn65dsi83 *ctx)
*/
ret... |
db9c67bfca8585bb7f00f289056e7b83502861c8 | Analyze and fix the following issue in the Linux kernel code: gpio: qixis: select CONFIG_REGMAP_MMIO | Problem Details:
The regmap drivers need to be selected by each user, without that there
can be configurations that fail to link:
x86_64-linux-ld: drivers/gpio/gpio-qixis-fpga.o: in function `qixis_cpld_gpio_probe':
gpio-qixis-fpga.c:(.text+0x13a): undefined reference to `__devm_regmap_init_mmio_clk'
Fixes: e88500247... | ```diff
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index c74da29253e8..0fed90ef587a 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -1568,6 +1568,7 @@ config GPIO_QIXIS_FPGA
tristate "NXP QIXIS FPGA GPIO support"
depends on MFD_SIMPLE_MFD_I2C || COMPILE_TEST
select GPIO_REGMAP
+ sele... |
52721cfc78c76b09c66e092b52617006390ae96a | Analyze and fix the following issue in the Linux kernel code: gpio: regmap: Fix memleak in error path in gpio_regmap_register() | Problem Details:
Call gpiochip_remove() to free the resources allocated by
gpiochip_add_data() in error path.
Fixes: 553b75d4bfe9 ("gpio: regmap: Allow to allocate regmap-irq device")
Fixes: ae495810cffe ("gpio: regmap: add the .fixed_direction_output configuration parameter")
CC: stable@vger.kernel.org
Co-developed-b... | ```diff
diff --git a/drivers/gpio/gpio-regmap.c b/drivers/gpio/gpio-regmap.c
index e5ba38e65c10..9581bd5ca947 100644
--- a/drivers/gpio/gpio-regmap.c
+++ b/drivers/gpio/gpio-regmap.c
@@ -338,7 +338,7 @@ struct gpio_regmap *gpio_regmap_register(const struct gpio_regmap_config *config
config->regmap_irq_line, con... |
bc677a9216e1396322e42692e9c01cce04a7afc0 | Analyze and fix the following issue in the Linux kernel code: tpm2-sessions: Remove 'attributes' parameter from tpm_buf_append_auth | Problem Details:
Remove 'attributes' parameter from 'tpm_buf_append_auth', as it is not used
by the function.
Fixes: 27184f8905ba ("tpm: Opt-in in disable PCR integrity protection")
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@opinsys.com>
Reviewed-by: Jonathan McDowell <noodles@meta.com> | ```diff
diff --git a/drivers/char/tpm/tpm2-cmd.c b/drivers/char/tpm/tpm2-cmd.c
index 34e3599f094f..ce0a1c6b0596 100644
--- a/drivers/char/tpm/tpm2-cmd.c
+++ b/drivers/char/tpm/tpm2-cmd.c
@@ -210,7 +210,7 @@ int tpm2_pcr_extend(struct tpm_chip *chip, u32 pcr_idx,
tpm_buf_append_hmac_session(chip, &buf, 0, NULL, 0);
... |
bda1cbf73c6e241267c286427f2ed52b5735d872 | Analyze and fix the following issue in the Linux kernel code: tpm2-sessions: Fix tpm2_read_public range checks | Problem Details:
tpm2_read_public() has some rudimentary range checks but the function does
not ensure that the response buffer has enough bytes for the full TPMT_HA
payload.
Re-implement the function with necessary checks and validation, and return
name and name size for all handle types back to the caller.
Cc: stab... | ```diff
diff --git a/drivers/char/tpm/tpm2-cmd.c b/drivers/char/tpm/tpm2-cmd.c
index be4a9c7f2e1a..34e3599f094f 100644
--- a/drivers/char/tpm/tpm2-cmd.c
+++ b/drivers/char/tpm/tpm2-cmd.c
@@ -11,8 +11,11 @@
* used by the kernel internally.
*/
+#include "linux/dev_printk.h"
+#include "linux/tpm.h"
#include "tpm.h"... |
6e9722e9a7bfe1bbad649937c811076acf86e1fd | Analyze and fix the following issue in the Linux kernel code: tpm2-sessions: Fix out of range indexing in name_size | Problem Details:
'name_size' does not have any range checks, and it just directly indexes
with TPM_ALG_ID, which could lead into memory corruption at worst.
Address the issue by only processing known values and returning -EINVAL for
unrecognized values.
Make also 'tpm_buf_append_name' and 'tpm_buf_fill_hmac_session' ... | ```diff
diff --git a/drivers/char/tpm/tpm2-cmd.c b/drivers/char/tpm/tpm2-cmd.c
index dd502322f499..be4a9c7f2e1a 100644
--- a/drivers/char/tpm/tpm2-cmd.c
+++ b/drivers/char/tpm/tpm2-cmd.c
@@ -199,7 +199,11 @@ int tpm2_pcr_extend(struct tpm_chip *chip, u32 pcr_idx,
}
if (!disable_pcr_integrity) {
- tpm_buf_append_... |
7dfbe9a6751973c17138ddc0d33deff5f5f35b94 | Analyze and fix the following issue in the Linux kernel code: crypto/ccp: Fix CONFIG_PCI=n build | Problem Details:
It turns out that the PCI driver for ccp is unconditionally built into the
kernel in the CONFIG_PCI=y case. This means that the new SEV-TIO support
needs an explicit dependency on PCI to avoid build errors when
CONFIG_CRYPTO_DEV_SP_PSP=y and CONFIG_PCI=n.
Reported-by: kernel test robot <lkp@intel.com>... | ```diff
diff --git a/drivers/crypto/ccp/Kconfig b/drivers/crypto/ccp/Kconfig
index e2b127f0986b..f16a0f611317 100644
--- a/drivers/crypto/ccp/Kconfig
+++ b/drivers/crypto/ccp/Kconfig
@@ -39,7 +39,7 @@ config CRYPTO_DEV_SP_PSP
bool "Platform Security Processor (PSP) device"
default y
depends on CRYPTO_DEV_CCP_DD &... |
0373d5c387f24de749cc22e694a14b3a7c7eb515 | Analyze and fix the following issue in the Linux kernel code: bnxt_en: Fix XDP_TX path | Problem Details:
For XDP_TX action in bnxt_rx_xdp(), clearing of the event flags is not
correct. __bnxt_poll_work() -> bnxt_rx_pkt() -> bnxt_rx_xdp() may be
looping within NAPI and some event flags may be set in earlier
iterations. In particular, if BNXT_TX_EVENT is set earlier indicating
some XDP_TX packets are read... | ```diff
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c
index 3e77a96e5a3e..c94a391b1ba5 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c
@@ -268,13 +268,11 @@ bool bnxt_rx_xdp(struct bnxt *bp, struc... |
a479a27f4da4d1f8a9b7540a800f80253ed1bad0 | Analyze and fix the following issue in the Linux kernel code: gve: Move gve_init_clock to after AQ CONFIGURE_DEVICE_RESOURCES call | Problem Details:
commit 46e7860ef941 ("gve: Move ptp_schedule_worker to gve_init_clock")
moved the first invocation of the AQ command REPORT_NIC_TIMESTAMP to
gve_probe(). However, gve_init_clock() invoking REPORT_NIC_TIMESTAMP is
not valid until after gve_probe() invokes the AQ command
CONFIGURE_DEVICE_RESOURCES.
Fail... | ```diff
diff --git a/drivers/net/ethernet/google/gve/gve_main.c b/drivers/net/ethernet/google/gve/gve_main.c
index a5a2b18d309b..a7a088a77f37 100644
--- a/drivers/net/ethernet/google/gve/gve_main.c
+++ b/drivers/net/ethernet/google/gve/gve_main.c
@@ -647,12 +647,9 @@ static int gve_setup_device_resources(struct gve_pri... |
dd75c723ef566f7f009c047f47e0eee95fe348ab | Analyze and fix the following issue in the Linux kernel code: r8169: fix RTL8117 Wake-on-Lan in DASH mode | Problem Details:
Wake-on-Lan does currently not work for r8169 in DASH mode, e.g. the
ASUS Pro WS X570-ACE with RTL8168fp/RTL8117.
Fix by not returning early in rtl_prepare_power_down when dash_enabled.
While this fixes WoL, it still kills the OOB RTL8117 remote management
BMC connection. Fix by not calling rtl8168_dr... | ```diff
diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index 405e91eb3141..755083852eef 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -2655,9 +2655,6 @@ static void rtl_wol_enable_rx(struct rtl8169_private *t... |
8ac1dacec458f55f871f7153242ed6ab60373b90 | Analyze and fix the following issue in the Linux kernel code: mlxsw: spectrum_mr: Fix use-after-free when updating multicast route stats | Problem Details:
Cited commit added a dedicated mutex (instead of RTNL) to protect the
multicast route list, so that it will not change while the driver
periodically traverses it in order to update the kernel about multicast
route stats that were queried from the device.
One instance of list entry deletion (during rou... | ```diff
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c
index 5afe6b155ef0..81935f87bfcd 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c
@@ -440,7 +440,9 @@ int mlxsw_sp_mr_route_add... |
8b0e69763ef948fb872a7767df4be665d18f5fd4 | Analyze and fix the following issue in the Linux kernel code: mlxsw: spectrum_router: Fix neighbour use-after-free | Problem Details:
We sometimes observe use-after-free when dereferencing a neighbour [1].
The problem seems to be that the driver stores a pointer to the
neighbour, but without holding a reference on it. A reference is only
taken when the neighbour is used by a nexthop.
Fix by simplifying the reference counting scheme.... | ```diff
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
index f4e9ecaeb104..2d0e89bd2fb9 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
@@ -2265,6 +2265,7 @@ mlxsw_s... |
b6b638bda240395dff49a87403b2e32493e56d2a | Analyze and fix the following issue in the Linux kernel code: mlxsw: spectrum_router: Fix possible neighbour reference count leak | Problem Details:
mlxsw_sp_router_schedule_work() takes a reference on a neighbour,
expecting a work item to release it later on. However, we might fail to
schedule the work item, in which case the neighbour reference count will
be leaked.
Fix by taking the reference just before scheduling the work item. Note
that mlxs... | ```diff
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
index a2033837182e..f4e9ecaeb104 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
@@ -2858,6 +2858,11 @@ static... |
c4cdf7376271bce5714c06d79ec67759b18910eb | Analyze and fix the following issue in the Linux kernel code: net: phy: marvell-88q2xxx: Fix clamped value in mv88q2xxx_hwmon_write | Problem Details:
The local variable 'val' was never clamped to -75000 or 180000 because
the return value of clamp_val() was not used. Fix this by assigning the
clamped value back to 'val', and use clamp() instead of clamp_val().
Cc: stable@vger.kernel.org
Fixes: a557a92e6881 ("net: phy: marvell-88q2xxx: add support fo... | ```diff
diff --git a/drivers/net/phy/marvell-88q2xxx.c b/drivers/net/phy/marvell-88q2xxx.c
index f3d83b04c953..201dee1a1698 100644
--- a/drivers/net/phy/marvell-88q2xxx.c
+++ b/drivers/net/phy/marvell-88q2xxx.c
@@ -698,7 +698,7 @@ static int mv88q2xxx_hwmon_write(struct device *dev,
switch (attr) {
case hwmon_tem... |
da67179e5538b473a47c87e87cb35b1a7551ad9b | Analyze and fix the following issue in the Linux kernel code: drm/nouveau/gsp: Allocate fwsec-sb at boot | Problem Details:
At the moment - the memory allocation for fwsec-sb is created as-needed and
is released after being used. Typically this is at some point well after
driver load, which can cause runtime suspend/resume to initially work on
driver load but then later fail on a machine that has been running for long
enoug... | ```diff
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h
index 226c7ec56b8e..b8b97e10ae83 100644
--- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h
+++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h
@@ -73,6 +73,10 @@ struct nvkm_gsp {
con... |
311607017e13d087161586e1d6cf28bb3a0ca942 | Analyze and fix the following issue in the Linux kernel code: virt: Fix Kconfig warning when selecting TSM without VIRT_DRIVERS | Problem Details:
After commit 3225f52cde56 ("PCI/TSM: Establish Secure Sessions and Link
Encryption"), there is a Kconfig warning when selecting CONFIG_TSM
without CONFIG_VIRT_DRIVERS:
WARNING: unmet direct dependencies detected for TSM
Depends on [n]: VIRT_DRIVERS [=n]
Selected by [y]:
- PCI_TSM [=y] &&... | ```diff
diff --git a/drivers/virt/Kconfig b/drivers/virt/Kconfig
index d8c848cf09a6..52eb7e4ba71f 100644
--- a/drivers/virt/Kconfig
+++ b/drivers/virt/Kconfig
@@ -47,6 +47,6 @@ source "drivers/virt/nitro_enclaves/Kconfig"
source "drivers/virt/acrn/Kconfig"
-source "drivers/virt/coco/Kconfig"
-
endif
+
+source "dr... |
78385c7299f7514697d196b3233a91bd5e485591 | Analyze and fix the following issue in the Linux kernel code: io_uring/kbuf: use READ_ONCE() for userspace-mapped memory | Problem Details:
The struct io_uring_buf elements in a buffer ring are in a memory region
accessible from userspace. A malicious/buggy userspace program could
therefore write to them at any time, so they should be accessed with
READ_ONCE() in the kernel. Commit 98b6fa62c84f ("io_uring/kbuf: always
use READ_ONCE() to re... | ```diff
diff --git a/io_uring/kbuf.c b/io_uring/kbuf.c
index 8a329556f8df..52b636d00a6b 100644
--- a/io_uring/kbuf.c
+++ b/io_uring/kbuf.c
@@ -44,7 +44,7 @@ static bool io_kbuf_inc_commit(struct io_buffer_list *bl, int len)
buf_len -= this_len;
/* Stop looping for invalid buffer length of 0 */
if (buf_len || !... |
bb9f4cca7c031de6f0e85f7ba24abf0172829f85 | Analyze and fix the following issue in the Linux kernel code: nvme-auth: use kvfree() for memory allocated with kvcalloc() | Problem Details:
Memory allocated by kvcalloc() may come from vmalloc or kmalloc,
so use kvfree() instead of kfree() for proper deallocation.
Fixes: aa36d711e945 ("nvme-auth: convert dhchap_auth_list to an array")
Signed-off-by: Israel Rukshin <israelr@nvidia.com>
Reviewed-by: Max Gurtovoy <mgurtovoy@nvidia.com>
Revie... | ```diff
diff --git a/drivers/nvme/host/auth.c b/drivers/nvme/host/auth.c
index a01178caf15b..8f3ccb317e4d 100644
--- a/drivers/nvme/host/auth.c
+++ b/drivers/nvme/host/auth.c
@@ -1122,7 +1122,7 @@ void nvme_auth_free(struct nvme_ctrl *ctrl)
if (ctrl->dhchap_ctxs) {
for (i = 0; i < ctrl_max_dhchaps(ctrl); i++)
... |
b645d5a25d49a515026ec444f2ccb087fe9daa7f | Analyze and fix the following issue in the Linux kernel code: nvme: fix typo error in nvme target | Problem Details:
Fix two spelling mistakes.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Chu Guangqing <chuguangqing@inspur.com>
Signed-off-by: Keith Busch <kbusch@kernel.org> | ```diff
diff --git a/drivers/nvme/target/admin-cmd.c b/drivers/nvme/target/admin-cmd.c
index 3e378153a781..3da31bb1183e 100644
--- a/drivers/nvme/target/admin-cmd.c
+++ b/drivers/nvme/target/admin-cmd.c
@@ -708,7 +708,7 @@ static void nvmet_execute_identify_ctrl(struct nvmet_req *req)
/*
* We don't really have a... |
525916ce496615f531091855604eab9ca573b195 | Analyze and fix the following issue in the Linux kernel code: io_uring/rsrc: fix lost entries after cloned range | Problem Details:
When cloning with node replacements (IORING_REGISTER_DST_REPLACE),
destination entries after the cloned range are not copied over.
Add logic to copy them over to the new destination table.
Fixes: c1329532d5aa ("io_uring/rsrc: allow cloning with node replacements")
Cc: stable@vger.kernel.org
Signed-of... | ```diff
diff --git a/io_uring/rsrc.c b/io_uring/rsrc.c
index 04f56212398a..a63474b331bf 100644
--- a/io_uring/rsrc.c
+++ b/io_uring/rsrc.c
@@ -1205,7 +1205,7 @@ static int io_clone_buffers(struct io_ring_ctx *ctx, struct io_ring_ctx *src_ctx
if (ret)
return ret;
- /* Fill entries in data from dst that won't over... |
f7e3f852a42d7cd8f1af2c330d9d153e30c8adcf | Analyze and fix the following issue in the Linux kernel code: block: fix memory leak in __blkdev_issue_zero_pages | Problem Details:
Move the fatal signal check before bio_alloc() to prevent a memory
leak when BLKDEV_ZERO_KILLABLE is set and a fatal signal is pending.
Previously, the bio was allocated before checking for a fatal signal.
If a signal was pending, the code would break out of the loop without
freeing or chaining the ju... | ```diff
diff --git a/block/blk-lib.c b/block/blk-lib.c
index 19e0203cc18a..9e2cc58f881f 100644
--- a/block/blk-lib.c
+++ b/block/blk-lib.c
@@ -202,13 +202,13 @@ static void __blkdev_issue_zero_pages(struct block_device *bdev,
unsigned int nr_vecs = __blkdev_sectors_to_bio_pages(nr_sects);
struct bio *bio;
- bi... |
8a32282175c964eb15638e8dfe199fc13c060f67 | Analyze and fix the following issue in the Linux kernel code: block: fix comment for op_is_zone_mgmt() to include RESET_ALL | Problem Details:
REQ_OP_ZONE_RESET_ALL is a zone management request, and op_is_zone_mgmt()
has returned true for it.
Update the comment to remove the misleading exception note so
the documentation matches the implementation.
Fixes: 12a1c9353c47 ("block: fix op_is_zone_mgmt() to handle REQ_OP_ZONE_RESET_ALL")
Signed-o... | ```diff
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
index cbbcb9051ec3..5dc061d318a4 100644
--- a/include/linux/blk_types.h
+++ b/include/linux/blk_types.h
@@ -479,10 +479,7 @@ static inline bool op_is_discard(blk_opf_t op)
}
/*
- * Check if a bio or request operation is a zone management ope... |
552c1149af7ac0cffab6fccd13feeaf816dd1f53 | Analyze and fix the following issue in the Linux kernel code: block: Clear BLK_ZONE_WPLUG_PLUGGED when aborting plugged BIOs | Problem Details:
Commit fe0418eb9bd6 ("block: Prevent potential deadlocks in zone write
plug error recovery") added a WARN check in disk_put_zone_wplug() to
verify that when the last reference to a zone write plug is dropped,
this zone write plug does not have the BLK_ZONE_WPLUG_PLUGGED flag set,
that is, that it is no... | ```diff
diff --git a/block/blk-zoned.c b/block/blk-zoned.c
index dcc295721c2c..394d8d74bba9 100644
--- a/block/blk-zoned.c
+++ b/block/blk-zoned.c
@@ -741,6 +741,8 @@ static void disk_zone_wplug_abort(struct blk_zone_wplug *zwplug)
{
struct bio *bio;
+ lockdep_assert_held(&zwplug->lock);
+
if (bio_list_empty(&zw... |
aa833fc394baad601b8f7779c1ae2ada3a06ce07 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Fix duplicated put due to merge resolution | Problem Details:
An incorrect backmerge resolution resulted in an
incorrect duplicate put. Fix.
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Closes: https://lore.kernel.org/dri-devel/CAHk-=whaiMayMx=LrL7P119MLBX6exM_mEu4S2uBRT+xWQ-mbA@mail.gmail.com/
Fixes: Fixes: ce0478b02ed2 ("Merge tag 'v6.18-rc6' in... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_exec_queue.c b/drivers/gpu/drm/xe/xe_exec_queue.c
index 12adfc3a0547..8724f8de67e2 100644
--- a/drivers/gpu/drm/xe/xe_exec_queue.c
+++ b/drivers/gpu/drm/xe/xe_exec_queue.c
@@ -391,9 +391,6 @@ void xe_exec_queue_destroy(struct kref *ref)
xe_assert(gt_to_xe(q->gt), atomic_re... |
666065caa31aeb812978740bae21871067bb14b6 | Analyze and fix the following issue in the Linux kernel code: pinctrl: add CONFIG_OF dependencies for microchip drivers | Problem Details:
The two newly added drivers fail to link on builds without
CONFIG_OF:
x86_64-linux-ld: drivers/pinctrl/pinctrl-pic64gx-gpio2.o: in function `pinconf_generic_dt_node_to_map_all':
pinctrl-pic64gx-gpio2.c:(.text+0xc9): undefined reference to `pinconf_generic_dt_node_to_map'
x86_64-linux-ld: drivers/pinct... | ```diff
diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
index 2e590913fa44..bc7f37afc48b 100644
--- a/drivers/pinctrl/Kconfig
+++ b/drivers/pinctrl/Kconfig
@@ -489,6 +489,7 @@ config PINCTRL_PIC32MZDA
config PINCTRL_PIC64GX
bool "pic64gx gpio2 pinctrl driver"
depends on ARCH_MICROCHIP || COMPILE_TES... |
861111b69896145a928c889d9344797ea3711028 | Analyze and fix the following issue in the Linux kernel code: net: smc: SMC_HS_CTRL_BPF should depend on BPF_JIT | Problem Details:
If CONFIG_BPF_SYSCALL=y, but CONFIG_BPF_JIT=n:
net/smc/smc_hs_bpf.c: In function ‘bpf_smc_hs_ctrl_init’:
include/linux/bpf.h:2068:50: error: statement with no effect [-Werror=unused-value]
2068 | #define register_bpf_struct_ops(st_ops, type) ({ (void *)(st_ops); 0; })
| ... | ```diff
diff --git a/net/smc/Kconfig b/net/smc/Kconfig
index 325addf83cc6..277ef504bc26 100644
--- a/net/smc/Kconfig
+++ b/net/smc/Kconfig
@@ -22,10 +22,10 @@ config SMC_DIAG
config SMC_HS_CTRL_BPF
bool "Generic eBPF hook for SMC handshake flow"
- depends on SMC && BPF_SYSCALL
+ depends on SMC && BPF_JIT && BPF_SY... |
860daa4b0d09a398a0ac9ae6fe67efd73a275968 | Analyze and fix the following issue in the Linux kernel code: drm/i915/color: Enable Plane Color Pipelines | Problem Details:
Expose color pipeline and add ability to program it.
v2: Set bit to enable multisegmented lut
v3: s/drm_color_lut_32/drm_color_lut32 (Simon)
v4: - Fix dsb programming
- Remove multi-segment LUT, they will be added in later patches
- Add pipeline only to TGL+
- Code Refactor
Reviewed-by: S... | ```diff
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 069967114bd9..808ac34c1914 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -7296,6 +7296,7 @@ static void intel_atomic_dsb_finish(struct ... |
bf0fd7375466b7fd58b9b98193cc19b90c856faa | Analyze and fix the following issue in the Linux kernel code: drm/i915/color: Program Plane Post CSC Registers | Problem Details:
Extract the LUT and program plane post csc registers.
v2: Add DSB support
v3: Add support for single segment 1D LUT
v4:
- s/drm_color_lut_32/drm_color_lut32 (Simon)
- Move declaration to beginning of the function (Suraj)
- Remove multisegmented code, add it later
- Remove dead code for SDR planes, add... | ```diff
diff --git a/drivers/gpu/drm/i915/display/intel_color.c b/drivers/gpu/drm/i915/display/intel_color.c
index 2a114d2964fa..08f3b5b47b8e 100644
--- a/drivers/gpu/drm/i915/display/intel_color.c
+++ b/drivers/gpu/drm/i915/display/intel_color.c
@@ -3996,11 +3996,70 @@ xelpd_program_plane_pre_csc_lut(struct intel_dsb ... |
05df71544c44a1767be021285648c090123a92ff | Analyze and fix the following issue in the Linux kernel code: drm/i915: Add register definitions for Plane Post CSC | Problem Details:
Add macros to define Plane Post CSC registers
v2:
- Add Plane Post CSC Gamma Multi Segment Enable bit
- Add BSpec entries (Suraj)
v3:
- Fix checkpatch issues (Suraj)
BSpec: 50403, 50404, 50405, 50406, 50409, 50410,
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com>
Signed-off-by: Uma Shankar <uma.s... | ```diff
diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane_regs.h b/drivers/gpu/drm/i915/display/skl_universal_plane_regs.h
index 1e5d7ef37f1c..6fd4da9f63cf 100644
--- a/drivers/gpu/drm/i915/display/skl_universal_plane_regs.h
+++ b/drivers/gpu/drm/i915/display/skl_universal_plane_regs.h
@@ -254,6 +254,7 @@
... |
ed0ebbc89f847eebce790a6a308c8c3c1251655a | Analyze and fix the following issue in the Linux kernel code: drm/i915: Add register definitions for Plane Degamma | Problem Details:
Add macros to define Plane Degamma registers
v2:
- Add BSpec links (Suraj)
v3:
- Add Bspec links in trailer (Suraj)
- Fix checkpatch issues (Suraj)
BSpec: 50411, 50412, 50413, 50414
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com>
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Signed-off-b... | ```diff
diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane_regs.h b/drivers/gpu/drm/i915/display/skl_universal_plane_regs.h
index 6f815b231340..1e5d7ef37f1c 100644
--- a/drivers/gpu/drm/i915/display/skl_universal_plane_regs.h
+++ b/drivers/gpu/drm/i915/display/skl_universal_plane_regs.h
@@ -254,6 +254,7 @@
... |
f00d02707dc2265c120756f074f27fd3c158ec9c | Analyze and fix the following issue in the Linux kernel code: drm/i915/color: Add plane CTM callback for D12 and beyond | Problem Details:
Add callback for setting CTM block in platforms D12 and beyond
v2:
- Add dsb support
- Pass plane_state as we are now doing a uapi to hw state copy
- Add support for 3x4 matrix
v3:
- Add relevant header file
- Fix typo (Suraj)
- Add callback to TGL+ (Suraj)
Reviewed-by: Suraj Kandpal <suraj.kandpal@... | ```diff
diff --git a/drivers/gpu/drm/i915/display/intel_color.c b/drivers/gpu/drm/i915/display/intel_color.c
index 81b87fed8878..2f8e985d51e5 100644
--- a/drivers/gpu/drm/i915/display/intel_color.c
+++ b/drivers/gpu/drm/i915/display/intel_color.c
@@ -32,6 +32,8 @@
#include "intel_display_utils.h"
#include "intel_dsb.... |
6f1e094fb6e98b99bda21133fea55970d82c2045 | Analyze and fix the following issue in the Linux kernel code: drm/i915/color: Preserve sign bit when int_bits is Zero | Problem Details:
When int_bits == 0, we lose the sign bit when we do the range check
and apply the mask.
Fix this by ensuring a minimum of one integer bit, which guarantees space
for the sign bit in fully fractional representations (e.g. S0.12)
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com>
Signed-off-by: Chait... | ```diff
diff --git a/drivers/gpu/drm/i915/display/intel_color.c b/drivers/gpu/drm/i915/display/intel_color.c
index 33fe5c9b4663..81b87fed8878 100644
--- a/drivers/gpu/drm/i915/display/intel_color.c
+++ b/drivers/gpu/drm/i915/display/intel_color.c
@@ -613,6 +613,8 @@ static u16 ctm_to_twos_complement(u64 coeff, int int_... |
4cd8a64b15c1c61fbe164deacd7829899a7c5030 | Analyze and fix the following issue in the Linux kernel code: drm/i915/display: Add identifiers for driver specific blocks | Problem Details:
Add macros to identify intel specific color blocks. It will help
in mapping drm_color_ops to intel color HW blocks
v2:- Prefix enums with INTEL_* (Jani, Suraj)
- Remove unnecessary comments (Jani)
- Commit message improvements (Suraj)
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com>
Signed-... | ```diff
diff --git a/drivers/gpu/drm/i915/display/intel_display_limits.h b/drivers/gpu/drm/i915/display/intel_display_limits.h
index f0fa27e365ab..55fd574ba313 100644
--- a/drivers/gpu/drm/i915/display/intel_display_limits.h
+++ b/drivers/gpu/drm/i915/display/intel_display_limits.h
@@ -138,4 +138,12 @@ enum hpd_pin {
... |
83c8f7b5e194eaf3fb268c513e23e23e892de8ed | Analyze and fix the following issue in the Linux kernel code: mm/mm_init: Introduce a boot parameter for check_pages | Problem Details:
Use-after-free and double-free bugs can be very difficult to track down.
The kernel is good at tracking these and preventing bad pages from being
used/created through simple checks gated behind "check_pages_enabled".
Currently, the only ways to enable this flag is by building with
CONFIG_DEBUG_VM, or ... | ```diff
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 6c42061ca20e..acdc7fbdecac 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -669,6 +669,14 @@
nokmem -- Disable kernel mem... |
1a7a7b80a22448dff55e1ad69a4681fd8b760b85 | Analyze and fix the following issue in the Linux kernel code: drm/panel: novatek-nt35560: avoid on-stack device structure | Problem Details:
A cleanup patch apparently by accident used a local device structure
instead of a pointer to one in the nt35560_read_id() function, causing
a warning about stack usage:
drivers/gpu/drm/panel/panel-novatek-nt35560.c: In function 'nt35560_read_id':
drivers/gpu/drm/panel/panel-novatek-nt35560.c:249:1: er... | ```diff
diff --git a/drivers/gpu/drm/panel/panel-novatek-nt35560.c b/drivers/gpu/drm/panel/panel-novatek-nt35560.c
index 561e6643dcbb..6e5173f98a22 100644
--- a/drivers/gpu/drm/panel/panel-novatek-nt35560.c
+++ b/drivers/gpu/drm/panel/panel-novatek-nt35560.c
@@ -213,7 +213,7 @@ static const struct backlight_properties ... |
e45b5df47b07e6ce1138b0a4e70ad0b0c4d72881 | Analyze and fix the following issue in the Linux kernel code: drm/xe/pf: fix VFIO link error | Problem Details:
The Makefile logic for building xe_sriov_vfio.o was added incorrectly,
as setting CONFIG_XE_VFIO_PCI=m means it doesn't get included into a
built-in xe driver:
ERROR: modpost: "xe_sriov_vfio_stop_copy_enter" [drivers/vfio/pci/xe/xe-vfio-pci.ko] undefined!
ERROR: modpost: "xe_sriov_vfio_stop_copy_exit"... | ```diff
diff --git a/drivers/gpu/drm/xe/Makefile b/drivers/gpu/drm/xe/Makefile
index a1f86a59d687..f2b6243ac45d 100644
--- a/drivers/gpu/drm/xe/Makefile
+++ b/drivers/gpu/drm/xe/Makefile
@@ -184,8 +184,8 @@ xe-$(CONFIG_PCI_IOV) += \
xe_sriov_pf_sysfs.o \
xe_tile_sriov_pf_debugfs.o
-ifeq ($(CONFIG_PCI_IOV),y)
- xe... |
f402ecd7a8b6446547076f4bd24bd5d4dcc94481 | Analyze and fix the following issue in the Linux kernel code: KVM: nSVM: Set exit_code_hi to -1 when synthesizing SVM_EXIT_ERR (failed VMRUN) | Problem Details:
Set exit_code_hi to -1u as a temporary band-aid to fix a long-standing
(effectively since KVM's inception) bug where KVM treats the exit code as
a 32-bit value, when in reality it's a 64-bit value. Per the APM, offset
0x70 is a single 64-bit value:
070h 63:0 EXITCODE
And a sane reading of the erro... | ```diff
diff --git a/arch/x86/kvm/svm/nested.c b/arch/x86/kvm/svm/nested.c
index da6e80b3ac35..143a0ef02b03 100644
--- a/arch/x86/kvm/svm/nested.c
+++ b/arch/x86/kvm/svm/nested.c
@@ -983,7 +983,7 @@ int nested_svm_vmrun(struct kvm_vcpu *vcpu)
if (!nested_vmcb_check_save(vcpu) ||
!nested_vmcb_check_controls(vcpu... |
29bce9c8b41d5c378263a927acb9a9074d0e7a0e | Analyze and fix the following issue in the Linux kernel code: drm/xe: fix drm_gpusvm_init() arguments | Problem Details:
The Xe driver fails to build when CONFIG_DRM_XE_GPUSVM is disabled
but CONFIG_DRM_GPUSVM is turned on, due to the clash of two commits:
In file included from drivers/gpu/drm/xe/xe_vm_madvise.c:8:
drivers/gpu/drm/xe/xe_svm.h: In function 'xe_svm_init':
include/linux/stddef.h:8:14: error: passing argume... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_svm.h b/drivers/gpu/drm/xe/xe_svm.h
index 0955d2ac8d74..fa757dd07954 100644
--- a/drivers/gpu/drm/xe/xe_svm.h
+++ b/drivers/gpu/drm/xe/xe_svm.h
@@ -214,7 +214,7 @@ int xe_svm_init(struct xe_vm *vm)
{
#if IS_ENABLED(CONFIG_DRM_GPUSVM)
return drm_gpusvm_init(&vm->svm.gpusvm,... |
ef7de33544a7a6783d7afe09496da362d1e90ba1 | Analyze and fix the following issue in the Linux kernel code: drm/xe/pf: fix VFIO link error | Problem Details:
The Makefile logic for building xe_sriov_vfio.o was added incorrectly,
as setting CONFIG_XE_VFIO_PCI=m means it doesn't get included into a
built-in xe driver:
ERROR: modpost: "xe_sriov_vfio_stop_copy_enter" [drivers/vfio/pci/xe/xe-vfio-pci.ko] undefined!
ERROR: modpost: "xe_sriov_vfio_stop_copy_exit"... | ```diff
diff --git a/drivers/gpu/drm/xe/Makefile b/drivers/gpu/drm/xe/Makefile
index dfc2ded01455..e5f3c2ec9e9a 100644
--- a/drivers/gpu/drm/xe/Makefile
+++ b/drivers/gpu/drm/xe/Makefile
@@ -185,8 +185,8 @@ xe-$(CONFIG_PCI_IOV) += \
xe_sriov_pf_sysfs.o \
xe_tile_sriov_pf_debugfs.o
-ifeq ($(CONFIG_PCI_IOV),y)
- xe... |
6a107cfe9c99a079e578a4c5eb70038101a3599f | Analyze and fix the following issue in the Linux kernel code: net/mlx5: Fix double unregister of HCA_PORTS component | Problem Details:
Clear hca_devcom_comp in device's private data after unregistering it in
LAG teardown. Otherwise a slightly lagging second pass through
mlx5_unload_one() might try to unregister it again and trip over
use-after-free.
On s390 almost all PCI level recovery events trigger two passes through
mxl5_unload_o... | ```diff
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c b/drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c
index 1ac933cd8f02..a459a30f36ca 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c
@@ -1413,6 +1413,7 @@ static int __mlx5_lag_d... |
c196bf43d706592d8801a7513603765080e495fb | Analyze and fix the following issue in the Linux kernel code: blk-mq: Abort suspend when wakeup events are pending | Problem Details:
During system suspend, wakeup capable IRQs for block device can be
delayed, which can cause blk_mq_hctx_notify_offline() to hang
indefinitely while waiting for pending request to complete.
Skip the request waiting loop and abort suspend when wakeup events are
pending to prevent the deadlock.
Fixes: bf... | ```diff
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 4e96bb246247..bd8b11c472a2 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -23,6 +23,7 @@
#include <linux/cache.h>
#include <linux/sched/topology.h>
#include <linux/sched/signal.h>
+#include <linux/suspend.h>
#include <linux/delay.h>
#include <linux/cr... |
84230ad2d2afbf0c44c32967e525c0ad92e26b4e | Analyze and fix the following issue in the Linux kernel code: io_uring/poll: correctly handle io_poll_add() return value on update | Problem Details:
When the core of io_uring was updated to handle completions
consistently and with fixed return codes, the POLL_REMOVE opcode
with updates got slightly broken. If a POLL_ADD is pending and
then POLL_REMOVE is used to update the events of that request, if that
update causes the POLL_ADD to now trigger, t... | ```diff
diff --git a/io_uring/poll.c b/io_uring/poll.c
index 8aa4e3a31e73..3f1d716dcfab 100644
--- a/io_uring/poll.c
+++ b/io_uring/poll.c
@@ -937,12 +937,17 @@ int io_poll_remove(struct io_kiocb *req, unsigned int issue_flags)
ret2 = io_poll_add(preq, issue_flags & ~IO_URING_F_UNLOCKED);
/* successfully update... |
308eeb8ca3fdee54bcd3ec7272c05688e178299a | Analyze and fix the following issue in the Linux kernel code: drm/rcar-du: dsi: Handle both DRM_MODE_FLAG_N.SYNC and !DRM_MODE_FLAG_P.SYNC | Problem Details:
Since commit 94fe479fae96 ("drm/rcar-du: dsi: Clean up handling of DRM mode flags")
the driver does not set TXVMVPRMSET0R_VSPOL_LOW and TXVMVPRMSET0R_HSPOL_LOW
for modes which set neither DRM_MODE_FLAG_[PN].SYNC. The previous behavior
was to assume that neither flag means DRM_MODE_FLAG_N.SYNC . Restore... | ```diff
diff --git a/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c b/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c
index 9413b76d0bfc..4ef2e3c129ed 100644
--- a/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c
+++ b/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c
@@ -492,9 +492,9 @@ static void rcar_mipi_dsi_set_dis... |
0c57ff008a11f24f7f05fa760222692a00465fec | Analyze and fix the following issue in the Linux kernel code: ipvlan: Ignore PACKET_LOOPBACK in handle_mode_l2() | Problem Details:
Packets with pkt_type == PACKET_LOOPBACK are captured by
handle_frame() function, but they don't have L2 header.
We should not process them in handle_mode_l2().
This doesn't affect old L2 functionality, since handling
was anyway incorrect.
Handle them the same way as in br_handle_frame():
just pass t... | ```diff
diff --git a/drivers/net/ipvlan/ipvlan_core.c b/drivers/net/ipvlan/ipvlan_core.c
index dea411e132db..2efa3ba148aa 100644
--- a/drivers/net/ipvlan/ipvlan_core.c
+++ b/drivers/net/ipvlan/ipvlan_core.c
@@ -737,6 +737,9 @@ static rx_handler_result_t ipvlan_handle_mode_l2(struct sk_buff **pskb,
struct ethhdr *eth ... |
5b48f49ee94888f3cd4360286ee9921eff2b2e46 | Analyze and fix the following issue in the Linux kernel code: net: dsa: mxl-gsw1xx: fix SerDes RX polarity | Problem Details:
According to MaxLinear engineer Benny Weng the RX lane of the SerDes
port of the GSW1xx switches is inverted in hardware, and the
SGMII_PHY_RX0_CFG2_INVERT bit is set by default in order to compensate
for that. Hence also set the SGMII_PHY_RX0_CFG2_INVERT bit by default in
gsw1xx_pcs_reset().
Fixes: 2... | ```diff
diff --git a/drivers/net/dsa/lantiq/mxl-gsw1xx.c b/drivers/net/dsa/lantiq/mxl-gsw1xx.c
index 0816c61a47f1..cf33a16fd183 100644
--- a/drivers/net/dsa/lantiq/mxl-gsw1xx.c
+++ b/drivers/net/dsa/lantiq/mxl-gsw1xx.c
@@ -255,10 +255,16 @@ static int gsw1xx_pcs_reset(struct gsw1xx_priv *priv)
FIELD_PREP(GSW1XX... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.