id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
9ba6930ef8e0e00102716f4627896e0be6358d7b
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix __bch2_inum_to_path() when crossing subvol boundaries
Problem Details: The bch2_subvolume_get_snapshot() call needs to happen before the dirent lookup - the dirent is in the parent subvolume. Also, check for loops. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/namei.c b/fs/bcachefs/namei.c index 779c22eb3979..7d1068aa998f 100644 --- a/fs/bcachefs/namei.c +++ b/fs/bcachefs/namei.c @@ -625,14 +625,26 @@ static int __bch2_inum_to_path(struct btree_trans *trans, { unsigned orig_pos = path->pos; int ret = 0; + DARRAY(subvol_inum) inums = {}; ...
f2a701fd94f161bdca7537284ba218c20181451e
Analyze and fix the following issue in the Linux kernel code: bcachefs: fsck: Improve check_key_has_inode()
Problem Details: Print out more info when we find a key (extent, dirent, xattr) for a missing inode - was there a good inode in an older snapshot, full(ish) list of keys for that missing inode, so we can make better decisions on how to repair. If it looks like it should've been deleted, autofix it. If we ever hit the ...
```diff diff --git a/fs/bcachefs/fsck.c b/fs/bcachefs/fsck.c index 48810a8e5d4b..f25d33fb3e23 100644 --- a/fs/bcachefs/fsck.c +++ b/fs/bcachefs/fsck.c @@ -1436,6 +1436,7 @@ static int check_key_has_inode(struct btree_trans *trans, { struct bch_fs *c = trans->c; struct printbuf buf = PRINTBUF; + struct btree_iter i...
03208bd06a61bc2ebc423b6485cbcffecd37af36
Analyze and fix the following issue in the Linux kernel code: bcachefs: don't return fsck_fix for unfixable node errors in __btree_err
Problem Details: After cd3cdb1ef706 ("Single err message for btree node reads"), all errors caused __btree_err to return -BCH_ERR_fsck_fix no matter what the actual error type was if the recovery pass was scanning for btree nodes. This lead to the code continuing despite things like bad node formats when they earlier w...
```diff diff --git a/fs/bcachefs/btree_io.c b/fs/bcachefs/btree_io.c index 005d5c94edd0..dca5530a2f49 100644 --- a/fs/bcachefs/btree_io.c +++ b/fs/bcachefs/btree_io.c @@ -557,7 +557,9 @@ static int __btree_err(int ret, const char *fmt, ...) { if (c->recovery.curr_pass == BCH_RECOVERY_PASS_scan_for_btree_no...
56be92c63f02e0f6fd855075acb1471ea1c68539
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix pool->alloc NULL pointer dereference
Problem Details: btree_interior_update_pool has not been initialized before the filesystem becomes read-write, thus mempool_alloc in bch2_btree_update_start will trigger pool->alloc NULL pointer dereference in mempool_alloc_noprof Reported-by: syzbot+2f3859bd28f20fa682e6@syzkaller.appspotmail.com Signed-off-by: Alan H...
```diff diff --git a/fs/bcachefs/bcachefs.h b/fs/bcachefs/bcachefs.h index 5a1cede2febf..8043943cdf6a 100644 --- a/fs/bcachefs/bcachefs.h +++ b/fs/bcachefs/bcachefs.h @@ -767,7 +767,8 @@ struct btree_trans_buf { x(sysfs) \ x(btree_write_buffer) \ x(btree_node_scrub) \ - x(async_recovery_passes) + ...
d89a34b14df5c205de698c23c3950b2b947cdb97
Analyze and fix the following issue in the Linux kernel code: bcachefs: Move bset size check before csum check
Problem Details: In syzbot's crash, the bset's u64s is larger than the btree node. Reported-by: syzbot+bfaeaa8e26281970158d@syzkaller.appspotmail.com Signed-off-by: Alan Huang <mmpgouride@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/btree_io.c b/fs/bcachefs/btree_io.c index d8f3c4c65e90..005d5c94edd0 100644 --- a/fs/bcachefs/btree_io.c +++ b/fs/bcachefs/btree_io.c @@ -723,12 +723,11 @@ void bch2_btree_node_drop_keys_outside_node(struct btree *b) static int validate_bset(struct bch_fs *c, struct bch_dev *ca, ...
7c9cef5f8bf10a803fd0937ea071a93778f1108a
Analyze and fix the following issue in the Linux kernel code: bcachefs: mark more errors autofix
Problem Details: Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/sb-errors_format.h b/fs/bcachefs/sb-errors_format.h index d06e73884871..56971ebe0f78 100644 --- a/fs/bcachefs/sb-errors_format.h +++ b/fs/bcachefs/sb-errors_format.h @@ -217,7 +217,7 @@ enum bch_fsck_flags { x(inode_str_hash_invalid, 194, 0) \ x(inode_v3_fields_start_bad, 195...
17c3395e25f7db23fa5758c257a372d410d16cfd
Analyze and fix the following issue in the Linux kernel code: bcachefs: opts.journal_rewind
Problem Details: Add a mount option for rewinding the journal, bringing the entire filesystem to where it was at a previous point in time. This is for extreme disaster recovery scenarios - it's not intended as an undelete operation. The option takes a journal sequence number; the desired sequence number can be determ...
```diff diff --git a/fs/bcachefs/btree_journal_iter.c b/fs/bcachefs/btree_journal_iter.c index de996c848e43..a41fabd06332 100644 --- a/fs/bcachefs/btree_journal_iter.c +++ b/fs/bcachefs/btree_journal_iter.c @@ -641,10 +641,11 @@ static int journal_sort_key_cmp(const void *_l, const void *_r) { const struct journal_k...
86c8db86af43f52f682e53a0f2f0828683be1e52
Analyze and fix the following issue in the Linux kernel code: selinux: fix selinux_xfrm_alloc_user() to set correct ctx_len
Problem Details: We should count the terminating NUL byte as part of the ctx_len. Otherwise, UBSAN logs a warning: UBSAN: array-index-out-of-bounds in security/selinux/xfrm.c:99:14 index 60 is out of range for type 'char [*]' The allocation itself is correct so there is no actual out of bounds indexing, just a war...
```diff diff --git a/security/selinux/xfrm.c b/security/selinux/xfrm.c index 90ec4ef1b082..61d56b0c2be1 100644 --- a/security/selinux/xfrm.c +++ b/security/selinux/xfrm.c @@ -94,7 +94,7 @@ static int selinux_xfrm_alloc_user(struct xfrm_sec_ctx **ctxp, ctx->ctx_doi = XFRM_SC_DOI_LSM; ctx->ctx_alg = XFRM_SC_ALG_SEL...
9fc86a85f36c51dd9e628c82091326151c8ff638
Analyze and fix the following issue in the Linux kernel code: lsm: trivial comment fix
Problem Details: Fix a typo in the security_inode_mkdir() comment block. Signed-off-by: Kalevi Kolttonen <kalevi@kolttonen.fi> [PM: subject tweak, add description] Signed-off-by: Paul Moore <paul@paul-moore.com>
```diff diff --git a/security/security.c b/security/security.c index 596d41818577..fc8405928cc7 100644 --- a/security/security.c +++ b/security/security.c @@ -2181,7 +2181,7 @@ int security_inode_symlink(struct inode *dir, struct dentry *dentry, } /** - * security_inode_mkdir() - Check if creation a new director is...
e1bc3a13bd775791cca0bb144d977b00f3598042
Analyze and fix the following issue in the Linux kernel code: drm/v3d: Avoid NULL pointer dereference in `v3d_job_update_stats()`
Problem Details: The following kernel Oops was recently reported by Mesa CI: [ 800.139824] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000588 [ 800.148619] Mem abort info: [ 800.151402] ESR = 0x0000000096000005 [ 800.155141] EC = 0x25: DABT (current EL), IL = 32 bits [ 800.16...
```diff diff --git a/drivers/gpu/drm/v3d/v3d_sched.c b/drivers/gpu/drm/v3d/v3d_sched.c index 35f131a46d07..42df9d3567e7 100644 --- a/drivers/gpu/drm/v3d/v3d_sched.c +++ b/drivers/gpu/drm/v3d/v3d_sched.c @@ -199,7 +199,6 @@ v3d_job_update_stats(struct v3d_job *job, enum v3d_queue queue) struct v3d_dev *v3d = job->v3d;...
21235ad935e907008481ea7fdf8837c5eddbd80e
Analyze and fix the following issue in the Linux kernel code: gve: Add adminq lock for queues creation and destruction
Problem Details: Adminq commands for queues creation and destruction were not consistently protected by the driver's adminq_lock. This was previously benign as these operations were always initiated from contexts holding kernel-level locks (e.g., rtnl_lock, netdev_lock), which provided serialization. Upcoming PTP aux_...
```diff diff --git a/drivers/net/ethernet/google/gve/gve_adminq.c b/drivers/net/ethernet/google/gve/gve_adminq.c index f57913a673b4..a0cc05a9eefc 100644 --- a/drivers/net/ethernet/google/gve/gve_adminq.c +++ b/drivers/net/ethernet/google/gve/gve_adminq.c @@ -463,6 +463,8 @@ static int gve_adminq_kick_and_wait(struct gv...
d79206451f4f99a03907ab9390361ab83b607a6a
Analyze and fix the following issue in the Linux kernel code: netconsole: improve code style in parser function
Problem Details: Split assignment from conditional checks and use preferred null pointer check style (!delim instead of == NULL) in netconsole_parser_cmdline(). This improves code readability and follows kernel coding style conventions. Signed-off-by: Breno Leitao <leitao@debian.org> Link: https://patch.msgid.link/202...
```diff diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c index cc45ec18848c..89afe127b46c 100644 --- a/drivers/net/netconsole.c +++ b/drivers/net/netconsole.c @@ -1704,7 +1704,8 @@ static int netconsole_parser_cmdline(struct netpoll *np, char *opt) int ipv6; if (*cur != '@') { - if ((delim = strc...
abebef96aab12da245e2a4fc4c3e6715a6239156
Analyze and fix the following issue in the Linux kernel code: netconsole: rename functions to better reflect their purpose
Problem Details: Rename netpoll_parse_options() to netconsole_parser_cmdline() and netpoll_print_options() to netconsole_print_banner() to better describe what these functions actually do within the netconsole context. Also fix minor code style issues including variable declaration ordering and spacing. These functio...
```diff diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c index 71522fb0eeee..cc45ec18848c 100644 --- a/drivers/net/netconsole.c +++ b/drivers/net/netconsole.c @@ -278,7 +278,7 @@ static void netconsole_process_cleanups_core(void) mutex_unlock(&target_cleanup_list_lock); } -static void netpoll_print...
2a8a5a5dd06eef580f9818567773fd75057cb875
Analyze and fix the following issue in the Linux kernel code: scsi: elx: efct: Fix memory leak in efct_hw_parse_filter()
Problem Details: strsep() modifies the address of the pointer passed to it so that it no longer points to the original address. This means kfree() gets the wrong pointer. Fix this by passing unmodified pointer returned from kstrdup() to kfree(). Found by Linux Verification Center (linuxtesting.org) with Svace. Fixes...
```diff diff --git a/drivers/scsi/elx/efct/efct_hw.c b/drivers/scsi/elx/efct/efct_hw.c index 5a5525054d71..5b079b8b7a08 100644 --- a/drivers/scsi/elx/efct/efct_hw.c +++ b/drivers/scsi/elx/efct/efct_hw.c @@ -1120,7 +1120,7 @@ int efct_hw_parse_filter(struct efct_hw *hw, void *value) { int rc = 0; - char *p = NULL; +...
1224b218a4b9203656ecc932152f4c81a97b4fcc
Analyze and fix the following issue in the Linux kernel code: pldmfw: Select CRC32 when PLDMFW is selected
Problem Details: pldmfw calls crc32 code and depends on it being enabled, else there is a link error as follows. So PLDMFW should select CRC32. lib/pldmfw/pldmfw.o: In function `pldmfw_flash_image': pldmfw.c:(.text+0x70f): undefined reference to `crc32_le_base' This problem was introduced by commit b8265621f488 (...
```diff diff --git a/lib/Kconfig b/lib/Kconfig index 6c1b8f184267..37db228f70a9 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -716,6 +716,7 @@ config GENERIC_LIB_DEVMEM_IS_ALLOWED config PLDMFW bool + select CRC32 default n config ASN1_ENCODER ```
b2e673ae53ef4b943f68585207a5f21cfc9a0714
Analyze and fix the following issue in the Linux kernel code: EDAC/amd64: Correct number of UMCs for family 19h models 70h-7fh
Problem Details: AMD's Family 19h-based Models 70h-7fh support 4 unified memory controllers (UMC) per processor die. The amd64_edac driver, however, assumes only 2 UMCs are supported since max_mcs variable for the models has not been explicitly set to 4. The same results in incomplete or incorrect memory information b...
```diff diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index 58b1482a0fbb..b681c0663203 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c @@ -3879,6 +3879,7 @@ static int per_family_init(struct amd64_pvt *pvt) break; case 0x70 ... 0x7f: pvt->ctl_name = "F19h_M70h"; ...
ae1ae11fb277f1335d6bcd4935ba0ea985af3c32
Analyze and fix the following issue in the Linux kernel code: audit,module: restore audit logging in load failure case
Problem Details: The move of the module sanity check to earlier skipped the audit logging call in the case of failure and to a place where the previously used context is unavailable. Add an audit logging call for the module loading failure case and get the module name when possible. Link: https://issues.redhat.com/br...
```diff diff --git a/include/linux/audit.h b/include/linux/audit.h index 0050ef288ab3..a394614ccd0b 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h @@ -417,7 +417,7 @@ extern int __audit_log_bprm_fcaps(struct linux_binprm *bprm, extern void __audit_log_capset(const struct cred *new, const struct cred *o...
1488a3089de3d0bcdc9532da7ce04cf0af9d7dd0
Analyze and fix the following issue in the Linux kernel code: drm/xe: Fix kconfig prompt
Problem Details: The xe driver is the official driver for Intel Xe2 and later, while maintaining experimental support for earlier GPUs. Reword the help message accordingly. Reviewed-by: Maarten Lankhorst <dev@lankhorst.se> Link: https://lore.kernel.org/r/20250611-xe-kconfig-help-v1-1-8bcc6b47d11a@intel.com Signed-off-...
```diff diff --git a/drivers/gpu/drm/xe/Kconfig b/drivers/gpu/drm/xe/Kconfig index c57f1da0791d..30ed74ad29ab 100644 --- a/drivers/gpu/drm/xe/Kconfig +++ b/drivers/gpu/drm/xe/Kconfig @@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-only config DRM_XE - tristate "Intel Xe Graphics" + tristate "Intel Xe2 Graphics" ...
9d4204a8106fe7dc80e3f2e440c8f2ba1ba47319
Analyze and fix the following issue in the Linux kernel code: lib/crypto/poly1305: Fix arm64's poly1305_blocks_arch()
Problem Details: For some reason arm64's Poly1305 code got changed to ignore the padbit argument. As a result, the output is incorrect when the message length is not a multiple of 16 (which is not reached with the standard ChaCha20Poly1305, but bcachefs could reach this). Fix this. Fixes: a59e5468a921 ("crypto: arm6...
```diff diff --git a/arch/arm64/lib/crypto/poly1305-glue.c b/arch/arm64/lib/crypto/poly1305-glue.c index 6a661cf04821..c9a74766785b 100644 --- a/arch/arm64/lib/crypto/poly1305-glue.c +++ b/arch/arm64/lib/crypto/poly1305-glue.c @@ -38,14 +38,14 @@ void poly1305_blocks_arch(struct poly1305_block_state *state, const u8 *s...
594902c986e269660302f09df9ec4bf1cf017b77
Analyze and fix the following issue in the Linux kernel code: x86,fs/resctrl: Remove inappropriate references to cacheinfo in the resctrl subsystem
Problem Details: In the resctrl subsystem's Sub-NUMA Cluster (SNC) mode, the rdt_mon_domain structure representing a NUMA node relies on the cacheinfo interface (rdt_mon_domain::ci) to store L3 cache information (e.g., shared_cpu_map) for monitoring. The L3 cache information of a SNC NUMA node determines which domains ...
```diff diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resctrl/core.c index 7109cbfcad4f..187d527ef73b 100644 --- a/arch/x86/kernel/cpu/resctrl/core.c +++ b/arch/x86/kernel/cpu/resctrl/core.c @@ -498,6 +498,7 @@ static void domain_add_cpu_mon(int cpu, struct rdt_resource *r) struct rdt_hw_mon_d...
d8ab68bdb294b09a761e967dad374f2965e1913f
Analyze and fix the following issue in the Linux kernel code: scsi: target: Fix NULL pointer dereference in core_scsi3_decode_spec_i_port()
Problem Details: The function core_scsi3_decode_spec_i_port(), in its error code path, unconditionally calls core_scsi3_lunacl_undepend_item() passing the dest_se_deve pointer, which may be NULL. This can lead to a NULL pointer dereference if dest_se_deve remains unset. SPC-3 PR SPEC_I_PT: Unable to locate dest_tpg U...
```diff diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c index 34cf2c399b39..70905805cb17 100644 --- a/drivers/target/target_core_pr.c +++ b/drivers/target/target_core_pr.c @@ -1842,7 +1842,9 @@ out: } kmem_cache_free(t10_pr_reg_cache, dest_pr_reg); - core_scsi3_lunacl_undepend_it...
95463cbb4fe6489921fb8c72890113dca54ce83f
Analyze and fix the following issue in the Linux kernel code: phy: drop probe registration printks
Problem Details: Drivers should generally be quiet on successful probe, but this is not followed by some PHY drivers, for example: snps-eusb2-hsphy 88e1000.phy: Registered Snps-eUSB2 phy qcom-eusb2-repeater c432000.spmi:pmic@7:phy@fd00: Registered Qcom-eUSB2 repeater qcom-eusb2-repeater c432000.spmi:pmic@a:phy@fd00...
```diff diff --git a/drivers/phy/broadcom/phy-bcm-ns2-pcie.c b/drivers/phy/broadcom/phy-bcm-ns2-pcie.c index 2eaa41f8fc70..67a6ae5ecba0 100644 --- a/drivers/phy/broadcom/phy-bcm-ns2-pcie.c +++ b/drivers/phy/broadcom/phy-bcm-ns2-pcie.c @@ -61,8 +61,6 @@ static int ns2_pci_phy_probe(struct mdio_device *mdiodev) return...
6143374c6dc874d301dc16612aed144bf4544bae
Analyze and fix the following issue in the Linux kernel code: tools arch x86: Sync the msr-index.h copy with the kernel sources
Problem Details: To pick up the changes from these csets: 159013a7ca18c271 ("x86/its: Enumerate Indirect Target Selection (ITS) bug") f4138de5e41fae1a ("x86/msr: Standardize on u64 in <asm/msr-index.h>") ec980e4facef8110 ("perf/x86/intel: Support auto counter reload") That cause no changes to tooling as it does...
```diff diff --git a/tools/arch/x86/include/asm/msr-index.h b/tools/arch/x86/include/asm/msr-index.h index e7d2f460fcc6..b7dded3c8113 100644 --- a/tools/arch/x86/include/asm/msr-index.h +++ b/tools/arch/x86/include/asm/msr-index.h @@ -533,7 +533,7 @@ #define MSR_HWP_CAPABILITIES 0x00000771 #define MSR_HWP_REQUEST_PK...
3417404c6f83c5d72d69ae81ded914bdc3841a49
Analyze and fix the following issue in the Linux kernel code: tools headers: Syncronize linux/build_bug.h with the kernel sources
Problem Details: To pick up the changes in: 243c90e917f5cfc9 ("build_bug.h: more user friendly error messages in BUILD_BUG_ON_ZERO()") This also needed to pick the __BUILD_BUG_ON_ZERO_MSG() in linux/compiler.h, that needed to be polished to avoid hitting old clang problems with _Static_assert on arrays of structs: ...
```diff diff --git a/tools/include/linux/build_bug.h b/tools/include/linux/build_bug.h index b4898ff085de..ab2aa97bd8ce 100644 --- a/tools/include/linux/build_bug.h +++ b/tools/include/linux/build_bug.h @@ -4,17 +4,17 @@ #include <linux/compiler.h> -#ifdef __CHECKER__ -#define BUILD_BUG_ON_ZERO(e) (0) -#else /* __...
67c3a0b0ad1a78d7ee9c3aadaed22561f7f85466
Analyze and fix the following issue in the Linux kernel code: coredump: fix socket path validation
Problem Details: Make sure that we keep it extensible and well-formed. Link: https://lore.kernel.org/20250612-work-coredump-massage-v1-3-315c0c34ba94@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org>
```diff diff --git a/fs/coredump.c b/fs/coredump.c index 42ceb9db2a5a..70e37435eca9 100644 --- a/fs/coredump.c +++ b/fs/coredump.c @@ -1399,9 +1399,17 @@ static inline bool check_coredump_socket(void) if (current->nsproxy->mnt_ns != init_task.nsproxy->mnt_ns) return false; - /* Must be an absolute path or the so...
bc9241367aac08de44633fd957b2452a6da8e6d4
Analyze and fix the following issue in the Linux kernel code: VFS: change old_dir and new_dir in struct renamedata to dentrys
Problem Details: all users of 'struct renamedata' have the dentry for the old and new directories, and often have no use for the inode except to store it in the renamedata. This patch changes struct renamedata to hold the dentry, rather than the inode, for the old and new directories, and changes callers to match. Th...
```diff diff --git a/fs/cachefiles/namei.c b/fs/cachefiles/namei.c index aecfc5c37b49..91dfd0231877 100644 --- a/fs/cachefiles/namei.c +++ b/fs/cachefiles/namei.c @@ -388,10 +388,10 @@ try_again: } else { struct renamedata rd = { .old_mnt_idmap = &nop_mnt_idmap, - .old_dir = d_inode(dir), + .old_parent = d...
7360ee47599af91a1d5f4e74d635d9408a54e489
Analyze and fix the following issue in the Linux kernel code: s390/pkey: Prevent overflow in size calculation for memdup_user()
Problem Details: Number of apqn target list entries contained in 'nr_apqns' variable is determined by userspace via an ioctl call so the result of the product in calculation of size passed to memdup_user() may overflow. In this case the actual size of the allocated area and the value describing it won't be in sync lea...
```diff diff --git a/drivers/s390/crypto/pkey_api.c b/drivers/s390/crypto/pkey_api.c index cef60770f68b..b3fcdcae379e 100644 --- a/drivers/s390/crypto/pkey_api.c +++ b/drivers/s390/crypto/pkey_api.c @@ -86,7 +86,7 @@ static void *_copy_apqns_from_user(void __user *uapqns, size_t nr_apqns) if (!uapqns || nr_apqns == 0...
c25892b7a1744355e16281cd24a9b59ec15ec974
Analyze and fix the following issue in the Linux kernel code: hwmon: (ltc4282) avoid repeated register write
Problem Details: The fault enabled bits were being mistankenly enabled twice in case the FW property is present. Remove one of the writes. Fixes: cbc29538dbf7 ("hwmon: Add driver for LTC4282") Signed-off-by: Nuno Sá <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20250611-fix-ltc4282-repetead-write-v1-1-fe46edd08...
```diff diff --git a/drivers/hwmon/ltc4282.c b/drivers/hwmon/ltc4282.c index 7f38d2696239..f607fe8f7937 100644 --- a/drivers/hwmon/ltc4282.c +++ b/drivers/hwmon/ltc4282.c @@ -1511,13 +1511,6 @@ static int ltc4282_setup(struct ltc4282_state *st, struct device *dev) return ret; } - if (device_property_read_bool(d...
2c021b45c154958566aad0cae9f74ab26a2d5732
Analyze and fix the following issue in the Linux kernel code: hwmon: (occ) fix unaligned accesses
Problem Details: Passing a pointer to an unaligned integer as a function argument is undefined behavior: drivers/hwmon/occ/common.c:492:27: warning: taking address of packed member 'accumulator' of class or structure 'power_sensor_2' may result in an unaligned pointer value [-Waddress-of-packed-member] 492 | val =...
```diff diff --git a/drivers/hwmon/occ/common.c b/drivers/hwmon/occ/common.c index 9029ad53790b..b3694a4209b9 100644 --- a/drivers/hwmon/occ/common.c +++ b/drivers/hwmon/occ/common.c @@ -459,12 +459,10 @@ static ssize_t occ_show_power_1(struct device *dev, return sysfs_emit(buf, "%llu\n", val); } -static u64 occ_g...
744c2fe950e936c4d62430de899d6253424200ed
Analyze and fix the following issue in the Linux kernel code: hwmon: (occ) Rework attribute registration for stack usage
Problem Details: clang produces an output with excessive stack usage when building the occ_setup_sensor_attrs() function, apparently the result of having a lot of struct literals and building with the -fno-strict-overflow option that leads clang to skip some optimization in case the 'attr' pointer overruns: drivers/hw...
```diff diff --git a/drivers/hwmon/occ/common.c b/drivers/hwmon/occ/common.c index 9486db249c64..9029ad53790b 100644 --- a/drivers/hwmon/occ/common.c +++ b/drivers/hwmon/occ/common.c @@ -747,29 +747,30 @@ static ssize_t occ_show_extended(struct device *dev, } /* - * Some helper macros to make it easier to define an...
14c9ede9ca4cd078ad76a6ab9617b81074eb58bf
Analyze and fix the following issue in the Linux kernel code: hwmon: (ftsteutates) Fix TOCTOU race in fts_read()
Problem Details: In the fts_read() function, when handling hwmon_pwm_auto_channels_temp, the code accesses the shared variable data->fan_source[channel] twice without holding any locks. It is first checked against FTS_FAN_SOURCE_INVALID, and if the check passes, it is read again when used as an argument to the BIT() ma...
```diff diff --git a/drivers/hwmon/ftsteutates.c b/drivers/hwmon/ftsteutates.c index a3a07662e491..8aeec16a7a90 100644 --- a/drivers/hwmon/ftsteutates.c +++ b/drivers/hwmon/ftsteutates.c @@ -423,13 +423,16 @@ static int fts_read(struct device *dev, enum hwmon_sensor_types type, u32 attr, break; case hwmon_pwm: ...
dce4bc30f42d313b4dc5832316196411b7f07ad0
Analyze and fix the following issue in the Linux kernel code: spi: spi-fsl-dspi: Revert unintended dependency change in config SPI_FSL_DSPI
Problem Details: Commit 9a30e332c36c ("spi: spi-fsl-dspi: Enable support for S32G platforms") reworks the dependencies of config SPI_FSL_DSPI, but introduces a typo changing the dependency to M5441x to a dependency on a non-existing config M54541x. Revert the unintended change to depend on the config M5441x. Fixes: 9...
```diff diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index 60eb65c927b1..f2d2295a5501 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -647,7 +647,7 @@ config SPI_FSL_SPI config SPI_FSL_DSPI tristate "Freescale DSPI controller" select REGMAP_MMIO - depends on ARCH_MXC || ARCH_NXP || M54541x ...
47972c1c3315672352f25c68f91dd88543541947
Analyze and fix the following issue in the Linux kernel code: ASoC: Intel: Replace deprecated strcpy() with strscpy()
Problem Details: strcpy() is deprecated, use strscpy() instead. As strcpy() performs no bounds checking on the destination buffer. This could result in buffer overflow. The safe replacement is strscpy(). Link: https://github.com/KSPP/linux/issues/88 Signed-off-by: Sachin Mokashi <sachin.mokashi@intel.com> Link: https...
```diff diff --git a/sound/soc/intel/boards/cht_bsw_rt5672.c b/sound/soc/intel/boards/cht_bsw_rt5672.c index aaef212cf44e..54c1894ee96a 100644 --- a/sound/soc/intel/boards/cht_bsw_rt5672.c +++ b/sound/soc/intel/boards/cht_bsw_rt5672.c @@ -14,6 +14,7 @@ #include <linux/platform_device.h> #include <linux/slab.h> #incl...
b081d8564e4a396843a78788476fdcbf70efed06
Analyze and fix the following issue in the Linux kernel code: ASoC: SOF: imx8: add core shutdown operation for imx8/imx8x
Problem Details: Currently, the DSP core from i.MX8QM/i.MX8QXP is able to operate while the firmware image is being loaded. Because of this, the DSP may change the content of the firmware data just after it was loaded, thus leading to the data having unexpected values when the DSP is reset (via run()). Fix this by imp...
```diff diff --git a/sound/soc/sof/imx/imx8.c b/sound/soc/sof/imx/imx8.c index a40a8047873e..b73dd91bd529 100644 --- a/sound/soc/sof/imx/imx8.c +++ b/sound/soc/sof/imx/imx8.c @@ -40,6 +40,19 @@ struct imx8m_chip_data { struct reset_control *run_stall; }; +static int imx8_shutdown(struct snd_sof_dev *sdev) +{ + /* ...
ea78eed7a451375fc8d604bbe3db55be5779eb7d
Analyze and fix the following issue in the Linux kernel code: thermal: intel: int340x: Allow temperature override
Problem Details: Add debugfs interface to override hardware provide temperature. This interface can be used primarily for debug. Alternatively this can be also used to use hardware control loops to manage temperature for virtual sensors. Virtual sensors are soft sensors created by kernel/ user space aggregating other s...
```diff diff --git a/drivers/thermal/intel/int340x_thermal/platform_temperature_control.c b/drivers/thermal/intel/int340x_thermal/platform_temperature_control.c index 7850e91a6e2c..0ccc72c93499 100644 --- a/drivers/thermal/intel/int340x_thermal/platform_temperature_control.c +++ b/drivers/thermal/intel/int340x_thermal/...
ce5cac69b2edac3e3246fee03e8f4c2a1075238b
Analyze and fix the following issue in the Linux kernel code: media: dvb-frontends: dib7090p: fix null-ptr-deref in dib7090p_rw_on_apb()
Problem Details: In dib7090p_rw_on_apb, msg is controlled by user. When msg[0].buf is null and msg[0].len is zero, former checks on msg[0].buf would be passed. If accessing msg[0].buf[2] without sanity check, null pointer deref would happen. We add check on msg[0].len to prevent crash. Similar issue occurs when access ...
```diff diff --git a/drivers/media/dvb-frontends/dib7000p.c b/drivers/media/dvb-frontends/dib7000p.c index 2c2354dd547d..7d3a994b7cc4 100644 --- a/drivers/media/dvb-frontends/dib7000p.c +++ b/drivers/media/dvb-frontends/dib7000p.c @@ -2260,8 +2260,12 @@ static int dib7090p_rw_on_apb(struct i2c_adapter *i2c_adap, u16 ...
ed0234c8458b3149f15e496b48a1c9874dd24a1b
Analyze and fix the following issue in the Linux kernel code: media: dvb-frontends: w7090p: fix null-ptr-deref in w7090p_tuner_write_serpar and w7090p_tuner_read_serpar
Problem Details: In w7090p_tuner_write_serpar, msg is controlled by user. When msg[0].buf is null and msg[0].len is zero, former checks on msg[0].buf would be passed. If accessing msg[0].buf[2] without sanity check, null pointer deref would happen. We add check on msg[0].len to prevent crash. Similar commit: commit 0e...
```diff diff --git a/drivers/media/dvb-frontends/dib7000p.c b/drivers/media/dvb-frontends/dib7000p.c index b40daf242046..2c2354dd547d 100644 --- a/drivers/media/dvb-frontends/dib7000p.c +++ b/drivers/media/dvb-frontends/dib7000p.c @@ -2193,6 +2193,8 @@ static int w7090p_tuner_write_serpar(struct i2c_adapter *i2c_adap, ...
db44d088a5ab030b741a3adf2e7b181a8a6dcfbe
Analyze and fix the following issue in the Linux kernel code: xfs: actually use the xfs_growfs_check_rtgeom tracepoint
Problem Details: We created a new tracepoint but forgot to put it in. Fix that. Cc: rostedt@goodmis.org Cc: stable@vger.kernel.org # v6.14 Fixes: 59a57acbce282d ("xfs: check that the rtrmapbt maxlevels doesn't increase when growing fs") Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Carlos Maiolino <...
```diff diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c index 6484c596ecea..736eb0924573 100644 --- a/fs/xfs/xfs_rtalloc.c +++ b/fs/xfs/xfs_rtalloc.c @@ -1259,6 +1259,8 @@ xfs_growfs_check_rtgeom( kfree(nmp); + trace_xfs_growfs_check_rtgeom(mp, min_logfsbs); + if (min_logfsbs > mp->m_sb.sb_logblocks) ...
a593c89ac5a417605b165cbc9768b3663ab4d8ad
Analyze and fix the following issue in the Linux kernel code: xfs: remove NULL pointer checks in xfs_mru_cache_insert
Problem Details: Remove the check for a NULL mru or mru->list in xfs_mru_cache_insert as this API misused lead to a direct NULL pointer dereference on first use and is not user triggerable. As a smatch run by Dan points out with the recent cleanup it would otherwise try to free the object we just determined to be NULL...
```diff diff --git a/fs/xfs/xfs_mru_cache.c b/fs/xfs/xfs_mru_cache.c index 08443ceec329..c95401de8397 100644 --- a/fs/xfs/xfs_mru_cache.c +++ b/fs/xfs/xfs_mru_cache.c @@ -425,10 +425,6 @@ xfs_mru_cache_insert( { int error = -EINVAL; - ASSERT(mru && mru->lists); - if (!mru || !mru->lists) - goto out_free; - er...
b0f77d301eb2b4e1fc816f33ade8519ae7f894f4
Analyze and fix the following issue in the Linux kernel code: xfs: check for shutdown before going to sleep in xfs_select_zone
Problem Details: Ensure the file system hasn't been shut down before waiting for a free zone to become available, because that won't happen on a shut down file system. Without this processes can occasionally get stuck in the allocator wait loop when racing with a file system shutdown. This sporadically happens when ru...
```diff diff --git a/fs/xfs/xfs_zone_alloc.c b/fs/xfs/xfs_zone_alloc.c index 80add26c0111..0de6f64b3169 100644 --- a/fs/xfs/xfs_zone_alloc.c +++ b/fs/xfs/xfs_zone_alloc.c @@ -727,7 +727,7 @@ xfs_select_zone( for (;;) { prepare_to_wait(&zi->zi_zone_wait, &wait, TASK_UNINTERRUPTIBLE); oz = xfs_select_zone_nowait(...
dd2d6b7f6f519d078a866a36a625b0297d81c5bc
Analyze and fix the following issue in the Linux kernel code: fs: drop assert in file_seek_cur_needs_f_lock
Problem Details: The assert in function file_seek_cur_needs_f_lock() can be triggered very easily because there are many users of vfs_llseek() (such as overlayfs) that do their custom locking around llseek instead of relying on fdget_pos(). Just drop the overzealous assertion. Fixes: da06e3c51794 ("fs: don't needlessl...
```diff diff --git a/fs/file.c b/fs/file.c index 3a3146664cf3..b6db031545e6 100644 --- a/fs/file.c +++ b/fs/file.c @@ -1198,8 +1198,12 @@ bool file_seek_cur_needs_f_lock(struct file *file) if (!(file->f_mode & FMODE_ATOMIC_POS) && !file->f_op->iterate_shared) return false; - VFS_WARN_ON_ONCE((file_count(file) > ...
e6382fcf989074566bb9a54bbd3c514d7bb99397
Analyze and fix the following issue in the Linux kernel code: gpio: spacemit: Add missing MODULE_DEVICE_TABLE
Problem Details: The gpio-spacemit-k1 driver can be compiled as a module. Add missing MODULE_DEVICE_TABLE so it can be matched by modalias and automatically loaded by udev. Fixes: d00553240ef8 ("gpio: spacemit: add support for K1 SoC") Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn> Reviewed-by: Yixun Lan <dlan@g...
```diff diff --git a/drivers/gpio/gpio-spacemit-k1.c b/drivers/gpio/gpio-spacemit-k1.c index f027066365ff..3cc75c701ec4 100644 --- a/drivers/gpio/gpio-spacemit-k1.c +++ b/drivers/gpio/gpio-spacemit-k1.c @@ -278,6 +278,7 @@ static const struct of_device_id spacemit_gpio_dt_ids[] = { { .compatible = "spacemit,k1-gpio" ...
629c1a9c2df9df3a71e91e253e29c4e420898733
Analyze and fix the following issue in the Linux kernel code: fbdev/viafb: Do not include <linux/export.h>
Problem Details: Fix the compile-time warning drivers/video/fbdev/via/via-gpio.c: warning: EXPORT_SYMBOL() is not used, but #include <linux/export.h> is present Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Helge Deller <deller@gmx.de> Fixes: 7d95680d64ac ("scripts/misc-check: check unnecessar...
```diff diff --git a/drivers/video/fbdev/via/via-gpio.c b/drivers/video/fbdev/via/via-gpio.c index 27226a8f3f42..72302384bf77 100644 --- a/drivers/video/fbdev/via/via-gpio.c +++ b/drivers/video/fbdev/via/via-gpio.c @@ -10,7 +10,6 @@ #include <linux/gpio/machine.h> #include <linux/platform_device.h> #include <linux/v...
b6c6264adb3379a8aecc59699596cd19b1d1fc3f
Analyze and fix the following issue in the Linux kernel code: fbdev/viafb: Include <linux/export.h>
Problem Details: Fix the compile-time warnings drivers/video/fbdev/via/via-core.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing drivers/video/fbdev/via/via_i2c.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing Signed-off-by: Thomas Zimmermann <tzimmermann@...
```diff diff --git a/drivers/video/fbdev/via/via-core.c b/drivers/video/fbdev/via/via-core.c index 908524a74a38..a8d4a3e2c65e 100644 --- a/drivers/video/fbdev/via/via-core.c +++ b/drivers/video/fbdev/via/via-core.c @@ -9,6 +9,7 @@ * Core code for the Via multifunction framebuffer device. */ #include <linux/apertur...
c8f796f6e6e97168ffa49deab0dd32a127994f74
Analyze and fix the following issue in the Linux kernel code: fbdev/sisfb: Unexport symbols
Problem Details: Fix the compile-time warning drivers/video/fbdev/sis/sis_main.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing The affected symbols are not used outside of their module. Some of the symbols are not used anywhere, so remove the functions entirely. Also remove the related...
```diff diff --git a/drivers/video/fbdev/sis/sis.h b/drivers/video/fbdev/sis/sis.h index d632f096083b..3d658482c69d 100644 --- a/drivers/video/fbdev/sis/sis.h +++ b/drivers/video/fbdev/sis/sis.h @@ -673,9 +673,7 @@ unsigned int sisfb_read_mio_pci_word(struct SiS_Private *SiS_Pr, int reg); /* SiS-specific exported fu...
9bf9f98d00df53b32b83e03c0e7f06e8a0fdaf0b
Analyze and fix the following issue in the Linux kernel code: fbdev/pxafb: Unexport symbol
Problem Details: Fix the compile-time warning drivers/video/fbdev/pxafb.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing The affected symbol is not used anywhere, so remove the function entirely. v2: - remove unused functions (Helge) Signed-off-by: Thomas Zimmermann <tzimmermann@suse....
```diff diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c index ee6da5084242..baf87f34cc24 100644 --- a/drivers/video/fbdev/pxafb.c +++ b/drivers/video/fbdev/pxafb.c @@ -1030,9 +1030,8 @@ static inline unsigned int get_pcd(struct pxafb_info *fbi, /* * Some touchscreens need hsync information f...
a27886399d8f55130935e1a1ab21ff47656f458e
Analyze and fix the following issue in the Linux kernel code: fbdev/mb862xx: Do not include <linux/export.h>
Problem Details: Fix the compile-time warning drivers/video/fbdev/mb862xx/mb862xx-i2c.c: warning: EXPORT_SYMBOL() is not used, but #include <linux/export.h> is present Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Helge Deller <deller@gmx.de> Fixes: 7d95680d64ac ("scripts/misc-check: check unn...
```diff diff --git a/drivers/video/fbdev/mb862xx/mb862xx-i2c.c b/drivers/video/fbdev/mb862xx/mb862xx-i2c.c index ffdb1597d303..08b7f19a67a5 100644 --- a/drivers/video/fbdev/mb862xx/mb862xx-i2c.c +++ b/drivers/video/fbdev/mb862xx/mb862xx-i2c.c @@ -9,7 +9,6 @@ #include <linux/i2c.h> #include <linux/io.h> #include <lin...
660c06ed2fad50d5d03438be2e3a2a688c127c7e
Analyze and fix the following issue in the Linux kernel code: fbdev/omap2: Do not include <linux/export.h>
Problem Details: Fix the compile-time warnings drivers/video/fbdev/omap2/omapfb/dss/dpi.c: warning: EXPORT_SYMBOL() is not used, but #include <linux/export.h> is present drivers/video/fbdev/omap2/omapfb/dss/sdi.c: warning: EXPORT_SYMBOL() is not used, but #include <linux/export.h> is present drivers/video/fbdev/...
```diff diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dpi.c b/drivers/video/fbdev/omap2/omapfb/dss/dpi.c index 86ed4c077c30..ad8ae1727966 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/dpi.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/dpi.c @@ -13,7 +13,6 @@ #include <linux/kernel.h> #include <linux/delay.h> ...
c5bdc45251eefda90752851b434f96e3582d24d7
Analyze and fix the following issue in the Linux kernel code: fbdev/omap2: Include <linux/export.h>
Problem Details: Fix the compile-time warnings drivers/video/fbdev/omap2/omapfb/dss/apply.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing drivers/video/fbdev/omap2/omapfb/dss/core.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing drivers/video/fbdev/omap2...
```diff diff --git a/drivers/video/fbdev/omap2/omapfb/dss/apply.c b/drivers/video/fbdev/omap2/omapfb/dss/apply.c index acca991c7540..39947e569a54 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/apply.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/apply.c @@ -6,6 +6,7 @@ #define DSS_SUBSYS_NAME "APPLY" +#include <l...
7300225bb39ab2272200cce47f4ac061025a029b
Analyze and fix the following issue in the Linux kernel code: fbdev/omap: Include <linux/export.h>
Problem Details: Fix the compile-time warnings drivers/video/fbdev/omap/lcd_dma.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing drivers/video/fbdev/omap/lcdc.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing drivers/video/fbdev/omap/omapfb_main.c: warning...
```diff diff --git a/drivers/video/fbdev/omap/lcd_dma.c b/drivers/video/fbdev/omap/lcd_dma.c index 0da23c57e475..56300be71c57 100644 --- a/drivers/video/fbdev/omap/lcd_dma.c +++ b/drivers/video/fbdev/omap/lcd_dma.c @@ -18,6 +18,7 @@ * Support functions for the OMAP internal DMA channels. */ +#include <linux/expor...
a93f45d2553d05277627ecb5f13162520bce28e2
Analyze and fix the following issue in the Linux kernel code: fbdev/matroxfb: Include <linux/export.h>
Problem Details: Fix the compile-time warnings drivers/video/fbdev/matrox/g450_pll.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing drivers/video/fbdev/matrox/matroxfb_DAC1064.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing drivers/video/fbdev/matrox/mat...
```diff diff --git a/drivers/video/fbdev/matrox/g450_pll.c b/drivers/video/fbdev/matrox/g450_pll.c index 96996efc9288..e2c1478aa47f 100644 --- a/drivers/video/fbdev/matrox/g450_pll.c +++ b/drivers/video/fbdev/matrox/g450_pll.c @@ -14,6 +14,8 @@ * */ +#include <linux/export.h> + #include "g450_pll.h" #include "m...
c70993bcd5b252802e8b0d5b7cd091d5763656f9
Analyze and fix the following issue in the Linux kernel code: fbdev/matroxfb: Remove trailing whitespaces
Problem Details: Fix coding style. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Helge Deller <deller@gmx.de> Link: https://lore.kernel.org/r/20250612081738.197826-6-tzimmermann@suse.de
```diff diff --git a/drivers/video/fbdev/matrox/g450_pll.c b/drivers/video/fbdev/matrox/g450_pll.c index ff8e321a22ce..96996efc9288 100644 --- a/drivers/video/fbdev/matrox/g450_pll.c +++ b/drivers/video/fbdev/matrox/g450_pll.c @@ -258,13 +258,13 @@ static inline unsigned int g450_findworkingpll(struct matrox_fb_info *m...
3bb0aeb60aa5c62870b51dcf9cf705b8339be24d
Analyze and fix the following issue in the Linux kernel code: fbdev/cyber2000fb: Unexport symbols
Problem Details: Fix the compile-time warning drivers/video/fbdev/cyber2000fb.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing The affected symbols are not used anywhere, so remove the functions entirely. v2: - remove unused functions (Helge) Signed-off-by: Thomas Zimmermann <tzimmerm...
```diff diff --git a/drivers/video/fbdev/cyber2000fb.c b/drivers/video/fbdev/cyber2000fb.c index 986760b90465..5cb5ee517f81 100644 --- a/drivers/video/fbdev/cyber2000fb.c +++ b/drivers/video/fbdev/cyber2000fb.c @@ -1089,7 +1089,6 @@ void cyber2000fb_enable_extregs(struct cfb_info *cfb) cyber2000_grphw(EXT_FUNC_CTL, ...
5f13d0ff490d6ab3e81f7baf03753e61d552f383
Analyze and fix the following issue in the Linux kernel code: fbdev/c2p: Include <linux/export.h>
Problem Details: Fix the compile-time warnings drivers/video/fbdev/c2p_iplan2.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing drivers/video/fbdev/c2p_planar.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing Signed-off-by: Thomas Zimmermann <tzimmermann@sus...
```diff diff --git a/drivers/video/fbdev/c2p_iplan2.c b/drivers/video/fbdev/c2p_iplan2.c index cfd2361f24b1..ee4b315d3f40 100644 --- a/drivers/video/fbdev/c2p_iplan2.c +++ b/drivers/video/fbdev/c2p_iplan2.c @@ -8,6 +8,7 @@ * for more details. */ +#include <linux/export.h> #include <linux/module.h> #include <li...
2b043314013a7ba0a80d6fa0e75ac79529598615
Analyze and fix the following issue in the Linux kernel code: fbdev: Include <linux/export.h>
Problem Details: Fix the compile-time warnings drivers/video/fbdev/core/cfbcopyarea.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing drivers/video/fbdev/core/cfbfillrect.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing drivers/video/fbdev/core/cfbimgblt.c...
```diff diff --git a/drivers/video/fbdev/core/cfbcopyarea.c b/drivers/video/fbdev/core/cfbcopyarea.c index 23fbf3a8df7c..ce2e6807be60 100644 --- a/drivers/video/fbdev/core/cfbcopyarea.c +++ b/drivers/video/fbdev/core/cfbcopyarea.c @@ -2,6 +2,8 @@ /* * Copyright (C) 2025 Zsolt Kajtar (soci@c64.rulez.org) */ + +#in...
7a1e3093c49b977d8f0cf95d08a9da532e7db587
Analyze and fix the following issue in the Linux kernel code: fbdev: Remove trailing whitespaces
Problem Details: Fix coding style. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Helge Deller <deller@gmx.de> Link: https://lore.kernel.org/r/20250612081738.197826-2-tzimmermann@suse.de
```diff diff --git a/drivers/video/fbdev/macmodes.c b/drivers/video/fbdev/macmodes.c index d6be3c67d3df..cd689161f561 100644 --- a/drivers/video/fbdev/macmodes.c +++ b/drivers/video/fbdev/macmodes.c @@ -236,7 +236,7 @@ int mac_vmode_to_var(int vmode, int cmode, struct fb_var_screeninfo *var) case CMODE_8: var->...
af5ea7d8a30512de2836175bd7aa9ae0bba94bad
Analyze and fix the following issue in the Linux kernel code: drm/ttm: Include <linux/export.h>
Problem Details: Fix the compile-time warnings drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing drivers/gpu/drm/ttm/tests/ttm_mock_manager.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing drivers/gpu/drm/ttm/ttm...
```diff diff --git a/drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c b/drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c index b91c13f46225..7aaf0d1395ff 100644 --- a/drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c +++ b/drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c @@ -2,6 +2,9 @@ /* * Copyright © 2023 Intel Corporation ...
815e1af00e302efca4b2d31736dca7034ebe435a
Analyze and fix the following issue in the Linux kernel code: drm/scheduler: Include <linux/export.h>
Problem Details: Fix the compile-time warnings drivers/gpu/drm/scheduler/sched_entity.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing drivers/gpu/drm/scheduler/sched_fence.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing drivers/gpu/drm/scheduler/sched_m...
```diff diff --git a/drivers/gpu/drm/scheduler/sched_entity.c b/drivers/gpu/drm/scheduler/sched_entity.c index 86214b6e02d7..5635b3a826d8 100644 --- a/drivers/gpu/drm/scheduler/sched_entity.c +++ b/drivers/gpu/drm/scheduler/sched_entity.c @@ -21,6 +21,7 @@ * */ +#include <linux/export.h> #include <linux/slab.h> ...
9bd66ab7a6a51d87242efb4f4c3fc2879a08f503
Analyze and fix the following issue in the Linux kernel code: drm/panel: Include <linux/export.h>
Problem Details: Fix the compile-time warnings drivers/gpu/drm/drm_panel.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing drivers/gpu/drm/drm_panel_backlight_quirks.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing drivers/gpu/drm/drm_panel_orientation_qui...
```diff diff --git a/drivers/gpu/drm/drm_panel.c b/drivers/gpu/drm/drm_panel.c index 805b4151ccef..c8bb28dccdc1 100644 --- a/drivers/gpu/drm/drm_panel.c +++ b/drivers/gpu/drm/drm_panel.c @@ -23,6 +23,7 @@ #include <linux/backlight.h> #include <linux/err.h> +#include <linux/export.h> #include <linux/module.h> #inc...
714b79f7f416eae2b6d7d3b747deb7a498b4b87f
Analyze and fix the following issue in the Linux kernel code: drm/gem: Include <linux/export.h>
Problem Details: Fix the compile-time warnings drivers/gpu/drm/drm_gem.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing drivers/gpu/drm/drm_gem_atomic_helper.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing drivers/gpu/drm/drm_gem_framebuffer_helper.c: wa...
```diff diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c index a0a3b6baa569..19d50d254fe6 100644 --- a/drivers/gpu/drm/drm_gem.c +++ b/drivers/gpu/drm/drm_gem.c @@ -26,6 +26,7 @@ */ #include <linux/dma-buf.h> +#include <linux/export.h> #include <linux/file.h> #include <linux/fs.h> #include <li...
8f194494fd84a205eee9d1d86f1ea2c9ba2f20b9
Analyze and fix the following issue in the Linux kernel code: drm/display: Include <linux/export.h>
Problem Details: Fix the compile-time warnings drivers/gpu/drm/display/drm_bridge_connector.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing drivers/gpu/drm/display/drm_dp_aux_bus.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing drivers/gpu/drm/display/dr...
```diff diff --git a/drivers/gpu/drm/display/drm_bridge_connector.c b/drivers/gpu/drm/display/drm_bridge_connector.c index 58846e26f1e1..6cdb432dbc30 100644 --- a/drivers/gpu/drm/display/drm_bridge_connector.c +++ b/drivers/gpu/drm/display/drm_bridge_connector.c @@ -3,6 +3,7 @@ * Copyright (C) 2019 Laurent Pinchart <...
8b7a4b100c783218378a67a4113939f92b455104
Analyze and fix the following issue in the Linux kernel code: drm/client: Include <linux/export.h>
Problem Details: Fixes the compile-time warnings drivers/gpu/drm/clients/drm_client_setup.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing drivers/gpu/drm/drm_client.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing drivers/gpu/drm/drm_client_event.c: warn...
```diff diff --git a/drivers/gpu/drm/clients/drm_client_setup.c b/drivers/gpu/drm/clients/drm_client_setup.c index e17265039ca8..aec2fab6d2bf 100644 --- a/drivers/gpu/drm/clients/drm_client_setup.c +++ b/drivers/gpu/drm/clients/drm_client_setup.c @@ -1,5 +1,7 @@ // SPDX-License-Identifier: MIT +#include <linux/expor...
8c7c767a5efb69f26f62a728eadec3fee4fa372e
Analyze and fix the following issue in the Linux kernel code: drm/bridge: Include <linux/export.h>
Problem Details: Fix compile-time warnings drivers/gpu/drm/bridge/analogix/analogix-i2c-dptx.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing drivers/gpu/drm/bridge/analogix/analogix_dp_core.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing drivers/gpu/drm...
```diff diff --git a/drivers/gpu/drm/bridge/analogix/analogix-i2c-dptx.c b/drivers/gpu/drm/bridge/analogix/analogix-i2c-dptx.c index b1e482994ffe..e8662168717d 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix-i2c-dptx.c +++ b/drivers/gpu/drm/bridge/analogix/analogix-i2c-dptx.c @@ -5,6 +5,8 @@ * Based on anx7808 ...
09cba36cc840f39fb1d712193593083edd7a46e1
Analyze and fix the following issue in the Linux kernel code: drm: Include <linux/export.h>
Problem Details: Fix the compile-time warnings drivers/gpu/drm/drm_atomic.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing drivers/gpu/drm/drm_atomic_helper.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing drivers/gpu/drm/drm_atomic_state_helper.c: warnin...
```diff diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c index 0138cf0b8b63..cd15cf52f0c9 100644 --- a/drivers/gpu/drm/drm_atomic.c +++ b/drivers/gpu/drm/drm_atomic.c @@ -26,7 +26,7 @@ * Daniel Vetter <daniel.vetter@ffwll.ch> */ - +#include <linux/export.h> #include <linux/sync_file.h> ...
22e28f06df3bf63004e1579f5b1601069182fdde
Analyze and fix the following issue in the Linux kernel code: drm: Do not include <linux/export.h>
Problem Details: Fix the compile-time error drivers/gpu/drm/drm_pci.c: warning: EXPORT_SYMBOL() is not used, but #include <linux/export.h> is present Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Fixes: 7d95680d64ac ("scripts/misc-check: check unnecessary #include <linux/export.h> when W=1") Reviewed-by: A...
```diff diff --git a/drivers/gpu/drm/drm_pci.c b/drivers/gpu/drm/drm_pci.c index c585f1e8803e..cb0f68d7f8ea 100644 --- a/drivers/gpu/drm/drm_pci.c +++ b/drivers/gpu/drm/drm_pci.c @@ -23,7 +23,6 @@ */ #include <linux/dma-mapping.h> -#include <linux/export.h> #include <linux/list.h> #include <linux/mutex.h> #incl...
bad694f877954a0daa9eda02b935c983725d5f6c
Analyze and fix the following issue in the Linux kernel code: media: rcar-vin: Change link setup argument
Problem Details: The link setup callback once acted on each VIN instance, and expected to be called once for each VIN instance. This have changed as the driver grew support for later hardware generations and the callback is now expected to setup links for all VIN in the group. The argument to the callback has however ...
```diff diff --git a/drivers/media/platform/renesas/rcar-vin/rcar-core.c b/drivers/media/platform/renesas/rcar-vin/rcar-core.c index 66efe075adae..73d713868391 100644 --- a/drivers/media/platform/renesas/rcar-vin/rcar-core.c +++ b/drivers/media/platform/renesas/rcar-vin/rcar-core.c @@ -65,7 +65,7 @@ static void rvin_gr...
1b83fa6eb9706be4023bce88e952902acf8646ba
Analyze and fix the following issue in the Linux kernel code: media: rcar-vin: Use correct count of remote subdevices
Problem Details: When extending the driver with Gen4 support the iteration of over possible remote subdevices changed from being R-Car CSI-2 Rx only to also cover R-Car CSISP instances. In two loops updating the bounds variable was missed. This had no ill effect as the count the two values have always been the same in...
```diff diff --git a/drivers/media/platform/renesas/rcar-vin/rcar-core.c b/drivers/media/platform/renesas/rcar-vin/rcar-core.c index 846ae7989b1d..cf5830d7d7b1 100644 --- a/drivers/media/platform/renesas/rcar-vin/rcar-core.c +++ b/drivers/media/platform/renesas/rcar-vin/rcar-core.c @@ -213,7 +213,7 @@ static int rvin_g...
797567e81d201ee478f8efa5004804374fc2cbaf
Analyze and fix the following issue in the Linux kernel code: media: rcar-csi2: Clarify usage of mbps and msps
Problem Details: The helper function to deal with calculating the link speed is designed in such a way that it returns the correct type bps (bits per second) for D-PHY and sps (symbols per second) for C-PHY. And for historical reasons the function kept the name mbps. This is confusing, fix it by having the function on...
```diff diff --git a/drivers/media/platform/renesas/rcar-csi2.c b/drivers/media/platform/renesas/rcar-csi2.c index 9979de4f6ef1..358e7470befc 100644 --- a/drivers/media/platform/renesas/rcar-csi2.c +++ b/drivers/media/platform/renesas/rcar-csi2.c @@ -975,10 +975,6 @@ static int rcsi2_calc_mbps(struct rcar_csi2 *priv, u...
782b6a718651eda3478b1824b37a8b3185d2740c
Analyze and fix the following issue in the Linux kernel code: media: uvcvideo: Fix 1-byte out-of-bounds read in uvc_parse_format()
Problem Details: The buffer length check before calling uvc_parse_format() only ensured that the buffer has at least 3 bytes (buflen > 2), buf the function accesses buffer[3], requiring at least 4 bytes. This can lead to an out-of-bounds read if the buffer has exactly 3 bytes. Fix it by checking that the buffer has a...
```diff diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c index 916c2d13e268..62eb45435d8b 100644 --- a/drivers/media/usb/uvc/uvc_driver.c +++ b/drivers/media/usb/uvc/uvc_driver.c @@ -344,6 +344,9 @@ static int uvc_parse_format(struct uvc_device *dev, u8 ftype; int ret; + if (bu...
9764401bf6f8a20eb11c2e78470f20fee91a9ea7
Analyze and fix the following issue in the Linux kernel code: media: uvcvideo: Fix bandwidth issue for Alcor camera
Problem Details: Some broken device return wrong dwMaxPayloadTransferSize fields as follows: [ 218.632537] uvcvideo: Device requested 2752512 B/frame bandwidth. [ 218.632598] uvcvideo: No fast enough alt setting for requested bandwidth. When dwMaxPayloadTransferSize is greater than maxpsize, it will prevent the cam...
```diff diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c index e3567aeb0007..11769a1832d2 100644 --- a/drivers/media/usb/uvc/uvc_video.c +++ b/drivers/media/usb/uvc/uvc_video.c @@ -262,6 +262,15 @@ static void uvc_fixup_video_ctrl(struct uvc_streaming *stream, ctrl->dwMaxPayloadTr...
fac16e4147a20e8488304b2630471eec6555b0d1
Analyze and fix the following issue in the Linux kernel code: wifi: rtw89: coex: refine debug log with format version and readable string
Problem Details: Fix unexpected line warp. Collect firmware report format version and driver support report format version code to check unexpected C2H report exception. Signed-off-by: Ching-Te Ku <ku920601@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250611035523.3643...
```diff diff --git a/drivers/net/wireless/realtek/rtw89/coex.c b/drivers/net/wireless/realtek/rtw89/coex.c index 8a92bdffacae..6ec83b928bc2 100644 --- a/drivers/net/wireless/realtek/rtw89/coex.c +++ b/drivers/net/wireless/realtek/rtw89/coex.c @@ -278,6 +278,39 @@ static u32 chip_id_to_bt_rom_code_id(u32 id) } } +#...
c464ce6af332e7c802c36cd337cacf81db05400c
Analyze and fix the following issue in the Linux kernel code: drm/i915/dsi: Fix off by one in BXT_MIPI_TRANS_VTOTAL
Problem Details: BXT_MIPI_TRANS_VTOTAL must be programmed with vtotal-1 instead of vtotal. Make it so. Cc: stable@vger.kernel.org Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250314150136.22564-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikul...
```diff diff --git a/drivers/gpu/drm/i915/display/vlv_dsi.c b/drivers/gpu/drm/i915/display/vlv_dsi.c index 346737f15fa9..21c1e10caf68 100644 --- a/drivers/gpu/drm/i915/display/vlv_dsi.c +++ b/drivers/gpu/drm/i915/display/vlv_dsi.c @@ -1056,7 +1056,7 @@ static void bxt_dsi_get_pipe_config(struct intel_encoder *encoder, ...
a7137b1825b535eb7258b25beeb0d5425e0037d2
Analyze and fix the following issue in the Linux kernel code: drm/i915/pmu: Fix build error with GCOV and AutoFDO enabled
Problem Details: i915_pmu.c may fail to build with GCOV and AutoFDO enabled. ../drivers/gpu/drm/i915/i915_pmu.c:116:3: error: call to '__compiletime_assert_487' declared with 'error' attribute: BUILD_BUG_ON failed: bit > BITS_PER_TYPE(typeof_member(struct i915_pmu, enable)) - 1 116 | BUILD_BUG_ON(bit...
```diff diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c index e5a188ce3185..990bfaba3ce4 100644 --- a/drivers/gpu/drm/i915/i915_pmu.c +++ b/drivers/gpu/drm/i915/i915_pmu.c @@ -112,7 +112,7 @@ static u32 config_mask(const u64 config) { unsigned int bit = config_bit(config); - if (__bu...
76b3e5078d76f0eeadb7aacf9845399f8473da0d
Analyze and fix the following issue in the Linux kernel code: wifi: rtlwifi: fix possible skb memory leak in _rtl_pci_init_one_rxdesc()
Problem Details: When `dma_mapping_error()` is true, if a new `skb` has been allocated, then it must be de-allocated. Compile tested only Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250613074014.69856-2-fourier.thomas@gmail...
```diff diff --git a/drivers/net/wireless/realtek/rtlwifi/pci.c b/drivers/net/wireless/realtek/rtlwifi/pci.c index 898f597f70a9..472072630f8d 100644 --- a/drivers/net/wireless/realtek/rtlwifi/pci.c +++ b/drivers/net/wireless/realtek/rtlwifi/pci.c @@ -572,8 +572,11 @@ remap: dma_map_single(&rtlpci->pdev->dev, skb_tai...
191334400d8031df367eb74b6ab49bc163f6f821
Analyze and fix the following issue in the Linux kernel code: bcachefs: fsck: fix extent past end of inode repair
Problem Details: Fix the case where we're deleting in a different snapshot and need to emit a whiteout - that requires a regular BTREE_ITER_filter_snapshots iterator. Also, only delete the part of the extent that extents past i_size. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/fsck.c b/fs/bcachefs/fsck.c index 28ca07c0e029..48810a8e5d4b 100644 --- a/fs/bcachefs/fsck.c +++ b/fs/bcachefs/fsck.c @@ -1820,18 +1820,39 @@ static int check_extent(struct btree_trans *trans, struct btree_iter *iter, !key_visible_in_snapshot(c, s, i->inode.bi_snapshot, k.k->p.s...
b17d7bdb128c50025fc3eb7a9e57b3c7caa4a5ac
Analyze and fix the following issue in the Linux kernel code: bcachefs: fsck: fix add_inode()
Problem Details: the inode btree uses the offset field for the inum, not the inode field. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/fsck.c b/fs/bcachefs/fsck.c index b80a56e19b40..28ca07c0e029 100644 --- a/fs/bcachefs/fsck.c +++ b/fs/bcachefs/fsck.c @@ -806,7 +806,7 @@ static int add_inode(struct bch_fs *c, struct inode_walker *w, if (!n->whiteout) { return bch2_inode_unpack(inode, &n->inode); } else { - n->...
c27e5782d957c7242e9cb6405a395b89e8e1d573
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix snapshot_key_missing_inode_snapshot repair
Problem Details: When the inode was a whiteout, we were inserting a new whiteout at the wrong (old) snapshot. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/fsck.c b/fs/bcachefs/fsck.c index 68ed69a255e1..b80a56e19b40 100644 --- a/fs/bcachefs/fsck.c +++ b/fs/bcachefs/fsck.c @@ -903,17 +903,15 @@ lookup_inode_for_snapshot(struct btree_trans *trans, struct inode_walker *w, str w->last_pos.inode, k.k->p.snapshot, i->inode.bi_snapshot, ...
c1ccd43b357e157d78c899e61764fc83b4d1dbaa
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix "now allowing incompatible features" message
Problem Details: Check against version_incompat_allowed, not version_incompat. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c index 6aef8b101820..820249e9c5ea 100644 --- a/fs/bcachefs/recovery.c +++ b/fs/bcachefs/recovery.c @@ -692,7 +692,7 @@ static bool check_version_upgrade(struct bch_fs *c) ret = true; } - if (new_version > c->sb.version_incompat && + if (new_vers...
425da82c63e3ac06b2f8780879e83463e88cbf9f
Analyze and fix the following issue in the Linux kernel code: bcachefs: btree_iter: fix updates, journal overlay
Problem Details: We need to start searching from search_key - _not_ path->pos, which will point to the key we found in the btree Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/btree_iter.c b/fs/bcachefs/btree_iter.c index e2747c57ba2a..061603999ae5 100644 --- a/fs/bcachefs/btree_iter.c +++ b/fs/bcachefs/btree_iter.c @@ -2076,14 +2076,14 @@ inline bool bch2_btree_iter_rewind(struct btree_trans *trans, struct btree_iter static noinline void bch2_btree_trans...
0e62fca2a6dbfcedaab4919d7ad2044f20fdf889
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix bch2_journal_keys_peek_prev_min()
Problem Details: this code is rarely invoked, so - we had a few bugs left from basing it off of bch2_journal_keys_peek_max()... Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/btree_journal_iter.c b/fs/bcachefs/btree_journal_iter.c index cf7398751644..de996c848e43 100644 --- a/fs/bcachefs/btree_journal_iter.c +++ b/fs/bcachefs/btree_journal_iter.c @@ -141,8 +141,8 @@ search: if (!*idx) *idx = __bch2_journal_key_search(keys, btree_id, level, pos); - whi...
9b54efe66c9b44e7446e8a81a058c014cd43661d
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix alloc_req use after free
Problem Details: Now the alloc_req is allocated from the bump allocator, if there is reallocation, the memory of alloc_req would be frees, fix by delaying the reallocation to transaction restart, it has to restart anyway. Reported-by: syzbot+2887a13a5c387e616a68@syzkaller.appspotmail.com Signed-off-by: Alan Huang <mmp...
```diff diff --git a/fs/bcachefs/btree_iter.c b/fs/bcachefs/btree_iter.c index 55de2e474705..e2747c57ba2a 100644 --- a/fs/bcachefs/btree_iter.c +++ b/fs/bcachefs/btree_iter.c @@ -3216,25 +3216,32 @@ void *__bch2_trans_kmalloc(struct btree_trans *trans, size_t size, unsigned long mutex_unlock(&s->lock); } - if (t...
9b9a3270092bf8030dbe21ce90b2d0c8d98d33c7
Analyze and fix the following issue in the Linux kernel code: bcachefs: Don't allocate new memory when mempool is exhausted
Problem Details: Allocating new memory when mempool is exhausted is too complicated, just return ENOMEM is fine. memcpy is not needed, since there might be pointers point to the old memory, that's the bug. Signed-off-by: Alan Huang <mmpgouride@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/btree_iter.c b/fs/bcachefs/btree_iter.c index b586ecf2fdfa..55de2e474705 100644 --- a/fs/bcachefs/btree_iter.c +++ b/fs/bcachefs/btree_iter.c @@ -3217,28 +3217,8 @@ void *__bch2_trans_kmalloc(struct btree_trans *trans, size_t size, unsigned long } if (trans->used_mempool) { - if ...
89465d923bda180299e69ee2800aab84ad0ba689
Analyze and fix the following issue in the Linux kernel code: io_uring: fix task leak issue in io_wq_create()
Problem Details: Add missing put_task_struct() in the error path Cc: stable@vger.kernel.org Fixes: 0f8baa3c9802 ("io-wq: fully initialize wqe before calling cpuhp_state_add_instance_nocalls()") Signed-off-by: Penglei Jiang <superman.xpt@gmail.com> Link: https://lore.kernel.org/r/20250615163906.2367-1-superman.xpt@gmai...
```diff diff --git a/io_uring/io-wq.c b/io_uring/io-wq.c index cd1fcb115739..be91edf34f01 100644 --- a/io_uring/io-wq.c +++ b/io_uring/io-wq.c @@ -1259,8 +1259,10 @@ struct io_wq *io_wq_create(unsigned bounded, struct io_wq_data *data) atomic_set(&wq->worker_refs, 1); init_completion(&wq->worker_done); ret = cpuh...
f21b9bea6bc29de88b885cecd5e4f0ada60d4700
Analyze and fix the following issue in the Linux kernel code: phy: phy-snps-eusb2: fix optional phy lookup parameter
Problem Details: The devm_of_phy_optional_get() takes an optional name argument as its third parameter and not an index like the recently replaced devm_of_phy_get_by_index(). Replace 0 with an explicit NULL for consistency and readability. Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Neil Armstr...
```diff diff --git a/drivers/phy/phy-snps-eusb2.c b/drivers/phy/phy-snps-eusb2.c index 232c5e8a554f..328e67ebfe03 100644 --- a/drivers/phy/phy-snps-eusb2.c +++ b/drivers/phy/phy-snps-eusb2.c @@ -581,7 +581,7 @@ static int snps_eusb2_hsphy_probe(struct platform_device *pdev) return dev_err_probe(dev, ret, "...
3232a6b0d834569f71aa898401288af6b4ab781d
Analyze and fix the following issue in the Linux kernel code: phy: phy-snps-eusb2: fix repeater imbalance on phy_init() failure
Problem Details: Make sure to disable the repeater PHY also on phy_init() failure. Fixes: 3584f6392f09 ("phy: qcom: phy-qcom-snps-eusb2: Add support for eUSB2 repeater") Cc: Abel Vesa <abel.vesa@linaro.org> Cc: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by...
```diff diff --git a/drivers/phy/phy-snps-eusb2.c b/drivers/phy/phy-snps-eusb2.c index 19af3f99692c..a799c3d2bcfb 100644 --- a/drivers/phy/phy-snps-eusb2.c +++ b/drivers/phy/phy-snps-eusb2.c @@ -468,7 +468,7 @@ static int snps_eusb2_hsphy_init(struct phy *p) ret = clk_bulk_prepare_enable(phy->data->num_clks, phy->clk...
641fa5b515a6900b1452cc92d30d1ab391e04414
Analyze and fix the following issue in the Linux kernel code: phy: phy-snps-eusb2: fix clock imbalance on phy_exit()
Problem Details: Make sure to disable all clocks enabled at phy_init() also on phy_exit(). Fixes: c4098f3e6134 ("phy: phy-snps-eusb2: add support for exynos2200") Cc: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com> Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.or...
```diff diff --git a/drivers/phy/phy-snps-eusb2.c b/drivers/phy/phy-snps-eusb2.c index b73a1d7e57b3..19af3f99692c 100644 --- a/drivers/phy/phy-snps-eusb2.c +++ b/drivers/phy/phy-snps-eusb2.c @@ -504,7 +504,7 @@ static int snps_eusb2_hsphy_exit(struct phy *p) { struct snps_eusb2_hsphy *phy = phy_get_drvdata(p); - c...
2f6b47b295518c3ba16fabb1dddbe6a319899acb
Analyze and fix the following issue in the Linux kernel code: gendwarfksyms: Fix structure type overrides
Problem Details: As we always iterate through the entire die_map when expanding type strings, recursively processing referenced types in type_expand_child() is not actually necessary. Furthermore, the type_string kABI rule added in commit c9083467f7b9 ("gendwarfksyms: Add a kABI rule to override type strings") can fail...
```diff diff --git a/scripts/gendwarfksyms/gendwarfksyms.h b/scripts/gendwarfksyms/gendwarfksyms.h index 7dd03ffe0c5c..d9c06d2cb1df 100644 --- a/scripts/gendwarfksyms/gendwarfksyms.h +++ b/scripts/gendwarfksyms/gendwarfksyms.h @@ -216,24 +216,14 @@ int cache_get(struct cache *cache, unsigned long key); void cache_init...
cf0233491b3a15933234a26efd9ecbc1c0764674
Analyze and fix the following issue in the Linux kernel code: phy: use per-PHY lockdep keys
Problem Details: If the PHY driver uses another PHY internally (e.g. in case of eUSB2, repeaters are represented as PHYs), then it would trigger the following lockdep splat because all PHYs use a single static lockdep key and thus lockdep can not identify whether there is a dependency or not and reports a false positiv...
```diff diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c index 8e2daea81666..04a5a34e7a95 100644 --- a/drivers/phy/phy-core.c +++ b/drivers/phy/phy-core.c @@ -994,7 +994,8 @@ struct phy *phy_create(struct device *dev, struct device_node *node, } device_initialize(&phy->dev); - mutex_init(&phy->mutex);...
a6a7946bd691940cfe7289ae6dfb1f077516df72
Analyze and fix the following issue in the Linux kernel code: kbuild: move warnings about linux/export.h from W=1 to W=2
Problem Details: This hides excessive warnings, as nobody builds with W=2. Fixes: a934a57a42f6 ("scripts/misc-check: check missing #include <linux/export.h> when W=1") Fixes: 7d95680d64ac ("scripts/misc-check: check unnecessary #include <linux/export.h> when W=1") Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> ...
```diff diff --git a/Makefile b/Makefile index 35e6e5240c61..69c534982415 100644 --- a/Makefile +++ b/Makefile @@ -1832,12 +1832,9 @@ rustfmtcheck: rustfmt # Misc # --------------------------------------------------------------------------- -# Run misc checks when ${KBUILD_EXTRA_WARN} contains 1 PHONY += misc-chec...
cefc1caee9dd06c69e2d807edc5949b329f52b22
Analyze and fix the following issue in the Linux kernel code: phy: tegra: xusb: Fix unbalanced regulator disable in UTMI PHY mode
Problem Details: When transitioning from USB_ROLE_DEVICE to USB_ROLE_NONE, the code assumed that the regulator should be disabled. However, if the regulator is marked as always-on, regulator_is_enabled() continues to return true, leading to an incorrect attempt to disable a regulator which is not enabled. This can res...
```diff diff --git a/drivers/phy/tegra/xusb-tegra186.c b/drivers/phy/tegra/xusb-tegra186.c index ba668c77457f..e818f6c3980e 100644 --- a/drivers/phy/tegra/xusb-tegra186.c +++ b/drivers/phy/tegra/xusb-tegra186.c @@ -783,13 +783,15 @@ static int tegra186_xusb_padctl_vbus_override(struct tegra_xusb_padctl *padctl, } s...
7be54870e9bf5ed0b4fe2a23b41a630527882de5
Analyze and fix the following issue in the Linux kernel code: phy: tegra: xusb: Disable periodic tracking on Tegra234
Problem Details: Periodic calibration updates (~10µs) may overlap with transfers when PCIe NVMe SSD, LPDDR, and USB2 devices operate simultaneously, causing crosstalk on Tegra234 devices. Hence disable periodic calibration updates and make this a one-time calibration. Fixes: d8163a32ca95 ("phy: tegra: xusb: Add Tegra2...
```diff diff --git a/drivers/phy/tegra/xusb-tegra186.c b/drivers/phy/tegra/xusb-tegra186.c index 683692f0ec3c..ba668c77457f 100644 --- a/drivers/phy/tegra/xusb-tegra186.c +++ b/drivers/phy/tegra/xusb-tegra186.c @@ -1711,7 +1711,7 @@ const struct tegra_xusb_padctl_soc tegra234_xusb_padctl_soc = { .num_supplies = ARRAY...
24c63c590adca310e0df95c77cf7aa5552bc3fc5
Analyze and fix the following issue in the Linux kernel code: phy: tegra: xusb: Decouple CYA_TRK_CODE_UPDATE_ON_IDLE from trk_hw_mode
Problem Details: The logic that drives the pad calibration values resides in the controller reset domain and so the calibration values are only being captured when the controller is out of reset. However, by clearing the CYA_TRK_CODE_UPDATE_ON_IDLE bit, the calibration values can be set while the controller is in reset...
```diff diff --git a/drivers/phy/tegra/xusb-tegra186.c b/drivers/phy/tegra/xusb-tegra186.c index 23a23f2d64e5..683692f0ec3c 100644 --- a/drivers/phy/tegra/xusb-tegra186.c +++ b/drivers/phy/tegra/xusb-tegra186.c @@ -648,14 +648,15 @@ static void tegra186_utmi_bias_pad_power_on(struct tegra_xusb_padctl *padctl) udelay...
1d27f11bf02b38c431e49a17dee5c10a2b4c2e28
Analyze and fix the following issue in the Linux kernel code: io_uring/rsrc: validate buffer count with offset for cloning
Problem Details: syzbot reports that it can trigger a WARN_ON() for kmalloc() attempt that's too big: WARNING: CPU: 0 PID: 6488 at mm/slub.c:5024 __kvmalloc_node_noprof+0x520/0x640 mm/slub.c:5024 Modules linked in: CPU: 0 UID: 0 PID: 6488 Comm: syz-executor312 Not tainted 6.15.0-rc7-syzkaller-gd7fa1af5b33e #0 PREEMPT ...
```diff diff --git a/io_uring/rsrc.c b/io_uring/rsrc.c index c592ceace97d..94a9db030e0e 100644 --- a/io_uring/rsrc.c +++ b/io_uring/rsrc.c @@ -1177,6 +1177,8 @@ static int io_clone_buffers(struct io_ring_ctx *ctx, struct io_ring_ctx *src_ctx return -EINVAL; if (check_add_overflow(arg->nr, arg->dst_off, &nbufs)) ...
713d48878e8a5e4bcca6355324f943eb72cd2c84
Analyze and fix the following issue in the Linux kernel code: clk: sunxi-ng: a523: Mark MBUS clock as critical
Problem Details: The MBUS serves as the main data bus for various DMA masters in the system. If its clock is not enabled, the DMA operations will stall, leading to the peripherals stalling or timing out. This has been observed as USB or MMC hosts timing out waiting for transactions when the clock is automatically disab...
```diff diff --git a/drivers/clk/sunxi-ng/ccu-sun55i-a523.c b/drivers/clk/sunxi-ng/ccu-sun55i-a523.c index 9efb9fd24b42..1a9a1cb869e2 100644 --- a/drivers/clk/sunxi-ng/ccu-sun55i-a523.c +++ b/drivers/clk/sunxi-ng/ccu-sun55i-a523.c @@ -385,7 +385,8 @@ static SUNXI_CCU_MP_DATA_WITH_MUX_GATE_FEAT(mbus_clk, "mbus", mbus_pa...
d3deabe4c619875714b9a844b1a3d9752dbae1dd
Analyze and fix the following issue in the Linux kernel code: drm/msm: Fix inverted WARN_ON() logic
Problem Details: We want to WARN_ON() if info is NULL. Suggested-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Fixes: 0838fc3e6718 ("drm/msm/adreno: Check for recognized GPU before bind") Tested-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com> Reported-by: Ale...
```diff diff --git a/drivers/gpu/drm/msm/adreno/adreno_device.c b/drivers/gpu/drm/msm/adreno/adreno_device.c index 5e7307567239..16e7ac444efd 100644 --- a/drivers/gpu/drm/msm/adreno/adreno_device.c +++ b/drivers/gpu/drm/msm/adreno/adreno_device.c @@ -221,7 +221,7 @@ static int adreno_bind(struct device *dev, struct dev...
7b3685c9b38c3097f465efec8b24dbed63258cf6
Analyze and fix the following issue in the Linux kernel code: drm/i915/dsi: Fix off by one in BXT_MIPI_TRANS_VTOTAL
Problem Details: BXT_MIPI_TRANS_VTOTAL must be programmed with vtotal-1 instead of vtotal. Make it so. Cc: stable@vger.kernel.org Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250314150136.22564-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikul...
```diff diff --git a/drivers/gpu/drm/i915/display/vlv_dsi.c b/drivers/gpu/drm/i915/display/vlv_dsi.c index 2ec78dc8765e..160c40596685 100644 --- a/drivers/gpu/drm/i915/display/vlv_dsi.c +++ b/drivers/gpu/drm/i915/display/vlv_dsi.c @@ -1055,7 +1055,7 @@ static void bxt_dsi_get_pipe_config(struct intel_encoder *encoder, ...
b776999bf25ddca9880bc3c9c30b8f84a748504b
Analyze and fix the following issue in the Linux kernel code: net: pfcp: fix typo in message_priority field name
Problem Details: The field is spelled "message_priprity" in the big-endian bit-field definition. Nothing in-tree currently references the member, so the typo does not break kernel builds, but it is clearly incorrect. Signed-off-by: RubenKelevra <rubenkelevra@gmail.com> Link: https://patch.msgid.link/20250612145012.18...
```diff diff --git a/include/net/pfcp.h b/include/net/pfcp.h index af14f970b80e..639553797d3e 100644 --- a/include/net/pfcp.h +++ b/include/net/pfcp.h @@ -45,7 +45,7 @@ struct pfcphdr_session { reserved:4; #elif defined(__BIG_ENDIAN_BITFIELD) u8 reserved:4, - message_priprity:4; + message_priority:4; #else #e...
cc8aeb0f535f3214c2aad13a384e93a55db15569
Analyze and fix the following issue in the Linux kernel code: net: phy: dp83tg720: switch to adaptive polling and remove random delays
Problem Details: Now that the PHY reset logic includes a role-specific asymmetric delay to avoid synchronized reset deadlocks, the previously used randomized polling intervals are no longer necessary. This patch removes the get_random_u32_below()-based logic and introduces an adaptive polling strategy: - Fast polling ...
```diff diff --git a/drivers/net/phy/dp83tg720.c b/drivers/net/phy/dp83tg720.c index 92597d12ecb9..391c1d868808 100644 --- a/drivers/net/phy/dp83tg720.c +++ b/drivers/net/phy/dp83tg720.c @@ -52,15 +52,37 @@ * The functions that implement this logic are: * - dp83tg720_soft_reset() * - dp83tg720_get_next_update_tim...
491e991f781611c7977a69a1e243fc56cef61e3c
Analyze and fix the following issue in the Linux kernel code: net: phy: dp83tg720: remove redundant 600ms post-reset delay
Problem Details: Now that dp83tg720_soft_reset() introduces role-specific delays to avoid reset synchronization deadlocks, the fixed 600ms post-reset delay in dp83tg720_read_status() is no longer needed. The new logic provides both the required MDC timing and link stabilization, making the old empirical delay redundan...
```diff diff --git a/drivers/net/phy/dp83tg720.c b/drivers/net/phy/dp83tg720.c index a53ea6d6130b..92597d12ecb9 100644 --- a/drivers/net/phy/dp83tg720.c +++ b/drivers/net/phy/dp83tg720.c @@ -450,21 +450,11 @@ static int dp83tg720_read_status(struct phy_device *phydev) /* According to the "DP83TC81x, DP83TG72x Softwa...
5f6ec55777d5a1253615851fa50fd405a0db8eb9
Analyze and fix the following issue in the Linux kernel code: net: phy: dp83tg720: implement soft reset with asymmetric delay
Problem Details: Add a .soft_reset callback for the DP83TG720 PHY that issues a hardware reset followed by an asymmetric post-reset delay. The delay differs based on the PHY's master/slave role to avoid synchronized reset deadlocks, which are known to occur when both link partners use identical reset intervals. The de...
```diff diff --git a/drivers/net/phy/dp83tg720.c b/drivers/net/phy/dp83tg720.c index 7e76323409c4..a53ea6d6130b 100644 --- a/drivers/net/phy/dp83tg720.c +++ b/drivers/net/phy/dp83tg720.c @@ -12,6 +12,48 @@ #include "open_alliance_helpers.h" +/* + * DP83TG720 PHY Limitations and Workarounds + * + * The DP83TG720 10...