id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
eda0a2fdbc24c35cd8d61d9c9111cafd5f89b2dc
Analyze and fix the following issue in the Linux kernel code: RDMA/hns: Fix missing xa_destroy()
Problem Details: Add xa_destroy() for xarray in driver. Fixes: 5c1f167af112 ("RDMA/hns: Init SRQ table for hip08") Fixes: 27e19f451089 ("RDMA/hns: Convert cq_table to XArray") Fixes: 736b5a70db98 ("RDMA/hns: Convert qp_table_tree to XArray") Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com> Link: https://patc...
```diff diff --git a/drivers/infiniband/hw/hns/hns_roce_alloc.c b/drivers/infiniband/hw/hns/hns_roce_alloc.c index 950c133d4220..6ee911f6885b 100644 --- a/drivers/infiniband/hw/hns/hns_roce_alloc.c +++ b/drivers/infiniband/hw/hns/hns_roce_alloc.c @@ -175,8 +175,10 @@ void hns_roce_cleanup_bitmap(struct hns_roce_dev *hr...
444907dd45cbe62fd69398805b6e2c626fab5b3a
Analyze and fix the following issue in the Linux kernel code: RDMA/hns: Fix a missing rollback in error path of hns_roce_create_qp_common()
Problem Details: When ib_copy_to_udata() fails in hns_roce_create_qp_common(), hns_roce_qp_remove() should be called in the error path to clean up resources in hns_roce_qp_store(). Fixes: 0f00571f9433 ("RDMA/hns: Use new SQ doorbell register for HIP09") Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com> Link: ...
```diff diff --git a/drivers/infiniband/hw/hns/hns_roce_qp.c b/drivers/infiniband/hw/hns/hns_roce_qp.c index 8408f9a5c309..52b671156246 100644 --- a/drivers/infiniband/hw/hns/hns_roce_qp.c +++ b/drivers/infiniband/hw/hns/hns_roce_qp.c @@ -1220,7 +1220,7 @@ static int hns_roce_create_qp_common(struct hns_roce_dev *hr_de...
13c90c222049764bb7e6a1689bd785f424bd8bd5
Analyze and fix the following issue in the Linux kernel code: RDMA/hns: Fix invalid sq params not being blocked
Problem Details: SQ params from userspace are checked in by set_user_sq_size(). But when the check fails, the function doesn't return but instead keep running and overwrite 'ret'. As a result, the invalid params will not get blocked actually. Add a return right after the failed check. Besides, although the check resul...
```diff diff --git a/drivers/infiniband/hw/hns/hns_roce_qp.c b/drivers/infiniband/hw/hns/hns_roce_qp.c index a97348a1c61f..8408f9a5c309 100644 --- a/drivers/infiniband/hw/hns/hns_roce_qp.c +++ b/drivers/infiniband/hw/hns/hns_roce_qp.c @@ -1121,24 +1121,23 @@ static int set_qp_param(struct hns_roce_dev *hr_dev, struct h...
b9f59a24ba35a7d955a9f8e148dd9f85b7b40a01
Analyze and fix the following issue in the Linux kernel code: RDMA/hns: Fix unmatched condition in error path of alloc_user_qp_db()
Problem Details: Currently the condition of unmapping sdb in error path is not exactly the same as the condition of mapping in alloc_user_qp_db(). This may cause a problem of unmapping an unmapped db in some case, such as when the QP is XRC TGT. Unified the two conditions. Fixes: 90ae0b57e4a5 ("RDMA/hns: Combine enabl...
```diff diff --git a/drivers/infiniband/hw/hns/hns_roce_qp.c b/drivers/infiniband/hw/hns/hns_roce_qp.c index 9e2e76c59406..a97348a1c61f 100644 --- a/drivers/infiniband/hw/hns/hns_roce_qp.c +++ b/drivers/infiniband/hw/hns/hns_roce_qp.c @@ -868,12 +868,14 @@ static int alloc_user_qp_db(struct hns_roce_dev *hr_dev, ...
25655580136de59ec89f09089dd28008ea440fc9
Analyze and fix the following issue in the Linux kernel code: RDMA/hns: Fix soft lockup during bt pages loop
Problem Details: Driver runs a for-loop when allocating bt pages and mapping them with buffer pages. When a large buffer (e.g. MR over 100GB) is being allocated, it may require a considerable loop count. This will lead to soft lockup: watchdog: BUG: soft lockup - CPU#27 stuck for 22s! ... Call ...
```diff diff --git a/drivers/infiniband/hw/hns/hns_roce_hem.c b/drivers/infiniband/hw/hns/hns_roce_hem.c index 605562122ecc..ca0798224e56 100644 --- a/drivers/infiniband/hw/hns/hns_roce_hem.c +++ b/drivers/infiniband/hw/hns/hns_roce_hem.c @@ -1361,6 +1361,11 @@ static int hem_list_alloc_root_bt(struct hns_roce_dev *hr_...
fe0fb58325e519008e2606a5aa2cff7ad23e212d
Analyze and fix the following issue in the Linux kernel code: HID: remove superfluous (and wrong) Makefile entry for CONFIG_INTEL_ISH_FIRMWARE_DOWNLOADER
Problem Details: The line obj-$(INTEL_ISH_FIRMWARE_DOWNLOADER) += intel-ish-hid/ in top-level HID Makefile is both superfluous (as CONFIG_INTEL_ISH_FIRMWARE_DOWNLOADER depends on CONFIG_INTEL_ISH_HID, which contains intel-ish-hid/ already) and wrong (as it's missing the CONFIG_ prefix). Just remove it. Fixes: 91...
```diff diff --git a/drivers/hid/Makefile b/drivers/hid/Makefile index 482b096eea28..0abfe51704a0 100644 --- a/drivers/hid/Makefile +++ b/drivers/hid/Makefile @@ -166,7 +166,6 @@ obj-$(CONFIG_USB_KBD) += usbhid/ obj-$(CONFIG_I2C_HID_CORE) += i2c-hid/ obj-$(CONFIG_INTEL_ISH_HID) += intel-ish-hid/ -obj-$(INTEL_ISH_F...
10646ddac2917b31c985ceff0e4982c42a9c924b
Analyze and fix the following issue in the Linux kernel code: drm/ci: fix merge request rules
Problem Details: Merge request pipelines were only created when changes were made to drivers/gpu/drm/ci/, causing MRs that didn't touch this path to break. Fix MR pipeline rules to trigger jobs for all changes. Run jobs automatically for marge-bot and scheduled pipelines, but in all other cases run manually. Also remo...
```diff diff --git a/drivers/gpu/drm/ci/gitlab-ci.yml b/drivers/gpu/drm/ci/gitlab-ci.yml index f04aabe8327c..b06b9e7d3d09 100644 --- a/drivers/gpu/drm/ci/gitlab-ci.yml +++ b/drivers/gpu/drm/ci/gitlab-ci.yml @@ -143,11 +143,11 @@ stages: # Pre-merge pipeline - if: &is-pre-merge $CI_PIPELINE_SOURCE == "merge_re...
066e053fe208a3b83ee89dc5a192146add688861
Analyze and fix the following issue in the Linux kernel code: fsnotify: add pre-content hooks on mmap()
Problem Details: Pre-content hooks in page faults introduces potential deadlock of HSM handler in userspace with filesystem freezing. The requirement with pre-content event is that for every accessed file range an event covering at least this range will be generated at least once before the file data is accesses. In ...
```diff diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h index 6a33288bd6a1..83d3ac97f826 100644 --- a/include/linux/fsnotify.h +++ b/include/linux/fsnotify.h @@ -170,6 +170,21 @@ static inline int fsnotify_file_area_perm(struct file *file, int perm_mask, return fsnotify_path(&file->f_path, FS_ACCESS_...
658fb7fe8e7f4014ea17a4da0e0c1d9bc319fa35
Analyze and fix the following issue in the Linux kernel code: ASoC: cs42l43: convert to SYSTEM_SLEEP_PM_OPS
Problem Details: The custom suspend function causes a build warning when CONFIG_PM_SLEEP is disabled: sound/soc/codecs/cs42l43.c:2405:12: error: unused function 'cs42l43_codec_runtime_force_suspend' [-Werror,-Wunused-function] Change SET_SYSTEM_SLEEP_PM_OPS() to the newer SYSTEM_SLEEP_PM_OPS(), to avoid this. Fixes:...
```diff diff --git a/sound/soc/codecs/cs42l43.c b/sound/soc/codecs/cs42l43.c index d307b56a7f38..ea84ac64c775 100644 --- a/sound/soc/codecs/cs42l43.c +++ b/sound/soc/codecs/cs42l43.c @@ -2417,7 +2417,7 @@ static int cs42l43_codec_runtime_force_suspend(struct device *dev) static const struct dev_pm_ops cs42l43_codec_...
73d2f10957f517e5918c81b7e859e214ba71c044
Analyze and fix the following issue in the Linux kernel code: iommu: Don't warn prematurely about dodgy probes
Problem Details: The warning for suspect probe conditions inadvertently got moved too early in a prior respin - it happened to work out OK for fwspecs, but in general still needs to be after the ops->probe_device call so drivers which filter devices for themselves have a chance to do that. Signed-off-by: Robin Murphy ...
```diff diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index c283721579b3..9e1b444246f8 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -441,12 +441,6 @@ static int iommu_init_device(struct device *dev) ret = -ENODEV; goto err_free; } - /* - * And if we do now see any replay calls...
d9e7c172a7f247f7ef0b151fa8c8f044b6a2a070
Analyze and fix the following issue in the Linux kernel code: media: rtl2832_sdr: assign vb2 lock before vb2_queue_init
Problem Details: Commit c780d01cf1a6 ("media: vb2: vb2_core_queue_init(): sanity check lock and wait_prepare/finish") added a sanity check to ensure that if there are no wait_prepare/finish callbacks set by the driver, then the vb2_queue lock must be set, since otherwise the vb2 core cannot do correct locking. The rtl...
```diff diff --git a/drivers/media/dvb-frontends/rtl2832_sdr.c b/drivers/media/dvb-frontends/rtl2832_sdr.c index 05254d8717db..0357624968f1 100644 --- a/drivers/media/dvb-frontends/rtl2832_sdr.c +++ b/drivers/media/dvb-frontends/rtl2832_sdr.c @@ -1363,6 +1363,7 @@ static int rtl2832_sdr_probe(struct platform_device *pd...
b8665a1b49f5498edb7b21d730030c06b7348a3c
Analyze and fix the following issue in the Linux kernel code: spi: cadence-qspi: Fix probe on AM62A LP SK
Problem Details: In 2020, there's been an unnoticed change which rightfully attempted to report probe deferrals upon DMA absence by checking the return value of dma_request_chan_by_mask(). By doing so, it also reported errors which were simply ignored otherwise, likely on purpose. This change actually turned a void re...
```diff diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c index 0cd37a7436d5..c90462783b3f 100644 --- a/drivers/spi/spi-cadence-quadspi.c +++ b/drivers/spi/spi-cadence-quadspi.c @@ -1658,6 +1658,12 @@ static int cqspi_request_mmap_dma(struct cqspi_st *cqspi) int ret = PTR_ERR(cqspi->...
80b78c39eb86e6b55f56363b709eb817527da5aa
Analyze and fix the following issue in the Linux kernel code: ipvs: prevent integer overflow in do_ip_vs_get_ctl()
Problem Details: The get->num_services variable is an unsigned int which is controlled by the user. The struct_size() function ensures that the size calculation does not overflow an unsigned long, however, we are saving the result to an int so the calculation can overflow. Both "len" and "get->num_services" come from...
```diff diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c index 7d13110ce188..0633276d96bf 100644 --- a/net/netfilter/ipvs/ip_vs_ctl.c +++ b/net/netfilter/ipvs/ip_vs_ctl.c @@ -3091,12 +3091,12 @@ do_ip_vs_get_ctl(struct sock *sk, int cmd, void __user *user, int *len) case IP_VS_SO_GET_SERVI...
f9f087d946266bc5da7c3a17bd8fd9d01969e3cf
Analyze and fix the following issue in the Linux kernel code: drm: xlnx: zynqmp_dpsub: fix Kconfig dependencies for ASoC
Problem Details: The new audio code fails to build when sounds support is in a loadable module but the GPU driver is built-in: x86_64-linux-ld: zynqmp_dp_audio.c:(.text+0x6a8): undefined reference to `devm_snd_soc_register_card' x86_64-linux-ld: drivers/gpu/drm/xlnx/zynqmp_dp_audio.o:(.rodata+0x1bc): undefined referen...
```diff diff --git a/drivers/gpu/drm/xlnx/Kconfig b/drivers/gpu/drm/xlnx/Kconfig index dbecca9bdd54..cfabf5e2a0bb 100644 --- a/drivers/gpu/drm/xlnx/Kconfig +++ b/drivers/gpu/drm/xlnx/Kconfig @@ -22,6 +22,7 @@ config DRM_ZYNQMP_DPSUB_AUDIO bool "ZynqMP DisplayPort Audio Support" depends on DRM_ZYNQMP_DPSUB depends...
520a563b9a162d8a7484a32086de8e7c84d69945
Analyze and fix the following issue in the Linux kernel code: ALSA: ctxfi: change dao_set_input functions from kzalloc to kcalloc
Problem Details: We are trying to get rid of all multiplications from allocation functions to prevent potential integer overflows. Here the multiplication is probably safe, but using kcalloc() is more appropriate and improves readability. This patch has no effect on runtime behavior. Link: https://github.com/KSPP/linu...
```diff diff --git a/sound/pci/ctxfi/ctdaio.c b/sound/pci/ctxfi/ctdaio.c index 9993b02d2968..806c4d754387 100644 --- a/sound/pci/ctxfi/ctdaio.c +++ b/sound/pci/ctxfi/ctdaio.c @@ -159,7 +159,7 @@ static int dao_set_left_input(struct dao *dao, struct rsc *input) struct daio *daio = &dao->daio; int i; - entry = kzal...
d653bfeb07ebb3499c403404c21ac58a16531607
Analyze and fix the following issue in the Linux kernel code: netfilter: nf_conncount: Fully initialize struct nf_conncount_tuple in insert_tree()
Problem Details: Since commit b36e4523d4d5 ("netfilter: nf_conncount: fix garbage collection confirm race"), `cpu` and `jiffies32` were introduced to the struct nf_conncount_tuple. The commit made nf_conncount_add() initialize `conn->cpu` and `conn->jiffies32` when allocating the struct. In contrast, count_tree() was ...
```diff diff --git a/net/netfilter/nf_conncount.c b/net/netfilter/nf_conncount.c index ebe38ed2e6f4..913ede2f57f9 100644 --- a/net/netfilter/nf_conncount.c +++ b/net/netfilter/nf_conncount.c @@ -377,6 +377,8 @@ restart: conn->tuple = *tuple; conn->zone = *zone; + conn->cpu = raw_smp_processor_id(); + conn->jiffie...
9bce6b5f8987678b9c6c1fe433af6b5fe41feadc
Analyze and fix the following issue in the Linux kernel code: block: change blk_mq_add_to_batch() third argument type to bool
Problem Details: Commit 1f47ed294a2b ("block: cleanup and fix batch completion adding conditions") modified the evaluation criteria for the third argument, 'ioerror', in the blk_mq_add_to_batch() function. Initially, the function had checked if 'ioerror' equals zero. Following the commit, it started checking for negati...
```diff diff --git a/drivers/block/null_blk/main.c b/drivers/block/null_blk/main.c index d94ef37480bd..fdc7a0b2af10 100644 --- a/drivers/block/null_blk/main.c +++ b/drivers/block/null_blk/main.c @@ -1549,8 +1549,8 @@ static int null_poll(struct blk_mq_hw_ctx *hctx, struct io_comp_batch *iob) cmd = blk_mq_rq_to_pdu(r...
f7f8932ca6bb22494ef6db671633ad3b4d982271
Analyze and fix the following issue in the Linux kernel code: f2fs: fix to avoid running out of free segments
Problem Details: If checkpoint is disabled, GC can not reclaim any segments, we need to detect such condition and bail out from fallocate() of a pinfile, rather than letting allocator running out of free segment, which may cause f2fs to be shutdown. reproducer: mkfs.f2fs -f /dev/vda 16777216 mount -o checkpoint=disabl...
```diff diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 2ddb93d1a10c..abbcbb5865a3 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -1838,6 +1838,18 @@ static int f2fs_expand_inode_data(struct inode *inode, loff_t offset, next_alloc: f2fs_down_write(&sbi->pin_sem); + if (unlikely(is_sbi_flag_set(sbi, SBI_C...
81c0db302a674f8004ed805393d17fd76f552e83
Analyze and fix the following issue in the Linux kernel code: RDMA/bnxt_re: Avoid clearing VLAN_ID mask in modify qp path
Problem Details: Driver is always clearing the mask that sets the VLAN ID/Service Level in the adapter. Recent change for supporting multiple traffic class exposed this issue. Allow setting SL and VLAN_ID while QP is moved from INIT to RTR state. Fixes: 1ac5a4047975 ("RDMA/bnxt_re: Add bnxt_re RoCE driver") Fixes: c6...
```diff diff --git a/drivers/infiniband/hw/bnxt_re/qplib_fp.c b/drivers/infiniband/hw/bnxt_re/qplib_fp.c index 5336f74297f8..457eecb99f96 100644 --- a/drivers/infiniband/hw/bnxt_re/qplib_fp.c +++ b/drivers/infiniband/hw/bnxt_re/qplib_fp.c @@ -1217,8 +1217,6 @@ static void __modify_flags_from_init_state(struct bnxt_qpli...
8324993f60305e50f27b98358b01b9837e10d159
Analyze and fix the following issue in the Linux kernel code: dma-mapping: fix missing clear bdr in check_ram_in_range_map()
Problem Details: As discussed in [1], if 'bdr' is set once, it would never get cleared, hence 0 is always returned. Refactor the range check hunk into a new helper dma_find_range(), which allows 'bdr' to be cleared in each iteration. Link: https://lore.kernel.org/all/64931fac-085b-4ff3-9314-84bac2fa9bdb@quicinc.com/ ...
```diff diff --git a/kernel/dma/direct.c b/kernel/dma/direct.c index 5b4e6d3bf7bc..b8fe0b3d0ffb 100644 --- a/kernel/dma/direct.c +++ b/kernel/dma/direct.c @@ -584,6 +584,22 @@ int dma_direct_supported(struct device *dev, u64 mask) return mask >= phys_to_dma_unencrypted(dev, min_mask); } +static const struct bus_dm...
87fa872a1ecf542efc66a9184127faf03037f827
Analyze and fix the following issue in the Linux kernel code: ASoC: samsung: speyside: Free gpiod table
Problem Details: We create a gpio descriptor table but it needs to be free:ed when the module is removed. Add a devm_ action to do the job. Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Fixes: da9146c19b17 ("ASoC: samsung: speyside: Convert to GPIO descriptor") Signed-off-by: Linus Walleij <linus.w...
```diff diff --git a/sound/soc/samsung/speyside.c b/sound/soc/samsung/speyside.c index f781e2be2fd4..9262e5626584 100644 --- a/sound/soc/samsung/speyside.c +++ b/sound/soc/samsung/speyside.c @@ -347,6 +347,11 @@ static struct gpiod_lookup_table wm8996_gpiod_table = { }, }; +static void speyside_gpiod_table_action(...
951d701ef1bbce4c5f88466f5e829fb3d5735856
Analyze and fix the following issue in the Linux kernel code: gfs2: Fix a NULL vs IS_ERR() bug in gfs2_find_jhead()
Problem Details: The filemap_grab_folio() function doesn't return NULL, it returns error pointers. Fix the check to match. Fixes: 40829760096d ("gfs2: Convert gfs2_find_jhead() to use a folio") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
```diff diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c index 3853c422040b..0fd3b5ec7d8c 100644 --- a/fs/gfs2/lops.c +++ b/fs/gfs2/lops.c @@ -530,8 +530,8 @@ int gfs2_find_jhead(struct gfs2_jdesc *jd, struct gfs2_log_header_host *head, if (!folio) { folio = filemap_grab_folio(mapping, block >> shift); - ...
2b22459792fcb4def9f0936d64575ac11a95a58d
Analyze and fix the following issue in the Linux kernel code: i2c: sis630: Fix an error handling path in sis630_probe()
Problem Details: If i2c_add_adapter() fails, the request_region() call in sis630_setup() must be undone by a corresponding release_region() call, as done in the remove function. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/3d...
```diff diff --git a/drivers/i2c/busses/i2c-sis630.c b/drivers/i2c/busses/i2c-sis630.c index 3505cf29cedd..a19c3d251804 100644 --- a/drivers/i2c/busses/i2c-sis630.c +++ b/drivers/i2c/busses/i2c-sis630.c @@ -509,6 +509,8 @@ MODULE_DEVICE_TABLE(pci, sis630_ids); static int sis630_probe(struct pci_dev *dev, const struc...
6e55caaf30c88209d097e575a169b1dface1ab69
Analyze and fix the following issue in the Linux kernel code: i2c: ali15x3: Fix an error handling path in ali15x3_probe()
Problem Details: If i2c_add_adapter() fails, the request_region() call in ali15x3_setup() must be undone by a corresponding release_region() call, as done in the remove function. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Andi Shyti <andi.s...
```diff diff --git a/drivers/i2c/busses/i2c-ali15x3.c b/drivers/i2c/busses/i2c-ali15x3.c index 4761c7208102..418d11266671 100644 --- a/drivers/i2c/busses/i2c-ali15x3.c +++ b/drivers/i2c/busses/i2c-ali15x3.c @@ -472,6 +472,8 @@ MODULE_DEVICE_TABLE (pci, ali15x3_ids); static int ali15x3_probe(struct pci_dev *dev, cons...
9b5463f349d019a261f1e80803447efca3126151
Analyze and fix the following issue in the Linux kernel code: i2c: ali1535: Fix an error handling path in ali1535_probe()
Problem Details: If i2c_add_adapter() fails, the request_region() call in ali1535_setup() must be undone by a corresponding release_region() call, as done in the remove function. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Andi Shyti <andi.s...
```diff diff --git a/drivers/i2c/busses/i2c-ali1535.c b/drivers/i2c/busses/i2c-ali1535.c index 544c94e86b89..1eac35838040 100644 --- a/drivers/i2c/busses/i2c-ali1535.c +++ b/drivers/i2c/busses/i2c-ali1535.c @@ -485,6 +485,8 @@ MODULE_DEVICE_TABLE(pci, ali1535_ids); static int ali1535_probe(struct pci_dev *dev, const...
285df995f90e3d61d97f327d34b9659d92313314
Analyze and fix the following issue in the Linux kernel code: i2c: omap: fix IRQ storms
Problem Details: On the GTA04A5 writing a reset command to the gyroscope causes IRQ storms because NACK IRQs are enabled and therefore triggered but not acked. Sending a reset command to the gyroscope by i2cset 1 0x69 0x14 0xb6 with an additional debug print in the ISR (not the thread) itself causes [ 363.353515] i2c...
```diff diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index 92faf03d64cf..f18c3e74b076 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c @@ -1048,23 +1048,6 @@ static int omap_i2c_transmit_data(struct omap_i2c_dev *omap, u8 num_bytes, return 0; } -static ir...
7d0ec14c64a107a548616deace93a1913e5d68ed
Analyze and fix the following issue in the Linux kernel code: x86/resctrl: Add resctrl_arch_ prefix to pseudo lock functions
Problem Details: resctrl's pseudo lock has some copy-to-cache and measurement functions that are micro-architecture specific. For example, pseudo_lock_fn() is not at all portable. Label these 'resctrl_arch_' so they stay under /arch/x86. To expose these functions to the filesystem code they need an entry in a header...
```diff diff --git a/arch/x86/include/asm/resctrl.h b/arch/x86/include/asm/resctrl.h index 6d4c7ea2c9e3..86407dbde583 100644 --- a/arch/x86/include/asm/resctrl.h +++ b/arch/x86/include/asm/resctrl.h @@ -203,6 +203,11 @@ static inline void *resctrl_arch_mon_ctx_alloc(struct rdt_resource *r, int evtid static inline void...
650680d651aaf409f097ad904c3fea6c4b3a0884
Analyze and fix the following issue in the Linux kernel code: x86/resctrl: Change mon_event_config_{read,write}() to be arch helpers
Problem Details: mon_event_config_{read,write}() are called via IPI and access model specific registers to do their work. To support another architecture, this needs abstracting. Rename mon_event_config_{read,write}() to have a "resctrl_arch_" prefix, and move their struct mon_config_info parameter into <linux/resctr...
```diff diff --git a/arch/x86/kernel/cpu/resctrl/rdtgroup.c b/arch/x86/kernel/cpu/resctrl/rdtgroup.c index eb32fbc3abea..e7d1d8b6983d 100644 --- a/arch/x86/kernel/cpu/resctrl/rdtgroup.c +++ b/arch/x86/kernel/cpu/resctrl/rdtgroup.c @@ -1580,11 +1580,6 @@ out: return ret; } -struct mon_config_info { - u32 evtid; - u...
d012b66a16618509242a51f5f6c9b19868ba5159
Analyze and fix the following issue in the Linux kernel code: x86/resctrl: Move the is_mbm_*_enabled() helpers to asm/resctrl.h
Problem Details: The architecture specific parts of resctrl provide helpers like is_mbm_total_enabled() and is_mbm_local_enabled() to hide accesses to the rdt_mon_features bitmap. Exposing a group of helpers between the architecture and filesystem code is preferable to a single unsigned-long like rdt_mon_features. Hel...
```diff diff --git a/arch/x86/include/asm/resctrl.h b/arch/x86/include/asm/resctrl.h index 52f2326e2b1e..6d4c7ea2c9e3 100644 --- a/arch/x86/include/asm/resctrl.h +++ b/arch/x86/include/asm/resctrl.h @@ -42,6 +42,7 @@ DECLARE_PER_CPU(struct resctrl_pqr_state, pqr_state); extern bool rdt_alloc_capable; extern bool rd...
8079565d177f5c4eac6c2ee2ac6c404eee76d500
Analyze and fix the following issue in the Linux kernel code: x86/resctrl: Expose resctrl fs's init function to the rest of the kernel
Problem Details: rdtgroup_init() needs exposing to the rest of the kernel so that arch code can call it once it lives in core code. As this is one of the few functions exposed, rename it to have "resctrl" in the name. The same goes for the exit call. Rename x86's arch code init functions for RDT to have an arch prefix...
```diff diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resctrl/core.c index d001ca43b53d..212995149eac 100644 --- a/arch/x86/kernel/cpu/resctrl/core.c +++ b/arch/x86/kernel/cpu/resctrl/core.c @@ -1061,7 +1061,7 @@ void resctrl_cpu_detect(struct cpuinfo_x86 *c) } } -static int __init resctrl_...
a121798ae669351ec0697c94f71c3a692b2a755b
Analyze and fix the following issue in the Linux kernel code: x86/resctrl: Fix allocation of cleanest CLOSID on platforms with no monitors
Problem Details: Commit 6eac36bb9eb0 ("x86/resctrl: Allocate the cleanest CLOSID by searching closid_num_dirty_rmid") added logic that causes resctrl to search for the CLOSID with the fewest dirty cache lines when creating a new control group, if requested by the arch code. This depends on the values read from the ...
```diff diff --git a/arch/x86/kernel/cpu/resctrl/rdtgroup.c b/arch/x86/kernel/cpu/resctrl/rdtgroup.c index 6419e04d8a7b..04b653d613e8 100644 --- a/arch/x86/kernel/cpu/resctrl/rdtgroup.c +++ b/arch/x86/kernel/cpu/resctrl/rdtgroup.c @@ -157,7 +157,8 @@ static int closid_alloc(void) lockdep_assert_held(&rdtgroup_mutex...
f990c11a63bb957ecdde4629492b334e3e42f072
Analyze and fix the following issue in the Linux kernel code: drm/xe/vf: Catch all unexpected register reads
Problem Details: While we can only mimic read32 for a few GT registers for which the PF shared the values, we shouldn't avoid calling helper code if we try to access non-GT register, as then we miss to trigger a debug warning. For cases where sriov_vf_gt was not set, just use primary_gt instead. Signed-off-by: Michal ...
```diff diff --git a/drivers/gpu/drm/xe/xe_mmio.c b/drivers/gpu/drm/xe/xe_mmio.c index 70a36e777546..13e06a956ceb 100644 --- a/drivers/gpu/drm/xe/xe_mmio.c +++ b/drivers/gpu/drm/xe/xe_mmio.c @@ -204,8 +204,9 @@ void xe_mmio_write32(struct xe_mmio *mmio, struct xe_reg reg, u32 val) trace_xe_reg_rw(mmio, true, addr, ...
d3414acf4a01c1bb28d9dc9b389862ffcc01aab4
Analyze and fix the following issue in the Linux kernel code: drm/xe/vf: Don't try Driver-FLR if VF
Problem Details: Driver-FLR can't be triggered from the VF driver, so treat it as disabled if VF. While around, fix also the message, as it shouldn't be printed just 'once' as we may have many devices. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimira...
```diff diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c index 35eb001c6c1a..2f7d727c9392 100644 --- a/drivers/gpu/drm/xe/xe_device.c +++ b/drivers/gpu/drm/xe/xe_device.c @@ -496,7 +496,15 @@ ALLOW_ERROR_INJECTION(xe_device_create, ERRNO); /* See xe_pci_probe() */ static bool xe_driver_fl...
e51a349d2dcf1df8422dabb90b2f691dc7df6f92
Analyze and fix the following issue in the Linux kernel code: mmc: atmel-mci: Add missing clk_disable_unprepare()
Problem Details: The error path when atmci_configure_dma() set dma fails in atmci driver does not correctly disable the clock. Add the missing clk_disable_unprepare() to the error path for pair with clk_prepare_enable(). Fixes: 467e081d23e6 ("mmc: atmel-mci: use probe deferring if dma controller is not ready yet") Sig...
```diff diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index fc360902729d..24fffc702a94 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c @@ -2499,8 +2499,10 @@ static int atmci_probe(struct platform_device *pdev) /* Get MCI capabilities and set operations accordin...
54be64fdf3ba6dbad2f5c48e466e1db43ad74bca
Analyze and fix the following issue in the Linux kernel code: wifi: iwlwifi: Fix uninitialized variable with __free()
Problem Details: Pointers declared with the __free(kfree) attribute need to be initialized because they will be passed to kfree() on every return path. There are two return statement before the "cmd" pointer is initialized so this leads to an uninitialized variable bug. Fixes: d1e879ec600f ("wifi: iwlwifi: add iwlmld...
```diff diff --git a/drivers/net/wireless/intel/iwlwifi/mld/debugfs.c b/drivers/net/wireless/intel/iwlwifi/mld/debugfs.c index c759c5c68dc0..1d4b2ad5d388 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/debugfs.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/debugfs.c @@ -556,8 +556,8 @@ iwl_dbgfs_vif_twt_setup_write...
fcb255537bee25560af03c583b44866e73a8eb40
Analyze and fix the following issue in the Linux kernel code: xfs: Remove duplicate xfs_rtbitmap.h header
Problem Details: ./fs/xfs/libxfs/xfs_sb.c: xfs_rtbitmap.h is included more than once. Fixes: 2167eaabe2fa ("xfs: define the zoned on-disk format") Reported-by: Abaci Robot <abaci@linux.alibaba.com> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=19446 Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.co...
```diff diff --git a/fs/xfs/libxfs/xfs_sb.c b/fs/xfs/libxfs/xfs_sb.c index e42bfd04a7c6..711e180f9ebb 100644 --- a/fs/xfs/libxfs/xfs_sb.c +++ b/fs/xfs/libxfs/xfs_sb.c @@ -30,7 +30,6 @@ #include "xfs_rtgroup.h" #include "xfs_rtrmap_btree.h" #include "xfs_rtrefcount_btree.h" -#include "xfs_rtbitmap.h" /* * Physic...
80834e7d857932553dc22b0addbec744060aaf9f
Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: use supported selectors from assoc in ML reconf
Problem Details: For multi-link reconfiguration, we shouldn't have any BSS membership selectors that are different from the association. Track the association selectors and use them to check the new link(s) added during reconfiguration. Fixes: 36e05b0b8390 ("wifi: mac80211: Support dynamic link addition and removal") ...
```diff diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 217e949bb756..fb05f3cd37ec 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h @@ -444,8 +444,6 @@ struct ieee80211_mgd_assoc_data { const u8 *supp_rates; u8 supp_rates_len; - unsigned long userspace_selectors[...
899da1830db112e6bd54ed4573ace753eae6ef22
Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: remove SSID from ML reconf
Problem Details: The ML reconfiguration frame shouldn't contain an SSID, remove it. Fixes: 36e05b0b8390 ("wifi: mac80211: Support dynamic link addition and removal") Reviewed-by: Ilan Peer <ilan.peer@intel.com> Link: https://patch.msgid.link/20250311121004.fdf08f90bc30.I07f88d3a6f592a0df65d48f55d65c46a4d261007@changei...
```diff diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index bfd3653a5b84..3dae02345ab8 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -10233,8 +10233,8 @@ ieee80211_build_ml_reconf_req(struct ieee80211_sub_if_data *sdata, size += 2 + sizeof(struct ieee80211_mle_per_sta_profile) + ETH_ALEN...
adb1ee4de04d496f3da409bb6791cfdd744ab2c3
Analyze and fix the following issue in the Linux kernel code: wifi: virt_wifi: Add __nonstring annotations for unterminated strings
Problem Details: When a character array without a terminating NUL character has a static initializer, GCC 15's -Wunterminated-string-initialization will only warn if the array lacks the "nonstring" attribute[1]. Mark the arrays with __nonstring to and correctly identify the char array as "not a C string" and thereby el...
```diff diff --git a/drivers/net/wireless/virtual/virt_wifi.c b/drivers/net/wireless/virtual/virt_wifi.c index f9d11a023313..1fffeff2190c 100644 --- a/drivers/net/wireless/virtual/virt_wifi.c +++ b/drivers/net/wireless/virtual/virt_wifi.c @@ -146,7 +146,7 @@ static void virt_wifi_inform_bss(struct wiphy *wiphy) stati...
8300f2504afeceac234027d433a2f71d4a39c7fe
Analyze and fix the following issue in the Linux kernel code: wifi: zd1211rw: Add __nonstring annotations for unterminated strings
Problem Details: When a character array without a terminating NUL character has a static initializer, GCC 15's -Wunterminated-string-initialization will only warn if the array lacks the "nonstring" attribute[1]. Mark the arrays with __nonstring to and correctly identify the char array as "not a C string" and thereby el...
```diff diff --git a/drivers/net/wireless/zydas/zd1211rw/zd_mac.c b/drivers/net/wireless/zydas/zd1211rw/zd_mac.c index f90c33d19b39..9653dbaac3c0 100644 --- a/drivers/net/wireless/zydas/zd1211rw/zd_mac.c +++ b/drivers/net/wireless/zydas/zd1211rw/zd_mac.c @@ -21,7 +21,7 @@ struct zd_reg_alpha2_map { u32 reg; - char...
c04d96913c88fdc11400ca6dd7f436bb6ecc764c
Analyze and fix the following issue in the Linux kernel code: wifi: mwifiex: Add __nonstring annotations for unterminated strings
Problem Details: When a character array without a terminating NUL character has a static initializer, GCC 15's -Wunterminated-string-initialization will only warn if the array lacks the "nonstring" attribute[1]. Mark the arrays with __nonstring to and correctly identify the char array as "not a C string" and thereby el...
```diff diff --git a/drivers/net/wireless/marvell/mwifiex/cfp.c b/drivers/net/wireless/marvell/mwifiex/cfp.c index d39092b99212..d7fd79214bcf 100644 --- a/drivers/net/wireless/marvell/mwifiex/cfp.c +++ b/drivers/net/wireless/marvell/mwifiex/cfp.c @@ -150,7 +150,7 @@ static const u16 ac_mcs_rate_nss2[8][10] = { struc...
8ae227f8a7749eec92fc381dfbe213429c852278
Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: fix MPDU length parsing for EHT 5/6 GHz
Problem Details: The MPDU length is only configured using the EHT capabilities element on 2.4 GHz. On 5/6 GHz it is configured using the VHT or HE capabilities respectively. Fixes: cf0079279727 ("wifi: mac80211: parse A-MSDU len from EHT capabilities") Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@inte...
```diff diff --git a/net/mac80211/eht.c b/net/mac80211/eht.c index 7a3116c36df9..fd41046e3b68 100644 --- a/net/mac80211/eht.c +++ b/net/mac80211/eht.c @@ -2,7 +2,7 @@ /* * EHT handling * - * Copyright(c) 2021-2024 Intel Corporation + * Copyright(c) 2021-2025 Intel Corporation */ #include "ieee80211_i.h" @@ -7...
379c590113ce46f605439d4887996c60ab8820cc
Analyze and fix the following issue in the Linux kernel code: ARM: shmobile: smp: Enforce shmobile_smp_* alignment
Problem Details: When the addresses of the shmobile_smp_mpidr, shmobile_smp_fn, and shmobile_smp_arg variables are not multiples of 4 bytes, secondary CPU bring-up fails: smp: Bringing up secondary CPUs ... CPU1: failed to come online CPU2: failed to come online CPU3: failed to come online smp: Bro...
```diff diff --git a/arch/arm/mach-shmobile/headsmp.S b/arch/arm/mach-shmobile/headsmp.S index a956b489b6ea..2bc7e73a8582 100644 --- a/arch/arm/mach-shmobile/headsmp.S +++ b/arch/arm/mach-shmobile/headsmp.S @@ -136,6 +136,7 @@ ENDPROC(shmobile_smp_sleep) .long shmobile_smp_arg - 1b .bss + .align 2 .globl shmobi...
9a1c57fe26f23c4c996c51c5948d727068f306de
Analyze and fix the following issue in the Linux kernel code: perf parse-events: Corrections to topdown sorting
Problem Details: In the case of '{instructions,slots},faults,topdown-retiring' the first event that must be grouped, slots, is ignored causing the topdown-retiring event not to be adjacent to the group it needs to be inserted into. Don't ignore the group members when computing the force_grouped_index. Make the force_g...
```diff diff --git a/tools/perf/arch/x86/util/evlist.c b/tools/perf/arch/x86/util/evlist.c index 447a734e591c..ed205d1b207d 100644 --- a/tools/perf/arch/x86/util/evlist.c +++ b/tools/perf/arch/x86/util/evlist.c @@ -76,12 +76,15 @@ int arch_evlist__cmp(const struct evsel *lhs, const struct evsel *rhs) * topdown metr...
b74683b3bb224eccb644cf260753dfc82e802d92
Analyze and fix the following issue in the Linux kernel code: perf x86/topdown: Fix topdown leader sampling test error on hybrid
Problem Details: When running topdown leader smapling test on Intel hybrid platforms, such as LNL/ARL, we see the below error. Topdown leader sampling test Topdown leader sampling [Failed topdown events not reordered correctly] It indciates the below command fails. perf record -o "${perfdata}" -e "{instructions,slot...
```diff diff --git a/tools/perf/arch/x86/util/topdown.c b/tools/perf/arch/x86/util/topdown.c index f63747d0abdf..d1c654839049 100644 --- a/tools/perf/arch/x86/util/topdown.c +++ b/tools/perf/arch/x86/util/topdown.c @@ -81,7 +81,7 @@ bool arch_topdown_sample_read(struct evsel *leader) */ evlist__for_each_entry(lead...
eb7e83a7ca2dba01671c711e1711705e1a15626d
Analyze and fix the following issue in the Linux kernel code: perf evsel: tp_format accessing improvements
Problem Details: Ensure evsel__clone copies the tp_sys and tp_name variables. In evsel__tp_format, if tp_sys isn't set, use the config value to find the tp_format. This succeeds in python code where pyrf__tracepoint has already found the format. Reviewed-by: Howard Chu <howardchu95@gmail.com> Signed-off-by: Ian Rogers...
```diff diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index 4a0ef095db92..1974395492d7 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -521,6 +521,16 @@ struct evsel *evsel__clone(struct evsel *dest, struct evsel *orig) } evsel->cgrp = cgroup__get(orig->cgrp); #ifdef HAVE_LIB...
fe0ce8a9d85a48642880c9b78944cb0d23e779c5
Analyze and fix the following issue in the Linux kernel code: perf evlist: Add success path to evlist__create_syswide_maps
Problem Details: Over various refactorings evlist__create_syswide_maps has been made to only ever return with -ENOMEM. Fix this so that when perf_evlist__set_maps is successfully called, 0 is returned. Reviewed-by: Howard Chu <howardchu95@gmail.com> Signed-off-by: Ian Rogers <irogers@google.com> Reviewed-by: Arnaldo C...
```diff diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 43adf6b3d855..49e10d6981ad 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -1373,19 +1373,18 @@ static int evlist__create_syswide_maps(struct evlist *evlist) */ cpus = perf_cpu_map__new_online_cpus(); if (!cpus...
bda840191d2aae3b7cadc3ac21835dcf29487191
Analyze and fix the following issue in the Linux kernel code: perf debug: Avoid stack overflow in recursive error message
Problem Details: In debug_file, pr_warning_once is called on error. As that function calls debug_file the function will yield a stack overflow. Switch the location of the call so the recursion is avoided. Reviewed-by: Howard Chu <howardchu95@gmail.com> Signed-off-by: Ian Rogers <irogers@google.com> Reviewed-by: Arnald...
```diff diff --git a/tools/perf/util/debug.c b/tools/perf/util/debug.c index 995f6bb05b5f..f9ef7d045c92 100644 --- a/tools/perf/util/debug.c +++ b/tools/perf/util/debug.c @@ -46,8 +46,8 @@ int debug_type_profile; FILE *debug_file(void) { if (!_debug_file) { - pr_warning_once("debug_file not set"); debug_set_fil...
b0543d50c4cbc34ca612ab17c3cc9f2d174be8e0
Analyze and fix the following issue in the Linux kernel code: mm: Fix a build breakage in memcontrol-v1.c
Problem Details: While adding a deprecation message, fd4fd0a869e9 ("mm: Add transformation message for per-memcg swappiness") missed the semicolon after the new pr_info_once() statement causing build breakage when CONFIG_MEMCG_V1 is enabled. Fix it. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Michal Koutný <mkoutny@s...
```diff diff --git a/mm/memcontrol-v1.c b/mm/memcontrol-v1.c index 93291c0e6eac..67e786d3b17c 100644 --- a/mm/memcontrol-v1.c +++ b/mm/memcontrol-v1.c @@ -1857,7 +1857,7 @@ static int mem_cgroup_swappiness_write(struct cgroup_subsys_state *css, if (!mem_cgroup_is_root(memcg)) { pr_info_once("Per memcg swappiness...
a1eb95d6b5f4cf5cc7b081e85e374d1dd98a213b
Analyze and fix the following issue in the Linux kernel code: scripts: generate_rust_analyzer: add uapi crate
Problem Details: Commit 4e1746656839 ("rust: uapi: Add UAPI crate") did not update rust-analyzer to include the new crate. Add the missing definition to improve the developer experience. Fixes: 4e1746656839 ("rust: uapi: Add UAPI crate") Signed-off-by: Tamir Duberstein <tamird@gmail.com> Tested-by: Andreas Hindborg <...
```diff diff --git a/scripts/generate_rust_analyzer.py b/scripts/generate_rust_analyzer.py index f2d6787e9c0c..adae71544cbd 100755 --- a/scripts/generate_rust_analyzer.py +++ b/scripts/generate_rust_analyzer.py @@ -117,7 +117,8 @@ def generate_crates(srctree, objtree, sysroot_src, external_src, cfgs): } ...
d1f928052439cad028438a8b8b34c1f01bc06068
Analyze and fix the following issue in the Linux kernel code: scripts: generate_rust_analyzer: add missing include_dirs
Problem Details: Commit 8c4555ccc55c ("scripts: add `generate_rust_analyzer.py`") specified OBJTREE for the bindings crate, and `source.include_dirs` for the kernel crate, likely in an attempt to support out-of-source builds for those crates where the generated files reside in `objtree` rather than `srctree`. This was ...
```diff diff --git a/scripts/generate_rust_analyzer.py b/scripts/generate_rust_analyzer.py index b40679a90843..f2d6787e9c0c 100755 --- a/scripts/generate_rust_analyzer.py +++ b/scripts/generate_rust_analyzer.py @@ -97,27 +97,27 @@ def generate_crates(srctree, objtree, sysroot_src, external_src, cfgs): ["core",...
2e0f91aba507a3cb59f7a12fc3ea2b7d4d6675b7
Analyze and fix the following issue in the Linux kernel code: scripts: generate_rust_analyzer: add missing macros deps
Problem Details: The macros crate has depended on std and proc_macro since its introduction in commit 1fbde52bde73 ("rust: add `macros` crate"). These dependencies were omitted from commit 8c4555ccc55c ("scripts: add `generate_rust_analyzer.py`") resulting in missing go-to-definition and autocomplete, and false-positiv...
```diff diff --git a/scripts/generate_rust_analyzer.py b/scripts/generate_rust_analyzer.py index aa8ea1a4dbe5..b40679a90843 100755 --- a/scripts/generate_rust_analyzer.py +++ b/scripts/generate_rust_analyzer.py @@ -57,14 +57,26 @@ def generate_crates(srctree, objtree, sysroot_src, external_src, cfgs): crates_i...
a7e23ec17feecc7bac0d500cea900cace7b50129
Analyze and fix the following issue in the Linux kernel code: ACPI: button: Install notifier for system events as well
Problem Details: On some systems when the system is put to sleep pressing the ACPI power button will cause the EC SCI to try to wake the system by a Notify(DEV, 0x2) with an intention to wake the system up from suspend. This behavior matches the ACPI specification in ACPI 6.4 section 4.8.3.1.1.2 which describes that t...
```diff diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c index 7773e6b860e7..90b09840536d 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c @@ -24,6 +24,7 @@ #define ACPI_BUTTON_CLASS "button" #define ACPI_BUTTON_FILE_STATE "state" #define ACPI_BUTTON_TYPE_UNKNOWN 0x00 +#define ACPI_BUTTON_N...
701d0e910955627734917c3587258aa7e73068bb
Analyze and fix the following issue in the Linux kernel code: pinctrl: samsung: add support for eint_fltcon_offset
Problem Details: On gs101 SoC the fltcon0 (filter configuration 0) offset isn't at a fixed offset like previous SoCs as the fltcon1 register only exists when there are more than 4 pins in the bank. Add a eint_fltcon_offset and new GS101_PIN_BANK_EINT* macros that take an additional fltcon_offs variable. This can then...
```diff diff --git a/drivers/pinctrl/samsung/pinctrl-exynos-arm64.c b/drivers/pinctrl/samsung/pinctrl-exynos-arm64.c index e35e5a8e23a0..dd07720e32cc 100644 --- a/drivers/pinctrl/samsung/pinctrl-exynos-arm64.c +++ b/drivers/pinctrl/samsung/pinctrl-exynos-arm64.c @@ -1677,83 +1677,83 @@ const struct samsung_pinctrl_of_m...
5daa0c35a1f0e7a6c3b8ba9cb721e7d1ace6e619
Analyze and fix the following issue in the Linux kernel code: rust: Disallow BTF generation with Rust + LTO
Problem Details: The kernel cannot currently self-parse BTF containing Rust debug information. pahole uses the language of the CU to determine whether to filter out debug information when generating the BTF. When LTO is enabled, Rust code can cross CU boundaries, resulting in Rust debug information in CUs labeled as C....
```diff diff --git a/init/Kconfig b/init/Kconfig index d0d021b3fa3b..324c2886b2ea 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -1973,7 +1973,7 @@ config RUST depends on !MODVERSIONS || GENDWARFKSYMS depends on !GCC_PLUGIN_RANDSTRUCT depends on !RANDSTRUCT - depends on !DEBUG_INFO_BTF || PAHOLE_HAS_LANG_EXCLUDE...
ee735aa33db16c1fb5ebccbaf84ad38f5583f3cc
Analyze and fix the following issue in the Linux kernel code: iio: light: Add check for array bounds in veml6075_read_int_time_ms
Problem Details: The array contains only 5 elements, but the index calculated by veml6075_read_int_time_index can range from 0 to 7, which could lead to out-of-bounds access. The check prevents this issue. Coverity Issue CID 1574309: (#1 of 1): Out-of-bounds read (OVERRUN) overrun-local: Overrunning array veml6075_it_...
```diff diff --git a/drivers/iio/light/veml6075.c b/drivers/iio/light/veml6075.c index 05d4c0e9015d..859891e8f115 100644 --- a/drivers/iio/light/veml6075.c +++ b/drivers/iio/light/veml6075.c @@ -195,13 +195,17 @@ static int veml6075_read_uv_direct(struct veml6075_data *data, int chan, static int veml6075_read_int_ti...
2416cec859299be04d021b4cf98eff814f345af7
Analyze and fix the following issue in the Linux kernel code: iio: adc: ad7768-1: set MOSI idle state to prevent accidental reset
Problem Details: Datasheet recommends Setting the MOSI idle state to high in order to prevent accidental reset of the device when SCLK is free running. This happens when the controller clocks out a 1 followed by 63 zeros while the CS is held low. Check if SPI controller supports SPI_MOSI_IDLE_HIGH flag and set it. Fi...
```diff diff --git a/drivers/iio/adc/ad7768-1.c b/drivers/iio/adc/ad7768-1.c index 09e7cccfd51c..a75247cdcaa7 100644 --- a/drivers/iio/adc/ad7768-1.c +++ b/drivers/iio/adc/ad7768-1.c @@ -572,6 +572,21 @@ static int ad7768_probe(struct spi_device *spi) return -ENOMEM; st = iio_priv(indio_dev); + /* + * Datasheet...
8236644f5ecb180e80ad92d691c22bc509b747bb
Analyze and fix the following issue in the Linux kernel code: iio: adc: ad7768-1: Fix conversion result sign
Problem Details: The ad7768-1 ADC output code is two's complement, meaning that the voltage conversion result is a signed value.. Since the value is a 24 bit one, stored in a 32 bit variable, the sign should be extended in order to get the correct representation. Also the channel description has been updated to signed...
```diff diff --git a/drivers/iio/adc/ad7768-1.c b/drivers/iio/adc/ad7768-1.c index ea829c51e80b..09e7cccfd51c 100644 --- a/drivers/iio/adc/ad7768-1.c +++ b/drivers/iio/adc/ad7768-1.c @@ -142,7 +142,7 @@ static const struct iio_chan_spec ad7768_channels[] = { .channel = 0, .scan_index = 0, .scan_type = { - .s...
7b6033ed5a9e1a369a9cf58018388ae4c5f17e41
Analyze and fix the following issue in the Linux kernel code: iio: adc: ad7173: Fix comparison of channel configs
Problem Details: Checking the binary representation of two structs (of the same type) for equality doesn't have the same semantic as comparing all members for equality. The former might find a difference where the latter doesn't in the presence of padding or when ambiguous types like float or bool are involved. (Floats...
```diff diff --git a/drivers/iio/adc/ad7173.c b/drivers/iio/adc/ad7173.c index 9ac8ea3cb499..69de5886474c 100644 --- a/drivers/iio/adc/ad7173.c +++ b/drivers/iio/adc/ad7173.c @@ -197,7 +197,11 @@ struct ad7173_channel_config { u8 cfg_slot; bool live; - /* Following fields are used to compare equality. */ + /* + ...
05a5d874f7327b75e9bc4359618017e047cc129c
Analyze and fix the following issue in the Linux kernel code: iio: adc: ad7124: Fix comparison of channel configs
Problem Details: Checking the binary representation of two structs (of the same type) for equality doesn't have the same semantic as comparing all members for equality. The former might find a difference where the latter doesn't in the presence of padding or when ambiguous types like float or bool are involved. (Floats...
```diff diff --git a/drivers/iio/adc/ad7124.c b/drivers/iio/adc/ad7124.c index 6bc418d38820..de90ecb5f630 100644 --- a/drivers/iio/adc/ad7124.c +++ b/drivers/iio/adc/ad7124.c @@ -151,7 +151,11 @@ struct ad7124_chip_info { struct ad7124_channel_config { bool live; unsigned int cfg_slot; - /* Following fields are us...
280acb19824663d55a3f4d09087c76fabe86fa3c
Analyze and fix the following issue in the Linux kernel code: iio: adc: ad4130: Fix comparison of channel setups
Problem Details: Checking the binary representation of two structs (of the same type) for equality doesn't have the same semantic as comparing all members for equality. The former might find a difference where the latter doesn't in the presence of padding or when ambiguous types like float or bool are involved. (Floats...
```diff diff --git a/drivers/iio/adc/ad4130.c b/drivers/iio/adc/ad4130.c index f3ae41214326..af0b2be1bab0 100644 --- a/drivers/iio/adc/ad4130.c +++ b/drivers/iio/adc/ad4130.c @@ -224,6 +224,10 @@ enum ad4130_pin_function { AD4130_PIN_FN_VBIAS = BIT(3), }; +/* + * If you make adaptations in this struct, you most li...
fb3a0811a7bc12d51cba4b75d6b123ab62e2fe4d
Analyze and fix the following issue in the Linux kernel code: iio: adc: ad_sigma_delta: Disable channel after calibration
Problem Details: The function ad_sd_calibrate() enables the channel to calibrate at function entry but doesn't disable it on exit. This is problematic because if two (or more) channels are calibrated in a row, the second calibration isn't executed as intended as the first (still enabled) channel is recalibrated and aft...
```diff diff --git a/drivers/iio/adc/ad_sigma_delta.c b/drivers/iio/adc/ad_sigma_delta.c index 5907c35b98e5..d91a3ba127e3 100644 --- a/drivers/iio/adc/ad_sigma_delta.c +++ b/drivers/iio/adc/ad_sigma_delta.c @@ -339,6 +339,7 @@ int ad_sd_calibrate(struct ad_sigma_delta *sigma_delta, out: sigma_delta->keep_cs_asserted...
a8045e46c508b70fe4b30cc020fd0a2b0709b2e5
Analyze and fix the following issue in the Linux kernel code: drm/i915: Increase I915_PARAM_MMAP_GTT_VERSION version to indicate support for partial mmaps
Problem Details: Commit 255fc1703e42 ("drm/i915/gem: Calculate object page offset for partial memory mapping") was the last patch of several patches fixing multiple partial mmaps. But without a bump in I915_PARAM_MMAP_GTT_VERSION there is no clean way for UMD to know if it can do multiple partial mmaps. Fixes: 255fc17...
```diff diff --git a/drivers/gpu/drm/i915/gem/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/i915_gem_mman.c index 21274aa9bddd..c3dabb857960 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_mman.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_mman.c @@ -164,6 +164,9 @@ static unsigned int tile_row_pages(const struct drm_i915_gem_...
7597794706952db4adada29b2a6593251cddcd85
Analyze and fix the following issue in the Linux kernel code: dt-bindings: mmc: Change to additionalProperties to fix fail detect Unevaluated property
Problem Details: mmc-controller.yaml is common schema file. According to writing-schema.rst, * additionalProperties: true Rare case, used for schemas implementing common set of properties. Such schemas are supposed to be referenced by other schemas, which then use 'unevaluatedProperties: false'. Typically bu...
```diff diff --git a/Documentation/devicetree/bindings/mmc/mmc-controller.yaml b/Documentation/devicetree/bindings/mmc/mmc-controller.yaml index 9d7a1298c455..26e4f0f8dc1c 100644 --- a/Documentation/devicetree/bindings/mmc/mmc-controller.yaml +++ b/Documentation/devicetree/bindings/mmc/mmc-controller.yaml @@ -24,7 +24,...
02e1cf7a352a3ba5f768849f2b4fcaaaa19f89e3
Analyze and fix the following issue in the Linux kernel code: ASoC: amd: acp: Fix for enabling DMIC on acp platforms via _DSD entry
Problem Details: Add condition check to register ACP PDM sound card by reading _WOV acpi entry. Fixes: 09068d624c49 ("ASoC: amd: acp: fix for acp platform device creation failure") Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Link: https://patch.msgid.link/20250310183201.11979-15-venkataprasa...
```diff diff --git a/sound/soc/amd/acp/acp-legacy-common.c b/sound/soc/amd/acp/acp-legacy-common.c index 988b7a17b2f4..255f90ca956a 100644 --- a/sound/soc/amd/acp/acp-legacy-common.c +++ b/sound/soc/amd/acp/acp-legacy-common.c @@ -13,6 +13,7 @@ */ #include "amd.h" +#include <linux/acpi.h> #include <linux/pci.h> ...
fb3bbc46c94f261b6156ee863c1b06c84cf157dc
Analyze and fix the following issue in the Linux kernel code: mmc: sdhci: Disable SD card clock before changing parameters
Problem Details: Per the SD Host Controller Simplified Specification v4.20 §3.2.3, change the SD card clock parameters only after first disabling the external card clock. Doing this fixes a spurious clock pulse on Baytrail and Apollo Lake SD controllers which otherwise breaks voltage switching with a specific Swissbit ...
```diff diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index f4a7733a8ad2..5f91b44891f9 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -2065,10 +2065,15 @@ void sdhci_set_clock(struct sdhci_host *host, unsigned int clock) host->mmc->actual_clock = 0; - sdhci_writew(host,...
858c7bfcb35e1100b58bb63c9f562d86e09418d9
Analyze and fix the following issue in the Linux kernel code: arm64/boot: Enable EL2 requirements for FEAT_PMUv3p9
Problem Details: FEAT_PMUv3p9 registers such as PMICNTR_EL0, PMICFILTR_EL0, and PMUACR_EL1 access from EL1 requires appropriate EL2 fine grained trap configuration via FEAT_FGT2 based trap control registers HDFGRTR2_EL2 and HDFGWTR2_EL2. Otherwise such register accesses will result in traps into EL2. Add a new helper ...
```diff diff --git a/Documentation/arch/arm64/booting.rst b/Documentation/arch/arm64/booting.rst index cad6fdc96b98..dee7b6de864f 100644 --- a/Documentation/arch/arm64/booting.rst +++ b/Documentation/arch/arm64/booting.rst @@ -288,6 +288,12 @@ Before jumping into the kernel, the following conditions must be met: ...
a8dfb2168906944ea61acfc87846b816eeab882d
Analyze and fix the following issue in the Linux kernel code: jfs: add index corruption check to DT_GETPAGE()
Problem Details: If the file system is corrupted, the header.stblindex variable may become greater than 127. Because of this, an array access out of bounds may occur: ------------[ cut here ]------------ UBSAN: array-index-out-of-bounds in fs/jfs/jfs_dtree.c:3096:10 index 237 is out of range for type 'struct dtslot[12...
```diff diff --git a/fs/jfs/jfs_dtree.c b/fs/jfs/jfs_dtree.c index 8f85177f284b..93db6eec4465 100644 --- a/fs/jfs/jfs_dtree.c +++ b/fs/jfs/jfs_dtree.c @@ -117,7 +117,8 @@ do { \ if (!(RC)) { \ if (((P)->header.nextindex > \ (((BN) == 0) ? DTROOTMAXSLOT : (P)->header.maxslot)) || \ - (...
3e3fcd29b505cebed659311337ea03b7698767fc
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: NULL-check BO's backing store when determining GFX12 PTE flags
Problem Details: PRT BOs may not have any backing store, so bo->tbo.resource will be NULL. Check for that before dereferencing. Fixes: 0cce5f285d9a ("drm/amdkfd: Check correct memory types for is_system variable") Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Natalie Vock <natalie.vock@gmx.de>...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c index ea7c32d8380b..bf8d01da8815 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c @@ -528,8 +528,9 @@ static void gmc_v12_0_get_vm_pte(struct amdgpu_device *adev, bo_a...
760632fa2e3dbb13a9b55acbb960592628d274dd
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: fix SI's GB_ADDR_CONFIG_GOLDEN values and wire up sid.h in GFX6
Problem Details: By wiring up sid.h in GFX6, we end up with a few duplicated defines such as the golden registers. Let's clean this up. [TAHITI,VERDE, HAINAN]_GB_ADDR_CONFIG_GOLDEN were defined both in sid.h and under si_enums.h, with different values. Keep the values used under radeon and move them under gfx_v6_0.c w...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c index 2f5cf87ede88..13fbee46417a 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c @@ -28,19 +28,30 @@ #include "amdgpu_gfx.h" #include "amdgpu_ucode.h" #include "clearstate...
9324731b9985478faf7f77713cc5e5fee811716e
Analyze and fix the following issue in the Linux kernel code: wifi: iwlwifi: mld: avoid selecting bad links
Problem Details: Currently, we don't select a link that wasn't heared in the last 5 seconds. But if the link started to suffer from missed beacons more recent than that, we might select this link even we really shouldn't, leading to a disconnection instead of a link switch. Fix this by checking if a link was heared in...
```diff diff --git a/drivers/net/wireless/intel/iwlwifi/mld/mlo.c b/drivers/net/wireless/intel/iwlwifi/mld/mlo.c index 99ba4018fb24..a5b1d373922a 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/mlo.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/mlo.c @@ -704,10 +704,9 @@ iwl_mld_set_link_sel_data(struct iwl_mld *ml...
d414ff7a733819f78a49b832fad6d4e7cb1f9150
Analyze and fix the following issue in the Linux kernel code: wifi: iwlwifi: mld: fix bad RSSI handling
Problem Details: If the RSSI is dropping to below the threshold, we need to do a MLO scan to try select a better link. This is true also if the connection doesn't have EMLSR capability, and also if we are in EMLSR. Fix the logic to always check the RSSI (and do a MLO scan if needed). Signed-off-by: Miri Korenblit <mir...
```diff diff --git a/drivers/net/wireless/intel/iwlwifi/mld/stats.c b/drivers/net/wireless/intel/iwlwifi/mld/stats.c index a9d3860d8f9c..75cb204c2419 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/stats.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/stats.c @@ -378,15 +378,11 @@ static void iwl_mld_update_link_sig...
fd04fbee7f0f8ec986772d41a1e1717f5bcf941c
Analyze and fix the following issue in the Linux kernel code: wifi: iwlwifi: mld: enable OMI bandwidth reduction on 6 GHz
Problem Details: Due to the iwl_mld_get_chandef_from_chanctx() logic, even after the OMI handshake to reduce bandwidth the driver wouldn't apply that to the PHY context, since it always uses the normal, not the reduced, configuration on 6 GHz (not strictly always, but OMI will only apply if the original bandwidth is > ...
```diff diff --git a/drivers/net/wireless/intel/iwlwifi/mld/link.c b/drivers/net/wireless/intel/iwlwifi/mld/link.c index f6d482817f1b..1db69aee4e9f 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/link.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/link.c @@ -67,7 +67,7 @@ static void iwl_mld_fill_rates(struct iwl_m...
b807dec3e82ae623e0ec45a26e485548d91bbe9c
Analyze and fix the following issue in the Linux kernel code: wifi: iwlwifi: mld: fix OMI time protection logic
Problem Details: We're allowed to enter OMI only 5 seconds after the last exit, so the logic needs to be inverted. Fix that. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250309073442.58efb4c91655.Id596fcda2fb28...
```diff diff --git a/drivers/net/wireless/intel/iwlwifi/mld/link.c b/drivers/net/wireless/intel/iwlwifi/mld/link.c index 64ebafc35c9b..f6d482817f1b 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/link.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/link.c @@ -760,8 +760,8 @@ void iwl_mld_check_omi_bw_reduction(struc...
8d006c92132ed8bafc95feb314bcd3c5dd2e6bce
Analyze and fix the following issue in the Linux kernel code: wifi: iwlwifi: mld: assume wiphy is locked when getting BSS ifaces
Problem Details: The code was calling ieee80211_iterate_interfaces, however that takes a lock of iflist_mtx, which must not be taken recursively. Fix this by using the appropriate _mtx version that asserts that the wiphy mutex is already held. Signed-off-by: Benjamin Berg <benjamin.berg@intel.com> Signed-off-by: Miri ...
```diff diff --git a/drivers/net/wireless/intel/iwlwifi/mld/iface.c b/drivers/net/wireless/intel/iwlwifi/mld/iface.c index 691062b44461..e49e2260ac05 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/iface.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/iface.c @@ -465,10 +465,10 @@ u8 iwl_mld_get_fw_bss_vifs_ids(stru...
cb9716eae2dfac2f70fea19df928e61bed314ce9
Analyze and fix the following issue in the Linux kernel code: wifi: iwlwifi: mld: fix SMPS W/A
Problem Details: If the user disables power save of a vif that didn't have it enabled (for example before association), mac80211 will not notify the driver with BSS_CHANGED_PS. This will cause the driver to not update the device-level power save to disabled. Fix this by checking the vif's power save status upon authori...
```diff diff --git a/drivers/net/wireless/intel/iwlwifi/mld/iface.h b/drivers/net/wireless/intel/iwlwifi/mld/iface.h index 2c928113f680..57910660ed18 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/iface.h +++ b/drivers/net/wireless/intel/iwlwifi/mld/iface.h @@ -134,6 +134,7 @@ struct iwl_mld_emlsr { * @beacon_in...
834bfc698bf7cee3bf61c0209b410c7f97a54108
Analyze and fix the following issue in the Linux kernel code: wifi: iwlwifi: mld: fix build with CONFIG_PM_SLEEP undefined
Problem Details: fw_status.in_d3 is only defined under CONFIG_PM_SLEEP. Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Link: https://patch.msgid.link/20250309073442.6f7e44a27b87.I78b9311019b59477a1961cddc4640b255ceda651@changeid Signed-off...
```diff diff --git a/drivers/net/wireless/intel/iwlwifi/mld/hcmd.h b/drivers/net/wireless/intel/iwlwifi/mld/hcmd.h index 773bc1b09392..64a8d4248324 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/hcmd.h +++ b/drivers/net/wireless/intel/iwlwifi/mld/hcmd.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0 OR BSD-3...
3ad61970ac9e164be1b09b46c01aa942e8966132
Analyze and fix the following issue in the Linux kernel code: wifi: iwlwifi: mvm: fix setting the TK when associated
Problem Details: When running secured ranging and the initiator is associated with the responder, the TK was not set in the range request command. Fix it. Signed-off-by: Avraham Stern <avraham.stern@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/202503082314...
```diff diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c b/drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c index dfb25b964f0e..a493ef6bedc3 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c @@ -672,7 +672,11 @@ iwl_...
7d953a06241624ee2efb172d037a4168978f4147
Analyze and fix the following issue in the Linux kernel code: arm64: realm: Use aliased addresses for device DMA to shared buffers
Problem Details: When a device performs DMA to a shared buffer using physical addresses, (without Stage1 translation), the device must use the "{I}PA address" with the top bit set in Realm. This is to make sure that a trusted device will be able to write to shared buffers as well as the protected buffers. Thus, a Realm...
```diff diff --git a/arch/arm64/include/asm/mem_encrypt.h b/arch/arm64/include/asm/mem_encrypt.h index f8f78f622dd2..a2a1eeb36d4b 100644 --- a/arch/arm64/include/asm/mem_encrypt.h +++ b/arch/arm64/include/asm/mem_encrypt.h @@ -21,4 +21,15 @@ static inline bool force_dma_unencrypted(struct device *dev) return is_realm...
b66e2ee7b6c8d45bbe4b6f6885ee27511506812c
Analyze and fix the following issue in the Linux kernel code: dma: Introduce generic dma_addr_*crypted helpers
Problem Details: AMD SME added __sme_set/__sme_clr primitives to modify the DMA address for encrypted/decrypted traffic. However this doesn't fit in with other models, e.g., Arm CCA where the meanings are the opposite. i.e., "decrypted" traffic has a bit set and "encrypted" traffic has the top bit cleared. In preparat...
```diff diff --git a/include/linux/dma-direct.h b/include/linux/dma-direct.h index d20ecc24cb0f..f3bc0bcd7098 100644 --- a/include/linux/dma-direct.h +++ b/include/linux/dma-direct.h @@ -78,14 +78,18 @@ static inline dma_addr_t dma_range_map_max(const struct bus_dma_region *map) #define phys_to_dma_unencrypted phys_t...
5b1122fc4995f308b21d7cfc64ef9880ac834d20
Analyze and fix the following issue in the Linux kernel code: platform/x86/amd/pmf: fix cleanup in amd_pmf_init_smart_pc()
Problem Details: There are a few problems in this code: First, if amd_pmf_tee_init() fails then the function returns directly instead of cleaning up. We cannot simply do a "goto error;" because the amd_pmf_tee_init() cleanup calls tee_shm_free(dev->fw_shm_pool); and amd_pmf_tee_deinit() calls it as well leading to a ...
```diff diff --git a/drivers/platform/x86/amd/pmf/tee-if.c b/drivers/platform/x86/amd/pmf/tee-if.c index ceaff1ebb7b9..a1e43873a07b 100644 --- a/drivers/platform/x86/amd/pmf/tee-if.c +++ b/drivers/platform/x86/amd/pmf/tee-if.c @@ -510,18 +510,18 @@ int amd_pmf_init_smart_pc(struct amd_pmf_dev *dev) ret = amd_pmf_se...
c380931712d16e23f6aa90703f438330139e9731
Analyze and fix the following issue in the Linux kernel code: dma: Fix encryption bit clearing for dma_to_phys
Problem Details: phys_to_dma() sets the encryption bit on the translated DMA address. But dma_to_phys() clears the encryption bit after it has been translated back to the physical address, which could fail if the device uses DMA ranges. AMD SME doesn't use the DMA ranges and thus this is harmless. But as we are about ...
```diff diff --git a/include/linux/dma-direct.h b/include/linux/dma-direct.h index d7e30d4f7503..d20ecc24cb0f 100644 --- a/include/linux/dma-direct.h +++ b/include/linux/dma-direct.h @@ -101,12 +101,13 @@ static inline phys_addr_t dma_to_phys(struct device *dev, dma_addr_t dma_addr) { phys_addr_t paddr; + dma_addr...
dbac8feb23382af1efa2e1a86049e079b6e42e12
Analyze and fix the following issue in the Linux kernel code: bcachefs: Make sure trans is unlocked when submitting read IO
Problem Details: We were still using the trans after the unlock, leading to this bug in the retry path: 00255 ------------[ cut here ]------------ 00255 kernel BUG at fs/bcachefs/btree_iter.c:3348! 00255 Internal error: Oops - BUG: 00000000f2000800 [#1] SMP 00255 bcachefs (0ca38fe8-0a26-41f9-9b5d-6a27796c7803): /fiote...
```diff diff --git a/fs/bcachefs/io_read.c b/fs/bcachefs/io_read.c index 8c7b2d3d779d..726da68073e2 100644 --- a/fs/bcachefs/io_read.c +++ b/fs/bcachefs/io_read.c @@ -951,12 +951,6 @@ retry_pick: goto retry_pick; } - /* - * Unlock the iterator while the btree node's lock is still in - * cache, before doing the...
58517f4df8424ec28dfe7290ccc61908eda57aae
Analyze and fix the following issue in the Linux kernel code: bcachefs: Initialize from_inode members for bch_io_opts
Problem Details: When there is no inode source, all "from_inode" members in the structure bhc_io_opts should be set false. Fixes: 7a7c43a0c1ecf ("bcachefs: Add bch_io_opts fields for indicating whether the opts came from the inode") Reported-by: syzbot+c17ad4b4367b72a853cb@syzkaller.appspotmail.com Closes: https://syz...
```diff diff --git a/fs/bcachefs/inode.c b/fs/bcachefs/inode.c index 04ec05206f8c..339b80770f1d 100644 --- a/fs/bcachefs/inode.c +++ b/fs/bcachefs/inode.c @@ -1198,6 +1198,7 @@ void bch2_inode_opts_get(struct bch_io_opts *opts, struct bch_fs *c, opts->_name##_from_inode = true; \ } else { \ opts->_name ...
73276cee1a25c4a56266faf6cf0f33e88bb63859
Analyze and fix the following issue in the Linux kernel code: selftest/powerpc/mm/pkey: fix build-break introduced by commit 00894c3fc917
Problem Details: Build break was reported in the powerpc mailing list for next-20250218 with below errors make[1]: Nothing to be done for 'all'. BUILD_TARGET=/root/venkat/linux-next/tools/testing/selftests/powerpc/mm; mkdir -p $BUILD_TARGET; make OUTPUT=$BUILD_TARGET -k -C mm all CC pkey_exec_prot In file incl...
```diff diff --git a/tools/testing/selftests/powerpc/include/pkeys.h b/tools/testing/selftests/powerpc/include/pkeys.h index c6d4063dd4f6..d6deb6ffa1b9 100644 --- a/tools/testing/selftests/powerpc/include/pkeys.h +++ b/tools/testing/selftests/powerpc/include/pkeys.h @@ -24,6 +24,9 @@ #undef PKEY_DISABLE_EXECUTE #defi...
0ccd5d56e6b2f342096a362ac24785d4be9c64a2
Analyze and fix the following issue in the Linux kernel code: watchdog: lenovo_se30_wdt: include io.h for devm_ioremap()
Problem Details: After merging the watchdog tree, today's linux-next build (x86_64 allmodconfig) failed like this: drivers/watchdog/lenovo_se30_wdt.c: In function 'lenovo_se30_wdt_probe': drivers/watchdog/lenovo_se30_wdt.c:272:31: error: implicit declaration of function 'devm_ioremap' [-Wimplicit-function-declaration]...
```diff diff --git a/drivers/watchdog/lenovo_se30_wdt.c b/drivers/watchdog/lenovo_se30_wdt.c index f25429da0cec..024b842499b3 100644 --- a/drivers/watchdog/lenovo_se30_wdt.c +++ b/drivers/watchdog/lenovo_se30_wdt.c @@ -5,6 +5,7 @@ #define dev_fmt(fmt) KBUILD_MODNAME ": " fmt +#include <linux/io.h> #include <linux...
ad3b7174d4d04b7e2ab81df5857c4da6b4bc1ade
Analyze and fix the following issue in the Linux kernel code: PCI: xilinx-cpm: Add support for Versal Net CPM5NC Root Port controller
Problem Details: The Versal Net ACAP (Adaptive Compute Acceleration Platform) devices incorporate the Coherency and PCIe Gen5 Module, specifically the Next-Generation Compact Module (CPM5NC). The integrated CPM5NC block, along with the built-in bridge, can function as a PCIe Root Port and supports the PCIe Gen5 protoc...
```diff diff --git a/drivers/pci/controller/pcie-xilinx-cpm.c b/drivers/pci/controller/pcie-xilinx-cpm.c index dc8ecdbee56c..d0ab187d917f 100644 --- a/drivers/pci/controller/pcie-xilinx-cpm.c +++ b/drivers/pci/controller/pcie-xilinx-cpm.c @@ -84,6 +84,7 @@ enum xilinx_cpm_version { CPM, CPM5, CPM5_HOST1, + CPM5NC...
57b0302240741e73fe51f88404b3866e0d2933ad
Analyze and fix the following issue in the Linux kernel code: PCI: xilinx-cpm: Fix IRQ domain leak in error path of probe
Problem Details: The IRQ domain allocated for the PCIe controller is not freed if resource_list_first_type() returns NULL, leading to a resource leak. This fix ensures properly cleaning up the allocated IRQ domain in the error path. Fixes: 49e427e6bdd1 ("Merge branch 'pci/host-probe-refactor'") Signed-off-by: Thippes...
```diff diff --git a/drivers/pci/controller/pcie-xilinx-cpm.c b/drivers/pci/controller/pcie-xilinx-cpm.c index 81e8bfae53d0..dc8ecdbee56c 100644 --- a/drivers/pci/controller/pcie-xilinx-cpm.c +++ b/drivers/pci/controller/pcie-xilinx-cpm.c @@ -583,15 +583,17 @@ static int xilinx_cpm_pcie_probe(struct platform_device *pd...
cbf367d5b0aaf4b9d2d411a6cb1637148695fa53
Analyze and fix the following issue in the Linux kernel code: s390/vfio-ap: Notify userspace that guest's AP config changed when mdev removed
Problem Details: The guest's AP configuration is cleared when the mdev is removed, so userspace must be notified that the AP configuration has changed. To this end, this patch: * Removes call to 'signal_guest_ap_cfg_changed()' function from the 'vfio_ap_mdev_unset_kvm()' function because it has no affect given it is...
```diff diff --git a/drivers/s390/crypto/vfio_ap_ops.c b/drivers/s390/crypto/vfio_ap_ops.c index 571f5dcb49c5..bc8669b5c304 100644 --- a/drivers/s390/crypto/vfio_ap_ops.c +++ b/drivers/s390/crypto/vfio_ap_ops.c @@ -652,8 +652,8 @@ static void vfio_ap_matrix_init(struct ap_config_info *info, static void signal_guest_...
c94bff63e49302d4ce36502a85a2710a67332a4f
Analyze and fix the following issue in the Linux kernel code: s390: Remove ioremap_wt() and pgprot_writethrough()
Problem Details: It turns out that while s390 architecture calls its memory-I/O mapping variants write-through and write-back the implementation of ioremap_wt() and pgprot_writethrough() does not match Linux notion of ioremap_wt(). In particular Linux expects ioremap_wt() to be weaker still than ioremap_wc(), allowing...
```diff diff --git a/arch/s390/include/asm/io.h b/arch/s390/include/asm/io.h index fc9933a743d6..251e0372ccbd 100644 --- a/arch/s390/include/asm/io.h +++ b/arch/s390/include/asm/io.h @@ -34,8 +34,6 @@ void unxlate_dev_mem_ptr(phys_addr_t phys, void *addr); #define ioremap_wc(addr, size) \ ioremap_prot((addr), (si...
d2b9d97e89c79c95f8b517e4fa43fd100f936acc
Analyze and fix the following issue in the Linux kernel code: qlcnic: fix memory leak issues in qlcnic_sriov_common.c
Problem Details: Add qlcnic_sriov_free_vlans() in qlcnic_sriov_alloc_vlans() if any sriov_vlans fails to be allocated. Add qlcnic_sriov_free_vlans() to free the memory allocated by qlcnic_sriov_alloc_vlans() if "sriov->allowed_vlans" fails to be allocated. Fixes: 91b7282b613d ("qlcnic: Support VLAN id config.") Cc: st...
```diff diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c index f9dd50152b1e..28d24d59efb8 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c @@ -454,8 +454,10...
27b2fcbd6b98204b0dce62e9aa9540ca0a2b70f1
Analyze and fix the following issue in the Linux kernel code: rtc: renesas-rtca3: Disable interrupts only if the RTC is enabled
Problem Details: If the RTC is not enabled and the code attempts to disable the interrupt, the readb_poll_timeout_atomic() function in the rtca3_alarm_irq_set_helper() may timeout, leading to probe failures. This issue is reproducible on some devices because the initial values of the PIE and AIE bits in the RCR1 regist...
```diff diff --git a/drivers/rtc/rtc-renesas-rtca3.c b/drivers/rtc/rtc-renesas-rtca3.c index a056291d3887..ab816bdf0d77 100644 --- a/drivers/rtc/rtc-renesas-rtca3.c +++ b/drivers/rtc/rtc-renesas-rtca3.c @@ -586,17 +586,14 @@ static int rtca3_initial_setup(struct clk *clk, struct rtca3_priv *priv) */ usleep_range(s...
bfef148f3680e6b9d28e7fca46d9520f80c5e50e
Analyze and fix the following issue in the Linux kernel code: drm/i915: Increase I915_PARAM_MMAP_GTT_VERSION version to indicate support for partial mmaps
Problem Details: Commit 255fc1703e42 ("drm/i915/gem: Calculate object page offset for partial memory mapping") was the last patch of several patches fixing multiple partial mmaps. But without a bump in I915_PARAM_MMAP_GTT_VERSION there is no clean way for UMD to know if it can do multiple partial mmaps. Fixes: 255fc17...
```diff diff --git a/drivers/gpu/drm/i915/gem/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/i915_gem_mman.c index 21274aa9bddd..c3dabb857960 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_mman.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_mman.c @@ -164,6 +164,9 @@ static unsigned int tile_row_pages(const struct drm_i915_gem_...
ed92bc5264c4357d4fca292c769ea9967cd3d3b6
Analyze and fix the following issue in the Linux kernel code: ASoC: codecs: wm0010: Fix error handling path in wm0010_spi_probe()
Problem Details: Free some resources in the error handling path of the probe, as already done in the remove function. Fixes: e3523e01869d ("ASoC: wm0010: Add initial wm0010 DSP driver") Fixes: fd8b96574456 ("ASoC: wm0010: Clear IRQ as wake source and include missing header") Signed-off-by: Christophe JAILLET <christop...
```diff diff --git a/sound/soc/codecs/wm0010.c b/sound/soc/codecs/wm0010.c index edd2cb185c42..9e67fbfc2cca 100644 --- a/sound/soc/codecs/wm0010.c +++ b/sound/soc/codecs/wm0010.c @@ -920,7 +920,7 @@ static int wm0010_spi_probe(struct spi_device *spi) if (ret) { dev_err(wm0010->dev, "Failed to set IRQ %d as wake so...
e5c2bcc0cd47321d78bb4e865d7857304139f95d
Analyze and fix the following issue in the Linux kernel code: nvme: move error logging from nvme_end_req() to __nvme_end_req()
Problem Details: Before the Commit 1f47ed294a2b ("block: cleanup and fix batch completion adding conditions"), blk_mq_add_to_batch() did not add failed passthrough requests to batch, and returned false. After the commit, blk_mq_add_to_batch() always adds passthrough requests to batch regardless of whether the request f...
```diff diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index f028913e2e62..8359d0aa0e44 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -431,6 +431,12 @@ static inline void nvme_end_req_zoned(struct request *req) static inline void __nvme_end_req(struct request *req) { + if...
3a04334d6282d08fbdd6201e374db17d31927ba3
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix b->written overflow
Problem Details: When bset past end of btree node, we should not add sectors to b->written, which will overflow b->written. Reported-by: syzbot+3cb3d9e8c3f197754825@syzkaller.appspotmail.com Tested-by: syzbot+3cb3d9e8c3f197754825@syzkaller.appspotmail.com Signed-off-by: Alan Huang <mmpgouride@gmail.com> Signed-off-by:...
```diff diff --git a/fs/bcachefs/btree_io.c b/fs/bcachefs/btree_io.c index dece27d9db04..756736f9243d 100644 --- a/fs/bcachefs/btree_io.c +++ b/fs/bcachefs/btree_io.c @@ -1186,7 +1186,7 @@ int bch2_btree_node_read_done(struct bch_fs *c, struct bch_dev *ca, le64_to_cpu(i->journal_seq), b->written, b->w...
cf1ba3cb245020459f2ca446b7a7b199839f5d83
Analyze and fix the following issue in the Linux kernel code: spi: spi-qpic-snand: Fix ECC_CFG_ECC_DISABLE shift in qcom_spi_read_last_cw()
Problem Details: The ECC_CFG_ECC_DISABLE define is BIT(0). It's supposed to be used directly instead of used as a shifter. Fixes: 7304d1909080 ("spi: spi-qpic: add driver for QCOM SPI NAND flash Interface") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://patch.msgid.link/2f4b0a0b-2c03-41c0-8a4a-...
```diff diff --git a/drivers/spi/spi-qpic-snand.c b/drivers/spi/spi-qpic-snand.c index 8c413a6a5152..ffb2b6ec685c 100644 --- a/drivers/spi/spi-qpic-snand.c +++ b/drivers/spi/spi-qpic-snand.c @@ -514,7 +514,7 @@ static int qcom_spi_read_last_cw(struct qcom_nand_controller *snandc, cfg0 = (ecc_cfg->cfg0_raw & ~(7U << C...
8619909b38eeebd3e60910158d7d68441fc954e9
Analyze and fix the following issue in the Linux kernel code: regulator: dummy: force synchronous probing
Problem Details: Sometimes I get a NULL pointer dereference at boot time in kobject_get() with the following call stack: anatop_regulator_probe() devm_regulator_register() regulator_register() regulator_resolve_supply() kobject_get() By placing some extra BUG_ON() statements I could verify that this is rais...
```diff diff --git a/drivers/regulator/dummy.c b/drivers/regulator/dummy.c index 5b9b9e4e762d..9f59889129ab 100644 --- a/drivers/regulator/dummy.c +++ b/drivers/regulator/dummy.c @@ -60,7 +60,7 @@ static struct platform_driver dummy_regulator_driver = { .probe = dummy_regulator_probe, .driver = { .name = "reg...
bcb81ac6ae3c2ef95b44e7b54c3c9522364a245c
Analyze and fix the following issue in the Linux kernel code: iommu: Get DT/ACPI parsing into the proper probe path
Problem Details: In hindsight, there were some crucial subtleties overlooked when moving {of,acpi}_dma_configure() to driver probe time to allow waiting for IOMMU drivers with -EPROBE_DEFER, and these have become an ever-increasing source of problems. The IOMMU API has some fundamental assumptions that iommu_probe_devi...
```diff diff --git a/drivers/acpi/arm64/dma.c b/drivers/acpi/arm64/dma.c index 52b2abf88689..f30f138352b7 100644 --- a/drivers/acpi/arm64/dma.c +++ b/drivers/acpi/arm64/dma.c @@ -26,6 +26,11 @@ void acpi_arch_dma_setup(struct device *dev) else end = (1ULL << 32) - 1; + if (dev->dma_range_map) { + dev_dbg(dev, "...
b46064a18810bad3aea089a79993ca5ea7a3d2b2
Analyze and fix the following issue in the Linux kernel code: iommu: Handle race with default domain setup
Problem Details: It turns out that deferred default domain creation leaves a subtle race window during iommu_device_register() wherein a client driver may asynchronously probe in parallel and get as far as performing DMA API operations with dma-direct, only to be switched to iommu-dma underfoot once the default domain ...
```diff diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index ac4731d13a83..5b73d36e4359 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -3084,6 +3084,11 @@ int iommu_device_use_default_domain(struct device *dev) return 0; mutex_lock(&group->mutex); + /* We may race against bus_iommu...