id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
40afb3b14496afb01d5b3d028444e09d29b95559
Analyze and fix the following issue in the Linux kernel code: net/mlx5e: RX, Fix XDP_TX page release for legacy rq nonlinear case
Problem Details: When the XDP handler marks the data for transmission (XDP_TX), it is incorrect to release the page fragment. Instead, the fragments should be marked as MLX5E_WQE_FRAG_SKIP_RELEASE because XDP will release the page directly to the page_pool (page_pool_put_defragged_page) after TX completion. The linear...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c index 5dc907541094..69634829558e 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c @@ -1746,10 +1746,10 @@ mlx5e_skb_from_cqe_nonlinear(...
c8e9090233a70b8bbd8a73521a7a81856695732f
Analyze and fix the following issue in the Linux kernel code: net/mlx5e: RX, Fix releasing page_pool pages twice for striding RQ
Problem Details: mlx5e_free_rx_descs is responsible for calling the dealloc_wqe op which returns pages to the page_pool. This can happen during flush or close. For XSK, the regular RQ is flushed (when replaced by the XSK RQ) and also closed later. This is normally not a problem as the wqe list is empty on a second call...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c index a8c2ae389d6c..5dc907541094 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c @@ -861,6 +861,11 @@ static void mlx5e_dealloc_rx_mpw...
b0bc615df488abd0e95107e4a9ecefb9bf8c250a
Analyze and fix the following issue in the Linux kernel code: net/mlx5: Add vnic devlink health reporter to PFs/VFs
Problem Details: Create a vnic devlink health reporter for PFs/VFs interfaces. The reporter's diagnose callback displays the values of vNIC/vport transport debug counters of PFs/VFs, as follows: $ devlink health diagnose pci/0000:08:00.0 reporter vnic vNIC env counters: total_error_queues: 0 send_queue_priority_u...
```diff diff --git a/Documentation/networking/device_drivers/ethernet/mellanox/mlx5/devlink.rst b/Documentation/networking/device_drivers/ethernet/mellanox/mlx5/devlink.rst index 0995e4e5acd7..ceab18e46456 100644 --- a/Documentation/networking/device_drivers/ethernet/mellanox/mlx5/devlink.rst +++ b/Documentation/networ...
72b2cff68405e91ee5e772385b68eb4442bcbf43
Analyze and fix the following issue in the Linux kernel code: net/mlx5: DR, Calculate sync threshold of each pool according to its type
Problem Details: When certain ICM chunk is no longer needed, it needs to be freed. Fully freeing ICM memory involves issuing FW SYNC_STEERING command. This is very time consuming, and it is impractical to do it for every freed chunk. Instead, we manage these 'freed' chunks in hot list (list of chunks that are not requi...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_icm_pool.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_icm_pool.c index 04fc170a6c16..19e9b4d78454 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_icm_pool.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_icm_...
075056005d8cceecbbb8e054d8e3cd2b7519d9c6
Analyze and fix the following issue in the Linux kernel code: net/mlx5: DR, Fix dumping of legacy modify_hdr in debug dump
Problem Details: The steering dump parser expects to see 0 as rewrite num of actions in case pattern/args aren't supported - parsing of legacy modify header is based on this assumption. Fix this to align to parser's expectation. Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com> Signed-off-by: Saeed Mahameed <saeed...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_dbg.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_dbg.c index 1ff8bde90e1e..ea9f27db4c74 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_dbg.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_dbg.c @@ -153,13 +1...
c9b951c3136fb04a9bb89deef5bba8e262410f68
Analyze and fix the following issue in the Linux kernel code: docs: trace: Fix typo in ftrace.rst
Problem Details: There is a typo in the sentence "A kernel developer must be conscience ...". The word conscience should be conscious. This patch fixes it. Signed-off-by: Lin Yu Chen <starpt.official@gmail.com> Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org> Link: https://lore.kernel.org/r/20230412183739.89894...
```diff diff --git a/Documentation/trace/ftrace.rst b/Documentation/trace/ftrace.rst index b927fb2b94dc..e8bca5fea7cc 100644 --- a/Documentation/trace/ftrace.rst +++ b/Documentation/trace/ftrace.rst @@ -3510,7 +3510,7 @@ directories, the rmdir will fail with EBUSY. Stack trace ----------- Since the kernel has a fixe...
a110f8eb6a56d2796f59f6ced9b79d55bfd56839
Analyze and fix the following issue in the Linux kernel code: docs: kmemleak: adjust to config renaming
Problem Details: Commit c87db8ca0902 ("kmemleak-test: fix kmemleak_test.c build logic") essentially renames the config DEBUG_KMEMLEAK_TEST to SAMPLE_KMEMLEAK, but misses to adjust the documentation. Adjust kmemleak documentation to this config renaming. Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com> Acked-by:...
```diff diff --git a/Documentation/dev-tools/kmemleak.rst b/Documentation/dev-tools/kmemleak.rst index 5483fd39ef29..2cb00b53339f 100644 --- a/Documentation/dev-tools/kmemleak.rst +++ b/Documentation/dev-tools/kmemleak.rst @@ -227,7 +227,7 @@ Testing with kmemleak-test -------------------------- To check if you hav...
cbb110bc6672f785cab2cb308e9cfefee07af861
Analyze and fix the following issue in the Linux kernel code: selftests/bpf: populate map_array_ro map for verifier_array_access test
Problem Details: Two test cases: - "valid read map access into a read-only array 1" and - "valid read map access into a read-only array 2" Expect that map_array_ro map is filled with mock data. This logic was not taken into acount during initial test conversion. This commit modifies prog_tests/verifier.c entry point ...
```diff diff --git a/tools/testing/selftests/bpf/prog_tests/verifier.c b/tools/testing/selftests/bpf/prog_tests/verifier.c index 25bc8958dbfe..7c68d78da9ea 100644 --- a/tools/testing/selftests/bpf/prog_tests/verifier.c +++ b/tools/testing/selftests/bpf/prog_tests/verifier.c @@ -44,8 +44,17 @@ #include "verifier_xdp.sk...
7cdddb99e4a69c26881d279472f1487cd67740c4
Analyze and fix the following issue in the Linux kernel code: selftests/bpf: fix __retval() being always ignored
Problem Details: Florian Westphal found a bug in and suggested a fix for test_loader.c processing of __retval tag. Because of this bug the function test_loader.c:do_prog_test_run() never executed and all __retval test tags were ignored. If this bug is fixed a number of test cases from progs/verifier_array_access.c fai...
```diff diff --git a/tools/testing/selftests/bpf/progs/verifier_array_access.c b/tools/testing/selftests/bpf/progs/verifier_array_access.c index 95d7ecc12963..fceeeef78721 100644 --- a/tools/testing/selftests/bpf/progs/verifier_array_access.c +++ b/tools/testing/selftests/bpf/progs/verifier_array_access.c @@ -330,7 +33...
7c4b96c00043f3b2cad50653f085c178fda92e62
Analyze and fix the following issue in the Linux kernel code: selftests/bpf: disable program test run for progs/refcounted_kptr.c
Problem Details: Florian Westphal found a bug in test_loader.c processing of __retval tag. Because of this bug the function test_loader.c:do_prog_test_run() never executed and all __retval test tags were ignored. This hid an issue with progs/refcounted_kptr.c tests. When __retval tag bug is fixed and refcounted_kptr.c...
```diff diff --git a/tools/testing/selftests/bpf/progs/refcounted_kptr.c b/tools/testing/selftests/bpf/progs/refcounted_kptr.c index 1d348a225140..b6b2d4f97b19 100644 --- a/tools/testing/selftests/bpf/progs/refcounted_kptr.c +++ b/tools/testing/selftests/bpf/progs/refcounted_kptr.c @@ -219,7 +219,7 @@ static long __rea...
4b7ef71ac977899cf7bdb09d66052926c7d249ff
Analyze and fix the following issue in the Linux kernel code: bpftool: Replace "__fallthrough" by a comment to address merge conflict
Problem Details: The recent support for inline annotations in control flow graphs generated by bpftool introduced the usage of the "__fallthrough" macro in a switch/case block in btf_dumper.c. This change went through the bpf-next tree, but resulted in a merge conflict in linux-next, because this macro has been renamed...
```diff diff --git a/tools/bpf/bpftool/btf_dumper.c b/tools/bpf/bpftool/btf_dumper.c index 6c5e0e82da22..294de231db99 100644 --- a/tools/bpf/bpftool/btf_dumper.c +++ b/tools/bpf/bpftool/btf_dumper.c @@ -835,7 +835,7 @@ static void dotlabel_puts(const char *s) case '|': case ' ': putchar('\\'); - __fallthrou...
2f8fdcb0a73a1831cc4f205f23493a17c0e5536f
Analyze and fix the following issue in the Linux kernel code: ice: do not busy-wait to read GNSS data
Problem Details: The ice-gnss-<dev_name> kernel thread, which reads data from the u-blox GNSS module, keep a CPU core almost 100% busy. The main reason is that it busy-waits for data to become available. A simple improvement would be to replace the "mdelay(10);" in ice_gnss_read() with sleeping. A better fix is to not...
```diff diff --git a/drivers/net/ethernet/intel/ice/ice_gnss.c b/drivers/net/ethernet/intel/ice/ice_gnss.c index 8dec748bb53a..2ea8a2b11bcd 100644 --- a/drivers/net/ethernet/intel/ice/ice_gnss.c +++ b/drivers/net/ethernet/intel/ice/ice_gnss.c @@ -117,6 +117,7 @@ static void ice_gnss_read(struct kthread_work *work) { ...
e85d3d55875f7a1079edfbc4e4e98d6f8aea9ac7
Analyze and fix the following issue in the Linux kernel code: ixgbe: Enable setting RSS table to default values
Problem Details: ethtool uses `ETHTOOL_GRXRINGS` to compute how many queues are supported by RSS. The driver should return the smaller of either: - The maximum number of RSS queues the device supports, OR - The number of RX queues configured Prior to this change, running `ethtool -X $iface default` fails if the nu...
```diff diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c index 821dfd323fa9..0bbad4a5cc2f 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c @@ -2665,6 +2665,14 @@ static int ixgbe_get_rss_h...
4f3ed1293feb9502dc254b05802faf1ad3317ac6
Analyze and fix the following issue in the Linux kernel code: ixgbe: Allow flow hash to be set via ethtool
Problem Details: ixgbe currently returns `EINVAL` whenever the flowhash it set by ethtool because the ethtool code in the kernel passes a non-zero value for hfunc that ixgbe should allow. When ethtool is called with `ETHTOOL_SRXFHINDIR`, `ethtool_set_rxfh_indir` will call ixgbe's set_rxfh function with `ETH_RSS_HASH_N...
```diff diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c index 6cfc9dc16537..821dfd323fa9 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c @@ -3131,8 +3131,8 @@ static int ixgbe_set_rxfh(s...
e9f59429b87d35cf23ae9ca19629bd686a1c0304
Analyze and fix the following issue in the Linux kernel code: btrfs: set default discard iops_limit to 1000
Problem Details: Previously, the default was a relatively conservative 10. This results in a 100ms delay, so with ~300 discards in a commit, it takes the full 30s till the next commit to finish the discards. On a workstation, this results in the disk never going idle, wasting power/battery, etc. Set the default to 100...
```diff diff --git a/fs/btrfs/discard.c b/fs/btrfs/discard.c index 317aeff6c1da..0bc526f5fcd9 100644 --- a/fs/btrfs/discard.c +++ b/fs/btrfs/discard.c @@ -60,7 +60,7 @@ #define BTRFS_DISCARD_TARGET_MSEC (6 * 60 * 60UL * MSEC_PER_SEC) #define BTRFS_DISCARD_MIN_DELAY_MSEC (1UL) #define BTRFS_DISCARD_MAX_DELAY_MSEC (10...
0f2a4af27b649c13ba76431552fe49c60120d0f6
Analyze and fix the following issue in the Linux kernel code: wifi: ath9k: Don't mark channelmap stack variable read-only in ath9k_mci_update_wlan_channels()
Problem Details: This partially reverts commit e161d4b60ae3a5356e07202e0bfedb5fad82c6aa. Turns out the channelmap variable is not actually read-only, it's modified through the MCI_GPM_CLR_CHANNEL_BIT() macro further down in the function, so making it read-only causes page faults when that code is hit. Link: https://b...
```diff diff --git a/drivers/net/wireless/ath/ath9k/mci.c b/drivers/net/wireless/ath/ath9k/mci.c index 3363fc4e8966..a0845002d6fe 100644 --- a/drivers/net/wireless/ath/ath9k/mci.c +++ b/drivers/net/wireless/ath/ath9k/mci.c @@ -646,9 +646,7 @@ void ath9k_mci_update_wlan_channels(struct ath_softc *sc, bool allow_all) s...
5d90cf6dcc6a4cb85a51ffe007a8e34375799164
Analyze and fix the following issue in the Linux kernel code: um: further clean up user_syms
Problem Details: Make some cleanups, add and fix some comments and document here that we shouldn't export (libc) symbols for "_user.c" code, rather such should work like hostfs does now. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Richard Weinberger <richard@nod.at>
```diff diff --git a/arch/um/os-Linux/user_syms.c b/arch/um/os-Linux/user_syms.c index 1e9e92740b32..9b62a9d352b3 100644 --- a/arch/um/os-Linux/user_syms.c +++ b/arch/um/os-Linux/user_syms.c @@ -3,35 +3,36 @@ #include <linux/types.h> #include <linux/module.h> -/* Some of this are builtin function (some are not but ...
98530c34d0e149456258359f5bb3bb17fbdfd83b
Analyze and fix the following issue in the Linux kernel code: dt-bindings: i2c: samsung: Fix 'deprecated' value
Problem Details: 'deprecated' is a boolean type which should have a value of 'true' rather than 'yes'. Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20230418150643.1529895-1-robh@kernel.org Signed-off-by: Rob Herring <robh@kernel.org>
```diff diff --git a/Documentation/devicetree/bindings/i2c/samsung,s3c2410-i2c.yaml b/Documentation/devicetree/bindings/i2c/samsung,s3c2410-i2c.yaml index 3d5782deb97d..b204e35e4f8d 100644 --- a/Documentation/devicetree/bindings/i2c/samsung,s3c2410-i2c.yaml +++ b/Documentation/devicetree/bindings/i2c/samsung,s3c2410-i2...
ed3d8f3efa128756508c80cf4fbc7f20fbec5755
Analyze and fix the following issue in the Linux kernel code: dt-bindings: display: Fix lvds.yaml references
Problem Details: The trailing "/" in "lvds.yaml/#" is not a valid JSON pointer. The existing jsonschema package allows it, but coming changes make allowed "$ref" URIs stricter. Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Link: https://lore.kernel.org/r/20230418150658.1535120-1-robh@kernel...
```diff diff --git a/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml b/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml index 3a8c2c11f9bd..f6fea9085aab 100644 --- a/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml +++ b/Documentation/devicetre...
55793ea54d77719a071b1ccc05a05056e3b5e009
Analyze and fix the following issue in the Linux kernel code: nbd: fix incomplete validation of ioctl arg
Problem Details: We tested and found an alarm caused by nbd_ioctl arg without verification. The UBSAN warning calltrace like below: UBSAN: Undefined behaviour in fs/buffer.c:1709:35 signed integer overflow: -9223372036854775808 - 1 cannot be represented in type 'long long int' CPU: 3 PID: 2523 Comm: syz-executor.0 Not...
```diff diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index c0b1611b9665..d445fd0934bd 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@ -325,6 +325,9 @@ static int nbd_set_size(struct nbd_device *nbd, loff_t bytesize, if (blk_validate_block_size(blksize)) return -EINVAL; + if (bytesize < 0)...
79b6e265d92092b49252f546e1a0f63ae8851f83
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fixes for dcn32_clk_mgr implementation
Problem Details: [Why&How] Fix CLK MGR early initialization and add logging. Fixes: 265280b99822 ("drm/amd/display: add CLKMGR changes for DCN32/321") Reviewed-by: Leo Li <sunpeng.li@amd.com> Reviewed-by: Qingqing Zhuo <qingqing.zhuo@amd.com> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Tested-by: Daniel...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c index 2b8a81b6d53b..eea103908b09 100644 --- a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c +++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c @...
4fb5f569055ccead1807139791b368b31f1e7301
Analyze and fix the following issue in the Linux kernel code: drm/i915/psr: Include PSR_PERF_CNT in debugfs output on all platforms
Problem Details: The fact that DC states reset the PSR perofrmance counter is no reason not to include it in the debug output. But let's keep the comment there to remind people about that caveat. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/2023041119...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index c981881cacb6..3a94f4030491 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -2873,12 +2873,10 @@ static int intel_psr_status(struct seq_file *m, struct in...
2590ef92cdff017ac98012593db54c4d5b96388d
Analyze and fix the following issue in the Linux kernel code: drm/i915/psr: Define more PSR mask bits
Problem Details: Define more of the PSR mask bits, and describe in detail what some of them do. Even if we don't set them all from the driver they can be very useful during PSR debugging. Having to trawl through bspec every time to find them is not fun, and re-reverse engineering the behaviour every time is time consum...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index 05cb65b98825..c981881cacb6 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -85,6 +85,91 @@ * use page flips. */ +/* + * Description of PSR mask bit...
0d21e71a91debc87e88437a2cf9c6f34f8bf012f
Analyze and fix the following issue in the Linux kernel code: PCI: Restrict device disabled status check to DT
Problem Details: Commit 6fffbc7ae137 ("PCI: Honor firmware's device disabled status") checked the firmware device status for both DT and ACPI devices. That caused a regression in some ACPI systems. The exact reason isn't clear. It's possibly a firmware bug. For now, at least, refactor the check to be for DT based syste...
```diff diff --git a/drivers/pci/of.c b/drivers/pci/of.c index 196834ed44fe..4c2ef2e28fb5 100644 --- a/drivers/pci/of.c +++ b/drivers/pci/of.c @@ -16,14 +16,32 @@ #include "pci.h" #ifdef CONFIG_PCI -void pci_set_of_node(struct pci_dev *dev) +/** + * pci_set_of_node - Find and set device's DT device_node + * @dev: t...
87727ba2bb05cc3cb4233231faa7ab4c7eeb6c73
Analyze and fix the following issue in the Linux kernel code: KVM: arm64: Ensure CPU PMU probes before pKVM host de-privilege
Problem Details: Although pKVM supports CPU PMU emulation for non-protected guests since 722625c6f4c5 ("KVM: arm64: Reenable pmu in Protected Mode"), this relies on the PMU driver probing before the host has de-privileged so that the 'kvm_arm_pmu_available' static key can still be enabled by patching the hypervisor tex...
```diff diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c index 3bd732eaf087..890f730bc3ab 100644 --- a/arch/arm64/kvm/arm.c +++ b/arch/arm64/kvm/arm.c @@ -16,7 +16,6 @@ #include <linux/fs.h> #include <linux/mman.h> #include <linux/sched.h> -#include <linux/kmemleak.h> #include <linux/kvm.h> #include <linux...
3d0d33363cdf4bdc41227cccc28848d6b2fc2998
Analyze and fix the following issue in the Linux kernel code: drm/i915: Fix up whitespace in some display chicken registers
Problem Details: Fix a bunch of whitespace issues in some display register definitons. Only touching the bits alerayd using REG_BIT() & co. here. The rest will come later. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230411191429.29895-2-ville.syrja...
```diff diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index a89e7a1cdcfe..f6ca0d82a43c 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h @@ -1334,8 +1334,8 @@ #define ILK_DISPLAY_CHICKEN1 _MMIO(0x42000) #define ILK_FBCQ_DIS (1 << 22) -#define IL...
8a46df7cd135fe576c18efa418cd1549e51f2732
Analyze and fix the following issue in the Linux kernel code: KVM: s390: pci: fix virtual-physical confusion on module unload/load
Problem Details: When the kvm module is unloaded, zpci_setup_aipb() perists some data in the zpci_aipb structure in s390 pci code. Note that this struct is also passed to firmware in the zpci_set_irq_ctrl() call and thus the GAIT must be a physical address. On module re-insertion, the GAIT is restored from this struct...
```diff diff --git a/arch/s390/kvm/pci.c b/arch/s390/kvm/pci.c index b124d586db55..7dab00f1e833 100644 --- a/arch/s390/kvm/pci.c +++ b/arch/s390/kvm/pci.c @@ -112,7 +112,7 @@ static int zpci_reset_aipb(u8 nisc) return -EINVAL; aift->sbv = zpci_aif_sbv; - aift->gait = (struct zpci_gaite *)zpci_aipb->aipb.gait; + ...
2f2c0911b950794dbf394ee2d784138fbf714dbd
Analyze and fix the following issue in the Linux kernel code: KVM: s390: interrupt: fix virtual-physical confusion for next alert GISA
Problem Details: We sometimes put a virtual address in next_alert, which should always be a physical address, since it is shared with hardware. This currently works, because virtual and physical addresses are the same. Add phys_to_virt() to resolve the virtual-physical confusion. Signed-off-by: Nico Boehr <nrb@linux...
```diff diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c index 9250fde1f97d..da6dac36e959 100644 --- a/arch/s390/kvm/interrupt.c +++ b/arch/s390/kvm/interrupt.c @@ -305,7 +305,7 @@ static inline u8 gisa_get_ipm_or_restore_iam(struct kvm_s390_gisa_interrupt *gi) static inline int gisa_in_alert_list(...
57fbfb3b0b6526c9fd9c32383720ff550ace4919
Analyze and fix the following issue in the Linux kernel code: docs: leds: ledtrig-oneshot: Fix spelling mistake
Problem Details: It's no comparison, but a "first this, then that" situation. Signed-off-by: Alexander Dahl <ada@thorsis.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20230418113402.188391-1-ada@thorsis.com
```diff diff --git a/Documentation/leds/ledtrig-oneshot.rst b/Documentation/leds/ledtrig-oneshot.rst index 69fa3ea1d554..e044d69e9c0f 100644 --- a/Documentation/leds/ledtrig-oneshot.rst +++ b/Documentation/leds/ledtrig-oneshot.rst @@ -5,7 +5,7 @@ One-shot LED Trigger This is a LED trigger useful for signaling the user...
e315e7b83a22043bffee450437d7089ef373cbf6
Analyze and fix the following issue in the Linux kernel code: net: libwx: fix memory leak in wx_setup_rx_resources
Problem Details: When wx_alloc_page_pool() failed in wx_setup_rx_resources(), it doesn't release DMA buffer. Add dma_free_coherent() in the error path to release the DMA buffer. Fixes: 850b971110b2 ("net: libwx: Allocate Rx and Tx resources") Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com> Reviewed-by: Simon ...
```diff diff --git a/drivers/net/ethernet/wangxun/libwx/wx_lib.c b/drivers/net/ethernet/wangxun/libwx/wx_lib.c index eb89a274083e..1e8d8b7b0c62 100644 --- a/drivers/net/ethernet/wangxun/libwx/wx_lib.c +++ b/drivers/net/ethernet/wangxun/libwx/wx_lib.c @@ -1798,10 +1798,13 @@ static int wx_setup_rx_resources(struct wx_ri...
7c75661c42a06fe35e1774373194f646b5a9e5c9
Analyze and fix the following issue in the Linux kernel code: ublk: don't return 0 in case of any failure
Problem Details: Commit 2d786e66c966 ("block: ublk: switch to ioctl command encoding") starts to reset local variable of 'ret' as zero, then if any failure happens when handling the three IO commands, 0 can be returned to ublk server. Fix it by returning -EINVAL in case of command handling failure. Cc: Christoph Hell...
```diff diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c index 5da5876a4443..253008b2091d 100644 --- a/drivers/block/ublk_drv.c +++ b/drivers/block/ublk_drv.c @@ -1315,6 +1315,7 @@ static int ublk_ch_uring_cmd(struct io_uring_cmd *cmd, unsigned int issue_flags) if (ret) goto out; + ret = -EINVAL;...
81ea1222f2fa5006f4b9759c2fe1ec154109622d
Analyze and fix the following issue in the Linux kernel code: Revert "block: Merge bio before checking ->cached_rq"
Problem Details: This reverts commit 23f3e3272e7a4d9fb870485cd6df1e4f9539282c. blk-mq sched bio merge still needs request to grab queue usage counter, so we can't simply call blk_mq_attempt_bio_merge() when queue usage counter isn't held. Fixes: 23f3e3272e7a ("block: Merge bio before checking ->cached_rq") Cc: Xiao N...
```diff diff --git a/block/blk-mq.c b/block/blk-mq.c index f0ea9dcfb966..2831f78f86a0 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -2878,16 +2878,15 @@ static inline struct request *blk_mq_get_cached_request(struct request_queue *q, if (!plug) return NULL; + rq = rq_list_peek(&plug->cached_rq); + if (!rq ...
654d0310007146fae87b0c1a68f81e53ad519b14
Analyze and fix the following issue in the Linux kernel code: optee: fix uninited async notif value
Problem Details: Fixes an uninitialized variable in irq_handler() that could lead to unpredictable behavior in case OP-TEE fails to handle SMC function ID OPTEE_SMC_GET_ASYNC_NOTIF_VALUE. This change ensures that in that case get_async_notif_value() properly reports there are no notification event. Reported-by: kernel...
```diff diff --git a/drivers/tee/optee/smc_abi.c b/drivers/tee/optee/smc_abi.c index a1c1fa1a9c28..e6e0428f8e7b 100644 --- a/drivers/tee/optee/smc_abi.c +++ b/drivers/tee/optee/smc_abi.c @@ -984,8 +984,10 @@ static u32 get_async_notif_value(optee_invoke_fn *invoke_fn, bool *value_valid, invoke_fn(OPTEE_SMC_GET_ASYN...
ec274aff21b6a94c7973384ca80a503c1bc3b173
Analyze and fix the following issue in the Linux kernel code: swiotlb: Omit total_used and used_hiwater if !CONFIG_DEBUG_FS
Problem Details: The tracking of used_hiwater adds an atomic operation to the hot path. This is acceptable only when debugging the kernel. To make sure that the fields can never be used by mistake, do not even include them in struct io_tlb_mem if CONFIG_DEBUG_FS is not set. The build fails after doing that. To fix it,...
```diff diff --git a/include/linux/swiotlb.h b/include/linux/swiotlb.h index 6dc4598d2260..44767844e12b 100644 --- a/include/linux/swiotlb.h +++ b/include/linux/swiotlb.h @@ -107,8 +107,10 @@ struct io_tlb_mem { unsigned int area_nslabs; struct io_tlb_area *areas; struct io_tlb_slot *slots; +#ifdef CONFIG_DEBUG_F...
af8678e6c5bd37d99fa37c06a158a263da42efa1
Analyze and fix the following issue in the Linux kernel code: wifi: rtl8xxxu: Don't print the vendor/product/serial
Problem Details: Most devices have a vendor name, product name, and serial number in the efuse, but it's pretty useless. It duplicates the information already printed by the USB subsystem: usb 1-4: New USB device found, idVendor=0bda, idProduct=8178, bcdDevice= 2.00 usb 1-4: New USB device strings: Mfr=1, Produc...
```diff diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188e.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188e.c index af8436070ba7..8986783ae8fa 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188e.c +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188e.c @@ -568,10 +568,6 @@ stat...
59a3a312009723e3e5082899655fdcc420e2b47a
Analyze and fix the following issue in the Linux kernel code: wifi: rtw88: Fix memory leak in rtw88_usb
Problem Details: Kmemleak shows the following leak arising from routine in the usb probe routine: unreferenced object 0xffff895cb29bba00 (size 512): comm "(udev-worker)", pid 534, jiffies 4294903932 (age 102751.088s) hex dump (first 32 bytes): 77 30 30 30 00 00 00 00 02 2f 2d 2b 30 00 00 00 w000...../-+0... ...
```diff diff --git a/drivers/net/wireless/realtek/rtw88/usb.c b/drivers/net/wireless/realtek/rtw88/usb.c index 8e2c99f9c366..44a5fafb9905 100644 --- a/drivers/net/wireless/realtek/rtw88/usb.c +++ b/drivers/net/wireless/realtek/rtw88/usb.c @@ -804,6 +804,7 @@ static void rtw_usb_intf_deinit(struct rtw_dev *rtwdev, str...
14705f969d98187a1cc2682e0c9bd2e230b8098f
Analyze and fix the following issue in the Linux kernel code: wifi: rtw88: rtw8821c: Fix rfe_option field width
Problem Details: On my RTW8821CU chipset rfe_option reads as 0x22. Looking at the vendor driver suggests that the field width of rfe_option is 5 bit, so rfe_option should be masked with 0x1f. Without this the rfe_option comparisons with 2 further down the driver evaluate as false when they should really evaluate as tr...
```diff diff --git a/drivers/net/wireless/realtek/rtw88/rtw8821c.c b/drivers/net/wireless/realtek/rtw88/rtw8821c.c index e53836768378..619fb3adb832 100644 --- a/drivers/net/wireless/realtek/rtw88/rtw8821c.c +++ b/drivers/net/wireless/realtek/rtw88/rtw8821c.c @@ -53,7 +53,7 @@ static int rtw8821c_read_efuse(struct rtw_d...
a6f187f92bcc2b17821538b4a11d61764e68b091
Analyze and fix the following issue in the Linux kernel code: wifi: rtw88: usb: fix priority queue to endpoint mapping
Problem Details: The RTW88 chipsets have four different priority queues in hardware. For the USB type chipsets the packets destined for a specific priority queue must be sent through the endpoint corresponding to the queue. This was not fully understood when porting from the RTW88 USB out of tree driver and thus violat...
```diff diff --git a/drivers/net/wireless/realtek/rtw88/usb.c b/drivers/net/wireless/realtek/rtw88/usb.c index 68e1b782d199..8e2c99f9c366 100644 --- a/drivers/net/wireless/realtek/rtw88/usb.c +++ b/drivers/net/wireless/realtek/rtw88/usb.c @@ -118,6 +118,22 @@ static void rtw_usb_write32(struct rtw_dev *rtwdev, u32 addr...
a1b8015da57a783b3ceebd8e114afbe07536bd54
Analyze and fix the following issue in the Linux kernel code: wifi: rtw88: prevent scan abort with other VIFs
Problem Details: Only abort scan with current scanning VIF. If we have more than one interface, we could call rtw_hw_scan_abort() with the wrong VIF as input. This avoids potential null pointer being accessed when actually the other VIF is scanning. Signed-off-by: Po-Hao Huang <phhuang@realtek.com> Signed-off-by: Ping...
```diff diff --git a/drivers/net/wireless/realtek/rtw88/fw.c b/drivers/net/wireless/realtek/rtw88/fw.c index 049473accdb9..f2d48091b1e9 100644 --- a/drivers/net/wireless/realtek/rtw88/fw.c +++ b/drivers/net/wireless/realtek/rtw88/fw.c @@ -2163,8 +2163,10 @@ out: return ret; } -void rtw_hw_scan_abort(struct rtw_dev...
ccf73f6e69c0244a979e97eb6c38f80cd6cbc116
Analyze and fix the following issue in the Linux kernel code: wifi: rtw88: add port switch for AP mode
Problem Details: Switch port settings if AP mode does not start on port 0 because of hardware limitation. For some ICs, beacons on ports other than zero could misbehave and do not issue properly, to fix this we change AP VIFs to port zero when multiple interfaces is active. Signed-off-by: Po-Hao Huang <phhuang@realtek...
```diff diff --git a/drivers/net/wireless/realtek/rtw88/mac80211.c b/drivers/net/wireless/realtek/rtw88/mac80211.c index d026094a72c4..19c4d7c29759 100644 --- a/drivers/net/wireless/realtek/rtw88/mac80211.c +++ b/drivers/net/wireless/realtek/rtw88/mac80211.c @@ -212,6 +212,7 @@ static int rtw_ops_add_interface(struct i...
e2f06aa885081e1391916367f53bad984714b4db
Analyze and fix the following issue in the Linux kernel code: driver core: Don't require dynamic_debug for initcall_debug probe timing
Problem Details: Don't require the use of dynamic debug (or modification of the kernel to add a #define DEBUG to the top of this file) to get the printk message about driver probe timing. This printk is only emitted when initcall_debug is enabled on the kernel commandline, and it isn't immediately obvious that you have...
```diff diff --git a/drivers/base/dd.c b/drivers/base/dd.c index 7b9ab2050b84..9c09ca5c4ab6 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c @@ -735,7 +735,12 @@ static int really_probe_debug(struct device *dev, struct device_driver *drv) calltime = ktime_get(); ret = really_probe(dev, drv); rettime = ktime...
b56eef3e16d888883fefab47425036de80dd38fc
Analyze and fix the following issue in the Linux kernel code: spmi: Add a check for remove callback when removing a SPMI driver
Problem Details: When removing a SPMI driver, there can be a crash due to NULL pointer dereference if it does not have a remove callback defined. This is one such call trace observed when removing the QCOM SPMI PMIC driver: dump_backtrace.cfi_jt+0x0/0x8 dump_stack_lvl+0xd8/0x16c panic+0x188/0x498 __cfi_slowpath+0x...
```diff diff --git a/drivers/spmi/spmi.c b/drivers/spmi/spmi.c index 5705151013b3..7313d4c18a04 100644 --- a/drivers/spmi/spmi.c +++ b/drivers/spmi/spmi.c @@ -350,7 +350,8 @@ static void spmi_drv_remove(struct device *dev) const struct spmi_driver *sdrv = to_spmi_driver(dev->driver); pm_runtime_get_sync(dev); - s...
80c606a842e6b6b6f4a2b53a734a9d3be2cdddff
Analyze and fix the following issue in the Linux kernel code: spmi: fix W=1 kernel-doc warnings
Problem Details: Fix all W=1 kernel-doc warnings in drivers/spmi/: drivers/spmi/spmi.c:414: warning: expecting prototype for spmi_controller_alloc(). Prototype was for spmi_device_alloc() instead drivers/spmi/spmi.c:592: warning: expecting prototype for spmi_driver_register(). Prototype was for __spmi_driver_register(...
```diff diff --git a/drivers/spmi/spmi-pmic-arb.c b/drivers/spmi/spmi-pmic-arb.c index 42a593418aad..dcb675d980d4 100644 --- a/drivers/spmi/spmi-pmic-arb.c +++ b/drivers/spmi/spmi-pmic-arb.c @@ -126,7 +126,7 @@ struct apid_data { }; /** - * spmi_pmic_arb - SPMI PMIC Arbiter object + * struct spmi_pmic_arb - SPMI PM...
752144d8939a5b303b753da8528e14d14c2a235c
Analyze and fix the following issue in the Linux kernel code: w1: omap-hdq: add SPDX tag
Problem Details: Replace GPLv2 license text with SPDX and drop unnecessary file name in comment to fix checkpatch warnings: WARNING: Missing or malformed SPDX-License-Identifier tag in line 1 WARNING: It's generally not useful to have the filename in the file Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowsk...
```diff diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c index ae3e504cd543..826207c24bd0 100644 --- a/drivers/w1/masters/omap_hdq.c +++ b/drivers/w1/masters/omap_hdq.c @@ -1,12 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-only /* - * drivers/w1/masters/omap_hdq.c - * * Copyright (C) 2007,2...
787e19ae1fa96cfbbb943e647253e966b4d53407
Analyze and fix the following issue in the Linux kernel code: w1: ds2482: do not use assignment in if condition
Problem Details: Assignments in if condition are less readable and error-prone. Fixes also checkpatch warning: ERROR: do not use assignment in if condition Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20230415104304.104134-9-krzysztof.kozlowski@linaro.org Sign...
```diff diff --git a/drivers/w1/masters/ds2482.c b/drivers/w1/masters/ds2482.c index cc5938fb6239..c1de8a92e144 100644 --- a/drivers/w1/masters/ds2482.c +++ b/drivers/w1/masters/ds2482.c @@ -451,7 +451,8 @@ static int ds2482_probe(struct i2c_client *client) I2C_FUNC_SMBUS_BYTE)) return -ENODEV; - if (!(d...
076909c24ffa747a56d9c0167c74ee167dd81cd1
Analyze and fix the following issue in the Linux kernel code: w1: ds2482: drop unnecessary header
Problem Details: linux/delay.h is already included, so drop asm header to also fix checkpatch: WARNING: Use #include <linux/delay.h> instead of <asm/delay.h> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20230415104304.104134-8-krzysztof.kozlowski@linaro.org Sig...
```diff diff --git a/drivers/w1/masters/ds2482.c b/drivers/w1/masters/ds2482.c index b1c76a96cc8d..cc5938fb6239 100644 --- a/drivers/w1/masters/ds2482.c +++ b/drivers/w1/masters/ds2482.c @@ -15,7 +15,6 @@ #include <linux/slab.h> #include <linux/i2c.h> #include <linux/delay.h> -#include <asm/delay.h> #include <lin...
39bbfdacaebbe2576fb0f591e218e76a117886cf
Analyze and fix the following issue in the Linux kernel code: w1: ds2433: do not use assignment in if condition
Problem Details: Assignments in if condition are less readable and error-prone. Fixes also checkpatch warning: ERROR: do not use assignment in if condition Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20230415104304.104134-7-krzysztof.kozlowski@linaro.org Sign...
```diff diff --git a/drivers/w1/slaves/w1_ds2433.c b/drivers/w1/slaves/w1_ds2433.c index 23cd099d032b..9f21fd98f799 100644 --- a/drivers/w1/slaves/w1_ds2433.c +++ b/drivers/w1/slaves/w1_ds2433.c @@ -98,7 +98,8 @@ static ssize_t eeprom_read(struct file *filp, struct kobject *kobj, u8 wrbuf[3]; #endif - if ((count =...
ad9c36be1f78f2990310cdcf902eba64cd2b2cf3
Analyze and fix the following issue in the Linux kernel code: w1: minor white-space and code style fixes
Problem Details: Correct several coding convention violations around white-spaces: ERROR: spaces required around that '=' (ctx:VxV) WARNING: Missing a blank line after declarations ERROR: "foo* bar" should be "foo *bar" ERROR: "(foo*)" should be "(foo *)" WARNING: Block comments use * on subsequent lines W...
```diff diff --git a/drivers/w1/masters/ds2482.c b/drivers/w1/masters/ds2482.c index 1665fd28b964..104bdf5c8064 100644 --- a/drivers/w1/masters/ds2482.c +++ b/drivers/w1/masters/ds2482.c @@ -78,10 +78,8 @@ MODULE_PARM_DESC(extra_config, "Extra Configuration settings 1=APU,2=PPM,3=SPU,8 * To set the channel, write the...
a2809664ca296ca89c6c8cc52ce728c1088d5af1
Analyze and fix the following issue in the Linux kernel code: w1: ds28e04: correct kerneldoc annotation
Problem Details: Correct kerneldoc comments (or drop annotation) to fix: w1_ds28e04.c:57: warning: This comment starts with '/**', but isn't a kernel-doc comment. w1_ds28e04.c:149: warning: This comment starts with '/**', but isn't a kernel-doc comment. Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Signed-off...
```diff diff --git a/drivers/w1/slaves/w1_ds28e04.c b/drivers/w1/slaves/w1_ds28e04.c index 6cef6e2edb89..f54d6afd79c3 100644 --- a/drivers/w1/slaves/w1_ds28e04.c +++ b/drivers/w1/slaves/w1_ds28e04.c @@ -53,7 +53,7 @@ struct w1_f1C_data { u32 validcrc; }; -/** +/* * Check the file size bounds and adjusts count as...
a866ce3b4fde3d0fb399cb5a81fd12cc3ff6e5c1
Analyze and fix the following issue in the Linux kernel code: w1: ds2433: correct kerneldoc annotation
Problem Details: Correct kerneldoc comments (or drop annotation) to fix: w1_ds2433.c:46: warning: This comment starts with '/**', but isn't a kernel-doc comment. w1_ds2433.c:141: warning: This comment starts with '/**', but isn't a kernel-doc comment. Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-b...
```diff diff --git a/drivers/w1/slaves/w1_ds2433.c b/drivers/w1/slaves/w1_ds2433.c index 0f72df15a024..6134ca2f37fe 100644 --- a/drivers/w1/slaves/w1_ds2433.c +++ b/drivers/w1/slaves/w1_ds2433.c @@ -42,7 +42,7 @@ struct w1_f23_data { u32 validcrc; }; -/** +/* * Check the file size bounds and adjusts count as nee...
45c85d974f60aa519769c1933859e84aa96fa3f1
Analyze and fix the following issue in the Linux kernel code: w1: ds2408: drop kerneldoc annotation
Problem Details: Drop kerneldoc annotation from comment which is not a kerneldoc to fix: w1_ds2408.c:210: warning: This comment starts with '/**', but isn't a kernel-doc comment Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.k...
```diff diff --git a/drivers/w1/slaves/w1_ds2408.c b/drivers/w1/slaves/w1_ds2408.c index ad102c577122..7fa911989193 100644 --- a/drivers/w1/slaves/w1_ds2408.c +++ b/drivers/w1/slaves/w1_ds2408.c @@ -206,7 +206,7 @@ out: } -/** +/* * Writing to the activity file resets the activity latches. */ static ssize_t a...
2b3174c96696cde676393474f0e01d0d108462f5
Analyze and fix the following issue in the Linux kernel code: n_gsm: Use array_index_nospec() with index that comes from userspace
Problem Details: dc.channel used for indexing comes directly from copy_from_user(). Use array_index_nospec() to mitigate speculative side-channel. Link: https://lore.kernel.org/linux-serial/64306d13.ONswMlyWlVKLGkKR%25lkp@intel.com/ Cc: stable <stable@kernel.org> Fixes: afe3154ba87e ("tty: n_gsm: add ioctl for DLC con...
```diff diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c index c42c8b89fd46..b411a26cc092 100644 --- a/drivers/tty/n_gsm.c +++ b/drivers/tty/n_gsm.c @@ -42,6 +42,7 @@ #include <linux/ctype.h> #include <linux/mm.h> #include <linux/math.h> +#include <linux/nospec.h> #include <linux/string.h> #include <linux/sl...
3fac2397f562eb669ddc2f45867a253f3fc26184
Analyze and fix the following issue in the Linux kernel code: staging: rtl8192e: Fix W_DISABLE# does not work after stop/start
Problem Details: When loading the driver for rtl8192e, the W_DISABLE# switch is working as intended. But when the WLAN is turned off in software and then turned on again the W_DISABLE# does not work anymore. Reason for this is that in the function _rtl92e_dm_check_rf_ctrl_gpio() the bfirst_after_down is checked and ret...
```diff diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index 4cf84b5666a7..27040d1e3230 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -645,6 +645,7 @@ static int _rtl92e_sta_up(struct net_device *...
be3206e8906e7a93df673ab2e96d69304a008edc
Analyze and fix the following issue in the Linux kernel code: spi: cadence-quadspi: use macro DEFINE_SIMPLE_DEV_PM_OPS
Problem Details: Using this macro makes the code more readable. It also inits the members of dev_pm_ops in the following manner without us explicitly needing to: .suspend = cqspi_suspend, \ .resume = cqspi_resume, \ .freeze = cqspi_suspend, \ .thaw = cqspi_resume, \ .poweroff = cqspi_suspend, \ .restore = cqspi_resume...
```diff diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c index 53829eb5eca0..6ddb2dfc0f00 100644 --- a/drivers/spi/spi-cadence-quadspi.c +++ b/drivers/spi/spi-cadence-quadspi.c @@ -1820,7 +1820,6 @@ static void cqspi_remove(struct platform_device *pdev) pm_runtime_disable(&pdev->dev)...
f06c2a9000ebecbb461196e59ce063f742272902
Analyze and fix the following issue in the Linux kernel code: tty: serial: sh-sci: Fix end of transmission on SCI
Problem Details: We need to set TE to "0" (i.e., disable serial transmission) to get the expected behavior of the end of serial transmission. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Link: https://lore.kernel.org/r/20230412145053.114847-6-biju.das.jz@bp.renesas.com Signed-off-by: Greg Kroah-Hartman <gregkh...
```diff diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index 5c9ae69c0555..7c9457962a3d 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -847,6 +847,11 @@ static void sci_transmit_chars(struct uart_port *port) } else if (!uart_circ_empty(xmit) && !stopped) { c...
1707ce2d1e4d701db28ba2250d9d72dcf762babc
Analyze and fix the following issue in the Linux kernel code: tty: serial: sh-sci: Fix TE setting on SCI IP
Problem Details: As per the RZ/G2L users hardware manual (Rev.1.20 Sep, 2022), section 23.3.7 Serial Data Transmission (Asynchronous Mode) it is mentioned that the TE (transmit enable) must be set after setting TIE (transmit interrupt enable) or these 2 bits are set to 1 simultaneously by a single instruction. So set t...
```diff diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index 15743c2f3d3d..32f5c1f7d697 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -601,6 +601,15 @@ static void sci_start_tx(struct uart_port *port) port->type == PORT_SCIFA || port->type == PORT_SCIFB) { ...
3f42b142ea1171967e40e10e4b0241c0d6d28d41
Analyze and fix the following issue in the Linux kernel code: serial: max310x: fix IO data corruption in batched operations
Problem Details: After upgrading from 5.16 to 6.1, our board with a MAX14830 started producing lots of garbage data over UART. Bisection pointed out commit 285e76fc049c as the culprit. That patch tried to replace hand-written code which I added in 2b4bac48c1084 ("serial: max310x: Use batched reads when reasonably safe"...
```diff diff --git a/drivers/tty/serial/max310x.c b/drivers/tty/serial/max310x.c index e9cacfe7e032..9fee722058f4 100644 --- a/drivers/tty/serial/max310x.c +++ b/drivers/tty/serial/max310x.c @@ -525,6 +525,11 @@ static bool max310x_reg_precious(struct device *dev, unsigned int reg) return false; } +static bool max...
04e82793f068d2f0ffe62fcea03d007a8cdc16a7
Analyze and fix the following issue in the Linux kernel code: serial: 8250: Reinit port->pm on port specific driver unbind
Problem Details: When we unbind a serial port hardware specific 8250 driver, the generic serial8250 driver takes over the port. After that we see an oops about 10 seconds later. This can produce the following at least on some TI SoCs: Unhandled fault: imprecise external abort (0x1406) Internal error: : 1406 [#1] SMP A...
```diff diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c index ab63c308be0a..13bf535eedcd 100644 --- a/drivers/tty/serial/8250/8250_core.c +++ b/drivers/tty/serial/8250/8250_core.c @@ -1158,6 +1158,7 @@ void serial8250_unregister_port(int line) uart->port.type = PORT_UNKNOWN; ...
0ba9e3a13c6adfa99e32b2576d20820ab10ad48a
Analyze and fix the following issue in the Linux kernel code: serial: 8250: Add missing wakeup event reporting
Problem Details: An 8250 UART configured as a wake-up source would not have reported itself through sysfs as being the source of wake-up, correct that. Fixes: b3b708fa2780 ("wake up from a serial port") Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Link: https://lore.kernel.org/r/20230414170241.2016255-1-f.fa...
```diff diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c index dfbc501cf9d1..fe8d79c4ae95 100644 --- a/drivers/tty/serial/8250/8250_port.c +++ b/drivers/tty/serial/8250/8250_port.c @@ -15,6 +15,7 @@ #include <linux/moduleparam.h> #include <linux/ioport.h> #include <linux/init.h>...
f73fd750552524b06b5d77ebfdd106ccc8fcac61
Analyze and fix the following issue in the Linux kernel code: tty: serial: fsl_lpuart: adjust buffer length to the intended size
Problem Details: Based on the fls function definition provided below, we should not subtract 1 to obtain the correct buffer length: fls(0) = 0, fls(1) = 1, fls(0x80000000) = 32. Fixes: 5887ad43ee02 ("tty: serial: fsl_lpuart: Use cyclic DMA for Rx") Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com> Link: https://lore...
```diff diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index 074bfed57fc9..aef9be3e73c1 100644 --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c @@ -1296,7 +1296,7 @@ static inline int lpuart_start_rx_dma(struct lpuart_port *sport) * 10ms at any baud rate. ...
9e4f2a8004213339e9d837d891a59cc80e082966
Analyze and fix the following issue in the Linux kernel code: serial: fix TIOCSRS485 locking
Problem Details: The RS485 multipoint addressing support for some reason added a new ADDRB termios cflag which is (only!) updated from one of the RS485 ioctls. Make sure to take the termios rw semaphore for the right ioctl (i.e. set, not get). Fixes: ae50bb275283 ("serial: take termios_rwsem for ->rs485_config() & pa...
```diff diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index afafbb7edb4a..59b62fa2e287 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -1549,7 +1549,7 @@ uart_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg) goto out; /*...
254d5a59464eea1324353d84c0f614c413e8e54f
Analyze and fix the following issue in the Linux kernel code: tty: n_gsm: fix redundant assignment of gsm->encoding
Problem Details: The function gsmld_open() contains a redundant assignment of gsm->encoding. The same value of GSM_ADV_OPT is already assigned to it during the initialization of the struct in gsm_alloc_mux() a few lines earlier. Fix this by removing the redundant second assignment of gsm->encoding in gsmld_open(). Fi...
```diff diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c index b7e1369a035c..c42c8b89fd46 100644 --- a/drivers/tty/n_gsm.c +++ b/drivers/tty/n_gsm.c @@ -3585,7 +3585,6 @@ static int gsmld_open(struct tty_struct *tty) tty->receive_room = 65536; /* Attach the initial passive connection */ - gsm->encoding = GS...
edd4cab2d492daa5e45bd45e44084a2b9880f224
Analyze and fix the following issue in the Linux kernel code: perf test: Fix maps use after put
Problem Details: Fix a use after put reference count issue. maps is copied from leader, but the leader is put on line 79 and then maps is used to read the reference count below - so a use after put, with the put of maps happening within thread__put. Fix by reversing the order of puts so that the leader is put last. To...
```diff diff --git a/tools/perf/tests/thread-maps-share.c b/tools/perf/tests/thread-maps-share.c index 75ce8aedfc78..858e725318a9 100644 --- a/tools/perf/tests/thread-maps-share.c +++ b/tools/perf/tests/thread-maps-share.c @@ -76,16 +76,16 @@ static int test__thread_maps_share(struct test_suite *test __maybe_unused, in...
22b68fc6d693e7a2b1c0eb852463f4a72522fa08
Analyze and fix the following issue in the Linux kernel code: wifi: iwlwifi: mvm: fix RFKILL report when driver is going down
Problem Details: When CSME takes ownership, the driver sets RFKILL on, and this triggers driver unload and sending the confirmation SAP message. However, when IWL_MVM_MEI_REPORT_RFKILL is set, RFKILL was not reported and as a result, the driver did not confirm the ownership transition. Fix it. Signed-off-by: Avraham S...
```diff diff --git a/drivers/net/wireless/intel/iwlwifi/mei/iwl-mei.h b/drivers/net/wireless/intel/iwlwifi/mei/iwl-mei.h index ae66192feefe..655d95d3a068 100644 --- a/drivers/net/wireless/intel/iwlwifi/mei/iwl-mei.h +++ b/drivers/net/wireless/intel/iwlwifi/mei/iwl-mei.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-...
457d7fb03e6c3d73fbb509bd85fc4b02d1ab405e
Analyze and fix the following issue in the Linux kernel code: wifi: iwlwifi: mvm: fix potential memory leak
Problem Details: If we do get multiple notifications from firmware, then we might have allocated 'notif', but don't free it. Fix that by checking for duplicates before allocation. Fixes: 4da46a06d443 ("wifi: iwlwifi: mvm: Add support for wowlan info notification") Signed-off-by: Johannes Berg <johannes.berg@intel.com>...
```diff diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c index 798a7a1299e1..37aa4676dc94 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c @@ -2722,6 +2722,13 @@ static bool iwl_mvm_wait_d3_notif(struct iwl_n...
f4d4ba4613dc92a58a8c051f7b6bcb0276b1fecc
Analyze and fix the following issue in the Linux kernel code: wifi: iwlwifi: fw: fix argument to efi.get_variable
Problem Details: We should pass the newly allocated data to fill. Signed-off-by: Alon Giladi <alon.giladi@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230418122405.aaa6d8874442.I734841c71aad9564cb22c50f2737aaff489fadaf@changeid Signed-off-by: Johannes Berg <...
```diff diff --git a/drivers/net/wireless/intel/iwlwifi/fw/uefi.c b/drivers/net/wireless/intel/iwlwifi/fw/uefi.c index 0b6f694cf30d..01afea33c38c 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/uefi.c +++ b/drivers/net/wireless/intel/iwlwifi/fw/uefi.c @@ -222,7 +222,7 @@ void *iwl_uefi_get_reduced_power(struct iwl_t...
7b41a99ce2d494d01e8fcb25e7113f143a0f2155
Analyze and fix the following issue in the Linux kernel code: wifi: iwlwifi: mvm: fix MIC removal confusion
Problem Details: The RADA/firmware collaborate on MIC stripping in the following way: - the firmware fills the IWL_RX_MPDU_MFLG1_MIC_CRC_LEN_MASK value for how many words need to be removed at the end of the frame, CRC and, if decryption was done, MIC - if the RADA is active, it will - remove that much from ...
```diff diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c index 9dbf14fa0ca7..542f6658f2d4 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c @@ -106,28 +106,12 @@ static int iwl_mvm_create_skb(struct iw...
3d90d2f4a018fe8cfd65068bc6350b6222be4852
Analyze and fix the following issue in the Linux kernel code: wifi: iwlwifi: fw: fix memory leak in debugfs
Problem Details: Fix a memory leak that occurs when reading the fw_info file all the way, since we return NULL indicating no more data, but don't free the status tracking object. Fixes: 36dfe9ac6e8b ("iwlwifi: dump api version in yaml format") Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Grego...
```diff diff --git a/drivers/net/wireless/intel/iwlwifi/fw/debugfs.c b/drivers/net/wireless/intel/iwlwifi/fw/debugfs.c index 43e997283db0..607e07ed2477 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/debugfs.c +++ b/drivers/net/wireless/intel/iwlwifi/fw/debugfs.c @@ -317,8 +317,10 @@ static void *iwl_dbgfs_fw_info_s...
e1d6ca042e62c2a69513235f8629eb6e62ca79c5
Analyze and fix the following issue in the Linux kernel code: firmware: stratix10-svc: Fix an NULL vs IS_ERR() bug in probe
Problem Details: The svc_create_memory_pool() function returns error pointers. It never returns NULL. Fix the check. Fixes: 7ca5ce896524 ("firmware: add Intel Stratix10 service layer driver") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/5f9a8cb4-5a4f-460b-9cdc-2fae6c5b7922@...
```diff diff --git a/drivers/firmware/stratix10-svc.c b/drivers/firmware/stratix10-svc.c index bde1f543f529..80f4e2d14e04 100644 --- a/drivers/firmware/stratix10-svc.c +++ b/drivers/firmware/stratix10-svc.c @@ -1133,8 +1133,8 @@ static int stratix10_svc_drv_probe(struct platform_device *pdev) return ret; genpool...
76e31045ba030e94e72105c01b2e98f543d175ac
Analyze and fix the following issue in the Linux kernel code: media: radio-shark: Add endpoint checks
Problem Details: The syzbot fuzzer was able to provoke a WARNING from the radio-shark2 driver: ------------[ cut here ]------------ usb 1-1: BOGUS urb xfer, pipe 1 != type 3 WARNING: CPU: 0 PID: 3271 at drivers/usb/core/urb.c:504 usb_submit_urb+0xed2/0x1880 drivers/usb/core/urb.c:504 Modules linked in: CPU: 0 PID: 327...
```diff diff --git a/drivers/media/radio/radio-shark.c b/drivers/media/radio/radio-shark.c index 8230da828d0e..127a3be0e0f0 100644 --- a/drivers/media/radio/radio-shark.c +++ b/drivers/media/radio/radio-shark.c @@ -316,6 +316,16 @@ static int usb_shark_probe(struct usb_interface *intf, { struct shark_device *shark; ...
df05a9b05e466a46725564528b277d0c570d0104
Analyze and fix the following issue in the Linux kernel code: USB: sisusbvga: Add endpoint checks
Problem Details: The syzbot fuzzer was able to provoke a WARNING from the sisusbvga driver: ------------[ cut here ]------------ usb 1-1: BOGUS urb xfer, pipe 3 != type 1 WARNING: CPU: 1 PID: 26 at drivers/usb/core/urb.c:504 usb_submit_urb+0xed6/0x1880 drivers/usb/core/urb.c:504 Modules linked in: CPU: 1 PID: 26 Comm:...
```diff diff --git a/drivers/usb/misc/sisusbvga/sisusbvga.c b/drivers/usb/misc/sisusbvga/sisusbvga.c index 654a79fd3231..febf34f9f049 100644 --- a/drivers/usb/misc/sisusbvga/sisusbvga.c +++ b/drivers/usb/misc/sisusbvga/sisusbvga.c @@ -2778,6 +2778,20 @@ static int sisusb_probe(struct usb_interface *intf, struct usb_d...
bedee105bf4a072294af068d89ec2d2bb5f457ae
Analyze and fix the following issue in the Linux kernel code: firmware_loader: rework crypto dependencies
Problem Details: The crypto dependencies for the firmwware loader are incomplete, in particular a built-in FW_LOADER fails to link against a modular crypto hash driver: ld.lld: error: undefined symbol: crypto_alloc_shash ld.lld: error: undefined symbol: crypto_shash_digest ld.lld: error: undefined symbol: crypto_destr...
```diff diff --git a/drivers/base/firmware_loader/Kconfig b/drivers/base/firmware_loader/Kconfig index 0cabc783d67a..5ca00e02fe82 100644 --- a/drivers/base/firmware_loader/Kconfig +++ b/drivers/base/firmware_loader/Kconfig @@ -3,6 +3,8 @@ menu "Firmware loader" config FW_LOADER tristate "Firmware loading facility"...
495ff36388e8b71eb49e9242c8e04e06c5609e74
Analyze and fix the following issue in the Linux kernel code: firmware_loader: Strip off \n from customized path
Problem Details: Having helped an user recently figure out why the customized path being specified was not taken into account landed on a subtle difference between using: echo "/xyz/firmware" > /sys/module/firmware_class/parameters/path which inserts an additional newline which is passed as is down to fw_get_filesyst...
```diff diff --git a/drivers/base/firmware_loader/main.c b/drivers/base/firmware_loader/main.c index b2c292ca95e8..9d79d5ad9102 100644 --- a/drivers/base/firmware_loader/main.c +++ b/drivers/base/firmware_loader/main.c @@ -493,9 +493,9 @@ fw_get_filesystem_firmware(struct device *device, struct fw_priv *fw_priv, ...
02435a739b81ae24aff5d6e930efef9458e2af3c
Analyze and fix the following issue in the Linux kernel code: usb: dwc3: gadget: Stall and restart EP0 if host is unresponsive
Problem Details: It was observed that there are hosts that may complete pending SETUP transactions before the stop active transfers and controller halt occurs, leading to lingering endxfer commands on DEPs on subsequent pullup/gadget start iterations. dwc3_gadget_ep_disable name=ep8in flags=0x3009 direction=1 d...
```diff diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 087efbad94f7..9f492c8a7d0b 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -2617,29 +2617,17 @@ static int __dwc3_gadget_start(struct dwc3 *dwc); static int dwc3_gadget_soft_disconnect(struct dwc3 *dwc) { unsi...
d28f4091ea7ec3510fd6a3c6d433234e7a2bef14
Analyze and fix the following issue in the Linux kernel code: usb: mtu3: fix kernel panic at qmu transfer done irq handler
Problem Details: When handle qmu transfer irq, it will unlock @mtu->lock before give back request, if another thread handle disconnect event at the same time, and try to disable ep, it may lock @mtu->lock and free qmu ring, then qmu irq hanlder may get a NULL gpd, avoid the KE by checking gpd's value before handling it...
```diff diff --git a/drivers/usb/mtu3/mtu3_qmu.c b/drivers/usb/mtu3/mtu3_qmu.c index 6be4977a5db5..3d77408e3133 100644 --- a/drivers/usb/mtu3/mtu3_qmu.c +++ b/drivers/usb/mtu3/mtu3_qmu.c @@ -210,6 +210,7 @@ static struct qmu_gpd *advance_enq_gpd(struct mtu3_gpd_ring *ring) return ring->enqueue; } +/* @dequeue may ...
d6f712f53b79f5017cdcefafb7a5aea9ec52da5d
Analyze and fix the following issue in the Linux kernel code: usb: chipidea: fix missing goto in `ci_hdrc_probe`
Problem Details: From the comment of ci_usb_phy_init, it returns an error code if usb_phy_init has failed, and it should do some clean up, not just return directly. Fix this by goto the error handling. Fixes: 74475ede784d ("usb: chipidea: move PHY operation to core") Reviewed-by: Dongliang Mu <dzm91@hust.edu.cn> Acke...
```diff diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c index d1d252c87e4f..798cb077867a 100644 --- a/drivers/usb/chipidea/core.c +++ b/drivers/usb/chipidea/core.c @@ -1108,7 +1108,7 @@ static int ci_hdrc_probe(struct platform_device *pdev) ret = ci_usb_phy_init(ci); if (ret) { dev_err(dev...
a3afbf5cc887fc3401f012fe629810998ed61859
Analyze and fix the following issue in the Linux kernel code: usb: gadget: udc: core: Prevent redundant calls to pullup
Problem Details: usb_gadget_connect calls gadget->ops->pullup without checking whether gadget->connected was previously set. Make this symmetric to usb_gadget_disconnect by returning early if gadget->connected is already set. Fixes: 5a1da544e572 ("usb: gadget: core: do not try to disconnect gadget if it is not connect...
```diff diff --git a/drivers/usb/gadget/udc/core.c b/drivers/usb/gadget/udc/core.c index af92c2e8e10c..1c5403ce9e7c 100644 --- a/drivers/usb/gadget/udc/core.c +++ b/drivers/usb/gadget/udc/core.c @@ -703,6 +703,9 @@ static int usb_gadget_connect_locked(struct usb_gadget *gadget) goto out; } + if (gadget->connecte...
0db213ea8eed5534a5169e807f28103cbc9d23df
Analyze and fix the following issue in the Linux kernel code: usb: gadget: udc: core: Invoke usb_gadget_connect only when started
Problem Details: usb_udc_connect_control does not check to see if the udc has already been started. This causes gadget->ops->pullup to be called through usb_gadget_connect when invoked from usb_udc_vbus_handler even before usb_gadget_udc_start is called. Guard this by checking for udc->started in usb_udc_connect_contro...
```diff diff --git a/drivers/usb/gadget/udc/core.c b/drivers/usb/gadget/udc/core.c index 3dcbba739db6..af92c2e8e10c 100644 --- a/drivers/usb/gadget/udc/core.c +++ b/drivers/usb/gadget/udc/core.c @@ -37,6 +37,10 @@ static struct bus_type gadget_bus_type; * @vbus: for udcs who care about vbus status, this value is real...
dac3b192107b978198e89ec0f77375738352e0c8
Analyze and fix the following issue in the Linux kernel code: usb: typec: tcpm: fix multiple times discover svids error
Problem Details: PD3.0 Spec 6.4.4.3.2 say that only Responder supports 12 or more SVIDs, the Discover SVIDs Command Shall be executed multiple times until a Discover SVIDs VDO is returned ending either with a SVID value of 0x0000 in the last part of the last VDO or with a VDO containing two SVIDs with values of 0x0000....
```diff diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c index 4e276d2f15d1..3c6b0c8e2d3a 100644 --- a/drivers/usb/typec/tcpm/tcpm.c +++ b/drivers/usb/typec/tcpm/tcpm.c @@ -1523,7 +1523,21 @@ static bool svdm_consume_svids(struct tcpm_port *port, const u32 *p, int cnt) pmdata->svids[pmdata-...
44d257e9012ee8040e41d224d0e5bfb5ef5427ea
Analyze and fix the following issue in the Linux kernel code: USB: dwc3: fix runtime pm imbalance on unbind
Problem Details: Make sure to balance the runtime PM usage count on driver unbind by adding back the pm_runtime_allow() call that had been erroneously removed. Fixes: 266d0493900a ("usb: dwc3: core: don't trigger runtime pm when remove driver") Cc: stable@vger.kernel.org # 5.9 Cc: Li Jun <jun.li@nxp.com> Acked-by: Thi...
```diff diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index d2350a87450e..ad48b7ebd880 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -1991,6 +1991,7 @@ static int dwc3_remove(struct platform_device *pdev) dwc3_core_exit(dwc); dwc3_ulpi_exit(dwc); + pm_runtime_allow(&pdev->...
9a8ad10c9f2e0925ff26308ec6756b93fc2f4977
Analyze and fix the following issue in the Linux kernel code: USB: dwc3: fix runtime pm imbalance on probe errors
Problem Details: Make sure not to suspend the device when probe fails to avoid disabling clocks and phys multiple times. Fixes: 328082376aea ("usb: dwc3: fix runtime PM in error path") Cc: stable@vger.kernel.org # 4.8 Cc: Roger Quadros <rogerq@ti.com> Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Signed-off-...
```diff diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index ed0ab90d3fac..d2350a87450e 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -1895,13 +1895,11 @@ static int dwc3_probe(struct platform_device *pdev) spin_lock_init(&dwc->lock); mutex_init(&dwc->mutex); + pm_runtime_g...
735baf1b23458f71a8b15cb924af22c9ff9cd125
Analyze and fix the following issue in the Linux kernel code: xhci: fix debugfs register accesses while suspended
Problem Details: Wire up the debugfs regset device pointer so that the controller is resumed before accessing registers to avoid crashing or locking up if it happens to be runtime suspended. Fixes: 02b6fdc2a153 ("usb: xhci: Add debugfs interface for xHCI driver") Cc: stable@vger.kernel.org # 4.15: 30332eeefec8: debugf...
```diff diff --git a/drivers/usb/host/xhci-debugfs.c b/drivers/usb/host/xhci-debugfs.c index 0bc7fe11f749..99baa60ef50f 100644 --- a/drivers/usb/host/xhci-debugfs.c +++ b/drivers/usb/host/xhci-debugfs.c @@ -133,6 +133,7 @@ static void xhci_debugfs_regset(struct xhci_hcd *xhci, u32 base, regset->regs = regs; regset-...
a189884bdc9238aeba941c50f02e25eb584fafed
Analyze and fix the following issue in the Linux kernel code: KVM: arm64: Have kvm_psci_vcpu_on() use WRITE_ONCE() to update mp_state
Problem Details: All accessors of kvm_vcpu_arch::mp_state should be {READ,WRITE}_ONCE(), since readers of the mp_state don't acquire the mp_state_lock. Nonetheless, kvm_psci_vcpu_on() updates the mp_state without using WRITE_ONCE(). So, fix the code to update the mp_state using WRITE_ONCE. Signed-off-by: Reiji Watanab...
```diff diff --git a/arch/arm64/kvm/psci.c b/arch/arm64/kvm/psci.c index 5767e6baa61a..d046e82e3723 100644 --- a/arch/arm64/kvm/psci.c +++ b/arch/arm64/kvm/psci.c @@ -110,7 +110,7 @@ static unsigned long kvm_psci_vcpu_on(struct kvm_vcpu *source_vcpu) */ smp_wmb(); - vcpu->arch.mp_state.mp_state = KVM_MP_STATE_RU...
4ff910be01c0ca28c2ea8b354dd47a3a17524489
Analyze and fix the following issue in the Linux kernel code: KVM: arm64: Acquire mp_state_lock in kvm_arch_vcpu_ioctl_vcpu_init()
Problem Details: kvm_arch_vcpu_ioctl_vcpu_init() doesn't acquire mp_state_lock when setting the mp_state to KVM_MP_STATE_RUNNABLE. Fix the code to acquire the lock. Signed-off-by: Reiji Watanabe <reijiw@google.com> [maz: minor refactor] Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20230...
```diff diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c index fd8d355aca15..ad3655a7d122 100644 --- a/arch/arm64/kvm/arm.c +++ b/arch/arm64/kvm/arm.c @@ -1241,11 +1241,15 @@ static int kvm_arch_vcpu_ioctl_vcpu_init(struct kvm_vcpu *vcpu, /* * Handle the "start in power-off" case. */ + spin_lock(&vcpu->...
d77f0ecdac62968ec99a18deff3d91b453974b9c
Analyze and fix the following issue in the Linux kernel code: arch/parisc: Remove trailing whitespaces
Problem Details: Fix trailing whitespaces. No functional changes. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com> Cc: Helge Deller <deller@gmx.de> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Helge Deller <deller@gmx.de> Link: https://patch...
```diff diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile index a2d8600521f9..0d049a6f6a60 100644 --- a/arch/parisc/Makefile +++ b/arch/parisc/Makefile @@ -11,7 +11,7 @@ # Copyright (C) 1994 by Linus Torvalds # Portions Copyright (C) 1999 The Puffin Group # -# Modified for PA-RISC Linux by Paul Lahaie, Alex d...
0d556f1f0e01ccab9c6bca8099e45170beb01297
Analyze and fix the following issue in the Linux kernel code: video: Remove trailing whitespaces
Problem Details: Fix trailing whitespaces. No functional changes. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Helge Deller <deller@gmx.de> Link: https://patchwork.freedesktop.org/patch/msgid/20230417125651.25126-11-tzimmermann@suse.de
```diff diff --git a/drivers/video/console/sticon.c b/drivers/video/console/sticon.c index 2cea69418a83..89ad7ade6cf9 100644 --- a/drivers/video/console/sticon.c +++ b/drivers/video/console/sticon.c @@ -282,7 +282,7 @@ static void sticon_init(struct vc_data *c, int init) vc_cols = sti_onscreen_x(sti) / sti->font->...
5629d31955297ca47b9283c64fff70f2f34aa528
Analyze and fix the following issue in the Linux kernel code: usb: gadget: tegra-xudc: Fix crash in vbus_draw
Problem Details: Commit ac82b56bda5f ("usb: gadget: tegra-xudc: Add vbus_draw support") populated the vbus_draw callback for the Tegra XUDC driver. The function tegra_xudc_gadget_vbus_draw(), that was added by this commit, assumes that the pointer 'curr_usbphy' has been initialised, which is not always the case because...
```diff diff --git a/drivers/usb/gadget/udc/tegra-xudc.c b/drivers/usb/gadget/udc/tegra-xudc.c index 2b71b33725f1..5bccd64847ff 100644 --- a/drivers/usb/gadget/udc/tegra-xudc.c +++ b/drivers/usb/gadget/udc/tegra-xudc.c @@ -2167,7 +2167,7 @@ static int tegra_xudc_gadget_vbus_draw(struct usb_gadget *gadget, dev_dbg(x...
927cdea5d2095287ddd5246e5aa68eb5d68db2be
Analyze and fix the following issue in the Linux kernel code: net: bridge: switchdev: don't notify FDB entries with "master dynamic"
Problem Details: There is a structural problem in switchdev, where the flag bits in struct switchdev_notifier_fdb_info (added_by_user, is_local etc) only represent a simplified / denatured view of what's in struct net_bridge_fdb_entry :: flags (BR_FDB_ADDED_BY_USER, BR_FDB_LOCAL etc). Each time we want to pass more inf...
```diff diff --git a/net/bridge/br_switchdev.c b/net/bridge/br_switchdev.c index de18e9c1d7a7..ba95c4d74a60 100644 --- a/net/bridge/br_switchdev.c +++ b/net/bridge/br_switchdev.c @@ -148,6 +148,17 @@ br_switchdev_fdb_notify(struct net_bridge *br, if (test_bit(BR_FDB_LOCKED, &fdb->flags)) return; + /* Entries wit...
2ae147d643d326f74d93ba4f72a405f25f2677ea
Analyze and fix the following issue in the Linux kernel code: ALSA: hda/realtek: fix mute/micmute LEDs for a HP ProBook
Problem Details: There is a HP ProBook 455 G10 which using ALC236 codec and need the ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF quirk to make mute LED and micmute LED work. Signed-off-by: Andy Chi <andy.chi@canonical.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20230420035942.66817-1-andy.chi@canonical...
```diff diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 6a6c72b5ea26..f70d6a33421d 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -9468,6 +9468,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x103c, 0x8b47, "HP", ALC245_F...
8ae56b4e82ee29b5cc1fbea8b00a0a7e0758f3c2
Analyze and fix the following issue in the Linux kernel code: ext4: remove unneeded check of nr_to_submit
Problem Details: cppcheck reports fs/ext4/page-io.c:516:51: style: Condition 'nr_to_submit' is always true [knownConditionTrueFalse] if (fscrypt_inode_uses_fs_layer_crypto(inode) && nr_to_submit) { ^ This earlier check to bail, makes this check unncessary /* Nothing...
```diff diff --git a/fs/ext4/page-io.c b/fs/ext4/page-io.c index 2e5e94219693..3621f29ec671 100644 --- a/fs/ext4/page-io.c +++ b/fs/ext4/page-io.c @@ -510,7 +510,7 @@ int ext4_bio_write_folio(struct ext4_io_submit *io, struct folio *folio, * (e.g. holes) to be unnecessarily encrypted, but this is rare and * can't...
228c7a95534b438859d6cc068691164bd705a9c8
Analyze and fix the following issue in the Linux kernel code: powerpc/Makefile: Don't prefix archhelp commands with "@"
Problem Details: It's not necessary to prefix every command in archhelp with "@" (to suppress echoing the command), because that is done by the top level Makefile when it evaluates archhelp. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20230329072334.2023357-1-mpe@ellerman.id.au
```diff diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 5f47f2ce7cc3..15c5f4c06614 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile @@ -332,25 +332,25 @@ ppc64_randconfig: -f $(srctree)/Makefile randconfig define archhelp - @echo '* zImage - Build default images selected b...
6fee130204650515af80c2786176da0fe7e94482
Analyze and fix the following issue in the Linux kernel code: powerpc/64: Don't call trace_hardirqs_on() in prep_irq_for_idle()
Problem Details: Since commit a01353cf1896 ("cpuidle: Fix ct_idle_*() usage"), the cpuidle entry code calls trace_hardirqs_on() (actually trace_hardirqs_on_prepare()) in ct_cpuidle_enter() before calling into the cpuidle driver. Suggested-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Michael Ellerman <mpe@e...
```diff diff --git a/arch/powerpc/kernel/irq_64.c b/arch/powerpc/kernel/irq_64.c index 2ab0e8d84c1d..938e66829eae 100644 --- a/arch/powerpc/kernel/irq_64.c +++ b/arch/powerpc/kernel/irq_64.c @@ -348,9 +348,8 @@ EXPORT_SYMBOL(arch_local_irq_restore); * already the case when ppc_md.power_save is called). The function ...
7e3a68be42e10f5fa5890e97afc0afd992355bc3
Analyze and fix the following issue in the Linux kernel code: powerpc/64: vmlinux support building with PCREL addresing
Problem Details: PC-Relative or PCREL addressing is an extension to the ELF ABI which uses Power ISA v3.1 PC-relative instructions to calculate addresses, rather than the traditional TOC scheme. Add an option to build vmlinux using pcrel addressing. Modules continue to use TOC addressing. - TOC address helpers and r2...
```diff diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 109c00bd91db..873eaa888a70 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -7,6 +7,9 @@ config CC_HAS_ELFV2 config CC_HAS_PREFIXED def_bool PPC64 && $(cc-option, -mcpu=power10 -mprefixed) +config CC_HAS_PCREL + def_bool PPC64 &&...
4e991e3c16a350d1eeffc100ce3fb25292596d03
Analyze and fix the following issue in the Linux kernel code: powerpc: add CFUNC assembly label annotation
Problem Details: This macro is to be used in assembly where C functions are called. pcrel addressing mode requires branches to functions with a localentry value of 1 to have either a trailing nop or @notoc. This macro permits the latter without changing callers. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> [mpe:...
```diff diff --git a/arch/powerpc/include/asm/ppc_asm.h b/arch/powerpc/include/asm/ppc_asm.h index 1f1a64b780e3..f08b7990a69d 100644 --- a/arch/powerpc/include/asm/ppc_asm.h +++ b/arch/powerpc/include/asm/ppc_asm.h @@ -180,6 +180,11 @@ #ifdef __KERNEL__ +/* + * Used to name C functions called from asm + */ +#defin...
92189c902c2e2f8c0d4238310686e93da99156b5
Analyze and fix the following issue in the Linux kernel code: powerpc/85xx: mpc85xx_ds: Move i8259 code into own file
Problem Details: In order to share mpc85xx i8259 code between DS and P2020. Prefix i8259 debug and error messages by i8259 word. Signed-off-by: Pali Rohár <pali@kernel.org> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> [mpe: Fix some coding style warnings in the moved code] Signed-off-by: Michael Eller...
```diff diff --git a/arch/powerpc/platforms/85xx/Makefile b/arch/powerpc/platforms/85xx/Makefile index 93451850ed83..0a0011e8c63c 100644 --- a/arch/powerpc/platforms/85xx/Makefile +++ b/arch/powerpc/platforms/85xx/Makefile @@ -16,7 +16,8 @@ obj-$(CONFIG_MPC8540_ADS) += mpc85xx_ads.o obj-$(CONFIG_MPC8560_ADS) += mpc85x...
f52cc627b832e08a7bcf1b7e81e650ec308fe1d8
Analyze and fix the following issue in the Linux kernel code: Revert "net/mlx5: Enable management PF initialization"
Problem Details: This reverts commit fe998a3c77b9f989a30a2a01fb00d3729a6d53a4. Paul reports that it causes a regression with IB on CX4 and FW 12.18.1000. In addition I think that the concept of "management PF" is not fully accepted and requires a discussion. Fixes: fe998a3c77b9 ("net/mlx5: Enable management PF initia...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/dev.c b/drivers/net/ethernet/mellanox/mlx5/core/dev.c index 445fe30c3d0b..2e7806001fdc 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/dev.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/dev.c @@ -59,9 +59,6 @@ bool mlx5_eth_supported(struct mlx5_core_de...
84ce730f82dfe62f6f3e76b059ce0f7178322fb9
Analyze and fix the following issue in the Linux kernel code: dt-bindings: net: ethernet: Fix JSON pointer references
Problem Details: A JSON pointer reference (the part after the "#") must start with a "/". Conversely, references to the entire document must not have a trailing "/" and should be just a "#". The existing jsonschema package allows these, but coming changes make allowed "$ref" URIs stricter and throw errors on these refe...
```diff diff --git a/Documentation/devicetree/bindings/net/ethernet-controller.yaml b/Documentation/devicetree/bindings/net/ethernet-controller.yaml index ebc2646ab5ff..6b0d359367da 100644 --- a/Documentation/devicetree/bindings/net/ethernet-controller.yaml +++ b/Documentation/devicetree/bindings/net/ethernet-controlle...
67d47b95119ad589b0a0b16b88b1dd9a04061ced
Analyze and fix the following issue in the Linux kernel code: e1000e: Disable TSO on i219-LM card to increase speed
Problem Details: While using i219-LM card currently it was only possible to achieve about 60% of maximum speed due to regression introduced in Linux 5.8. This was caused by TSO not being disabled by default despite commit f29801030ac6 ("e1000e: Disable TSO for buffer overrun workaround"). Fix that by disabling TSO duri...
```diff diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c index e1eb1de88bf9..e14d1e45318f 100644 --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c @@ -5288,31 +5288,6 @@ static void e1000_watchdog_task(struct work_struct...
8c154d272c3e03b100baaf1df473f22a78fa403e
Analyze and fix the following issue in the Linux kernel code: bnxt_en: fix free-runnig PHC mode
Problem Details: The patch in fixes changed the way real-time mode is chosen for PHC on the NIC. Apparently there is one more use case of the check outside of ptp part of the driver which was not converted to the new macro and is making a lot of noise in free-running mode. Fixes: 131db4991622 ("bnxt_en: reset PHC freq...
```diff diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index ef97a4190b39..651b79ce5d80 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -2388,7 +2388,7 @@ static int bnxt_async_event_process(struct bnxt *bp, ...
91daa4f62ce878b6e1ac5908aceb83550332447f
Analyze and fix the following issue in the Linux kernel code: net: dsa: mt7530: fix support for MT7531BE
Problem Details: There are two variants of the MT7531 switch IC which got different features (and pins) regarding port 5: * MT7531AE: SGMII/1000Base-X/2500Base-X SerDes PCS * MT7531BE: RGMII Moving the creation of the SerDes PCS from mt753x_setup to mt7530_probe with commit 6de285229773 ("net: dsa: mt7530: move SGMI...
```diff diff --git a/drivers/net/dsa/mt7530-mdio.c b/drivers/net/dsa/mt7530-mdio.c index 34a547b88e49..088533663b83 100644 --- a/drivers/net/dsa/mt7530-mdio.c +++ b/drivers/net/dsa/mt7530-mdio.c @@ -81,14 +81,17 @@ static const struct regmap_bus mt7530_regmap_bus = { }; static int -mt7531_create_sgmii(struct mt7530...