id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
67a0463d339059eeeead9cd015afa594659cfdaf
Analyze and fix the following issue in the Linux kernel code: ASoC: amd: yc: fix internal mic on Redmi G 2022
Problem Details: This laptop model requires an additional detection quirk to enable the internal microphone Signed-off-by: Alex Far <anf1980@gmail.com> Link: https://patch.msgid.link/ZzjrZY3sImcqTtGx@RedmiG Signed-off-by: Mark Brown <broonie@kernel.org>
```diff diff --git a/sound/soc/amd/yc/acp6x-mach.c b/sound/soc/amd/yc/acp6x-mach.c index 2436e8deb2be..1b9834ee5d46 100644 --- a/sound/soc/amd/yc/acp6x-mach.c +++ b/sound/soc/amd/yc/acp6x-mach.c @@ -409,6 +409,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "Xiaomi Book ...
66f9dac9077c9c063552e465212abeb8f97d28a7
Analyze and fix the following issue in the Linux kernel code: Revert "nfs: don't reuse partially completed requests in nfs_lock_and_join_requests"
Problem Details: This reverts commit b571cfcb9dcac187c6d967987792d37cb0688610. This patch appears to assume that if one request is complete, then the others will complete too before unlocking. That is not a valid assumption, since other requests could hit a non-fatal error or a short write that would cause them not to...
```diff diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 2da00987d9ed..50fa539611f5 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -144,6 +144,31 @@ static void nfs_io_completion_put(struct nfs_io_completion *ioc) kref_put(&ioc->refcount, nfs_io_completion_release); } +static void +nfs_page_set_inode_ref(s...
6cf7b65f7029914dc0cd7db86fac9ee5159008c6
Analyze and fix the following issue in the Linux kernel code: i3c: Use i3cdev->desc->info instead of calling i3c_device_get_info() to avoid deadlock
Problem Details: A deadlock may happen since the i3c_master_register() acquires &i3cbus->lock twice. See the log below. Use i3cdev->desc->info instead of calling i3c_device_info() to avoid acquiring the lock twice. v2: - Modified the title and commit message ============================================ WARNING: pos...
```diff diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c index 770908cff243..42310c9a00c2 100644 --- a/drivers/i3c/master.c +++ b/drivers/i3c/master.c @@ -282,7 +282,8 @@ static int i3c_device_uevent(const struct device *dev, struct kobj_uevent_env *e struct i3c_device_info devinfo; u16 manuf, part, ext; ...
c6a2b4fcec5f2d80b0183fae1117f06127584c28
Analyze and fix the following issue in the Linux kernel code: platform/x86: p2sb: Cache correct PCI bar for P2SB on Gemini Lake
Problem Details: Gemini Lake (Goldmont Plus) is an Apollo Lake (Goldmont) derived design and as such has the P2SB at device.function 13.0, rather then at the default 31.1, just like Apollo Lake. At a mapping to P2SB_DEVFN_GOLDMONT to p2sb_cpu_ids[] for Goldmont Plus, so that the correct PCI bar gets cached. This fixe...
```diff diff --git a/drivers/platform/x86/p2sb.c b/drivers/platform/x86/p2sb.c index 31f38309b389..d51eb0db0626 100644 --- a/drivers/platform/x86/p2sb.c +++ b/drivers/platform/x86/p2sb.c @@ -25,6 +25,7 @@ static const struct x86_cpu_id p2sb_cpu_ids[] = { X86_MATCH_VFM(INTEL_ATOM_GOLDMONT, P2SB_DEVFN_GOLDMONT), + X...
5c7bebc1a3f0661db558d60e14dde27fc216d9dc
Analyze and fix the following issue in the Linux kernel code: platform/x86: panasonic-laptop: Return errno correctly in show callback
Problem Details: When an error occurs in sysfs show callback, we should return the errno directly instead of formatting it as the result, which produces meaningless output and doesn't inform the userspace of the error. Fixes: 468f96bfa3a0 ("platform/x86: panasonic-laptop: Add support for battery charging threshold (ec...
```diff diff --git a/drivers/platform/x86/panasonic-laptop.c b/drivers/platform/x86/panasonic-laptop.c index 2bf94d0ab324..22ca70eb8227 100644 --- a/drivers/platform/x86/panasonic-laptop.c +++ b/drivers/platform/x86/panasonic-laptop.c @@ -614,8 +614,7 @@ static ssize_t eco_mode_show(struct device *dev, struct device_at...
d1dfb5f52ffc4a142d88da5c0ed0514f3602c4b8
Analyze and fix the following issue in the Linux kernel code: virtiofs: dax: remove ->writepages() callback
Problem Details: When using FUSE DAX with virtiofs, cache coherency is managed by the host. Disk persistence is handled via fsync() and friends, which are passed directly via the FUSE layer to the host. Therefore, there's no need to do dax_writeback_mapping_range(). All that ends up doing is a cache flush operation, wh...
```diff diff --git a/fs/fuse/dax.c b/fs/fuse/dax.c index 12ef91d170bb..9abbc2f2894f 100644 --- a/fs/fuse/dax.c +++ b/fs/fuse/dax.c @@ -774,16 +774,6 @@ out: return ret; } -static int fuse_dax_writepages(struct address_space *mapping, - struct writeback_control *wbc) -{ - - struct inode *inode = mapping->h...
69eb56f69efb866c791cc87fd7bf62adf2ffcbb3
Analyze and fix the following issue in the Linux kernel code: fuse: check attributes staleness on fuse_iget()
Problem Details: Function fuse_direntplus_link() might call fuse_iget() to initialize a new fuse_inode and change its attributes. If fi->attr_version is always initialized with 0, even if the attributes returned by the FUSE_READDIR request is staled, as the new fi->attr_version is 0, fuse_change_attributes will still s...
```diff diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index b8a4608e31af..494ac372ace0 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -366,7 +366,7 @@ int fuse_lookup_name(struct super_block *sb, u64 nodeid, const struct qstr *name struct fuse_mount *fm = get_fuse_mount_super(sb); FUSE_ARGS(args); struct fuse_for...
fb1283bfa25e65c2d1e3c916b3d67af6609573e9
Analyze and fix the following issue in the Linux kernel code: rtc: ab-eoz9: fix abeoz9_rtc_read_alarm
Problem Details: abeoz9_rtc_read_alarm assumes we always read the alarm in 12-hour mode while abeoz9_rtc_set_alarm will always set it in 24-hour mode. We could support 12-hour mode in both functions but it seems very unlikely that the RTC would be set to 12-hour mode now as the driver has been setting it to 24-hour mo...
```diff diff --git a/drivers/rtc/rtc-ab-eoz9.c b/drivers/rtc/rtc-ab-eoz9.c index 02f7d0711287..84c5f77808c5 100644 --- a/drivers/rtc/rtc-ab-eoz9.c +++ b/drivers/rtc/rtc-ab-eoz9.c @@ -64,7 +64,7 @@ #define ABEOZ9_BIT_ALARM_MIN GENMASK(6, 0) #define ABEOZ9_REG_ALARM_HOURS 0x12 #define ABEOZ9_BIT_ALARM_HOURS_PM BIT(5...
bb3d498f013e8d31a774c9a8f363baf1eb16ea01
Analyze and fix the following issue in the Linux kernel code: rtc: rv3028: fix RV3028_TS_COUNT type
Problem Details: Read RV3028_TS_COUNT in an unsigned int so static checkers stop reporting a mismatch between the format specifier and the type. Reported-by: Zhu Jun <zhujun2@cmss.chinamobile.com> Link: https://lore.kernel.org/r/20241111104711.3170865-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <a...
```diff diff --git a/drivers/rtc/rtc-rv3028.c b/drivers/rtc/rtc-rv3028.c index 2f001c59c61d..868d1b1eb0f4 100644 --- a/drivers/rtc/rtc-rv3028.c +++ b/drivers/rtc/rtc-rv3028.c @@ -120,8 +120,9 @@ static ssize_t timestamp0_show(struct device *dev, { struct rv3028_data *rv3028 = dev_get_drvdata(dev->parent); struct r...
55727188dfa3572aecd946e58fab9e4a64f06894
Analyze and fix the following issue in the Linux kernel code: rtc: rzn1: fix BCD to rtc_time conversion errors
Problem Details: tm_mon describes months from 0 to 11, but the register contains BCD from 1 to 12. tm_year contains years since 1900, but the BCD contains 20XX. Apply the offsets when converting these numbers. Fixes: deeb4b5393e1 ("rtc: rzn1: Add new RTC driver") Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineeri...
```diff diff --git a/drivers/rtc/rtc-rzn1.c b/drivers/rtc/rtc-rzn1.c index a8316956f7d7..d084e8b838fc 100644 --- a/drivers/rtc/rtc-rzn1.c +++ b/drivers/rtc/rtc-rzn1.c @@ -111,8 +111,8 @@ static int rzn1_rtc_read_time(struct device *dev, struct rtc_time *tm) tm->tm_hour = bcd2bin(tm->tm_hour); tm->tm_wday = bcd2bin(...
0bc8061ffc733a0a246b8689b2d32a3e9204f43c
Analyze and fix the following issue in the Linux kernel code: erofs: handle NONHEAD !delta[1] lclusters gracefully
Problem Details: syzbot reported a WARNING in iomap_iter_done: iomap_fiemap+0x73b/0x9b0 fs/iomap/fiemap.c:80 ioctl_fiemap fs/ioctl.c:220 [inline] Generally, NONHEAD lclusters won't have delta[1]==0, except for crafted images and filesystems created by pre-1.0 mkfs versions. Previously, it would immediately bail out...
```diff diff --git a/fs/erofs/zmap.c b/fs/erofs/zmap.c index a076cca1f547..4535f2f0a014 100644 --- a/fs/erofs/zmap.c +++ b/fs/erofs/zmap.c @@ -219,7 +219,7 @@ static int z_erofs_load_compact_lcluster(struct z_erofs_maprecorder *m, unsigned int amortizedshift; erofs_off_t pos; - if (lcn >= totalidx) + if (lcn >= t...
bae0854160939a64a092516ff1b2f221402b843b
Analyze and fix the following issue in the Linux kernel code: erofs: fix blksize < PAGE_SIZE for file-backed mounts
Problem Details: Adjust sb->s_blocksize{,_bits} directly for file-backed mounts when the fs block size is smaller than PAGE_SIZE. Previously, EROFS used sb_set_blocksize(), which caused a panic if bdev-backed mounts is not used. Fixes: fb176750266a ("erofs: add file-backed mount support") Signed-off-by: Hongzhen Luo ...
```diff diff --git a/fs/erofs/super.c b/fs/erofs/super.c index 961ee47e2b4d..c235a8e4315e 100644 --- a/fs/erofs/super.c +++ b/fs/erofs/super.c @@ -616,7 +616,11 @@ static int erofs_fc_fill_super(struct super_block *sb, struct fs_context *fc) errorfc(fc, "unsupported blksize for fscache mode"); return -EINVAL; ...
3a23787ca8756920d65fda39f41353a4be1d1642
Analyze and fix the following issue in the Linux kernel code: erofs: fix file-backed mounts over FUSE
Problem Details: syzbot reported a null-ptr-deref in fuse_read_args_fill: fuse_read_folio+0xb0/0x100 fs/fuse/file.c:905 filemap_read_folio+0xc6/0x2a0 mm/filemap.c:2367 do_read_cache_folio+0x263/0x5c0 mm/filemap.c:3825 read_mapping_folio include/linux/pagemap.h:1011 [inline] erofs_bread+0x34d/0x7e0 fs/erofs/data.c:...
```diff diff --git a/fs/erofs/data.c b/fs/erofs/data.c index 6355866220ff..db4bde4c0852 100644 --- a/fs/erofs/data.c +++ b/fs/erofs/data.c @@ -38,7 +38,7 @@ void *erofs_bread(struct erofs_buf *buf, erofs_off_t offset, } if (!folio || !folio_contains(folio, index)) { erofs_put_metabuf(buf); - folio = read_mappin...
050b23d081da0f29474de043e9538c1f7a351b3b
Analyze and fix the following issue in the Linux kernel code: gpio: grgpio: Add NULL check in grgpio_probe
Problem Details: devm_kasprintf() can return a NULL pointer on failure,but this returned value in grgpio_probe is not checked. Add NULL check in grgpio_probe, to handle kernel NULL pointer dereference error. Cc: stable@vger.kernel.org Fixes: 7eb6ce2f2723 ("gpio: Convert to using %pOF instead of full_name") Signed-off-...
```diff diff --git a/drivers/gpio/gpio-grgpio.c b/drivers/gpio/gpio-grgpio.c index 7ffe59d845f0..169f33c41c59 100644 --- a/drivers/gpio/gpio-grgpio.c +++ b/drivers/gpio/gpio-grgpio.c @@ -369,6 +369,9 @@ static int grgpio_probe(struct platform_device *ofdev) gc->owner = THIS_MODULE; gc->to_irq = grgpio_to_irq; gc-...
5df30684415d5a902f23862ab5bbed2a2df7fbf1
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: sc8180x: Add a SoC-specific compatible to cpufreq-hw
Problem Details: Comply with bindings guidelines and get rid of errors such as: cpufreq@18323000: compatible: 'oneOf' conditional failed, one must be fixed: ['qcom,cpufreq-hw'] is too short Fixes: 8575f197b077 ("arm64: dts: qcom: Introduce the SC8180x platform") Signed-off-by: Konrad Dybcio <konrad.dybcio@oss...
```diff diff --git a/arch/arm64/boot/dts/qcom/sc8180x.dtsi b/arch/arm64/boot/dts/qcom/sc8180x.dtsi index 0e9429684dd9..60f71b490261 100644 --- a/arch/arm64/boot/dts/qcom/sc8180x.dtsi +++ b/arch/arm64/boot/dts/qcom/sc8180x.dtsi @@ -3889,7 +3889,7 @@ }; cpufreq_hw: cpufreq@18323000 { - compatible = "qcom,cpufre...
343d7fe6df9e247671440a932b6a73af4fa86d95
Analyze and fix the following issue in the Linux kernel code: smb: client: fix use-after-free of signing key
Problem Details: Customers have reported use-after-free in @ses->auth_key.response with SMB2.1 + sign mounts which occurs due to following race: task A task B cifs_mount() dfs_mount_share() get_session() cifs_mount_get_session() cifs_send_recv() cifs_get_smb_ses() compound...
```diff diff --git a/fs/smb/client/smb2proto.h b/fs/smb/client/smb2proto.h index 6f9885e4f66c..71504b30909e 100644 --- a/fs/smb/client/smb2proto.h +++ b/fs/smb/client/smb2proto.h @@ -37,8 +37,6 @@ extern struct mid_q_entry *smb2_setup_request(struct cifs_ses *ses, struct smb_rqst *rqst); extern struct mid_...
f69b0187f8745a7a9584f6b13f5e792594b88b2e
Analyze and fix the following issue in the Linux kernel code: smb: client: memcpy() with surrounding object base address
Problem Details: Like commit f1f047bd7ce0 ("smb: client: Fix -Wstringop-overflow issues"), adjust the memcpy() destination address to be based off the surrounding object rather than based off the 4-byte "Protocol" member. This avoids a build-time warning when compiling under CONFIG_FORTIFY_SOURCE with GCC 15: In funct...
```diff diff --git a/fs/smb/client/cifssmb.c b/fs/smb/client/cifssmb.c index ca50ac652e02..4858331ee918 100644 --- a/fs/smb/client/cifssmb.c +++ b/fs/smb/client/cifssmb.c @@ -5343,7 +5343,7 @@ SetTimesRetry: param_offset = offsetof(struct smb_com_transaction2_spi_req, InformationLevel) - 4; offset = param_offs...
31be3175bd7be89e39c82b3973c9d4ff55a17583
Analyze and fix the following issue in the Linux kernel code: wifi: rtl8xxxu: add more missing rtl8192cu USB IDs
Problem Details: The rtl8xxxu has all the rtl8192cu USB IDs from rtlwifi/rtl8192cu/sw.c except for the following 10, add these to the untested section so they can be used with the rtl8xxxu as the rtl8192cu are well supported. This fixes these wifi modules not working on distributions which have disabled CONFIG_RTL8192...
```diff diff --git a/drivers/net/wireless/realtek/rtl8xxxu/core.c b/drivers/net/wireless/realtek/rtl8xxxu/core.c index f95898f68d68..4ce0c05c5129 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/core.c +++ b/drivers/net/wireless/realtek/rtl8xxxu/core.c @@ -8147,6 +8147,8 @@ static const struct usb_device_id dev_table...
f79bc5c67867c19ce2762e7934c20dbb835ed82c
Analyze and fix the following issue in the Linux kernel code: wifi: rtlwifi: usb: fix workqueue leak when probe fails
Problem Details: rtl_init_core creates a workqueue that is then assigned to rtl_wq. rtl_deinit_core does not destroy it. It is left to rtl_usb_deinit, which must be called in the probe error path. Fixes: 2ca20f79e0d8 ("rtlwifi: Add usb driver") Fixes: 851639fdaeac ("rtlwifi: Modify some USB de-initialize code.") Signe...
```diff diff --git a/drivers/net/wireless/realtek/rtlwifi/usb.c b/drivers/net/wireless/realtek/rtlwifi/usb.c index 8ec687fab572..0368ecea2e81 100644 --- a/drivers/net/wireless/realtek/rtlwifi/usb.c +++ b/drivers/net/wireless/realtek/rtlwifi/usb.c @@ -1039,6 +1039,7 @@ error_init_vars: wait_for_completion(&rtlpriv->fi...
00260350aed80c002df270c805ca443ec9a719a6
Analyze and fix the following issue in the Linux kernel code: wifi: rtlwifi: fix init_sw_vars leak when probe fails
Problem Details: If ieee80211_register_hw fails, the memory allocated for the firmware will not be released. Call deinit_sw_vars as the function that undoes the allocationes done by init_sw_vars. Fixes: cefe3dfdb9f5 ("rtl8192cu: Call ieee80211_register_hw from rtl_usb_probe") Signed-off-by: Thadeu Lima de Souza Cascar...
```diff diff --git a/drivers/net/wireless/realtek/rtlwifi/usb.c b/drivers/net/wireless/realtek/rtlwifi/usb.c index c27b116ccdff..8ec687fab572 100644 --- a/drivers/net/wireless/realtek/rtlwifi/usb.c +++ b/drivers/net/wireless/realtek/rtlwifi/usb.c @@ -1037,6 +1037,7 @@ int rtl_usb_probe(struct usb_interface *intf, er...
b4b26642b31ef282df6ff7ea8531985edfdef12a
Analyze and fix the following issue in the Linux kernel code: wifi: rtlwifi: wait for firmware loading before releasing memory
Problem Details: At probe error path, the firmware loading work may have already been queued. In such a case, it will try to access memory allocated by the probe function, which is about to be released. In such paths, wait for the firmware worker to finish before releasing memory. Fixes: a7f7c15e945a ("rtlwifi: rtl819...
```diff diff --git a/drivers/net/wireless/realtek/rtlwifi/usb.c b/drivers/net/wireless/realtek/rtlwifi/usb.c index c3aa0cd9ff21..c27b116ccdff 100644 --- a/drivers/net/wireless/realtek/rtlwifi/usb.c +++ b/drivers/net/wireless/realtek/rtlwifi/usb.c @@ -1028,13 +1028,15 @@ int rtl_usb_probe(struct usb_interface *intf, e...
8559a9e0c457729fe3edb3176bbf7c7874f482b0
Analyze and fix the following issue in the Linux kernel code: wifi: rtlwifi: rtl8192se: rise completion of firmware loading as last step
Problem Details: Just like in commit 4dfde294b979 ("rtlwifi: rise completion at the last step of firmware callback"), only signal completion once the function is finished. Otherwise, the module removal waiting for the completion could free the memory that the callback will still use before returning. Fixes: b0302aba81...
```diff diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.c index bbf8ff63dced..e63c67b1861b 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.c @@ -64,22 +64,23 @@ static void rtl92...
e73e11d303940119e41850a0452a0deda2cc4eb5
Analyze and fix the following issue in the Linux kernel code: wifi: rtlwifi: do not complete firmware loading needlessly
Problem Details: The only code waiting for completion is driver removal, which will not be called when probe returns a failure. So this completion is unnecessary. Fixes: b0302aba812b ("rtlwifi: Convert to asynchronous firmware load") Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@igalia.com> Acked-by: Ping-Ke ...
```diff diff --git a/drivers/net/wireless/realtek/rtlwifi/pci.c b/drivers/net/wireless/realtek/rtlwifi/pci.c index 11709b6c83f1..40fc3c297a8a 100644 --- a/drivers/net/wireless/realtek/rtlwifi/pci.c +++ b/drivers/net/wireless/realtek/rtlwifi/pci.c @@ -2266,7 +2266,6 @@ fail2: pci_iounmap(pdev, (void __iomem *)rtlpriv...
5e5903a442bb889a62a0f5d89ac33e53ab08592c
Analyze and fix the following issue in the Linux kernel code: wifi: rtlwifi: rtl8821ae: phy: restore removed code to fix infinite loop
Problem Details: A previous clean-up fix removed the assignment of v2 inside a while loop that turned it into an infinite loop. Fix this by restoring the assignment of v2 from array[] so that v2 is updated inside the loop. Fixes: cda37445718d ("wifi: rtlwifi: rtl8821ae: phy: remove some useless code") Signed-off-by: C...
```diff diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c index 1be51ea3f3c8..9eddbada8af1 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c @@ -2033,8 +2033,10 @@ static boo...
6bc0ebfb1d920f13c522545f114cdabb49e9408a
Analyze and fix the following issue in the Linux kernel code: pinctrl: qcom: spmi: fix debugfs drive strength
Problem Details: Commit 723e8462a4fe ("pinctrl: qcom: spmi-gpio: Fix the GPIO strength mapping") fixed a long-standing issue in the Qualcomm SPMI PMIC gpio driver which had the 'low' and 'high' drive strength settings switched but failed to update the debugfs interface which still gets this wrong. Fix the debugfs code...
```diff diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c index ab07299ef39f..0c806b8128b6 100644 --- a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c +++ b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c @@ -667,7 +667,7 @@ static void pmic_gpio_config_dbg_show(struct pinctrl_dev *pct...
d6eb09fb46707a060209f077abede8c0e2c21b73
Analyze and fix the following issue in the Linux kernel code: ksmbd: fix malformed unsupported smb1 negotiate response
Problem Details: When mounting with vers=1.0, ksmbd should return unsupported smb1 negotiate response. But this response is malformed. [ 6010.586702] CIFS: VFS: Bad protocol string signature header 0x25000000 [ 6010.586708] 00000000: 25000000 25000000 424d53ff 00000072 ...%...%.SMBr... [ 6010.586711] 00000010: c84080...
```diff diff --git a/fs/smb/server/smb_common.c b/fs/smb/server/smb_common.c index 75b4eb856d32..c3e4e0e95492 100644 --- a/fs/smb/server/smb_common.c +++ b/fs/smb/server/smb_common.c @@ -576,7 +576,7 @@ static int smb_handle_negotiate(struct ksmbd_work *work) ksmbd_debug(SMB, "Unsupported SMB1 protocol\n"); - if ...
a652958888fb1ada3e4f6b548576c2d2c1b60d66
Analyze and fix the following issue in the Linux kernel code: io_uring/region: fix error codes after failed vmap
Problem Details: io_create_region() jumps after a vmap failure without setting the return code, it could be 0 or just uninitialised. Fixes: dfbbfbf191878 ("io_uring: introduce concept of memory regions") Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/0abac19dbf81c061cffaa9534a24...
```diff diff --git a/io_uring/memmap.c b/io_uring/memmap.c index bbd9569a0120..6e6ee79ba94f 100644 --- a/io_uring/memmap.c +++ b/io_uring/memmap.c @@ -247,8 +247,10 @@ int io_create_region(struct io_ring_ctx *ctx, struct io_mapped_region *mr, } vptr = vmap(pages, nr_pages, VM_MAP, PAGE_KERNEL); - if (!vptr) + if ...
51616b0c4db5903c61936f6c1830fab526d08aa4
Analyze and fix the following issue in the Linux kernel code: i2c: busses: Use *-y instead of *-objs in Makefile
Problem Details: *-objs suffix is reserved rather for (user-space) host programs while usually *-y suffix is used for kernel drivers (although *-objs works for that purpose for now). Let's correct the old usages of *-objs in Makefiles. While at it, fix an obvious typo in help section of the Kconfig. Signed-off-by: A...
```diff diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig index 0e1ce4fe1325..db4f9a0c3d9f 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig @@ -431,7 +431,7 @@ config I2C_AT91 are facing this situation, use the i2c-gpio driver. config I2C_AT91_SLAVE_EXPERIMENTAL - trist...
b88c79699d72caa947ecaae85839b3563662ccce
Analyze and fix the following issue in the Linux kernel code: i2c: qcom-cci: Remove the unused variable cci_clk_rate
Problem Details: Variable cci_clk_rate is not effectively used, so delete it. drivers/i2c/busses/i2c-qcom-cci.c:526:16: warning: variable ‘cci_clk_rate’ set but not used. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=11532 Fixes: 8284750a1829 ("i2c: qcom-cci...
```diff diff --git a/drivers/i2c/busses/i2c-qcom-cci.c b/drivers/i2c/busses/i2c-qcom-cci.c index 5cc791b3b57d..a0ef43e99751 100644 --- a/drivers/i2c/busses/i2c-qcom-cci.c +++ b/drivers/i2c/busses/i2c-qcom-cci.c @@ -523,7 +523,6 @@ static const struct dev_pm_ops qcom_cci_pm = { static int cci_probe(struct platform_devi...
b7ef4e0b1fb548e166303cb6c16580e6ccffa2bb
Analyze and fix the following issue in the Linux kernel code: i2c: Drop legacy muxing pseudo-drivers
Problem Details: The i2c-amd756-s4882 and i2c-nforce2-s4985 muxing pseudo-drivers were written at a time when the i2c core did not support muxing. They are essentially board-specific hacks. If we had to add support for these boards today, we would implement it in a completely different way. These Tyan server boards ar...
```diff diff --git a/MAINTAINERS b/MAINTAINERS index e04bf09b5015..75fe8f571210 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -10722,12 +10722,10 @@ F: Documentation/i2c/busses/i2c-viapro.rst F: drivers/i2c/busses/i2c-ali1535.c F: drivers/i2c/busses/i2c-ali1563.c F: drivers/i2c/busses/i2c-ali15x3.c -F: drivers/i2c/b...
e586685c38b3278fbdbcb39f963687c9610f76fc
Analyze and fix the following issue in the Linux kernel code: i2c: qcom-geni: Keep comment why interrupts start disabled
Problem Details: The to-be-fixed commit rightfully reduced a race window, but also removed a comment which is still helpful after the fix. Bring the comment back. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Bjorn Andersson <andersson@kernel.org> Signed-off-by: Andi Shyti <andi.shyti@ker...
```diff diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c index 59f2e055d843..7a22e1f46e60 100644 --- a/drivers/i2c/busses/i2c-qcom-geni.c +++ b/drivers/i2c/busses/i2c-qcom-geni.c @@ -833,6 +833,8 @@ static int geni_i2c_probe(struct platform_device *pdev) init_completion(&gi2c->done...
a5089cd23b10c5c861bf5834170c75f9b4c36e08
Analyze and fix the following issue in the Linux kernel code: i2c: amd-asf: Fix uninitialized variables issue in amd_asf_process_target
Problem Details: The len variable is not initialized, which may cause the for loop to behave unexpectedly. Fixes: 9b25419ad397 ("i2c: amd-asf: Add routine to handle the ASF slave process") Signed-off-by: Qianqiang Liu <qianqiang.liu@163.com> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Acked-by: Shyam Sundar ...
```diff diff --git a/drivers/i2c/busses/i2c-amd-asf-plat.c b/drivers/i2c/busses/i2c-amd-asf-plat.c index 47e0c90341ae..ba47df5370c7 100644 --- a/drivers/i2c/busses/i2c-amd-asf-plat.c +++ b/drivers/i2c/busses/i2c-amd-asf-plat.c @@ -61,7 +61,7 @@ static void amd_asf_process_target(struct work_struct *work) unsigned sho...
4962ee045d8f06638714d801ab0fb72f89c16690
Analyze and fix the following issue in the Linux kernel code: watchdog: rti: of: honor timeout-sec property
Problem Details: Currently "timeout-sec" Device Tree property is being silently ignored: even though watchdog_init_timeout() is being used, the driver always passes "heartbeat" == DEFAULT_HEARTBEAT == 60 as argument. Fix this by setting struct watchdog_device::timeout to DEFAULT_HEARTBEAT and passing real module param...
```diff diff --git a/drivers/watchdog/rti_wdt.c b/drivers/watchdog/rti_wdt.c index f410b6e39fb6..58c9445c0f88 100644 --- a/drivers/watchdog/rti_wdt.c +++ b/drivers/watchdog/rti_wdt.c @@ -61,7 +61,7 @@ #define MAX_HW_ERROR 250 -static int heartbeat = DEFAULT_HEARTBEAT; +static int heartbeat; /* * struct to ho...
68b3bca2df00f0a63f0aa2db2b2adc795665229e
Analyze and fix the following issue in the Linux kernel code: RDMA/bnxt_re: Correct the sequence of device suspend
Problem Details: When in fatal error condition, mark device as detached first and then complete all pending HWRM commands as firmware is not going to process them and eventually time out. Move the device to error only if suspend is called when device is in Fatal state. Also, remove some outdated comments. Remove the s...
```diff diff --git a/drivers/infiniband/hw/bnxt_re/main.c b/drivers/infiniband/hw/bnxt_re/main.c index ac475a596f03..298c848f3a4d 100644 --- a/drivers/infiniband/hw/bnxt_re/main.c +++ b/drivers/infiniband/hw/bnxt_re/main.c @@ -2347,12 +2347,6 @@ static int bnxt_re_suspend(struct auxiliary_device *adev, pm_message_t sta...
c64b16a37b6d240f6baefd7061970a01c23da61d
Analyze and fix the following issue in the Linux kernel code: RDMA/bnxt_re: Support different traffic class
Problem Details: Adding support for different traffic class passed to driver. Fix the traffic class setting in modify_qp by skipping the ECN bits. Pass the service level received from applications to the firmware. Signed-off-by: Chandramohan Akula <chandramohan.akula@broadcom.com> Reviewed-by: Kalesh AP <kalesh-anakku...
```diff diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c index f6e9eefc95d6..481261f8d7ed 100644 --- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c +++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c @@ -2136,7 +2136,7 @@ int bnxt_re_modify_qp(struct ib_qp *ib_qp, struct ib_qp_att...
c5d91b16f525ea8c98b3fd8efc5105106d17fe9a
Analyze and fix the following issue in the Linux kernel code: efi: Fix memory leak in efivar_ssdt_load
Problem Details: When we load SSDT from efi variable (specified with efivar_ssdt=<var> boot command line argument) a name for the variable is allocated dynamically because we traverse all EFI variables. Unlike ACPI table data, which is later used by ACPI engine, the name is no longer needed once traverse is complete --...
```diff diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c index 70490bf2697b..60c64b81d2c3 100644 --- a/drivers/firmware/efi/efi.c +++ b/drivers/firmware/efi/efi.c @@ -273,6 +273,7 @@ static __init int efivar_ssdt_load(void) efi_char16_t *name = NULL; efi_status_t status; efi_guid_t guid; + int...
80d01ce607cbffd8fa6ceb8a91ce07667bc51d5a
Analyze and fix the following issue in the Linux kernel code: efi/libstub: Fix command line fallback handling when loading files
Problem Details: CONFIG_CMDLINE, when set, is supposed to serve either as a fallback when no command line is provided by the bootloader, or to be taken into account unconditionally, depending on the configured options. The initrd and dtb loader ignores CONFIG_CMDLINE in either case, and only takes the EFI firmware pro...
```diff diff --git a/drivers/firmware/efi/libstub/file.c b/drivers/firmware/efi/libstub/file.c index d6a025df07dc..33d45d1b274c 100644 --- a/drivers/firmware/efi/libstub/file.c +++ b/drivers/firmware/efi/libstub/file.c @@ -175,6 +175,12 @@ static efi_status_t efi_open_device_path(efi_file_protocol_t **volume, return ...
d7a516c6eeae29144649f1c3f586fa580ec9e040
Analyze and fix the following issue in the Linux kernel code: compiler.h: Fix undefined BUILD_BUG_ON_ZERO()
Problem Details: <linux/compiler.h> defines __must_be_array() and __must_be_cstr() and both expand to BUILD_BUG_ON_ZERO(), but <linux/build_bug.h> defines BUILD_BUG_ON_ZERO(). Including <linux/build_bug.h> in <linux/compiler.h> would create a cyclic dependency as <linux/build_bug.h> already includes <linux/compiler.h>....
```diff diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 4d4e23b6e3e7..469a64dd6495 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -239,11 +239,18 @@ static inline void *offset_to_ptr(const int *off) #endif /* __ASSEMBLY__ */ +#ifdef __CHECKER__ +#define __BUILD_BUG_O...
d1aa0c04294e29883d65eac6c2f72fe95cc7c049
Analyze and fix the following issue in the Linux kernel code: mm: revert "mm: shmem: fix data-race in shmem_getattr()"
Problem Details: Revert d949d1d14fa2 ("mm: shmem: fix data-race in shmem_getattr()") as suggested by Chuck [1]. It is causing deadlocks when accessing tmpfs over NFS. As Hugh commented, "added just to silence a syzbot sanitizer splat: added where there has never been any practical problem". Link: https://lkml.kernel...
```diff diff --git a/mm/shmem.c b/mm/shmem.c index e87f5d6799a7..568bb290bdce 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -1166,9 +1166,7 @@ static int shmem_getattr(struct mnt_idmap *idmap, stat->attributes_mask |= (STATX_ATTR_APPEND | STATX_ATTR_IMMUTABLE | STATX_ATTR_NODUMP); - inode_lock_shared(inode); ...
a5f05a138a8cac035bf9da9b6ed0e532bc7942c8
Analyze and fix the following issue in the Linux kernel code: parisc/ftrace: Fix function graph tracing disablement
Problem Details: Due to an apparent copy-paste bug, the parisc implementation of ftrace_disable_ftrace_graph_caller() doesn't actually do anything. It enables the (already-enabled) static key rather than disabling it. The result is that after function graph tracing has been "disabled", any subsequent (non-graph) funct...
```diff diff --git a/arch/parisc/kernel/ftrace.c b/arch/parisc/kernel/ftrace.c index c91f9c2e61ed..f8d08eab7db8 100644 --- a/arch/parisc/kernel/ftrace.c +++ b/arch/parisc/kernel/ftrace.c @@ -87,7 +87,7 @@ int ftrace_enable_ftrace_graph_caller(void) int ftrace_disable_ftrace_graph_caller(void) { - static_key_enable(...
2420baa8e0460b1c35008d6bf21b4e6bff023867
Analyze and fix the following issue in the Linux kernel code: mm/slab: Allow cache creation to proceed even if sysfs registration fails
Problem Details: When kobject_init_and_add() fails during cache creation, kobj->name can be leaked because SLUB does not call kobject_put(), which should be invoked per the kobject API documentation. This has a bit of historical context, though; SLUB does not call kobject_put() to avoid double-free for struct kmem_cach...
```diff diff --git a/mm/slub.c b/mm/slub.c index ccbdd7eb37a8..b41bc989f205 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -6073,7 +6073,8 @@ __kmem_cache_alias(const char *name, unsigned int size, unsigned int align, s = find_mergeable(size, align, flags, name, ctor); if (s) { if (sysfs_slab_alias(s, name)) - retu...
dbc16915279a548a204154368da23d402c141c81
Analyze and fix the following issue in the Linux kernel code: mm/slub: Avoid list corruption when removing a slab from the full list
Problem Details: Boot with slub_debug=UFPZ. If allocated object failed in alloc_consistency_checks, all objects of the slab will be marked as used, and then the slab will be removed from the partial list. When an object belonging to the slab got freed later, the remove_full() function is called. Because the slab is n...
```diff diff --git a/mm/slab.h b/mm/slab.h index 298567019485..632fedd71fea 100644 --- a/mm/slab.h +++ b/mm/slab.h @@ -73,6 +73,11 @@ struct slab { struct { unsigned inuse:16; unsigned objects:15; + /* + * If slab debugging is enabled then the + * frozen bit can be reused to i...
080c8579c37ec9c11cfb8b9eb25b74912b33dc06
Analyze and fix the following issue in the Linux kernel code: mm/slub, kunit: Add testcase for krealloc redzone and zeroing
Problem Details: Danilo Krummrich raised issue about krealloc+GFP_ZERO [1], and Vlastimil suggested to add some test case which can sanity test the kmalloc-redzone and zeroing by utilizing the kmalloc's 'orig_size' debug feature. It covers the grow and shrink case of krealloc() re-using current kmalloc object, and the...
```diff diff --git a/lib/slub_kunit.c b/lib/slub_kunit.c index 33564f965958..f11691315c2f 100644 --- a/lib/slub_kunit.c +++ b/lib/slub_kunit.c @@ -192,6 +192,47 @@ static void test_leak_destroy(struct kunit *test) KUNIT_EXPECT_EQ(test, 2, slab_errors); } +static void test_krealloc_redzone_zeroing(struct kunit *tes...
5474d33ca48e7764ccc38b2ac089863cca83280a
Analyze and fix the following issue in the Linux kernel code: mm/slub: Improve redzone check and zeroing for krealloc()
Problem Details: For current krealloc(), one problem is its caller doesn't pass the old request size, say the object is 64 bytes kmalloc one, but caller may only requested 48 bytes. Then when krealloc() shrinks or grows in the same object, or allocate a new bigger object, it lacks this 'original size' information to do...
```diff diff --git a/mm/slub.c b/mm/slub.c index e186e7a67597..4284cbe41d0d 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -4718,34 +4718,66 @@ static __always_inline __realloc_size(2) void * __do_krealloc(const void *p, size_t new_size, gfp_t flags) { void *ret; - size_t ks; + size_t ks = 0; + int orig_size = 0; + stru...
9ef8568bd7cddf59e1ff6ee1b7d799539e331b73
Analyze and fix the following issue in the Linux kernel code: mm/slub: Consider kfence case for get_orig_size()
Problem Details: When 'orig_size' of kmalloc object is enabled by debug option, it should either contains the actual requested size or the cache's 'object_size'. But it's not true if that object is a kfence-allocated one, and the data at 'orig_size' offset of metadata could be zero or other values. This is not a big i...
```diff diff --git a/mm/slub.c b/mm/slub.c index 2ccb016c7f99..e186e7a67597 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -768,6 +768,9 @@ static inline unsigned int get_orig_size(struct kmem_cache *s, void *object) { void *p = kasan_reset_tag(object); + if (is_kfence_address(object)) + return kfence_ksize(object); +...
494c403ff159fdfdb41c364acbe79f2f53ad585d
Analyze and fix the following issue in the Linux kernel code: perf header: Pass a perf_cpu rather than a PMU to get_cpuid_str
Problem Details: On ARM the cpuid is dependent on the core type of the CPU in question. The PMU was passed for the sake of the CPU map but this means in places a temporary PMU is created just to pass a CPU value. Just pass the CPU and fix up the callers. As there are no longer PMU users in header.h, shuffle forward de...
```diff diff --git a/tools/perf/arch/arm64/util/arm-spe.c b/tools/perf/arch/arm64/util/arm-spe.c index 7ccdea3cd461..22b19dcc6beb 100644 --- a/tools/perf/arch/arm64/util/arm-spe.c +++ b/tools/perf/arch/arm64/util/arm-spe.c @@ -23,6 +23,7 @@ #include "../../../util/debug.h" #include "../../../util/auxtrace.h" #includ...
4a159e6049f319bef6f9e6d2ccdd322f57d24830
Analyze and fix the following issue in the Linux kernel code: perf jevents: fix breakage when do perf stat on system metric
Problem Details: When do perf stat on sys metric, perf tool output nothing now: $ perf stat -a -M imx95_ddr_read.all -I 1000 $ This command runs on an arm64 machine and the Soc has one DDR hw pmu except one armv8_cortex_a55 pmu. Their maps show as follows: const struct pmu_events_map pmu_events_map[] = { { .arc...
```diff diff --git a/tools/perf/pmu-events/empty-pmu-events.c b/tools/perf/pmu-events/empty-pmu-events.c index 2b7516946ded..b8719dab264d 100644 --- a/tools/perf/pmu-events/empty-pmu-events.c +++ b/tools/perf/pmu-events/empty-pmu-events.c @@ -585,17 +585,7 @@ const struct pmu_metrics_table *perf_pmu__find_metrics_table...
2c8b09ac2537299511c898bc71b1a5f2756c831c
Analyze and fix the following issue in the Linux kernel code: libbpf: Change hash_combine parameters from long to unsigned long
Problem Details: The hash_combine() could be trapped when compiled with sanitizer like "zig cc" or clang with signed-integer-overflow option. This patch parameters and return type to unsigned long to remove the potential overflow. Signed-off-by: Sidong Yang <sidong.yang@furiosa.ai> Acked-by: Yonghong Song <yonghong.so...
```diff diff --git a/tools/lib/bpf/btf.c b/tools/lib/bpf/btf.c index 8befb8103e32..12468ae0d573 100644 --- a/tools/lib/bpf/btf.c +++ b/tools/lib/bpf/btf.c @@ -3548,7 +3548,7 @@ struct btf_dedup { struct strset *strs_set; }; -static long hash_combine(long h, long value) +static unsigned long hash_combine(unsigned l...
608e99f7869e3a6e028c7cba14a896c7797e8746
Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Fix build error with llvm 19
Problem Details: llvm 19 fails to compile arena self test: CLNG-BPF [test_progs] verifier_arena_large.bpf.o progs/verifier_arena_large.c:90:24: error: unsupported signed division, please convert to unsigned div/mod. 90 | pg_idx = (pg - base) / PAGE_SIZE; Though llvm <= 18 and llvm >= 20 don't have t...
```diff diff --git a/tools/testing/selftests/bpf/progs/verifier_arena_large.c b/tools/testing/selftests/bpf/progs/verifier_arena_large.c index 8a9af79db884..f94f30cf1bb8 100644 --- a/tools/testing/selftests/bpf/progs/verifier_arena_large.c +++ b/tools/testing/selftests/bpf/progs/verifier_arena_large.c @@ -87,7 +87,7 @@...
118397c9baaac0b7ec81896f8d755d09aa82c485
Analyze and fix the following issue in the Linux kernel code: PCI: dwc: ep: Fix advertised resizable BAR size regression
Problem Details: The advertised resizable BAR size was fixed in commit 72e34b8593e0 ("PCI: dwc: endpoint: Fix advertised resizable BAR size"). Commit 867ab111b242 ("PCI: dwc: ep: Add a generic dw_pcie_ep_linkdown() API to handle Link Down event") was included shortly after this, and moved the code to another function....
```diff diff --git a/drivers/pci/controller/dwc/pcie-designware-ep.c b/drivers/pci/controller/dwc/pcie-designware-ep.c index b07ace7dc92e..b11cca6298f2 100644 --- a/drivers/pci/controller/dwc/pcie-designware-ep.c +++ b/drivers/pci/controller/dwc/pcie-designware-ep.c @@ -690,7 +690,7 @@ static void dw_pcie_ep_init_non_s...
5089b3d874e9933d9842e90410d3af1520494757
Analyze and fix the following issue in the Linux kernel code: PCI: endpoint: epf-mhi: Avoid NULL dereference if DT lacks 'mmio'
Problem Details: If platform_get_resource_byname() fails and returns NULL because DT lacks an 'mmio' property for the MHI endpoint, dereferencing res->start will cause a NULL pointer access. Add a check to prevent it. Fixes: 1bf5f25324f7 ("PCI: endpoint: Add PCI Endpoint function driver for MHI bus") Link: https://lor...
```diff diff --git a/drivers/pci/endpoint/functions/pci-epf-mhi.c b/drivers/pci/endpoint/functions/pci-epf-mhi.c index 7d070b1def11..54286a40bdfb 100644 --- a/drivers/pci/endpoint/functions/pci-epf-mhi.c +++ b/drivers/pci/endpoint/functions/pci-epf-mhi.c @@ -867,12 +867,18 @@ static int pci_epf_mhi_bind(struct pci_epf ...
9b80bdb10aee04ce7289896e6bdad13e33972636
Analyze and fix the following issue in the Linux kernel code: PCI: endpoint: Remove surplus return statement from pci_epf_test_clean_dma_chan()
Problem Details: Remove a surplus return statement from the void function that has been added in the commit commit 8353813c88ef ("PCI: endpoint: Enable DMA tests for endpoints with DMA capabilities"). Especially, as an empty return statements at the end of a void functions serve little purpose. This fixes the followi...
```diff diff --git a/drivers/pci/endpoint/functions/pci-epf-test.c b/drivers/pci/endpoint/functions/pci-epf-test.c index c2e7f67e5107..ef6677f34116 100644 --- a/drivers/pci/endpoint/functions/pci-epf-test.c +++ b/drivers/pci/endpoint/functions/pci-epf-test.c @@ -291,8 +291,6 @@ static void pci_epf_test_clean_dma_chan(s...
3fafc38b77bebeeea5faa2a588b92353775bb390
Analyze and fix the following issue in the Linux kernel code: PCI: dwc: ep: Use align addr function for dw_pcie_ep_raise_{msi,msix}_irq()
Problem Details: Use the dw_pcie_ep_align_addr() function to calculate the alignment in dw_pcie_ep_raise_{msi,msix}_irq() instead of open coding the same. Link: https://lore.kernel.org/r/20241017132052.4014605-6-cassel@kernel.org Link: https://lore.kernel.org/r/20241104205144.409236-2-cassel@kernel.org Tested-by: Dami...
```diff diff --git a/drivers/pci/controller/dwc/pcie-designware-ep.c b/drivers/pci/controller/dwc/pcie-designware-ep.c index 20f67fd85e83..507e40bd18c8 100644 --- a/drivers/pci/controller/dwc/pcie-designware-ep.c +++ b/drivers/pci/controller/dwc/pcie-designware-ep.c @@ -503,7 +503,8 @@ int dw_pcie_ep_raise_msi_irq(stru...
665745f274870c921020f610e2c99a3b1613519b
Analyze and fix the following issue in the Linux kernel code: PCI/bwctrl: Re-add BW notification portdrv as PCIe BW controller
Problem Details: This mostly reverts the commit b4c7d2076b4e ("PCI/LINK: Remove bandwidth notification"). An upcoming commit extends this driver building PCIe bandwidth controller on top of it. PCIe bandwidth notifications were first added in the commit e8303bb7a75c ("PCI/LINK: Report degraded links via link bandwidth...
```diff diff --git a/MAINTAINERS b/MAINTAINERS index c27f3190737f..8c555b3325d6 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -17933,6 +17933,12 @@ F: include/linux/of_pci.h F: include/linux/pci* F: include/uapi/linux/pci* +PCIE BANDWIDTH CONTROLLER +M: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> +L: linux-pci@vg...
44f392fbf628a7ff2d8bb8e83ca1851261f81a6f
Analyze and fix the following issue in the Linux kernel code: Revert "drm/amd/pm: correct the workload setting"
Problem Details: This reverts commit 74e1006430a5377228e49310f6d915628609929e. This causes a regression in the workload selection. A more extensive fix is being worked on. For now, revert. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/3618 Fixes: 74e1006430a5 ("drm/amd/pm: correct the workload setting") Signe...
```diff diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c index ee1bcfaae3e3..80e60ea2d11e 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c @@ -1259,33 +1259,26 @@ static int smu_sw_init(void *handle) smu->watermark...
8467d8b282b54d87121f70ce78061af004471d0c
Analyze and fix the following issue in the Linux kernel code: sparc: Replace one-element array with flexible array member
Problem Details: Replace the deprecated one-element array with a modern flexible array member in the struct hvtramp_descr. Additionally, 15 unnecessary bytes were allocated for hdesc, but instead of fixing the parentheses in the open-coded version, use struct_size() to calculate the correct number of bytes. Link: htt...
```diff diff --git a/arch/sparc/include/asm/hvtramp.h b/arch/sparc/include/asm/hvtramp.h index 688ea43af0f5..ce2453ea4f2b 100644 --- a/arch/sparc/include/asm/hvtramp.h +++ b/arch/sparc/include/asm/hvtramp.h @@ -17,7 +17,7 @@ struct hvtramp_descr { __u64 fault_info_va; __u64 fault_info_pa; __u64 thread_reg; ...
b5a23a60e8ab5711f4952912424347bf3864ce8d
Analyze and fix the following issue in the Linux kernel code: serial: amba-pl011: fix build regression
Problem Details: When CONFIG_DMA_ENGINE is disabled, the driver now fails to build: drivers/tty/serial/amba-pl011.c: In function 'pl011_unthrottle_rx': drivers/tty/serial/amba-pl011.c:1822:16: error: 'struct uart_amba_port' has no member named 'using_rx_dma' 1822 | if (uap->using_rx_dma) { | ...
```diff diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c index 2facdbcd73eb..fcba6c3b99d7 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c @@ -1819,10 +1819,12 @@ static void pl011_unthrottle_rx(struct uart_port *port) pl011_write(uap->im, uap, REG_IMS...
ff1060813d9347e8c45c8b8cff93a4dfdb6726ad
Analyze and fix the following issue in the Linux kernel code: net/9p/usbg: fix handling of the failed kzalloc() memory allocation
Problem Details: On the linux-next, next-20241108 vanilla kernel, the coccinelle tool gave the following error report: ./net/9p/trans_usbg.c:912:5-11: ERROR: allocation function on line 911 returns NULL not ERR_PTR on failure kzalloc() failure is fixed to handle the NULL return case on the memory exhaustion. Fixes: ...
```diff diff --git a/net/9p/trans_usbg.c b/net/9p/trans_usbg.c index 975b76839dca..6b694f117aef 100644 --- a/net/9p/trans_usbg.c +++ b/net/9p/trans_usbg.c @@ -909,9 +909,9 @@ static struct usb_function_instance *usb9pfs_alloc_instance(void) usb9pfs_opts->buflen = DEFAULT_BUFLEN; dev = kzalloc(sizeof(*dev), GFP_KE...
b7fc65f5141c24785dc8c19249ca4efcf71b3524
Analyze and fix the following issue in the Linux kernel code: usb: dwc3: gadget: Fix looping of queued SG entries
Problem Details: The dwc3_request->num_queued_sgs is decremented on completion. If a partially completed request is handled, then the dwc3_request->num_queued_sgs no longer reflects the total number of num_queued_sgs (it would be cleared). Correctly check the number of request SG entries remained to be prepare and que...
```diff diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 38c3769a6c48..3a5a0d8be33c 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -1470,8 +1470,8 @@ static int dwc3_prepare_trbs_sg(struct dwc3_ep *dep, struct scatterlist *s; int i; unsigned int length = req->re...
02a6982b0ccfcdc39e20016f5fc9a1b7826a6ee7
Analyze and fix the following issue in the Linux kernel code: usb: dwc3: gadget: Fix checking for number of TRBs left
Problem Details: The check whether the TRB ring is full or empty in dwc3_calc_trbs_left() is insufficient. It assumes there are active TRBs if there's any request in the started_list. However, that's not the case for requests with a large SG list. That is, if we have a single usb request that requires more TRBs than t...
```diff diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 6101e5467b08..38c3769a6c48 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -1230,11 +1230,14 @@ static u32 dwc3_calc_trbs_left(struct dwc3_ep *dep) * pending to be processed by the driver. */ if (dep->trb_...
5d2fb074dea289c41f5aaf2c3f68286bee370634
Analyze and fix the following issue in the Linux kernel code: usb: dwc3: ep0: Don't clear ep0 DWC3_EP_TRANSFER_STARTED
Problem Details: The driver cannot issue the End Transfer command to the SETUP transfer. Don't clear DWC3_EP_TRANSFER_STARTED flag to make sure that the driver won't send Start Transfer command again, which can cause no-resource error. For example this can occur if the host issues a reset to the device. Cc: stable@vge...
```diff diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c index f3d97ad5156e..666ac432f52d 100644 --- a/drivers/usb/dwc3/ep0.c +++ b/drivers/usb/dwc3/ep0.c @@ -232,7 +232,7 @@ void dwc3_ep0_stall_and_restart(struct dwc3 *dwc) /* stall is always issued on EP0 */ dep = dwc->eps[0]; __dwc3_gadget_ep_set_h...
51cdd69d6a857f527d6d0697a2e1f0fa8bca1005
Analyze and fix the following issue in the Linux kernel code: Revert "usb: gadget: composite: fix OS descriptors w_value logic"
Problem Details: This reverts commit ec6ce7075ef879b91a8710829016005dc8170f17. Fix installation of WinUSB driver using OS descriptors. Without the fix the drivers are not installed correctly and the property 'DeviceInterfaceGUID' is missing on host side. The original change was based on the assumption that the interf...
```diff diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index 8e8c3baa9d7e..bdda8c74602d 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -2111,8 +2111,20 @@ unknown: memset(buf, 0, w_length); buf[5] = 0x01; switch (ctrl->bRequestType & USB_REC...
40c974826734836402abfd44efbf04f63a2cc1c1
Analyze and fix the following issue in the Linux kernel code: usb: ehci-spear: fix call balance of sehci clk handling routines
Problem Details: If the clock sehci->clk was not enabled in spear_ehci_hcd_drv_probe, it should not be disabled in any path. Conversely, if it was enabled in spear_ehci_hcd_drv_probe, it must be disabled in all error paths to ensure proper cleanup. Found by Linux Verification Center (linuxtesting.org) with Klever. F...
```diff diff --git a/drivers/usb/host/ehci-spear.c b/drivers/usb/host/ehci-spear.c index 0b1fc2563dd6..e96710192d6b 100644 --- a/drivers/usb/host/ehci-spear.c +++ b/drivers/usb/host/ehci-spear.c @@ -105,7 +105,9 @@ static int spear_ehci_hcd_drv_probe(struct platform_device *pdev) /* registers start at offset 0x0 */ ...
7b22b7719fc17d5979a991c918c868ab041be5c8
Analyze and fix the following issue in the Linux kernel code: remoteproc: qcom_q6v5_mss: Re-order writes to the IMEM region
Problem Details: Any write access to the IMEM region when the Q6 is setting up XPU protection on it will result in a XPU violation. Fix this by ensuring IMEM writes related to the MBA post-mortem logs happen before the Q6 is brought out of reset. Fixes: 318130cc9362 ("remoteproc: qcom_q6v5_mss: Add MBA log extraction ...
```diff diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c index aaddbaf1099e..e78bd986dc3f 100644 --- a/drivers/remoteproc/qcom_q6v5_mss.c +++ b/drivers/remoteproc/qcom_q6v5_mss.c @@ -1158,6 +1158,9 @@ static int q6v5_mba_load(struct q6v5 *qproc) goto disable_active_clks; } + i...
06c59d97f63c1b8af521fa5aef8a716fb988b285
Analyze and fix the following issue in the Linux kernel code: rpmsg: glink: use only lower 16-bits of param2 for CMD_OPEN name length
Problem Details: The name len field of the CMD_OPEN packet is only 16-bits and the upper 16-bits of "param2" are a different "prio" field, which can be nonzero in certain situations, and CMD_OPEN packets can be unexpectedly dropped because of this. Fix this by masking out the upper 16 bits of param2. Fixes: b4f8e52b8...
```diff diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c index 0b2f29006908..b534b88db3f8 100644 --- a/drivers/rpmsg/qcom_glink_native.c +++ b/drivers/rpmsg/qcom_glink_native.c @@ -1204,7 +1204,8 @@ void qcom_glink_native_rx(struct qcom_glink *glink) ret = qcom_glink_rx_open_ack(gl...
8a47704d64c9afda80e7f399ba2cf898cfcc45b2
Analyze and fix the following issue in the Linux kernel code: remoteproc: qcom_q6v5_pas: disable auto boot for wpss
Problem Details: Currently, the rproc "atomic_t power" variable is incremented during: a. WPSS rproc auto boot. b. AHB power on for ath11k. During AHB power off (rmmod ath11k_ahb.ko), rproc_shutdown fails to unload the WPSS firmware because the rproc->power value is '2', causing the atomic_dec_and_test(&rproc->power) ...
```diff diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c index 5034d214ac13..96da94b5d2c2 100644 --- a/drivers/remoteproc/qcom_q6v5_pas.c +++ b/drivers/remoteproc/qcom_q6v5_pas.c @@ -1356,7 +1356,7 @@ static const struct adsp_data sc7280_wpss_resource = { .crash_reason_smem = 626, ...
e8983156d54f59f57e648ecd44f01c16572da842
Analyze and fix the following issue in the Linux kernel code: remoteproc: qcom: pas: add minidump_id to SM8350 resources
Problem Details: Specify minidump_id for the SM8350 DSPs. It was omitted for in the original commit e8b4e9a21af7 ("remoteproc: qcom: pas: Add SM8350 PAS remoteprocs"). Fixes: e8b4e9a21af7 ("remoteproc: qcom: pas: Add SM8350 PAS remoteprocs") Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Ne...
```diff diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c index 45112fddd9a7..822cf102ad36 100644 --- a/drivers/remoteproc/qcom_q6v5_pas.c +++ b/drivers/remoteproc/qcom_q6v5_pas.c @@ -917,6 +917,7 @@ static const struct adsp_data sm8250_adsp_resource = { .crash_reason_smem = 423, ...
60e7c43e61c9a64253fc90f54fee0c92b3d1e3fe
Analyze and fix the following issue in the Linux kernel code: remoteproc: qcom: wcss: Remove subdevs on the error path of q6v5_wcss_probe()
Problem Details: Current implementation of q6v5_wcss_probe() in qcom_q6v5_wcss.c and does not remove the subdevs on the error path. Fix this bug by calling qcom_remove_{ssr,sysmon,pdm,glink}_subdev(), and qcom_q6v5_deinit() appropriately. Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> Link: https://lore.kernel...
```diff diff --git a/drivers/remoteproc/qcom_q6v5_wcss.c b/drivers/remoteproc/qcom_q6v5_wcss.c index 810441f43396..f869187e8e77 100644 --- a/drivers/remoteproc/qcom_q6v5_wcss.c +++ b/drivers/remoteproc/qcom_q6v5_wcss.c @@ -1056,18 +1056,33 @@ static int q6v5_wcss_probe(struct platform_device *pdev) qcom_add_pdm_subde...
fe80d3205e91e36e67f4d3d6c326793298d15766
Analyze and fix the following issue in the Linux kernel code: remoteproc: qcom: adsp: Remove subdevs on the error path of adsp_probe()
Problem Details: Current implementation of adsp_probe() in qcom_q6v5_adsp.c and does not remove the subdevs of adsp on the error path. Fix this bug by calling qcom_remove_{ssr,sysmon,pdm,smd,glink}_subdev(), and qcom_q6v5_deinit() appropriately. Fixes: dc160e449122 ("remoteproc: qcom: Introduce Non-PAS ADSP PIL driver...
```diff diff --git a/drivers/remoteproc/qcom_q6v5_adsp.c b/drivers/remoteproc/qcom_q6v5_adsp.c index cbd9a914880b..5aa11ca41c7d 100644 --- a/drivers/remoteproc/qcom_q6v5_adsp.c +++ b/drivers/remoteproc/qcom_q6v5_adsp.c @@ -734,15 +734,22 @@ static int adsp_probe(struct platform_device *pdev) desc->ssctl_id)...
587b67cf62a91b10a47f41c20ed8ad71db375334
Analyze and fix the following issue in the Linux kernel code: remoteproc: qcom: pas: Remove subdevs on the error path of adsp_probe()
Problem Details: Current implementation of adsp_probe() in qcom_q6v5_pas.c does not remove the subdevs of adsp on the error path. Fix this bug by calling qcom_remove_{ssr,sysmon,pdm,smd,glink}_subdev(), qcom_q6v5_deinit(), and adsp_unassign_memory_region() appropriately. Fixes: 4b48921a8f74 ("remoteproc: qcom: Use com...
```diff diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c index 297ef0c69054..45112fddd9a7 100644 --- a/drivers/remoteproc/qcom_q6v5_pas.c +++ b/drivers/remoteproc/qcom_q6v5_pas.c @@ -759,16 +759,16 @@ static int adsp_probe(struct platform_device *pdev) ret = adsp_init_clock(adsp)...
11ee317d883ef111b8c36228437eaffea7b49bbc
Analyze and fix the following issue in the Linux kernel code: octeontx2-pf: Fix spelling mistake "reprentator" -> "representor"
Problem Details: There is a spelling mistake in a NL_SET_ERR_MSG_MOD error message. Fix it. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://patch.msgid.link/20241114102012.1868514-1-colin.i.king@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
```diff diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/rep.c b/drivers/net/ethernet/marvell/octeontx2/nic/rep.c index ae58d0601b45..232b10740c13 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/rep.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/rep.c @@ -687,7 +687,7 @@ int rvu_rep_create(struct otx...
1f181d1cda56c2fbe379c5ace1aa1fac6306669e
Analyze and fix the following issue in the Linux kernel code: irqchip/riscv-aplic: Prevent crash when MSI domain is missing
Problem Details: If the APLIC driver is probed before the IMSIC driver, the parent MSI domain will be missing, which causes a NULL pointer dereference in msi_create_device_irq_domain(). Avoid this by deferring probe until the parent MSI domain is available. Use dev_err_probe() to avoid printing an error message when r...
```diff diff --git a/drivers/irqchip/irq-riscv-aplic-main.c b/drivers/irqchip/irq-riscv-aplic-main.c index 900e72541db9..93e7c51f944a 100644 --- a/drivers/irqchip/irq-riscv-aplic-main.c +++ b/drivers/irqchip/irq-riscv-aplic-main.c @@ -207,7 +207,8 @@ static int aplic_probe(struct platform_device *pdev) else rc = a...
8ffade77b6337a8767fae9820d57d7a6413dd1a1
Analyze and fix the following issue in the Linux kernel code: gve: Flow steering trigger reset only for timeout error
Problem Details: When configuring flow steering rules, the driver is currently going through a reset for all errors from the device. Instead, the driver should only reset when there's a timeout error from the device. Fixes: 57718b60df9b ("gve: Add flow steering adminq commands") Cc: stable@vger.kernel.org Signed-off-b...
```diff diff --git a/drivers/net/ethernet/google/gve/gve_adminq.c b/drivers/net/ethernet/google/gve/gve_adminq.c index e44e8b139633..060e0e674938 100644 --- a/drivers/net/ethernet/google/gve/gve_adminq.c +++ b/drivers/net/ethernet/google/gve/gve_adminq.c @@ -1248,10 +1248,10 @@ gve_adminq_configure_flow_rule(struct gve...
41ffcd95015f18178ddc53fed919c2842d52fe38
Analyze and fix the following issue in the Linux kernel code: net: phy: fix phylib's dual eee_enabled
Problem Details: phylib has two eee_enabled members. Some parts of the code are using phydev->eee_enabled, other parts are using phydev->eee_cfg.eee_enabled. This leads to incorrect behaviour as their state goes out of sync. ethtool --show-eee shows incorrect information, and --set-eee sometimes doesn't take effect. F...
```diff diff --git a/drivers/net/phy/phy-c45.c b/drivers/net/phy/phy-c45.c index 5695935fdce9..ac987e5e82dc 100644 --- a/drivers/net/phy/phy-c45.c +++ b/drivers/net/phy/phy-c45.c @@ -942,7 +942,7 @@ EXPORT_SYMBOL_GPL(genphy_c45_read_eee_abilities); */ int genphy_c45_an_config_eee_aneg(struct phy_device *phydev) { -...
0c0d0f42ffa6ac94cd79893b7ed419c15e1b45de
Analyze and fix the following issue in the Linux kernel code: xsk: Free skb when TX metadata options are invalid
Problem Details: When a new skb is allocated for transmitting an xsk descriptor, i.e., for every non-multibuf descriptor or the first frag of a multibuf descriptor, but the descriptor is later found to have invalid options set for the TX metadata, the new skb is never freed. This can leak skbs until the send buffer is ...
```diff diff --git a/net/xdp/xsk.c b/net/xdp/xsk.c index 1140b2a120ca..b57d5d2904eb 100644 --- a/net/xdp/xsk.c +++ b/net/xdp/xsk.c @@ -675,6 +675,8 @@ static struct sk_buff *xsk_build_skb(struct xdp_sock *xs, len = desc->len; if (!skb) { + first_frag = true; + hr = max(NET_SKB_PAD, L1_CACHE_ALIGN(dev->nee...
ed7231f56cd7f795ff3a831e32946a96661bfee9
Analyze and fix the following issue in the Linux kernel code: netdev-genl: Hold rcu_read_lock in napi_set
Problem Details: Hold rcu_read_lock during netdev_nl_napi_set_doit, which calls napi_by_id and requires rcu_read_lock to be held. Closes: https://lore.kernel.org/netdev/719083c2-e277-447b-b6ea-ca3acb293a03@redhat.com/ Fixes: 1287c1ae0fc2 ("netdev-genl: Support setting per-NAPI config values") Signed-off-by: Joe Damato...
```diff diff --git a/net/core/netdev-genl.c b/net/core/netdev-genl.c index 765ce7c9d73b..fa119ff68698 100644 --- a/net/core/netdev-genl.c +++ b/net/core/netdev-genl.c @@ -346,6 +346,7 @@ int netdev_nl_napi_set_doit(struct sk_buff *skb, struct genl_info *info) napi_id = nla_get_u32(info->attrs[NETDEV_A_NAPI_ID]); ...
c53bf100f68619acf6cedcf4cf5249a1ca2db0b4
Analyze and fix the following issue in the Linux kernel code: netdev-genl: Hold rcu_read_lock in napi_get
Problem Details: Hold rcu_read_lock in netdev_nl_napi_get_doit, which calls napi_by_id and is required to be called under rcu_read_lock. Cc: stable@vger.kernel.org Fixes: 27f91aaf49b3 ("netdev-genl: Add netlink framework functions for napi") Signed-off-by: Joe Damato <jdamato@fastly.com> Link: https://patch.msgid.link...
```diff diff --git a/net/core/netdev-genl.c b/net/core/netdev-genl.c index 1cb954f2d39e..d2baa1af9df0 100644 --- a/net/core/netdev-genl.c +++ b/net/core/netdev-genl.c @@ -215,6 +215,7 @@ int netdev_nl_napi_get_doit(struct sk_buff *skb, struct genl_info *info) return -ENOMEM; rtnl_lock(); + rcu_read_lock(); n...
812a1c3b9f7c36d9255f0d29d0a3d324e2f52321
Analyze and fix the following issue in the Linux kernel code: rcuscale: Do a proper cleanup if kfree_scale_init() fails
Problem Details: A static analyzer for C, Smatch, reports and triggers below warnings: kernel/rcu/rcuscale.c:1215 rcu_scale_init() warn: inconsistent returns 'global &fullstop_mutex'. The checker complains about, we do not unlock the "fullstop_mutex" mutex, in case of hitting below error path: <snip> ... i...
```diff diff --git a/kernel/rcu/rcuscale.c b/kernel/rcu/rcuscale.c index 6d37596deb1f..d360fa44b234 100644 --- a/kernel/rcu/rcuscale.c +++ b/kernel/rcu/rcuscale.c @@ -890,13 +890,15 @@ kfree_scale_init(void) if (WARN_ON_ONCE(jiffies_at_lazy_cb - jif_start < 2 * HZ)) { pr_alert("ERROR: call_rcu() CBs are not bein...
9407f5c3ec10c155aae61fc4496a7c17a96907b4
Analyze and fix the following issue in the Linux kernel code: srcu: Unconditionally record srcu_read_lock_lite() in ->srcu_reader_flavor
Problem Details: Currently, srcu_read_lock_lite() uses the SRCU_READ_FLAVOR_LITE bit in ->srcu_reader_flavor to communicate to the grace-period processing in srcu_readers_active_idx_check() that the smp_mb() must be replaced by a synchronize_rcu(). Unfortunately, ->srcu_reader_flavor is not updated unless the kernel i...
```diff diff --git a/include/linux/srcu.h b/include/linux/srcu.h index 56f83237de4d..08339eb8a01c 100644 --- a/include/linux/srcu.h +++ b/include/linux/srcu.h @@ -183,12 +183,6 @@ static inline int srcu_read_lock_held(const struct srcu_struct *ssp) #endif /* #else #ifdef CONFIG_DEBUG_LOCK_ALLOC */ -#if defined(CON...
31457d4cea19dc807e3beab15883c912f19acef7
Analyze and fix the following issue in the Linux kernel code: PCI: Fix typos
Problem Details: Fix typos and whitespace errors. Link: https://lore.kernel.org/r/20241102174537.1362183-1-helgaas@kernel.org Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
```diff diff --git a/drivers/pci/controller/pcie-rcar-host.c b/drivers/pci/controller/pcie-rcar-host.c index 3dd653f3d784..7c92eada04af 100644 --- a/drivers/pci/controller/pcie-rcar-host.c +++ b/drivers/pci/controller/pcie-rcar-host.c @@ -796,8 +796,8 @@ static int rcar_pcie_enable_msi(struct rcar_pcie_host *host) rc...
332857fdac73f1c7b74ad962c07bb39e4c0c145a
Analyze and fix the following issue in the Linux kernel code: of: Allow overlay kunit tests to run CONFIG_OF_OVERLAY=n
Problem Details: Some configurations want to enable CONFIG_KUNIT without enabling CONFIG_OF_OVERLAY. The kunit overlay code already skips if CONFIG_OF_OVERLAY isn't enabled, so this select here isn't really doing anything besides making it easier to run the tests without them skipping. Remove the select and move the co...
```diff diff --git a/drivers/of/.kunitconfig b/drivers/of/.kunitconfig index 4c53d2c7a275..7d570cb922a1 100644 --- a/drivers/of/.kunitconfig +++ b/drivers/of/.kunitconfig @@ -1,4 +1,5 @@ CONFIG_KUNIT=y CONFIG_OF=y CONFIG_OF_KUNIT_TEST=y +CONFIG_OF_OVERLAY=y CONFIG_OF_OVERLAY_KUNIT_TEST=y diff --git a/drivers/of/Kco...
bed2cc482600296fe04edbc38005ba2851449c10
Analyze and fix the following issue in the Linux kernel code: hostfs: Fix the NULL vs IS_ERR() bug for __filemap_get_folio()
Problem Details: The __filemap_get_folio() function returns error pointers. It never returns NULL. So use IS_ERR() to check it. Fixes: 1da86618bdce ("fs: Convert aops->write_begin to take a folio") Signed-off-by: ZhangPeng <zhangpeng362@huawei.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Ric...
```diff diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index 8d47c6b70c9f..7e51d2cec64b 100644 --- a/fs/hostfs/hostfs_kern.c +++ b/fs/hostfs/hostfs_kern.c @@ -472,8 +472,8 @@ static int hostfs_write_begin(struct file *file, struct address_space *mapping, *foliop = __filemap_get_folio(mapping, index,...
f74dacb4c81164d7578a11d5f8b660ad87059e6a
Analyze and fix the following issue in the Linux kernel code: dlm: fix recovery of middle conversions
Problem Details: In one special case, recovery is unable to reliably rebuild lock state by simply recreating lkb structs as sent from the lock holders. That case is when the lkb's include conversions between PR and CW modes. The recovery code has always recognized this special case, but the implemention has always be...
```diff diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c index 966a926c301b..fc1d710166e9 100644 --- a/fs/dlm/lock.c +++ b/fs/dlm/lock.c @@ -4999,16 +4999,19 @@ static void recover_convert_waiter(struct dlm_ls *ls, struct dlm_lkb *lkb, struct dlm_message *ms_local) { if (middle_conversion(lkb)) { + log_rinfo(ls, ...
fab974e6487475c2fca0a79918e8e75bd6bafffc
Analyze and fix the following issue in the Linux kernel code: libbpf: Fix memory leak in bpf_program__attach_uprobe_multi
Problem Details: Andrii reported memory leak detected by Coverity on error path in bpf_program__attach_uprobe_multi. Fixing that by moving the check earlier before the offsets allocations. Reported-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Jiri Olsa <jolsa@kernel.org> Signed-off-by: Andrii Nakryiko <andri...
```diff diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index 07d5de81dd38..66173ddb5a2d 100644 --- a/tools/lib/bpf/libbpf.c +++ b/tools/lib/bpf/libbpf.c @@ -12006,6 +12006,8 @@ bpf_program__attach_uprobe_multi(const struct bpf_program *prog, ref_ctr_offsets = OPTS_GET(opts, ref_ctr_offsets, NULL); coo...
15cf53ece41748a102f4b5ee26947c2ec059bf95
Analyze and fix the following issue in the Linux kernel code: drm/xe: Mark preempt fence workqueue as reclaim
Problem Details: Preempt fences are in the path of reclaim, and we signal these fences in the preempt workqueue. With that, we need to mark the preempt fence workqueue with reclaim so that this workqueue can make forward progress during reclaim. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")...
```diff diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c index 0e2dd691bdae..06d6db8b50f9 100644 --- a/drivers/gpu/drm/xe/xe_device.c +++ b/drivers/gpu/drm/xe/xe_device.c @@ -350,7 +350,8 @@ struct xe_device *xe_device_create(struct pci_dev *pdev, INIT_LIST_HEAD(&xe->pinned.external_vram);...
96a30e469ca1d2b8cc7811b40911f8614b558241
Analyze and fix the following issue in the Linux kernel code: bpf: use common instruction history across all states
Problem Details: Instead of allocating and copying instruction history each time we enqueue child verifier state, switch to a model where we use one common dynamically sized array of instruction history entries across all states. The key observation for proving this is correct is that instruction history is only relev...
```diff diff --git a/include/linux/bpf_verifier.h b/include/linux/bpf_verifier.h index 6b7c91629176..f4290c179bee 100644 --- a/include/linux/bpf_verifier.h +++ b/include/linux/bpf_verifier.h @@ -334,7 +334,7 @@ struct bpf_func_state { #define MAX_CALL_FRAMES 8 -/* instruction history flags, used in bpf_jmp_history...
5e316d34b53039346e252d0019e2f4167af2c0ef
Analyze and fix the following issue in the Linux kernel code: PCI: of_property: Assign PCI instead of CPU bus address to dynamic PCI nodes
Problem Details: When populating "ranges" property for a PCI bridge or endpoint, of_pci_prop_ranges() incorrectly uses the CPU address of the resource. In such PCI nodes, the window should instead be in PCI address space. Call pci_bus_address() on the resource in order to obtain the PCI bus address. [Previous discuss...
```diff diff --git a/drivers/pci/of_property.c b/drivers/pci/of_property.c index 5a0b98e69795..886c236e5de6 100644 --- a/drivers/pci/of_property.c +++ b/drivers/pci/of_property.c @@ -126,7 +126,7 @@ static int of_pci_prop_ranges(struct pci_dev *pdev, struct of_changeset *ocs, if (of_pci_get_addr_flags(&res[j], &flag...
bcdcb115eaed5e988cf37cc9a1dd5f5dd200e927
Analyze and fix the following issue in the Linux kernel code: ubifs: Fix uninitialized use of err in ubifs_jnl_write_inode()
Problem Details: Clang warns (or errors with CONFIG_WERROR=y): fs/ubifs/journal.c:986:20: error: variable 'err' is uninitialized when used here [-Werror,-Wuninitialized] 986 | ubifs_ro_mode(c, err); | ^~~ Set err to -EPERM before the call to ubifs_ro_mode...
```diff diff --git a/fs/ubifs/journal.c b/fs/ubifs/journal.c index 8e98be642371..36ba79fbd2ff 100644 --- a/fs/ubifs/journal.c +++ b/fs/ubifs/journal.c @@ -983,8 +983,9 @@ int ubifs_jnl_write_inode(struct ubifs_info *c, const struct inode *inode) if (kill_xattrs && ui->xattr_cnt > ubifs_xattr_max_cnt(c)) { ubifs_...
4ff04abf9d5bc33d33c7a799887517619188b068
Analyze and fix the following issue in the Linux kernel code: bpf: Add necessary migrate_disable to range_tree.
Problem Details: When running bpf selftest (./test_progs -j), the following warnings showed up: $ ./test_progs -t arena_atomics ... BUG: using smp_processor_id() in preemptible [00000000] code: kworker/u19:0/12501 caller is bpf_mem_free+0x128/0x330 ... Call Trace: <TASK> dump_stack_lvl check_preem...
```diff diff --git a/kernel/bpf/range_tree.c b/kernel/bpf/range_tree.c index f7915ab0a6d3..5bdf9aadca3a 100644 --- a/kernel/bpf/range_tree.c +++ b/kernel/bpf/range_tree.c @@ -150,7 +150,9 @@ int range_tree_clear(struct range_tree *rt, u32 start, u32 len) range_it_insert(rn, rt); /* Add a range */ + migrate_...
957860cbc1dc89f79f2acc193470224e350dfd03
Analyze and fix the following issue in the Linux kernel code: block: make struct rq_list available for !CONFIG_BLOCK
Problem Details: A previous commit changed how requests are linked in the plug structure, but unlike the previous method, it uses a new type for it rather than struct request. The latter is available even for !CONFIG_BLOCK, while struct rq_list is now. Move it outside CONFIG_BLOCK. Reported-by: Nathan Chancellor <nath...
```diff diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 00212e96261a..a1fd0ddce5cf 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -1006,12 +1006,12 @@ extern void blk_put_queue(struct request_queue *); void blk_mark_disk_dead(struct gendisk *disk); -#ifdef CONFIG_BLOCK stru...
82ff5abc2edcfba0c0f1a1be807795e2876f46e9
Analyze and fix the following issue in the Linux kernel code: ASoC: hdmi-codec: reorder channel allocation list
Problem Details: The ordering in hdmi_codec_get_ch_alloc_table_idx() results in wrong channel allocation for a number of cases, e.g. when ELD reports FL|FR|LFE|FC|RL|RR or FL|FR|LFE|FC|RL|RR|RC|RLC|RRC: ca_id 0x01 with speaker mask FL|FR|LFE is selected instead of ca_id 0x03 with speaker mask FL|FR|LFE|FC for 4 channe...
```diff diff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c index 74caae52e127..d9df29a26f4f 100644 --- a/sound/soc/codecs/hdmi-codec.c +++ b/sound/soc/codecs/hdmi-codec.c @@ -185,84 +185,97 @@ static const struct snd_pcm_chmap_elem hdmi_codec_8ch_chmaps[] = { /* * hdmi_codec_channel_alloc: sp...
d303e3dd8d4648f2a1bb19944d4fb1c4a5030354
Analyze and fix the following issue in the Linux kernel code: tools/thermal: Fix common realloc mistake
Problem Details: If the 'realloc' fails, the thermal zones pointer is set to NULL. This makes all thermal zones references which were previously successfully initialized to be lost. [dlezcano] : Fixed indentation Signed-off-by: zhang jiao <zhangjiao2@cmss.chinamobile.com> Link: https://lore.kernel.org/r/2024111408403...
```diff diff --git a/tools/thermal/thermometer/thermometer.c b/tools/thermal/thermometer/thermometer.c index 1a87a0a77f9f..022865da8e3c 100644 --- a/tools/thermal/thermometer/thermometer.c +++ b/tools/thermal/thermometer/thermometer.c @@ -259,6 +259,7 @@ static int thermometer_add_tz(const char *path, const char *name,...
553a5d14fcd927194c409b10faced6a6dbc678d1
Analyze and fix the following issue in the Linux kernel code: drm/xe/ufence: Wake up waiters after setting ufence->signalled
Problem Details: If a previous ufence is not signalled, vm_bind will return -EBUSY. Delaying the modification of ufence->signalled can cause issues if the UMD reuses the same ufence so update ufence->signalled before waking up waiters. Cc: Matthew Brost <matthew.brost@intel.com> Link: https://gitlab.freedesktop.org/dr...
```diff diff --git a/drivers/gpu/drm/xe/xe_sync.c b/drivers/gpu/drm/xe/xe_sync.c index a90480c6aecf..42f5bebd09e5 100644 --- a/drivers/gpu/drm/xe/xe_sync.c +++ b/drivers/gpu/drm/xe/xe_sync.c @@ -87,8 +87,12 @@ static void user_fence_worker(struct work_struct *w) drm_dbg(&ufence->xe->drm, "mmget_not_zero() failed, uf...
fe52c649438b8489c9456681d93a9b3de3d38263
Analyze and fix the following issue in the Linux kernel code: dma-fence: Use kernel's sort for merging fences
Problem Details: One alternative to the fix Christian proposed in https://lore.kernel.org/dri-devel/20241024124159.4519-3-christian.koenig@amd.com/ is to replace the rather complex open coded sorting loops with the kernel standard sort followed by a context squashing pass. Proposed advantage of this would be readabili...
```diff diff --git a/drivers/dma-buf/dma-fence-unwrap.c b/drivers/dma-buf/dma-fence-unwrap.c index b19d0adf6086..6345062731f1 100644 --- a/drivers/dma-buf/dma-fence-unwrap.c +++ b/drivers/dma-buf/dma-fence-unwrap.c @@ -12,6 +12,7 @@ #include <linux/dma-fence-chain.h> #include <linux/dma-fence-unwrap.h> #include <lin...
949291c5314009b4f6e252391edbb40fdd5d5414
Analyze and fix the following issue in the Linux kernel code: dma-fence: Fix reference leak on fence merge failure path
Problem Details: Release all fence references if the output dma-fence-array could not be allocated. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com> Fixes: 245a4a7b531c ("dma-buf: generalize dma_fence unwrap & merging v3") Cc: Christian König <christian.koenig@amd.com> Cc: Daniel Vetter <daniel.vetter@ffwll.c...
```diff diff --git a/drivers/dma-buf/dma-fence-unwrap.c b/drivers/dma-buf/dma-fence-unwrap.c index 628af51c81af..b19d0adf6086 100644 --- a/drivers/dma-buf/dma-fence-unwrap.c +++ b/drivers/dma-buf/dma-fence-unwrap.c @@ -164,6 +164,8 @@ restart: dma_fence_context_alloc(1), 1, false); if (!result) { + for (...
4223414efeae3a8efb4da1e9c9c52a1a44c1c5bf
Analyze and fix the following issue in the Linux kernel code: crypto: marvell/cesa - fix uninit value for struct mv_cesa_op_ctx
Problem Details: In cesa/cipher.c most declarations of struct mv_cesa_op_ctx are uninitialized. This causes one of the values in the struct to be left unitialized in later usages. This patch fixes it by adding initializations in the same way it is done in cesa/hash.c. Fixes errors discovered in coverity: 1600942, 160...
```diff diff --git a/drivers/crypto/marvell/cesa/cipher.c b/drivers/crypto/marvell/cesa/cipher.c index 0f37dfd42d85..cf62db50f958 100644 --- a/drivers/crypto/marvell/cesa/cipher.c +++ b/drivers/crypto/marvell/cesa/cipher.c @@ -489,7 +489,7 @@ static int mv_cesa_des_op(struct skcipher_request *req, static int mv_cesa...
572b7cf08403b6c67dfe0dc3e0f2efb42443254f
Analyze and fix the following issue in the Linux kernel code: crypto: cavium - Fix an error handling path in cpt_ucode_load_fw()
Problem Details: If do_cpt_init() fails, a previous dma_alloc_coherent() call needs to be undone. Add the needed dma_free_coherent() before returning. Fixes: 9e2c7d99941d ("crypto: cavium - Add Support for Octeon-tx CPT Engine") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Herbert ...
```diff diff --git a/drivers/crypto/cavium/cpt/cptpf_main.c b/drivers/crypto/cavium/cpt/cptpf_main.c index ec17beee24c0..54de869e5374 100644 --- a/drivers/crypto/cavium/cpt/cptpf_main.c +++ b/drivers/crypto/cavium/cpt/cptpf_main.c @@ -302,6 +302,8 @@ static int cpt_ucode_load_fw(struct cpt_device *cpt, const u8 *fw, bo...
dccd55892bbbcac5b6320745c809bd310b843f2f
Analyze and fix the following issue in the Linux kernel code: crypto: aesni - Move back to module_init
Problem Details: This patch reverts commit 0fbafd06bdde938884f7326548d3df812b267c3c ("crypto: aesni - fix failing setkey for rfc4106-gcm-aesni") by moving the aesni init function back to module_init from late_initcall. The original patch was needed because tests were synchronous. This is no longer the case so there i...
```diff diff --git a/arch/x86/crypto/aesni-intel_glue.c b/arch/x86/crypto/aesni-intel_glue.c index b0dd83555499..fbf43482e1f5 100644 --- a/arch/x86/crypto/aesni-intel_glue.c +++ b/arch/x86/crypto/aesni-intel_glue.c @@ -1747,7 +1747,7 @@ static void __exit aesni_exit(void) unregister_avx_algs(); } -late_initcall(ae...
3574a5168ff3b6bddc4cd235878491f75967c8d4
Analyze and fix the following issue in the Linux kernel code: crypto: aes-gcm-p10 - Use the correct bit to test for P10
Problem Details: A hwcap feature bit is passed to cpu_has_feature, resulting in testing for CPU_FTR_MMCRA instead of the 3.1 platform revision. Fixes: c954b252dee9 ("crypto: powerpc/p10-aes-gcm - Register modules as SIMD") Reported-by: Nicolai Stange <nstange@suse.com> Signed-off-by: Michal Suchanek <msuchanek@suse.de...
```diff diff --git a/arch/powerpc/crypto/aes-gcm-p10-glue.c b/arch/powerpc/crypto/aes-gcm-p10-glue.c index e52629334cf8..1f8b67775658 100644 --- a/arch/powerpc/crypto/aes-gcm-p10-glue.c +++ b/arch/powerpc/crypto/aes-gcm-p10-glue.c @@ -414,7 +414,7 @@ static int __init p10_init(void) { int ret; - if (!cpu_has_featu...
19630cf57233e845b6ac57c9c969a4888925467b
Analyze and fix the following issue in the Linux kernel code: crypto: bcm - add error check in the ahash_hmac_init function
Problem Details: The ahash_init functions may return fails. The ahash_hmac_init should not return ok when ahash_init returns error. For an example, ahash_init will return -ENOMEM when allocation memory is error. Fixes: 9d12ba86f818 ("crypto: brcm - Add Broadcom SPU driver") Signed-off-by: Chen Ridong <chenridong@huawe...
```diff diff --git a/drivers/crypto/bcm/cipher.c b/drivers/crypto/bcm/cipher.c index 7540eb7cd331..9e6798efbfb7 100644 --- a/drivers/crypto/bcm/cipher.c +++ b/drivers/crypto/bcm/cipher.c @@ -2415,6 +2415,7 @@ static int ahash_hmac_setkey(struct crypto_ahash *ahash, const u8 *key, static int ahash_hmac_init(struct ah...