id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
5c8752729970cc2323ba86817254749f7f21f163
Analyze and fix the following issue in the Linux kernel code: VFS/nfsd/ovl: introduce start_renaming() and end_renaming()
Problem Details: start_renaming() combines name lookup and locking to prepare for rename. It is used when two names need to be looked up as in nfsd and overlayfs - cases where one or both dentries are already available will be handled separately. __start_renaming() avoids the inode_permission check and hash calculatio...
```diff diff --git a/fs/namei.c b/fs/namei.c index 04d2819bd351..0ee0a110b088 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -3667,6 +3667,129 @@ void unlock_rename(struct dentry *p1, struct dentry *p2) } EXPORT_SYMBOL(unlock_rename); +/** + * __start_renaming - lookup and lock names for rename + * @rd: rena...
ff7c4ea11a05c886f018fff4a4d4f4d68d951e25
Analyze and fix the following issue in the Linux kernel code: VFS: add start_creating_killable() and start_removing_killable()
Problem Details: These are similar to start_creating() and start_removing(), but allow a fatal signal to abort waiting for the lock. They are used in btrfs for subvol creation and removal. btrfs_may_create() no longer needs IS_DEADDIR() and start_creating_killable() includes that check. Reviewed-by: Amir Goldstein <...
```diff diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 185bef0df1c2..4fbfdd8faf6a 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -904,14 +904,9 @@ static noinline int btrfs_mksubvol(struct dentry *parent, struct fscrypt_str name_str = FSTR_INIT((char *)qname->name, qname->len); int ret; - ret = d...
c9ba789dad15ba65662bba17595c0aeaa0cfcf1c
Analyze and fix the following issue in the Linux kernel code: VFS: introduce start_creating_noperm() and start_removing_noperm()
Problem Details: xfs, fuse, ipc/mqueue need variants of start_creating or start_removing which do not check permissions. This patch adds _noperm versions of these functions. Note that do_mq_open() was only calling mntget() so it could call path_put() - it didn't really need an extra reference on the mnt. Now it doesn'...
```diff diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index ecaec0fea3a1..40ca94922349 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -1397,27 +1397,25 @@ int fuse_reverse_inval_entry(struct fuse_conn *fc, u64 parent_nodeid, if (!parent) return -ENOENT; - inode_lock_nested(parent, I_MUTEX_PARENT); if (!S_ISDIR...
bd6ede8a06e89ca5a94a8b51cea792705d1b8ca2
Analyze and fix the following issue in the Linux kernel code: VFS/nfsd/cachefiles/ovl: introduce start_removing() and end_removing()
Problem Details: start_removing() is similar to start_creating() but will only return a positive dentry with the expectation that it will be removed. This is used by nfsd, cachefiles, and overlayfs. They are changed to also use end_removing() to terminate the action begun by start_removing(). This is a simple alias ...
```diff diff --git a/fs/cachefiles/namei.c b/fs/cachefiles/namei.c index 0a136eb434da..c7f0c6ab9b88 100644 --- a/fs/cachefiles/namei.c +++ b/fs/cachefiles/namei.c @@ -260,6 +260,7 @@ static int cachefiles_unlink(struct cachefiles_cache *cache, * - File backed objects are unlinked * - Directory backed objects are st...
7ab96df840e60eb933abfe65fc5fe44e72f16dc0
Analyze and fix the following issue in the Linux kernel code: VFS/nfsd/cachefiles/ovl: add start_creating() and end_creating()
Problem Details: start_creating() is similar to simple_start_creating() but is not so simple. It takes a qstr for the name, includes permission checking, and does NOT report an error if the name already exists, returning a positive dentry instead. This is currently used by nfsd, cachefiles, and overlayfs. end_creatin...
```diff diff --git a/fs/cachefiles/namei.c b/fs/cachefiles/namei.c index d1edb2ac3837..0a136eb434da 100644 --- a/fs/cachefiles/namei.c +++ b/fs/cachefiles/namei.c @@ -93,12 +93,11 @@ struct dentry *cachefiles_get_directory(struct cachefiles_cache *cache, _enter(",,%s", dirname); /* search the current directory fo...
3661a7887462b2352ef5199a04e79c3d3c11fff3
Analyze and fix the following issue in the Linux kernel code: VFS: tidy up do_unlinkat()
Problem Details: The simplification of locking in the previous patch opens up some room for tidying up do_unlinkat() - change all "exit" labels to describe what will happen at the label. - always goto an exit label on an error - unwrap the "if (!IS_ERR())" branch. - Move the "slashes" handing inline, but mark it as un...
```diff diff --git a/fs/namei.c b/fs/namei.c index 3618efd4bcaa..9effaad115d9 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -4755,65 +4755,62 @@ int do_unlinkat(int dfd, struct filename *name) struct path path; struct qstr last; int type; - struct inode *inode = NULL; + struct inode *inode; struct inode *delegate...
4037d966f034ba5da2872c413b2ec17eca867e68
Analyze and fix the following issue in the Linux kernel code: VFS: introduce start_dirop() and end_dirop()
Problem Details: The fact that directory operations (create,remove,rename) are protected by a lock on the parent is known widely throughout the kernel. In order to change this - to instead lock the target dentry - it is best to centralise this knowledge so it can be changed in one place. This patch introduces start_d...
```diff diff --git a/fs/internal.h b/fs/internal.h index 9b2b4d116880..d08d5e2235e9 100644 --- a/fs/internal.h +++ b/fs/internal.h @@ -67,6 +67,9 @@ int vfs_tmpfile(struct mnt_idmap *idmap, const struct path *parentpath, struct file *file, umode_t mode); struct dentry *d_hash_and_lookup(struct dentry *, struct q...
8b45b9a882338e1e4daf7eac46e3bad30e9bfde3
Analyze and fix the following issue in the Linux kernel code: debugfs: rename end_creating() to debugfs_end_creating()
Problem Details: By not using the generic end_creating() name here we are free to use it more globally for a more generic function. This should have been done when start_creating() was renamed. For consistency, also rename failed_creating(). Reviewed-by: Amir Goldstein <amir73il@gmail.com> Reviewed-by: Jeff Layton <j...
```diff diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c index 661a99a7dfbe..f241b9df642a 100644 --- a/fs/debugfs/inode.c +++ b/fs/debugfs/inode.c @@ -403,7 +403,7 @@ static struct dentry *debugfs_start_creating(const char *name, return dentry; } -static struct dentry *failed_creating(struct dentry *dentry) +s...
5654889a94b0de5ad6ceae3793e7f5e0b61b50b6
Analyze and fix the following issue in the Linux kernel code: ARM: dts: microchip: sama7g5: fix uart fifo size to 32
Problem Details: On some flexcom nodes related to uart, the fifo sizes were wrong: fix them to 32 data. Fixes: 7540629e2fc7 ("ARM: dts: at91: add sama7g5 SoC DT and sama7g5-ek") Cc: stable@vger.kernel.org # 5.15+ Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com> Link: https://lore.kernel.org/r/20251114103313....
```diff diff --git a/arch/arm/boot/dts/microchip/sama7g5.dtsi b/arch/arm/boot/dts/microchip/sama7g5.dtsi index 381cbcfcb34a..03ef3d9aaeec 100644 --- a/arch/arm/boot/dts/microchip/sama7g5.dtsi +++ b/arch/arm/boot/dts/microchip/sama7g5.dtsi @@ -824,7 +824,7 @@ dma-names = "tx", "rx"; atmel,use-dma-rx; atme...
1f591be0a02c697f65a21be35f1d74117bbf4be2
Analyze and fix the following issue in the Linux kernel code: ARM: dts: microchip: sama7d65: fix uart fifo size to 32
Problem Details: On some flexcom nodes related to uart, the fifo sizes were wrong: fix them to 32 data. Note that product datasheet is being reviewed to fix inconsistency, but this value is validated by product's designers. Fixes: 261dcfad1b59 ("ARM: dts: microchip: add sama7d65 SoC DT") Fixes: b51e4aea3ecf ("ARM: dt...
```diff diff --git a/arch/arm/boot/dts/microchip/sama7d65.dtsi b/arch/arm/boot/dts/microchip/sama7d65.dtsi index e53e2dd6d530..cd2cf9a6f40b 100644 --- a/arch/arm/boot/dts/microchip/sama7d65.dtsi +++ b/arch/arm/boot/dts/microchip/sama7d65.dtsi @@ -557,7 +557,7 @@ dma-names = "tx", "rx"; atmel,use-dma-rx; ...
cc7d6c65b8df0587de7541031dd91b7ee751a4b6
Analyze and fix the following issue in the Linux kernel code: nstree: fix kernel-doc comments for internal functions
Problem Details: Documentation build reported: Warning: kernel/nstree.c:325 function parameter 'ns_tree' not described in '__ns_tree_adjoined_rcu' Warning: kernel/nstree.c:325 expecting prototype for ns_tree_adjoined_rcu(). Prototype was for __ns_tree_adjoined_rcu() instead Warning: kernel/nstree.c:353 expecting...
```diff diff --git a/kernel/nstree.c b/kernel/nstree.c index 5270e0fa67a2..f36c59e6951d 100644 --- a/kernel/nstree.c +++ b/kernel/nstree.c @@ -353,9 +353,10 @@ struct ns_common *ns_tree_lookup_rcu(u64 ns_id, int ns_type) } /** - * ns_tree_adjoined_rcu - find the next/previous namespace in the same + * __ns_tree_adj...
cefd55bd2159f427228d44864747243946296739
Analyze and fix the following issue in the Linux kernel code: nsproxy: fix free_nsproxy() and simplify create_new_namespaces()
Problem Details: Make it possible to handle NULL being passed to the reference count helpers instead of forcing the caller to handle this. Afterwards we can nicely allow a cleanup guard to handle nsproxy freeing. Active reference count handling is not done in nsproxy_free() but rather in free_nsproxy() as nsproxy_free...
```diff diff --git a/include/linux/ns_common.h b/include/linux/ns_common.h index 136f6a322e53..825f5865bfc5 100644 --- a/include/linux/ns_common.h +++ b/include/linux/ns_common.h @@ -114,11 +114,14 @@ static __always_inline __must_check bool __ns_ref_dec_and_lock(struct ns_common } #define ns_ref_read(__ns) __ns_re...
e1a97a627cd01d73fac5dd054d8f3de601ef2781
Analyze and fix the following issue in the Linux kernel code: x86/CPU/AMD: Add additional fixed RDSEED microcode revisions
Problem Details: Microcode that resolves the RDSEED failure (SB-7055 [1]) has been released for additional Zen5 models to linux-firmware [2]. Update the zen5_rdseed_microcode array to cover these new models. Fixes: 607b9fb2ce24 ("x86/CPU/AMD: Add RDSEED fix for Zen5") Signed-off-by: Mario Limonciello <mario.limonciell...
```diff diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index 2ba9f2d42d8c..5d46709c58d0 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c @@ -1037,7 +1037,14 @@ static void init_amd_zen4(struct cpuinfo_x86 *c) static const struct x86_cpu_id zen5_rdseed_microcode[] = { ZEN_M...
89605daa1ee0de634d7f2ee6370363cfaa8c9499
Analyze and fix the following issue in the Linux kernel code: gpu: nova-core: num: add functions to safely convert a const value to a smaller type
Problem Details: There are times where we need to store a constant value defined as a larger type (e.g. through a binding) into a smaller type, knowing that the value will fit. Rust, unfortunately, only provides us with the `as` operator for that purpose, the use of which is discouraged as it silently strips data. Ext...
```diff diff --git a/drivers/gpu/nova-core/num.rs b/drivers/gpu/nova-core/num.rs index 92a91b9e30de..c952a834e662 100644 --- a/drivers/gpu/nova-core/num.rs +++ b/drivers/gpu/nova-core/num.rs @@ -163,3 +163,55 @@ where T::from_safe_cast(self) } } + +/// Implements lossless conversion of a constant from a ...
5f7ff902e7f324c10f2b64c5ba2e5e2d0bc4e07e
Analyze and fix the following issue in the Linux kernel code: pwm: Use %u to printf unsigned int pwm_chip::npwm and pwm_chip::id
Problem Details: %u is the right conversion specifier to emit an unsigned int value. Fixes: 62099abf67a2 ("pwm: Add debugfs interface") Fixes: 0360a4873372 ("pwm: Mention PWM chip ID in /sys/kernel/debug/pwm") Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Link: https://patch.msgid.link/20251006133525....
```diff diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c index 5b75f4a08496..7dd1cf2ba402 100644 --- a/drivers/pwm/core.c +++ b/drivers/pwm/core.c @@ -2696,7 +2696,7 @@ static int pwm_seq_show(struct seq_file *s, void *v) { struct pwm_chip *chip = v; - seq_printf(s, "%s%d: %s/%s, npwm: %d\n", + seq_printf(s, "...
f84fd5bec502447df145f31734793714690ce27f
Analyze and fix the following issue in the Linux kernel code: pwm: adp5585: Correct mismatched pwm chip info
Problem Details: The register addresses of ADP5585 and ADP5589 are swapped. Fixes: 75024f97e82e ("pwm: adp5585: add support for adp5589") Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com> Acked-by: Nuno Sá <nuno.sa@analog.com> Tested-by: Liu Ying <victor.liu@nxp.com> # ADP5585 PWM Link: https://patch.msgid.link/20251114...
```diff diff --git a/drivers/pwm/pwm-adp5585.c b/drivers/pwm/pwm-adp5585.c index dc2860979e24..806f8d79b0d7 100644 --- a/drivers/pwm/pwm-adp5585.c +++ b/drivers/pwm/pwm-adp5585.c @@ -190,13 +190,13 @@ static int adp5585_pwm_probe(struct platform_device *pdev) return 0; } -static const struct adp5585_pwm_chip adp55...
14e4e4175b64dd9216b522f6ece8af6997d063b2
Analyze and fix the following issue in the Linux kernel code: s390/fpu: Fix false-positive kmsan report in fpu_vstl()
Problem Details: A false-positive kmsan report is detected when running ping command. An inline assembly instruction 'vstl' can write varied amount of bytes depending on value of 'index' argument. If 'index' > 0, 'vstl' writes at least 2 bytes. clang generates kmsan write helper call depending on inline assembly cons...
```diff diff --git a/arch/s390/include/asm/fpu-insn.h b/arch/s390/include/asm/fpu-insn.h index e99f8bca8e08..96727f3bd0dc 100644 --- a/arch/s390/include/asm/fpu-insn.h +++ b/arch/s390/include/asm/fpu-insn.h @@ -12,6 +12,7 @@ #ifndef __ASSEMBLER__ #include <linux/instrumented.h> +#include <linux/kmsan.h> #include <...
abc524caa1382a56f82d07d0621b7fa80f33e207
Analyze and fix the following issue in the Linux kernel code: s390/pai_crypto: Rename variable cfm_dbg
Problem Details: The global variable cfm_dbg points to the s390dbf debug buffer. Rename it to paidbg to better reflect its purpose. No functional change. Signed-off-by: Thomas Richter <tmricht@linux.ibm.com> Reviewed-by: Jan Polensky <japo@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
```diff diff --git a/arch/s390/kernel/perf_pai_crypto.c b/arch/s390/kernel/perf_pai_crypto.c index 9b06b8a83342..ff0be76e4441 100644 --- a/arch/s390/kernel/perf_pai_crypto.c +++ b/arch/s390/kernel/perf_pai_crypto.c @@ -19,7 +19,7 @@ #include <asm/pai.h> #include <asm/debug.h> -static debug_info_t *cfm_dbg; +static ...
76ce17f6f7f78ab79b9741388bdb4dafa985b4e9
Analyze and fix the following issue in the Linux kernel code: crypto: iaa - Fix incorrect return value in save_iaa_wq()
Problem Details: The save_iaa_wq() function unconditionally returns 0, even when an error is encountered. This prevents the error code from being propagated to the caller. Fix this by returning the 'ret' variable, which holds the actual status of the operations within the function. Fixes: ea7a5cbb43696 ("crypto: iaa ...
```diff diff --git a/drivers/crypto/intel/iaa/iaa_crypto_main.c b/drivers/crypto/intel/iaa/iaa_crypto_main.c index 23f585219fb4..d0058757b000 100644 --- a/drivers/crypto/intel/iaa/iaa_crypto_main.c +++ b/drivers/crypto/intel/iaa/iaa_crypto_main.c @@ -805,7 +805,7 @@ static int save_iaa_wq(struct idxd_wq *wq) if (!cpu...
af3852cda347a72335c7625f92b29d31495aeeda
Analyze and fix the following issue in the Linux kernel code: padata: remove __padata_list_init()
Problem Details: syzbot is reporting possibility of deadlock due to sharing lock_class_key between padata_init_squeues() and padata_init_reorder_list(). This is a false positive, for these callers initialize different object. Unshare lock_class_key by embedding __padata_list_init() into these callers. Reported-by: syz...
```diff diff --git a/kernel/padata.c b/kernel/padata.c index f4def028c48c..aa66d91e20f9 100644 --- a/kernel/padata.c +++ b/kernel/padata.c @@ -506,12 +506,6 @@ void __init padata_do_multithreaded(struct padata_mt_job *job) padata_works_free(&works); } -static void __padata_list_init(struct padata_list *pd_list) -{...
d52e9b8843749f446dff2afcfc5da3d8bbe806cc
Analyze and fix the following issue in the Linux kernel code: crypto: rockchip - drop redundant crypto_skcipher_ivsize() calls
Problem Details: The function already initialized the ivsize variable at the point of declaration, let's use it instead of calling crypto_skcipher_ivsize() extra couple times. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 57d67c6e8219 ("crypto: rockchip - rework by using crypto_engine") Sig...
```diff diff --git a/drivers/crypto/rockchip/rk3288_crypto_skcipher.c b/drivers/crypto/rockchip/rk3288_crypto_skcipher.c index 9393e10671c2..e80f9148c012 100644 --- a/drivers/crypto/rockchip/rk3288_crypto_skcipher.c +++ b/drivers/crypto/rockchip/rk3288_crypto_skcipher.c @@ -321,8 +321,7 @@ static int rk_cipher_run(stru...
a55ef3bff84f11ee8c84a1ae29b071ffd4ccbbd9
Analyze and fix the following issue in the Linux kernel code: xfrm: fix memory leak in xfrm_add_acquire()
Problem Details: The xfrm_add_acquire() function constructs an xfrm policy by calling xfrm_policy_construct(). This allocates the policy structure and potentially associates a security context and a device policy with it. However, at the end of the function, the policy object is freed using only kfree() . This skips t...
```diff diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index 9d98cc9daa37..403b5ecac2c5 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c @@ -3038,6 +3038,9 @@ static int xfrm_add_acquire(struct sk_buff *skb, struct nlmsghdr *nlh, } xfrm_state_free(x); + xfrm_dev_policy_delete(xp); + xfrm_dev...
3bae4748c1cdd51f5d25b6c2fcf5a5634ab686f1
Analyze and fix the following issue in the Linux kernel code: bus: rifsc: add debugfs entry to dump the firewall configuration
Problem Details: RIFSC configuration can be difficult to debug. Add a debugfs entry that dumps the configuration of the RISUPs, the RISALs and the RIMUs. This will allow to display the whole RIFSC firewall configuration at runtime. While there, fix a bug on the computation of firewall entries in the probe function. S...
```diff diff --git a/drivers/bus/stm32_rifsc.c b/drivers/bus/stm32_rifsc.c index 4cf1b60014b7..debeaf8ea1bd 100644 --- a/drivers/bus/stm32_rifsc.c +++ b/drivers/bus/stm32_rifsc.c @@ -5,6 +5,7 @@ #include <linux/bitfield.h> #include <linux/bits.h> +#include <linux/debugfs.h> #include <linux/device.h> #include <lin...
22f0ae971cf5536349521853737d3e06203286d8
Analyze and fix the following issue in the Linux kernel code: arm64: dts: st: Add memory-region-names property for stm32mp257f-ev1
Problem Details: In order to set the AMCR register, which configures the memory-region split between ospi1 and ospi2, we need to identify the ospi instance. By using memory-region-names, it allows to identify the ospi instance this memory-region belongs to. Fixes: cad2492de91c ("arm64: dts: st: Add SPI NOR flash supp...
```diff diff --git a/arch/arm64/boot/dts/st/stm32mp257f-ev1.dts b/arch/arm64/boot/dts/st/stm32mp257f-ev1.dts index 6e165073f732..bb6d6393d2e4 100644 --- a/arch/arm64/boot/dts/st/stm32mp257f-ev1.dts +++ b/arch/arm64/boot/dts/st/stm32mp257f-ev1.dts @@ -266,6 +266,7 @@ &ommanager { memory-region = <&mm_ospi1>; + memo...
ac5ae0a5ce22640f73677d40730a37f43df442d1
Analyze and fix the following issue in the Linux kernel code: tee: qcomtee: fix uninitialized pointers with free attribute
Problem Details: Uninitialized pointers with `__free` attribute can cause undefined behavior as the memory assigned randomly to the pointer is freed automatically when the pointer goes out of scope. qcomtee doesn't have any bugs related to this as of now, but it is better to initialize and assign pointers with `__free...
```diff diff --git a/drivers/tee/qcomtee/call.c b/drivers/tee/qcomtee/call.c index cc17a48d0ab7..92e869f7467d 100644 --- a/drivers/tee/qcomtee/call.c +++ b/drivers/tee/qcomtee/call.c @@ -645,7 +645,7 @@ static void qcomtee_get_version(struct tee_device *teedev, static void qcomtee_get_qtee_feature_list(struct tee_cont...
c1932fb85af8e51ac9f6bd9947145b06c716106e
Analyze and fix the following issue in the Linux kernel code: perf vendor metrics s390: Avoid has_event(INSTRUCTIONS)
Problem Details: The instructions event is now provided in json meaning the has_event test always succeeds. Switch to using non-legacy event names in the affected metrics. Reported-by: Thomas Richter <tmricht@linux.ibm.com> Closes: https://lore.kernel.org/linux-perf-users/3e80f453-f015-4f4f-93d3-8df6bb6b3c95@linux.ibm...
```diff diff --git a/tools/perf/pmu-events/arch/s390/cf_z16/transaction.json b/tools/perf/pmu-events/arch/s390/cf_z16/transaction.json index 3ab1d3a6638c..57b785307a85 100644 --- a/tools/perf/pmu-events/arch/s390/cf_z16/transaction.json +++ b/tools/perf/pmu-events/arch/s390/cf_z16/transaction.json @@ -7,17 +7,17 @@ ...
ca016b6527e154013693722a2cdbec7c05fb6df7
Analyze and fix the following issue in the Linux kernel code: perf auxtrace: Remove errno.h from auxtrace.h and fix transitive dependencies
Problem Details: errno.h isn't used in auxtrace.h so remove it and fix build failures caused by transitive dependencies through auxtrace.h on errno.h. Signed-off-by: Ian Rogers <irogers@google.com> Reviewed-by: James Clark <james.clark@linaro.org> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
```diff diff --git a/tools/perf/arch/arm/annotate/instructions.c b/tools/perf/arch/arm/annotate/instructions.c index cf91a43362b0..5e667b0f5512 100644 --- a/tools/perf/arch/arm/annotate/instructions.c +++ b/tools/perf/arch/arm/annotate/instructions.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 #include <linux...
74c4efe691e7efd22e53ab22927042416d28e401
Analyze and fix the following issue in the Linux kernel code: drm/msm/dpu: fix mixer number counter on allocation
Problem Details: Current code only supports usage cases with one pair of mixers at most. To support quad-pipe usage case, two pairs of mixers need to be reserved. The lm_count for all pairs is cleared if a peer allocation fails in current implementation. Reset the current lm_count to an even number instead of completel...
```diff diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c index d9c3b0a1d091..f6568ed8375f 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c @@ -374,7 +374,11 @@ static int _dpu_rm_reserve_lms(struct dpu_rm *rm, if (!rm->mixer_...
762dd3eb0c0f51bb4f2ab00c2cd73d6534483752
Analyze and fix the following issue in the Linux kernel code: drm/msm/dpu: Remove dead-code in dpu_encoder_helper_reset_mixers()
Problem Details: 'mixer' is only zeroed and is not use. Remove it. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Acked-By: Mahesh Bharadwaj Kannan <mahesh.kannan@oss.qualcomm.com> Fixes: ae4d721ce100 ("drm/msm/dpu: add an API to rese...
```diff diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c index 258edaa18fc0..94de83e125f1 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c @@ -2171,15 +2171,12 @@ void dpu_encoder_kickoff(struct drm_encoder *...
2e12d91cbf3d0105fc58d07b8a0548ebd7bb619b
Analyze and fix the following issue in the Linux kernel code: clk: spacemit: fix comment typo
Problem Details: Fix incorrect comment to match the filename. Reviewd-by: Troy Mitchell <troy.mitchell@linux.spacemit.com> Signed-off-by: Encrow Thorne <jyc0019@gmail.com> Reviewed-by: Yixun Lan <dlan@gentoo.org> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
```diff diff --git a/drivers/clk/spacemit/ccu_mix.h b/drivers/clk/spacemit/ccu_mix.h index 54d40cd39b27..c406508e3504 100644 --- a/drivers/clk/spacemit/ccu_mix.h +++ b/drivers/clk/spacemit/ccu_mix.h @@ -220,4 +220,4 @@ extern const struct clk_ops spacemit_ccu_div_gate_ops; extern const struct clk_ops spacemit_ccu_mux_...
fa3542e822c99196a27f030e87eab5458072613a
Analyze and fix the following issue in the Linux kernel code: clk: keystone: Fix discarded const qualifiers
Problem Details: Add const qualifiers to the pointers returned from 'container_of' macro to prevent breaking the const promise on const struct pointers from parameters. Once you have a mutable container structure pointer, you can change structure fields through it, which violates the const guarantee. Signed-off-by: A...
```diff diff --git a/drivers/clk/keystone/sci-clk.c b/drivers/clk/keystone/sci-clk.c index a4b42811de55..9d5071223f4c 100644 --- a/drivers/clk/keystone/sci-clk.c +++ b/drivers/clk/keystone/sci-clk.c @@ -496,8 +496,8 @@ static int ti_sci_scan_clocks_from_fw(struct sci_clk_provider *provider) static int _cmp_sci_clk_lis...
55f943c6af6d12a1b44978f7e87c90f9a9c05806
Analyze and fix the following issue in the Linux kernel code: net: pcs: xpcs-plat: fix MODULE_AUTHOR
Problem Details: This field needs to hold just Serge's name. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Link: https://patch.msgid.link/20251112211118.700875-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
```diff diff --git a/drivers/net/pcs/pcs-xpcs-plat.c b/drivers/net/pcs/pcs-xpcs-plat.c index 9e1ccc319a1d..c422e8d8b89f 100644 --- a/drivers/net/pcs/pcs-xpcs-plat.c +++ b/drivers/net/pcs/pcs-xpcs-plat.c @@ -456,5 +456,5 @@ static struct platform_driver xpcs_plat_driver = { module_platform_driver(xpcs_plat_driver); ...
992b7d5fd8a889dc77e384143ad5b4f5fe2a70de
Analyze and fix the following issue in the Linux kernel code: dpll: zl3073x: fix kernel-doc name and missing parameter in fw.c
Problem Details: Documentation build reported: Warning: drivers/dpll/zl3073x/fw.c:365 function parameter 'comp' not described in 'zl3073x_fw_component_flash' Warning: drivers/dpll/zl3073x/fw.c:365 expecting prototype for zl3073x_flash_bundle_flash(). Prototype was for zl3073x_fw_component_flash() instead Warning...
```diff diff --git a/drivers/dpll/zl3073x/fw.c b/drivers/dpll/zl3073x/fw.c index def37fe8d9b0..55b638247f4b 100644 --- a/drivers/dpll/zl3073x/fw.c +++ b/drivers/dpll/zl3073x/fw.c @@ -352,12 +352,12 @@ struct zl3073x_fw *zl3073x_fw_load(struct zl3073x_dev *zldev, const char *data, } /** - * zl3073x_flash_bundle_flas...
407a06507c2358554958e8164dc97176feddcafc
Analyze and fix the following issue in the Linux kernel code: mlxsw: spectrum: Fix memory leak in mlxsw_sp_flower_stats()
Problem Details: The function mlxsw_sp_flower_stats() calls mlxsw_sp_acl_ruleset_get() to obtain a ruleset reference. If the subsequent call to mlxsw_sp_acl_rule_lookup() fails to find a rule, the function returns an error without releasing the ruleset reference, causing a memory leak. Fix this by using a goto to the ...
```diff diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c index 6a4a81c63451..353fd9ca89a6 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c @@ -830,8 +830,10 @@ int mlxs...
f796a8dec9beafcc0f6f0d3478ed685a15c5e062
Analyze and fix the following issue in the Linux kernel code: net: core: prevent NULL deref in generic_hwtstamp_ioctl_lower()
Problem Details: The ethtool tsconfig Netlink path can trigger a null pointer dereference. A call chain such as: tsconfig_prepare_data() -> dev_get_hwtstamp_phylib() -> vlan_hwtstamp_get() -> generic_hwtstamp_get_lower() -> generic_hwtstamp_ioctl_lower() results in generic_hwtstamp_ioctl_lower() being calle...
```diff diff --git a/net/core/dev_ioctl.c b/net/core/dev_ioctl.c index ad54b12d4b4c..8bb71a10dba0 100644 --- a/net/core/dev_ioctl.c +++ b/net/core/dev_ioctl.c @@ -443,6 +443,9 @@ static int generic_hwtstamp_ioctl_lower(struct net_device *dev, int cmd, struct ifreq ifrr; int err; + if (!kernel_cfg->ifr) + return ...
110c155e8a684d8b2423a72cfde147903881f765
Analyze and fix the following issue in the Linux kernel code: drivers/virt: Drop VIRT_DRIVERS build dependency
Problem Details: All of the objects in drivers/virt/ have their own configuration symbols to gate compilation. I.e. nothing gets added to the kernel with CONFIG_VIRT_DRIVERS=y in isolation. Unconditionally descend into drivers/virt/ so that consumers do not need to add an additional CONFIG_VIRT_DRIVERS dependency. Fi...
```diff diff --git a/drivers/Makefile b/drivers/Makefile index 8e1ffa4358d5..f660cb4e55ed 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -160,7 +160,7 @@ obj-$(CONFIG_RPMSG) += rpmsg/ obj-$(CONFIG_SOUNDWIRE) += soundwire/ # Virtualization drivers -obj-$(CONFIG_VIRT_DRIVERS) += virt/ +obj-y += virt/ o...
b5414520793e68d266fdd97a84989d9831156aad
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: fix PCIe 3.3V regulator voltage on orangepi-5
Problem Details: The vcc3v3_pcie20 fixed regulator powers the PCIe device-side 3.3V rail for pcie2x1l2 via vpcie3v3-supply. The DTS mistakenly set its regulator-min/max-microvolt to 1800000 (1.8 V). Correct both to 3300000 (3.3 V) to match the rail name, the PCIe/M.2 power requirement, and the actual hardware wiring on...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dts b/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dts index ad6d04793b0a..83b9b6645a1e 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dts @@ -14,8 +14,8 @@ gpios = <&gpio0 ...
baa18d577cd445145039e731d3de0fa49ca57204
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: disable HS400 on RK3588 Tiger
Problem Details: We've had reports from the field that some RK3588 Tiger have random issues with eMMC errors. Applying commit a28352cf2d2f ("mmc: sdhci-of-dwcmshc: Change DLL_STRBIN_TAPNUM_DEFAULT to 0x4") didn't help and seemed to have made things worse for our board. Our HW department checked the eMMC lines and rep...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3588-tiger.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-tiger.dtsi index b44e89e1bb15..365c1d958f2d 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-tiger.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3588-tiger.dtsi @@ -382,14 +382,12 @@ cap-mmc-highspeed; mmc-ddr-1_8v...
ed490f36f439b877393c12a2113601e4145a5a56
Analyze and fix the following issue in the Linux kernel code: hfsplus: fix volume corruption issue for generic/070
Problem Details: The xfstests' test-case generic/070 leaves HFS+ volume in corrupted state: sudo ./check generic/070 FSTYP -- hfsplus PLATFORM -- Linux/x86_64 hfsplus-testing-0001 6.17.0-rc1+ #4 SMP PREEMPT_DYNAMIC Wed Oct 1 15:02:44 PDT 2025 MKFS_OPTIONS -- /dev/loop51 MOUNT_OPTIONS -- /dev/loop51 /mnt/scratch gener...
```diff diff --git a/fs/hfsplus/bnode.c b/fs/hfsplus/bnode.c index e83dc34c9b37..191661af9677 100644 --- a/fs/hfsplus/bnode.c +++ b/fs/hfsplus/bnode.c @@ -705,6 +705,5 @@ bool hfs_bnode_need_zeroout(struct hfs_btree *tree) struct hfsplus_sb_info *sbi = HFSPLUS_SB(sb); const u32 volume_attr = be32_to_cpu(sbi->s_vhdr...
9c79c9e03547068404cca5139dfea281d655ff90
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: fixes ethernet for 100ASK DshanPi A1
Problem Details: Currently, Ethernet is unusable due to an incorrect PHY address. This commit fixes this, removes the incorrect 25M clock pinctrl, and adds the missing PHY supply. Fixes: d809417c5a40 ("arm64: dts: rockchip: add DTs for 100ASK DShanPi A1") Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn> Link: https://pa...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3576-100ask-dshanpi-a1.dts b/arch/arm64/boot/dts/rockchip/rk3576-100ask-dshanpi-a1.dts index a399987c1bc2..7f64dfbf736e 100644 --- a/arch/arm64/boot/dts/rockchip/rk3576-100ask-dshanpi-a1.dts +++ b/arch/arm64/boot/dts/rockchip/rk3576-100ask-dshanpi-a1.dts @@ -190,6 +19...
0b822c59c826f47dc63d9470b4710bd251266cae
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: fixes regulator for 100ASK DshanPi A1
Problem Details: Referencing the schematic [1], correct the names of the USB regulator, remove these non-existent RTC and UFS regulators. [1] https://dl.100ask.net/Hardware/MPU/RK3576-DshanPi-A1/DshanPi-A1-RK3576-SCH_V1.1.pdf Fixes: d809417c5a40 ("arm64: dts: rockchip: add DTs for 100ASK DShanPi A1") Signed-off-by: C...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3576-100ask-dshanpi-a1.dts b/arch/arm64/boot/dts/rockchip/rk3576-100ask-dshanpi-a1.dts index 59c172573cf8..a399987c1bc2 100644 --- a/arch/arm64/boot/dts/rockchip/rk3576-100ask-dshanpi-a1.dts +++ b/arch/arm64/boot/dts/rockchip/rk3576-100ask-dshanpi-a1.dts @@ -83,16 +83...
152af114287851583cf7e0abc10129941f19466a
Analyze and fix the following issue in the Linux kernel code: hfsplus: fix missing hfs_bnode_get() in __hfs_bnode_create
Problem Details: When sync() and link() are called concurrently, both threads may enter hfs_bnode_find() without finding the node in the hash table and proceed to create it. Thread A: hfsplus_write_inode() -> hfsplus_write_system_inode() -> hfs_btree_write() -> hfs_bnode_find(tree, 0) -> ...
```diff diff --git a/fs/hfsplus/bnode.c b/fs/hfsplus/bnode.c index 63e652ad1e0d..63768cf0cb1b 100644 --- a/fs/hfsplus/bnode.c +++ b/fs/hfsplus/bnode.c @@ -481,6 +481,7 @@ static struct hfs_bnode *__hfs_bnode_create(struct hfs_btree *tree, u32 cnid) tree->node_hash[hash] = node; tree->node_hash_cnt++; } else { +...
264152a97edf9f1b7ed5372e4033e46108e41422
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: drop reset from rk3576 i2c9 node
Problem Details: The reset property is not part of the binding, so drop it. It is also not used by the driver, so it was likely copied from some vendor-kernel node. Fixes: 57b1ce903966 ("arm64: dts: rockchip: Add rk3576 SoC base DT") Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn> Link: https://patch.msgid.link/2025110...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3576.dtsi b/arch/arm64/boot/dts/rockchip/rk3576.dtsi index f0c3ab00a7f3..a86fc6b4e8c4 100644 --- a/arch/arm64/boot/dts/rockchip/rk3576.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3576.dtsi @@ -2549,8 +2549,6 @@ interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>; pinc...
c1ffe499306b26a61f390b7d83c5703aa8e2af55
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: clean up devicetree for 9Tripod X3568 v4
Problem Details: Fix indentation, remove unused SDIO properties, and drop the GMAC clock that was used for input direction. The board uses the clock as output, so the input clock is not needed. Signed-off-by: Coia Prant <coiaprant@gmail.com> Link: https://patch.msgid.link/20251107133839.300252-1-coiaprant@gmail.com Si...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3568-9tripod-x3568-v4.dts b/arch/arm64/boot/dts/rockchip/rk3568-9tripod-x3568-v4.dts index 443ed7d4b596..ad4d620603c6 100644 --- a/arch/arm64/boot/dts/rockchip/rk3568-9tripod-x3568-v4.dts +++ b/arch/arm64/boot/dts/rockchip/rk3568-9tripod-x3568-v4.dts @@ -273,11 +273,1...
3906f8558838841dad2bb96fc6ca10fe54a99f09
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: enable HDMI audio on Rock 5 ITX
Problem Details: The Rock 5 ITX only needs enablement for 2 nodes in order to send audio on HDMI1, the connector closer to the 12V barrel jack and farther from S/PDIF. It is sufficient to declare the audio injection as okay, and to activate I2S6. Note that for the other HDMI output it is not that trivial, as the vide...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts b/arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts index e9585cc84080..63f3d286c5d1 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts @@ -345,6 +345,10 @@ }; }; +&hdmi1_s...
260316d35cf8f8606c5ed7a349cc92e1e71d8150
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: Add eeprom vcc-supply for Radxa ROCK 3C
Problem Details: The VCC supply for the BL24C16 EEPROM chip found on Radxa ROCK 3C is vcca1v8_pmu. [1] Describe this supply. [1] https://dl.radxa.com/rock3/docs/hw/3c/v1400/radxa_rock_3c_v1400_schematic.pdf p.13 Fixes: ee219017ddb50 ("arm64: dts: rockchip: Add Radxa ROCK 3C") Signed-off-by: FUKAUMI Naoki <naoki@radxa...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3566-rock-3c.dts b/arch/arm64/boot/dts/rockchip/rk3566-rock-3c.dts index 6224d72813e5..80ac40555e02 100644 --- a/arch/arm64/boot/dts/rockchip/rk3566-rock-3c.dts +++ b/arch/arm64/boot/dts/rockchip/rk3566-rock-3c.dts @@ -466,6 +466,7 @@ compatible = "belling,bl24c16a...
3069ff1930aa71e125874c780ffaa6caeda5800a
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: Add eeprom vcc-supply for Radxa ROCK 5A
Problem Details: The VCC supply for the BL24C16 EEPROM chip found on Radxa ROCK 5A is vcc_3v3_pmu, which is routed to vcc_3v3_s3 via a zero-ohm resistor. [1] Describe this supply. [1] https://dl.radxa.com/rock5/5a/docs/hw/radxa_rock5a_V1.1_sch.pdf p.4, p.19 Fixes: 89c880808cff8 ("arm64: dts: rockchip: add I2C EEPROM ...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts b/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts index 6388dd6e68f3..c1e03b99a00f 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts @@ -233,6 +233,7 @@ compatible = "belling,bl24...
92e6e0b0e595afdda6296c760551ad3ffe9d5231
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: Move the EEPROM to correct I2C bus on Radxa ROCK 5A
Problem Details: The BL24C16 EEPROM chip found on Radxa ROCK 5A is connected to the i2c0 bus, [1] so move the eeprom node from the i2c2 bus to the i2c0 bus. [1] Link: https://dl.radxa.com/rock5/5a/docs/hw/radxa_rock5a_V1.1_sch.pdf p.19 Fixes: 89c880808cff8 ("arm64: dts: rockchip: add I2C EEPROM to rock-5a") Signed-of...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts b/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts index fa0dbb6b8ab7..6388dd6e68f3 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts @@ -228,6 +228,12 @@ regulator-off-in-suspend...
c7a9549ce46e7422e96e2b677ab578b32b3eef25
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: Switch microSD card detect to gpio on Radxa ROCK 5 ITX/5C
Problem Details: Due to the discussion about cd-gpios and sdmmmc_det pin functionality [1], it would be better to use cd-gpios for now. When the sdmmc controller runtime-suspends, the detection logic inside the controller cannot detect anything anymore, which using the gpio variant fixes. The Rock 5B/5B+/5T already u...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts b/arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts index bc8140883de4..4c218ae6677e 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts @@ -670,6 +670,12 @@ }; }; + mmc {...
9f4ce4878878cb9694c4284f7a483984d52d4d9a
Analyze and fix the following issue in the Linux kernel code: KVM: x86: Document a virtualization gap for GIF on AMD CPUs
Problem Details: According to the APM Volume #2, Section 15.17, Table 15-10 (24593—Rev. 3.42—March 2024), When "GIF==0", an "Debug exception or trap, due to breakpoint register match" should be "Ignored and discarded". KVM lacks any handling of this. Even when vGIF is enabled and vGIF==0, the CPU does not ignore #DBs ...
```diff diff --git a/Documentation/virt/kvm/x86/errata.rst b/Documentation/virt/kvm/x86/errata.rst index 37c79362a48f..a9cf0e004651 100644 --- a/Documentation/virt/kvm/x86/errata.rst +++ b/Documentation/virt/kvm/x86/errata.rst @@ -48,7 +48,14 @@ versus "has_error_code", i.e. KVM's ABI follows AMD behavior. Nested virt...
c77b3b79a92e3345aa1ee296180d1af4e7031f8f
Analyze and fix the following issue in the Linux kernel code: mptcp: Fix proto fallback detection with BPF
Problem Details: The sockmap feature allows bpf syscall from userspace, or based on bpf sockops, replacing the sk_prot of sockets during protocol stack processing with sockmap's custom read/write interfaces. ''' tcp_rcv_state_process() syn_recv_sock()/subflow_syn_recv_sock() tcp_init_transfer(BPF_SOCK_OPS_PASSIVE...
```diff diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index 2d6b8de35c44..90b4aeca2596 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -61,11 +61,13 @@ static u64 mptcp_wnd_end(const struct mptcp_sock *msk) static const struct proto_ops *mptcp_fallback_tcp_ops(const struct sock *sk) { + u...
4da3768e1820cf15cced390242d8789aed34f54d
Analyze and fix the following issue in the Linux kernel code: KVM: SVM: Don't skip unrelated instruction if INT3/INTO is replaced
Problem Details: When re-injecting a soft interrupt from an INT3, INT0, or (select) INTn instruction, discard the exception and retry the instruction if the code stream is changed (e.g. by a different vCPU) between when the CPU executes the instruction and when KVM decodes the instruction to get the next RIP. As effec...
```diff diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index 48598d017d6f..974d64bf0a4d 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -2143,6 +2143,11 @@ u64 vcpu_tsc_khz(struct kvm_vcpu *vcpu); * the gfn, i.e. retrying the instruction wil...
b72b8132d8fd2d6bf5b420a03d4fc553980c3a92
Analyze and fix the following issue in the Linux kernel code: perf libbfd: Ensure libbfd is initialized prior to use
Problem Details: Multiple threads may be creating and destroying BFD objects in situations like `perf top`. Without appropriate initialization crashes may occur during libbfd's cache management. BFD's locks require recursive mutexes, add support for these. Committer testing: This happens only when building with 'ma...
```diff diff --git a/tools/perf/util/libbfd.c b/tools/perf/util/libbfd.c index 01147fbf73b3..6434c2dccd4a 100644 --- a/tools/perf/util/libbfd.c +++ b/tools/perf/util/libbfd.c @@ -38,6 +38,39 @@ struct a2l_data { asymbol **syms; }; +static bool perf_bfd_lock(void *bfd_mutex) +{ + mutex_lock(bfd_mutex); + return tru...
3c723f449723db2dc2b75b7efe03c2a76e4c09f0
Analyze and fix the following issue in the Linux kernel code: perf test: Fix lock contention test
Problem Details: Couple of independent fixes: 1. Wire in SIGSEGV handler that terminates the test with a failure code. 2. Use "--lock-cgroup" instead of "-g"; "-g" was proposed but never merged. See commit 4d1792d0a2564caf ("perf lock contention: Add --lock-cgroup option") 3. Call cleanup() on every normal exi...
```diff diff --git a/tools/perf/tests/shell/lock_contention.sh b/tools/perf/tests/shell/lock_contention.sh index 7248a74ca2a3..6dd90519f45c 100755 --- a/tools/perf/tests/shell/lock_contention.sh +++ b/tools/perf/tests/shell/lock_contention.sh @@ -13,15 +13,18 @@ cleanup() { rm -f ${perfdata} rm -f ${result} rm -f...
c432180a7d95081353a96fd6d5bd75b0fc8a27c3
Analyze and fix the following issue in the Linux kernel code: soc: renesas: rz-sysc: Populate readable_reg/writeable_reg in regmap config
Problem Details: Not all system controller registers are accessible from Linux. Accessing such registers generates synchronous external abort. Populate the readable_reg and writeable_reg members of the regmap config to inform the regmap core which registers can be accessed. The list will need to be updated whenever new...
```diff diff --git a/drivers/soc/renesas/r9a08g045-sysc.c b/drivers/soc/renesas/r9a08g045-sysc.c index 0504d4e68761..03d653d5cde5 100644 --- a/drivers/soc/renesas/r9a08g045-sysc.c +++ b/drivers/soc/renesas/r9a08g045-sysc.c @@ -6,10 +6,29 @@ */ #include <linux/bits.h> +#include <linux/device.h> #include <linux/ini...
4ff787433ba6d564b00334b4bfd6350f5b6f4bb3
Analyze and fix the following issue in the Linux kernel code: soc: renesas: r9a09g056-sys: Populate max_register
Problem Details: Populate max_register to avoid external aborts. Fixes: 2da2740fb9c8 ("soc: renesas: rz-sysc: Add syscon/regmap support") Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://patch.msgid.link/20251105070526.264445-2-cla...
```diff diff --git a/drivers/soc/renesas/r9a09g056-sys.c b/drivers/soc/renesas/r9a09g056-sys.c index 3ad1422eba36..16b4e433c337 100644 --- a/drivers/soc/renesas/r9a09g056-sys.c +++ b/drivers/soc/renesas/r9a09g056-sys.c @@ -72,4 +72,5 @@ static const struct rz_sysc_soc_id_init_data rzv2n_sys_soc_id_init_data __initco ...
d0206db94b36c998c11458cfdae2f45ba20bc4fb
Analyze and fix the following issue in the Linux kernel code: perf lock: Fix segfault due to missing kernel map
Problem Details: Kernel maps are encoded in PERF_RECORD_MMAP2 samples but "perf lock report" and "perf lock contention" do not process MMAP2 samples. Because of that, machine->vmlinux_map stays NULL and any later access triggers a segmentation fault. Fix it by adding ->mmap2() callbacks. Fixes: 53b00ff358dc75b1 ("pe...
```diff diff --git a/tools/perf/builtin-lock.c b/tools/perf/builtin-lock.c index 078634461df2..e8962c985d34 100644 --- a/tools/perf/builtin-lock.c +++ b/tools/perf/builtin-lock.c @@ -1867,6 +1867,7 @@ static int __cmd_report(bool display_info) eops.sample = process_sample_event; eops.comm = perf_event__process_...
a09e5967ad6819379fd31894634d7aed29c18409
Analyze and fix the following issue in the Linux kernel code: perf build: Don't fail fast path feature detection when binutils-devel is not available
Problem Details: This is one more remnant of the BUILD_NONDISTRO series to make building with binutils-devel opt-in due to license incompatibility. In this case just the references at link time were still in place, which make building the test-all.bin file fail, which wasn't detected before probably because the last t...
```diff diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile index 49b0add392b1..95646290cb89 100644 --- a/tools/build/feature/Makefile +++ b/tools/build/feature/Makefile @@ -107,7 +107,7 @@ all: $(FILES) __BUILD = $(CC) $(CFLAGS) -MD -Wall -Werror -o $@ $(patsubst %.bin,%.c,$(@F)) $(LDFLAGS) BU...
85c894a80ac46aa177df04e0a33bcad409b7d64f
Analyze and fix the following issue in the Linux kernel code: perf header: Write bpf_prog (infos|btfs)_cnt to data file
Problem Details: With commit f0d0f978f3f5830a ("perf header: Don't write empty BPF/BTF info"), the write_bpf_( prog_info() | btf() ) functions exit without writing anything if env->bpf_prog.(infos| btfs)_cnt is zero. process_bpf_( prog_info() | btf() ), however, still expect a "count" value to exist in the data file. ...
```diff diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index 4f2a6e10ed5c..4e12be579140 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c @@ -1022,12 +1022,9 @@ static int write_bpf_prog_info(struct feat_fd *ff, down_read(&env->bpf_progs.lock); - if (env->bpf_progs.infos_cnt =...
e29aa918a928408c3e64b0d1025e4eb9f6fc549e
Analyze and fix the following issue in the Linux kernel code: tracing: Have function graph tracer define options per instance
Problem Details: Currently the function graph tracer's options are saved via a global mask when it should be per instance. Use the new infrastructure to define a "default_flags" field in the tracer structure that is used for the top level instance as well as new ones. Currently the global mask causes confusion: # c...
```diff diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c index fe9607edc8f9..4e86adf6dd4d 100644 --- a/kernel/trace/trace_functions_graph.c +++ b/kernel/trace/trace_functions_graph.c @@ -101,9 +101,9 @@ static struct tracer_flags tracer_flags = { .opts = trace_opts }; -stati...
e65b871c9b5af9265aefc5b8cd34993586d93aab
Analyze and fix the following issue in the Linux kernel code: ASoC: codecs: pm4125: Remove irq_chip on component unbind
Problem Details: Component bind uses devm_regmap_add_irq_chip() to add IRQ chip, so it will be removed only during driver unbind, not component unbind. A component unbind-bind cycle for the same Linux device lifetime would result in two chips added. Fix this by manually removing the IRQ chip during component unbind. ...
```diff diff --git a/sound/soc/codecs/pm4125.c b/sound/soc/codecs/pm4125.c index 0d4223335e67..6f18523771fe 100644 --- a/sound/soc/codecs/pm4125.c +++ b/sound/soc/codecs/pm4125.c @@ -1610,6 +1610,8 @@ static void pm4125_unbind(struct device *dev) struct pm4125_priv *pm4125 = dev_get_drvdata(dev); snd_soc_unregist...
fd94857a934cbe613353810a024c84d54826ead3
Analyze and fix the following issue in the Linux kernel code: ASoC: codecs: pm4125: Fix potential conflict when probing two devices
Problem Details: Qualcomm PM4125 codec is always a single device on the board, however nothing stops board designers to have two of them, thus same device driver could probe twice. Device driver is not ready for that case, because it allocates statically 'struct regmap_irq_chip' as non-const and stores during componen...
```diff diff --git a/sound/soc/codecs/pm4125.c b/sound/soc/codecs/pm4125.c index 5c3907d23542..0d4223335e67 100644 --- a/sound/soc/codecs/pm4125.c +++ b/sound/soc/codecs/pm4125.c @@ -71,7 +71,7 @@ struct pm4125_priv { struct wcd_mbhc_intr intr_ids; struct wcd_common common; struct irq_domain *virq; - const struct...
8d63e85c5b50f1dbfa0ccb214bd91fe5d7e2e860
Analyze and fix the following issue in the Linux kernel code: firmware: cs_dsp: fix kernel-doc warnings in a header file
Problem Details: Use correct kernel-doc format to avoid kernel-doc warnings in nclude/linux/firmware/cirrus/cs_dsp_test_utils.h: - mark one struct member as private: since the comment says that it is private - add ending ':' to struct members where needed Warning: include/linux/firmware/cirrus/cs_dsp_test_utils.h:30 ...
```diff diff --git a/include/linux/firmware/cirrus/cs_dsp_test_utils.h b/include/linux/firmware/cirrus/cs_dsp_test_utils.h index ecd821ed8064..1f97764fdfd7 100644 --- a/include/linux/firmware/cirrus/cs_dsp_test_utils.h +++ b/include/linux/firmware/cirrus/cs_dsp_test_utils.h @@ -26,21 +26,21 @@ struct cs_dsp_test { ...
cbcff934fa7deb670d9545a3aad4d07e8f1e4f3c
Analyze and fix the following issue in the Linux kernel code: mm/slub: fix memory leak in free_to_pcs_bulk()
Problem Details: The commit 989b09b73978 ("slab: skip percpu sheaves for remote object freeing") introduced the remote_objects array in free_to_pcs_bulk() to skip sheaves when objects from a remote node are freed. However, the array is flushed only when: 1) the array becomes full (++remote_nr >= PCS_BATCH_MAX), or ...
```diff diff --git a/mm/slub.c b/mm/slub.c index f1a5373eee7b..a787687a0d59 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -6332,8 +6332,6 @@ next_remote_batch: if (unlikely(!slab_free_hook(s, p[i], init, false))) { p[i] = p[--size]; - if (!size) - goto flush_remote; continue; } @@ -6348,6 +6346,9 @@ ...
7c63b5a8ed972a2c8c03d984f6a43349007cea93
Analyze and fix the following issue in the Linux kernel code: ASoC: codecs: lpass-tx-macro: fix SM6115 support
Problem Details: SM6115 does have soundwire controller in tx. For some reason we ended up with this incorrect patch. Fix this by adding the flag to reflect this in SoC data. Fixes: 510c46884299 ("ASoC: codecs: lpass-tx-macro: Add SM6115 support") Cc: Stable@vger.kernel.org Signed-off-by: Srinivas Kandagatla <srinivas...
```diff diff --git a/sound/soc/codecs/lpass-tx-macro.c b/sound/soc/codecs/lpass-tx-macro.c index 1da34cb3505f..c7d4dc553e6a 100644 --- a/sound/soc/codecs/lpass-tx-macro.c +++ b/sound/soc/codecs/lpass-tx-macro.c @@ -2473,7 +2473,8 @@ static const struct tx_macro_data lpass_ver_9_2 = { }; static const struct tx_macro...
10eaa4c4a257944e9b30d13fda7d09164a70866d
Analyze and fix the following issue in the Linux kernel code: spi: spi-cadence-quadspi: Remove duplicate pm_runtime_put_autosuspend() call
Problem Details: Fix runtime PM usage count underflow caused by calling pm_runtime_put_autosuspend() twice with only one corresponding pm_runtime_get_noresume() call. This triggers the warning: "Runtime PM usage count underflow!" Remove the duplicate put call to balance the runtime PM reference counting. Fixes: 30dbc...
```diff diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c index 56906dc76b34..8e0df08609c0 100644 --- a/drivers/spi/spi-cadence-quadspi.c +++ b/drivers/spi/spi-cadence-quadspi.c @@ -2012,7 +2012,6 @@ static int cqspi_probe(struct platform_device *pdev) } if (!(ddata && (ddata->qui...
f1eb4e792bb1ee3dcdffa66f8a83a4867cda2dd3
Analyze and fix the following issue in the Linux kernel code: spi: spi-cadence-quadspi: Enable pm runtime earlier to avoid imbalance
Problem Details: The "probe_setup_failed" label calls pm_runtime_disable(), but pm_runtime_enable() was placed after a possible jump to this label. When cqspi_setup_flash() fails, control jumps to the label without pm_runtime_enable() being called, leading to unbalanced PM runtime reference counting. Move pm_runtime_e...
```diff diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c index 81017402bc56..56906dc76b34 100644 --- a/drivers/spi/spi-cadence-quadspi.c +++ b/drivers/spi/spi-cadence-quadspi.c @@ -1981,6 +1981,13 @@ static int cqspi_probe(struct platform_device *pdev) cqspi->current_cs = -1; cqspi...
a257e974210320ede524f340ffe16bf4bf0dda1e
Analyze and fix the following issue in the Linux kernel code: sched_ext: Fix possible deadlock in the deferred_irq_workfn()
Problem Details: For PREEMPT_RT=y kernels, the deferred_irq_workfn() is executed in the per-cpu irq_work/* task context and not disable-irq, if the rq returned by container_of() is current CPU's rq, the following scenarios may occur: lock(&rq->__lock); <Interrupt> lock(&rq->__lock); This commit use IRQ_WORK_INIT_HA...
```diff diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c index 03d05ea20006..07399210ac2d 100644 --- a/kernel/sched/ext.c +++ b/kernel/sched/ext.c @@ -5321,7 +5321,7 @@ void __init init_sched_ext_class(void) BUG_ON(!zalloc_cpumask_var_node(&rq->scx.cpus_to_kick_if_idle, GFP_KERNEL, n)); BUG_ON(!zalloc_cpumask...
95d9c3f0e4546eaec0977f3b387549a8463cd49f
Analyze and fix the following issue in the Linux kernel code: PCI: keystone: Exit ks_pcie_probe() for invalid mode
Problem Details: Commit under Fixes introduced support for PCIe EP mode on AM654x platforms. When the mode happens to be either "DW_PCIE_RC_TYPE" or "DW_PCIE_EP_TYPE", the PCIe Controller is configured accordingly. However, when the mode is neither of them, an error message is displayed, but the driver probe succeeds. ...
```diff diff --git a/drivers/pci/controller/dwc/pci-keystone.c b/drivers/pci/controller/dwc/pci-keystone.c index eb00aa380722..25b8193ffbcf 100644 --- a/drivers/pci/controller/dwc/pci-keystone.c +++ b/drivers/pci/controller/dwc/pci-keystone.c @@ -1337,6 +1337,8 @@ static int ks_pcie_probe(struct platform_device *pdev) ...
a04fbfb8a175d4904727048b97fcdef12e392ed1
Analyze and fix the following issue in the Linux kernel code: arm64/sysreg: Add ICH_VMCR_EL2
Problem Details: Add the ICH_VMCR_EL2 register, which is required for the upcoming GICv5 KVM support. This register has two different field encodings, based on if it is used for GICv3 or GICv5-based VMs. The GICv5-specific field encodings are generated with a FEAT_GCIE prefix. This register is already described in the...
```diff diff --git a/arch/arm64/tools/sysreg b/arch/arm64/tools/sysreg index 1c6cdf9d54bb..8921b51866d6 100644 --- a/arch/arm64/tools/sysreg +++ b/arch/arm64/tools/sysreg @@ -4669,6 +4669,27 @@ Field 1 V3 Field 0 En EndSysreg +Sysreg ICH_VMCR_EL2 3 4 12 11 7 +Prefix FEAT_GCIE +Res0 63:32 +Field 31:27 VPMR +Res0 26:...
fe2ef46995d5db49a37337f11fe2c6733676c24c
Analyze and fix the following issue in the Linux kernel code: arm64/sysreg: Support feature-specific fields with 'Prefix' descriptor
Problem Details: Some system register field encodings change based on, for example the in-use architecture features, or the context in which they are accessed. In order to support these different field encodings, introduce the Prefix descriptor (Prefix, EndPrefix) for describing such sysregs. The Prefix descriptor can...
```diff diff --git a/arch/arm64/tools/gen-sysreg.awk b/arch/arm64/tools/gen-sysreg.awk index 172d04bb6cc3..5ca81eaac2cb 100755 --- a/arch/arm64/tools/gen-sysreg.awk +++ b/arch/arm64/tools/gen-sysreg.awk @@ -44,21 +44,26 @@ function expect_fields(nf) { # Print a CPP macro definition, padded with spaces so that the ma...
0aab5772a53dd006c13ba629e8dc8816b7cd213d
Analyze and fix the following issue in the Linux kernel code: arm64/sysreg: Fix checks for incomplete sysreg definitions
Problem Details: The checks for incomplete sysreg definitions were checking if the next_bit was greater than 0, which is incorrect and missed occasions where bit 0 hasn't been defined for a sysreg. The reason is that next_bit is -1 when all bits have been processed (LSB - 1). Change the checks to use >= 0, instead. Al...
```diff diff --git a/arch/arm64/tools/gen-sysreg.awk b/arch/arm64/tools/gen-sysreg.awk index bbbb812603e8..172d04bb6cc3 100755 --- a/arch/arm64/tools/gen-sysreg.awk +++ b/arch/arm64/tools/gen-sysreg.awk @@ -133,7 +133,7 @@ $1 == "SysregFields" && block_current() == "Root" { $1 == "EndSysregFields" && block_current()...
4145fc363eb23a1caf14f7ebf6830ab32bcaa50e
Analyze and fix the following issue in the Linux kernel code: clk: qcom: use different Kconfig prompts for APSS IPQ5424/6018 drivers
Problem Details: Both the IPQ_APSS_5424 and IPQ_APSS_6018 symbols are using the same prompt which complicates to see that which option corresponds to which driver. Add a prefix to both prompts to make it easier to differentiate the two options. While at it, also fix a typo in the help text of the IPQ_APSS_5424 symbol...
```diff diff --git a/drivers/clk/qcom/Kconfig b/drivers/clk/qcom/Kconfig index 4a78099e706c..550a9d82a6b3 100644 --- a/drivers/clk/qcom/Kconfig +++ b/drivers/clk/qcom/Kconfig @@ -215,16 +215,16 @@ config IPQ_APSS_PLL devices. config IPQ_APSS_5424 - tristate "IPQ APSS Clock Controller" + tristate "IPQ5424 APSS Cl...
fbade4bd08ba52cbc74a71c4e86e736f059f99f7
Analyze and fix the following issue in the Linux kernel code: mptcp: Disallow MPTCP subflows from sockmap
Problem Details: The sockmap feature allows bpf syscall from userspace, or based on bpf sockops, replacing the sk_prot of sockets during protocol stack processing with sockmap's custom read/write interfaces. ''' tcp_rcv_state_process() subflow_syn_recv_sock() tcp_init_transfer(BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB)...
```diff diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c index e8325890a322..af707ce0f624 100644 --- a/net/mptcp/subflow.c +++ b/net/mptcp/subflow.c @@ -2144,6 +2144,10 @@ void __init mptcp_subflow_init(void) tcp_prot_override = tcp_prot; tcp_prot_override.release_cb = tcp_release_cb_override; tcp_prot_over...
6af6e49a76c9af7d42eb923703e7648cb2bf401a
Analyze and fix the following issue in the Linux kernel code: bpf: Free special fields when update [lru_,]percpu_hash maps
Problem Details: As [lru_,]percpu_hash maps support BPF_KPTR_{REF,PERCPU}, missing calls to 'bpf_obj_free_fields()' in 'pcpu_copy_value()' could cause the memory referenced by BPF_KPTR_{REF,PERCPU} fields to be held until the map gets freed. Fix this by calling 'bpf_obj_free_fields()' after 'copy_map_value[,_long]()' ...
```diff diff --git a/kernel/bpf/hashtab.c b/kernel/bpf/hashtab.c index f876f09355f0..c8a9b27f8663 100644 --- a/kernel/bpf/hashtab.c +++ b/kernel/bpf/hashtab.c @@ -934,15 +934,21 @@ static void free_htab_elem(struct bpf_htab *htab, struct htab_elem *l) static void pcpu_copy_value(struct bpf_htab *htab, void __percpu *p...
ca2583412306ceda9304a7c4302fd9efbf43e963
Analyze and fix the following issue in the Linux kernel code: accel/amdxdna: Fix deadlock between context destroy and job timeout
Problem Details: Hardware context destroy function holds dev_lock while waiting for all jobs to complete. The timeout job also needs to acquire dev_lock, this leads to a deadlock. Fix the issue by temporarily releasing dev_lock before waiting for all jobs to finish, and reacquiring it afterward. Fixes: 4fd6ca90fc7f (...
```diff diff --git a/drivers/accel/amdxdna/aie2_ctx.c b/drivers/accel/amdxdna/aie2_ctx.c index bdc90fe8a47e..42d876a427c5 100644 --- a/drivers/accel/amdxdna/aie2_ctx.c +++ b/drivers/accel/amdxdna/aie2_ctx.c @@ -690,17 +690,19 @@ void aie2_hwctx_fini(struct amdxdna_hwctx *hwctx) xdna = hwctx->client->xdna; XDNA_DB...
6ff9385c07aa311f01f87307e6256231be7d8675
Analyze and fix the following issue in the Linux kernel code: accel/amdxdna: Clear mailbox interrupt register during channel creation
Problem Details: The mailbox interrupt register is not always cleared when a mailbox channel is created. This can leave stale interrupt states from previous operations. Fix this by explicitly clearing the interrupt register in the mailbox channel creation function. Fixes: b87f920b9344 ("accel/amdxdna: Support hardwar...
```diff diff --git a/drivers/accel/amdxdna/amdxdna_mailbox.c b/drivers/accel/amdxdna/amdxdna_mailbox.c index 24258dcc18eb..858df97cd3fb 100644 --- a/drivers/accel/amdxdna/amdxdna_mailbox.c +++ b/drivers/accel/amdxdna/amdxdna_mailbox.c @@ -516,6 +516,7 @@ xdna_mailbox_create_channel(struct mailbox *mb, } mb_chann-...
61019afdf6ac17c8e8f9c42665aa1fa82f04a3e2
Analyze and fix the following issue in the Linux kernel code: block: introduce alloc_sched_data and free_sched_data elevator methods
Problem Details: The recent lockdep splat [1] highlights a potential deadlock risk involving ->elevator_lock and ->freeze_lock dependencies on -pcpu_alloc_ mutex. The trace shows that the issue occurs when the Kyber scheduler allocates dynamic memory for its elevator data during initialization. To address this, introd...
```diff diff --git a/block/blk-mq-sched.h b/block/blk-mq-sched.h index 1f8e58dd4b49..4e1b86e85a8a 100644 --- a/block/blk-mq-sched.h +++ b/block/blk-mq-sched.h @@ -38,6 +38,30 @@ void blk_mq_free_sched_res(struct elevator_resources *res, struct blk_mq_tag_set *set); void blk_mq_free_sched_res_batch(struct xarray *et...
699122b590ebbc450737eebde3ab8f5b871cc7f0
Analyze and fix the following issue in the Linux kernel code: bcache: Avoid -Wflex-array-member-not-at-end warning
Problem Details: -Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. Use the new TRAILING_OVERLAP() helper to fix the following warning: drivers/md/bcache/bset.h:330:27: warning: structure containing a flexible array member is not at the end of another structure [...
```diff diff --git a/drivers/md/bcache/bset.h b/drivers/md/bcache/bset.h index 011f6062c4c0..6ee2c6a506a2 100644 --- a/drivers/md/bcache/bset.h +++ b/drivers/md/bcache/bset.h @@ -327,9 +327,13 @@ struct btree_iter { /* Fixed-size btree_iter that can be allocated on the stack */ struct btree_iter_stack { - struct bt...
b77fc08e393b77883bcb71825cfd49e44da44022
Analyze and fix the following issue in the Linux kernel code: mempool: add error injection support
Problem Details: Add a call to should_fail_ex that forces mempool to actually allocate from the pool to stress the mempool implementation when enabled through debugfs. By default should_fail{,_ex} prints a very verbose stack trace that clutters the kernel log, slows down execution and triggers the kernel bug detection...
```diff diff --git a/mm/mempool.c b/mm/mempool.c index 1f4701713203..5cf59779cc3d 100644 --- a/mm/mempool.c +++ b/mm/mempool.c @@ -9,7 +9,7 @@ * started by Ingo Molnar, Copyright (C) 2001 * debugging by David Rientjes, Copyright (C) 2015 */ - +#include <linux/fault-inject.h> #include <linux/mm.h> #include <li...
7b2038b1b1d4322a851ce7ee378ebf85a03bb1a1
Analyze and fix the following issue in the Linux kernel code: dm: fix zone reset all operation processing
Problem Details: dm_zone_get_reset_bitmap() is used to generate a bitmap of the zones of a zoned device target when a REQ_OP_ZONE_RESET_ALL request is being processed. This bitmap is built by executing a zone report with a report callback set to the function dm_zone_need_reset_cb() in struct dm_report_zones_args. Howev...
```diff diff --git a/drivers/md/dm-zone.c b/drivers/md/dm-zone.c index 984fb621b0e9..5a840c4ae316 100644 --- a/drivers/md/dm-zone.c +++ b/drivers/md/dm-zone.c @@ -113,6 +113,15 @@ static int dm_report_zones_cb(struct blk_zone *zone, unsigned int idx, args->next_sector = zone->start + zone->len; + /* If we have an...
881880b6f3079c79e4306630dcb8d05bc7de1793
Analyze and fix the following issue in the Linux kernel code: block: fix NULL pointer dereference in disk_report_zones()
Problem Details: Commit 2284eec5053d ("block: introduce blkdev_get_zone_info()") introduced the report_active field in struct blk_report_zones_args so that open and closed zones can be reported with the condition BLK_ZONE_COND_ACTIVE in the case of a cached report zone. However, the args pointer to a struct blk_report_...
```diff diff --git a/block/blk-zoned.c b/block/blk-zoned.c index 98c26af01e24..dcc295721c2c 100644 --- a/block/blk-zoned.c +++ b/block/blk-zoned.c @@ -854,7 +854,7 @@ static unsigned int disk_zone_wplug_sync_wp_offset(struct gendisk *disk, int disk_report_zone(struct gendisk *disk, struct blk_zone *zone, unsig...
c2b8d20628ca789640f64074a642f9440eefc623
Analyze and fix the following issue in the Linux kernel code: block: fix NULL pointer dereference in blk_zone_reset_all_bio_endio()
Problem Details: For zoned block devices that do not need zone write plugs (e.g. most device mapper devices that support zones), the disk hash table of zone write plugs is NULL. For such devices, blk_zone_reset_all_bio_endio() should not attempt to scan this has table as that causes a NULL pointer dereference. Fix thi...
```diff diff --git a/block/blk-zoned.c b/block/blk-zoned.c index 85de45c3f6be..98c26af01e24 100644 --- a/block/blk-zoned.c +++ b/block/blk-zoned.c @@ -1118,17 +1118,20 @@ static void blk_zone_reset_all_bio_endio(struct bio *bio) sector_t sector; unsigned int i; - /* Update the condition of all zone write plugs. *...
bfc184cb1ba7226b21ab26f0b220581895c5ac9e
Analyze and fix the following issue in the Linux kernel code: arm64/mm: Allow __create_pgd_mapping() to propagate pgtable_alloc() errors
Problem Details: arch_add_memory() is used to hotplug memory into a system but as a part of its implementation it calls __create_pgd_mapping(), which uses pgtable_alloc() in order to build intermediate page tables. As this path was initally only used during early boot pgtable_alloc() is designed to BUG_ON() on failure....
```diff diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c index b8d37eb037fc..99555ebbab38 100644 --- a/arch/arm64/mm/mmu.c +++ b/arch/arm64/mm/mmu.c @@ -49,6 +49,8 @@ #define NO_CONT_MAPPINGS BIT(1) #define NO_EXEC_MAPPINGS BIT(2) /* assumes FEAT_HPDS is not used */ +#define INVALID_PHYS_ADDR (-1ULL) + DEFIN...
ebd4469e7af61019daaf904fdcba07a9ecd18440
Analyze and fix the following issue in the Linux kernel code: entry: Fix ifndef around arch_xfer_to_guest_mode_handle_work() stub
Problem Details: The stub implementation of arch_xfer_to_guest_mode_handle_work() is guarded by an #ifndef that incorrectly checks for the name arch_xfer_to_guest_mode_work instead. It seems the function was renamed to add "_handle" as a late change to the original patch, and the #ifndef wasn't updated to go with it. ...
```diff diff --git a/include/linux/entry-virt.h b/include/linux/entry-virt.h index 42c89e3e5ca7..bfa767702d9a 100644 --- a/include/linux/entry-virt.h +++ b/include/linux/entry-virt.h @@ -32,7 +32,7 @@ */ static inline int arch_xfer_to_guest_mode_handle_work(unsigned long ti_work); -#ifndef arch_xfer_to_guest_mode_...
7e06063a43d317c1ca9278b6662555f687f43f03
Analyze and fix the following issue in the Linux kernel code: iommu/io-pgtable-arm-selftests: Use KUnit
Problem Details: Integrate the selftests as part of kunit. Now instead of the test only being run at boot, it can run: - With CONFIG_IOMMU_IO_PGTABLE_LPAE_KUNIT_TEST=y It will automatically run at boot as before. - Otherwise with CONFIG_IOMMU_IO_PGTABLE_LPAE_KUNIT_TEST=m: 1) on module load: Once the module ...
```diff diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig index 6eca8b3a17e9..acce340c7bc7 100644 --- a/drivers/iommu/Kconfig +++ b/drivers/iommu/Kconfig @@ -40,12 +40,13 @@ config IOMMU_IO_PGTABLE_LPAE sizes at both stage-1 and stage-2, as well as address spaces up to 48-bits in size. -config IOMMU_...
75ba146c2674ba49ed8a222c67f9abfb4a4f2a4f
Analyze and fix the following issue in the Linux kernel code: iommu/amd: Fix pci_segment memleak in alloc_pci_segment()
Problem Details: Fix a memory leak of struct amd_iommu_pci_segment in alloc_pci_segment() when system memory (or contiguous memory) is insufficient. Fixes: 04230c119930 ("iommu/amd: Introduce per PCI segment device table") Fixes: eda797a27795 ("iommu/amd: Introduce per PCI segment rlookup table") Fixes: 99fc4ac3d297 (...
```diff diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c index f2991c11867c..4f4d4955269e 100644 --- a/drivers/iommu/amd/init.c +++ b/drivers/iommu/amd/init.c @@ -1710,13 +1710,22 @@ static struct amd_iommu_pci_seg *__init alloc_pci_segment(u16 id, list_add_tail(&pci_seg->list, &amd_iommu_pci_seg_list...
d1e281f832fcadad3c3f6c8c5f998aadd7cb33a5
Analyze and fix the following issue in the Linux kernel code: iommu/amd: Enhance "Completion-wait Time-out" error message
Problem Details: Current IOMMU driver prints "Completion-wait Time-out" error message with insufficient information to further debug the issue. Enhancing the error message as following: 1. Log IOMMU PCI device ID in the error message. 2. With "amd_iommu_dump=1" kernel command line option, dump entire command buffer...
```diff diff --git a/drivers/iommu/amd/amd_iommu_types.h b/drivers/iommu/amd/amd_iommu_types.h index a698a2e7ce2a..b4f552072101 100644 --- a/drivers/iommu/amd/amd_iommu_types.h +++ b/drivers/iommu/amd/amd_iommu_types.h @@ -247,6 +247,10 @@ #define CMD_BUFFER_ENTRIES 512 #define MMIO_CMD_SIZE_SHIFT 56 #define MMIO_CM...
27376465e945c11ad13c1e1d877ed318be010062
Analyze and fix the following issue in the Linux kernel code: KVM: TDX: Fix sparse warnings from using 0 for NULL
Problem Details: Stop using 0 for NULL. sparse moans: ... arch/x86/kvm/vmx/tdx.c:859:38: warning: Using plain integer as NULL pointer for several TDX pointer initializations. While I love a good ptr=0 now and then, it's good to have quiet sparse builds. Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Fixe...
```diff diff --git a/arch/x86/kvm/vmx/tdx.c b/arch/x86/kvm/vmx/tdx.c index 3525e0e9d073..0ffca14c1071 100644 --- a/arch/x86/kvm/vmx/tdx.c +++ b/arch/x86/kvm/vmx/tdx.c @@ -903,7 +903,7 @@ void tdx_vcpu_free(struct kvm_vcpu *vcpu) } if (tdx->vp.tdvpr_page) { tdx_reclaim_control_page(tdx->vp.tdvpr_page); - tdx->vp...
228add34dc2f197539c497bf5573d75cd58f5c61
Analyze and fix the following issue in the Linux kernel code: KVM: TDX: Remove __user annotation from kernel pointer
Problem Details: Separate __user pointer variable declaration from kernel one. There are two 'kvm_cpuid2' pointers involved here. There's an "input" side: 'td_cpuid' which is a normal kernel pointer and an 'output' side. The output here is userspace and there is an attempt at properly annotating the variable with __us...
```diff diff --git a/arch/x86/kvm/vmx/tdx.c b/arch/x86/kvm/vmx/tdx.c index b5087d40f50b..3525e0e9d073 100644 --- a/arch/x86/kvm/vmx/tdx.c +++ b/arch/x86/kvm/vmx/tdx.c @@ -3038,7 +3038,8 @@ static int tdx_vcpu_get_cpuid_leaf(struct kvm_vcpu *vcpu, u32 leaf, int *entry_i static int tdx_vcpu_get_cpuid(struct kvm_vcpu *...
9a89894f30d5795c5ac46a9ee9c009d610306025
Analyze and fix the following issue in the Linux kernel code: KVM: TDX: Take MMU lock around tdh_vp_init()
Problem Details: Take MMU lock around tdh_vp_init() in KVM_TDX_INIT_VCPU to prevent meeting contention during retries in some no-fail MMU paths. The TDX module takes various try-locks internally, which can cause SEAMCALLs to return an error code when contention is met. Dealing with an error in some of the MMU paths th...
```diff diff --git a/arch/x86/kvm/vmx/tdx.c b/arch/x86/kvm/vmx/tdx.c index 865d18b34988..b5087d40f50b 100644 --- a/arch/x86/kvm/vmx/tdx.c +++ b/arch/x86/kvm/vmx/tdx.c @@ -2969,9 +2969,20 @@ static int tdx_td_vcpu_init(struct kvm_vcpu *vcpu, u64 vcpu_rcx) } } - err = tdh_vp_init(&tdx->vp, vcpu_rcx, vcpu->vcpu_id)...
b2c26c82f7a94ec4da096f370e3612ee14424450
Analyze and fix the following issue in the Linux kernel code: hsr: Follow standard for HSRv0 supervision frames
Problem Details: For HSRv0, the path_id has the following meaning: - 0000: PRP supervision frame - 0001-1001: HSR ring identifier - 1010-1011: Frames from PRP network (A/B, with RedBoxes) - 1111: HSR supervision frame Follow the IEC 62439-3:2010 standard more closely by setting the right path_id for HSRv0 supervision ...
```diff diff --git a/net/hsr/hsr_device.c b/net/hsr/hsr_device.c index 1235abb2d79f..492cbc78ab75 100644 --- a/net/hsr/hsr_device.c +++ b/net/hsr/hsr_device.c @@ -337,7 +337,7 @@ static void send_hsr_supervision_frame(struct hsr_port *port, } hsr_stag->tlv.HSR_TLV_type = type; - /* TODO: Why 12 in HSRv0? */ + /* ...
96a3a03abf3d8cc38cd9cb0d280235fbcf7c3f7f
Analyze and fix the following issue in the Linux kernel code: hsr: Fix supervision frame sending on HSRv0
Problem Details: On HSRv0, no supervision frames were sent. The supervison frames were generated successfully, but failed the check for a sufficiently long mac header, i.e., at least sizeof(struct hsr_ethhdr), in hsr_fill_frame_info() because the mac header only contained the ethernet header. Fix this by including the...
```diff diff --git a/net/hsr/hsr_device.c b/net/hsr/hsr_device.c index fbbc3ccf9df6..1235abb2d79f 100644 --- a/net/hsr/hsr_device.c +++ b/net/hsr/hsr_device.c @@ -320,6 +320,9 @@ static void send_hsr_supervision_frame(struct hsr_port *port, } hsr_stag = skb_put(skb, sizeof(struct hsr_sup_tag)); + skb_set_network_...
0709abaf67345b3a8966198fc0957fcc361b065f
Analyze and fix the following issue in the Linux kernel code: drm/imx/ipuv3: Fix dumb-buffer allocation for non-RGB formats
Problem Details: Align pitch to multiples of 8 pixels for bpp values that do not map to RGB formats. The call to drm_driver_color_mode_format() fails with DRM_INVALID_FORMAT in these cases. Fall back to manually computing the pitch alignment from which drm_mode_size_dumb() can compute the correct pitch. Fixes userspac...
```diff diff --git a/drivers/gpu/drm/imx/ipuv3/imx-drm-core.c b/drivers/gpu/drm/imx/ipuv3/imx-drm-core.c index 465b5a6ad5bb..eddb471119c6 100644 --- a/drivers/gpu/drm/imx/ipuv3/imx-drm-core.c +++ b/drivers/gpu/drm/imx/ipuv3/imx-drm-core.c @@ -144,7 +144,6 @@ static int imx_drm_dumb_create(struct drm_file *file_priv, ...
03865dd8af52eb16c38062df2ed30a91b604780e
Analyze and fix the following issue in the Linux kernel code: leds: netxbig: Fix GPIO descriptor leak in error paths
Problem Details: The function netxbig_gpio_ext_get() acquires GPIO descriptors but fails to release them when errors occur mid-way through initialization. The cleanup callback registered by devm_add_action_or_reset() only runs on success, leaving acquired GPIOs leaked on error paths. Add goto-based error handling to r...
```diff diff --git a/drivers/leds/leds-netxbig.c b/drivers/leds/leds-netxbig.c index e95287416ef8..99df46f2d9f5 100644 --- a/drivers/leds/leds-netxbig.c +++ b/drivers/leds/leds-netxbig.c @@ -364,6 +364,9 @@ static int netxbig_gpio_ext_get(struct device *dev, if (!addr) return -ENOMEM; + gpio_ext->addr = addr; + ...
40a71b53d5a6d4ea17e4d54b99b2ac03a7f5e783
Analyze and fix the following issue in the Linux kernel code: jbd2: use a weaker annotation in journal handling
Problem Details: jbd2 journal handling code doesn't want jbd2_might_wait_for_commit() to be placed between start_this_handle() and stop_this_handle(). So it marks the region with rwsem_acquire_read() and rwsem_release(). However, the annotation is too strong for that purpose. We don't have to use more than try lock ...
```diff diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c index 3e510564de6e..3a866fc87e7a 100644 --- a/fs/jbd2/transaction.c +++ b/fs/jbd2/transaction.c @@ -441,7 +441,7 @@ repeat: read_unlock(&journal->j_state_lock); current->journal_info = handle; - rwsem_acquire_read(&journal->j_trans_commit_map, 0, ...
d056bc45b62b5981ebcd18c4303a915490b8ebe9
Analyze and fix the following issue in the Linux kernel code: RDMA/core: Prevent soft lockup during large user memory region cleanup
Problem Details: When a process exits with numerous large, pinned memory regions consisting of 4KB pages, the cleanup of the memory region through __ib_umem_release() may cause soft lockups. This is because unpin_user_page_range_dirty_lock() is called in a tight loop for unpin and releasing page without yielding the CP...
```diff diff --git a/drivers/infiniband/core/umem.c b/drivers/infiniband/core/umem.c index c5b686394760..8fd84aa37289 100644 --- a/drivers/infiniband/core/umem.c +++ b/drivers/infiniband/core/umem.c @@ -55,9 +55,11 @@ static void __ib_umem_release(struct ib_device *dev, struct ib_umem *umem, int d ib_dma_unmap_sgtab...
524c3853831cf4f7e1db579e487c757c3065165c
Analyze and fix the following issue in the Linux kernel code: jbd2: use a per-journal lock_class_key for jbd2_trans_commit_key
Problem Details: syzbot is reporting possibility of deadlock due to sharing lock_class_key for jbd2_handle across ext4 and ocfs2. But this is a false positive, for one disk partition can't have two filesystems at the same time. Reported-by: syzbot+6e493c165d26d6fcbf72@syzkaller.appspotmail.com Closes: https://syzkalle...
```diff diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index d480b94117cd..f43474002f50 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c @@ -1521,7 +1521,6 @@ static journal_t *journal_init_common(struct block_device *bdev, struct block_device *fs_dev, unsigned long long start, int len, int blocksize)...
b97cb7d6a051aa6ebd57906df0e26e9e36c26d14
Analyze and fix the following issue in the Linux kernel code: ext4: xattr: fix null pointer deref in ext4_raw_inode()
Problem Details: If ext4_get_inode_loc() fails (e.g. if it returns -EFSCORRUPTED), iloc.bh will remain set to NULL. Since ext4_xattr_inode_dec_ref_all() lacks error checking, this will lead to a null pointer dereference in ext4_raw_inode(), called right after ext4_get_inode_loc(). Found by Linux Verification Center (l...
```diff diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c index ce7253b3f549..2e02efbddaac 100644 --- a/fs/ext4/xattr.c +++ b/fs/ext4/xattr.c @@ -1174,7 +1174,11 @@ ext4_xattr_inode_dec_ref_all(handle_t *handle, struct inode *parent, if (block_csum) end = (void *)bh->b_data + bh->b_size; else { - ext4_get_inode_lo...
892e1cf17555735e9d021ab036c36bc7b58b0e3b
Analyze and fix the following issue in the Linux kernel code: ext4: refresh inline data size before write operations
Problem Details: The cached ei->i_inline_size can become stale between the initial size check and when ext4_update_inline_data()/ext4_create_inline_data() use it. Although ext4_get_max_inline_size() reads the correct value at the time of the check, concurrent xattr operations can modify i_inline_size before ext4_write_...
```diff diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c index 1b094a4f3866..b48c7dbe76a2 100644 --- a/fs/ext4/inline.c +++ b/fs/ext4/inline.c @@ -418,7 +418,12 @@ static int ext4_prepare_inline_data(handle_t *handle, struct inode *inode, return -ENOSPC; ext4_write_lock_xattr(inode, &no_expand); - + /* + * ei->...