id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
a5bb8a64025b4457ead9f588933536795c210f35
Analyze and fix the following issue in the Linux kernel code: fbdev/tcx: Use initializer macro for struct fb_ops
Problem Details: Initialize struct fb_ops to the correct default values with the macro FB_DEFAULT_SBUS_OPS(). Rename the ioctl and mmap callbacks to use the infix _sbusfb_. This makes them fit the SBUS helpers' naming pattern. Also make the driver depend on FB_SBUS_HELPERS, which selects the correct modules. Signed-of...
```diff diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index ae2b0c07223f..79b1e4e542e7 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -559,9 +559,7 @@ config FB_FFB config FB_TCX bool "TCX (SS4/SS5 only) support" depends on FB_SBUS - select FB_CFB_FILLRECT - ...
d1ed0f1d2a047035fcfc9f62a2423c7ee2d057f4
Analyze and fix the following issue in the Linux kernel code: fbdev/p9100: Use initializer macro for struct fb_ops
Problem Details: Initialize struct fb_ops to the correct default values with the macro FB_DEFAULT_SBUS_OPS(). Rename the ioctl and mmap callbacks to use the infix _sbusfb_. This makes them fit the SBUS helpers' naming pattern. Also make the driver depend on FB_SBUS_HELPERS, which selects the correct modules. Signed-of...
```diff diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 3bade062ac3f..ae2b0c07223f 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -577,9 +577,7 @@ config FB_CG14 config FB_P9100 bool "P9100 (Sparcbook 3 only) support" depends on FB_SBUS - select FB_CFB_FI...
10ff3e6c8dbb9f1f47eefee842803a7661fd25ee
Analyze and fix the following issue in the Linux kernel code: fbdev/leo: Use initializer macro for struct fb_ops
Problem Details: Initialize struct fb_ops to the correct default values with the macro FB_DEFAULT_SBUS_OPS(). Rename the ioctl and mmap callbacks to use the infix _sbusfb_. This makes them fit the SBUS helpers' naming pattern. Also make the driver depend on FB_SBUS_HELPERS, which selects the correct modules. Signed-of...
```diff diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index dfc601db65a4..3bade062ac3f 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -587,9 +587,7 @@ config FB_P9100 config FB_LEO bool "Leo (ZX) support" depends on FB_SBUS - select FB_CFB_FILLRECT - select F...
aee3c3119fd5c3c3a3442b7056a2bf08163a8fd7
Analyze and fix the following issue in the Linux kernel code: fbdev/ffb: Use initializer macro for struct fb_ops
Problem Details: Initialize struct fb_ops to the correct default values with the internal __FB_DEFAULT_SBUS_OPS_*() macros. Rename the ioctl and mmap callbacks to use the infix _sbusfb_. This makes them fit the SBUS helpers' naming pattern. It is not possible to use set all defaults via FB_DEAFULT_SBUS_OPS(), as ffb p...
```diff diff --git a/drivers/video/fbdev/ffb.c b/drivers/video/fbdev/ffb.c index e4fe13059ad5..a3ce774f87bd 100644 --- a/drivers/video/fbdev/ffb.c +++ b/drivers/video/fbdev/ffb.c @@ -36,16 +36,18 @@ static void ffb_imageblit(struct fb_info *, const struct fb_image *); static void ffb_fillrect(struct fb_info *, const s...
17397471d80ec0aa058d3cd1767aca8caa7e291f
Analyze and fix the following issue in the Linux kernel code: fbdev/cg6: Use initializer macro for struct fb_ops
Problem Details: Initialize struct fb_ops to the correct default values with the internal __FB_DEFAULT_SBUS_OPS_*() macros. Rename the ioctl and mmap callbacks to use the infix _sbusfb_. This makes them fit the SBUS helpers' naming pattern. It is not possible to use set all defaults via FB_DEAFULT_SBUS_OPS(), as cg6 p...
```diff diff --git a/drivers/video/fbdev/cg6.c b/drivers/video/fbdev/cg6.c index e6cb55be7d8b..894907045789 100644 --- a/drivers/video/fbdev/cg6.c +++ b/drivers/video/fbdev/cg6.c @@ -36,16 +36,18 @@ static void cg6_imageblit(struct fb_info *, const struct fb_image *); static void cg6_fillrect(struct fb_info *, const s...
6e4241347b656e43c73ce6ebfb5f2961f0cdf4a0
Analyze and fix the following issue in the Linux kernel code: fbdev/cg3: Use initializer macro for struct fb_ops
Problem Details: Initialize struct fb_ops to the correct default values with the macro FB_DEFAULT_SBUS_OPS(). Rename the ioctl and mmap callbacks to use the infix _sbusfb_. This makes them fit the SBUS helpers' naming pattern. Also make the driver depend on FB_SBUS_HELPERS, which selects the correct modules. Signed-of...
```diff diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 02f163984679..dfc601db65a4 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -534,9 +534,7 @@ config FB_BW2 config FB_CG3 bool "CGthree support" depends on (FB = y) && (SPARC && FB_SBUS) - select FB_CFB...
1d3bba30ded24c8916fc65cacf5ff16c3d642f81
Analyze and fix the following issue in the Linux kernel code: fbdev/cg14: Use initializer macro for struct fb_ops
Problem Details: Initialize struct fb_ops to the correct default values with the macro FB_DEFAULT_SBUS_OPS(). Rename the ioctl and mmap callbacks to use the infix _sbusfb_. This makes them fit the SBUS helpers' naming pattern. Also make the driver depend on FB_SBUS_HELPERS, which selects the correct modules. Signed-of...
```diff diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 7e4710defc32..02f163984679 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -571,9 +571,7 @@ config FB_TCX config FB_CG14 bool "CGfourteen (SX) support" depends on FB_SBUS - select FB_CFB_FILLRECT - se...
3409343341b10eb99c8bf1eb46a2c49e9cdd786d
Analyze and fix the following issue in the Linux kernel code: fbdev/bw2: Use initializer macro for struct fb_ops
Problem Details: Initialize struct fb_ops to the correct default values with the macro FB_DEFAULT_SBUS_OPS(). Rename the ioctl and mmap callbacks to use the infix _sbusfb_. This makes them fit the SBUS helpers' naming pattern. Also make the driver depend on FB_SBUS_HELPERS, which selects the correct modules. Signed-of...
```diff diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index fd5bd284c0f8..7e4710defc32 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -527,9 +527,7 @@ config FB_SBUS_HELPERS config FB_BW2 bool "BWtwo support" depends on (FB = y) && (SPARC && FB_SBUS) - select...
03997da042dac73c69e60d91942c727c76828b65
Analyze and fix the following issue in the Linux kernel code: cpufreq: powernow-k8: Use related_cpus instead of cpus in driver.exit()
Problem Details: Since the 'cpus' field of policy structure will become empty in the cpufreq core API, it is better to use 'related_cpus' in the exit() callback of driver. Fixes: c3274763bfc3 ("cpufreq: powernow-k8: Initialize per-cpu data-structures properly") Signed-off-by: Liao Chang <liaochang1@huawei.com> Signed-...
```diff diff --git a/drivers/cpufreq/powernow-k8.c b/drivers/cpufreq/powernow-k8.c index d289036beff2..b10f7a1b77f1 100644 --- a/drivers/cpufreq/powernow-k8.c +++ b/drivers/cpufreq/powernow-k8.c @@ -1101,7 +1101,8 @@ static int powernowk8_cpu_exit(struct cpufreq_policy *pol) kfree(data->powernow_table); kfree(dat...
b9283ac01a277e73111dbd06d1974ace30e40f16
Analyze and fix the following issue in the Linux kernel code: dt-bindings: mtd: amlogic,meson-nand: drop unneeded quotes
Problem Details: Drop unneeded quotes over simple string values to fix recently enabled yamllint warning: [error] string value is redundantly quoted with any quotes (quoted-strings) Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-...
```diff diff --git a/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml b/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml index 1c79815e1f7f..57b6957c8415 100644 --- a/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml +++ b/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.ya...
bb5ed01cd2428cd25b1c88a3a9cba87055eb289f
Analyze and fix the following issue in the Linux kernel code: igb: set max size RX buffer when store bad packet is enabled
Problem Details: Increase the RX buffer size to 3K when the SBP bit is on. The size of the RX buffer determines the number of pages allocated which may not be sufficient for receive frames larger than the set MTU size. Cc: stable@vger.kernel.org Fixes: 89eaefb61dc9 ("igb: Support RX-ALL feature flag.") Reported-by: Ma...
```diff diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index 9a2561409b06..08e3df37089f 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -4814,6 +4814,10 @@ void igb_configure_rx_ring(struct igb_adapter *adapter...
c2f8fd7949603efb03908e05abbf7726748c8de3
Analyze and fix the following issue in the Linux kernel code: netrom: Deny concurrent connect().
Problem Details: syzkaller reported null-ptr-deref [0] related to AF_NETROM. This is another self-accept issue from the strace log. [1] syz-executor creates an AF_NETROM socket and calls connect(), which is blocked at that time. Then, sk->sk_state is TCP_SYN_SENT and sock->state is SS_CONNECTING. [pid 5059] socke...
```diff diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c index eb8ccbd58df7..96e91ab71573 100644 --- a/net/netrom/af_netrom.c +++ b/net/netrom/af_netrom.c @@ -660,6 +660,11 @@ static int nr_connect(struct socket *sock, struct sockaddr *uaddr, goto out_release; } + if (sock->state == SS_CONNECTING) { ...
687eb3c42f4ad81e7c947c50e2d865f692064291
Analyze and fix the following issue in the Linux kernel code: xtensa: PMU: fix base address for the newer hardware
Problem Details: With introduction of ERI access control in RG.0 base address of the PMU unit registers has changed. Add support for the new PMU configuration. Cc: stable@vger.kernel.org Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
```diff diff --git a/arch/xtensa/include/asm/core.h b/arch/xtensa/include/asm/core.h index 0e1bb6f019d6..3f5ffae89b58 100644 --- a/arch/xtensa/include/asm/core.h +++ b/arch/xtensa/include/asm/core.h @@ -52,4 +52,13 @@ #define XTENSA_STACK_ALIGNMENT 16 #endif +#ifndef XCHAL_HW_MIN_VERSION +#if defined(XCHAL_HW_MIN_V...
037303d6760751fdb95ba62cf448ecbc1ac29c98
Analyze and fix the following issue in the Linux kernel code: tls: reduce size of tls_cipher_size_desc
Problem Details: tls_cipher_size_desc indexes ciphers by their type, but we're not using indices 0..50 of the array. Each struct tls_cipher_size_desc is 20B, so that's a lot of unused memory. We can reindex the array starting at the lowest used cipher_type. Introduce the get_cipher_size_desc helper to find the right i...
```diff diff --git a/net/tls/tls.h b/net/tls/tls.h index 7aae92972e00..ea799ef77bf8 100644 --- a/net/tls/tls.h +++ b/net/tls/tls.h @@ -59,7 +59,18 @@ struct tls_cipher_size_desc { unsigned int rec_seq; }; -extern const struct tls_cipher_size_desc tls_cipher_size_desc[]; +#define TLS_CIPHER_MIN TLS_CIPHER_AES_GCM_1...
fb0a06d455d64443fefea6843ed6c5ae7ee0b395
Analyze and fix the following issue in the Linux kernel code: tools/net/ynl: Fix extack parsing with fixed header genlmsg
Problem Details: Move decode_fixed_header into YnlFamily and add a _fixed_header_size method to allow extack decoding to skip the fixed header. Signed-off-by: Donald Hunter <donald.hunter@gmail.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Link: https://lore.kernel.org/r/20230825122756.7603-7-donald.hunter...
```diff diff --git a/tools/net/ynl/lib/ynl.py b/tools/net/ynl/lib/ynl.py index fa4f1c28efc5..db556dcb931e 100644 --- a/tools/net/ynl/lib/ynl.py +++ b/tools/net/ynl/lib/ynl.py @@ -293,7 +293,7 @@ def _genl_load_families(): gm = GenlMsg(nl_msg) fam = dict() - for attr in...
c4e1ab07b5572b9c732fcf7ac86e168ee2835adf
Analyze and fix the following issue in the Linux kernel code: doc/netlink: Fix typo in genetlink-* schemas
Problem Details: Fix typo verion -> version in genetlink-c and genetlink-legacy. Signed-off-by: Donald Hunter <donald.hunter@gmail.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Link: https://lore.kernel.org/r/20230825122756.7603-2-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
```diff diff --git a/Documentation/netlink/genetlink-c.yaml b/Documentation/netlink/genetlink-c.yaml index 4c1f8c22627b..9806c44f604c 100644 --- a/Documentation/netlink/genetlink-c.yaml +++ b/Documentation/netlink/genetlink-c.yaml @@ -41,7 +41,7 @@ properties: description: Name of the define for the family name. ...
c6a7550458922181bb922863d5f5feaf3c453fe5
Analyze and fix the following issue in the Linux kernel code: i3c: master: Fix SETDASA process
Problem Details: When a I3C DT node has a static_addr and an init_dyn_addr,the init_dyn_addr is reserved in i3c_master_bus_init() and then the static_addr is reserved in i3c_master_early_i3c_dev_add(). But if the dynamic address is same as static then above procedure would fail. Add a check to pass i3c_bus_get_addr_slo...
```diff diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c index 08aeb69a7800..87283e4a4607 100644 --- a/drivers/i3c/master.c +++ b/drivers/i3c/master.c @@ -1308,7 +1308,11 @@ static int i3c_master_get_i3c_addrs(struct i3c_dev_desc *dev) if (dev->info.static_addr) { status = i3c_bus_get_addr_slot_status(&mas...
32e6b31a6a80ba9493fad802d68d41f4d63230cc
Analyze and fix the following issue in the Linux kernel code: dt-bindings: i3c: Fix description for assigned-address
Problem Details: assigned-address is a valid property for I3C device with or without static address. Fix the description and an example for the same. Signed-off-by: Aniket <aniketmaurya@google.com> Acked-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20230822051209.2837818-1-aniketmaurya@google.com ...
```diff diff --git a/Documentation/devicetree/bindings/i3c/i3c.yaml b/Documentation/devicetree/bindings/i3c/i3c.yaml index fdb4212149e7..ab69f4115de4 100644 --- a/Documentation/devicetree/bindings/i3c/i3c.yaml +++ b/Documentation/devicetree/bindings/i3c/i3c.yaml @@ -135,9 +135,10 @@ patternProperties: minimum:...
5496eac6ad7428fa06811a8c34b3a15beb93b86d
Analyze and fix the following issue in the Linux kernel code: i3c: master: svc: Describe member 'saved_regs'
Problem Details: The 'saved_regs' member of the 'svc_i3c_master' structure is not described in the kernel doc, which produces the following warning: Function parameter or member 'saved_regs' not described in 'svc_i3c_master' Add the missing line in the kernel documentation of the parent structure. Fixes: 1c5ee2a...
```diff diff --git a/drivers/i3c/master/svc-i3c-master.c b/drivers/i3c/master/svc-i3c-master.c index 770b40e28015..17b4ce12aef3 100644 --- a/drivers/i3c/master/svc-i3c-master.c +++ b/drivers/i3c/master/svc-i3c-master.c @@ -156,6 +156,7 @@ struct svc_i3c_regs_save { * @base: I3C master controller * @dev: Correspondi...
f45d32d2cd183c09b6c9aa8689a91d6f2760b557
Analyze and fix the following issue in the Linux kernel code: rtc: isl1208: Fix incorrect logic in isl1208_set_xtoscb()
Problem Details: The XTOSCB bit is not bit 0, but xtosb_val is either 0 or 1. If it is 1, test will never succeed. Fix this issue by using double negation. While at it, remove unnecessary blank line from probe(). Reported-by: Pavel Machek <pavel@denx.de> Closes: https://lore.kernel.org/all/ZN4BgzG2xmzOzdFZ@duo.ucw.cz...
```diff diff --git a/drivers/rtc/rtc-isl1208.c b/drivers/rtc/rtc-isl1208.c index 712ca652d6d3..e50c23ee1646 100644 --- a/drivers/rtc/rtc-isl1208.c +++ b/drivers/rtc/rtc-isl1208.c @@ -188,7 +188,7 @@ isl1208_i2c_validate_client(struct i2c_client *client) static int isl1208_set_xtoscb(struct i2c_client *client, int sr, ...
15d63a897f79f465d71fb55cc11c6b7e20c19391
Analyze and fix the following issue in the Linux kernel code: dt-bindings: PCI: qcom: Fix SDX65 compatible
Problem Details: Commit c0aba9f32801 ("dt-bindings: PCI: qcom: Add SDX65 SoC") adding SDX65 was never tested and is clearly bogus. The qcom,sdx65-pcie-ep compatible is followed by a fallback in DTS, and there is no driver matched by this compatible. Driver matches by its fallback qcom,sdx55-pcie-ep. This also fixes ...
```diff diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml index 811112255d7d..c94b49498f69 100644 --- a/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml +++ b/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml @@ -11,10 +11,13 @@ m...
768d612f79822d30a1e7d132a4d4b05337ce42ec
Analyze and fix the following issue in the Linux kernel code: ext4: fix slab-use-after-free in ext4_es_insert_extent()
Problem Details: Yikebaer reported an issue: ================================================================== BUG: KASAN: slab-use-after-free in ext4_es_insert_extent+0xc68/0xcb0 fs/ext4/extents_status.c:894 Read of size 4 at addr ffff888112ecc1a4 by task syz-executor/8438 CPU: 1 PID: 8438 Comm: syz-executor Not tai...
```diff diff --git a/fs/ext4/extents_status.c b/fs/ext4/extents_status.c index 9b5b8951afb4..6f7de14c0fa8 100644 --- a/fs/ext4/extents_status.c +++ b/fs/ext4/extents_status.c @@ -878,23 +878,29 @@ retry: err1 = __es_remove_extent(inode, lblk, end, NULL, es1); if (err1 != 0) goto error; + /* Free preallocated ext...
194505b55dd7899da114a4d47825204eefc0fff5
Analyze and fix the following issue in the Linux kernel code: ext4: drop dio overwrite only flag and associated warning
Problem Details: The commit referenced below opened up concurrent unaligned dio under shared locking for pure overwrites. In doing so, it enabled use of the IOMAP_DIO_OVERWRITE_ONLY flag and added a warning on unexpected -EAGAIN returns as an extra precaution, since ext4 does not retry writes in such cases. The flag it...
```diff diff --git a/fs/ext4/file.c b/fs/ext4/file.c index 2071b1e4322c..e99cc17b6bd2 100644 --- a/fs/ext4/file.c +++ b/fs/ext4/file.c @@ -476,6 +476,11 @@ restart: * required to change security info in file_modified(), for extending * I/O, any form of non-overwrite I/O, and unaligned I/O to unwritten * extent...
68228da51c9a436872a4ef4b5a7692e29f7e5bc7
Analyze and fix the following issue in the Linux kernel code: ext4: add correct group descriptors and reserved GDT blocks to system zone
Problem Details: When setup_system_zone, flex_bg is not initialized so it is always 1. Use a new helper function, ext4_num_base_meta_blocks() which does not depend on sbi->s_log_groups_per_flex being initialized. [ Squashed two patches in the Link URL's below together into a single commit, which is simpler to review...
```diff diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c index 1f72f977c6db..79b20d6ae39e 100644 --- a/fs/ext4/balloc.c +++ b/fs/ext4/balloc.c @@ -913,11 +913,11 @@ unsigned long ext4_bg_num_gdb(struct super_block *sb, ext4_group_t group) } /* - * This function returns the number of file system metadata clusters at...
1524773425ae8113b0b782886366e68656b34e53
Analyze and fix the following issue in the Linux kernel code: ext4: fix unttached inode after power cut with orphan file feature enabled
Problem Details: Running generic/475(filesystem consistent tests after power cut) could easily trigger unattached inode error while doing fsck: Unattached zero-length inode 39405. Clear? no Unattached inode 39405 Connect to /lost+found? no Above inconsistence is caused by following process: P1 ...
```diff diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index 6298cfaaa0bd..9a13431656cd 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c @@ -2799,6 +2799,7 @@ static int ext4_add_nondir(handle_t *handle, return err; } drop_nlink(inode); + ext4_mark_inode_dirty(handle, inode); ext4_orphan_add(handle, inode); ...
2dfba3bb40ad8536b9fa802364f2d40da31aa88e
Analyze and fix the following issue in the Linux kernel code: jbd2: correct the end of the journal recovery scan range
Problem Details: We got a filesystem inconsistency issue below while running generic/475 I/O failure pressure test with fast_commit feature enabled. Symlink /p3/d3/d1c/d6c/dd6/dce/l101 (inode #132605) is invalid. If fast_commit feature is enabled, a special fast_commit journal area is appended to the end of the norm...
```diff diff --git a/fs/jbd2/recovery.c b/fs/jbd2/recovery.c index 0184931d47f7..c269a7d29a46 100644 --- a/fs/jbd2/recovery.c +++ b/fs/jbd2/recovery.c @@ -230,12 +230,8 @@ static int count_tags(journal_t *journal, struct buffer_head *bh) /* Make sure we wrap around the log correctly! */ #define wrap(journal, var) ...
ee5c807137ce283acebd83297f8855428cdd839a
Analyze and fix the following issue in the Linux kernel code: ext4: ext4_get_{dev}_journal return proper error value
Problem Details: ext4_get_journal() and ext4_get_dev_journal() return NULL if they failed to init journal, making them return proper error value instead, also rename them to ext4_open_{inode,dev}_journal(). [ Folded fix to ext4_calculate_overhead() to check for an ERR_PTR instead of NULL. ] Signed-off-by: Zhang Yi ...
```diff diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 0eee238b290e..6edf7deeb2db 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -4200,7 +4200,7 @@ int ext4_calculate_overhead(struct super_block *sb) else if (ext4_has_feature_journal(sb) && !sbi->s_journal && j_inum) { /* j_inum for internal journal i...
4db89524b084f712a887256391fc19d9f66c8e55
Analyze and fix the following issue in the Linux kernel code: parisc: led: Fix LAN receive and transmit LEDs
Problem Details: Fix the LAN receive and LAN transmit LEDs, which where swapped up to now. Signed-off-by: Helge Deller <deller@gmx.de> Cc: <stable@vger.kernel.org>
```diff diff --git a/arch/parisc/include/asm/led.h b/arch/parisc/include/asm/led.h index d1a016e33198..3409c883f1bb 100644 --- a/arch/parisc/include/asm/led.h +++ b/arch/parisc/include/asm/led.h @@ -11,8 +11,8 @@ #define LED1 0x02 #define LED0 0x01 /* bottom (or furthest left) LED */ -#define LED_LAN_TX LED0 /*...
c3b2b26f6eaad5d48fe6dd2d9bada07b193bdb61
Analyze and fix the following issue in the Linux kernel code: tty: n_tty: make n_tty_data::num_overrun unsigned
Problem Details: n_tty_data::num_overrun is unlikely to overflow in a second. But make it explicitly unsigned to avoid printing negative values. Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20230827074147.2287-6-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh...
```diff diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c index c0b23e975877..7f8f6cfa8843 100644 --- a/drivers/tty/n_tty.c +++ b/drivers/tty/n_tty.c @@ -99,7 +99,7 @@ struct n_tty_data { /* private to n_tty_receive_overrun (single-threaded) */ unsigned long overrun_time; - int num_overrun; + unsigned int nu...
d414034ec901c3821f17bd44b8eaaa5820253417
Analyze and fix the following issue in the Linux kernel code: tty: n_tty: use output character directly
Problem Details: There is no point to use a local variable to store the character when we can pass it directly. This assignment comes from era when we used to do get_user(c, b). We no longer need this, so fix this. Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20230827074147...
```diff diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c index 8b2bacb3e40d..f6fa4dbdf78f 100644 --- a/drivers/tty/n_tty.c +++ b/drivers/tty/n_tty.c @@ -2373,8 +2373,7 @@ static ssize_t n_tty_write(struct tty_struct *tty, struct file *file, nr -= num; if (nr == 0) break; - c = *b; - if (proc...
db726a2f3b4bc0cbf8e6cfd529d2d8eabb587d70
Analyze and fix the following issue in the Linux kernel code: Revert "tty: serial: meson: Add a earlycon for the T7 SoC"
Problem Details: This reverts commit 6a4197f9763325043abf7690a21124a9facbf52e New SoC will use ttyS0 instead of ttyAML, so T7 SoC doesn't need a OF_EARLYCON_DECLARE. Fixes: 6a4197f97633 ("tty: serial: meson: Add a earlycon for the T7 SoC") Signed-off-by: Lucas Tanure <tanure@linux.com> Link: https://lore.kernel.org/r...
```diff diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c index c4f61d82fb72..790d910dafa5 100644 --- a/drivers/tty/serial/meson_uart.c +++ b/drivers/tty/serial/meson_uart.c @@ -648,8 +648,6 @@ meson_serial_early_console_setup(struct earlycon_device *device, const char *opt OF_EARLYCON_D...
974b808d85abbc03c3914af63d60d5816aabf2ca
Analyze and fix the following issue in the Linux kernel code: um: virt-pci: fix missing declaration warning
Problem Details: Fix this warning which appears with W=1 and without CONFIG_OF: warning: no previous declaration for 'pcibios_get_phb_of_node' Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202308230949.PphIIlhq-lkp@intel.com/ Fixes: 314a1408b79a ("um: virt-pci: implemen...
```diff diff --git a/arch/um/drivers/virt-pci.c b/arch/um/drivers/virt-pci.c index 7699ca5f35d4..ffe2ee8a0246 100644 --- a/arch/um/drivers/virt-pci.c +++ b/arch/um/drivers/virt-pci.c @@ -544,6 +544,7 @@ static void um_pci_irq_vq_cb(struct virtqueue *vq) } } +#ifdef CONFIG_OF /* Copied from arch/x86/kernel/devicet...
ab7ca2eb63a2168619f7595622fe29967ed0959b
Analyze and fix the following issue in the Linux kernel code: um: fix 3 instances of -Wmissing-prototypes
Problem Details: Fixes the following build errors observed from W=1 builds: arch/um/drivers/xterm_kern.c:35:5: warning: no previous prototype for function 'xterm_fd' [-Wmissing-prototypes] 35 | int xterm_fd(int socket, int *pid_out) | ^ arch/um/drivers/xterm_kern.c:35:1: note: declare 'static' if the ...
```diff diff --git a/arch/um/drivers/slirp_kern.c b/arch/um/drivers/slirp_kern.c index 2d9769237f08..0a6151ee9572 100644 --- a/arch/um/drivers/slirp_kern.c +++ b/arch/um/drivers/slirp_kern.c @@ -15,7 +15,7 @@ struct slirp_init { struct arg_list_dummy_wrapper argw; /* XXX should be simpler... */ }; -void slirp_ini...
4b038701e3dd02091e1086bdd89e31e16ceb8e04
Analyze and fix the following issue in the Linux kernel code: um: port_kern: fix -Wmissing-variable-declarations
Problem Details: I'm looking to enable -Wmissing-variable-declarations behind W=1. 0day bot spotted the following instance: arch/um/drivers/port_kern.c:147:14: warning: no previous extern declaration for non-static variable 'port_work' [-Wmissing-variable-declarations] DECLARE_WORK(port_work, port_work_proc); ...
```diff diff --git a/arch/um/drivers/port_kern.c b/arch/um/drivers/port_kern.c index efa8b7304090..c52b3ff3c092 100644 --- a/arch/um/drivers/port_kern.c +++ b/arch/um/drivers/port_kern.c @@ -144,7 +144,7 @@ static void port_work_proc(struct work_struct *unused) local_irq_restore(flags); } -DECLARE_WORK(port_work, ...
b10eee784c767975d345540e5569bdad31b9aec3
Analyze and fix the following issue in the Linux kernel code: uml: audio: fix -Wmissing-variable-declarations
Problem Details: I'm looking to enable -Wmissing-variable-declarations behind W=1. 0day bot spotted the following instance: arch/um/drivers/hostaudio_kern.c:316:3: warning: no previous extern declaration for non-static variable 'module_data' [-Wmissing-variable-declarations] } module_data; ^ arch/um/driv...
```diff diff --git a/arch/um/drivers/hostaudio_kern.c b/arch/um/drivers/hostaudio_kern.c index 5b064d360cb7..c42b793bce65 100644 --- a/arch/um/drivers/hostaudio_kern.c +++ b/arch/um/drivers/hostaudio_kern.c @@ -310,7 +310,7 @@ static const struct file_operations hostmixer_fops = { .release = hostmixer_release,...
ff3f78607998274460f1742a7dfd853c6124d34a
Analyze and fix the following issue in the Linux kernel code: um: Use the x86 checksum implementation on 32-bit
Problem Details: When UML is compiled under 32-bit x86, it uses its own copy of checksum_32.S, which is terribly out-of-date and doesn't support checksumming unaligned data. This causes the new "checksum" KUnit test to fail: ./tools/testing/kunit/kunit.py run --kconfig_add CONFIG_64BIT=n --cross_compile i686-linux-gnu...
```diff diff --git a/arch/x86/um/Makefile b/arch/x86/um/Makefile index ee89f6bb9242..cb738967a9f5 100644 --- a/arch/x86/um/Makefile +++ b/arch/x86/um/Makefile @@ -17,11 +17,12 @@ obj-y = bugs_$(BITS).o delay.o fault.o ldt.o \ ifeq ($(CONFIG_X86_32),y) -obj-y += checksum_32.o syscalls_32.o +obj-y += syscalls_32.o ...
9f5deb551655a4cff04b21ecffdcdab75112da3a
Analyze and fix the following issue in the Linux kernel code: genirq: Fix software resend lockup and nested resend
Problem Details: The switch to using hlist for managing software resend of interrupts broke resend in at least two ways: First, unconditionally adding interrupt descriptors to the resend list can corrupt the list when the descriptor in question has already been added. This causes the resend tasklet to loop indefinitel...
```diff diff --git a/kernel/irq/resend.c b/kernel/irq/resend.c index edec335c0a7a..5f2c66860ac6 100644 --- a/kernel/irq/resend.c +++ b/kernel/irq/resend.c @@ -68,11 +68,16 @@ static int irq_sw_resend(struct irq_desc *desc) */ if (!desc->parent_irq) return -EINVAL; + + desc = irq_to_desc(desc->parent_irq); +...
9730870b484e9de852b51df08a8b357b1129489e
Analyze and fix the following issue in the Linux kernel code: LoongArch: Fix hw_breakpoint_control() for watchpoints
Problem Details: In hw_breakpoint_control(), encode_ctrl_reg() has already encoded the MWPnCFG3_LoadEn/MWPnCFG3_StoreEn bits in info->ctrl. We don't need to add (1 << MWPnCFG3_LoadEn | 1 << MWPnCFG3_StoreEn) unconditionally. Otherwise we can't set read watchpoint and write watchpoint separately. Cc: stable@vger.kerne...
```diff diff --git a/arch/loongarch/kernel/hw_breakpoint.c b/arch/loongarch/kernel/hw_breakpoint.c index 021b59c248fa..fc55c4de2a11 100644 --- a/arch/loongarch/kernel/hw_breakpoint.c +++ b/arch/loongarch/kernel/hw_breakpoint.c @@ -207,8 +207,7 @@ static int hw_breakpoint_control(struct perf_event *bp, write_wb_reg(...
f156a7d13fc35d0078cd644b8cf0a6f97cbbe2e2
Analyze and fix the following issue in the Linux kernel code: KVM: arm64: Remove size-order align in the nVHE hyp private VA range
Problem Details: commit f922c13e778d ("KVM: arm64: Introduce pkvm_alloc_private_va_range()") and commit 92abe0f81e13 ("KVM: arm64: Introduce hyp_alloc_private_va_range()") added an alignment for the start address of any allocation into the nVHE hypervisor private VA range. This alignment (order of the size of the allo...
```diff diff --git a/arch/arm64/include/asm/kvm_mmu.h b/arch/arm64/include/asm/kvm_mmu.h index 0e1e1ab17b4d..96a80e8f6226 100644 --- a/arch/arm64/include/asm/kvm_mmu.h +++ b/arch/arm64/include/asm/kvm_mmu.h @@ -168,6 +168,7 @@ int create_hyp_io_mappings(phys_addr_t phys_addr, size_t size, void __iomem **haddr); ...
4dbd6e61adc7e52dd1c9165f0ccaa90806611e40
Analyze and fix the following issue in the Linux kernel code: platform/x86/amd/pmf: Fix a missing cleanup path
Problem Details: On systems that support slider notifications but don't otherwise support granular slider the SPS cleanup path doesn't run. This means that loading/unloading/loading leads to failures because the sysfs files don't get setup properly when reloaded. Add the missing cleanup path. Fixes: 33c9ab5b493a ("p...
```diff diff --git a/drivers/platform/x86/amd/pmf/core.c b/drivers/platform/x86/amd/pmf/core.c index 57bf1a9f0e76..78ed3ee22555 100644 --- a/drivers/platform/x86/amd/pmf/core.c +++ b/drivers/platform/x86/amd/pmf/core.c @@ -324,7 +324,8 @@ static void amd_pmf_init_features(struct amd_pmf_dev *dev) static void amd_pmf...
4aa69d64e43edb51a4ecff7d301e9f881eb2d3f5
Analyze and fix the following issue in the Linux kernel code: ALSA: ump: Fix -Wformat-truncation warnings
Problem Details: Filling the rawmidi name and substream name can be truncated, and this leads to spurious compiler warnings due to -Wformat-truncation. Although the truncation is the expected behavior, it'd be better to truncate the string within "(...)" This patch puts the precision specifies to each %s for fitting t...
```diff diff --git a/sound/core/ump.c b/sound/core/ump.c index cd192bec227a..3bef1944e955 100644 --- a/sound/core/ump.c +++ b/sound/core/ump.c @@ -1157,7 +1157,7 @@ static void fill_substream_names(struct snd_ump_endpoint *ump, struct snd_rawmidi_substream *s; list_for_each_entry(s, &rmidi->streams[dir].substream...
0ea064e74bc8f915aba3f2d0fb3418247a09b73d
Analyze and fix the following issue in the Linux kernel code: pds_core: pass opcode to devcmd_wait
Problem Details: Don't rely on the PCI memory for the devcmd opcode because we read a 0xff value if the PCI bus is broken, which can cause us to report a bogus dev_cmd opcode later. Fixes: 523847df1b37 ("pds_core: add devcmd device interfaces") Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> Reviewed-by: Brett ...
```diff diff --git a/drivers/net/ethernet/amd/pds_core/dev.c b/drivers/net/ethernet/amd/pds_core/dev.c index 524f422ee7ac..f77cd9f5a2fd 100644 --- a/drivers/net/ethernet/amd/pds_core/dev.c +++ b/drivers/net/ethernet/amd/pds_core/dev.c @@ -121,7 +121,7 @@ static const char *pdsc_devcmd_str(int opcode) } } -static i...
969cfd4c8ca50c32901342cdd3d677c3ffe61371
Analyze and fix the following issue in the Linux kernel code: pds_core: check for work queue before use
Problem Details: Add a check that the wq exists before queuing up work for a failed devcmd, as the PF is responsible for health and the VF doesn't have a wq. Fixes: c2dbb0904310 ("pds_core: health timer and workqueue") Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> Reviewed-by: Brett Creeley <brett.creeley@amd...
```diff diff --git a/drivers/net/ethernet/amd/pds_core/dev.c b/drivers/net/ethernet/amd/pds_core/dev.c index debe5216fe29..524f422ee7ac 100644 --- a/drivers/net/ethernet/amd/pds_core/dev.c +++ b/drivers/net/ethernet/amd/pds_core/dev.c @@ -183,7 +183,7 @@ int pdsc_devcmd_locked(struct pdsc *pdsc, union pds_core_dev_cmd ...
95e383226d6fcda6c217912f11edf8d74de9cc85
Analyze and fix the following issue in the Linux kernel code: pds_core: no reset command for VF
Problem Details: The VF doesn't need to send a reset command, and in a PCI reset scenario it might not have a valid IO space to write to anyway. Fixes: 523847df1b37 ("pds_core: add devcmd device interfaces") Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> Reviewed-by: Brett Creeley <brett.creeley@amd.com> Revie...
```diff diff --git a/drivers/net/ethernet/amd/pds_core/core.c b/drivers/net/ethernet/amd/pds_core/core.c index 383e3311a52c..36f9b932b9e2 100644 --- a/drivers/net/ethernet/amd/pds_core/core.c +++ b/drivers/net/ethernet/amd/pds_core/core.c @@ -464,7 +464,8 @@ void pdsc_teardown(struct pdsc *pdsc, bool removing) { int...
e48b894a1db7f6ce66bff0402ab21ff9f0e56034
Analyze and fix the following issue in the Linux kernel code: pds_core: no health reporter in VF
Problem Details: Make sure the health reporter is set up before we use it in our devlink health updates, especially since the VF doesn't set up the health reporter. Fixes: 25b450c05a49 ("pds_core: add devlink health facilities") Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> Reviewed-by: Brett Creeley <brett.c...
```diff diff --git a/drivers/net/ethernet/amd/pds_core/core.c b/drivers/net/ethernet/amd/pds_core/core.c index f2c79456d745..383e3311a52c 100644 --- a/drivers/net/ethernet/amd/pds_core/core.c +++ b/drivers/net/ethernet/amd/pds_core/core.c @@ -524,7 +524,8 @@ static void pdsc_fw_down(struct pdsc *pdsc) } /* Notify...
91202ce78fcd070982a115f0bf6f328af619aa00
Analyze and fix the following issue in the Linux kernel code: pds_core: protect devlink callbacks from fw_down state
Problem Details: Don't access structs that have been cleared when in the fw_down state and the various structs have been cleaned and are waiting to recover. This caused a panic on rmmod when already in fw_down and devlink_param_unregister() tried to check the parameters. Fixes: 40ced8944536 ("pds_core: devlink params...
```diff diff --git a/drivers/net/ethernet/amd/pds_core/devlink.c b/drivers/net/ethernet/amd/pds_core/devlink.c index 9c6b3653c1c7..d9607033bbf2 100644 --- a/drivers/net/ethernet/amd/pds_core/devlink.c +++ b/drivers/net/ethernet/amd/pds_core/devlink.c @@ -10,6 +10,9 @@ pdsc_viftype *pdsc_dl_find_viftype_by_id(struct pds...
b3d26c5702c7d6c45456326e56d2ccf3f103e60f
Analyze and fix the following issue in the Linux kernel code: net/sched: sch_hfsc: Ensure inner classes have fsc curve
Problem Details: HFSC assumes that inner classes have an fsc curve, but it is currently possible for classes without an fsc curve to become parents. This leads to bugs including a use-after-free. Don't allow non-root classes without HFSC_FSC to become parents. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: Bud...
```diff diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c index 70b0c5873d32..61d52594ff6d 100644 --- a/net/sched/sch_hfsc.c +++ b/net/sched/sch_hfsc.c @@ -1012,6 +1012,10 @@ hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid, if (parent == NULL) return -ENOENT; } + if (!(parent->cl_flags & ...
c4413a20fa6d7c4888009fb7dd391685f196cd36
Analyze and fix the following issue in the Linux kernel code: sfc: Check firmware supports Ethernet PTP filter
Problem Details: Not all firmware variants support RSS filters. Do not fail all PTP functionality when raw ethernet PTP filters fail to insert. Fixes: e4616f64726b ("sfc: support PTP over Ethernet") Signed-off-by: Alex Austin <alex.austin@amd.com> Acked-by: Edward Cree <ecree.xilinx@gmail.com> Reviewed-by: Pieter Jans...
```diff diff --git a/drivers/net/ethernet/sfc/ptp.c b/drivers/net/ethernet/sfc/ptp.c index 0c40571133cb..00cf6de3bb2b 100644 --- a/drivers/net/ethernet/sfc/ptp.c +++ b/drivers/net/ethernet/sfc/ptp.c @@ -1485,7 +1485,9 @@ static int efx_ptp_insert_multicast_filters(struct efx_nic *efx) goto fail; rc = efx_ptp_i...
a02430c06f56931675f19a914b11a960607b2505
Analyze and fix the following issue in the Linux kernel code: tools: ynl-gen: fix uAPI generation after tempfile changes
Problem Details: We use a tempfile for code generation, to avoid wiping the target file out if the code generator crashes. File contents are copied from tempfile to actual destination at the end of main(). uAPI generation is relatively simple so when generating the uAPI header we return from main() early, and never re...
```diff diff --git a/tools/net/ynl/ynl-gen-c.py b/tools/net/ynl/ynl-gen-c.py index 9209bdcca9c6..897af958cee8 100755 --- a/tools/net/ynl/ynl-gen-c.py +++ b/tools/net/ynl/ynl-gen-c.py @@ -1045,14 +1045,30 @@ class RenderInfo: class CodeWriter: - def __init__(self, nlib, out_file): + def __init__(self, nlib, o...
597d0ec0e4ca6a912affea4cc94df08959e9ec74
Analyze and fix the following issue in the Linux kernel code: cteonxt2-pf: Fix backpressure config for multiple PFC priorities to work simultaneously
Problem Details: MAC (CGX or RPM) asserts backpressure at TL3 or TL2 node of the egress hierarchical scheduler tree depending on link level config done. If there are multiple PFC priorities enabled at a time and for all such flows to backoff, each priority will have to assert backpressure at different TL3/TL2 scheduler...
```diff diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_dcbnl.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_dcbnl.c index 6492749dd7c8..bfddbff7bcdf 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_dcbnl.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_dcbnl.c @@ -70,7 +70,7 @@ sta...
47bcc9c1cf6aa60156c7532983090e86d9d171b6
Analyze and fix the following issue in the Linux kernel code: octeontx2-af: CN10KB: fix PFC configuration
Problem Details: Suppose user has enabled pfc with prio 0,1 on a PF netdev(eth0) dcb pfc set dev eth0 prio-pfc o:on 1:on later user enabled pfc priorities 2 and 3 on the VF interface(eth1) dcb pfc set dev eth1 prio-pfc 2:on 3:on Instead of enabling pfc on all priorities (0..3), the driver only enables on priorities ...
```diff diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rpm.c b/drivers/net/ethernet/marvell/octeontx2/af/rpm.c index b4fcb20c3f4f..af21e2030cff 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/rpm.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/rpm.c @@ -355,8 +355,8 @@ int rpm_lmac_enadis_pause_frm(voi...
a9ac2e18779597f280d68a5b5f5bdd51a34080fa
Analyze and fix the following issue in the Linux kernel code: octeontx2-pf: Fix PFC TX scheduler free
Problem Details: During PFC TX schedulers free, flag TXSCHQ_FREE_ALL was being set which caused free up all schedulers other than the PFC schedulers. This patch fixes that to free only the PFC Tx schedulers. Fixes: 99c969a83d82 ("octeontx2-pf: Add egress PFC support") Signed-off-by: Suman Ghosh <sumang@marvell.com> Re...
```diff diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c index 3e1c70c74622..b9712040a0bc 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c @@ -804,6 +804,7 ...
5694ba13b004eea683c6d4faeb6d6e7a9636bda0
Analyze and fix the following issue in the Linux kernel code: PCI/PM: Only read PCI_PM_CTRL register when available
Problem Details: For a device with no Power Management Capability, pci_power_up() previously returned 0 (success) if the platform was able to put the device in D0, which led to pci_set_full_power_state() trying to read PCI_PM_CTRL, even though it doesn't exist. Since dev->pm_cap == 0 in this case, pci_set_full_power_s...
```diff diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 60230da957e0..39728196e295 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -1226,6 +1226,10 @@ static int pci_dev_wait(struct pci_dev *dev, char *reset_type, int timeout) * * On success, return 0 or 1, depending on whether or not it is neces...
15924b0503630016dee4dbb945a8df4df659070b
Analyze and fix the following issue in the Linux kernel code: scsi: fnic: Replace sgreset tag with max_tag_id
Problem Details: sgreset is issued with a SCSI command pointer. The device reset code assumes that it was issued on a hardware queue, and calls block multiqueue layer. However, the assumption is broken, and there is no hardware queue associated with the sgreset, and this leads to a crash due to a null pointer exception...
```diff diff --git a/drivers/scsi/fnic/fnic.h b/drivers/scsi/fnic/fnic.h index d82de34f6fd7..93c68931a593 100644 --- a/drivers/scsi/fnic/fnic.h +++ b/drivers/scsi/fnic/fnic.h @@ -27,7 +27,7 @@ #define DRV_NAME "fnic" #define DRV_DESCRIPTION "Cisco FCoE HBA Driver" -#define DRV_VERSION "1.6.0.54" +#define DRV_VER...
27177862de9676c8c35b86bf89c38864fbe5ed71
Analyze and fix the following issue in the Linux kernel code: scsi: qla2xxx: Fix nvme_fc_rcv_ls_req() undefined error
Problem Details: The kernel robot reported below build error, >> ERROR: modpost: "nvme_fc_rcv_ls_req" [drivers/scsi/qla2xxx/qla2xxx.ko] undefined! Use CONFIG_NVME_FC enabled check to fix the build error. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202308021445.txlNq7U...
```diff diff --git a/drivers/scsi/qla2xxx/qla_nvme.c b/drivers/scsi/qla2xxx/qla_nvme.c index 1a31e877e6cb..62a67662cbf3 100644 --- a/drivers/scsi/qla2xxx/qla_nvme.c +++ b/drivers/scsi/qla2xxx/qla_nvme.c @@ -1182,10 +1182,12 @@ qla2xxx_process_purls_pkt(struct scsi_qla_host *vha, struct purex_item *item) struct qla_nv...
382d4cd1847517ffcb1800fd462b625db7b2ebea
Analyze and fix the following issue in the Linux kernel code: lib/clz_ctz.c: Fix __clzdi2() and __ctzdi2() for 32-bit kernels
Problem Details: The gcc compiler translates on some architectures the 64-bit __builtin_clzll() function to a call to the libgcc function __clzdi2(), which should take a 64-bit parameter on 32- and 64-bit platforms. But in the current kernel code, the built-in __clzdi2() function is defined to operate (wrongly) on 32-...
```diff diff --git a/lib/clz_ctz.c b/lib/clz_ctz.c index 0d3a686b5ba2..fb8c0c5c2bd2 100644 --- a/lib/clz_ctz.c +++ b/lib/clz_ctz.c @@ -28,36 +28,16 @@ int __weak __clzsi2(int val) } EXPORT_SYMBOL(__clzsi2); -int __weak __clzdi2(long val); -int __weak __ctzdi2(long val); -#if BITS_PER_LONG == 32 - -int __weak __clzd...
7f2e65a8f546a0b1e5fd0770c802c5e4af9cf14e
Analyze and fix the following issue in the Linux kernel code: i2c: qcom-cci: Fix error checking in cci_probe()
Problem Details: devm_clk_bulk_get_all() can return zero when no clocks are obtained. Passing zero to dev_err_probe() is a success which is incorrect. Fixes: 605efbf43813 ("i2c: qcom-cci: Use dev_err_probe in probe function") Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com> Reviewed-by: Bryan O'Do...
```diff diff --git a/drivers/i2c/busses/i2c-qcom-cci.c b/drivers/i2c/busses/i2c-qcom-cci.c index cf13abec05f1..414882c57d7f 100644 --- a/drivers/i2c/busses/i2c-qcom-cci.c +++ b/drivers/i2c/busses/i2c-qcom-cci.c @@ -588,8 +588,10 @@ static int cci_probe(struct platform_device *pdev) /* Clocks */ ret = devm_clk_bul...
33f0467fe06934d5e4ea6e24ce2b9c65ce618e26
Analyze and fix the following issue in the Linux kernel code: kallsyms: Fix kallsyms_selftest failure
Problem Details: Kernel test robot reported a kallsyms_test failure when clang lto is enabled (thin or full) and CONFIG_KALLSYMS_SELFTEST is also enabled. I can reproduce in my local environment with the following error message with thin lto: [ 1.877897] kallsyms_selftest: Test for 1750th symbol failed: (tsc_cs_ma...
```diff diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c index 016d997131d4..e12d26c10dba 100644 --- a/kernel/kallsyms.c +++ b/kernel/kallsyms.c @@ -188,16 +188,13 @@ static bool cleanup_symbol_name(char *s) static int compare_symbol_name(const char *name, char *namebuf) { - int ret; - - ret = strcmp(name, namebu...
0816b8c6bf7fc87cec4273dc199e8f0764b9e7b1
Analyze and fix the following issue in the Linux kernel code: bpf: Consider non-owning refs to refcounted nodes RCU protected
Problem Details: An earlier patch in the series ensures that the underlying memory of nodes with bpf_refcount - which can have multiple owners - is not reused until RCU grace period has elapsed. This prevents use-after-free with non-owning references that may point to recently-freed memory. While RCU read lock is held,...
```diff diff --git a/include/linux/bpf.h b/include/linux/bpf.h index eced6400f778..12596af59c00 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h @@ -653,7 +653,8 @@ enum bpf_type_flag { MEM_RCU = BIT(13 + BPF_BASE_TYPE_BITS), /* Used to tag PTR_TO_BTF_ID | MEM_ALLOC references which are non-owning. - ...
ba2464c86f182c6fdb69fe2f77a3d04c19a72357
Analyze and fix the following issue in the Linux kernel code: bpf: Reenable bpf_refcount_acquire
Problem Details: Now that all reported issues are fixed, bpf_refcount_acquire can be turned back on. Also reenable all bpf_refcount-related tests which were disabled. This a revert of: * commit f3514a5d6740 ("selftests/bpf: Disable newly-added 'owner' field test until refcount re-enabled") * commit 7deca5eae833 ("bp...
```diff diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index 5a610896202a..b875f511c3b7 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -11217,10 +11217,7 @@ static int check_kfunc_args(struct bpf_verifier_env *env, struct bpf_kfunc_call_ verbose(env, "arg#%d doesn't point to a type w...
7e26cd12ad1c8f3e55d32542c7e4708a9e6a3c02
Analyze and fix the following issue in the Linux kernel code: bpf: Use bpf_mem_free_rcu when bpf_obj_dropping refcounted nodes
Problem Details: This is the final fix for the use-after-free scenario described in commit 7793fc3babe9 ("bpf: Make bpf_refcount_acquire fallible for non-owning refs"). That commit, by virtue of changing bpf_refcount_acquire's refcount_inc to a refcount_inc_not_zero, fixed the "refcount incr on 0" splat. The not_zero c...
```diff diff --git a/kernel/bpf/helpers.c b/kernel/bpf/helpers.c index eb91cae0612a..945a85e25ac5 100644 --- a/kernel/bpf/helpers.c +++ b/kernel/bpf/helpers.c @@ -1913,7 +1913,11 @@ void __bpf_obj_drop_impl(void *p, const struct btf_record *rec) if (rec) bpf_obj_free_fields(rec, p); - bpf_mem_free(&bpf_global_ma...
2a6d50b50d6d589d43a90d6ca990b8b811e67701
Analyze and fix the following issue in the Linux kernel code: bpf: Consider non-owning refs trusted
Problem Details: Recent discussions around default kptr "trustedness" led to changes such as commit 6fcd486b3a0a ("bpf: Refactor RCU enforcement in the verifier."). One of the conclusions of those discussions, as expressed in code and comments in that patch, is that we'd like to move away from 'raw' PTR_TO_BTF_ID witho...
```diff diff --git a/include/linux/bpf_verifier.h b/include/linux/bpf_verifier.h index f70f9ac884d2..b6e58dab8e27 100644 --- a/include/linux/bpf_verifier.h +++ b/include/linux/bpf_verifier.h @@ -745,7 +745,7 @@ static inline bool bpf_prog_check_recur(const struct bpf_prog *prog) } } -#define BPF_REG_TRUSTED_MODIFI...
02dc2543e3795867260826983bf3f20b282c8fc3
Analyze and fix the following issue in the Linux kernel code: KVM: selftests: Explicit set #UD when *potentially* injecting exception
Problem Details: Explicitly set the exception vector to #UD when potentially injecting an exception in sync_regs_test's subtests that try to detect TOCTOU bugs in KVM's handling of exceptions injected by userspace. A side effect of the original KVM bug was that KVM would clear the vector, but relying on KVM to clear t...
```diff diff --git a/tools/testing/selftests/kvm/x86_64/sync_regs_test.c b/tools/testing/selftests/kvm/x86_64/sync_regs_test.c index 21e99dae2ff2..00965ba33f73 100644 --- a/tools/testing/selftests/kvm/x86_64/sync_regs_test.c +++ b/tools/testing/selftests/kvm/x86_64/sync_regs_test.c @@ -91,6 +91,8 @@ static void *race_e...
5002b112a5ad23579b7c3a36c9748740bcdfc88e
Analyze and fix the following issue in the Linux kernel code: KVM: selftests: Reload "good" vCPU state if vCPU hits shutdown
Problem Details: Reload known good vCPU state if the vCPU triple faults in any of the race_sync_regs() subtests, e.g. if KVM successfully injects an exception (the vCPU isn't configured to handle exceptions). On Intel, the VMCS is preserved even after shutdown, but AMD's APM states that the VMCB is undefined after a s...
```diff diff --git a/tools/testing/selftests/kvm/x86_64/sync_regs_test.c b/tools/testing/selftests/kvm/x86_64/sync_regs_test.c index 93fac74ca0a7..21e99dae2ff2 100644 --- a/tools/testing/selftests/kvm/x86_64/sync_regs_test.c +++ b/tools/testing/selftests/kvm/x86_64/sync_regs_test.c @@ -152,6 +152,7 @@ static noinline v...
cb49631ad111570f1bad37702c11c2ae07fa2e3c
Analyze and fix the following issue in the Linux kernel code: KVM: SVM: Don't inject #UD if KVM attempts to skip SEV guest insn
Problem Details: Don't inject a #UD if KVM attempts to "emulate" to skip an instruction for an SEV guest, and instead resume the guest and hope that it can make forward progress. When commit 04c40f344def ("KVM: SVM: Inject #UD on attempted emulation for SEV guest w/o insn buffer") added the completely arbitrary #UD be...
```diff diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c index d76c8a0764f1..d7a474571ff1 100644 --- a/arch/x86/kvm/svm/svm.c +++ b/arch/x86/kvm/svm/svm.c @@ -365,6 +365,8 @@ static void svm_set_interrupt_shadow(struct kvm_vcpu *vcpu, int mask) svm->vmcb->control.int_state |= SVM_INTERRUPT_SHADOW_MASK; ...
1952e74da96fb3e48b72a2d0ece78c688a5848c1
Analyze and fix the following issue in the Linux kernel code: KVM: SVM: Skip VMSA init in sev_es_init_vmcb() if pointer is NULL
Problem Details: Skip initializing the VMSA physical address in the VMCB if the VMSA is NULL, which occurs during intrahost migration as KVM initializes the VMCB before copying over state from the source to the destination (including the VMSA and its physical address). In normal builds, __pa() is just math, so the bug...
```diff diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c index acc700bcb299..5585a3556179 100644 --- a/arch/x86/kvm/svm/sev.c +++ b/arch/x86/kvm/svm/sev.c @@ -2975,9 +2975,12 @@ static void sev_es_init_vmcb(struct vcpu_svm *svm) /* * An SEV-ES guest requires a VMSA area that is a separate from the *...
f1187ef24eb8f36e8ad8106d22615ceddeea6097
Analyze and fix the following issue in the Linux kernel code: KVM: SVM: Get source vCPUs from source VM for SEV-ES intrahost migration
Problem Details: Fix a goof where KVM tries to grab source vCPUs from the destination VM when doing intrahost migration. Grabbing the wrong vCPU not only hoses the guest, it also crashes the host due to the VMSA pointer being left NULL. BUG: unable to handle page fault for address: ffffe38687000000 #PF: superviso...
```diff diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c index 2cd15783dfb9..acc700bcb299 100644 --- a/arch/x86/kvm/svm/sev.c +++ b/arch/x86/kvm/svm/sev.c @@ -1739,7 +1739,7 @@ static void sev_migrate_from(struct kvm *dst_kvm, struct kvm *src_kvm) * Note, the source is not required to have the same numb...
8879515e1219857df1f142e23840b91a37cbde88
Analyze and fix the following issue in the Linux kernel code: LoongArch: Add identifier names to arguments of die() declaration
Problem Details: Add identifier names to arguments of die() declaration in ptrace.h to fix the following checkpatch warnings: WARNING: function definition argument 'const char *' should also have an identifier name WARNING: function definition argument 'struct pt_regs *' should also have an identifier name Signed...
```diff diff --git a/arch/loongarch/include/asm/ptrace.h b/arch/loongarch/include/asm/ptrace.h index 164bc90672e4..f3ddaed9ef7f 100644 --- a/arch/loongarch/include/asm/ptrace.h +++ b/arch/loongarch/include/asm/ptrace.h @@ -162,7 +162,7 @@ static inline void regs_set_return_value(struct pt_regs *regs, unsigned long val ...
3f301dc292eb122eff61b8b2906e519154b0327f
Analyze and fix the following issue in the Linux kernel code: LoongArch: Replace -ffreestanding with finer-grained -fno-builtin's
Problem Details: As explained by Nick in the original issue: the kernel usually does a good job of providing library helpers that have similar semantics as their ordinary userspace libc equivalents, but -ffreestanding disables such libcall optimization and other related features in the compiler, which can lead to unexp...
```diff diff --git a/arch/loongarch/Makefile b/arch/loongarch/Makefile index b1e5db51b61c..ef87bab46754 100644 --- a/arch/loongarch/Makefile +++ b/arch/loongarch/Makefile @@ -83,8 +83,8 @@ KBUILD_CFLAGS_KERNEL += -fPIE LDFLAGS_vmlinux += -static -pie --no-dynamic-linker -z notext endif -cflags-y += -ffreestandin...
7c53e847ff5e97f033fdd31f71949807633d506b
Analyze and fix the following issue in the Linux kernel code: dlm: fix plock lookup when using multiple lockspaces
Problem Details: All posix lock ops, for all lockspaces (gfs2 file systems) are sent to userspace (dlm_controld) through a single misc device. The dlm_controld daemon reads the ops from the misc device and sends them to other cluster nodes using separate, per-lockspace cluster api communication channels. The ops for a...
```diff diff --git a/fs/dlm/plock.c b/fs/dlm/plock.c index 00e1d802a81c..e6b4c1a21446 100644 --- a/fs/dlm/plock.c +++ b/fs/dlm/plock.c @@ -556,7 +556,8 @@ static ssize_t dev_write(struct file *file, const char __user *u, size_t count, op = plock_lookup_waiter(&info); } else { list_for_each_entry(iter, &recv_lis...
d103337e38e7e64c3d915029e947b1cb0b512737
Analyze and fix the following issue in the Linux kernel code: hwmon: (tmp513) Fix the channel number in tmp51x_is_visible()
Problem Details: The supported channels for this driver are {0..3}. Fix the incorrect channel in tmp51x_is_visible(). Reported-by: Guenter Roeck <linux@roeck-us.net> Closes: https://lore.kernel.org/all/ea0eccc0-a29f-41e4-9049-a1a13f8b16f1@roeck-us.net/ Fixes: 59dfa75e5d82 ("hwmon: Add driver for Texas Instruments TMP5...
```diff diff --git a/drivers/hwmon/tmp513.c b/drivers/hwmon/tmp513.c index 7db5d0fc24a4..8ee6e02b02e3 100644 --- a/drivers/hwmon/tmp513.c +++ b/drivers/hwmon/tmp513.c @@ -434,7 +434,7 @@ static umode_t tmp51x_is_visible(const void *_data, switch (type) { case hwmon_temp: - if (data->id == tmp512 && channel == 4)...
c37b6908f7b2bd24dcaaf14a180e28c9132b9c58
Analyze and fix the following issue in the Linux kernel code: powerpc/iommu: Fix notifiers being shared by PCI and VIO buses
Problem Details: fail_iommu_setup() registers the fail_iommu_bus_notifier struct to both PCI and VIO buses. struct notifier_block is a linked list node, so this causes any notifiers later registered to either bus type to also be registered to the other since they share the same node. This causes issues in (at least) ...
```diff diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c index c52449ae6936..14251bc5219e 100644 --- a/arch/powerpc/kernel/iommu.c +++ b/arch/powerpc/kernel/iommu.c @@ -172,17 +172,28 @@ static int fail_iommu_bus_notify(struct notifier_block *nb, return 0; } -static struct notifier_block fail...
69657e60b8a7faf83b583c658ec7ce1f5ece9eb3
Analyze and fix the following issue in the Linux kernel code: pinctrl: mlxbf3: Remove gpio_disable_free()
Problem Details: Remove support for gpio_disable_free() because it is called when the libgpiod command "gpioset" is invoked. This gives the GPIO control back to hardware which cancels out the effort to set the GPIO value. Reminder of the code flow to change a GPIO value from software: 1) All GPIOs are controlled by ha...
```diff diff --git a/drivers/pinctrl/pinctrl-mlxbf3.c b/drivers/pinctrl/pinctrl-mlxbf3.c index 903606b64d2f..7d1713824a89 100644 --- a/drivers/pinctrl/pinctrl-mlxbf3.c +++ b/drivers/pinctrl/pinctrl-mlxbf3.c @@ -223,26 +223,12 @@ static int mlxbf3_gpio_request_enable(struct pinctrl_dev *pctldev, return 0; } -static...
0f2418fddb6dddd5f6f9fc4e2375bdaa0d7e0174
Analyze and fix the following issue in the Linux kernel code: perf lock contention: Fix typo in max-stack option description
Problem Details: Fix typo in max-stack option description by changing lopck contention to lock contention. Signed-off-by: Kajol Jain <kjain@linux.ibm.com> Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Cc: Disha Goel <disgoel@linux.ibm.com> Cc: Madhavan Srinivasan <maddy@linux.ibm.com> Cc: Namhyung Kim <namhyung@kern...
```diff diff --git a/tools/perf/builtin-lock.c b/tools/perf/builtin-lock.c index 0cf1c5a2e032..b141f2134274 100644 --- a/tools/perf/builtin-lock.c +++ b/tools/perf/builtin-lock.c @@ -2507,7 +2507,7 @@ int cmd_lock(int argc, const char **argv) OPT_CALLBACK('M', "map-nr-entries", &bpf_map_entries, "num", "Max n...
c091ee90897aacf60aee510464cfc28b4041186f
Analyze and fix the following issue in the Linux kernel code: perf pmu: Remove logic for PMU name being NULL
Problem Details: The PMU name could be NULL in the case of the fake_pmu. Initialize the name for the fake_pmu to "fake" so that all other logic can assume it is initialized. Add a const to the type of name so that a literal can be used to avoid additional initialization code. Propagate the cost through related routines...
```diff diff --git a/tools/perf/arch/arm64/util/mem-events.c b/tools/perf/arch/arm64/util/mem-events.c index df817d1f9f3e..3bcc5c7035c2 100644 --- a/tools/perf/arch/arm64/util/mem-events.c +++ b/tools/perf/arch/arm64/util/mem-events.c @@ -20,7 +20,7 @@ struct perf_mem_event *perf_mem_events__ptr(int i) return &perf_m...
9897009eecae821efc684ecdd1d04584f5501509
Analyze and fix the following issue in the Linux kernel code: perf header: Fix missing PMU caps
Problem Details: PMU caps are written as HEADER_PMU_CAPS or for the special case of the PMU "cpu" as HEADER_CPU_PMU_CAPS. As the PMU "cpu" is special, and not any "core" PMU, the logic had become broken and core PMUs not called "cpu" were not having their caps written. This affects ARM and s390 non-hybrid PMUs. Simpl...
```diff diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index 52fbf526fe74..13c71d28e0eb 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c @@ -1605,8 +1605,15 @@ static int write_pmu_caps(struct feat_fd *ff, int ret; while ((pmu = perf_pmus__scan(pmu))) { - if (!pmu->name || !...
1856d1a036dcd1835ce35957ca65c00cf350daf4
Analyze and fix the following issue in the Linux kernel code: PCI: Tidy config space save/restore messages
Problem Details: Update config space save/restore debug messages so they line up better. Previously: nvme 0000:05:00.0: saving config space at offset 0x4 (reading 0x20100006) nvme 0000:05:00.0: saving config space at offset 0x8 (reading 0x1080200) nvme 0000:05:00.0: saving config space at offset 0xc (reading 0x0...
```diff diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 749ef90c623d..ea3dcab0978c 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -1681,7 +1681,7 @@ int pci_save_state(struct pci_dev *dev) /* XXX: 100% dword access ok here? */ for (i = 0; i < 16; i++) { pci_read_config_dword(dev, i * 4, &dev-...
eb6723b40d1766cfbbbc0aa11690da03c339184f
Analyze and fix the following issue in the Linux kernel code: PCI: Fix code formatting inconsistencies
Problem Details: Remove unnecessary "return;" in void functions and format consistently. No functional change intended. Link: https://lore.kernel.org/r/20230824193712.542167-12-helgaas@kernel.org Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
```diff diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index a4c397434057..096fa6834f3b 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -147,8 +147,8 @@ int pci_hp_add_bridge(struct pci_dev *dev); void pci_create_legacy_files(struct pci_bus *bus); void pci_remove_legacy_files(struct pci_bus *bus); #els...
86b4ad7d67b26973838b7f1d4428aba9483cb5ce
Analyze and fix the following issue in the Linux kernel code: PCI: Fix typos in docs and comments
Problem Details: Fix typos in docs and comments. Link: https://lore.kernel.org/r/20230824193712.542167-11-helgaas@kernel.org Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
```diff diff --git a/Documentation/PCI/pci-error-recovery.rst b/Documentation/PCI/pci-error-recovery.rst index c237596f67e3..0c7552a00c8c 100644 --- a/Documentation/PCI/pci-error-recovery.rst +++ b/Documentation/PCI/pci-error-recovery.rst @@ -17,7 +17,7 @@ chipsets are able to deal with these errors; these include PCI-...
2b4af4b3988a6c0175af3c9a65c87d97e94dc34e
Analyze and fix the following issue in the Linux kernel code: PCI: Fix pci_bus_resetable(), pci_slot_resetable() name typos
Problem Details: Fix typos in the pci_bus_resetable() and pci_slot_resetable() function names. No functional change intended. Link: https://lore.kernel.org/r/20230824193712.542167-10-helgaas@kernel.org Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
```diff diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 4d2b11c71e62..6b62795425a7 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -5627,7 +5627,7 @@ int pci_try_reset_function(struct pci_dev *dev) EXPORT_SYMBOL_GPL(pci_try_reset_function); /* Do any devices on or below this bus prevent a bus res...
62008578b73f16e274070a232b939ba5933bb8ba
Analyze and fix the following issue in the Linux kernel code: PCI: Fix printk field formatting
Problem Details: Previously we used "%#08x" to print a 32-bit value. This fills an 8-character field with "0x...", but of course many 32-bit values require a 10-character field "0x12345678" for this format. Fix the formats to avoid confusion. Link: https://lore.kernel.org/r/20230824193712.542167-5-helgaas@kernel.org...
```diff diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c index 967f9a758923..ceaa69491f5e 100644 --- a/drivers/pci/setup-res.c +++ b/drivers/pci/setup-res.c @@ -104,7 +104,7 @@ static void pci_std_update_resource(struct pci_dev *dev, int resno) pci_read_config_dword(dev, reg, &check); if ((new ^ che...
41203f93e2be757c0c8a8dd050938261ce49ab7c
Analyze and fix the following issue in the Linux kernel code: ata: pata_ep93xx: fix error return code in probe
Problem Details: Return -ENOMEM from ep93xx_pata_probe() if devm_kzalloc() or ata_host_alloc() fails. Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me> Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
```diff diff --git a/drivers/ata/pata_ep93xx.c b/drivers/ata/pata_ep93xx.c index 744ad5e8cfbf..47bff06202f4 100644 --- a/drivers/ata/pata_ep93xx.c +++ b/drivers/ata/pata_ep93xx.c @@ -939,7 +939,7 @@ static int ep93xx_pata_probe(struct platform_device *pdev) drv_data = devm_kzalloc(&pdev->dev, sizeof(*drv_data), GFP...
ac3f9c9f1b37edaa7d1a9b908bc79d843955a1a2
Analyze and fix the following issue in the Linux kernel code: x86/sev: Make enc_dec_hypercall() accept a size instead of npages
Problem Details: enc_dec_hypercall() accepted a page count instead of a size, which forced its callers to round up. As a result, non-page aligned vaddrs caused pages to be spuriously marked as decrypted via the encryption status hypercall, which in turn caused consistent corruption of pages during live migration. Live ...
```diff diff --git a/arch/x86/include/asm/mem_encrypt.h b/arch/x86/include/asm/mem_encrypt.h index 7f97a8a97e24..473b16d73b47 100644 --- a/arch/x86/include/asm/mem_encrypt.h +++ b/arch/x86/include/asm/mem_encrypt.h @@ -50,8 +50,8 @@ void __init sme_enable(struct boot_params *bp); int __init early_set_memory_decrypte...
24883eb269f087b5d1068833fced543e020296ca
Analyze and fix the following issue in the Linux kernel code: drm/repaper: fix -Wvoid-pointer-to-enum-cast warning
Problem Details: When building with clang 18 I see the following warning: | drivers/gpu/drm/tiny/repaper.c:952:11: warning: cast to smaller integer | type 'enum repaper_model' from 'const void *' [-Wvoid-pointer-to-enum-cast] | 952 | model = (enum repaper_model)match; | This is due ...
```diff diff --git a/drivers/gpu/drm/tiny/repaper.c b/drivers/gpu/drm/tiny/repaper.c index 13ae148f59b9..73dd4f4289c2 100644 --- a/drivers/gpu/drm/tiny/repaper.c +++ b/drivers/gpu/drm/tiny/repaper.c @@ -949,7 +949,7 @@ static int repaper_probe(struct spi_device *spi) match = device_get_match_data(dev); if (match)...
ef5b52a631f8c18353e80ccab8408b963305510c
Analyze and fix the following issue in the Linux kernel code: X.509: if signature is unsupported skip validation
Problem Details: When the hash algorithm for the signature is not available the digest size is 0 and the signature in the certificate is marked as unsupported. When validating a self-signed certificate, this needs to be checked, because otherwise trying to validate the signature will fail with an warning: Loading com...
```diff diff --git a/crypto/asymmetric_keys/x509_public_key.c b/crypto/asymmetric_keys/x509_public_key.c index 6fdfc82e23a8..7c71db3ac23d 100644 --- a/crypto/asymmetric_keys/x509_public_key.c +++ b/crypto/asymmetric_keys/x509_public_key.c @@ -130,6 +130,11 @@ int x509_check_for_self_signed(struct x509_certificate *cert...
fab9516f02b418e37d3cde6c21c316085262aece
Analyze and fix the following issue in the Linux kernel code: crypto: qat - fix crypto capability detection for 4xxx
Problem Details: When extending the capability detection logic for 4xxx devices the SMx algorithms were accidentally missed. Enable these SMx capabilities by default for QAT GEN4 devices. Check for device variants where the SMx algorithms are explicitly disabled by the GEN4 hardware. This is indicated in fusectl1 regi...
```diff diff --git a/drivers/crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c b/drivers/crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c index 268a1f7694fc..dd4464b7e00b 100644 --- a/drivers/crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c +++ b/drivers/crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c @@ -225,6 +225,8 @@ static u32 ge...
290564367ab7fa7e2048bdc00d9c0ad016b41eea
Analyze and fix the following issue in the Linux kernel code: wifi: rtw88: usb: kill and free rx urbs on probe failure
Problem Details: After rtw_usb_alloc_rx_bufs() has been called rx urbs have been allocated and must be freed in the error path. After rtw_usb_init_rx() has been called they are submitted, so they also must be killed. Add these forgotten steps to the probe error path. Besides the lost memory this also fixes a problem ...
```diff diff --git a/drivers/net/wireless/realtek/rtw88/usb.c b/drivers/net/wireless/realtek/rtw88/usb.c index 95b9d933158f..d879d7e3dc81 100644 --- a/drivers/net/wireless/realtek/rtw88/usb.c +++ b/drivers/net/wireless/realtek/rtw88/usb.c @@ -826,7 +826,7 @@ int rtw_usb_probe(struct usb_interface *intf, const struct us...
78d84f35d2c3bf4434e9d785e4b4c33fa8e57878
Analyze and fix the following issue in the Linux kernel code: wifi: rtw89: Fix clang -Wimplicit-fallthrough in rtw89_query_sar()
Problem Details: clang warns (or errors with CONFIG_WERROR=y): drivers/net/wireless/realtek/rtw89/sar.c:216:3: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough] 216 | case RTW89_TAS_STATE_DPR_FORBID: | ^ drivers/net/wireless/realtek/r...
```diff diff --git a/drivers/net/wireless/realtek/rtw89/sar.c b/drivers/net/wireless/realtek/rtw89/sar.c index 881322f85d79..aed05b026c6c 100644 --- a/drivers/net/wireless/realtek/rtw89/sar.c +++ b/drivers/net/wireless/realtek/rtw89/sar.c @@ -211,6 +211,7 @@ s8 rtw89_query_sar(struct rtw89_dev *rtwdev, u32 center_freq)...
058b207481977c4fab7f5d979aa783cf536e21f3
Analyze and fix the following issue in the Linux kernel code: wifi: rtw89: phy: modify register setting of ENV_MNTR, PHYSTS and DIG
Problem Details: The ENV_MNTR(environment monitor) is the dynamic mechanism which based on the HW of CCX(Cisco Compatible Extensions) which provide the channel loading and noisy level indicator to debug or support the 802.11k. The PHYSTS provide the detail PHY information per packet we received for debugging. The DIG(d...
```diff diff --git a/drivers/net/wireless/realtek/rtw89/core.h b/drivers/net/wireless/realtek/rtw89/core.h index 17f6418e4404..04ce221730f9 100644 --- a/drivers/net/wireless/realtek/rtw89/core.h +++ b/drivers/net/wireless/realtek/rtw89/core.h @@ -3381,6 +3381,10 @@ struct rtw89_dig_regs { u32 seg0_pd_reg; u32 pd_lo...
5d7cf67f72ae34d38e090bdfa673da4aefe4048e
Analyze and fix the following issue in the Linux kernel code: Fix nomenclature for USB and PCI wireless devices
Problem Details: A mouse that uses a USB connection is called a "USB mouse" device (or "USB mouse" for short), not a "mouse USB" device. By analogy, a WiFi adapter that connects to the host computer via USB is a "USB wireless" device, not a "wireless USB" device. (The latter term more properly refers to a defunct Wir...
```diff diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c index a7f44f6335fb..3ef414b613bf 100644 --- a/drivers/net/wireless/ath/ath10k/pci.c +++ b/drivers/net/wireless/ath/ath10k/pci.c @@ -3816,7 +3816,7 @@ static void __exit ath10k_pci_exit(void) module_exit(ath10k_pci_exit);...
3fc134a07438055fc93ce1bbacf2702ddd09500c
Analyze and fix the following issue in the Linux kernel code: mlxsw: core_hwmon: Adjust module label names based on MTCAP sensor counter
Problem Details: Transceiver module temperature sensors are indexed after ASIC and platform sensors. The current label printing method does not take this into account and simply prints the index of the transceiver module sensor. On new systems that have platform sensors this results in incorrect (shifted) transceiver ...
```diff diff --git a/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c b/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c index 70735068cf29..0fd290d776ff 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c +++ b/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c @@ -405,7 +405,8 @@ mlxsw_hwmon_module_temp_label...
d7248f1cc835bd80e936dc5b2d94b149bdd0077d
Analyze and fix the following issue in the Linux kernel code: mlxsw: i2c: Limit single transaction buffer size
Problem Details: Maximum size of buffer is obtained from underlying I2C adapter and in case adapter allows I2C transaction buffer size greater than 100 bytes, transaction will fail due to firmware limitation. As a result driver will fail initialization. Limit the maximum size of transaction buffer by 100 bytes to fit...
```diff diff --git a/drivers/net/ethernet/mellanox/mlxsw/i2c.c b/drivers/net/ethernet/mellanox/mlxsw/i2c.c index 47af7ef7e4ee..d23f293e285c 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/i2c.c +++ b/drivers/net/ethernet/mellanox/mlxsw/i2c.c @@ -48,6 +48,7 @@ #define MLXSW_I2C_MBOX_SIZE_BITS 12 #define MLXSW_I2C_ADD...
146c7c330507c0384bf29d567186632bfe975927
Analyze and fix the following issue in the Linux kernel code: mlxsw: i2c: Fix chunk size setting in output mailbox buffer
Problem Details: The driver reads commands output from the output mailbox. If the size of the output mailbox is not a multiple of the transaction / block size, then the driver will not issue enough read transactions to read the entire output, which can result in driver initialization errors. Fix by determining the num...
```diff diff --git a/drivers/net/ethernet/mellanox/mlxsw/i2c.c b/drivers/net/ethernet/mellanox/mlxsw/i2c.c index 41298835a11e..47af7ef7e4ee 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/i2c.c +++ b/drivers/net/ethernet/mellanox/mlxsw/i2c.c @@ -444,7 +444,7 @@ mlxsw_i2c_cmd(struct device *dev, u16 opcode, u32 in_mod,...
61698d3fbdcd36b65ab524183c73de8bc0693a1f
Analyze and fix the following issue in the Linux kernel code: ALSA: hda: Add missing dependency on CONFIG_EFI for Cirrus/TI sub-codecs
Problem Details: The CS35L41 and TAS2781 sub-codecs depend on CONFIG_EFI, as they have the code accessing efi variable directly. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202308250621.1lwt7PtZ-lkp@intel.com/ Fixes: 5be27f1e3ec9 ("ALSA: hda/tas2781: Add tas2781 HDA dri...
```diff diff --git a/sound/pci/hda/Kconfig b/sound/pci/hda/Kconfig index 91db5f8f00b6..0d7502d6e060 100644 --- a/sound/pci/hda/Kconfig +++ b/sound/pci/hda/Kconfig @@ -104,6 +104,7 @@ config SND_HDA_SCODEC_CS35L41_I2C tristate "Build CS35L41 HD-audio side codec support for I2C Bus" depends on I2C depends on ACPI +...
a3ca016af1c3318bf8640aae3afea57179c6a130
Analyze and fix the following issue in the Linux kernel code: ALSA: doc: Fix missing backquote in midi-2.0.rst
Problem Details: Fix the missing missing backquote that caused a sphinx warning: Documentation/sound/designs/midi-2.0.rst:517: WARNING: Inline interpreted text or phrase reference start-string without end-string. Fixes: e240cff9e6e9 ("ALSA: documentation: Add description for USB MIDI 2.0 gadget driver") Reported-by...
```diff diff --git a/Documentation/sound/designs/midi-2.0.rst b/Documentation/sound/designs/midi-2.0.rst index 3b08b98354f8..45987f256b97 100644 --- a/Documentation/sound/designs/midi-2.0.rst +++ b/Documentation/sound/designs/midi-2.0.rst @@ -515,7 +515,7 @@ connection:: % echo 2 > functions/midi2.usb0/ep.0/block.1/...
b38460bc463c54e0c15ff3b37e81f7e2059bb9bb
Analyze and fix the following issue in the Linux kernel code: kunit: Fix checksum tests on big endian CPUs
Problem Details: On powerpc64le checksum kunit tests work: [ 2.011457][ T1] KTAP version 1 [ 2.011662][ T1] # Subtest: checksum [ 2.011848][ T1] 1..3 [ 2.034710][ T1] ok 1 test_csum_fixed_random_inputs [ 2.079325][ T1] ok 2 test_csum_all_carry_inputs [ 2.127102][ ...
```diff diff --git a/lib/checksum_kunit.c b/lib/checksum_kunit.c index ace3c4799fe1..0eed92b77ba3 100644 --- a/lib/checksum_kunit.c +++ b/lib/checksum_kunit.c @@ -10,7 +10,8 @@ #define MAX_ALIGN 64 #define TEST_BUFLEN (MAX_LEN + MAX_ALIGN) -static const __wsum random_init_sum = 0x2847aab; +/* Values for a little en...
786c96e92fb9e854cb8b0cb7399bb2fb28e15c4b
Analyze and fix the following issue in the Linux kernel code: net: arcnet: Do not call kfree_skb() under local_irq_disable()
Problem Details: It is not allowed to call kfree_skb() from hardware interrupt context or with hardware interrupts being disabled. So replace kfree_skb() with dev_kfree_skb_irq() under local_irq_disable(). Compile tested only. Fixes: 05fcd31cc472 ("arcnet: add err_skb package for package status feedback") Signed-off-b...
```diff diff --git a/drivers/net/arcnet/arcnet.c b/drivers/net/arcnet/arcnet.c index 99265667538c..d9e052c49ba1 100644 --- a/drivers/net/arcnet/arcnet.c +++ b/drivers/net/arcnet/arcnet.c @@ -464,7 +464,7 @@ static void arcnet_reply_tasklet(struct tasklet_struct *t) ret = sock_queue_err_skb(sk, ackskb); if (ret) -...
4b2fd81f2af7147e844ecec0c5c07a16bca6b86e
Analyze and fix the following issue in the Linux kernel code: accel/ivpu: refactor deprecated strncpy
Problem Details: `strncpy` is deprecated for use on NUL-terminated destination strings [1]. A suitable replacement is `strscpy` [2] due to the fact that it guarantees NUL-termination on its destination buffer argument which is _not_ the case for `strncpy`! Also remove extraneous if-statement as it can never be entere...
```diff diff --git a/drivers/accel/ivpu/ivpu_jsm_msg.c b/drivers/accel/ivpu/ivpu_jsm_msg.c index 831bfd2b2d39..bdddef2c59ee 100644 --- a/drivers/accel/ivpu/ivpu_jsm_msg.c +++ b/drivers/accel/ivpu/ivpu_jsm_msg.c @@ -118,8 +118,7 @@ int ivpu_jsm_dyndbg_control(struct ivpu_device *vdev, char *command, size_t size struct...
49fa4b0d06705a24a81bb8be6eb175059b77f0a7
Analyze and fix the following issue in the Linux kernel code: octeontx2-pf: fix page_pool creation fail for rings > 32k
Problem Details: octeontx2 driver calls page_pool_create() during driver probe() and fails if queue size > 32k. Page pool infra uses these buffers as shock absorbers for burst traffic. These pages are pinned down over time as working sets varies, due to the recycling nature of page pool, given page pool (currently) don...
```diff diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c index 77c8f650f7ac..3e1c70c74622 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c @@ -1432,7 +1432,...
0aacec49c29e7c5b1487e859b0c0a42388c34092
Analyze and fix the following issue in the Linux kernel code: ice: avoid executing commands on other ports when driving sync
Problem Details: The ice hardware has a synchronization mechanism used to drive the simultaneous application of commands on both PHY ports and the source timer in the MAC. When issuing a sync via ice_ptp_exec_tmr_cmd(), the hardware will simultaneously apply the commands programmed for the main timer and each PHY port...
```diff diff --git a/drivers/net/ethernet/intel/ice/ice_ptp_hw.c b/drivers/net/ethernet/intel/ice/ice_ptp_hw.c index a38614d21ea8..de1d83300481 100644 --- a/drivers/net/ethernet/intel/ice/ice_ptp_hw.c +++ b/drivers/net/ethernet/intel/ice/ice_ptp_hw.c @@ -131,6 +131,8 @@ static void ice_ptp_src_cmd(struct ice_hw *hw, en...