id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
f2573685bd0ccb79cb6b6234461b7f750311b8e7
Analyze and fix the following issue in the Linux kernel code: ipc: convert do_mq_open() to FD_ADD()
Problem Details: Christian Brauner <brauner@kernel.org> says: The fix sent in [1] was squashed into this commit. Fixes: https://lore.kernel.org/c41de645-8234-465f-a3be-f0385e3a163c@sirena.org.uk [1] Reported-by: Mark Brown <broonie@kernel.org> [1] Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> [1] Link:...
```diff diff --git a/ipc/mqueue.c b/ipc/mqueue.c index 093551fe66a7..d3a588d0dcf6 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c @@ -892,14 +892,35 @@ static int prepare_open(struct dentry *dentry, int oflag, int ro, return inode_permission(&nop_mnt_idmap, d_inode(dentry), acc); } +static struct file *mqueue_file_op...
7129098f4f7b848ead33ce10214b90716e3fd400
Analyze and fix the following issue in the Linux kernel code: fanotify: convert fanotify_init() to FD_PREPARE()
Problem Details: Christian Brauner <brauner@kernel.org> says: The fix sent in [1] was squashed into this commit. Link: https://lore.kernel.org/20251127201618.2115275-1-kuniyu@google.com [1] Reported-by: syzbot+321168dfa622eda99689@syzkaller.appspotmail.com Closes: https://lore.kernel.org/lkml/6928b121.a70a0220.d98e3....
```diff diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c index 1dadda82cae5..d0b9b984002f 100644 --- a/fs/notify/fanotify/fanotify_user.c +++ b/fs/notify/fanotify/fanotify_user.c @@ -1597,16 +1597,20 @@ static struct hlist_head *fanotify_alloc_merge_hash(void) return hash; } +DE...
05885f41658ce953d22066913414d56aaad36157
Analyze and fix the following issue in the Linux kernel code: namespace: convert fsmount() to FD_PREPARE()
Problem Details: Christian Brauner <brauner@kernel.org> says: A variant of the fix sent in [1] was squashed into this commit. Link: https://lore.kernel.org/20251128035149.392402-1-kartikey406@gmail.com [1] Reported-by: Deepanshu Kartikey <kartikey406@gmail.com> Reported-by: syzbot+94048264da5715c251f9@syzkaller.appsp...
```diff diff --git a/fs/namespace.c b/fs/namespace.c index 0c4024558c13..8302dd64be20 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -4271,10 +4271,10 @@ static unsigned int attr_flags_to_mnt_flags(u64 attr_flags) SYSCALL_DEFINE3(fsmount, int, fs_fd, unsigned int, flags, unsigned int, attr_flags) { + struct p...
d27c71257825dced46104eefe42e4d9964bd032e
Analyze and fix the following issue in the Linux kernel code: afs: Fix delayed allocation of a cell's anonymous key
Problem Details: The allocation of a cell's anonymous key is done in a background thread along with other cell setup such as doing a DNS upcall. In the reported bug, this is triggered by afs_parse_source() parsing the device name given to mount() and calling afs_lookup_cell() with the name of the cell. The normal key...
```diff diff --git a/fs/afs/cell.c b/fs/afs/cell.c index d9b6fa1088b7..71c10a05cebe 100644 --- a/fs/afs/cell.c +++ b/fs/afs/cell.c @@ -140,7 +140,9 @@ static struct afs_cell *afs_alloc_cell(struct afs_net *net, return ERR_PTR(-ENOMEM); } - cell->name = kmalloc(1 + namelen + 1, GFP_KERNEL); + /* Allocate the cell...
99820b4b7e50d9651f01d2d55b6b9ba92dcc5b99
Analyze and fix the following issue in the Linux kernel code: drm/panthor: Make sure we resume the tick when new jobs are submitted
Problem Details: If the group is already assigned a slot but was idle before this job submission, we need to make sure the priority rotation happens in the future. Extract the existing logic living in group_schedule_locked() and call this new sched_resume_tick() helper from the "group is assigned a slot" path. v2: - A...
```diff diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor/panthor_sched.c index 8846608dd127..7759a8a8565e 100644 --- a/drivers/gpu/drm/panthor/panthor_sched.c +++ b/drivers/gpu/drm/panthor/panthor_sched.c @@ -2624,14 +2624,33 @@ static void sync_upd_work(struct work_struct *work) sched_...
61d9a43d70dc3e1709ecd14a34f6d5f01e21dfc9
Analyze and fix the following issue in the Linux kernel code: drm/panthor: Fix the logic that decides when to stop ticking
Problem Details: When we have multiple active groups with the same priority, we need to keep ticking for the priority rotation to take place. If we don't do that, we might starve slots with lower priorities. It's annoying to deal with that in tick_ctx_update_resched_target(), so let's add a ::stop_tick field to the ti...
```diff diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor/panthor_sched.c index 1efeabc4b0ac..8846608dd127 100644 --- a/drivers/gpu/drm/panthor/panthor_sched.c +++ b/drivers/gpu/drm/panthor/panthor_sched.c @@ -1985,10 +1985,10 @@ struct panthor_sched_tick_ctx { struct list_head groups[PAN...
4356d21994f4ff5c87305b874939b359f16f6677
Analyze and fix the following issue in the Linux kernel code: drm/panthor: Fix immediate ticking on a disabled tick
Problem Details: We have a few paths where we schedule the tick work immediately without changing the resched_target. If the tick was stopped, this would lead to a remaining_jiffies that's always > 0, and it wouldn't force a full tick in that case. Add extra checks to cover that case properly. v2: - Fix typo - Simplif...
```diff diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor/panthor_sched.c index 531b52ee3a92..1efeabc4b0ac 100644 --- a/drivers/gpu/drm/panthor/panthor_sched.c +++ b/drivers/gpu/drm/panthor/panthor_sched.c @@ -2435,6 +2435,7 @@ static void tick_work(struct work_struct *work) ti...
55429c51d5db3db24c2ad561944c6a0ca922d476
Analyze and fix the following issue in the Linux kernel code: drm/panthor: Fix the group priority rotation logic
Problem Details: When rotating group priorities, we want the group with the highest priority to go back to the end of the queue, and all other active groups to get their priority bumped, otherwise some groups will never get a chance to run with the highest priority. This implies moving the rotation itself to tick_work(...
```diff diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor/panthor_sched.c index 5d280d9c8225..531b52ee3a92 100644 --- a/drivers/gpu/drm/panthor/panthor_sched.c +++ b/drivers/gpu/drm/panthor/panthor_sched.c @@ -2050,31 +2050,22 @@ tick_ctx_pick_groups_from_list(const struct panthor_scheduler...
a3c2d0b40b108bd45d44f6c1dfa33c39d577adcd
Analyze and fix the following issue in the Linux kernel code: drm/panthor: Fix the full_tick check
Problem Details: We have a full tick when the remaining time to the next tick is zero, not the other way around. Declare a full_tick variable so we don't get that test wrong in other places. v2: - Add R-b v3: - Collect R-b Fixes: de8548813824 ("drm/panthor: Add the scheduler logical block") Reviewed-by: Steven Price...
```diff diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor/panthor_sched.c index 5ec553818c28..5d280d9c8225 100644 --- a/drivers/gpu/drm/panthor/panthor_sched.c +++ b/drivers/gpu/drm/panthor/panthor_sched.c @@ -2448,6 +2448,7 @@ static void tick_work(struct work_struct *work) u64 remaining...
4be9e04ebf75a5c4478c1c6295e2122e5dc98f5f
Analyze and fix the following issue in the Linux kernel code: vfs: add needed headers for new struct delegation definition
Problem Details: The definition of struct delegation uses stdint.h integer types. Add the necessary headers to ensure that always works. Fixes: 1602bad16d7d ("vfs: expose delegation support to userland") Signed-off-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org>
```diff diff --git a/include/uapi/linux/fcntl.h b/include/uapi/linux/fcntl.h index 008fac15e573..5e277fd955aa 100644 --- a/include/uapi/linux/fcntl.h +++ b/include/uapi/linux/fcntl.h @@ -4,6 +4,11 @@ #include <asm/fcntl.h> #include <linux/openat2.h> +#ifdef __KERNEL__ +#include <linux/types.h> +#else +#include <std...
e9c70084a64e51b65bb68f810692a03dc8bedffa
Analyze and fix the following issue in the Linux kernel code: ovl: fail ovl_lock_rename_workdir() if either target is unhashed
Problem Details: As well as checking that the parent hasn't changed after getting the lock we need to check that the dentry hasn't been unhashed. Otherwise we might try to rename something that has been removed. Reported-by: syzbot+bfc9a0ccf0de47d04e8c@syzkaller.appspotmail.com Fixes: d2c995581c7c ("ovl: Call ovl_crea...
```diff diff --git a/fs/overlayfs/util.c b/fs/overlayfs/util.c index f76672f2e686..82373dd1ce6e 100644 --- a/fs/overlayfs/util.c +++ b/fs/overlayfs/util.c @@ -1234,9 +1234,9 @@ int ovl_lock_rename_workdir(struct dentry *workdir, struct dentry *work, goto err; if (trap) goto err_unlock; - if (work && work->d_par...
01c9c30aae317adc3ae7246f545b2c83b16ff314
Analyze and fix the following issue in the Linux kernel code: filelock: __fcntl_getlease: fix kernel-doc warnings
Problem Details: Use the correct function name and add description for the @flavor parameter to avoid these kernel-doc warnings: Warning: fs/locks.c:1706 function parameter 'flavor' not described in '__fcntl_getlease' WARNING: fs/locks.c:1706 expecting prototype for fcntl_getlease(). Prototype was for __fcntl_getlea...
```diff diff --git a/fs/locks.c b/fs/locks.c index 7f4ccc7974bc..9f565802a88c 100644 --- a/fs/locks.c +++ b/fs/locks.c @@ -1681,8 +1681,9 @@ void lease_get_mtime(struct inode *inode, struct timespec64 *time) EXPORT_SYMBOL(lease_get_mtime); /** - * fcntl_getlease - Enquire what lease is currently active + * __fcntl_...
19e8bc9456055e594d0f1c9677ea8a3a9983ec3e
Analyze and fix the following issue in the Linux kernel code: drm/panthor: Make panthor_vm_[un]map_pages() more robust
Problem Details: There's no reason for panthor_vm_[un]map_pages() to fail unless the drm_gpuvm state and the page table are out of sync, so let's reflect that by making panthor_vm_unmap_pages() a void function and adding WARN_ON()s in various places. We also try to recover from those unexpected mismatch by checking for...
```diff diff --git a/drivers/gpu/drm/panthor/panthor_mmu.c b/drivers/gpu/drm/panthor/panthor_mmu.c index f39e6e799c74..8ba5259e3d28 100644 --- a/drivers/gpu/drm/panthor/panthor_mmu.c +++ b/drivers/gpu/drm/panthor/panthor_mmu.c @@ -842,13 +842,33 @@ static size_t get_pgsize(u64 addr, size_t size, size_t *count) return...
3c0a60195b37af83bbbaf223cd3a78945bace49e
Analyze and fix the following issue in the Linux kernel code: drm/panthor: Recover from panthor_gpu_flush_caches() failures
Problem Details: We have seen a few cases where the whole memory subsystem is blocked and flush operations never complete. When that happens, we want to: - schedule a reset, so we can recover from this situation - in the reset path, we need to reset the pending_reqs so we can send new commands after the reset - if m...
```diff diff --git a/drivers/gpu/drm/panthor/panthor_gpu.c b/drivers/gpu/drm/panthor/panthor_gpu.c index 06b231b2460a..9cb5dee93212 100644 --- a/drivers/gpu/drm/panthor/panthor_gpu.c +++ b/drivers/gpu/drm/panthor/panthor_gpu.c @@ -289,38 +289,42 @@ int panthor_gpu_l2_power_on(struct panthor_device *ptdev) int panthor_...
eec7e23d848d2194dd8791fcd0f4a54d4378eecd
Analyze and fix the following issue in the Linux kernel code: drm/panthor: Prevent potential UAF in group creation
Problem Details: This commit prevents the possibility of a use after free issue in the GROUP_CREATE ioctl function, which arose as pointer to the group is accessed in that ioctl function after storing it in the Xarray. A malicious userspace can second guess the handle of a group and try to call GROUP_DESTROY ioctl from...
```diff diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor/panthor_sched.c index e74ca071159d..5d2e9144d450 100644 --- a/drivers/gpu/drm/panthor/panthor_sched.c +++ b/drivers/gpu/drm/panthor/panthor_sched.c @@ -776,6 +776,12 @@ struct panthor_job_profiling_data { */ #define MAX_GROUPS_PER...
eeec741ee0df36e79a847bb5423f9eef4ed96071
Analyze and fix the following issue in the Linux kernel code: nfsd: fix end_creating() conversion
Problem Details: Avoid a double-unlock as nfs_create_locked() will have unlocked the parent and do the dput() manually. Christian Brauner <brauner@kernel.org> says: I've taken Neil's proposed fix from [1] and added a commit message. Fixes: https://lore.kernel.org/202511252132.2c621407-lkp@intel.com [1] Fixes: bd6ede...
```diff diff --git a/fs/nfsd/nfsproc.c b/fs/nfsd/nfsproc.c index 28f03a6a3cc3..481e789a7697 100644 --- a/fs/nfsd/nfsproc.c +++ b/fs/nfsd/nfsproc.c @@ -407,6 +407,9 @@ nfsd_proc_create(struct svc_rqst *rqstp) /* File doesn't exist. Create it and set attrs */ resp->status = nfsd_create_locked(rqstp, dirfhp, &attrs,...
54a2df5afa2382d6fd1168a3caf151f50c68dfea
Analyze and fix the following issue in the Linux kernel code: gpio: shared: fix a deadlock
Problem Details: It's possible that the auxiliary proxy device we add when setting up the GPIO controller exposing shared pins, will get matched and probed immediately. The gpio-proxy-driver will then retrieve the shared descriptor structure. That will cause a recursive mutex locking and a deadlock because we're alread...
```diff diff --git a/drivers/gpio/gpiolib-shared.c b/drivers/gpio/gpiolib-shared.c index cd4dd6fc76ab..8bdd107b1ad1 100644 --- a/drivers/gpio/gpiolib-shared.c +++ b/drivers/gpio/gpiolib-shared.c @@ -49,6 +49,7 @@ struct gpio_shared_entry { unsigned int offset; /* Index in the property value array. */ size_t index...
114e594e6cb791ce7c839ccfbe153ecfa3e7abce
Analyze and fix the following issue in the Linux kernel code: gpio: shared: ignore GPIO hogs when traversing the device tree
Problem Details: GPIO hogs have a "gpios" property but it's not a phandle to a remote node - it references the parent GPIO controller. We must not try to parse it as a phandle. Fixes: a060b8c511ab ("gpiolib: implement low-level, shared GPIO support") Reported-by: Cosmin Tanislav <demonsingur@gmail.com> Closes: https:/...
```diff diff --git a/drivers/gpio/gpiolib-shared.c b/drivers/gpio/gpiolib-shared.c index 3a6d4cd54081..cd4dd6fc76ab 100644 --- a/drivers/gpio/gpiolib-shared.c +++ b/drivers/gpio/gpiolib-shared.c @@ -83,6 +83,13 @@ static bool gpio_shared_of_node_ignore(struct device_node *node) if (of_node_name_eq(node, "__symbols__"...
cfab6dc0700c3b9120dab726fc184c3b4500cc5b
Analyze and fix the following issue in the Linux kernel code: gpio: shared: ignore special __symbols__ node when traversing device tree
Problem Details: The __symbols__ node is a special, internal node and its properties must not be considered when scanning the device-tree for shared GPIOs. Fixes: a060b8c511ab ("gpiolib: implement low-level, shared GPIO support") Reported-by: Jon Hunter <jonathanh@nvidia.com> Closes: https://lore.kernel.org/all/0829a2...
```diff diff --git a/drivers/gpio/gpiolib-shared.c b/drivers/gpio/gpiolib-shared.c index cc8646f563d2..3a6d4cd54081 100644 --- a/drivers/gpio/gpiolib-shared.c +++ b/drivers/gpio/gpiolib-shared.c @@ -73,6 +73,19 @@ gpio_shared_find_entry(struct fwnode_handle *controller_node, return NULL; } +/* Handle all special n...
a3623e1ae1ed6be4d49b2ccb9996a9d2b65c1828
Analyze and fix the following issue in the Linux kernel code: mtd: rawnand: renesas: Handle devm_pm_runtime_enable() errors
Problem Details: devm_pm_runtime_enable() can fail due to memory allocation failures. The current code ignores its return value and proceeds with pm_runtime_resume_and_get(), which may operate on incorrectly initialized runtime PM state. Check the return value of devm_pm_runtime_enable() and return the error code if i...
```diff diff --git a/drivers/mtd/nand/raw/renesas-nand-controller.c b/drivers/mtd/nand/raw/renesas-nand-controller.c index ac8c1b80d7be..201dd62b9990 100644 --- a/drivers/mtd/nand/raw/renesas-nand-controller.c +++ b/drivers/mtd/nand/raw/renesas-nand-controller.c @@ -1336,7 +1336,10 @@ static int rnandc_probe(struct pla...
1eb0ae6fbd544619c50b4a4d96ccb4676cac03cb
Analyze and fix the following issue in the Linux kernel code: iommupt/vtd: Support mgaw's less than a 4 level walk for first stage
Problem Details: If the IOVA is limited to less than 48 the page table will be constructed with a 3 level configuration which is unsupported by hardware. Like the second stage the caller needs to pass in both the top_level an the vasz to specify a table that has more levels than required to hold the IOVA range. Fixes...
```diff diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c index 48bca4dc8eb6..273951b4501c 100644 --- a/drivers/iommu/amd/iommu.c +++ b/drivers/iommu/amd/iommu.c @@ -2708,10 +2708,13 @@ static struct iommu_domain *amd_iommu_domain_alloc_paging_v2(struct device *dev, * in both modes the top bit is re...
d856f9d27885c499d96ab7fe506083346ccf145d
Analyze and fix the following issue in the Linux kernel code: iommupt/vtd: Allow VT-d to have a larger table top than the vasz requires
Problem Details: VT-d second stage HW specifies both the maximum IOVA and the supported table walk starting points. Weirdly there is HW that only supports a 4 level walk but has a maximum IOVA that only needs 3. The current code miscalculates this and creates a wrongly sized page table which ultimately fails the compa...
```diff diff --git a/drivers/iommu/generic_pt/fmt/vtdss.h b/drivers/iommu/generic_pt/fmt/vtdss.h index 50ffed9d0e50..f5f8981edde7 100644 --- a/drivers/iommu/generic_pt/fmt/vtdss.h +++ b/drivers/iommu/generic_pt/fmt/vtdss.h @@ -248,18 +248,11 @@ static inline int vtdss_pt_iommu_fmt_init(struct pt_iommu_vtdss *iommu_tabl...
416d9a220e678d6b1c5fc206226cfb7fa7efa80e
Analyze and fix the following issue in the Linux kernel code: powerpc/pseries/svm: Make mem_encrypt.h self contained
Problem Details: Add the missing forward declarations and includes so it does not have implicit dependencies. mem_encrypt.h is a public header imported by drivers. Users should not have to guess what include files are needed. Resolves a kbuild splat: In file included from drivers/iommu/generic_pt/fmt/iommu_amdv1.c...
```diff diff --git a/arch/powerpc/include/asm/mem_encrypt.h b/arch/powerpc/include/asm/mem_encrypt.h index 2f26b8fc8d29..e355ca46fad9 100644 --- a/arch/powerpc/include/asm/mem_encrypt.h +++ b/arch/powerpc/include/asm/mem_encrypt.h @@ -9,6 +9,9 @@ #define _ASM_POWERPC_MEM_ENCRYPT_H #include <asm/svm.h> +#include <li...
01569c216ddeda94d3d8ffb8a5241ba3b2d72a5a
Analyze and fix the following issue in the Linux kernel code: genpt: Make GENERIC_PT invisible
Problem Details: There is no point in asking the user about the Generic Radix Page Table API: - All IOMMU drivers that use this API already select GENERIC_PT when needed, - Most users probably do not know what to answer anyway. Fixes: 7c5b184db7145fd4 ("genpt: Generic Page Table base API") Signed-off-by: Geert...
```diff diff --git a/drivers/iommu/generic_pt/Kconfig b/drivers/iommu/generic_pt/Kconfig index c88971675662..ce4fb4786914 100644 --- a/drivers/iommu/generic_pt/Kconfig +++ b/drivers/iommu/generic_pt/Kconfig @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only menuconfig GENERIC_PT - bool "Generic Radix Page Tabl...
342ccffd9f77fc29fe1c05fd145e4d842bd2feaa
Analyze and fix the following issue in the Linux kernel code: drm/display/dp_mst: Add protection against 0 vcpi
Problem Details: When releasing a timeslot there is a slight chance we may end up with the wrong payload mask due to overflow if the delayed_destroy_work ends up coming into play after a DP 2.1 monitor gets disconnected which causes vcpi to become 0 then we try to make the payload = ~BIT(vcpi - 1) which is a negative s...
```diff diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology.c b/drivers/gpu/drm/display/drm_dp_mst_topology.c index 64e5c176d5cc..be749dcad3b5 100644 --- a/drivers/gpu/drm/display/drm_dp_mst_topology.c +++ b/drivers/gpu/drm/display/drm_dp_mst_topology.c @@ -4572,7 +4572,8 @@ int drm_dp_atomic_release_time_slots(st...
1105a7a12051c24e942b382b6e4d895d267dda1e
Analyze and fix the following issue in the Linux kernel code: ice: fix comment typo and correct module format string
Problem Details: - Fix a typo in the ice_fdir_has_frag() kernel-doc comment ("is" -> "if") - Correct the NVM erase error message format string from "0x02%x" to "0x%02x" so the module value is printed correctly. Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com> Reviewed-by: Aleksandr Loktionov <aleksandr.loktion...
```diff diff --git a/drivers/net/ethernet/intel/ice/ice_fdir.c b/drivers/net/ethernet/intel/ice/ice_fdir.c index 26b357c0ae15..b29fbdec9442 100644 --- a/drivers/net/ethernet/intel/ice/ice_fdir.c +++ b/drivers/net/ethernet/intel/ice/ice_fdir.c @@ -1121,7 +1121,7 @@ ice_fdir_get_gen_prgm_pkt(struct ice_hw *hw, struct ice...
5849b56addbfc060a012c7326d3bac279c303f43
Analyze and fix the following issue in the Linux kernel code: ixgbe: avoid redundant call to ixgbe_non_sfp_link_config()
Problem Details: ixgbe_non_sfp_link_config() is called twice in ixgbe_open() once to assign its return value to err and again in the conditional check. This patch uses the stored err value instead of calling the function a second time. This avoids redundant work and ensures consistent error reporting. Also fix a small...
```diff diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 3190ce7e44c7..4af3b3e71ff1 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -7449,7 +7449,7 @@ int ixgbe_open(struct net_device *netde...
954ba97cca1614bdc6d5dbd37fa357da9febb59d
Analyze and fix the following issue in the Linux kernel code: e1000e: Remove unneeded checks
Problem Details: The caller, ethtool_set_eeprom(), already performs the same checks so these are unnecessary in the driver. This reverts commit 90fb7db49c6d ("e1000e: fix heap overflow in e1000_set_eeprom"), however, corrections for RCT have been kept. Link: https://lore.kernel.org/all/db92fcc8-114d-4e85-9d15-7860545b...
```diff diff --git a/drivers/net/ethernet/intel/e1000e/ethtool.c b/drivers/net/ethernet/intel/e1000e/ethtool.c index cee57a2149ab..7b1ac90b3de4 100644 --- a/drivers/net/ethernet/intel/e1000e/ethtool.c +++ b/drivers/net/ethernet/intel/e1000e/ethtool.c @@ -551,9 +551,9 @@ static int e1000_set_eeprom(struct net_device *ne...
8048168df56e225c94e50b04cb7b0514135d7a1c
Analyze and fix the following issue in the Linux kernel code: net: stmmac: fix rx limit check in stmmac_rx_zc()
Problem Details: The extra "count >= limit" check in stmmac_rx_zc() is redundant and has no effect because the value of "count" doesn't change after the while condition at this point. However, it can change after "read_again:" label: while (count < limit) { ... if (count >= limit) ...
```diff diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 1ecca60baf74..da206b24aaed 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -5396,10 +5396,10 @@ static int stmmac_rx_...
510026a39849ae7066dce17343caba4550e2a977
Analyze and fix the following issue in the Linux kernel code: net: dsa: yt921x: Fix parsing MIB attributes
Problem Details: There are hard-to-find unused fields in the MIB table I didn't notice in the example driver code, causing wrong interpretation of the MIB data. For some 64-bit attributes, the current (wrong) implementation took the correct lower 32 bits, but messed up the upper 32 bits, so it would work accidentally ...
```diff diff --git a/drivers/net/dsa/yt921x.c b/drivers/net/dsa/yt921x.c index 944988e29127..97fc6085f4d0 100644 --- a/drivers/net/dsa/yt921x.c +++ b/drivers/net/dsa/yt921x.c @@ -56,13 +56,13 @@ static const struct yt921x_mib_desc yt921x_mib_descs[] = { MIB_DESC(1, 0x30, NULL), /* RxPktSz1024To1518 */ MIB_DESC(1,...
1f73a56f986005f0bc64ed23873930e2ee4f5911
Analyze and fix the following issue in the Linux kernel code: net: vxlan: prevent NULL deref in vxlan_xmit_one
Problem Details: Neither sock4 nor sock6 pointers are guaranteed to be non-NULL in vxlan_xmit_one, e.g. if the iface is brought down. This can lead to the following NULL dereference: BUG: kernel NULL pointer dereference, address: 0000000000000010 Oops: Oops: 0000 [#1] SMP NOPTI RIP: 0010:vxlan_xmit_one+0xbb3/0x1...
```diff diff --git a/drivers/net/vxlan/vxlan_core.c b/drivers/net/vxlan/vxlan_core.c index a5c55e7e4d79..e957aa12a8a4 100644 --- a/drivers/net/vxlan/vxlan_core.c +++ b/drivers/net/vxlan/vxlan_core.c @@ -2349,7 +2349,7 @@ void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev, int addr_family; __u8 tos, ttl...
1e43ebcd5152b3e681a334cc6542fb21770c3a2e
Analyze and fix the following issue in the Linux kernel code: iavf: Implement settime64 with -EOPNOTSUPP
Problem Details: ptp_clock_settime() assumes every ptp_clock has implemented settime64(). Stub it with -EOPNOTSUPP to prevent a NULL dereference. The fix is similar to commit 329d050bbe63 ("gve: Implement settime64 with -EOPNOTSUPP"). Fixes: d734223b2f0d ("iavf: add initial framework for registering PTP clock") Signe...
```diff diff --git a/drivers/net/ethernet/intel/iavf/iavf_ptp.c b/drivers/net/ethernet/intel/iavf/iavf_ptp.c index b4d5eda2e84f..9cbd8c154031 100644 --- a/drivers/net/ethernet/intel/iavf/iavf_ptp.c +++ b/drivers/net/ethernet/intel/iavf/iavf_ptp.c @@ -252,6 +252,12 @@ static int iavf_ptp_gettimex64(struct ptp_clock_info...
eeecf5d3a3a484cedfa3f2f87e6d51a7390ed960
Analyze and fix the following issue in the Linux kernel code: net: wwan: mhi_wwan_mbim: Avoid -Wflex-array-member-not-at-end warning
Problem Details: Use DEFINE_RAW_FLEX() to avoid a -Wflex-array-member-not-at-end warning. Remove fixed-size array struct usb_cdc_ncm_dpe16 dpe16[2]; from struct mbim_tx_hdr, so that flex-array member struct mbim_tx_hdr::ndp16.dpe16[] ends last in this structure. Compensate for this by using the DEFINE_RAW_FLEX() help...
```diff diff --git a/drivers/net/wwan/mhi_wwan_mbim.c b/drivers/net/wwan/mhi_wwan_mbim.c index f8bc9a39bfa3..0dace12f5ad0 100644 --- a/drivers/net/wwan/mhi_wwan_mbim.c +++ b/drivers/net/wwan/mhi_wwan_mbim.c @@ -78,8 +78,9 @@ struct mhi_mbim_context { struct mbim_tx_hdr { struct usb_cdc_ncm_nth16 nth16; + + /* Must...
858b1d07e49106a302cc7c7fbeee4fb2698573c9
Analyze and fix the following issue in the Linux kernel code: gve: Fix race condition on tx->dropped_pkt update
Problem Details: The tx->dropped_pkt counter is a 64-bit integer that is incremented directly. On 32-bit architectures, this operation is not atomic and can lead to read/write tearing if a reader accesses the counter during the update. This can result in incorrect values being reported for dropped packets. To prevent ...
```diff diff --git a/drivers/net/ethernet/google/gve/gve_tx.c b/drivers/net/ethernet/google/gve/gve_tx.c index c6ff0968929d..97efc8d27e6f 100644 --- a/drivers/net/ethernet/google/gve/gve_tx.c +++ b/drivers/net/ethernet/google/gve/gve_tx.c @@ -730,7 +730,9 @@ unmap_drop: gve_tx_unmap_buf(tx->dev, &tx->info[idx & tx->...
4c03592689bc19df9deda7a33d56c6ac0cec8651
Analyze and fix the following issue in the Linux kernel code: net: restore napi_consume_skb()'s NULL-handling
Problem Details: Commit e20dfbad8aab ("net: fix napi_consume_skb() with alien skbs") added a skb->cpu check to napi_consume_skb(), before the point where napi_consume_skb() validated skb is not NULL. Add an explicit check to the early exit condition. Reviewed-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Jaku...
```diff diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 5a1d123e7ef7..a00808f7be6a 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -1490,7 +1490,7 @@ void napi_skb_free_stolen_head(struct sk_buff *skb) void napi_consume_skb(struct sk_buff *skb, int budget) { /* Zero budget indicate non-NAPI conte...
f6ed9c5d3190cf18382ee75e0420602101f53586
Analyze and fix the following issue in the Linux kernel code: overflow: Introduce struct_offset() to get offset of member
Problem Details: The trace_marker_raw file in tracefs takes a buffer from user space that contains an id as well as a raw data string which is usually a binary structure. The structure used has the following: struct raw_data_entry { struct trace_entry ent; unsigned int id; char buf[]; }; Since the passed i...
```diff diff --git a/include/linux/overflow.h b/include/linux/overflow.h index 725f95f7e416..736f633b2d5f 100644 --- a/include/linux/overflow.h +++ b/include/linux/overflow.h @@ -458,6 +458,18 @@ static inline size_t __must_check size_sub(size_t minuend, size_t subtrahend) #define struct_size_t(type, member, count) ...
c4f0ab06e1e0c1331e6febd03538a7f621f15134
Analyze and fix the following issue in the Linux kernel code: netfilter: ip6t_srh: fix UAPI kernel-doc comments format
Problem Details: Fix the kernel-doc format for struct members to be "@member" instead of "@ member" to avoid kernel-doc warnings. Warning: ip6t_srh.h:60 struct member 'next_hdr' not described in 'ip6t_srh' Warning: ip6t_srh.h:60 struct member 'hdr_len' not described in 'ip6t_srh' Warning: ip6t_srh.h:60 struct member '...
```diff diff --git a/include/uapi/linux/netfilter_ipv6/ip6t_srh.h b/include/uapi/linux/netfilter_ipv6/ip6t_srh.h index 54ed83360dac..80c66c8ece82 100644 --- a/include/uapi/linux/netfilter_ipv6/ip6t_srh.h +++ b/include/uapi/linux/netfilter_ipv6/ip6t_srh.h @@ -41,13 +41,13 @@ /** * struct ip6t_srh - SRH match o...
69894e5b4c5e28cda5f32af33d4a92b7a4b93b0e
Analyze and fix the following issue in the Linux kernel code: netfilter: nft_connlimit: update the count if add was skipped
Problem Details: Connlimit expression can be used for all kind of packets and not only for packets with connection state new. See this ruleset as example: table ip filter { chain input { type filter hook input priority filter; policy accept; tcp dport 22 ct count over 4 counter ...
```diff diff --git a/net/netfilter/nf_conncount.c b/net/netfilter/nf_conncount.c index d8893e172444..f1be4dd5cf85 100644 --- a/net/netfilter/nf_conncount.c +++ b/net/netfilter/nf_conncount.c @@ -179,7 +179,7 @@ static int __nf_conncount_add(struct net *net, if (ct && nf_ct_is_confirmed(ct)) { if (refcounted) n...
be102eb6a0e7c03db00e50540622f4e43b2d2844
Analyze and fix the following issue in the Linux kernel code: netfilter: nf_conncount: rework API to use sk_buff directly
Problem Details: When using nf_conncount infrastructure for non-confirmed connections a duplicated track is possible due to an optimization introduced since commit d265929930e2 ("netfilter: nf_conncount: reduce unnecessary GC"). In order to fix this introduce a new conncount API that receives directly an sk_buff struc...
```diff diff --git a/include/net/netfilter/nf_conntrack_count.h b/include/net/netfilter/nf_conntrack_count.h index 1b58b5b91ff6..52a06de41aa0 100644 --- a/include/net/netfilter/nf_conntrack_count.h +++ b/include/net/netfilter/nf_conntrack_count.h @@ -18,15 +18,14 @@ struct nf_conncount_list { struct nf_conncount_data ...
634f3853cc98d73bdec8918010ee29b06981583e
Analyze and fix the following issue in the Linux kernel code: netfilter: flowtable: check for maximum number of encapsulations in bridge vlan
Problem Details: Add a sanity check to skip path discovery if the maximum number of encapsulation is reached. While at it, check for underflow too. Fixes: 26267bf9bb57 ("netfilter: flowtable: bridge vlan hardware offload and switchdev") Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
```diff diff --git a/net/netfilter/nft_flow_offload.c b/net/netfilter/nft_flow_offload.c index 14dd1c0698c3..e95e5f59a3d6 100644 --- a/net/netfilter/nft_flow_offload.c +++ b/net/netfilter/nft_flow_offload.c @@ -141,12 +141,19 @@ static void nft_dev_path_info(const struct net_device_path_stack *stack, info->ingress...
6fb3acdebf65a72df0a95f9fd2c901ff2bc9a3a2
Analyze and fix the following issue in the Linux kernel code: Reinstate "resource: avoid unnecessary lookups in find_next_iomem_res()"
Problem Details: Commit 97523a4edb7b ("kernel/resource: remove first_lvl / siblings_only logic") removed an optimization introduced by commit 756398750e11 ("resource: avoid unnecessary lookups in find_next_iomem_res()"). That was not called out in the message of the first commit explicitly so it's not entirely clear w...
```diff diff --git a/kernel/resource.c b/kernel/resource.c index b9fa2a4ce089..e4e9bac12e6e 100644 --- a/kernel/resource.c +++ b/kernel/resource.c @@ -341,6 +341,8 @@ static int find_next_iomem_res(resource_size_t start, resource_size_t end, unsigned long flags, unsigned long desc, struct resource...
3fa805c37dd4d3e72ae5c58800f3f46ab3ca1f70
Analyze and fix the following issue in the Linux kernel code: vmcoreinfo: track and log recoverable hardware errors
Problem Details: Introduce a generic infrastructure for tracking recoverable hardware errors (HW errors that are visible to the OS but does not cause a panic) and record them for vmcore consumption. This aids post-mortem crash analysis tools by preserving a count and timestamp for the last occurrence of such errors. ...
```diff diff --git a/Documentation/driver-api/hw-recoverable-errors.rst b/Documentation/driver-api/hw-recoverable-errors.rst new file mode 100644 index 000000000000..fc526c3454bd --- /dev/null +++ b/Documentation/driver-api/hw-recoverable-errors.rst @@ -0,0 +1,60 @@ +.. SPDX-License-Identifier: GPL-2.0 + +=============...
7b71205ae1120e90c7f6d41d282e26c00e9ee6a7
Analyze and fix the following issue in the Linux kernel code: kho: fix restoring of contiguous ranges of order-0 pages
Problem Details: When contiguous ranges of order-0 pages are restored, kho_restore_page() calls prep_compound_page() with the first page in the range and order as parameters and then kho_restore_pages() calls split_page() to make sure all pages in the range are order-0. However, since split_page() is not intended to s...
```diff diff --git a/kernel/liveupdate/kexec_handover.c b/kernel/liveupdate/kexec_handover.c index 096b7db28baf..9dc51fab604f 100644 --- a/kernel/liveupdate/kexec_handover.c +++ b/kernel/liveupdate/kexec_handover.c @@ -219,11 +219,11 @@ static int __kho_preserve_order(struct kho_mem_track *track, unsigned long pfn, r...
4bc84cd539dff1a6346ffeb5f174bb79e238fa78
Analyze and fix the following issue in the Linux kernel code: kho: kho_restore_vmalloc: fix initialization of pages array
Problem Details: Patch series "kho: fixes for vmalloc restoration". Pratyush reported off-list that when kho_restore_vmalloc() is used to restore a vmalloc_huge() allocation it hits VM_BUG_ON() when we reconstruct the struct pages in kho_restore_pages(). These patches fix the issue. This patch (of 2): In case a pr...
```diff diff --git a/kernel/liveupdate/kexec_handover.c b/kernel/liveupdate/kexec_handover.c index f9b530606693..096b7db28baf 100644 --- a/kernel/liveupdate/kexec_handover.c +++ b/kernel/liveupdate/kexec_handover.c @@ -1096,7 +1096,7 @@ void *kho_restore_vmalloc(const struct kho_vmalloc *preservation) goto err_fre...
40cd0e8dd283b11aff9628fe7fd810ea7cc53e32
Analyze and fix the following issue in the Linux kernel code: KHO: fix boot failure due to kmemleak access to non-PRESENT pages
Problem Details: When booting with debug_pagealloc=on while having: CONFIG_KEXEC_HANDOVER_ENABLE_DEFAULT=y CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=n the system fails to boot due to page faults during kmemleak scanning. This occurs because: With debug_pagealloc is enabled, __free_pages() invokes debug_pagealloc_unmap_pages()...
```diff diff --git a/kernel/liveupdate/kexec_handover.c b/kernel/liveupdate/kexec_handover.c index ecc2058df1b6..f9b530606693 100644 --- a/kernel/liveupdate/kexec_handover.c +++ b/kernel/liveupdate/kexec_handover.c @@ -11,6 +11,7 @@ #include <linux/cleanup.h> #include <linux/cma.h> +#include <linux/kmemleak.h> #in...
b15515155af735a86e5bcd67ed739162f0de27f5
Analyze and fix the following issue in the Linux kernel code: kho: free chunks using free_page() instead of kfree()
Problem Details: Before commit fa759cd75bce5 ("kho: allocate metadata directly from the buddy allocator"), the chunks were allocated from the slab allocator using kzalloc(). Those were rightly freed using kfree(). When the commit switched to using the buddy allocator directly, it missed updating kho_mem_ser_free() to...
```diff diff --git a/kernel/liveupdate/kexec_handover.c b/kernel/liveupdate/kexec_handover.c index 224bdf5becb6..ecc2058df1b6 100644 --- a/kernel/liveupdate/kexec_handover.c +++ b/kernel/liveupdate/kexec_handover.c @@ -360,7 +360,7 @@ static void kho_mem_ser_free(struct khoser_mem_chunk *first_chunk) struct khoser_m...
0153094d03df5a2e834a19c59b255649a258ae46
Analyze and fix the following issue in the Linux kernel code: liveupdate: luo_session: add sessions support
Problem Details: Introduce concept of "Live Update Sessions" within the LUO framework. LUO sessions provide a mechanism to group and manage `struct file *` instances (representing file descriptors) that need to be preserved across a kexec-based live update. Each session is identified by a unique name and acts as a co...
```diff diff --git a/include/linux/kho/abi/luo.h b/include/linux/kho/abi/luo.h index 2099b51929e5..bf1ab2910959 100644 --- a/include/linux/kho/abi/luo.h +++ b/include/linux/kho/abi/luo.h @@ -32,6 +32,11 @@ * / { * compatible = "luo-v1"; * liveupdate-number = <...>; + * + * luo-session ...
53f8f064eba344c074ef6755347bc4170538275f
Analyze and fix the following issue in the Linux kernel code: kho: verify deserialization status and fix FDT alignment access
Problem Details: During boot, kho_restore_folio() relies on the memory map having been successfully deserialized. If deserialization fails or no map is present, attempting to restore the FDT folio is unsafe. Update kho_mem_deserialize() to return a boolean indicating success. Use this return value in kho_memory_init...
```diff diff --git a/kernel/liveupdate/kexec_handover.c b/kernel/liveupdate/kexec_handover.c index 704e91418214..bed611bae1df 100644 --- a/kernel/liveupdate/kexec_handover.c +++ b/kernel/liveupdate/kexec_handover.c @@ -18,6 +18,7 @@ #include <linux/list.h> #include <linux/memblock.h> #include <linux/page-isolation.h...
4c205677af2726bd3b51c02ab6a5a2b411efed09
Analyze and fix the following issue in the Linux kernel code: kho: introduce high-level memory allocation API
Problem Details: Currently, clients of KHO must manually allocate memory (e.g., via alloc_pages), calculate the page order, and explicitly call kho_preserve_folio(). Similarly, cleanup requires separate calls to unpreserve and free the memory. Introduce a high-level API to streamline this common pattern: - kho_alloc...
```diff diff --git a/include/linux/kexec_handover.h b/include/linux/kexec_handover.h index 80ece4232617..dde952227b88 100644 --- a/include/linux/kexec_handover.h +++ b/include/linux/kexec_handover.h @@ -2,8 +2,9 @@ #ifndef LINUX_KEXEC_HANDOVER_H #define LINUX_KEXEC_HANDOVER_H -#include <linux/types.h> +#include <li...
077a4851b0024e3025e57e428767ce0c7b0359bf
Analyze and fix the following issue in the Linux kernel code: kho: fix misleading log message in kho_populate()
Problem Details: Patch series "kho: simplify state machine and enable dynamic updates", v2. This patch series refactors the Kexec Handover subsystem to transition from a rigid, state-locked model to a dynamic, re-entrant architecture. It also introduces usability improvements. Motivation Currently, KHO relies on a s...
```diff diff --git a/kernel/liveupdate/kexec_handover.c b/kernel/liveupdate/kexec_handover.c index 9f0913e101be..6ad45e12f53b 100644 --- a/kernel/liveupdate/kexec_handover.c +++ b/kernel/liveupdate/kexec_handover.c @@ -1470,7 +1470,7 @@ void __init kho_populate(phys_addr_t fdt_phys, u64 fdt_len, kho_in.fdt_phys = fdt...
03d3963464a43654703938a66503cd686c5fc54e
Analyze and fix the following issue in the Linux kernel code: kho: make debugfs interface optional
Problem Details: Patch series "liveupdate: Rework KHO for in-kernel users", v9. This series refactors the KHO framework to better support in-kernel users like the upcoming LUO. The current design, which relies on a notifier chain and debugfs for control, is too restrictive for direct programmatic use. The core of th...
```diff diff --git a/MAINTAINERS b/MAINTAINERS index bd22adb17846..a8a33db191bb 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -13799,7 +13799,7 @@ S: Maintained F: Documentation/admin-guide/mm/kho.rst F: Documentation/core-api/kho/* F: include/linux/kexec_handover.h -F: kernel/kexec_handover.c +F: kernel/kexec_hando...
262ef8e55b7ccd435619c1946249131d0f5b72db
Analyze and fix the following issue in the Linux kernel code: fork: stop ignoring NUMA while handling cached thread stacks
Problem Details: 1. the numa parameter was straight up ignored. 2. nothing was done to check if the to-be-cached/allocated stack matches the local node The id remains ignored on free in case of memoryless nodes. Note the current caching is already bad as the cache keeps overflowing and a different solution is need...
```diff diff --git a/kernel/fork.c b/kernel/fork.c index 3da0f08615a9..17fcb75ca5d5 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -208,15 +208,62 @@ struct vm_stack { struct vm_struct *stack_vm_area; }; +static struct vm_struct *alloc_thread_stack_node_from_cache(struct task_struct *tsk, int node) +{ + struct ...
94984bfed58ca129f7e259ce09973ed0b3f540a8
Analyze and fix the following issue in the Linux kernel code: rbtree: inline rb_last()
Problem Details: This is a very small function, inlining it saves cpu cycles in TCP by reducing register pressure and removing call/ret overhead. It also reduces vmlinux text size by 122 bytes on a typical x86_64 build. Before: size vmlinux text data bss dec hex filename 34811781 22177365 ...
```diff diff --git a/include/linux/rbtree.h b/include/linux/rbtree.h index 484554900f7d..4091e978aef2 100644 --- a/include/linux/rbtree.h +++ b/include/linux/rbtree.h @@ -58,7 +58,21 @@ static inline struct rb_node *rb_first(const struct rb_root *root) n = n->rb_left; return n; } -extern struct rb_node *rb_last(c...
c2d2dad24503d7e2eb7cba354fcc73f95fa78d7a
Analyze and fix the following issue in the Linux kernel code: rbtree: inline rb_first()
Problem Details: Patch series "rbree: inline rb_first() and rb_last()". Inline these two small helpers, heavily used in TCP and FQ packet scheduler, and in many other places. This reduces kernel text size, and brings an 1.5 % improvement on network TCP stress test. This patch (of 2): This is a very small function,...
```diff diff --git a/include/linux/rbtree.h b/include/linux/rbtree.h index 8d2ba3749866..484554900f7d 100644 --- a/include/linux/rbtree.h +++ b/include/linux/rbtree.h @@ -43,7 +43,21 @@ extern void rb_erase(struct rb_node *, struct rb_root *); /* Find logical next and previous nodes in a tree */ extern struct rb_node...
8c8e3df3d2f51e9a3f6f1a1112adf250f7652d42
Analyze and fix the following issue in the Linux kernel code: keys: Fix grammar and formatting in 'struct key_type' comments
Problem Details: s/it/if/ and s/revokation/revocation/, capitalize "clear", and add a period after the sentence. Fix the comment formatting. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
```diff diff --git a/include/linux/key-type.h b/include/linux/key-type.h index 5caf3ce82373..bb97bd3e5af4 100644 --- a/include/linux/key-type.h +++ b/include/linux/key-type.h @@ -107,11 +107,14 @@ struct key_type { */ int (*match_preparse)(struct key_match_data *match_data); - /* Free preparsed match data (optio...
ce48af13e6381772cc27676be63a6d9176c14a49
Analyze and fix the following issue in the Linux kernel code: arm64: dts: mediatek: mt8195: Fix address range for JPEG decoder core 1
Problem Details: The base address of JPEG decoder core 1 should start at 0x10000, and have a size of 0x10000, i.e. it is right after core 0. Instead the core has the same base address as core 0, and with a crazy large size. This looks like a mixup of address and size cells when the ranges were converted. This causes...
```diff diff --git a/arch/arm64/boot/dts/mediatek/mt8195.dtsi b/arch/arm64/boot/dts/mediatek/mt8195.dtsi index ec452d657031..c7adafaa8328 100644 --- a/arch/arm64/boot/dts/mediatek/mt8195.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8195.dtsi @@ -3067,7 +3067,7 @@ jpgdec@0,10000 { compatible = "mediatek,mt8195-j...
26ee34d2f5c7fba968fcc2f1fd94110e1c1660db
Analyze and fix the following issue in the Linux kernel code: ASoC: sdw_utils: Add codec_conf for every DAI
Problem Details: The assumption so far is that all the DAI links for a given audio part would be on the same device. However, as SDCA implements each audio function on a separate auxiliary driver this will no longer be true. This means it is necessary to add additional codec_conf structures to get the prefix for an aud...
```diff diff --git a/sound/soc/amd/acp/acp-sdw-legacy-mach.c b/sound/soc/amd/acp/acp-sdw-legacy-mach.c index 54f823f7cecf..f1f43eeb6037 100644 --- a/sound/soc/amd/acp/acp-sdw-legacy-mach.c +++ b/sound/soc/amd/acp/acp-sdw-legacy-mach.c @@ -364,6 +364,7 @@ static int soc_card_dai_links_create(struct snd_soc_card *card) ...
0cc15a10c3b4ab14cd71b779fd5c9ca0cb2bc30d
Analyze and fix the following issue in the Linux kernel code: regulator: core: Protect regulator_supply_alias_list with regulator_list_mutex
Problem Details: regulator_supply_alias_list was accessed without any locking in regulator_supply_alias(), regulator_register_supply_alias(), and regulator_unregister_supply_alias(). Concurrent registration, unregistration and lookups can race, leading to: 1 use-after-free if an alias entry is removed while being read...
```diff diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 53b2b2d3746f..f4987f54e01b 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -2058,6 +2058,7 @@ static void regulator_supply_alias(struct device **dev, const char **supply) { struct regulator_supply_alias *map; + m...
4138cc63d3efdd77de799aafb0bd183e1d655a0f
Analyze and fix the following issue in the Linux kernel code: KVM: arm64: selftests: Consider all 7 possible levels of cache
Problem Details: In test_clidr() if an empty cache level is not found then the TEST_ASSERT will not fire. Fix this by considering all 7 possible levels when iterating through the hierarchy. Found by inspection. Signed-off-by: Ben Horgan <ben.horgan@arm.com> Acked-by: Marc Zyngier <maz@kernel.org> Acked-by: Oliver Upto...
```diff diff --git a/tools/testing/selftests/kvm/arm64/set_id_regs.c b/tools/testing/selftests/kvm/arm64/set_id_regs.c index 465d2331196a..01f9e417cea1 100644 --- a/tools/testing/selftests/kvm/arm64/set_id_regs.c +++ b/tools/testing/selftests/kvm/arm64/set_id_regs.c @@ -673,7 +673,7 @@ static void test_clidr(struct kvm...
41bdec133dc0b79e152f8dda0bf2f71a5abb5838
Analyze and fix the following issue in the Linux kernel code: mtd: nand: realtek-ecc: Fix Kconfig dependencies
Problem Details: The driver uses DMA but does not mark it as a prerequisite in Kconfig. As it is also defined with COMPILE_TEST, autobuilders complain about certain symbols not being available when linking on architectures without DMA support (?) like sh. Reported-by: kernel test robot <lkp@intel.com> Closes: https://...
```diff diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig index 4a17271076bc..1e57c8de8578 100644 --- a/drivers/mtd/nand/Kconfig +++ b/drivers/mtd/nand/Kconfig @@ -63,7 +63,7 @@ config MTD_NAND_ECC_MEDIATEK config MTD_NAND_ECC_REALTEK tristate "Realtek RTL93xx hardware ECC engine" - de...
43fb9e113bf11d78e7c817e2696705f458753c79
Analyze and fix the following issue in the Linux kernel code: drm/xe/gt: Introduce runtime suspend/resume
Problem Details: If power state is retained between suspend/resume cycle, we don't need to perform full GT re-initialization. Introduce runtime helpers for GT which greatly reduce suspend/resume delay. v2: Drop redundant xe_gt_sanitize() and xe_guc_ct_stop() (Daniele) Use runtime naming for guc helpers (Daniele) v...
```diff diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c index 514ed50e6d83..996756d1fbd5 100644 --- a/drivers/gpu/drm/xe/xe_gt.c +++ b/drivers/gpu/drm/xe/xe_gt.c @@ -956,6 +956,66 @@ int xe_gt_resume(struct xe_gt *gt) return 0; } +/** + * xe_gt_runtime_suspend() - GT runtime suspend + * @gt: t...
99234edab8e1fd3fd2309193a3b3169970a7e770
Analyze and fix the following issue in the Linux kernel code: drm/xe/vf: Update pause/unpause() helpers with VF naming
Problem Details: Now that pause/unpause() helpers have been updated for VF migration usecase, update their naming to match the functionality and while at it, add IS_SRIOV_VF() assert to make sure they are not abused. v7: Add IS_SRIOV_VF() assert (Matthew Brost) Use "vf" suffix (Michal) Suggested-by: Matthew Brost...
```diff diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_vf.c b/drivers/gpu/drm/xe/xe_gt_sriov_vf.c index 4c73a077d314..97c29c55f885 100644 --- a/drivers/gpu/drm/xe/xe_gt_sriov_vf.c +++ b/drivers/gpu/drm/xe/xe_gt_sriov_vf.c @@ -1128,7 +1128,7 @@ static bool vf_post_migration_shutdown(struct xe_gt *gt) spin_unlock_irq(&gt-...
86dc090f737953f16f8dc60c546ae7854690d4f6
Analyze and fix the following issue in the Linux kernel code: ASoC: codecs: wcd939x: fix regmap leak on probe failure
Problem Details: The soundwire regmap that may be allocated during probe is not freed on late probe failures. Add the missing error handling. Fixes: be2af391cea0 ("ASoC: codecs: Add WCD939x Soundwire devices driver") Cc: stable@vger.kernel.org # 6.9 Cc: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Johan ...
```diff diff --git a/sound/soc/codecs/wcd939x-sdw.c b/sound/soc/codecs/wcd939x-sdw.c index d369100a2457..da342a0c95a5 100644 --- a/sound/soc/codecs/wcd939x-sdw.c +++ b/sound/soc/codecs/wcd939x-sdw.c @@ -1400,12 +1400,18 @@ static int wcd9390_probe(struct sdw_slave *pdev, const struct sdw_device_id *id) ret = compon...
02f0ad8e8de8cf5344f8f0fa26d9529b8339da47
Analyze and fix the following issue in the Linux kernel code: hwmon: (max6697) fix regmap leak on probe failure
Problem Details: The i2c regmap allocated during probe is never freed. Switch to using the device managed allocator so that the regmap is released on probe failures (e.g. probe deferral) and on driver unbind. Fixes: 3a2a8cc3fe24 ("hwmon: (max6697) Convert to use regmap") Cc: stable@vger.kernel.org # 6.12 Cc: Guenter ...
```diff diff --git a/drivers/hwmon/max6697.c b/drivers/hwmon/max6697.c index 6b4a52838818..dd906cf491ca 100644 --- a/drivers/hwmon/max6697.c +++ b/drivers/hwmon/max6697.c @@ -542,7 +542,7 @@ static int max6697_probe(struct i2c_client *client) struct regmap *regmap; int err; - regmap = regmap_init_i2c(client, &max...
990eb9a8eb4540ab90c7b34bb07b87ff13881cad
Analyze and fix the following issue in the Linux kernel code: soc: samsung: exynos-pmu: fix device leak on regmap lookup
Problem Details: Make sure to drop the reference taken when looking up the PMU device and its regmap. Note that holding a reference to a device does not prevent its regmap from going away so there is no point in keeping the reference. Fixes: 0b7c6075022c ("soc: samsung: exynos-pmu: Add regmap support for SoCs that pr...
```diff diff --git a/drivers/soc/samsung/exynos-pmu.c b/drivers/soc/samsung/exynos-pmu.c index df5b1f299a26..f8fe1a5965ab 100644 --- a/drivers/soc/samsung/exynos-pmu.c +++ b/drivers/soc/samsung/exynos-pmu.c @@ -346,6 +346,8 @@ struct regmap *exynos_get_pmu_regmap_by_phandle(struct device_node *np, if (!dev) return...
099a60cca1b84e60fdaefcd5d93736de9dba9cf9
Analyze and fix the following issue in the Linux kernel code: remoteproc: imx_dsp_rproc: Fix NULL vs IS_ERR() bug in imx_dsp_rproc_add_carveout()
Problem Details: The devm_ioremap_resource_wc() function never returns NULL, it returns error pointers. Update the error checking to match. Fixes: 67a7bc7f0358 ("remoteproc: Use of_reserved_mem_region_* functions for "memory-region"") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Iuliana Prodan...
```diff diff --git a/drivers/remoteproc/imx_dsp_rproc.c b/drivers/remoteproc/imx_dsp_rproc.c index be83b5f20f15..5130a35214c9 100644 --- a/drivers/remoteproc/imx_dsp_rproc.c +++ b/drivers/remoteproc/imx_dsp_rproc.c @@ -710,9 +710,9 @@ static int imx_dsp_rproc_add_carveout(struct imx_dsp_rproc *priv) return -EINVAL;...
ac82dbc539c4c167f351e2e91c93508de73a5cd1
Analyze and fix the following issue in the Linux kernel code: remoteproc: st: Fix indexing of memory-regions
Problem Details: The recent transition to use of_reserved_mem_region_to_resource() changes the while loop to a for loop, but the increment of the "index" variable was left behind at the end of the loop, as highlighted by the following error/warning: error: variable 'index' is incremented both in the loop header and ...
```diff diff --git a/drivers/remoteproc/st_remoteproc.c b/drivers/remoteproc/st_remoteproc.c index 747bbe7f6f7c..a07edf7217d2 100644 --- a/drivers/remoteproc/st_remoteproc.c +++ b/drivers/remoteproc/st_remoteproc.c @@ -155,7 +155,6 @@ static int st_rproc_parse_fw(struct rproc *rproc, const struct firmware *fw) retu...
2ff147fdfa99b8cbb8c2833e685fde7c42580ae6
Analyze and fix the following issue in the Linux kernel code: ARM: dts: samsung: exynos4412-midas: turn off SDIO WLAN chip during system suspend
Problem Details: Commit 8c3170628a9c ("wifi: brcmfmac: keep power during suspend if board requires it") changed default behavior of the BRCMFMAC driver, which now keeps SDIO card powered during system suspend to enable optional support for WOWL. This feature is not supported by the legacy Exynos4 based boards and leads...
```diff diff --git a/arch/arm/boot/dts/samsung/exynos4412-midas.dtsi b/arch/arm/boot/dts/samsung/exynos4412-midas.dtsi index 05ddddb565ee..48245b1665a6 100644 --- a/arch/arm/boot/dts/samsung/exynos4412-midas.dtsi +++ b/arch/arm/boot/dts/samsung/exynos4412-midas.dtsi @@ -1440,6 +1440,7 @@ #address-cells = <1>; #size...
97cc9c346b2c9cde075b9420fc172137d2427711
Analyze and fix the following issue in the Linux kernel code: ARM: dts: samsung: exynos4210-trats: turn off SDIO WLAN chip during system suspend
Problem Details: Commit 8c3170628a9c ("wifi: brcmfmac: keep power during suspend if board requires it") changed default behavior of the BRCMFMAC driver, which now keeps SDIO card powered during system suspend to enable optional support for WOWL. This feature is not supported by the legacy Exynos4 based boards and leads...
```diff diff --git a/arch/arm/boot/dts/samsung/exynos4210-trats.dts b/arch/arm/boot/dts/samsung/exynos4210-trats.dts index 95e0e01b6ff6..6bd902cb8f4a 100644 --- a/arch/arm/boot/dts/samsung/exynos4210-trats.dts +++ b/arch/arm/boot/dts/samsung/exynos4210-trats.dts @@ -518,6 +518,7 @@ #size-cells = <0>; non-removabl...
863d69923bdb6f414d0a3f504f1dfaeacbc00b09
Analyze and fix the following issue in the Linux kernel code: ARM: dts: samsung: exynos4210-i9100: turn off SDIO WLAN chip during system suspend
Problem Details: Commit 8c3170628a9c ("wifi: brcmfmac: keep power during suspend if board requires it") changed default behavior of the BRCMFMAC driver, which now keeps SDIO card powered during system suspend to enable optional support for WOWL. This feature is not supported by the legacy Exynos4 based boards and leads...
```diff diff --git a/arch/arm/boot/dts/samsung/exynos4210-i9100.dts b/arch/arm/boot/dts/samsung/exynos4210-i9100.dts index df229fb8a16b..8a635bee59fa 100644 --- a/arch/arm/boot/dts/samsung/exynos4210-i9100.dts +++ b/arch/arm/boot/dts/samsung/exynos4210-i9100.dts @@ -853,6 +853,7 @@ #size-cells = <0>; non-removabl...
97aee67e2406ea381408915e606c5f86448f3949
Analyze and fix the following issue in the Linux kernel code: ARM: dts: samsung: universal_c210: turn off SDIO WLAN chip during system suspend
Problem Details: Commit 8c3170628a9c ("wifi: brcmfmac: keep power during suspend if board requires it") changed default behavior of the BRCMFMAC driver, which now keeps SDIO card powered during system suspend to enable optional support for WOWL. This feature is not supported by the legacy Exynos4 based boards and leads...
```diff diff --git a/arch/arm/boot/dts/samsung/exynos4210-universal_c210.dts b/arch/arm/boot/dts/samsung/exynos4210-universal_c210.dts index bdc30f8cf748..91490693432b 100644 --- a/arch/arm/boot/dts/samsung/exynos4210-universal_c210.dts +++ b/arch/arm/boot/dts/samsung/exynos4210-universal_c210.dts @@ -610,6 +610,7 @@ ...
2224ea67c75d0a0b9eaf803d0dfdab8d0c601c35
Analyze and fix the following issue in the Linux kernel code: soc: samsung: exynos-pmu: Fix structure initialization
Problem Details: Commit 78b72897a5c8 ("soc: samsung: exynos-pmu: Enable CPU Idle for gs101") added system wide suspend/resume callbacks to Exynos PMU driver, but some items used by these callbacks are initialized only on GS101-compatible boards. Move that initialization to exynos_pmu_probe() to avoid potential lockdep ...
```diff diff --git a/drivers/soc/samsung/exynos-pmu.c b/drivers/soc/samsung/exynos-pmu.c index 22c50ca2aa79..df5b1f299a26 100644 --- a/drivers/soc/samsung/exynos-pmu.c +++ b/drivers/soc/samsung/exynos-pmu.c @@ -585,10 +585,6 @@ static int setup_cpuhp_and_cpuidle(struct device *dev) if (!pmu_context->in_cpuhp) retu...
1aa53326e1df68f8e7191053a3fd712449d444cb
Analyze and fix the following issue in the Linux kernel code: sysctl: remove __user qualifier from stack_erasing_sysctl buffer argument
Problem Details: The buffer arg in proc handler functions have been void* (no __user qualifier) since commit 32927393dc1c ("sysctl: pass kernel pointers to ->proc_handler"). The __user qualifier was erroneously brought back in commit 0df8bdd5e3b3 ("stackleak: move stack_erasing sysctl to stackleak.c"). This fixes the e...
```diff diff --git a/kernel/kstack_erase.c b/kernel/kstack_erase.c index e49bb88b4f0a..d4449884084c 100644 --- a/kernel/kstack_erase.c +++ b/kernel/kstack_erase.c @@ -23,7 +23,7 @@ static DEFINE_STATIC_KEY_FALSE(stack_erasing_bypass); #ifdef CONFIG_SYSCTL static int stack_erasing_sysctl(const struct ctl_table *tabl...
2dc164a48e6fdb03066614e2b82464b9b7c790ca
Analyze and fix the following issue in the Linux kernel code: sysctl: Create converter functions with two new macros
Problem Details: Eight converter functions are created using two new macros (SYSCTL_USER_TO_KERN_INT_CONV & SYSCTL_KERN_TO_USER_INT_CONV); they are called from four pre-existing converter functions: do_proc_dointvec_conv and do_proc_dointvec{,_userhz,_ms}_jiffies_conv. The function names generated by the macros are dif...
```diff diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 2091d2396c83..f47bb8af33fb 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -368,31 +368,65 @@ static void proc_put_char(void **buf, size_t *size, char c) } } +#define SYSCTL_USER_TO_KERN_INT_CONV(name, u_ptr_op) \ +int sysctl_user_to_kern_int_conv...
502ddcc405b69fa92e0add6c1714d654504f6fd7
Analyze and fix the following issue in the Linux kernel code: staging: rtl8723bs: fix out-of-bounds read in OnBeacon ESR IE parsing
Problem Details: The Extended Supported Rates (ESR) IE handling in OnBeacon accessed *(p + 1 + ielen) and *(p + 2 + ielen) without verifying that these offsets lie within the received frame buffer. A malformed beacon with an ESR IE positioned at the end of the buffer could cause an out-of-bounds read, potentially trigg...
```diff diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c index f6c5eb30f9f6..ac49bfbaa5bb 100644 --- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c @@ -574,9 +574,11 @@ unsigned int OnBeacon(struct adapter *pa...
6ef0e1c10455927867cac8f0ed6b49f328f8cf95
Analyze and fix the following issue in the Linux kernel code: staging: rtl8723bs: fix stack buffer overflow in OnAssocReq IE parsing
Problem Details: The Supported Rates IE length from an incoming Association Request frame was used directly as the memcpy() length when copying into a fixed-size 16-byte stack buffer (supportRate). A malicious station can advertise an IE length larger than 16 bytes, causing a stack buffer overflow. Clamp ie_len to the...
```diff diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c index fb170a144d28..f6c5eb30f9f6 100644 --- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c @@ -1028,6 +1028,9 @@ unsigned int OnAssocReq(struct adapter ...
154828bf9559b9c8421fc2f0d7f7f76b3683aaed
Analyze and fix the following issue in the Linux kernel code: staging: rtl8723bs: fix out-of-bounds read in rtw_get_ie() parser
Problem Details: The Information Element (IE) parser rtw_get_ie() trusted the length byte of each IE without validating that the IE body (len bytes after the 2-byte header) fits inside the remaining frame buffer. A malformed frame can advertise an IE length larger than the available data, causing the parser to incremen...
```diff diff --git a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c index 10911a661223..8fdeeda88a6d 100644 --- a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c +++ b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c @@ -138,22 +138,24 @@ u8 *rtw_get_ie(u8 *pbuf, signed int...
3d1f1088455d9a9bce51f0c1e6a81f518a5cb468
Analyze and fix the following issue in the Linux kernel code: x86/mm: Delete disabled debug code
Problem Details: This code doesn't run. Since 2008: 4f9c11dd49fb ("x86, 64-bit: adjust mapping of physical pagetables to work with Xen") the kernel has gained more flexible logging and tracing capabilities; presumably if anyone wanted to take advantage of this log message they would have got rid of the "if (0)" so ...
```diff diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 0e4270e20fad..1044aafd5d94 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c @@ -504,9 +504,6 @@ phys_pte_init(pte_t *pte_page, unsigned long paddr, unsigned long paddr_end, continue; } - if (0) - pr_info(" pte=%p addr=%...
a508939e15356d80369ea881c05526a168fcfd6c
Analyze and fix the following issue in the Linux kernel code: ACPI: PM: Fix a spelling mistake
Problem Details: Fix spelling by replacing "interrups" with "interrupts". Signed-off-by: Chu Guangqing <chuguangqing@inspur.com> [ rjw: Changelog edits ] Link: https://patch.msgid.link/20251125022403.2614-1-chuguangqing@inspur.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
```diff diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index c8ee8e42b0f6..68943b98333d 100644 --- a/drivers/acpi/sleep.c +++ b/drivers/acpi/sleep.c @@ -642,7 +642,7 @@ static int acpi_suspend_enter(suspend_state_t pm_state) /* * Disable all GPE and clear their status bits before interrupts are * enab...
037dada8bbb14e42b6596e30557b08ee051f7b1b
Analyze and fix the following issue in the Linux kernel code: ACPI: LPSS: Fix a spelling mistake
Problem Details: Fix spelling by replacing "successfull" with "successful". Signed-off-by: Chu Guangqing <chuguangqing@inspur.com> [ rjw: Changelog edits ] Link: https://patch.msgid.link/20251125021431.2243-1-chuguangqing@inspur.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
```diff diff --git a/drivers/acpi/x86/lpss.c b/drivers/acpi/x86/lpss.c index 6daa6372f980..1dcb80ab0d23 100644 --- a/drivers/acpi/x86/lpss.c +++ b/drivers/acpi/x86/lpss.c @@ -181,7 +181,7 @@ static void byt_i2c_setup(struct lpss_private_data *pdata) acpi_status status; u64 uid; - /* Expected to always be successf...
f07f4ea53e22429c84b20832fa098b5ecc0d4e35
Analyze and fix the following issue in the Linux kernel code: mptcp: Initialise rcv_mss before calling tcp_send_active_reset() in mptcp_do_fastclose().
Problem Details: syzbot reported divide-by-zero in __tcp_select_window() by MPTCP socket. [0] We had a similar issue for the bare TCP and fixed in commit 499350a5a6e7 ("tcp: initialize rcv_mss to TCP_MIN_MSS instead of 0"). Let's apply the same fix to mptcp_do_fastclose(). [0]: Oops: divide error: 0000 [#1] SMP KASA...
```diff diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index 8abb425d8b5f..1e413426deee 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -2798,6 +2798,12 @@ static void mptcp_do_fastclose(struct sock *sk) goto unlock; subflow->send_fastclose = 1; + + /* Initialize rcv_mss to TCP_MIN_M...
80a85a771deb113cfe2e295fb9e84467a43ebfe4
Analyze and fix the following issue in the Linux kernel code: RDMA/rxe: reclassify sockets in order to avoid false positives from lockdep
Problem Details: While developing IPPROTO_SMBDIRECT support for the code under fs/smb/common/smbdirect [1], I noticed false positives like this: [+0,003927] ============================================ [+0,000532] WARNING: possible recursive locking detected [+0,000611] 6.18.0-rc5-metze-kasan-lockdep.02+ #1 Tainted: G...
```diff diff --git a/drivers/infiniband/sw/rxe/rxe_net.c b/drivers/infiniband/sw/rxe/rxe_net.c index ac0183a2ff7a..0195d361e5e3 100644 --- a/drivers/infiniband/sw/rxe/rxe_net.c +++ b/drivers/infiniband/sw/rxe/rxe_net.c @@ -20,6 +20,54 @@ static struct rxe_recv_sockets recv_sockets; +#ifdef CONFIG_DEBUG_LOCK_ALLOC ...
45d100ee0d6e8b4b4ba6c48f54decd62f875cf70
Analyze and fix the following issue in the Linux kernel code: net: stmmac: dwmac: Disable flushing frames on Rx Buffer Unavailable
Problem Details: In Store and Forward mode, flushing frames when the receive buffer is unavailable, can cause the MTL Rx FIFO to go out of sync. This results in buffering of a few frames in the FIFO without triggering Rx DMA from transferring the data to the system memory until another packet is received. Once the issu...
```diff diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c index 6d9b8fac3c6d..5877fec9f6c3 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c @@ -135,10 +135,10 @@ static void dwm...
5de863efbf88d995fe96931c5e8f1325b1745b1d
Analyze and fix the following issue in the Linux kernel code: iommupt: Avoid a compiler bug with sw_bit
Problem Details: gcc 13, in some cases, gets confused if the __builtin_constant_p() is inside the switch. It thinks that bitnr can have the value max+1 and fails. Lift the check outside the switch to avoid it. Fixes: ef7bfe5bbffd ("iommupt/x86: Support SW bits and permit PT_FEAT_DMA_INCOHERENT") Fixes: 5448c1558f60 ("...
```diff diff --git a/drivers/iommu/generic_pt/fmt/vtdss.h b/drivers/iommu/generic_pt/fmt/vtdss.h index d9774848eb6f..50ffed9d0e50 100644 --- a/drivers/iommu/generic_pt/fmt/vtdss.h +++ b/drivers/iommu/generic_pt/fmt/vtdss.h @@ -174,6 +174,9 @@ static inline unsigned int vtdss_pt_max_sw_bit(struct pt_common *common) s...
5c9c1e78de1e41b5321583139851797580c077c3
Analyze and fix the following issue in the Linux kernel code: selftests: af_unix: remove unused stdlib.h include
Problem Details: The unix_connreset.c test included <stdlib.h>, but no symbol from that header is used. This causes a fatal build error under certain linux-next configurations where stdlib.h is not available. Remove the unused include to fix the build. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lo...
```diff diff --git a/tools/testing/selftests/net/af_unix/unix_connreset.c b/tools/testing/selftests/net/af_unix/unix_connreset.c index 6eb936207b31..08c1de8f5a98 100644 --- a/tools/testing/selftests/net/af_unix/unix_connreset.c +++ b/tools/testing/selftests/net/af_unix/unix_connreset.c @@ -14,7 +14,6 @@ */ #define...
061795b345aff371df8f71d54ae7c7dc8ae630d0
Analyze and fix the following issue in the Linux kernel code: spi: airoha-snfi: en7523: workaround flash damaging if UART_TXD was short to GND
Problem Details: Airoha EN7523 specific bug -------------------------- We found that some serial console may pull TX line to GROUND during board boot time. Airoha uses TX line as one of its bootstrap pins. On the EN7523 SoC this may lead to booting in RESERVED boot mode. It was found that some flashes operates incorre...
```diff diff --git a/drivers/spi/spi-airoha-snfi.c b/drivers/spi/spi-airoha-snfi.c index 8408aee9c06e..70327aebc26b 100644 --- a/drivers/spi/spi-airoha-snfi.c +++ b/drivers/spi/spi-airoha-snfi.c @@ -1013,6 +1013,11 @@ static const struct spi_controller_mem_ops airoha_snand_mem_ops = { .dirmap_write = airoha_snand_dir...
16e17736282fea02c1a156b242c2dbf35d94e9a2
Analyze and fix the following issue in the Linux kernel code: ASoC: Intel: catpt: Fix probing order of driver components
Problem Details: catpt_dai_pcm_new() is called during the bring up sequence of the machine board device which is a different device to the parent (DSP) device yet utilizes pm_runtime_xxx() against it in order to send IPCs. If the parent's pm_runtime is not configured before that happens, errors will occur. Signed-off-...
```diff diff --git a/sound/soc/intel/catpt/device.c b/sound/soc/intel/catpt/device.c index faa916f40069..eed330bc82b6 100644 --- a/sound/soc/intel/catpt/device.c +++ b/sound/soc/intel/catpt/device.c @@ -184,22 +184,25 @@ static int catpt_probe_components(struct catpt_dev *cdev) goto err_boot_fw; } - ret = catpt_...
86a5b621be658fc8fe594ca6db317d64de30cce1
Analyze and fix the following issue in the Linux kernel code: ASoC: Intel: catpt: Fix error path in hw_params()
Problem Details: Do not leave any resources hanging on the DSP side if applying user settings fails. Fixes: 768a3a3b327d ("ASoC: Intel: catpt: Optimize applying user settings") Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patc...
```diff diff --git a/sound/soc/intel/catpt/pcm.c b/sound/soc/intel/catpt/pcm.c index f15385683d9c..9baaad13a273 100644 --- a/sound/soc/intel/catpt/pcm.c +++ b/sound/soc/intel/catpt/pcm.c @@ -417,8 +417,10 @@ static int catpt_dai_hw_params(struct snd_pcm_substream *substream, return CATPT_IPC_ERROR(ret); ret = ca...
1a0ce0a1e6d2e6e03469eb5233e2a571511b1ae1
Analyze and fix the following issue in the Linux kernel code: ASoC: Intel: catpt: Fix offset checks
Problem Details: Verify if the entire block is found within DRAM, not just the start of it. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20251126095523.3925364-2-cezary.rojewski@intel.com Signed-off-by: Mark B...
```diff diff --git a/sound/soc/intel/catpt/loader.c b/sound/soc/intel/catpt/loader.c index 696d84314eeb..5804de1d89e3 100644 --- a/sound/soc/intel/catpt/loader.c +++ b/sound/soc/intel/catpt/loader.c @@ -216,7 +216,7 @@ static int catpt_restore_memdumps(struct catpt_dev *cdev, struct dma_chan *chan) continue; o...
40ad64ac25bb736740f895d99a4aebbda9b80991
Analyze and fix the following issue in the Linux kernel code: spi: nxp-fspi: Propagate fwnode in ACPI case as well
Problem Details: Propagate fwnode of the ACPI device to the SPI controller Linux device. Currently only OF case propagates fwnode to the controller. While at it, replace several calls to dev_fwnode() with a single one cached in a local variable, and unify checks for fwnode type by using is_*_node() APIs. Fixes: 55ab8...
```diff diff --git a/drivers/spi/spi-nxp-fspi.c b/drivers/spi/spi-nxp-fspi.c index b6c79e50d842..50a7e4916a60 100644 --- a/drivers/spi/spi-nxp-fspi.c +++ b/drivers/spi/spi-nxp-fspi.c @@ -1287,7 +1287,7 @@ static int nxp_fspi_probe(struct platform_device *pdev) { struct spi_controller *ctlr; struct device *dev = &p...
8684229e19c4185d53d6fb7004d733907c865a91
Analyze and fix the following issue in the Linux kernel code: regulator: rtq2208: Correct LDO2 logic judgment bits
Problem Details: The LDO2 judgement bit position should be 7, not 6. Cc: stable@vger.kernel.org Reported-by: Yoon Dong Min <dm.youn@telechips.com> Fixes: b65439d90150 ("regulator: rtq2208: Fix the LDO DVS capability") Signed-off-by: ChiYuan Huang <cy_huang@richtek.com> Link: https://patch.msgid.link/faadb009f84b88bfca...
```diff diff --git a/drivers/regulator/rtq2208-regulator.c b/drivers/regulator/rtq2208-regulator.c index 4a174e27c579..f669a562f036 100644 --- a/drivers/regulator/rtq2208-regulator.c +++ b/drivers/regulator/rtq2208-regulator.c @@ -53,7 +53,7 @@ #define RTQ2208_MASK_BUCKPH_GROUP1 GENMASK(6, 4) #define RTQ2208_MASK_BU...
45cc214152bc1f6b1cc135532cd7cdbe08716aaf
Analyze and fix the following issue in the Linux kernel code: regulator: rtq2208: Correct buck group2 phase mapping logic
Problem Details: Correct buck group2 H and F mapping logic. Cc: stable@vger.kernel.org Reported-by: Yoon Dong Min <dm.youn@telechips.com> Fixes: 1742e7e978ba ("regulator: rtq2208: Fix incorrect buck converter phase mapping") Signed-off-by: ChiYuan Huang <cy_huang@richtek.com> Link: https://patch.msgid.link/8527ae02a72...
```diff diff --git a/drivers/regulator/rtq2208-regulator.c b/drivers/regulator/rtq2208-regulator.c index 9cde7181b0f0..4a174e27c579 100644 --- a/drivers/regulator/rtq2208-regulator.c +++ b/drivers/regulator/rtq2208-regulator.c @@ -543,14 +543,14 @@ static int rtq2208_regulator_check(struct device *dev, int *num, int *r...
9a060d0fac9e75524f72864adec6d8cdb70a5bca
Analyze and fix the following issue in the Linux kernel code: net: fec: do not register PPS event for PEROUT
Problem Details: There are currently two situations that can trigger the PTP interrupt, one is the PPS event, the other is the PEROUT event. However, the irq handler fec_pps_interrupt() does not check the irq event type and directly registers a PPS event into the system, but the event may be a PEROUT event. This is inc...
```diff diff --git a/drivers/net/ethernet/freescale/fec_ptp.c b/drivers/net/ethernet/freescale/fec_ptp.c index ed5d59abeb53..4b7bad9a485d 100644 --- a/drivers/net/ethernet/freescale/fec_ptp.c +++ b/drivers/net/ethernet/freescale/fec_ptp.c @@ -718,8 +718,11 @@ static irqreturn_t fec_pps_interrupt(int irq, void *dev_id) ...
c0a1f3d7e128e8d1b6c0fe09c68eac5ebcf677c8
Analyze and fix the following issue in the Linux kernel code: net: fec: do not allow enabling PPS and PEROUT simultaneously
Problem Details: In the current driver, PPS and PEROUT use the same channel to generate the events, so they cannot be enabled at the same time. Otherwise, the later configuration will overwrite the earlier configuration. Therefore, when configuring PPS, the driver will check whether PEROUT is enabled. Similarly, when c...
```diff diff --git a/drivers/net/ethernet/freescale/fec_ptp.c b/drivers/net/ethernet/freescale/fec_ptp.c index f31b1626c12f..ed5d59abeb53 100644 --- a/drivers/net/ethernet/freescale/fec_ptp.c +++ b/drivers/net/ethernet/freescale/fec_ptp.c @@ -128,6 +128,12 @@ static int fec_ptp_enable_pps(struct fec_enet_private *fep, ...
e97faa0c20ea8840f45569ba434e30538fff8fc9
Analyze and fix the following issue in the Linux kernel code: net: fec: do not update PEROUT if it is enabled
Problem Details: If the previously set PEROUT is already active, updating it will cause the new PEROUT to start immediately instead of at the specified time. This is because fep->reload_period is updated whithout check whether the PEROUT is enabled, and the old PEROUT is not disabled. Therefore, the pulse period will b...
```diff diff --git a/drivers/net/ethernet/freescale/fec.h b/drivers/net/ethernet/freescale/fec.h index 41e0d85d15da..abf1ef8e76c6 100644 --- a/drivers/net/ethernet/freescale/fec.h +++ b/drivers/net/ethernet/freescale/fec.h @@ -687,6 +687,7 @@ struct fec_enet_private { unsigned int reload_period; int pps_enable; u...
50caa744689e505414673c20359b04aa918439e3
Analyze and fix the following issue in the Linux kernel code: net: fec: cancel perout_timer when PEROUT is disabled
Problem Details: The PEROUT allows the user to set a specified future time to output the periodic signal. If the future time is far from the current time, the FEC driver will use hrtimer to configure PEROUT one second before the future time. However, the hrtimer will not be canceled if the PEROUT is disabled before the...
```diff diff --git a/drivers/net/ethernet/freescale/fec_ptp.c b/drivers/net/ethernet/freescale/fec_ptp.c index fa88b47d526c..7a5367ea9410 100644 --- a/drivers/net/ethernet/freescale/fec_ptp.c +++ b/drivers/net/ethernet/freescale/fec_ptp.c @@ -497,6 +497,8 @@ static int fec_ptp_pps_disable(struct fec_enet_private *fep, ...
b3e528a5811bbc8246dbdb962f0812dc9b721681
Analyze and fix the following issue in the Linux kernel code: net: mctp: unconditionally set skb->dev on dst output
Problem Details: On transmit, we are currently relying on skb->dev being set by mctp_local_output() when we first set up the skb destination fields. However, forwarded skbs do not use the local_output path, so will retain their incoming netdev as their ->dev on tx. This does not work when we're forwarding between inter...
```diff diff --git a/net/mctp/route.c b/net/mctp/route.c index 4d314e062ba9..2ac4011a953f 100644 --- a/net/mctp/route.c +++ b/net/mctp/route.c @@ -623,6 +623,7 @@ static int mctp_dst_output(struct mctp_dst *dst, struct sk_buff *skb) skb->protocol = htons(ETH_P_MCTP); skb->pkt_type = PACKET_OUTGOING; + skb->dev = ...
3a2c32d357db8d8d78f59359374d95633313d9de
Analyze and fix the following issue in the Linux kernel code: RDMA/siw: reclassify sockets in order to avoid false positives from lockdep
Problem Details: While developing IPPROTO_SMBDIRECT support for the code under fs/smb/common/smbdirect [1], I noticed false positives like this: [T79] ====================================================== [T79] WARNING: possible circular locking dependency detected [T79] 6.18.0-rc4-metze-kasan-lockdep.01+ #1 Tainted:...
```diff diff --git a/drivers/infiniband/sw/siw/siw_cm.c b/drivers/infiniband/sw/siw/siw_cm.c index 708b13993fdf..79dd44cd6bc3 100644 --- a/drivers/infiniband/sw/siw/siw_cm.c +++ b/drivers/infiniband/sw/siw/siw_cm.c @@ -39,6 +39,55 @@ static void siw_cm_llp_error_report(struct sock *s); static int siw_cm_upcall(struct ...
39e138173ae7641e952b456d2de7ad2ac03e8d88
Analyze and fix the following issue in the Linux kernel code: net: pcs: xpcs: Fix PMA identifier handling in XPCS
Problem Details: The XPCS driver was mangling the PMA identifier as the original code appears to have been focused on just capturing the OUI. Rather than store a mangled ID it is better to work with the actual PMA ID and instead just mask out the values that don't apply rather than shifting them and reordering them as ...
```diff diff --git a/drivers/net/pcs/pcs-xpcs.c b/drivers/net/pcs/pcs-xpcs.c index 9fb9d4fd2a5b..a94a7cb93664 100644 --- a/drivers/net/pcs/pcs-xpcs.c +++ b/drivers/net/pcs/pcs-xpcs.c @@ -1365,17 +1365,16 @@ static int xpcs_read_ids(struct dw_xpcs *xpcs) if (ret < 0) return ret; - id = ret; + id = ret << 16; ...
2585973c7f9ee31d21e5848c996fab2521fd383d
Analyze and fix the following issue in the Linux kernel code: usb: gadget: tegra-xudc: Always reinitialize data toggle when clear halt
Problem Details: The driver previously skipped handling ClearFeature(ENDPOINT_HALT) when the endpoint was already not halted. This prevented the controller from resetting the data sequence number and reinitializing the endpoint state. According to USB 3.2 specification Rev. 1.1, section 9.4.5, ClearFeature(ENDPOINT_HA...
```diff diff --git a/drivers/usb/gadget/udc/tegra-xudc.c b/drivers/usb/gadget/udc/tegra-xudc.c index 0c38fc37b6e6..9d2007f448c0 100644 --- a/drivers/usb/gadget/udc/tegra-xudc.c +++ b/drivers/usb/gadget/udc/tegra-xudc.c @@ -1558,12 +1558,6 @@ static int __tegra_xudc_ep_set_halt(struct tegra_xudc_ep *ep, bool halt) re...