id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
43cd4b634ef90c4e2ff75eaeb361786fa04c8874
Analyze and fix the following issue in the Linux kernel code: misc: rp1: Fix an error handling path in rp1_probe()
Problem Details: When DT is used to get the reference of 'rp1_node', it should be released when not needed anymore, otherwise it is leaking. In such a case, add the missing of_node_put() call at the end of the probe, as already done in the error handling path. Fixes: 49d63971f963 ("misc: rp1: RaspberryPi RP1 misc dri...
```diff diff --git a/drivers/misc/rp1/rp1_pci.c b/drivers/misc/rp1/rp1_pci.c index 803832006ec8..a342bcc6164b 100644 --- a/drivers/misc/rp1/rp1_pci.c +++ b/drivers/misc/rp1/rp1_pci.c @@ -289,6 +289,9 @@ static int rp1_probe(struct pci_dev *pdev, const struct pci_device_id *id) goto err_unload_overlay; } + if (sk...
05d36a5931d92310819e64fdee0cc1a35e14944c
Analyze and fix the following issue in the Linux kernel code: misc: cb710: Fix a NULL vs IS_ERR() check in probe()
Problem Details: The pcim_iomap_region() function never returns NULL, it returns error pointers. Update the checking to match. Fixes: b91c13534a63 ("misc: cb710: Replace deprecated PCI functions") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Link: https://patch.msgid...
```diff diff --git a/drivers/misc/cb710/core.c b/drivers/misc/cb710/core.c index a1e6ba62c298..2dd212f04fed 100644 --- a/drivers/misc/cb710/core.c +++ b/drivers/misc/cb710/core.c @@ -226,8 +226,8 @@ static int cb710_probe(struct pci_dev *pdev, spin_lock_init(&chip->irq_lock); chip->pdev = pdev; chip->iobase = pci...
f981264ae75e1fee75b7e3f87f4942142e590d01
Analyze and fix the following issue in the Linux kernel code: btrfs: fix the comment on btrfs_update_time
Problem Details: Since commit e41f941a2311 ("Btrfs: move over to use ->update_time") this is not a copy of the high-level file_update_time helper. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://patch.msgid.link/20251120064859.2911749-6-hch@lst.de Signed-off-by: Christian Brauner <brauner@kernel.org>
```diff diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 36c451a9a0bf..e74cf1712778 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -6291,8 +6291,8 @@ static int btrfs_dirty_inode(struct btrfs_inode *inode) } /* - * This is a copy of file_update_time. We need this so we can return error on - * ENOSPC...
ded99587047c7db44837cbbc56448dcdfdae04ae
Analyze and fix the following issue in the Linux kernel code: btrfs: use vfs_utimes to update file timestamps
Problem Details: Btrfs updates the device node timestamps for block device special files when it stop using the device. Commit 8f96a5bfa150 ("btrfs: update the bdev time directly when closing") switch that update from the correct layering to directly call the low-level helper on the bdev inode. This is wrong and got ...
```diff diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 2bec544d8ba3..259e8b0496df 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -2002,14 +2002,11 @@ out: static void update_dev_time(const char *device_path) { struct path path; - int ret; - ret = kern_path(device_path, LOOKUP_FOLLOW, &pat...
7f30e7a42371af4bba53f9a875a0d320cead9f4b
Analyze and fix the following issue in the Linux kernel code: fs: lift the FMODE_NOCMTIME check into file_update_time_flags
Problem Details: FMODE_NOCMTIME used to be just a hack for the legacy XFS handle-based "invisible I/O", but commit e5e9b24ab8fa ("nfsd: freeze c/mtime updates with outstanding WRITE_ATTRS delegation") started using it from generic callers. I'm not sure other file systems are actually read for this in general, so the a...
```diff diff --git a/fs/inode.c b/fs/inode.c index 4884ffa931e7..24dab63844db 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -2320,6 +2320,8 @@ static int file_update_time_flags(struct file *file, unsigned int flags) /* First try to exhaust all avenues to not sync */ if (IS_NOCMTIME(inode)) return 0; + if (unlikely...
e6df0f649cff08da7a2feb6d963b39076ca129f9
Analyze and fix the following issue in the Linux kernel code: greybus: gb-beagleplay: Fix timeout handling in bootloader functions
Problem Details: wait_for_completion_timeout() returns the remaining jiffies (at least 1) on success or 0 on timeout, but never negative error codes. The current code incorrectly checks for negative values, causing timeouts to be ignored and treated as success. Check for a zero return value to correctly identify and h...
```diff diff --git a/drivers/greybus/gb-beagleplay.c b/drivers/greybus/gb-beagleplay.c index 9610f878da1b..87186f891a6a 100644 --- a/drivers/greybus/gb-beagleplay.c +++ b/drivers/greybus/gb-beagleplay.c @@ -644,8 +644,8 @@ static int cc1352_bootloader_wait_for_ack(struct gb_beagleplay *bg) ret = wait_for_completion...
1c7e15b0e5b411589c6c5e3935f19f60bb52dd6c
Analyze and fix the following issue in the Linux kernel code: char/mwave: drop printk wrapper
Problem Details: PRINTK_ERROR() + KERN_ERR_MWAVE are just wrappers around printk() with a prefix. Instead, pr_fmt() can be used. Drop the former and use the latter. Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Link: https://patch.msgid.link/20251119091949.825958-6-jir...
```diff diff --git a/drivers/char/mwave/3780i.c b/drivers/char/mwave/3780i.c index 6024cf7d5705..a1bd9dd36d21 100644 --- a/drivers/char/mwave/3780i.c +++ b/drivers/char/mwave/3780i.c @@ -46,6 +46,8 @@ * First release to the public */ +#define pr_fmt(fmt) "3780i: " fmt + #include <linux/kernel.h> #include <linux/u...
9906efa545d1d2cf25a614eeb219d3f8d5a302cd
Analyze and fix the following issue in the Linux kernel code: firmware_loader: make RUST_FW_LOADER_ABSTRACTIONS select FW_LOADER
Problem Details: The use of firmware_loader is an implementation detail of drivers rather than a dependency. FW_LOADER is typically selected rather than depended on; the Rust abstractions should do the same thing. Fixes: de6582833db0 ("rust: add firmware abstractions") Signed-off-by: Alexandre Courbot <acourbot@nvidia...
```diff diff --git a/drivers/base/firmware_loader/Kconfig b/drivers/base/firmware_loader/Kconfig index 752b9a9bea03..15eff8a4b505 100644 --- a/drivers/base/firmware_loader/Kconfig +++ b/drivers/base/firmware_loader/Kconfig @@ -38,7 +38,7 @@ config FW_LOADER_DEBUG config RUST_FW_LOADER_ABSTRACTIONS bool "Rust Firmwar...
73b97d46dde64fa184d47865d4a532d818c3a007
Analyze and fix the following issue in the Linux kernel code: ASoC: fsl_xcvr: clear the channel status control memory
Problem Details: memset_io() writes memory byte by byte with __raw_writeb() on the arm platform if the size is word. but XCVR data RAM memory can't be accessed with byte address, so with memset_io() the channel status control memory is not really cleared, use writel_relaxed() instead. Fixes: 28564486866f ("ASoC: fsl_x...
```diff diff --git a/sound/soc/fsl/fsl_xcvr.c b/sound/soc/fsl/fsl_xcvr.c index 5d804860f7d8..58db4906a01d 100644 --- a/sound/soc/fsl/fsl_xcvr.c +++ b/sound/soc/fsl/fsl_xcvr.c @@ -1421,7 +1421,7 @@ static irqreturn_t irq0_isr(int irq, void *devid) bitrev32(val); } /* clear CS control register */ - me...
2cbcfd3fce6f80374bfab1288d1f77eabb0bf48f
Analyze and fix the following issue in the Linux kernel code: staging: rtl8723bs: remove dead commented code from odm.c
Problem Details: Remove obsolete commented-out code that references unsupported chip variants (ODM_RTL8723A, ODM_RTL8188E). This code has been dead since the driver was added to staging. Also fix the resulting formatting by removing the unnecessary outer parentheses and moving the inline comment to its own line. Sign...
```diff diff --git a/drivers/staging/rtl8723bs/hal/odm.c b/drivers/staging/rtl8723bs/hal/odm.c index 4b36af47f680..639b6da2302b 100644 --- a/drivers/staging/rtl8723bs/hal/odm.c +++ b/drivers/staging/rtl8723bs/hal/odm.c @@ -609,15 +609,12 @@ void ODM_DMWatchdog(struct dm_odm_t *pDM_Odm) /* 8723A or 8189ES platform */ ...
2402f958cf3b2e96975ad5fd14784a108b7defe3
Analyze and fix the following issue in the Linux kernel code: comedi: comedi_bond: Check for loops when bonding devices
Problem Details: The "comedi_bond" driver allows a composite COMEDI device to be built up from the subdevices of other COMEDI devices, although it currently only supports digital I/O subdevices. Although it checks that it is not trying to bind to itself, it is possible to end up with a cycle of "comedi_bond" devices b...
```diff diff --git a/drivers/comedi/drivers/comedi_bond.c b/drivers/comedi/drivers/comedi_bond.c index 78c39fa84177..30650fa36fff 100644 --- a/drivers/comedi/drivers/comedi_bond.c +++ b/drivers/comedi/drivers/comedi_bond.c @@ -205,7 +205,7 @@ static int do_dev_config(struct comedi_device *dev, struct comedi_devconfig *...
d1b3b9c70e11cb4f40b4e41a4dc1503b9a3c0109
Analyze and fix the following issue in the Linux kernel code: comedi: kcomedilib: Add loop checking variants of open and close
Problem Details: Add `comedi_open_from(path, from)` and `comedi_close_from(dev, from)` as variants of the existing `comedi_from(path)` and `comedi_close(dev)`. The additional `from` parameter is a minor device number that tells the function that the COMEDI device is being opened or closed from another COMEDI device if ...
```diff diff --git a/drivers/comedi/kcomedilib/kcomedilib_main.c b/drivers/comedi/kcomedilib/kcomedilib_main.c index 43fbe1a63b14..baa9eaaf97d4 100644 --- a/drivers/comedi/kcomedilib/kcomedilib_main.c +++ b/drivers/comedi/kcomedilib/kcomedilib_main.c @@ -15,6 +15,7 @@ #include <linux/fcntl.h> #include <linux/mm.h> #...
51495254fda43cf1027fe052a77bea742ca23a05
Analyze and fix the following issue in the Linux kernel code: comedi: Use reference count for asynchronous command functions
Problem Details: For interrupts from badly behaved hardware (as emulated by Syzbot), it is possible for the Comedi core functions that manage the progress of asynchronous data acquisition to be called from driver ISRs while no asynchronous command has been set up, which can cause problems such as invalid pointer derefe...
```diff diff --git a/drivers/comedi/comedi_buf.c b/drivers/comedi/comedi_buf.c index c7c262a2d8ca..785977b40a93 100644 --- a/drivers/comedi/comedi_buf.c +++ b/drivers/comedi/comedi_buf.c @@ -273,19 +273,8 @@ unsigned int comedi_buf_write_n_available(struct comedi_subdevice *s) return free_end - async->buf_write_count...
4e1da516debbe6a573ffa0392e2809d180d0575c
Analyze and fix the following issue in the Linux kernel code: comedi: Add reference counting for Comedi command handling
Problem Details: For interrupts from badly behaved hardware (as emulated by Syzbot), it is possible for the Comedi core functions that manage the progress of asynchronous data acquisition to be called from driver ISRs while no asynchronous command has been set up, which can cause problems such as invalid pointer derefe...
```diff diff --git a/drivers/comedi/comedi_fops.c b/drivers/comedi/comedi_fops.c index 40d8b29797ae..8253e4e8232b 100644 --- a/drivers/comedi/comedi_fops.c +++ b/drivers/comedi/comedi_fops.c @@ -38,6 +38,7 @@ * COMEDI_SRF_ERROR: indicates an COMEDI_CB_ERROR event has occurred * since the last command was starte...
a51f025b5038abd3d22eed2ede4cd46793d89565
Analyze and fix the following issue in the Linux kernel code: comedi: pcl818: fix null-ptr-deref in pcl818_ai_cancel()
Problem Details: Syzbot identified an issue [1] in pcl818_ai_cancel(), which stems from the fact that in case of early device detach via pcl818_detach(), subdevice dev->read_subdev may not have initialized its pointer to &struct comedi_async as intended. Thus, any such dereferencing of &s->async->cmd will lead to gener...
```diff diff --git a/drivers/comedi/drivers/pcl818.c b/drivers/comedi/drivers/pcl818.c index 4127adcfb229..06fe06396f23 100644 --- a/drivers/comedi/drivers/pcl818.c +++ b/drivers/comedi/drivers/pcl818.c @@ -1111,10 +1111,9 @@ static void pcl818_detach(struct comedi_device *dev) { struct pcl818_private *devpriv = dev...
f24c6e3a39fa355dabfb684c9ca82db579534e72
Analyze and fix the following issue in the Linux kernel code: comedi: multiq3: sanitize config options in multiq3_attach()
Problem Details: Syzbot identified an issue [1] in multiq3_attach() that induces a task timeout due to open() or COMEDI_DEVCONFIG ioctl operations, specifically, in the case of multiq3 driver. This problem arose when syzkaller managed to craft weird configuration options used to specify the number of channels in encod...
```diff diff --git a/drivers/comedi/drivers/multiq3.c b/drivers/comedi/drivers/multiq3.c index 07ff5383da99..ac369e9a262d 100644 --- a/drivers/comedi/drivers/multiq3.c +++ b/drivers/comedi/drivers/multiq3.c @@ -67,6 +67,11 @@ #define MULTIQ3_TRSFRCNTR_OL 0x10 /* xfer CNTR to OL (x and y) */ #define MULTIQ3_EFLAG_RES...
4cfc7d5a4a01d2133b278cdbb1371fba1b419174
Analyze and fix the following issue in the Linux kernel code: gfs2: fix freeze error handling
Problem Details: After commit b77b4a4815a9 ("gfs2: Rework freeze / thaw logic"), the freeze error handling is broken because gfs2_do_thaw() overwrites the 'error' variable, causing incorrect processing of the original freeze error. Fix this by calling gfs2_do_thaw() when gfs2_lock_fs_check_clean() fails but ignoring i...
```diff diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index 644b2d1e7276..54c6f2098f01 100644 --- a/fs/gfs2/super.c +++ b/fs/gfs2/super.c @@ -749,9 +749,7 @@ static int gfs2_freeze_super(struct super_block *sb, enum freeze_holder who, break; } - error = gfs2_do_thaw(sdp, who, freeze_owner); - if (error) - ...
0de7d9cd07a2671fa6089173bccc0b2afe6b93ee
Analyze and fix the following issue in the Linux kernel code: comedi: check device's attached status in compat ioctls
Problem Details: Syzbot identified an issue [1] that crashes kernel, seemingly due to unexistent callback dev->get_valid_routes(). By all means, this should not occur as said callback must always be set to get_zero_valid_routes() in __comedi_device_postconfig(). As the crash seems to appear exclusively in i386 kernels...
```diff diff --git a/drivers/comedi/comedi_fops.c b/drivers/comedi/comedi_fops.c index dea698e509b1..40d8b29797ae 100644 --- a/drivers/comedi/comedi_fops.c +++ b/drivers/comedi/comedi_fops.c @@ -3018,7 +3018,12 @@ static int compat_chaninfo(struct file *file, unsigned long arg) chaninfo.rangelist = compat_ptr(chaninf...
72262330f7b3ad2130e800cecf02adcce3c32c77
Analyze and fix the following issue in the Linux kernel code: comedi: c6xdigio: Fix invalid PNP driver unregistration
Problem Details: The Comedi low-level driver "c6xdigio" seems to be for a parallel port connected device. When the Comedi core calls the driver's Comedi "attach" handler `c6xdigio_attach()` to configure a Comedi to use this driver, it tries to enable the parallel port PNP resources by registering a PNP driver with `pn...
```diff diff --git a/drivers/comedi/drivers/c6xdigio.c b/drivers/comedi/drivers/c6xdigio.c index 14b90d1c64dc..8a38d97d463b 100644 --- a/drivers/comedi/drivers/c6xdigio.c +++ b/drivers/comedi/drivers/c6xdigio.c @@ -249,9 +249,6 @@ static int c6xdigio_attach(struct comedi_device *dev, if (ret) return ret; - /* M...
2c5f4a53476e3cab70adc77b38942c066bd2c17c
Analyze and fix the following issue in the Linux kernel code: gfs2: Prevent recursive memory reclaim
Problem Details: Function new_inode() returns a new inode with inode->i_mapping->gfp_mask set to GFP_HIGHUSER_MOVABLE. This value includes the __GFP_FS flag, so allocations in that address space can recurse into filesystem memory reclaim. We don't want that to happen because it can consume a significant amount of sta...
```diff diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index 938bda75a338..aeeef9c3a6b7 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -1211,10 +1211,13 @@ int gfs2_glock_get(struct gfs2_sbd *sdp, u64 number, mapping = gfs2_glock2aspace(gl); if (mapping) { + gfp_t gfp_mask; + mapping->a_o...
f0a40fe2fc2c07827dfcee5ab070f3fe30413ed5
Analyze and fix the following issue in the Linux kernel code: MAINTAINERS: Downgrade ocxl to Odd Fixes
Problem Details: There hasn't been any substantive work on the ocxl driver since 2020, and all patches since then have been minor fixes or part of treewide or arch-wide changes. Frederic and I are no longer spending much time on this driver. Downgrade the status of the ocxl driver to Odd Fixes, to reflect the current ...
```diff diff --git a/MAINTAINERS b/MAINTAINERS index 194ee22e2026..1fffce20d548 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -18794,7 +18794,7 @@ OCXL (Open Coherent Accelerator Processor Interface OpenCAPI) DRIVER M: Frederic Barrat <fbarrat@linux.ibm.com> M: Andrew Donnellan <ajd@linux.ibm.com> L: linuxppc-dev@li...
a6dab2f61d23c1eb32f1d08fa7b4919a2478950b
Analyze and fix the following issue in the Linux kernel code: mei: Fix error handling in mei_register
Problem Details: mei_register() fails to release the device reference in error paths after device_initialize(). During normal device registration, the reference is properly handled through mei_deregister() which calls device_destroy(). However, in error handling paths (such as cdev_alloc failure, cdev_add failure, etc....
```diff diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c index 86a73684a373..6f26d5160788 100644 --- a/drivers/misc/mei/main.c +++ b/drivers/misc/mei/main.c @@ -1307,6 +1307,7 @@ int mei_register(struct mei_device *dev, struct device *parent) err_del_cdev: cdev_del(dev->cdev); err: + put_device(&dev->...
5d92c3b41f0bddfa416130c6e1b424414f3d2acf
Analyze and fix the following issue in the Linux kernel code: mei: gsc: add dependency on Xe driver
Problem Details: INTEL_MEI_GSC depends on either i915 or Xe and can be present when either of above is present. Cc: stable <stable@kernel.org> Fixes: 87a4c85d3a3e ("drm/xe/gsc: add gsc device support") Tested-by: Baoli Zhang <baoli.zhang@intel.com> Signed-off-by: Junxiao Chang <junxiao.chang@intel.com> Signed-off-by: ...
```diff diff --git a/drivers/misc/mei/Kconfig b/drivers/misc/mei/Kconfig index f8b04e49e4ba..f4eb307cd35e 100644 --- a/drivers/misc/mei/Kconfig +++ b/drivers/misc/mei/Kconfig @@ -49,7 +49,7 @@ config INTEL_MEI_TXE config INTEL_MEI_GSC tristate "Intel MEI GSC embedded device" depends on INTEL_MEI_ME - depends on DR...
cd41d3420ef658b2ca902d7677536ec8e25b610a
Analyze and fix the following issue in the Linux kernel code: ASoC: nau8325: add missing build config
Problem Details: This configuration was missing from the initial commit. Found by Jiri Benc <jbenc@redhat.com> Fixes: c0a3873b9938 ("ASoC: nau8325: new driver") Cc: Seven Lee <wtli@nuvoton.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz> Link: https://patch.msgid.link/20251126091759.2490019-3-perex@perex.cz Signe...
```diff diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig index 433af9bc7564..4eb345cb29f0 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig @@ -171,6 +171,7 @@ config SND_SOC_ALL_CODECS imply SND_SOC_MT6359 imply SND_SOC_MT6660 imply SND_SOC_NAU8315 + imply SND_SOC_NAU8325 imp...
3dcf44ab56e1d3ca3532083c0d5390b758e45b45
Analyze and fix the following issue in the Linux kernel code: spi: tegra114: remove Kconfig dependency on TEGRA20_APB_DMA
Problem Details: This driver runs also on Tegra SoCs without a Tegra20 APB DMA controller (e.g. Tegra234). Remove the Kconfig dependency on TEGRA20_APB_DMA; in addition, amend the help text to reflect the fact that this driver works on SoCs different from Tegra114. Fixes: bb9667d8187b ("arm64: tegra: Add SPI device tr...
```diff diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index 4d8f00c850c1..55675750182e 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -1181,10 +1181,10 @@ config SPI_TEGRA210_QUAD config SPI_TEGRA114 tristate "NVIDIA Tegra114 SPI Controller" - depends on (ARCH_TEGRA && TEGRA20_APB_DMA) || C...
2c8ad5cfc22dba7d0b3b3ddfec0a75d8ea4169c3
Analyze and fix the following issue in the Linux kernel code: rust: list: add warning to List::remove docs about mem::take
Problem Details: The previous patches in this series illustrate why the List::remove method is really dangerous. I think the real takeaway here is to replace the linked lists with a different data structure without this unsafe footgun, but for now we fix the bugs and add a warning to the docs. Signed-off-by: Alice Ryh...
```diff diff --git a/rust/kernel/list.rs b/rust/kernel/list.rs index 7355bbac16a7..8349ff32fc37 100644 --- a/rust/kernel/list.rs +++ b/rust/kernel/list.rs @@ -576,6 +576,9 @@ impl<T: ?Sized + ListItem<ID>, const ID: u64> List<T, ID> { /// This returns `None` if the item is not in the list. (Note that by the safety...
6c37bebd8c926ad01ef157c0d123633a203e5c0d
Analyze and fix the following issue in the Linux kernel code: rust_binder: avoid mem::take on delivered_deaths
Problem Details: Similar to the previous commit, List::remove is used on delivered_deaths, so do not use mem::take on it as that may result in violations of the List::remove safety requirements. I don't think this particular case can be triggered because it requires fd close to run in parallel with an ioctl on the sam...
```diff diff --git a/drivers/android/binder/process.rs b/drivers/android/binder/process.rs index 27323070f30f..fd5dcdc8788c 100644 --- a/drivers/android/binder/process.rs +++ b/drivers/android/binder/process.rs @@ -1362,8 +1362,12 @@ impl Process { work.into_arc().cancel(); } - let delive...
3e0ae02ba831da2b707905f4e602e43f8507b8cc
Analyze and fix the following issue in the Linux kernel code: rust_binder: fix race condition on death_list
Problem Details: Rust Binder contains the following unsafe operation: // SAFETY: A `NodeDeath` is never inserted into the death list // of any node other than its owner, so it is either in this // death list or in no death list. unsafe { node_inner.death_list.remove(self) }; This operation is unsafe because when ...
```diff diff --git a/drivers/android/binder/node.rs b/drivers/android/binder/node.rs index 08d362deaf61..c26d113ede96 100644 --- a/drivers/android/binder/node.rs +++ b/drivers/android/binder/node.rs @@ -541,10 +541,10 @@ impl Node { guard = self.owner.inner.lock(); } - let death_list = co...
2bf95a9bcb50002ca9d47403d60aedaeb2e19abe
Analyze and fix the following issue in the Linux kernel code: serial: 8250: Fix 8250_rsa symbol loop
Problem Details: Depmod fails for a kernel made with: make allnoconfig echo -e "CONFIG_MODULES=y\nCONFIG_SERIAL_8250=m\nCONFIG_SERIAL_8250_EXTENDED=y\nCONFIG_SERIAL_8250_RSA=y" >> .config make olddefconfig ...due to a dependency loop: depmod: ERROR: Cycle detected: 8250 -> 8250_base -> 8250 depmod: ERROR: F...
```diff diff --git a/drivers/tty/serial/8250/8250.h b/drivers/tty/serial/8250/8250.h index 58e64c4e1e3a..e99f5193d8f1 100644 --- a/drivers/tty/serial/8250/8250.h +++ b/drivers/tty/serial/8250/8250.h @@ -322,13 +322,13 @@ static inline void serial8250_pnp_exit(void) { } #endif #ifdef CONFIG_SERIAL_8250_RSA -void uni...
75a9f4c54770f062f4b3813a83667452b326dda3
Analyze and fix the following issue in the Linux kernel code: serial: sh-sci: Fix deadlock during RSCI FIFO overrun error
Problem Details: On RSCI IP, a deadlock occurs during a FIFO overrun error, as it uses a different register to clear the FIFO overrun error status. Cc: stable@kernel.org Fixes: 0666e3fe95ab ("serial: sh-sci: Add support for RZ/T2H SCI") Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Geert Uytterhoev...
```diff diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index b28711eeab71..53edbf1d8963 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -1198,8 +1198,16 @@ static int sci_handle_fifo_overrun(struct uart_port *port) status = s->ops->read_reg(port, s->params->over...
a6cdfd69ad38997108b862f9aafc547891506701
Analyze and fix the following issue in the Linux kernel code: dt-bindings: serial: rsci: Drop "uart-has-rtscts: false"
Problem Details: Drop "uart-has-rtscts: false" from binding as the IP supports hardware flow control on all SoCs. Cc: stable@kernel.org Fixes: 25422e8f46c1 ("dt-bindings: serial: Add compatible for Renesas RZ/T2H SoC in sci") Acked-by: Conor Dooley <conor.dooley@microchip.com> Reviewed-by: Geert Uytterhoeven <geert+re...
```diff diff --git a/Documentation/devicetree/bindings/serial/renesas,rsci.yaml b/Documentation/devicetree/bindings/serial/renesas,rsci.yaml index f50d8e02f476..6b1f827a335b 100644 --- a/Documentation/devicetree/bindings/serial/renesas,rsci.yaml +++ b/Documentation/devicetree/bindings/serial/renesas,rsci.yaml @@ -54,8 ...
ab9a30d6febf768c057fcde74a46597862db443e
Analyze and fix the following issue in the Linux kernel code: serial: 8250: add driver for KEBA UART
Problem Details: The KEBA UART is found in the system FPGA of KEBA PLC devices. It is mostly 8250 compatible with extension for some UART modes. 3 different variants exist. The simpliest variant supports only RS-232 and is used for debug interfaces. The next variant supports only RS-485 and is used mostly for communic...
```diff diff --git a/drivers/tty/serial/8250/8250_keba.c b/drivers/tty/serial/8250/8250_keba.c new file mode 100644 index 000000000000..c05b89551b12 --- /dev/null +++ b/drivers/tty/serial/8250/8250_keba.c @@ -0,0 +1,280 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2025 KEBA Industrial Automation GmbH +...
d3210c8e88ee4132a5bb316ee96b09472db90572
Analyze and fix the following issue in the Linux kernel code: serial: 8250-of: Fix style issues in 8250_of.c
Problem Details: This patch resolves the warning "sizeof *port should be sizeof(*port)" detected by checkpatch.pl. Signed-off-by: jempty.liang <imntjempty@163.com> Link: https://patch.msgid.link/20251117034117.55588-1-imntjempty@163.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/tty/serial/8250/8250_of.c b/drivers/tty/serial/8250/8250_of.c index d178b6c54ea1..9799356b65f7 100644 --- a/drivers/tty/serial/8250/8250_of.c +++ b/drivers/tty/serial/8250/8250_of.c @@ -95,7 +95,7 @@ static int of_platform_serial_setup(struct platform_device *ofdev, u32 spd; int ret; ...
ae333a91006c7f13a921688546a09afa9bf05236
Analyze and fix the following issue in the Linux kernel code: serial: mux: Fix kernel doc for mux_poll()
Problem Details: The validator is not happy: Warning: drivers/tty/serial/mux.c:351 expecting prototype for mux_drv_poll(). Prototype was for mux_poll() instead Update the kernel-doc accordingly. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20251106113815.2302539-1...
```diff diff --git a/drivers/tty/serial/mux.c b/drivers/tty/serial/mux.c index b417faead20f..3a77a7e5c7bc 100644 --- a/drivers/tty/serial/mux.c +++ b/drivers/tty/serial/mux.c @@ -343,7 +343,7 @@ static int mux_verify_port(struct uart_port *port, struct serial_struct *ser) } /** - * mux_drv_poll - Mux poll function....
2b7a0f47aaf2439d517ba0a6b29c66a535302154
Analyze and fix the following issue in the Linux kernel code: usb: typec: ucsi: fix use-after-free caused by uec->work
Problem Details: The delayed work uec->work is scheduled in gaokun_ucsi_probe() but never properly canceled in gaokun_ucsi_remove(). This creates use-after-free scenarios where the ucsi and gaokun_ucsi structure are freed after ucsi_destroy() completes execution, while the gaokun_ucsi_register_worker() might be either ...
```diff diff --git a/drivers/usb/typec/ucsi/ucsi_huawei_gaokun.c b/drivers/usb/typec/ucsi/ucsi_huawei_gaokun.c index 8401ab414bd9..c5965656baba 100644 --- a/drivers/usb/typec/ucsi/ucsi_huawei_gaokun.c +++ b/drivers/usb/typec/ucsi/ucsi_huawei_gaokun.c @@ -503,6 +503,7 @@ static void gaokun_ucsi_remove(struct auxiliary_d...
6b120ef99fbcba9e413783561f8cc160719db589
Analyze and fix the following issue in the Linux kernel code: usb: typec: ucsi: fix probe failure in gaokun_ucsi_probe()
Problem Details: The gaokun_ucsi_probe() uses ucsi_create() to allocate a UCSI instance. The ucsi_create() validates whether ops->poll_cci is defined, and if not, it directly returns -EINVAL. However, the gaokun_ucsi_ops structure does not define the poll_cci, causing ucsi_create() always fail with -EINVAL. This issue ...
```diff diff --git a/drivers/usb/typec/ucsi/ucsi_huawei_gaokun.c b/drivers/usb/typec/ucsi/ucsi_huawei_gaokun.c index 7b5222081bbb..8401ab414bd9 100644 --- a/drivers/usb/typec/ucsi/ucsi_huawei_gaokun.c +++ b/drivers/usb/typec/ucsi/ucsi_huawei_gaokun.c @@ -196,6 +196,7 @@ static void gaokun_ucsi_connector_status(struct u...
c69ff68b097b0f53333114f1b2c3dc128f389596
Analyze and fix the following issue in the Linux kernel code: usb: phy: Initialize struct usb_phy list_head
Problem Details: As part of the registration of a new 'struct usb_phy' with the USB PHY core via either usb_add_phy(struct usb_phy *x, ...) or usb_add_phy_dev(struct usb_phy *x) these functions call list_add_tail(&x->head, phy_list) in order for the new instance x to be stored in phy_list, a static list kept internally...
```diff diff --git a/drivers/usb/phy/phy.c b/drivers/usb/phy/phy.c index e1435bc59662..5a9b9353f343 100644 --- a/drivers/usb/phy/phy.c +++ b/drivers/usb/phy/phy.c @@ -646,6 +646,8 @@ int usb_add_phy(struct usb_phy *x, enum usb_phy_type type) return -EINVAL; } + INIT_LIST_HEAD(&x->head); + usb_charger_init(x); ...
6f53bcb4fe66967fd4a82547062e2ae98058eea6
Analyze and fix the following issue in the Linux kernel code: drm/panthor: Reset queue slots if termination fails
Problem Details: Make sure the queue slot is reset even if we failed termination so we don't have garbage in the CS input interface after a reset. In practice that's not a problem because we zero out all RW sections when a hangs occurs, but it's safer to reset things manually, in case we decide to not conditionally rel...
```diff diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor/panthor_sched.c index 6fb3208efc05..b834123a6560 100644 --- a/drivers/gpu/drm/panthor/panthor_sched.c +++ b/drivers/gpu/drm/panthor/panthor_sched.c @@ -2841,13 +2841,23 @@ void panthor_sched_suspend(struct panthor_device *ptdev) w...
345c5b7cc0f85cc20e166f97ac2ff219add55707
Analyze and fix the following issue in the Linux kernel code: drm/panthor: Make the timeout per-queue instead of per-job
Problem Details: The timeout logic provided by drm_sched leads to races when we try to suspend it while the drm_sched workqueue queues more jobs. Let's overhaul the timeout handling in panthor to have our own delayed work that's resumed/suspended when a group is resumed/suspended. When an actual timeout occurs, we call...
```diff diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor/panthor_sched.c index 0012e7a1bf59..6fb3208efc05 100644 --- a/drivers/gpu/drm/panthor/panthor_sched.c +++ b/drivers/gpu/drm/panthor/panthor_sched.c @@ -364,17 +364,20 @@ struct panthor_queue { /** @name: DRM scheduler name for this...
8da059f2a497a2427150faae5adc3bb78e73b3e2
Analyze and fix the following issue in the Linux kernel code: fuse: Uninitialized variable in fuse_epoch_work()
Problem Details: The fuse_ilookup() function only sets *fm on the success path so this "if (fm) {" NULL check doesn't work. The "fm" pointer is either uninitialized or valid. Check the "inode" pointer instead. Also, while it's not necessary, it is cleaner to move the iput(inode) under the NULL check as well. Fixes:...
```diff diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index 963f53f394c6..2aec225740a0 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -199,9 +199,8 @@ void fuse_epoch_work(struct work_struct *work) down_read(&fc->killsb); inode = fuse_ilookup(fc, FUSE_ROOT_ID, &fm); - iput(inode); - - if (fm) { + if (inode) { + ...
95c39eef7c2b666026c69ab5b30471da94ea2874
Analyze and fix the following issue in the Linux kernel code: fuse: fix io-uring list corruption for terminated non-committed requests
Problem Details: When a request is terminated before it has been committed, the request is not removed from the queue's list. This leaves a dangling list entry that leads to list corruption and use-after-free issues. Remove the request from the queue's list for terminated non-committed requests. Signed-off-by: Joanne...
```diff diff --git a/fs/fuse/dev_uring.c b/fs/fuse/dev_uring.c index 0066c9c0a5d5..7760fe4e1f9e 100644 --- a/fs/fuse/dev_uring.c +++ b/fs/fuse/dev_uring.c @@ -86,6 +86,7 @@ static void fuse_uring_req_end(struct fuse_ring_ent *ent, struct fuse_req *req, lockdep_assert_not_held(&queue->lock); spin_lock(&queue->lock);...
18ac97e9de0f3198045a8230b9e9ce594eb368b8
Analyze and fix the following issue in the Linux kernel code: staging: rtl8723bs: core: fix block comment style issues
Problem Details: Fix the following checkpatch warnings for block comments: * Block comments should align the * on each line * Block comments use * on subsequent lines * Block comments use a trailing */ on a separate line No functional changes. Signed-off-by: Artur Stupa <arthur.stupa@gmail.com> Reviewed-by: Dan Carpe...
```diff diff --git a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c index 027b2dd0a4b9..10911a661223 100644 --- a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c +++ b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c @@ -132,9 +132,7 @@ u8 *rtw_set_ie(u8 *pbuf, return pbu...
760b8eec2cf861c5b013f62c4af8ee06c959853e
Analyze and fix the following issue in the Linux kernel code: soc: fsl: qbman: use kmalloc_array() instead of kmalloc()
Problem Details: Replace kmalloc() with kmalloc_array() to prevent potential overflow, as recommended in Documentation/process/deprecated.rst. Signed-off-by: Gongwei Li <ligongwei@kylinos.cn> Reviewed-by: Fushuai Wang <wangfushuai@baidu.com> Link: https://lore.kernel.org/r/20251121061022.114609-1-13875017792@163.com S...
```diff diff --git a/drivers/soc/fsl/qbman/qman_test_stash.c b/drivers/soc/fsl/qbman/qman_test_stash.c index 6f7597950aa3..6009e8b32c44 100644 --- a/drivers/soc/fsl/qbman/qman_test_stash.c +++ b/drivers/soc/fsl/qbman/qman_test_stash.c @@ -219,7 +219,7 @@ static int allocate_frame_data(void) pcfg = qman_get_qm_porta...
1c93edfd506ccaf9e9982dfdafc91cd2d444ad63
Analyze and fix the following issue in the Linux kernel code: s390/entry: Use lay instead of aghik
Problem Details: Use the lay instruction instead of aghik. aghik is only available since z196, therefore compiling the kernel for z10 results in this error: arch/s390/kernel/entry.S: Assembler messages: arch/s390/kernel/entry.S:165: Error: Unrecognized opcode: `aghik' Reported-by: kernel test robot <lkp@intel.c...
```diff diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S index 24cc33e668ea..c360087807d8 100644 --- a/arch/s390/kernel/entry.S +++ b/arch/s390/kernel/entry.S @@ -162,7 +162,7 @@ SYM_FUNC_START(__switch_to_asm) stg %r3,__LC_CURRENT(%r13) # store task struct of next stg %r15,__LC_KERNEL_STACK(%r13) ...
922682d48d628c6c5540da2eb5481f7f7694ce48
Analyze and fix the following issue in the Linux kernel code: drm/gem: Correct error condition in drm_gem_objects_lookup
Problem Details: When vmemdup_array_user() fails, 'handles' is set to a negative error code and no memory is allocated. So the call to kvfree() should not happen. Instead just return early with the error code. Fixes: cb77b79abf5f ("drm/gem: Use vmemdup_array_user in drm_gem_objects_lookup") Signed-off-by: Steven Price...
```diff diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c index 68168d58a7c8..efc79bbf3c73 100644 --- a/drivers/gpu/drm/drm_gem.c +++ b/drivers/gpu/drm/drm_gem.c @@ -798,13 +798,10 @@ int drm_gem_objects_lookup(struct drm_file *filp, void __user *bo_handles, *objs_out = objs; handles = vmemdup_ar...
c7ce6453b769c45006ed4983762f81e130878171
Analyze and fix the following issue in the Linux kernel code: mmc: sdhci-of-dwcmshc: Disable internal clock auto gate for Rockchip SOCs
Problem Details: Enabling CMDQ support can lead to random occurrences of the error log when there are RPMB access and data flush executed: "mmc2: Timeout waiting for hardware interrupt." Enabling CMDQ and then issuing a DCMD as the final command before disabling it causes the eMMC controller to auto-gate its internal...
```diff diff --git a/drivers/mmc/host/sdhci-of-dwcmshc.c b/drivers/mmc/host/sdhci-of-dwcmshc.c index 498997c8648f..36e7c0bec431 100644 --- a/drivers/mmc/host/sdhci-of-dwcmshc.c +++ b/drivers/mmc/host/sdhci-of-dwcmshc.c @@ -726,10 +726,11 @@ static void dwcmshc_rk3568_set_clock(struct sdhci_host *host, unsigned int cloc...
9aea35eb98a6560daf85a2ae9cbd482a66e4d076
Analyze and fix the following issue in the Linux kernel code: dt-bindings: can: mpfs: document resets
Problem Details: The CAN cores on Polarfire SoC both have a reset. The platform firmware brings both cores out of reset, but the linux driver must use them during normal operation. The resets should have been made required, but this is one of the things that can happen when the binding is written without driver support...
```diff diff --git a/Documentation/devicetree/bindings/net/can/microchip,mpfs-can.yaml b/Documentation/devicetree/bindings/net/can/microchip,mpfs-can.yaml index 1219c5cb601f..519a11fbe972 100644 --- a/Documentation/devicetree/bindings/net/can/microchip,mpfs-can.yaml +++ b/Documentation/devicetree/bindings/net/can/micro...
6a2416892e8942f5e2bfe9b85c0164f410a53a2d
Analyze and fix the following issue in the Linux kernel code: clocksource/drivers/nxp-stm: Prevent driver unbind
Problem Details: Clockevents cannot be deregistered so suppress the bind attributes to prevent the driver from being unbound and releasing the underlying resources after registration. Even if the driver can currently only be built-in, also switch to builtin_platform_driver() to prevent it from being unloaded should mo...
```diff diff --git a/drivers/clocksource/timer-nxp-stm.c b/drivers/clocksource/timer-nxp-stm.c index c320d764b12e..1ab907233f48 100644 --- a/drivers/clocksource/timer-nxp-stm.c +++ b/drivers/clocksource/timer-nxp-stm.c @@ -487,9 +487,10 @@ static struct platform_driver nxp_stm_driver = { .driver = { .name = "nxp-...
e25f964cf414dafa6bee5c9c2c0b1d1fb041dc92
Analyze and fix the following issue in the Linux kernel code: clocksource/drivers/nxp-pit: Prevent driver unbind
Problem Details: The driver does not support unbinding (e.g. as clockevents cannot be deregistered) so suppress the bind attributes to prevent the driver from being unbound and rebound after registration (and disabling the timer when reprobing fails). Even if the driver can currently only be built-in, also switch to b...
```diff diff --git a/drivers/clocksource/timer-nxp-pit.c b/drivers/clocksource/timer-nxp-pit.c index 2d0a3554b6bf..d1740f18f718 100644 --- a/drivers/clocksource/timer-nxp-pit.c +++ b/drivers/clocksource/timer-nxp-pit.c @@ -374,9 +374,10 @@ static struct platform_driver nxp_pit_driver = { .driver = { .name = "nxp-p...
6aa10f0e2ef9eba1955be6a9d0a8eaecf6bdb7ae
Analyze and fix the following issue in the Linux kernel code: clocksource/drivers/arm_arch_timer_mmio: Prevent driver unbind
Problem Details: Clockevents cannot be deregistered so suppress the bind attributes to prevent the driver from being unbound and releasing the underlying resources after registration. Fixes: 4891f01527bb ("clocksource/drivers/arm_arch_timer: Add standalone MMIO driver") Signed-off-by: Johan Hovold <johan@kernel.org> S...
```diff diff --git a/drivers/clocksource/arm_arch_timer_mmio.c b/drivers/clocksource/arm_arch_timer_mmio.c index ebe1987d651e..d10362692fdd 100644 --- a/drivers/clocksource/arm_arch_timer_mmio.c +++ b/drivers/clocksource/arm_arch_timer_mmio.c @@ -426,6 +426,7 @@ static struct platform_driver arch_timer_mmio_drv = { ....
b452d2c97eeccbf9c7ac5b3d2d9e80bf6d8a23db
Analyze and fix the following issue in the Linux kernel code: clocksource/drivers/nxp-stm: Fix section mismatches
Problem Details: Platform drivers can be probed after their init sections have been discarded (e.g. on probe deferral or manual rebind through sysfs) so the probe function must not live in init. Device managed resource actions similarly cannot be discarded. The "_probe" suffix of the driver structure name prevents mod...
```diff diff --git a/drivers/clocksource/timer-nxp-stm.c b/drivers/clocksource/timer-nxp-stm.c index 16d52167e949..c320d764b12e 100644 --- a/drivers/clocksource/timer-nxp-stm.c +++ b/drivers/clocksource/timer-nxp-stm.c @@ -177,15 +177,15 @@ static void nxp_stm_clocksource_resume(struct clocksource *cs) nxp_stm_clocks...
62524f285c11d6e6168ad31b586143755b27b2e5
Analyze and fix the following issue in the Linux kernel code: clocksource/drivers/sh_cmt: Always leave device running after probe
Problem Details: The CMT device can be used as both a clocksource and a clockevent provider. The driver tries to be smart and power itself on and off, as well as enabling and disabling its clock when it's not in operation. This behavior is slightly altered if the CMT is used as an early platform device in which case th...
```diff diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c index 385eb94bbe7c..791b298c995b 100644 --- a/drivers/clocksource/sh_cmt.c +++ b/drivers/clocksource/sh_cmt.c @@ -355,14 +355,6 @@ static int sh_cmt_enable(struct sh_cmt_channel *ch) dev_pm_syscore_device(&ch->cmt->pdev->dev, true); ...
6b38a8b31e2c5c2c3fd5f9848850788c190f216d
Analyze and fix the following issue in the Linux kernel code: clocksource/drivers/stm: Fix double deregistration on probe failure
Problem Details: The purpose of the devm_add_action_or_reset() helper is to call the action function in case adding an action ever fails so drop the clock source deregistration from the error path to avoid deregistering twice. Fixes: cec32ac75827 ("clocksource/drivers/nxp-timer: Add the System Timer Module for the s32...
```diff diff --git a/drivers/clocksource/timer-nxp-stm.c b/drivers/clocksource/timer-nxp-stm.c index bbc40623728f..16d52167e949 100644 --- a/drivers/clocksource/timer-nxp-stm.c +++ b/drivers/clocksource/timer-nxp-stm.c @@ -208,10 +208,8 @@ static int __init nxp_stm_clocksource_init(struct device *dev, struct stm_timer ...
2ba8e2aae1324704565a7d4d66f199d056c9e3c6
Analyze and fix the following issue in the Linux kernel code: clocksource/drivers/ralink: Fix resource leaks in init error path
Problem Details: The ralink_systick_init() function does not release all acquired resources on its error paths. If irq_of_parse_and_map() or a subsequent call fails, the previously created I/O memory mapping and IRQ mapping are leaked. Add goto-based error handling labels to ensure that all allocated resources are cor...
```diff diff --git a/drivers/clocksource/timer-ralink.c b/drivers/clocksource/timer-ralink.c index 6ecdb4228f76..68434d9ed910 100644 --- a/drivers/clocksource/timer-ralink.c +++ b/drivers/clocksource/timer-ralink.c @@ -130,14 +130,15 @@ static int __init ralink_systick_init(struct device_node *np) systick.dev.irq = i...
640594a04f119338019b0aeed70c7301216595b3
Analyze and fix the following issue in the Linux kernel code: clocksource/drivers/timer-sp804: Fix read_current_timer() issue when clock source is not registered
Problem Details: Register a valid read_current_timer() function for the SP804 timer on ARM32. On ARM32 platforms, when the SP804 timer is selected as the clocksource, the driver does not register a valid read_current_timer() function. As a result, features that rely on this API—such as rdseed—consistently return incor...
```diff diff --git a/drivers/clocksource/timer-sp804.c b/drivers/clocksource/timer-sp804.c index cd1916c05325..e82a95ea4724 100644 --- a/drivers/clocksource/timer-sp804.c +++ b/drivers/clocksource/timer-sp804.c @@ -21,6 +21,10 @@ #include <linux/of_irq.h> #include <linux/sched_clock.h> +#ifdef CONFIG_ARM +#include ...
3a34330f6339641b7f5b76b066385f56c114490f
Analyze and fix the following issue in the Linux kernel code: can: rcar_canfd: Add suspend/resume support
Problem Details: On R-Car Gen3 using PSCI, s2ram powers down the SoC. After resume, the CAN-FD interface no longer works. Trying to bring it up again fails: # ip link set can0 up RTNETLINK answers: Connection timed out # dmesg ... channel 0 communication state failed Fix this by populating the ...
```diff diff --git a/drivers/net/can/rcar/rcar_canfd.c b/drivers/net/can/rcar/rcar_canfd.c index 1d6b2f7efa8c..ce75948e6af6 100644 --- a/drivers/net/can/rcar/rcar_canfd.c +++ b/drivers/net/can/rcar/rcar_canfd.c @@ -2257,11 +2257,64 @@ static void rcar_canfd_remove(struct platform_device *pdev) static int rcar_canfd_...
816cf430e84b4628dba665491e78ce081a468fcb
Analyze and fix the following issue in the Linux kernel code: can: add dummy_can driver
Problem Details: During the development of CAN XL, we found the need of creating a dummy CAN XL driver in order to test the new netlink interface. While this code was initially intended to be some throwaway, it received some positive feedback. Add the dummy_can driver. This driver acts similarly to the vcan interface ...
```diff diff --git a/drivers/net/can/Kconfig b/drivers/net/can/Kconfig index d43d56694667..e15e320db476 100644 --- a/drivers/net/can/Kconfig +++ b/drivers/net/can/Kconfig @@ -124,6 +124,23 @@ config CAN_CAN327 If this driver is built as a module, it will be called can327. +config CAN_DUMMY + tristate "Dummy CAN...
ce04ec03a9c2c4f3e60e26f21311b25d5a478208
Analyze and fix the following issue in the Linux kernel code: drm/panthor: Avoid adding of kernel BOs to extobj list
Problem Details: The kernel BOs unnecessarily got added to the external objects list of drm_gpuvm, when mapping to GPU, which would have resulted in few extra CPU cycles being spent at the time of job submission as drm_exec_until_all_locked() loop iterates over all external objects. Kernel BOs are private to a VM and ...
```diff diff --git a/drivers/gpu/drm/panthor/panthor_gem.c b/drivers/gpu/drm/panthor/panthor_gem.c index f369cc3e2a5f..10d255cccc09 100644 --- a/drivers/gpu/drm/panthor/panthor_gem.c +++ b/drivers/gpu/drm/panthor/panthor_gem.c @@ -145,6 +145,9 @@ panthor_kernel_bo_create(struct panthor_device *ptdev, struct panthor_vm ...
a7ab6f946683e065fa22db1cc2f2748d4584178a
Analyze and fix the following issue in the Linux kernel code: arm64: dts: amlogic: meson-g12b: Fix L2 cache reference for S922X CPUs
Problem Details: The original addition of cache information for the Amlogic S922X SoC used the wrong next-level cache node for CPU cores 100 and 101, incorrectly referencing `l2_cache_l`. These cores actually belong to the big cluster and should reference `l2_cache_b`. Update the device tree accordingly. Fixes: e7f85e...
```diff diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b.dtsi index f04efa828256..23358d94844c 100644 --- a/arch/arm64/boot/dts/amlogic/meson-g12b.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-g12b.dtsi @@ -87,7 +87,7 @@ i-cache-line-size = <32>; i-cache-size = <0...
032f2b83a6cf9e82721553401012062e9a18884d
Analyze and fix the following issue in the Linux kernel code: arm64: dts: amlogic: Fix the register name of the 'DBI' region
Problem Details: DT incorrectly specifies the 'DBI' region as 'ELBI'. DBI is a must have region for DWC controllers as it has the Root Port and controller specific registers, while ELBI has optional registers. Hence, fix the DT for both Meson platforms. Cc: stable+noautosel@kernel.org # Driver dependency Fixes: 5b3a9...
```diff diff --git a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi index 04fb130ac7c6..e95c91894968 100644 --- a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi @@ -208,7 +208,7 @@ reg = <0x0 0xf9800000 0x0 0x400000>, <0...
f37e2868792335f2e8bbdcc02ebbb4830453f83c
Analyze and fix the following issue in the Linux kernel code: RDMA/core: Reduce cond_resched() frequency in __ib_umem_release
Problem Details: The current implementation calls cond_resched() for every SG entry in __ib_umem_release(), which can increase needless overhead. This patch introduces RESCHED_LOOP_CNT_THRESHOLD (0x1000) to limit how often cond_resched() is called. The function now yields the CPU once every 4096 iterations, and yield ...
```diff diff --git a/drivers/infiniband/core/umem.c b/drivers/infiniband/core/umem.c index 8fd84aa37289..8137031c2a65 100644 --- a/drivers/infiniband/core/umem.c +++ b/drivers/infiniband/core/umem.c @@ -45,6 +45,8 @@ #include "uverbs.h" +#define RESCHED_LOOP_CNT_THRESHOLD 0x1000 + static void __ib_umem_release(st...
01dad9ca37c60d08f71e2ef639875ae895deede6
Analyze and fix the following issue in the Linux kernel code: RDMA/irdma: Fix SRQ shadow area address initialization
Problem Details: Fix SRQ shadow area address initialization. Fixes: 563e1feb5f6e ("RDMA/irdma: Add SRQ support") Signed-off-by: Jijun Wang <jijun.wang@intel.com> Signed-off-by: Jay Bhat <jay.bhat@intel.com> Link: https://patch.msgid.link/20251125025350.180-10-tatyana.e.nikolova@intel.com Signed-off-by: Leon Romanovsky...
```diff diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c index 9093d3e962ae..435da34dfaa7 100644 --- a/drivers/infiniband/hw/irdma/verbs.c +++ b/drivers/infiniband/hw/irdma/verbs.c @@ -2311,8 +2311,8 @@ static int irdma_setup_kmode_srq(struct irdma_device *iwdev, ukinfo->srq_size...
62356fccb195f83d2ceafc787c5ba87ebbe5edfe
Analyze and fix the following issue in the Linux kernel code: RDMA/irdma: Remove doorbell elision logic
Problem Details: In some cases, this logic can result in doorbell writes being skipped when they should not have been (at least on GEN3 HW), so remove it. This also means that the mb() can be safely downgraded to dma_wmb(). Fixes: 551c46edc769 ("RDMA/irdma: Add user/kernel shared libraries") Signed-off-by: Jacob Moron...
```diff diff --git a/drivers/infiniband/hw/irdma/puda.c b/drivers/infiniband/hw/irdma/puda.c index 3c29e2289322..cee47ddbd1b5 100644 --- a/drivers/infiniband/hw/irdma/puda.c +++ b/drivers/infiniband/hw/irdma/puda.c @@ -685,7 +685,6 @@ static int irdma_puda_qp_create(struct irdma_puda_rsrc *rsrc) ukqp->rq_size = rsrc-...
eef3ad030b08c0f100cb18de7f604442a1adb8c7
Analyze and fix the following issue in the Linux kernel code: RDMA/irdma: Do not set IBK_LOCAL_DMA_LKEY for GEN3+
Problem Details: The GEN3 hardware does not appear to support IBK_LOCAL_DMA_LKEY. Attempts to use it will result in an AE. Fixes: eb31dfc2b41a ("RDMA/irdma: Restrict Memory Window and CQE Timestamping to GEN3") Signed-off-by: Jacob Moroni <jmoroni@google.com> Signed-off-by: Tatyana Nikolova <tatyana.e.nikolova@intel.c...
```diff diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c index bfbfde16bcb9..9093d3e962ae 100644 --- a/drivers/infiniband/hw/irdma/verbs.c +++ b/drivers/infiniband/hw/irdma/verbs.c @@ -27,7 +27,8 @@ static int irdma_query_device(struct ib_device *ibdev, irdma_fw_minor_ver(&rf->...
71d3bdae5eab21cf8991a6f3cd914caa31d5a51f
Analyze and fix the following issue in the Linux kernel code: RDMA/irdma: Do not directly rely on IB_PD_UNSAFE_GLOBAL_RKEY
Problem Details: The HW disables bounds checking for MRs with a length of zero, so the driver will only allow a zero length MR if the "all_memory" flag is set, and this flag is only set if IB_PD_UNSAFE_GLOBAL_RKEY is set for the PD. This means that the "get_dma_mr" method will currently fail unless the IB_PD_UNSAFE_GL...
```diff diff --git a/drivers/infiniband/hw/irdma/cm.c b/drivers/infiniband/hw/irdma/cm.c index c6a0a661d6e7..f4f4f92ba63a 100644 --- a/drivers/infiniband/hw/irdma/cm.c +++ b/drivers/infiniband/hw/irdma/cm.c @@ -3710,7 +3710,7 @@ int irdma_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) iwpd = iwqp...
35bd787babd1f5a42641d0b1513edbed5d4e1624
Analyze and fix the following issue in the Linux kernel code: RDMA/irdma: Add missing mutex destroy
Problem Details: Add missing destroy of ah_tbl_lock and vchnl_mutex. Fixes: d5edd33364a5 ("RDMA/irdma: RDMA/irdma: Add GEN3 core driver support") Signed-off-by: Anil Samal <anil.samal@intel.com> Signed-off-by: Krzysztof Czurylo <krzysztof.czurylo@intel.com> Signed-off-by: Tatyana Nikolova <tatyana.e.nikolova@intel.com...
```diff diff --git a/drivers/infiniband/hw/irdma/icrdma_if.c b/drivers/infiniband/hw/irdma/icrdma_if.c index 5d3fd118e4f8..b49fd9cf2476 100644 --- a/drivers/infiniband/hw/irdma/icrdma_if.c +++ b/drivers/infiniband/hw/irdma/icrdma_if.c @@ -302,7 +302,8 @@ err_rt_init: err_ctrl_init: icrdma_deinit_interrupts(rf, cdev_...
5eff1ecce30143c3f8924d91770d81d44bd5abe5
Analyze and fix the following issue in the Linux kernel code: RDMA/irdma: Fix SIGBUS in AEQ destroy
Problem Details: Removes write to IRDMA_PFINT_AEQCTL register prior to destroying AEQ, as this register does not exist in GEN3+ hardware and this kind of IRQ configuration is no longer required. Fixes: b800e82feba7 ("RDMA/irdma: Add GEN3 support for AEQ and CEQ") Signed-off-by: Krzysztof Czurylo <krzysztof.czurylo@int...
```diff diff --git a/drivers/infiniband/hw/irdma/ctrl.c b/drivers/infiniband/hw/irdma/ctrl.c index c17b1c14dfe2..ce5cf89c463c 100644 --- a/drivers/infiniband/hw/irdma/ctrl.c +++ b/drivers/infiniband/hw/irdma/ctrl.c @@ -4635,7 +4635,8 @@ static int irdma_sc_aeq_destroy(struct irdma_sc_aeq *aeq, u64 scratch, u64 hdr; ...
9e13d880ebae5da9b39ef2ed83a89737e927173f
Analyze and fix the following issue in the Linux kernel code: RDMA/irdma: Add a missing kfree of struct irdma_pci_f for GEN2
Problem Details: During a refactor of the irdma GEN2 code, the kfree of the irdma_pci_f struct in icrdma_remove(), which was originally introduced upstream as part of commit 80f2ab46c2ee ("irdma: free iwdev->rf after removing MSI-X") was accidentally removed. Fixes: 0c2b80cac96e ("RDMA/irdma: Refactor GEN2 auxiliary d...
```diff diff --git a/drivers/infiniband/hw/irdma/icrdma_if.c b/drivers/infiniband/hw/irdma/icrdma_if.c index 27b191f61caf..5d3fd118e4f8 100644 --- a/drivers/infiniband/hw/irdma/icrdma_if.c +++ b/drivers/infiniband/hw/irdma/icrdma_if.c @@ -320,6 +320,8 @@ static void icrdma_remove(struct auxiliary_device *aux_dev) ird...
81f44409fb4f027d1e6d54edbeba5156ad94b214
Analyze and fix the following issue in the Linux kernel code: RDMA/irdma: Fix data race in irdma_free_pble
Problem Details: Protects pble_rsrc counters with mutex to prevent data race. Fixes the following data race in irdma_free_pble reported by KCSAN: BUG: KCSAN: data-race in irdma_free_pble [irdma] / irdma_free_pble [irdma] write to 0xffff91430baa0078 of 8 bytes by task 16956 on cpu 5: irdma_free_pble+0x3b/0xb0 [irdma]...
```diff diff --git a/drivers/infiniband/hw/irdma/pble.c b/drivers/infiniband/hw/irdma/pble.c index 3091f9345f12..4a20ec891059 100644 --- a/drivers/infiniband/hw/irdma/pble.c +++ b/drivers/infiniband/hw/irdma/pble.c @@ -506,12 +506,14 @@ exit: void irdma_free_pble(struct irdma_hmc_pble_rsrc *pble_rsrc, struct i...
a521928164433de44fed5aaf5f49aeb3f1fb96f5
Analyze and fix the following issue in the Linux kernel code: RDMA/irdma: Fix data race in irdma_sc_ccq_arm
Problem Details: Adds a lock around irdma_sc_ccq_arm body to prevent inter-thread data race. Fixes data race in irdma_sc_ccq_arm() reported by KCSAN: BUG: KCSAN: data-race in irdma_sc_ccq_arm [irdma] / irdma_sc_ccq_arm [irdma] read to 0xffff9d51b4034220 of 8 bytes by task 255 on cpu 11: irdma_sc_ccq_arm+0x36/0xd0 [i...
```diff diff --git a/drivers/infiniband/hw/irdma/ctrl.c b/drivers/infiniband/hw/irdma/ctrl.c index 57bf6815e71e..c17b1c14dfe2 100644 --- a/drivers/infiniband/hw/irdma/ctrl.c +++ b/drivers/infiniband/hw/irdma/ctrl.c @@ -3868,11 +3868,13 @@ int irdma_sc_cqp_destroy(struct irdma_sc_cqp *cqp) */ void irdma_sc_ccq_arm(st...
64d67e7add109bfc54eac454558a4355af879ba7
Analyze and fix the following issue in the Linux kernel code: KVM: arm64: Convert ICH_HCR_EL2_TDIR cap to EARLY_LOCAL_CPU_FEATURE
Problem Details: Suzuki notices that making the ICH_HCR_EL2_TDIR capability a system one isn't a very good idea, should we end-up with CPUs that have asymmetric TDIR support (somehow unlikely, but you never know what level of stupidity vendors are up to). For this hypothetical setup, making this an "EARLY_LOCAL_CPU_FEA...
```diff diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c index 5de51cb1b8fe..75fb9a0efcc8 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -2325,14 +2325,14 @@ static bool can_trap_icv_dir_el1(const struct arm64_cpu_capabilities *entry, BUILD_BUG_ON(ARM...
d9600d57668c49308f705a660c5ad17fa3a53f73
Analyze and fix the following issue in the Linux kernel code: PM / devfreq: Fix typo in DFSO_DOWNDIFFERENTIAL macro name
Problem Details: Correct the spelling error in the DFSO_DOWNDIFFERENTIAL macro definition and update the corresponding variable assignment. The macro was previously misspelled as DFSO_DOWNDIFFERENCTIAL. This change ensures consistent and correct spelling throughout the simpleondemand governor implementation. Signed-o...
```diff diff --git a/drivers/devfreq/governor_simpleondemand.c b/drivers/devfreq/governor_simpleondemand.c index 9c69b96df5f9..ac9c5e9e51a4 100644 --- a/drivers/devfreq/governor_simpleondemand.c +++ b/drivers/devfreq/governor_simpleondemand.c @@ -14,7 +14,7 @@ /* Default constants for DevFreq-Simple-Ondemand (DFSO) ...
0ebc27a4c67d44e5ce88d21cdad8201862b78837
Analyze and fix the following issue in the Linux kernel code: xsk: avoid data corruption on cq descriptor number
Problem Details: Since commit 30f241fcf52a ("xsk: Fix immature cq descriptor production"), the descriptor number is stored in skb control block and xsk_cq_submit_addr_locked() relies on it to put the umem addrs onto pool's completion queue. skb control block shouldn't be used for this purpose as after transmit xsk doe...
```diff diff --git a/net/xdp/xsk.c b/net/xdp/xsk.c index 7b0c68a70888..69bbcca8ac75 100644 --- a/net/xdp/xsk.c +++ b/net/xdp/xsk.c @@ -36,20 +36,13 @@ #define TX_BATCH_SIZE 32 #define MAX_PER_SOCKET_BUDGET 32 -struct xsk_addr_node { - u64 addr; - struct list_head addr_node; -}; - -struct xsk_addr_head { +struct xsk...
436fa8e7d1a119ec90f39e7c2ce0f3a146652899
Analyze and fix the following issue in the Linux kernel code: ice: fix broken Rx on VFs
Problem Details: Since the tagged commit, ice stopped respecting Rx buffer length passed from VFs. At that point, the buffer length was hardcoded in ice, so VFs still worked up to some point (until, for example, a VF wanted an MTU larger than its PF). The next commit 93f53db9f9dc ("ice: switch to Page Pool"), broke Rx ...
```diff diff --git a/drivers/net/ethernet/intel/ice/virt/queues.c b/drivers/net/ethernet/intel/ice/virt/queues.c index 7928f4e8e788..f73d5a3e83d4 100644 --- a/drivers/net/ethernet/intel/ice/virt/queues.c +++ b/drivers/net/ethernet/intel/ice/virt/queues.c @@ -842,6 +842,9 @@ int ice_vc_cfg_qs_msg(struct ice_vf *vf, u8 *...
d696c73716147cb3158f1da1b89d7e75af3aa285
Analyze and fix the following issue in the Linux kernel code: chtls: Avoid -Wflex-array-member-not-at-end warning
Problem Details: -Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. Use the `DEFINE_RAW_FLEX()` helper for on-stack definitions of a flexible structure where the size of the flexible-array member is known at compile-time, and refactor the rest of the code, accordi...
```diff diff --git a/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c b/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c index 4036db466e18..ee19933e2cca 100644 --- a/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c +++ b/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c @@ -1...
17fa6ee35bd4b78752a2d33b92614a1c230a1ced
Analyze and fix the following issue in the Linux kernel code: tools: ynl-gen: add function prefix argument
Problem Details: This patch adds a new CLI argument for overriding the default function prefix, as used for naming the doit/dumpit functions in the generated kernel code. When not specified the default "$(FAMILY)-nl" is used. This can also be specified persistently in generated files: /* YNL-ARG --function-prefix w...
```diff diff --git a/tools/net/ynl/pyynl/ynl_gen_c.py b/tools/net/ynl/pyynl/ynl_gen_c.py index aadeb3abcad8..0dd589e502cb 100755 --- a/tools/net/ynl/pyynl/ynl_gen_c.py +++ b/tools/net/ynl/pyynl/ynl_gen_c.py @@ -1205,7 +1205,7 @@ class SubMessage(SpecSubMessage): class Family(SpecFamily): - def __init__(self, fi...
622cc66ed72c2da2294de21da5976a087bcc5748
Analyze and fix the following issue in the Linux kernel code: ptp: ocp: Refactor signal_show() and fix %ptT misuse
Problem Details: Refactor signal_show() to avoid sequential calls to sysfs_emit*() and use the same pattern to get the index of a signal as it's done in signal_store(). While at it, fix wrong use of %ptT against struct timespec64. It's kinda lucky that it worked just because the first member there 64-bit and it's of t...
```diff diff --git a/drivers/ptp/ptp_ocp.c b/drivers/ptp/ptp_ocp.c index eeebe4d149f7..95889f85ffb2 100644 --- a/drivers/ptp/ptp_ocp.c +++ b/drivers/ptp/ptp_ocp.c @@ -3250,20 +3250,16 @@ signal_show(struct device *dev, struct device_attribute *attr, char *buf) struct dev_ext_attribute *ea = to_ext_attr(attr); struc...
b796632fc83c8f9e0d97443f4f389ef9dddadb11
Analyze and fix the following issue in the Linux kernel code: vsock/test: Extend transport change null-ptr-deref test
Problem Details: syzkaller reported a lockdep lock order inversion warning[1] due to commit 687aa0c5581b ("vsock: Fix transport_* TOCTOU"). This was fixed in commit f7c877e75352 ("vsock: fix lock inversion in vsock_assign_transport()"). Redo syzkaller's repro by piggybacking on a somewhat related test implemented in c...
```diff diff --git a/tools/testing/vsock/vsock_test.c b/tools/testing/vsock/vsock_test.c index d4517386e551..9e1250790f33 100644 --- a/tools/testing/vsock/vsock_test.c +++ b/tools/testing/vsock/vsock_test.c @@ -2015,6 +2015,11 @@ static void test_stream_transport_change_client(const struct test_opts *opts) exit(EXI...
ae1737e7339b513f8c2fc21b500a0fc215d155c3
Analyze and fix the following issue in the Linux kernel code: r8169: fix RTL8127 hang on suspend/shutdown
Problem Details: There have been reports that RTL8127 hangs on suspend and shutdown, partially disappearing from lspci until power-cycling. According to Realtek disabling PLL's when switching to D3 should be avoided on that chip version. Fix this by aligning disabling PLL's with the vendor drivers, what in addition res...
```diff diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c index d18734fe12e4..853aabedb128 100644 --- a/drivers/net/ethernet/realtek/r8169_main.c +++ b/drivers/net/ethernet/realtek/r8169_main.c @@ -1514,11 +1514,20 @@ static enum rtl_dash_type rtl_get_dash_type(struct rt...
f5bce28f6b9125502abec4a67d68eabcd24b3b17
Analyze and fix the following issue in the Linux kernel code: net: sxgbe: fix potential NULL dereference in sxgbe_rx()
Problem Details: Currently, when skb is null, the driver prints an error and then dereferences skb on the next line. To fix this, let's add a 'break' after the error message to switch to sxgbe_rx_refill(), which is similar to the approach taken by the other drivers in this particular case, e.g. calxeda with xgmac_rx()...
```diff diff --git a/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c b/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c index 75bad561b352..849c5a6c2af1 100644 --- a/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c +++ b/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c @@ -1521,8 +1521,10 @@ static int sxgbe_rx(struct sxg...
a11e0d467da2dcbe3f199a0f94769ed333b88288
Analyze and fix the following issue in the Linux kernel code: net: mdio: eliminate kdoc warnings in mdio_device.c and mdio_bus.c
Problem Details: Fix all warnings reported by scripts/kernel-doc in mdio_device.c and mdio_bus.c Signed-off-by: Buday Csaba <buday.csaba@prolan.hu> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/7ef7b80669da2b899d38afdb6c45e122229c3d8c.1763968667.git.buday.csaba@prolan.hu Signed-off-by: Jakub...
```diff diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c index ef041ad66852..afdf1ad6c0e6 100644 --- a/drivers/net/phy/mdio_bus.c +++ b/drivers/net/phy/mdio_bus.c @@ -339,7 +339,7 @@ EXPORT_SYMBOL_GPL(mdio_bus_class); * mdio_find_bus - Given the name of a mdiobus, find the mii_bus. * @mdio_name:...
0ae9cfc454ea5ead5f3ddbdfe2e70270d8e2c8ef
Analyze and fix the following issue in the Linux kernel code: team: Move team device type change at the end of team_port_add
Problem Details: Attempting to add a port device that is already up will expectedly fail, but not before modifying the team device header_ops. In the case of the syzbot reproducer the gre0 device is already in state UP when it attempts to add it as a port device of team0, this fails but before that header_ops->create ...
```diff diff --git a/drivers/net/team/team_core.c b/drivers/net/team/team_core.c index 17f07eb0ee52..25562b17debe 100644 --- a/drivers/net/team/team_core.c +++ b/drivers/net/team/team_core.c @@ -1191,10 +1191,6 @@ static int team_port_add(struct team *team, struct net_device *port_dev, return -EPERM; } - err = t...
d2099d9f16dbfa1c5266d4230ff7860047bb0b68
Analyze and fix the following issue in the Linux kernel code: net/mlx5e: Fix validation logic in rate limiting
Problem Details: The rate limiting validation condition currently checks the output variable max_bw_value[i] instead of the input value maxrate->tc_maxrate[i]. This causes the validation to compare an uninitialized or stale value rather than the actual requested rate. The condition should check the input rate to prope...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c b/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c index 9b93da4d52f6..cf8f14ce4cd5 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c @@ -627,7 +627,7 @@ static int mlx5e_dcbn...
3184b6a5a24ec9ee74087b2a550476f386df7dc2
Analyze and fix the following issue in the Linux kernel code: smb: client: fix memory leak in cifs_construct_tcon()
Problem Details: When having a multiuser mount with domain= specified and using cifscreds, cifs_set_cifscreds() will end up setting @ctx->domainname, so it needs to be freed before leaving cifs_construct_tcon(). This fixes the following memory leak reported by kmemleak: mount.cifs //srv/share /mnt -o domain=ZELDA,m...
```diff diff --git a/fs/smb/client/connect.c b/fs/smb/client/connect.c index 55cb4b0cbd48..2f94d93b95e9 100644 --- a/fs/smb/client/connect.c +++ b/fs/smb/client/connect.c @@ -4451,6 +4451,7 @@ cifs_construct_tcon(struct cifs_sb_info *cifs_sb, kuid_t fsuid) out: kfree(ctx->username); + kfree(ctx->domainname); kfr...
8c868a34ea851713eca6bb90db111c7bf091b34b
Analyze and fix the following issue in the Linux kernel code: libbpf: Fix some incorrect @param descriptions in the comment of libbpf.h
Problem Details: Fix up some of missing or incorrect @param descriptions for libbpf public APIs in libbpf.h. Signed-off-by: Jianyun Gao <jianyungao89@gmail.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20251118033025.11804-1-jianyungao89@gmail.com
```diff diff --git a/tools/lib/bpf/libbpf.h b/tools/lib/bpf/libbpf.h index 5118d0a90e24..65e68e964b89 100644 --- a/tools/lib/bpf/libbpf.h +++ b/tools/lib/bpf/libbpf.h @@ -448,7 +448,7 @@ LIBBPF_API int bpf_program__pin(struct bpf_program *prog, const char *path); /** * @brief **bpf_program__unpin()** unpins the BP...
56dfdf2da1cf6261eaeb4259dee27201f2800691
Analyze and fix the following issue in the Linux kernel code: MAINTAINERS: degrade RISC-V MISC SOC SUPPORT to Odd Fixes
Problem Details: The SiFive and Canaan platforms are not being actively looked after at this point, but fixes for them would be applied if/when the patches appeared. Since they're now the only things in the RISC-V MISC SOC SUPPORT, mark them as Odd Fixes. I don't believe this is a functional change, it just represents ...
```diff diff --git a/MAINTAINERS b/MAINTAINERS index 4981224985b4..72bfa33aa225 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -22115,7 +22115,7 @@ F: include/soc/microchip/mpfs.h RISC-V MISC SOC SUPPORT M: Conor Dooley <conor@kernel.org> L: linux-riscv@lists.infradead.org -S: Maintained +S: Odd Fixes T: git https:/...
9d6c58dae8f6590c746ac5d0012ffe14a77539f0
Analyze and fix the following issue in the Linux kernel code: ACPICA: Avoid walking the Namespace if start_node is NULL
Problem Details: Although commit 0c9992315e73 ("ACPICA: Avoid walking the ACPI Namespace if it is not there") fixed the situation when both start_node and acpi_gbl_root_node are NULL, the Linux kernel mainline now still crashed on Honor Magicbook 14 Pro [1]. That happens due to the access to the member of parent_node ...
```diff diff --git a/drivers/acpi/acpica/nswalk.c b/drivers/acpi/acpica/nswalk.c index a2ac06a26e92..5670ff5a43cd 100644 --- a/drivers/acpi/acpica/nswalk.c +++ b/drivers/acpi/acpica/nswalk.c @@ -169,9 +169,12 @@ acpi_ns_walk_namespace(acpi_object_type type, if (start_node == ACPI_ROOT_OBJECT) { start_node = acpi...
b042fdf18e89a347177a49e795d8e5184778b5b6
Analyze and fix the following issue in the Linux kernel code: tracing: Fix WARN_ON in tracing_buffers_mmap_close for split VMAs
Problem Details: When a VMA is split (e.g., by partial munmap or MAP_FIXED), the kernel calls vm_ops->close on each portion. For trace buffer mappings, this results in ring_buffer_unmap() being called multiple times while ring_buffer_map() was only called once. This causes ring_buffer_unmap() to return -ENODEV on subs...
```diff diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index d1e527cf2aae..304e93597126 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -8781,8 +8781,18 @@ static void tracing_buffers_mmap_close(struct vm_area_struct *vma) put_snapshot_map(iter->tr); } +static int tracing_buffers_may_spli...
7276878b069c57d9a9cca5db01d2f7a427b73456
Analyze and fix the following issue in the Linux kernel code: drm/xe: Fix conversion from clock ticks to milliseconds
Problem Details: When tick counts are large and multiplication by MSEC_PER_SEC is larger than 64 bits, the conversion from clock ticks to milliseconds can go bad. Use mul_u64_u32_div() instead. Cc: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Harish Chegondi <harish.chegondi@intel.com> Suggested-by: Umesh...
```diff diff --git a/drivers/gpu/drm/xe/xe_gt_clock.c b/drivers/gpu/drm/xe/xe_gt_clock.c index 4f011d1573c6..f65d1edd0567 100644 --- a/drivers/gpu/drm/xe/xe_gt_clock.c +++ b/drivers/gpu/drm/xe/xe_gt_clock.c @@ -93,11 +93,6 @@ int xe_gt_clock_init(struct xe_gt *gt) return 0; } -static u64 div_u64_roundup(u64 n, u32...
0e234632e39bd21dd28ffc9ba3ae8eec4deb949c
Analyze and fix the following issue in the Linux kernel code: drm/xe/guc: Fix stack_depot usage
Problem Details: Add missing stack_depot_init() call when CONFIG_DRM_XE_DEBUG_GUC is enabled to fix the following call stack: [] BUG: kernel NULL pointer dereference, address: 0000000000000000 [] Workqueue: drm_sched_run_job_work [gpu_sched] [] RIP: 0010:stack_depot_save_flags+0x172/0x870 [] Call Trace: [] <TAS...
```diff diff --git a/drivers/gpu/drm/xe/xe_guc_ct.c b/drivers/gpu/drm/xe/xe_guc_ct.c index 7b008afb2a8f..b7afe8e983cb 100644 --- a/drivers/gpu/drm/xe/xe_guc_ct.c +++ b/drivers/gpu/drm/xe/xe_guc_ct.c @@ -243,6 +243,9 @@ int xe_guc_ct_init_noalloc(struct xe_guc_ct *ct) #if IS_ENABLED(CONFIG_DRM_XE_DEBUG) spin_lock_ini...
76555b1eb278da420b6e4d26714319a7a4460e7b
Analyze and fix the following issue in the Linux kernel code: drm/xe/guc: Fix resource leak in xe_guc_ct_init_noalloc()
Problem Details: xe_guc_ct_init_noalloc() allocates the CT workqueue and other helpers before it tries to initialize ct->lock. If drmm_mutex_init() fails we currently bail out without releasing those resources because the guc_ct_fini() hasn’t been registered yet. Since destroy_workqueue() in guc_ct_fini() may flush th...
```diff diff --git a/drivers/gpu/drm/xe/xe_guc_ct.c b/drivers/gpu/drm/xe/xe_guc_ct.c index 283d846c3512..7b008afb2a8f 100644 --- a/drivers/gpu/drm/xe/xe_guc_ct.c +++ b/drivers/gpu/drm/xe/xe_guc_ct.c @@ -226,6 +226,12 @@ int xe_guc_ct_init_noalloc(struct xe_guc_ct *ct) xe_gt_assert(gt, !(guc_ct_size() % PAGE_SIZE));...
3f04ee216bc1406cb6214ceaa7e544114108e0fa
Analyze and fix the following issue in the Linux kernel code: hfsplus: fix volume corruption issue for generic/101
Problem Details: The xfstests' test-case generic/101 leaves HFS+ volume in corrupted state: sudo ./check generic/101 FSTYP -- hfsplus PLATFORM -- Linux/x86_64 hfsplus-testing-0001 6.17.0-rc1+ #4 SMP PREEMPT_DYNAMIC Wed Oct 1 15:02:44 PDT 2025 MKFS_OPTIONS -- /dev/loop51 MOUNT_OPTIONS -- /dev/loop51 /mnt/scratch gener...
```diff diff --git a/fs/hfsplus/hfsplus_fs.h b/fs/hfsplus/hfsplus_fs.h index 5ce9efe966af..56dcd80a62ba 100644 --- a/fs/hfsplus/hfsplus_fs.h +++ b/fs/hfsplus/hfsplus_fs.h @@ -477,6 +477,8 @@ int hfs_part_find(struct super_block *sb, sector_t *part_start, /* super.c */ struct inode *hfsplus_iget(struct super_block *sb...
07cf4b864f523f01d2bb522a05813df30b076ba8
Analyze and fix the following issue in the Linux kernel code: drm/xe: Protect against unset LRC when pausing submissions
Problem Details: While pausing submissions, it is possible to encouner an exec queue which is during creation, and therefore doesn't have a valid xe_lrc struct reference. Protect agains such situation, by checking for NULL before access. Reviewed-by: Matthew Brost <matthew.brost@intel.com> Fixes: c25c1010df88 ("drm/x...
```diff diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c index 713263497bb9..9a0842398e95 100644 --- a/drivers/gpu/drm/xe/xe_guc_submit.c +++ b/drivers/gpu/drm/xe/xe_guc_submit.c @@ -2107,6 +2107,18 @@ static void guc_exec_queue_revert_pending_state_change(struct xe_guc *guc, q->gu...
00937fe1921ab346b6f6a4beaa5c38e14733caa3
Analyze and fix the following issue in the Linux kernel code: drm/xe/vf: Start re-emission from first unsignaled job during VF migration
Problem Details: The LRC software ring tail is reset to the first unsignaled pending job's head. Fix the re-emission logic to begin submitting from the first unsignaled job detected, rather than scanning all pending jobs, which can cause imbalance. v2: - Include missing local changes v3: - s/skip_replay/restore_rep...
```diff diff --git a/drivers/gpu/drm/xe/xe_gpu_scheduler.h b/drivers/gpu/drm/xe/xe_gpu_scheduler.h index 9955397aaaa9..c7a77a3a9681 100644 --- a/drivers/gpu/drm/xe/xe_gpu_scheduler.h +++ b/drivers/gpu/drm/xe/xe_gpu_scheduler.h @@ -54,13 +54,14 @@ static inline void xe_sched_tdr_queue_imm(struct xe_gpu_scheduler *sched)...
4bf944f3fcb6c192af1ea73e3d183b6364458b25
Analyze and fix the following issue in the Linux kernel code: cpuidle: Warn instead of bailing out if target residency check fails
Problem Details: It turns out that the change in commit 76934e495cdc ("cpuidle: Add sanity check for exit latency and target residency") goes too far because there are systems in the field on which the check introduced by that commit does not pass. For this reason, change __cpuidle_driver_init() return type back to vo...
```diff diff --git a/drivers/cpuidle/driver.c b/drivers/cpuidle/driver.c index 1c295a93d582..370664c47e65 100644 --- a/drivers/cpuidle/driver.c +++ b/drivers/cpuidle/driver.c @@ -8,6 +8,8 @@ * This code is licenced under the GPL. */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include <linux/mutex.h> #includ...
3a64c46c40460386aeca6e8698076d1207aeaf44
Analyze and fix the following issue in the Linux kernel code: block: fix typos in comments and strings in blk-core
Problem Details: This patch fixes multiple spelling mistakes in comments and documentation in the file block/blk-core.c. No functional changes intended. Suggested-by: Christoph Hellwig <hch@infradead.org> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Signed-off-by: shechenglong <shechenglong@xfusion.com> Reviewed-...
```diff diff --git a/block/blk-core.c b/block/blk-core.c index 14ae73eebe0d..8387fe50ea15 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -662,13 +662,13 @@ static void __submit_bio(struct bio *bio) * bio_list of new bios to be added. ->submit_bio() may indeed add some more * bios through a recursive...
a74de0c3663cf5cf568025e964524a5f875e4bfc
Analyze and fix the following issue in the Linux kernel code: block: Remove references to __device_add_disk()
Problem Details: Since commit d1254a874971 ("block: remove support for delayed queue registrations"), function __device_add_disk() has been replaced with device_add_disk(), so fix up comments. Signed-off-by: John Garry <john.g.garry@oracle.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
```diff diff --git a/block/genhd.c b/block/genhd.c index bd3a6841e5b5..69c75117ba2c 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -795,11 +795,11 @@ static void disable_elv_switch(struct request_queue *q) * partitions associated with the gendisk, and unregisters the associated * request_queue. * - * This is t...
c7418164b463056bf4327b6a2abe638b78250f13
Analyze and fix the following issue in the Linux kernel code: timekeeping: Fix error code in tk_aux_sysfs_init()
Problem Details: If kobject_create_and_add() fails on the first iteration, then the error code is set to -ENOMEM which is correct. But if it fails in subsequent iterations then "ret" is zero, which means success, but it should be -ENOMEM. Set the error code to -ENOMEM correctly. Fixes: 7b5ab04f035f ("timekeeping: Fix...
```diff diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 08e0943b54da..4790da895203 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -3073,8 +3073,10 @@ static int __init tk_aux_sysfs_init(void) char id[2] = { [0] = '0' + i, }; struct kobject *clk = kobject_create_...
2e02254ef5f0c07980b39fb4c334b0e612b8581e
Analyze and fix the following issue in the Linux kernel code: drm/xe/pf: Handle MERT catastrophic errors
Problem Details: The MERT block triggers an interrupt when a catastrophic error occurs. Update the interrupt handler to read the MERT catastrophic error type and log appropriate debug message. Signed-off-by: Lukasz Laguna <lukasz.laguna@intel.com> Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com> Signed-off-b...
```diff diff --git a/drivers/gpu/drm/xe/regs/xe_mert_regs.h b/drivers/gpu/drm/xe/regs/xe_mert_regs.h index aef66c04901d..c345e11ceea8 100644 --- a/drivers/gpu/drm/xe/regs/xe_mert_regs.h +++ b/drivers/gpu/drm/xe/regs/xe_mert_regs.h @@ -10,6 +10,11 @@ #define MERT_LMEM_CFG XE_REG(0x1448b0) +#define MERT_TLB_CT_IN...
23261f0de09427367e99f39f588e31e2856a690e
Analyze and fix the following issue in the Linux kernel code: ASoC: stm32: sai: fix OF node leak on probe
Problem Details: The reference taken to the sync provider OF node when probing the platform device is currently only dropped if the set_sync() callback fails during DAI probe. Make sure to drop the reference on platform probe failures (e.g. probe deferral) and on driver unbind. This also avoids a potential use-after-...
```diff diff --git a/sound/soc/stm/stm32_sai.c b/sound/soc/stm/stm32_sai.c index 7065aeb0e524..00cf24ceca2d 100644 --- a/sound/soc/stm/stm32_sai.c +++ b/sound/soc/stm/stm32_sai.c @@ -138,7 +138,6 @@ static int stm32_sai_set_sync(struct stm32_sai_data *sai_client, if (!pdev) { dev_err(&sai_client->pdev->dev, "D...