id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
feb301c60970bd2a1310a53ce2d6e4375397a51b
Analyze and fix the following issue in the Linux kernel code: Revert "cgroup: Fix memory leak caused by missing cgroup_bpf_offline"
Problem Details: This reverts commit 04f8ef5643bcd8bcde25dfdebef998aea480b2ba. Only cgroup v2 can be attached by cgroup by BPF programs. Revert this commit and cgroup_bpf_inherit and cgroup_bpf_offline won't be called in cgroup v1. The memory leak issue will be fixed with next patch. Fixes: 04f8ef5643bc ("cgroup: Fix...
```diff diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c index 5886b95c6eae..5c6d32054e07 100644 --- a/kernel/cgroup/cgroup.c +++ b/kernel/cgroup/cgroup.c @@ -2314,10 +2314,8 @@ static void cgroup_kill_sb(struct super_block *sb) * And don't kill the default root. */ if (list_empty(&root->cgrp.self.c...
32f4a76b8e7cedec9f9aedbfc43626536bba8350
Analyze and fix the following issue in the Linux kernel code: phy: qcom: qmp: Fix lecacy-legacy typo
Problem Details: Introduced in Commit b3982f2144e1 ("phy: qcom-qmp-combo: restructure PHY creation"). No functional changes. Signed-off-by: Konrad Dybcio <quic_kdybcio@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20240903-topic-qmp_typo-v1-1-781e81799992@quic...
```diff diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c index a8adc3214bfe..0198dc21ae56 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c @@ -3483,7 +3483,7 @@ static int qmp_combo_typec_switch_register(struct qmp_c...
dad2f20715163e80aab284fb092efc8c18bf97c7
Analyze and fix the following issue in the Linux kernel code: landlock: Fix grammar issues in documentation
Problem Details: Improve user space and kernel documentation. Signed-off-by: Daniel Burgener <dburgener@linux.microsoft.com> Link: https://lore.kernel.org/r/20241015172647.2007644-1-dburgener@linux.microsoft.com [mic: Extend commit message, reword ptrace restriction as discussed in the thread] Signed-off-by: Mickaël S...
```diff diff --git a/Documentation/security/landlock.rst b/Documentation/security/landlock.rst index 36f26501fd15..59ecdb1c0d4d 100644 --- a/Documentation/security/landlock.rst +++ b/Documentation/security/landlock.rst @@ -11,18 +11,18 @@ Landlock LSM: kernel documentation Landlock's goal is to create scoped access-...
15541c9263ce34ff95a06bc68f45d9bc5c990bcd
Analyze and fix the following issue in the Linux kernel code: rust: macros: fix documentation of the paste! macro
Problem Details: One of the example in this section uses a curious mix of the constant and function declaration syntaxes; fix it. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Fixes: 823d4737d4c2 ("rust: macros: add `paste!` proc macro") Link: https://lore.kernel.org...
```diff diff --git a/rust/macros/lib.rs b/rust/macros/lib.rs index 8d4ac914b48b..939ae00b723a 100644 --- a/rust/macros/lib.rs +++ b/rust/macros/lib.rs @@ -359,7 +359,7 @@ pub fn pinned_drop(args: TokenStream, input: TokenStream) -> TokenStream { /// macro_rules! pub_no_prefix { /// ($prefix:ident, $($newname:iden...
8b55dc8610acf816a66373be53ca6e3bbe2d313a
Analyze and fix the following issue in the Linux kernel code: rust: kernel: fix THIS_MODULE header path in ThisModule doc comment
Problem Details: The doc comment for `ThisModule` incorrectly states the C header file for `THIS_MODULE` as `include/linux/export.h`, while the correct path is `include/linux/init.h`. This is because `THIS_MODULE` was moved in commit 5b20755b7780 ("init: move THIS_MODULE from <linux/export.h> to <linux/init.h>"). Upda...
```diff diff --git a/rust/kernel/lib.rs b/rust/kernel/lib.rs index 620de74d128f..b62451f64f6e 100644 --- a/rust/kernel/lib.rs +++ b/rust/kernel/lib.rs @@ -85,7 +85,7 @@ pub trait Module: Sized + Sync + Send { /// Equivalent to `THIS_MODULE` in the C API. /// -/// C header: [`include/linux/export.h`](srctree/include...
bc69e9fffde41cbb865c4f22aef9aee58f82d61a
Analyze and fix the following issue in the Linux kernel code: iio: adc: ad7606: Add compatibility to fw_nodes
Problem Details: On the parallel version, the current implementation is only compatible with id tables and won't work with fw_nodes, this commit intends to fix it. Doing so required to declare ad7606_chip_info structures in the .h file so to make them accessible to all the driver files that can set a pointer to the co...
```diff diff --git a/drivers/iio/adc/ad7606.c b/drivers/iio/adc/ad7606.c index 8f42d5ad1120..0bfef1758fa1 100644 --- a/drivers/iio/adc/ad7606.c +++ b/drivers/iio/adc/ad7606.c @@ -78,6 +78,155 @@ static const unsigned int ad7616_oversampling_avail[8] = { 1, 2, 4, 8, 16, 32, 64, 128, }; +static const struct iio_chan...
0874763642e69542a3717b349da2a53878dc748f
Analyze and fix the following issue in the Linux kernel code: dt-bindings: iio: adc: ad7606: Remove spi-cpha from required
Problem Details: The documentation is erroneously stating that spi-cpha is required, and the example is erroneously setting both spi-cpol and spi-cpha. According to the datasheet, only cpol should be set. On zedboard for instance, setting the devicetree as in the example will simply not work. Fixes: 416f882c3b40 ("dt...
```diff diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml index bec7cfba52a7..47081c79a1cf 100644 --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml @@ -39,6 +39,...
b7f99fa1b64af2f696b13cec581cb4cd7d3982b8
Analyze and fix the following issue in the Linux kernel code: iio: adc: ad7192: properly check spi_get_device_match_data()
Problem Details: spi_get_device_match_data() can return a NULL pointer. Hence, let's check for it. Signed-off-by: Nuno Sa <nuno.sa@analog.com> Link: https://patch.msgid.link/20241014-fix-error-check-v1-1-089e1003d12f@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
```diff diff --git a/drivers/iio/adc/ad7192.c b/drivers/iio/adc/ad7192.c index 7042ddfdfc03..955e9eff0099 100644 --- a/drivers/iio/adc/ad7192.c +++ b/drivers/iio/adc/ad7192.c @@ -1394,6 +1394,9 @@ static int ad7192_probe(struct spi_device *spi) st->int_vref_mv = ret == -ENODEV ? avdd_mv : ret / MILLI; st->chip_in...
640e98384fb14c7013d3305fcf2d5d46908d90a0
Analyze and fix the following issue in the Linux kernel code: iio: accel: adxl355: Fix typo "accelaration"
Problem Details: There is a spelling mistake of 'accelaration' in comments which should be 'acceleration'. Signed-off-by: WangYuli <wangyuli@uniontech.com> Link: https://patch.msgid.link/9F137828F9F185FD+20241017092221.361511-1-wangyuli@uniontech.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
```diff diff --git a/drivers/iio/accel/adxl355_core.c b/drivers/iio/accel/adxl355_core.c index eabaefa92f19..7ccd2f653b9b 100644 --- a/drivers/iio/accel/adxl355_core.c +++ b/drivers/iio/accel/adxl355_core.c @@ -643,7 +643,7 @@ static irqreturn_t adxl355_trigger_handler(int irq, void *p) * The acceleration data is 24...
5d33455a903dd6357d1f4540f330d8166579ab1a
Analyze and fix the following issue in the Linux kernel code: iio: dac: ad8460: fix DT compatible
Problem Details: Fix the DT compatible string in the of_device_id table to match the binding documentation. There should not be a space after the comma. Fixes: a976ef24c625 ("iio: dac: support the ad8460 Waveform DAC") Signed-off-by: David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/20241018-iio-adc...
```diff diff --git a/drivers/iio/dac/ad8460.c b/drivers/iio/dac/ad8460.c index dc8c76ba573d..6706c8112094 100644 --- a/drivers/iio/dac/ad8460.c +++ b/drivers/iio/dac/ad8460.c @@ -924,7 +924,7 @@ static int ad8460_probe(struct spi_device *spi) } static const struct of_device_id ad8460_of_match[] = { - { .compatible ...
e70d2677ef4088d59158739d72b67ac36d1b132b
Analyze and fix the following issue in the Linux kernel code: phy: tegra: xusb: Add error pointer check in xusb.c
Problem Details: Add error pointer check after tegra_xusb_find_lane(). Fixes: e8f7d2f409a1 ("phy: tegra: xusb: Add usb-phy support") Signed-off-by: Dipendra Khadka <kdipendra88@gmail.com> Acked-by: Thierry Reding <treding@nvidia.com> Link: https://lore.kernel.org/r/20240930191101.13184-1-kdipendra88@gmail.com Signed-o...
```diff diff --git a/drivers/phy/tegra/xusb.c b/drivers/phy/tegra/xusb.c index cfdb54b6070a..342f5ccf611d 100644 --- a/drivers/phy/tegra/xusb.c +++ b/drivers/phy/tegra/xusb.c @@ -699,6 +699,8 @@ static int tegra_xusb_setup_usb_role_switch(struct tegra_xusb_port *port) return -ENOMEM; lane = tegra_xusb_find_lane(...
16fde3e076775d3b51f48d44d050746fbc9d638e
Analyze and fix the following issue in the Linux kernel code: dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Fix X1E80100 resets entries
Problem Details: The PCIe 6a PHY is actually Gen4 4-lanes capable. So the gen4x4 compatible describes it. But according to the schema, currently the gen4x4 compatible doesn't require both PHY and PHY-nocsr resets, while the HW does. So fix that by adding the gen4x4 compatible alongside the gen4x2 one for the resets des...
```diff diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml index 447b379aa83d..380a9222a51d 100644 --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml +++ b/Documentation/devicetree/bindings/p...
f89263b69731e0144d275fff777ee0dd92069200
Analyze and fix the following issue in the Linux kernel code: phy: freescale: imx8m-pcie: Do CMN_RST just before PHY PLL lock check
Problem Details: When enable initcall_debug together with higher debug level below. CONFIG_CONSOLE_LOGLEVEL_DEFAULT=9 CONFIG_CONSOLE_LOGLEVEL_QUIET=9 CONFIG_MESSAGE_LOGLEVEL_DEFAULT=7 The initialization of i.MX8MP PCIe PHY might be timeout failed randomly. To fix this issue, adjust the sequence of the resets refer to ...
```diff diff --git a/drivers/phy/freescale/phy-fsl-imx8m-pcie.c b/drivers/phy/freescale/phy-fsl-imx8m-pcie.c index 11fcb1867118..e98361dcdead 100644 --- a/drivers/phy/freescale/phy-fsl-imx8m-pcie.c +++ b/drivers/phy/freescale/phy-fsl-imx8m-pcie.c @@ -141,11 +141,6 @@ static int imx8_pcie_phy_power_on(struct phy *phy) ...
39d283d146922a266e8196e7fd29b31feff528be
Analyze and fix the following issue in the Linux kernel code: dmaengine: fix typo in the comment
Problem Details: Correctly spelled comments make it easier for the reader to understand the code. Replace 'enngine' with 'engine' in the comment & replace 'trascatioin' with 'transaction' in the comment & replace 'descripter' with 'descriptor' in the comment & replace 'descritpor' with 'descriptor' in the comment & re...
```diff diff --git a/drivers/dma/mv_xor_v2.c b/drivers/dma/mv_xor_v2.c index d908143c7731..cad4d4fb51ac 100644 --- a/drivers/dma/mv_xor_v2.c +++ b/drivers/dma/mv_xor_v2.c @@ -635,7 +635,7 @@ static int mv_xor_v2_descq_init(struct mv_xor_v2_device *xor_dev) writel(MV_XOR_V2_DESC_NUM, xor_dev->dma_base + MV_XO...
76d3ddff7153cc0bcc14a63798d19f5d0693ea71
Analyze and fix the following issue in the Linux kernel code: RDMA/bnxt_re: synchronize the qp-handle table array
Problem Details: There is a race between the CREQ tasklet and destroy qp when accessing the qp-handle table. There is a chance of reading a valid qp-handle in the CREQ tasklet handler while the QP is already moving ahead with the destruction. Fixing this race by implementing a table-lock to synchronize the access. Fi...
```diff diff --git a/drivers/infiniband/hw/bnxt_re/qplib_fp.c b/drivers/infiniband/hw/bnxt_re/qplib_fp.c index 2ebcb2de962b..7ad83566ab0f 100644 --- a/drivers/infiniband/hw/bnxt_re/qplib_fp.c +++ b/drivers/infiniband/hw/bnxt_re/qplib_fp.c @@ -1532,9 +1532,11 @@ int bnxt_qplib_destroy_qp(struct bnxt_qplib_res *res, u3...
d71f4acd584cc861f54b3cb3ac07875f06550a05
Analyze and fix the following issue in the Linux kernel code: RDMA/bnxt_re: Fix the usage of control path spin locks
Problem Details: Control path completion processing always runs in tasklet context. To synchronize with the posting thread, there is no need to use the irq variant of spin lock. Use spin_lock_bh instead. Fixes: 1ac5a4047975 ("RDMA/bnxt_re: Add bnxt_re RoCE driver") Link: https://patch.msgid.link/r/1728912975-19346-2-g...
```diff diff --git a/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c b/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c index 7294221b3316..ca26b88a0a80 100644 --- a/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c +++ b/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c @@ -290,7 +290,6 @@ static int __send_message(struct bnxt_qplib_rcfw *rcf...
78ed28e08e74da6265e49e19206e1bcb8b9a7f0d
Analyze and fix the following issue in the Linux kernel code: RDMA/mlx5: Round max_rd_atomic/max_dest_rd_atomic up instead of down
Problem Details: After the cited commit below max_dest_rd_atomic and max_rd_atomic values are being rounded down to the next power of 2. As opposed to the old behavior and mlx4 driver where they used to be rounded up instead. In order to stay consistent with older code and other drivers, revert to using fls round func...
```diff diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c index e39b1a101e97..10ce3b44f645 100644 --- a/drivers/infiniband/hw/mlx5/qp.c +++ b/drivers/infiniband/hw/mlx5/qp.c @@ -4268,14 +4268,14 @@ static int __mlx5_ib_modify_qp(struct ib_qp *ibqp, MLX5_SET(qpc, qpc, retry_count, attr->r...
89f8c6f197f480fe05edf91eb9359d5425869d04
Analyze and fix the following issue in the Linux kernel code: RDMA/cxgb4: Dump vendor specific QP details
Problem Details: Restore the missing functionality to dump vendor specific QP details, which was mistakenly removed in the commit mentioned in Fixes line. Fixes: 5cc34116ccec ("RDMA: Add dedicated QP resource tracker function") Link: https://patch.msgid.link/r/ed9844829135cfdcac7d64285688195a5cd43f82.1728323026.git.le...
```diff diff --git a/drivers/infiniband/hw/cxgb4/provider.c b/drivers/infiniband/hw/cxgb4/provider.c index 10a4c738b59f..e059f92d90fd 100644 --- a/drivers/infiniband/hw/cxgb4/provider.c +++ b/drivers/infiniband/hw/cxgb4/provider.c @@ -473,6 +473,7 @@ static const struct ib_device_ops c4iw_dev_ops = { .fill_res_cq_ent...
53e52302778c65782cb59eb9e9c38c2f23c9ee93
Analyze and fix the following issue in the Linux kernel code: Docs/zh_CN: Fix the pfn calculation error in page_tables.rst
Problem Details: Synchronize the changes of origin document to fix the pfn value. Reviewed-by: Yanteng Si <si.yanteng@linux.dev> Signed-off-by: Pengyu Zhang <zpenya1314@gmail.com> Link: https://lore.kernel.org/r/20241016141801.25487-4-zpenya1314@gmail.com Signed-off-by: Jonathan Corbet <corbet@lwn.net>
```diff diff --git a/Documentation/translations/zh_CN/mm/page_tables.rst b/Documentation/translations/zh_CN/mm/page_tables.rst index eac0f93070d9..c9f750fc5298 100644 --- a/Documentation/translations/zh_CN/mm/page_tables.rst +++ b/Documentation/translations/zh_CN/mm/page_tables.rst @@ -32,7 +32,7 @@ Linux 将页表定义为一个分级结构,...
5ca1c920add1838ae65f64d30f13cfd66934d26f
Analyze and fix the following issue in the Linux kernel code: docs/zh_CN: update the translation of process/coding-style.rst
Problem Details: Update to commit c5d436f05a3f ("docs/process: fix typos") scripts/checktransupdate.py reports: Documentation/translations/zh_CN/process/coding-style.rst commit c5d436f05a3f ("docs/process: fix typos") commit 82b8000c28b5 ("net: drop special comment style") 2 commits needs resolving in total Signed-o...
```diff diff --git a/Documentation/translations/zh_CN/process/coding-style.rst b/Documentation/translations/zh_CN/process/coding-style.rst index 10b9cb4f6a65..0484d0c65c25 100644 --- a/Documentation/translations/zh_CN/process/coding-style.rst +++ b/Documentation/translations/zh_CN/process/coding-style.rst @@ -560,17 +5...
ff8da2af1e7f3d1d35024f9b75eb0ba5724b0022
Analyze and fix the following issue in the Linux kernel code: docs/zh_CN: update the translation of process/submitting-patches.rst
Problem Details: Update to commit eb5ed2fae197 ("docs: submitting-patches: Advertise b4") scripts/checktransupdate.py reports: Documentation/translations/zh_CN/process/submitting-patches.rst commit eb5ed2fae197 ("docs: submitting-patches: Advertise b4") commit 413e775efaec ("Documentation: fix links to mailing list s...
```diff diff --git a/Documentation/translations/zh_CN/process/submitting-patches.rst b/Documentation/translations/zh_CN/process/submitting-patches.rst index 7ca16bda3709..f7ae584a439e 100644 --- a/Documentation/translations/zh_CN/process/submitting-patches.rst +++ b/Documentation/translations/zh_CN/process/submitting-p...
6fde43859f6b5034140516dde60bac2a65c5f1a2
Analyze and fix the following issue in the Linux kernel code: Documentation: English fixes in kgdb/kdb article
Problem Details: Minor grammar and typos fixed in the kgdb/kdb article Signed-off-by: Nir Lichtman <nir@lichtman.org> Reviewed-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20241018223536.GA799515@lichtman.org
```diff diff --git a/Documentation/dev-tools/kgdb.rst b/Documentation/dev-tools/kgdb.rst index a87a58e6509a..cb626a7a000c 100644 --- a/Documentation/dev-tools/kgdb.rst +++ b/Documentation/dev-tools/kgdb.rst @@ -75,11 +75,11 @@ supports it for the architecture you are using, you can use hardware breakpoints if you desi...
3af2dd00a33ce15c1495166182c650e5bbe75c40
Analyze and fix the following issue in the Linux kernel code: docs/zh_CN: add translation of dev-tools/kmsan.rst
Problem Details: Add translation of kmsan.rst and remove it from TODO list. update to commit 3f53d1b4a4d2 ("docs/dev-tools: fix a typo") Signed-off-by: Haoyang Liu <tttturtleruss@hust.edu.cn> Reviewed-by: Alex Shi <alexs@kernel.org> Reviewed-by: Yanteng Si <si.yanteng@linux.dev> Signed-off-by: Jonathan Corbet <corbet@...
```diff diff --git a/Documentation/translations/zh_CN/dev-tools/index.rst b/Documentation/translations/zh_CN/dev-tools/index.rst index 6a8c637c0be1..7b37194217b0 100644 --- a/Documentation/translations/zh_CN/dev-tools/index.rst +++ b/Documentation/translations/zh_CN/dev-tools/index.rst @@ -22,6 +22,7 @@ Documentation/t...
6db388585e486c0261aeef55f8bc63a9b45756c0
Analyze and fix the following issue in the Linux kernel code: iomap: turn iomap_want_unshare_iter into an inline function
Problem Details: iomap_want_unshare_iter currently sits in fs/iomap/buffered-io.c, which depends on CONFIG_BLOCK. It is also in used in fs/dax.c whіch has no such dependency. Given that it is a trivial check turn it into an inline in include/linux/iomap.h to fix the DAX && !BLOCK build. Fixes: 6ef6a0e821d3 ("iomap: ...
```diff diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c index 3899169b2cf7..6db2aaf808d5 100644 --- a/fs/iomap/buffered-io.c +++ b/fs/iomap/buffered-io.c @@ -1309,23 +1309,6 @@ void iomap_file_buffered_write_punch_delalloc(struct inode *inode, } EXPORT_SYMBOL_GPL(iomap_file_buffered_write_punch_delalloc)...
f2b5b8201b1545ef92e050735e9c768010d497aa
Analyze and fix the following issue in the Linux kernel code: spi: mtk-snfi: fix kerneldoc for mtk_snand_is_page_ops()
Problem Details: The op argument is missing the colon and is not picked up by the kerneldoc generator. Fix it to address the following build warning: drivers/spi/spi-mtk-snfi.c:1201: warning: Function parameter or struct member 'op' not described in 'mtk_snand_is_page_ops' Fixes: 764f1b748164 ("spi: add driver for MT...
```diff diff --git a/drivers/spi/spi-mtk-snfi.c b/drivers/spi/spi-mtk-snfi.c index ddd98ddb7913..c5677fd94e5e 100644 --- a/drivers/spi/spi-mtk-snfi.c +++ b/drivers/spi/spi-mtk-snfi.c @@ -1187,7 +1187,7 @@ cleanup: /** * mtk_snand_is_page_ops() - check if the op is a controller supported page op. - * @op spi-mem op...
48771da48072823956b271dddd568492c13d8170
Analyze and fix the following issue in the Linux kernel code: platform/x86/intel/pmc: Fix pmc_core_iounmap to call iounmap for valid addresses
Problem Details: Commit 50c6dbdfd16e ("x86/ioremap: Improve iounmap() address range checks") introduces a WARN when adrress ranges of iounmap are invalid. On Thinkpad P1 Gen 7 (Meteor Lake-P) this caused the following warning to appear: WARNING: CPU: 7 PID: 713 at arch/x86/mm/ioremap.c:461 iounmap+0x58/0x1f0 Modules l...
```diff diff --git a/drivers/platform/x86/intel/pmc/core_ssram.c b/drivers/platform/x86/intel/pmc/core_ssram.c index c259c96b7dfd..8504154b649f 100644 --- a/drivers/platform/x86/intel/pmc/core_ssram.c +++ b/drivers/platform/x86/intel/pmc/core_ssram.c @@ -29,7 +29,7 @@ #define LPM_REG_COUNT 28 #define LPM_MODE_OFFSET...
d5ff2fb2e7167e9483846e34148e60c0c016a1f6
Analyze and fix the following issue in the Linux kernel code: nfsd: cancel nfsd_shrinker_work using sync mode in nfs4_state_shutdown_net
Problem Details: In the normal case, when we excute `echo 0 > /proc/fs/nfsd/threads`, the function `nfs4_state_destroy_net` in `nfs4_state_shutdown_net` will release all resources related to the hashed `nfs4_client`. If the `nfsd_client_shrinker` is running concurrently, the `expire_client` function will first unhash t...
```diff diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index d1a2c677be7e..551d2958ec29 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -8716,7 +8716,7 @@ nfs4_state_shutdown_net(struct net *net) struct nfsd_net *nn = net_generic(net, nfsd_net_id); shrinker_free(nn->nfsd_client_shrinker); - ...
2f1aab0cb0661d533f008e4975325080351cdfc8
Analyze and fix the following issue in the Linux kernel code: arm64: dts: mediatek: mt8186-corsola: Fix GPU supply coupling max-spread
Problem Details: The GPU SRAM supply is supposed to be always at least 0.1V higher than the GPU supply. However when the DT was upstreamed, the spread was incorrectly set to 0.01V. Fixes: 8855d01fb81f ("arm64: dts: mediatek: Add MT8186 Krabby platform based Tentacruel / Tentacool") Cc: stable@vger.kernel.org Signed-of...
```diff diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola.dtsi b/arch/arm64/boot/dts/mediatek/mt8186-corsola.dtsi index 0c0b3ac59745..eb06b343a540 100644 --- a/arch/arm64/boot/dts/mediatek/mt8186-corsola.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola.dtsi @@ -1336,7 +1336,7 @@ regulator-allowed-mode...
7d5794e6d964940e46286fadbe69a3245fa51e44
Analyze and fix the following issue in the Linux kernel code: arm64: dts: mediatek: mt8195-cherry: Use correct audio codec DAI
Problem Details: The RT5682i and RT5682s drivers describe two DAIs: AIF1 supports both playback and capture, while AIF2 supports capture only. Cherry doesn't specify which DAI to use. Although this doesn't cause real issues because AIF1 happens to be the first DAI, it should be corrected: codec@1a: #sound-dai-cell...
```diff diff --git a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi index 75d56b2d5a3d..2c7b2223ee76 100644 --- a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi @@ -438,7 +438,7 @@ /* Realtek RT5682i or RT5682s,...
6bb64877a41561bc78e0f4e9e04d524a0155d6aa
Analyze and fix the following issue in the Linux kernel code: arm64: dts: mediatek: mt8188: Fix USB3 PHY port default status
Problem Details: The T-PHY controller at 0x11e40000 controls two underlying USB2 and USB3 PHY ports. The USB3 port works normally just like the others, so there's no point in disabling it separately. Otherwise, board DTs would have to enable both the T-PHY controller and one of its sub-nodes in particular, which is sli...
```diff diff --git a/arch/arm64/boot/dts/mediatek/mt8188.dtsi b/arch/arm64/boot/dts/mediatek/mt8188.dtsi index 5522f1648fd2..faccc7f16259 100644 --- a/arch/arm64/boot/dts/mediatek/mt8188.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8188.dtsi @@ -2058,7 +2058,6 @@ <&clk26m>; clock-names = "ref", "da_ref"; ...
134475a9ab8487527238d270639a8cb74c10aab2
Analyze and fix the following issue in the Linux kernel code: LoongArch: Don't crash in stack_top() for tasks without vDSO
Problem Details: Not all tasks have a vDSO mapped, for example kthreads never do. If such a task ever ends up calling stack_top(), it will derefence the NULL vdso pointer and crash. This can for example happen when using kunit: [<9000000000203874>] stack_top+0x58/0xa8 [<90000000002956cc>] arch_pick_mmap_layout+0x16...
```diff diff --git a/arch/loongarch/kernel/process.c b/arch/loongarch/kernel/process.c index f2ff8b5d591e..6e58f65455c7 100644 --- a/arch/loongarch/kernel/process.c +++ b/arch/loongarch/kernel/process.c @@ -293,13 +293,15 @@ unsigned long stack_top(void) { unsigned long top = TASK_SIZE & PAGE_MASK; - /* Space for ...
2ed119aef60d73d00371195fc84dd68248071100
Analyze and fix the following issue in the Linux kernel code: LoongArch: Set correct size for vDSO code mapping
Problem Details: The current size of vDSO code mapping is hardcoded to PAGE_SIZE. This cannot work for 4KB page size after commit 18efd0b10e0fd77 ("LoongArch: vDSO: Wire up getrandom() vDSO implementation") because the code size increases to 8KB. Thus set the code mapping size to its real size, i.e. PAGE_ALIGN(vdso_end...
```diff diff --git a/arch/loongarch/kernel/vdso.c b/arch/loongarch/kernel/vdso.c index f6fcc52aefae..2c0d852ca536 100644 --- a/arch/loongarch/kernel/vdso.c +++ b/arch/loongarch/kernel/vdso.c @@ -34,7 +34,6 @@ static union { struct loongarch_vdso_data vdata; } loongarch_vdso_data __page_aligned_data; -static struct...
69cc6fad5df4ce652d969be69acc60e269e5eea1
Analyze and fix the following issue in the Linux kernel code: LoongArch: Enable IRQ if do_ale() triggered in irq-enabled context
Problem Details: Unaligned access exception can be triggered in irq-enabled context such as user mode, in this case do_ale() may call get_user() which may cause sleep. Then we will get: BUG: sleeping function called from invalid context at arch/loongarch/kernel/access-helper.h:7 in_atomic(): 0, irqs_disabled(): 1, n...
```diff diff --git a/arch/loongarch/kernel/traps.c b/arch/loongarch/kernel/traps.c index f9f4eb00c92e..c57b4134f3e8 100644 --- a/arch/loongarch/kernel/traps.c +++ b/arch/loongarch/kernel/traps.c @@ -555,6 +555,9 @@ asmlinkage void noinstr do_ale(struct pt_regs *regs) #else unsigned int *pc; + if (regs->csr_prmd & ...
f766fae08f6a2eaeb45d8d2c053724c91526835c
Analyze and fix the following issue in the Linux kernel code: arm64: dts: mediatek: mt8173-elm-hana: Add vdd-supply to second source trackpad
Problem Details: The Hana device has a second source option trackpad, but it is missing its regulator supply. It only works because the regulator is marked as always-on. Add the regulator supply, but leave out the post-power-on delay. Instead, document the post-power-on delay along with the reason for not adding it in...
```diff diff --git a/arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dtsi b/arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dtsi index 8d1cbc92bce3..ae0379fd42a9 100644 --- a/arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dtsi @@ -49,6 +49,14 @@ interrupts-extended = <...
5fa607880168d991bdc819f493a11155e935abe6
Analyze and fix the following issue in the Linux kernel code: platform/x86:intel/pmc: Revert "Enable the ACPI PM Timer to be turned off when suspended"
Problem Details: Commit e86c8186d03a ("platform/x86:intel/pmc: Enable the ACPI PM Timer to be turned off when suspended") can cause the suspend process to hang as the pmcdev->lock in the pmc_core_acpi_pm_timer_suspend_resume might already be held by the pmc_core_mphy_pg_show or pmc_core_pll_show if the userspace gets f...
```diff diff --git a/drivers/platform/x86/intel/pmc/adl.c b/drivers/platform/x86/intel/pmc/adl.c index 9d9c07f44ff6..e7878558fd90 100644 --- a/drivers/platform/x86/intel/pmc/adl.c +++ b/drivers/platform/x86/intel/pmc/adl.c @@ -295,8 +295,6 @@ const struct pmc_reg_map adl_reg_map = { .ppfear_buckets = CNP_PPFEAR_NUM_E...
bc88d44bd7e45b992cf8c2c2ffbc7bb3e24db4a7
Analyze and fix the following issue in the Linux kernel code: irqchip/gic-v3-its: Fix over allocation in itt_alloc_pool()
Problem Details: itt_alloc_pool() calls its_alloc_pages_node() to allocate an individual page to add to the pool (for allocations <PAGE_SIZE). However the final argument of its_alloc_pages_node() is the page order not the number of pages. Currently it allocates two pages and leaks the second page. Fix it by passing 0 i...
```diff diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c index be77f927110d..395961fb2180 100644 --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c @@ -261,7 +261,7 @@ static void *itt_alloc_pool(int node, int size) if (addr) break; - page = its_alloc...
5c23878252515b8d2b86839bd4cb7dea7088aacd
Analyze and fix the following issue in the Linux kernel code: drm/bridge: tc358767: fix missing of_node_put() in for_each_endpoint_of_node()
Problem Details: for_each_endpoint_of_node() requires a call to of_node_put() for every early exit. A new error path was added to the loop without observing this requirement. Add the missing call to of_node_put() in the error path. Fixes: 1fb4dceeedc5 ("drm/bridge: tc358767: Add configurable default preemphasis") Sig...
```diff diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c index 290e2532fab1..f3afdab55c11 100644 --- a/drivers/gpu/drm/bridge/tc358767.c +++ b/drivers/gpu/drm/bridge/tc358767.c @@ -2391,6 +2391,7 @@ static int tc_probe_bridge_endpoint(struct tc_data *tc) if (tc->pre_emphasis[0] < 0...
85e444a68126a631221ae32c63fce882bb18a262
Analyze and fix the following issue in the Linux kernel code: drm/bridge: Fix assignment of the of_node of the parent to aux bridge
Problem Details: The assignment of the of_node to the aux bridge needs to mark the of_node as reused as well, otherwise resource providers like pinctrl will report a gpio as already requested by a different device when both pinconf and gpios property are present. Fix that by using the device_set_of_node_from_dev() help...
```diff diff --git a/drivers/gpu/drm/bridge/aux-bridge.c b/drivers/gpu/drm/bridge/aux-bridge.c index b29980f95379..295e9d031e2d 100644 --- a/drivers/gpu/drm/bridge/aux-bridge.c +++ b/drivers/gpu/drm/bridge/aux-bridge.c @@ -58,9 +58,10 @@ int drm_aux_bridge_register(struct device *parent) adev->id = ret; adev->name ...
8fa73ee44daefc884c53a25158c25a4107eb5a94
Analyze and fix the following issue in the Linux kernel code: ACPI: button: Add DMI quirk for Samsung Galaxy Book2 to fix initial lid detection issue
Problem Details: Add a DMI quirk for Samsung Galaxy Book2 to fix an initial lid state detection issue. The _LID device incorrectly returns the lid status as "closed" during boot, causing the system to enter a suspend loop right after booting. The quirk ensures that the correct lid state is reported initially, prevent...
```diff diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c index 51470208e6da..7773e6b860e7 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c @@ -130,6 +130,17 @@ static const struct dmi_system_id dmi_lid_quirks[] = { }, .driver_data = (void *)(long)ACPI_BUTTON_LID_INIT_OPEN, }, + { + /* +...
53f1a907d36fb3aa02a4d34073bcec25823a6c74
Analyze and fix the following issue in the Linux kernel code: ACPI: resource: Add LG 16T90SP to irq1_level_low_skip_override[]
Problem Details: The LG Gram Pro 16 2-in-1 (2024) the 16T90SP has its keybopard IRQ (1) described as ActiveLow in the DSDT, which the kernel overrides to EdgeHigh which breaks the keyboard. Add the 16T90SP to the irq1_level_low_skip_override[] quirk table to fix this. Reported-by: Dirk Holten <dirk.holten@gmx.de> Clo...
```diff diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c index 129bceb1f4a2..7fe842dae1ec 100644 --- a/drivers/acpi/resource.c +++ b/drivers/acpi/resource.c @@ -503,6 +503,13 @@ static const struct dmi_system_id irq1_level_low_skip_override[] = { DMI_MATCH(DMI_BOARD_NAME, "17U70P"), }, }, + { + ...
038fa6ddf5d22694f61ff7a7a53c8887c6b08c45
Analyze and fix the following issue in the Linux kernel code: ASoC: rt722-sdca: increase clk_stop_timeout to fix clock stop issue
Problem Details: clk_stop_timeout should be increased to 900ms to fix clock stop issue. Signed-off-by: Jack Yu <jack.yu@realtek.com> Link: https://patch.msgid.link/cd26275d9fc54374a18dc016755cb72d@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
```diff diff --git a/sound/soc/codecs/rt722-sdca-sdw.c b/sound/soc/codecs/rt722-sdca-sdw.c index 87354bb1564e..d5c985ff5ac5 100644 --- a/sound/soc/codecs/rt722-sdca-sdw.c +++ b/sound/soc/codecs/rt722-sdca-sdw.c @@ -253,7 +253,7 @@ static int rt722_sdca_read_prop(struct sdw_slave *slave) } /* set the timeout value...
088984c8d54c0053fc4ae606981291d741c5924b
Analyze and fix the following issue in the Linux kernel code: ACPI: PRM: Find EFI_MEMORY_RUNTIME block for PRM handler and context
Problem Details: PRMT needs to find the correct type of block to translate the PA-VA mapping for EFI runtime services. The issue arises because the PRMT is finding a block of type EFI_CONVENTIONAL_MEMORY, which is not appropriate for runtime services as described in Section 2.2.2 (Runtime Services) of the UEFI Specifi...
```diff diff --git a/drivers/acpi/prmt.c b/drivers/acpi/prmt.c index 1cfaa5957ac4..d59307a76ca3 100644 --- a/drivers/acpi/prmt.c +++ b/drivers/acpi/prmt.c @@ -72,17 +72,21 @@ struct prm_module_info { struct prm_handler_info handlers[] __counted_by(handler_count); }; -static u64 efi_pa_va_lookup(u64 pa) +static u64...
5209d1b654f1db80509040cc694c7814a1b547e3
Analyze and fix the following issue in the Linux kernel code: powercap: dtpm_devfreq: Fix error check against dev_pm_qos_add_request()
Problem Details: The caller of the function dev_pm_qos_add_request() checks again a non zero value but dev_pm_qos_add_request() can return '1' if the request already exists. Therefore, the setup function fails while the QoS request actually did not failed. Fix that by changing the check against a negative value like a...
```diff diff --git a/drivers/powercap/dtpm_devfreq.c b/drivers/powercap/dtpm_devfreq.c index f40bce8176df..d1dff6ccab12 100644 --- a/drivers/powercap/dtpm_devfreq.c +++ b/drivers/powercap/dtpm_devfreq.c @@ -178,7 +178,7 @@ static int __dtpm_devfreq_setup(struct devfreq *devfreq, struct dtpm *parent) ret = dev_pm_qos_...
707db375ecec313862926d1885d64da0b2b66c4c
Analyze and fix the following issue in the Linux kernel code: drm/msm/dpu: check for the plane pitch overflow
Problem Details: Check that the plane pitch doesn't overflow the maximum pitch size allowed by the hardware. Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Tested-by: Abhinav Kumar <quic_abhinavk@quicinc.com> # sc7280 Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.fr...
```diff diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h index 4a910b808687..8998d1862e16 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h @@ -12,6 +12,8 @@ struct dpu_hw_sspp; +#define DPU_SSPP_MAX_PITC...
d8cb4241820789be2bd0ba54221f7613de3715fd
Analyze and fix the following issue in the Linux kernel code: drm/msm/dpu: move pitch check to _dpu_format_get_plane_sizes_linear()
Problem Details: The _dpu_format_get_plane_sizes_linear() already compares pitches of the framebuffer with the calculated pitches. Move the check to the same place, demoting DPU_ERROR to DPU_DEBUG to prevent user from spamming the kernel log. Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Signed-off-by: Dmitry...
```diff diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c index df046bc88715..4d17eb88af40 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c @@ -229,8 +229,13 @@ static int _dpu_format_get_plane_sizes_linear( ...
c59afe50773d5c972f6684f9bbd9a2ddb2fb92fa
Analyze and fix the following issue in the Linux kernel code: drm/msm/dpu: drop LM_3 / LM_4 on MSM8998
Problem Details: On the MSM8998 platform ther are no LM_3 and LM_4 blocks. Drop them from the MSM8998 catalog. Fixes: 94391a14fc27 ("drm/msm/dpu1: Add MSM8998 to hw catalog") Reported-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Abhinav Kumar ...
```diff diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h index 1d3e9666c741..64c94e919a69 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h @@ -156,18 +156,6 @@ ...
d39271061d67c6fcbe8f361c532b493069232cf8
Analyze and fix the following issue in the Linux kernel code: drm/msm/dpu: drop LM_3 / LM_4 on SDM845
Problem Details: On the SDM845 platform ther are no LM_3 and LM_4 blocks. Drop them from the SDM845 catalog. Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support") Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Patchwork: https://patchwork.freedesk...
```diff diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_4_0_sdm845.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_4_0_sdm845.h index 59eeea3dd2e9..72bd4f7e9e50 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_4_0_sdm845.h +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_4_0_sdm845.h @@ -155,18 +155,6 @@ stat...
768a272d5357269b17b4b06dd8647e21bdc0ca3c
Analyze and fix the following issue in the Linux kernel code: drm/msm/dpu: on SDM845 move DSPP_3 to LM_5 block
Problem Details: On the SDM845 platform the DSPP_3 is used by the LM_5. Correct corresponding entries in the sdm845_lm array. Fixes: c72375172194 ("drm/msm/dpu/catalog: define DSPP blocks found on sdm845") Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.c...
```diff diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_4_0_sdm845.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_4_0_sdm845.h index 7a23389a5732..59eeea3dd2e9 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_4_0_sdm845.h +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_4_0_sdm845.h @@ -161,7 +161,6 @@ stati...
00adf52efec3c4745f280944a88d25ac15e08ce3
Analyze and fix the following issue in the Linux kernel code: drm/msm: Remove unneeded semicolon
Problem Details: ./drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c:282:2-3: Unneeded semicolon This patch removes an unneeded semicolon after a switch statement in the pll_get_post_div function. Adding a semicolon after a switch statement is unnecessary and can lead to confusion in the code structure. Reported-by: Abaci Rob...
```diff diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c b/drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c index e6ffaf92d26d..e595ad47a285 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c @@ -270,7 +270,7 @@ find_optimal_index: case 25: found_hsclk_divsel = 14; ...
d95d9a31aceb2021084bc9b94647bc5b175e05e7
Analyze and fix the following issue in the Linux kernel code: virtio_net: fix integer overflow in stats
Problem Details: Static analysis on linux-next has detected the following issue in function virtnet_stats_ctx_init, in drivers/net/virtio_net.c : if (vi->device_stats_cap & VIRTIO_NET_STATS_TYPE_CVQ) { queue_type = VIRTNET_Q_TYPE_CQ; ctx->bitmap[queue_type] |= VIRTIO_NET_STATS...
```diff diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index f8131f92a392..792e9eadbfc3 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -4155,7 +4155,7 @@ struct virtnet_stats_ctx { u32 desc_num[3]; /* The actual supported stat types. */ - u32 bitmap[3]; + u64 bitmap[3]; ...
95ecba62e2fd201bcdcca636f5d774f1cd4f1458
Analyze and fix the following issue in the Linux kernel code: net: fix races in netdev_tx_sent_queue()/dev_watchdog()
Problem Details: Some workloads hit the infamous dev_watchdog() message: "NETDEV WATCHDOG: eth0 (xxxx): transmit queue XX timed out" It seems possible to hit this even for perfectly normal BQL enabled drivers: 1) Assume a TX queue was idle for more than dev->watchdog_timeo (5 seconds unless changed by the driver)...
```diff diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 4d20c776a4ff..8896705ccd63 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -3325,6 +3325,12 @@ static inline void netif_tx_wake_all_queues(struct net_device *dev) static __always_inline void netif_tx_stop_queue...
1c45ede83d2f921444e781a7be1d87ff49831d72
Analyze and fix the following issue in the Linux kernel code: arm64: dts: layerscape: remove cooling-max-state and cooling-min-state
Problem Details: Remove unused property cooling-max-state and cooling-min-state. Remove undocument property #cooling-cells for ti,amc6821. Fix below dtb_check warning: arch/arm64/boot/dts/freescale/fsl-lx2160a-clearfog-cx.dtb: fan-temperature-ctrlr@18: '#cooling-cells', 'cooling-max-state', 'cooling-min-state' do not m...
```diff diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28-var3-ads2.dts b/arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28-var3-ads2.dts index d9fac647f432..1d53b529af88 100644 --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28-var3-ads2.dts +++ b/arch/arm64/boot/dts/freescale/fsl-ls10...
fee9b240916df82a8b07aef0fdfe96785417a164
Analyze and fix the following issue in the Linux kernel code: mtd: spinand: winbond: Fix 512GW, 01GW, 01JW and 02JW ECC information
Problem Details: These four chips: * W25N512GW * W25N01GW * W25N01JW * W25N02JW all require a single bit of ECC strength and thus feature an on-die Hamming-like ECC engine. There is no point in filling a ->get_status() callback for them because the main ECC status bytes are located in standard places, and retrieving th...
```diff diff --git a/drivers/mtd/nand/spi/winbond.c b/drivers/mtd/nand/spi/winbond.c index 1d9680cc26e5..a33ad04e99cc 100644 --- a/drivers/mtd/nand/spi/winbond.c +++ b/drivers/mtd/nand/spi/winbond.c @@ -201,30 +201,30 @@ static const struct spinand_info winbond_spinand_table[] = { SPINAND_INFO("W25N01JW", SPI...
c1247de51cab53fc357a73804c11fb4fba55b2d9
Analyze and fix the following issue in the Linux kernel code: mtd: spinand: winbond: Fix 512GW and 02JW OOB layout
Problem Details: Both W25N512GW and W25N02JW chips have 64 bytes of OOB and thus cannot use the layout for 128 bytes OOB. Reference the correct layout instead. Fixes: 6a804fb72de5 ("mtd: spinand: winbond: add support for serial NAND flash") Cc: stable@vger.kernel.org Signed-off-by: Miquel Raynal <miquel.raynal@bootlin...
```diff diff --git a/drivers/mtd/nand/spi/winbond.c b/drivers/mtd/nand/spi/winbond.c index f3bb81d7e460..1d9680cc26e5 100644 --- a/drivers/mtd/nand/spi/winbond.c +++ b/drivers/mtd/nand/spi/winbond.c @@ -215,7 +215,7 @@ static const struct spinand_info winbond_spinand_table[] = { &write_cache_variants, ...
61ee39cebc9dfe11156abcb402732fdb1480c26f
Analyze and fix the following issue in the Linux kernel code: ARM: dts: imx6qdl-dhcom: Fix model typo for i.MX6 DHSOM
Problem Details: Each DHSOM uses three digits in the Cnnn part, drop the trailing zero. This is a change in comment, no functional change. Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Christoph Niedermaier <cniedermaier@dh-electronics.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
```diff diff --git a/arch/arm/boot/dts/nxp/imx/imx6dl-dhcom-picoitx.dts b/arch/arm/boot/dts/nxp/imx/imx6dl-dhcom-picoitx.dts index 038bb0025556..775caf8208c5 100644 --- a/arch/arm/boot/dts/nxp/imx/imx6dl-dhcom-picoitx.dts +++ b/arch/arm/boot/dts/nxp/imx/imx6dl-dhcom-picoitx.dts @@ -3,7 +3,7 @@ * Copyright (C) 2021 DH...
47dd5447cab8ce30a847a0337d5341ae4c7476a7
Analyze and fix the following issue in the Linux kernel code: net: wwan: fix global oob in wwan_rtnl_policy
Problem Details: The variable wwan_rtnl_link_ops assign a *bigger* maxtype which leads to a global out-of-bounds read when parsing the netlink attributes. Exactly same bug cause as the oob fixed in commit b33fb5b801c6 ("net: qualcomm: rmnet: fix global oob in rmnet_policy"). ===========================================...
```diff diff --git a/drivers/net/wwan/wwan_core.c b/drivers/net/wwan/wwan_core.c index 17431f1b1a0c..65a7ed4d6766 100644 --- a/drivers/net/wwan/wwan_core.c +++ b/drivers/net/wwan/wwan_core.c @@ -1038,7 +1038,7 @@ static const struct nla_policy wwan_rtnl_policy[IFLA_WWAN_MAX + 1] = { static struct rtnl_link_ops wwan_...
b5707f8ac5fa21eae70815a2919cf9a700bdc005
Analyze and fix the following issue in the Linux kernel code: ARM: dts: imx6qdl-tx6: Fix 'fixed-clock' description
Problem Details: Per fixed-clock.yaml, it is not correct to pass unit address and reg to represent 'fixed-clock'. Remove it to fix the following dt-schema warning: clock@0: 'reg' does not match any of the regexes: 'pinctrl-[0-9]+' Reported-by: Rob Herring <robh@kernel.org> Closes: https://lore.kernel.org/linux-arm-k...
```diff diff --git a/arch/arm/boot/dts/nxp/imx/imx6qdl-tx6.dtsi b/arch/arm/boot/dts/nxp/imx/imx6qdl-tx6.dtsi index 5a194f4c0cb9..2fa37d1b16cc 100644 --- a/arch/arm/boot/dts/nxp/imx/imx6qdl-tx6.dtsi +++ b/arch/arm/boot/dts/nxp/imx/imx6qdl-tx6.dtsi @@ -70,9 +70,8 @@ #address-cells = <1>; #size-cells = <0>; - mcl...
306ed1728e8438caed30332e1ab46b28c25fe3d8
Analyze and fix the following issue in the Linux kernel code: netfilter: xtables: fix typo causing some targets not to load on IPv6
Problem Details: - There is no NFPROTO_IPV6 family for mark and NFLOG. - TRACE is also missing module autoload with NFPROTO_IPV6. This results in ip6tables failing to restore a ruleset. This issue has been reported by several users providing incomplete patches. Very similar to Ilya Katsnelson's patch including a miss...
```diff diff --git a/net/netfilter/xt_NFLOG.c b/net/netfilter/xt_NFLOG.c index d80abd6ccaf8..6dcf4bc7e30b 100644 --- a/net/netfilter/xt_NFLOG.c +++ b/net/netfilter/xt_NFLOG.c @@ -79,7 +79,7 @@ static struct xt_target nflog_tg_reg[] __read_mostly = { { .name = "NFLOG", .revision = 0, - .family = NFP...
6d734f1bfc336aaea91313a5632f2f197608fadd
Analyze and fix the following issue in the Linux kernel code: mtd: rawnand: atmel: Fix possible memory leak
Problem Details: The pmecc "user" structure is allocated in atmel_pmecc_create_user() and was supposed to be freed with atmel_pmecc_destroy_user(), but this other helper is never called. One solution would be to find the proper location to call the destructor, but the trend today is to switch to device managed allocati...
```diff diff --git a/drivers/mtd/nand/raw/atmel/pmecc.c b/drivers/mtd/nand/raw/atmel/pmecc.c index 4d7dc8a9c373..a22aab4ed4e8 100644 --- a/drivers/mtd/nand/raw/atmel/pmecc.c +++ b/drivers/mtd/nand/raw/atmel/pmecc.c @@ -362,7 +362,7 @@ atmel_pmecc_create_user(struct atmel_pmecc *pmecc, size = ALIGN(size, sizeof(s32));...
7a2ef1449819b622e9ba79677ca7228c723ea94f
Analyze and fix the following issue in the Linux kernel code: ARM: dts: imx6qdl-tx6: Remove 'turn-on-delay-ms'
Problem Details: The 'turn-on-delay-ms' property is not documented nor used anywhere else. Remove this invalid property to fix the following dt-schema warning: Unevaluated properties are not allowed ('turn-on-delay-ms' was unexpected) Signed-off-by: Fabio Estevam <festevam@denx.de> Acked-by: Lothar Waßmann <LW@KARO-...
```diff diff --git a/arch/arm/boot/dts/nxp/imx/imx6dl-tx6dl-comtft.dts b/arch/arm/boot/dts/nxp/imx/imx6dl-tx6dl-comtft.dts index 51a9bb9d6bc2..7436626673fc 100644 --- a/arch/arm/boot/dts/nxp/imx/imx6dl-tx6dl-comtft.dts +++ b/arch/arm/boot/dts/nxp/imx/imx6dl-tx6dl-comtft.dts @@ -51,7 +51,6 @@ &backlight { pwms = <&...
7d189579a287d5c568db623c5fc2344cce98a887
Analyze and fix the following issue in the Linux kernel code: mtd: hyperbus: rpc-if: Add missing MODULE_DEVICE_TABLE
Problem Details: The rpc-if-hyperflash driver can be compiled as a module, but lacks MODULE_DEVICE_TABLE() and will therefore not be loaded automatically. Fix this. Fixes: 5de15b610f78 ("mtd: hyperbus: add Renesas RPC-IF driver") Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <gee...
```diff diff --git a/drivers/mtd/hyperbus/rpc-if.c b/drivers/mtd/hyperbus/rpc-if.c index b22aa57119f2..e7a28f3316c3 100644 --- a/drivers/mtd/hyperbus/rpc-if.c +++ b/drivers/mtd/hyperbus/rpc-if.c @@ -163,9 +163,16 @@ static void rpcif_hb_remove(struct platform_device *pdev) pm_runtime_disable(hyperbus->rpc.dev); } ...
51521d2e2c35959cc70a62ccddf694965e29c950
Analyze and fix the following issue in the Linux kernel code: fbdev: wm8505fb: select CONFIG_FB_IOMEM_FOPS
Problem Details: The fb_io_mmap() function is used in the file operations but not enabled in all configurations unless FB_IOMEM_FOPS gets selected: ld.lld-20: error: undefined symbol: fb_io_mmap referenced by wm8505fb.c drivers/video/fbdev/wm8505fb.o:(wm8505fb_ops) in archive vmlinux.a Fixes: 11754a504608 ("fbd...
```diff diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 77b50579bd09..de035071fedb 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -1373,6 +1373,7 @@ config FB_VT8500 config FB_WM8505 bool "Wondermedia WM8xxx-series frame buffer support" depends on (FB = y...
1dec67e0d9fbb087c2ab17bf1bd17208231c3bb1
Analyze and fix the following issue in the Linux kernel code: fsl/fman: Fix refcount handling of fman-related devices
Problem Details: In mac_probe() there are multiple calls to of_find_device_by_node(), fman_bind() and fman_port_bind() which takes references to of_dev->dev. Not all references taken by these calls are released later on error path in mac_probe() and in mac_remove() which lead to reference leaks. Add references release...
```diff diff --git a/drivers/net/ethernet/freescale/fman/mac.c b/drivers/net/ethernet/freescale/fman/mac.c index 9b863db0bf08..11da139082e1 100644 --- a/drivers/net/ethernet/freescale/fman/mac.c +++ b/drivers/net/ethernet/freescale/fman/mac.c @@ -204,7 +204,7 @@ static int mac_probe(struct platform_device *_of_dev) i...
efeddd552ec6767e4c8884caa516ac80b65f8823
Analyze and fix the following issue in the Linux kernel code: fsl/fman: Save device references taken in mac_probe()
Problem Details: In mac_probe() there are calls to of_find_device_by_node() which takes references to of_dev->dev. These references are not saved and not released later on error path in mac_probe() and in mac_remove(). Add new fields into mac_device structure to save references taken for future use in mac_probe() and ...
```diff diff --git a/drivers/net/ethernet/freescale/fman/mac.c b/drivers/net/ethernet/freescale/fman/mac.c index 9767586b4eb3..9b863db0bf08 100644 --- a/drivers/net/ethernet/freescale/fman/mac.c +++ b/drivers/net/ethernet/freescale/fman/mac.c @@ -197,6 +197,7 @@ static int mac_probe(struct platform_device *_of_dev) ...
184429a17f8ffc9e188dee9a4459165014025e71
Analyze and fix the following issue in the Linux kernel code: Revert "fuse: move initialization of fuse_file to fuse_writepages() instead of in callback"
Problem Details: This reverts commit 672c3b7457fcee9656c36a29a4b21ec4a652433e. fuse_writepages() might be called with no dirty pages after all writable opens were closed. In this case __fuse_write_file_get() will return NULL which will trigger the WARNING. The exact conditions under which this is triggered is unclea...
```diff diff --git a/fs/fuse/file.c b/fs/fuse/file.c index f33fbce86ae0..dafdf766b1d5 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -2288,6 +2288,13 @@ static int fuse_writepages_fill(struct folio *folio, struct folio *tmp_folio; int err; + if (!data->ff) { + err = -EIO; + data->ff = fuse_write_file_get(f...
23f59d7baa1fe31823d223afe9cace1494bdf5b1
Analyze and fix the following issue in the Linux kernel code: drm/fbdev-dma: remove obsolete kernel-doc references
Problem Details: The kernel-doc comments in these 3 files was removed so remove the references to these files to prevent kernel-doc warnings. drivers/gpu/drm/drm_fbdev_dma.c:1: warning: no structured comments found drivers/gpu/drm/drm_fbdev_shmem.c:1: warning: no structured comments found drivers/gpu/drm/drm_fbdev_ttm...
```diff diff --git a/Documentation/gpu/drm-kms-helpers.rst b/Documentation/gpu/drm-kms-helpers.rst index c3e58856f75b..8cf2f041af47 100644 --- a/Documentation/gpu/drm-kms-helpers.rst +++ b/Documentation/gpu/drm-kms-helpers.rst @@ -110,15 +110,6 @@ fbdev Helper Functions Reference .. kernel-doc:: drivers/gpu/drm/drm_fb...
a552e2ef5fd1a6c78267cd4ec5a9b49aa11bbb1c
Analyze and fix the following issue in the Linux kernel code: bpf, arm64: Fix address emission with tag-based KASAN enabled
Problem Details: When BPF_TRAMP_F_CALL_ORIG is enabled, the address of a bpf_tramp_image struct on the stack is passed during the size calculation pass and an address on the heap is passed during code generation. This may cause a heap buffer overflow if the heap address is tagged because emit_a64_mov_i64() will emit lo...
```diff diff --git a/arch/arm64/net/bpf_jit_comp.c b/arch/arm64/net/bpf_jit_comp.c index 8bbd0b20136a..5db82bfc9dc1 100644 --- a/arch/arm64/net/bpf_jit_comp.c +++ b/arch/arm64/net/bpf_jit_comp.c @@ -2220,7 +2220,11 @@ static int prepare_trampoline(struct jit_ctx *ctx, struct bpf_tramp_image *im, emit(A64_STR64I(A64_R...
86c96e7289c5758284b562ac7b5c94429f48d2d9
Analyze and fix the following issue in the Linux kernel code: ALSA: hda/tas2781: select CRC32 instead of CRC32_SARWATE
Problem Details: Fix the kconfig option for the tas2781 HDA driver to select CRC32 rather than CRC32_SARWATE. CRC32_SARWATE is an option from the kconfig 'choice' that selects the specific CRC32 implementation. Selecting a 'choice' option seems to have no effect, but even if it did work, it would be incorrect for a r...
```diff diff --git a/sound/pci/hda/Kconfig b/sound/pci/hda/Kconfig index bb15a0248250..68f1eee9e5c9 100644 --- a/sound/pci/hda/Kconfig +++ b/sound/pci/hda/Kconfig @@ -198,7 +198,7 @@ config SND_HDA_SCODEC_TAS2781_I2C depends on SND_SOC select SND_SOC_TAS2781_COMLIB select SND_SOC_TAS2781_FMWLIB - select CRC32_SAR...
35fdc6e1c16099078bcbd73a6c8f1733ae7f1909
Analyze and fix the following issue in the Linux kernel code: ALSA: hda/realtek: Add subwoofer quirk for Acer Predator G9-593
Problem Details: The Acer Predator G9-593 has a 2+1 speaker system which isn't probed correctly. This patch adds a quirk with the proper pin connections. Note that I do not own this laptop, so I cannot guarantee that this fixes the issue. Testing was done by other users here: https://discussion.fedoraproject.org/t/-/1...
```diff diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 3bbf5fab2881..edf688f989c8 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -7649,6 +7649,7 @@ enum { ALC286_FIXUP_ACER_AIO_HEADSET_MIC, ALC256_FIXUP_ASUS_HEADSET_MIC, ALC256_FIXUP_ASUS_MIC_NO...
a0b6594e411dcae0cc563f5157cf062e93603388
Analyze and fix the following issue in the Linux kernel code: gpio: sloppy-logic-analyzer remove reference to rcu_momentary_dyntick_idle()
Problem Details: There is one last reference to rcu_momentary_dyntick_idle() after commit 32a9f26e5e26 ("rcu: Rename rcu_momentary_dyntick_idle() into rcu_momentary_eqs()") Rename it for consistency. Fixes: 32a9f26e5e26 ("rcu: Rename rcu_momentary_dyntick_idle() into rcu_momentary_eqs()") Signed-off-by: Srikar Dronam...
```diff diff --git a/tools/gpio/gpio-sloppy-logic-analyzer.sh b/tools/gpio/gpio-sloppy-logic-analyzer.sh index ed21a110df5e..3ef2278e49f9 100755 --- a/tools/gpio/gpio-sloppy-logic-analyzer.sh +++ b/tools/gpio/gpio-sloppy-logic-analyzer.sh @@ -113,7 +113,7 @@ init_cpu() taskset -p "$newmask" "$p" || continue done 2...
d0c3a7aa814c091843ccca467c02078db9da4e1e
Analyze and fix the following issue in the Linux kernel code: Input: serio_raw - fix uninitialized variable bug
Problem Details: Recent conversion of the driver to use guard notation for locks and other resources introduced a bug: "written" variable that is supposed to hold number of bytes successfully written was not initialized. Fix it by initializing the variable with 0. Reported-by: kernel test robot <lkp@intel.com> Closes...
```diff diff --git a/drivers/input/serio/serio_raw.c b/drivers/input/serio/serio_raw.c index e058fef07f57..4d6395088986 100644 --- a/drivers/input/serio/serio_raw.c +++ b/drivers/input/serio/serio_raw.c @@ -185,7 +185,7 @@ static ssize_t serio_raw_write(struct file *file, const char __user *buffer, { struct serio_ra...
72cafe63b35d06b5cfbaf807e90ae657907858da
Analyze and fix the following issue in the Linux kernel code: ALSA: firewire-lib: Avoid division by zero in apply_constraint_to_size()
Problem Details: The step variable is initialized to zero. It is changed in the loop, but if it's not changed it will remain zero. Add a variable check before the division. The observed behavior was introduced by commit 826b5de90c0b ("ALSA: firewire-lib: fix insufficient PCM rule for period/buffer size"), and it is di...
```diff diff --git a/sound/firewire/amdtp-stream.c b/sound/firewire/amdtp-stream.c index c72b2a754775..7fc51f829ecc 100644 --- a/sound/firewire/amdtp-stream.c +++ b/sound/firewire/amdtp-stream.c @@ -172,6 +172,9 @@ static int apply_constraint_to_size(struct snd_pcm_hw_params *params, step = max(step, amdtp_syt_inte...
338b655a1178900ac05aca7ac66dc28b05100430
Analyze and fix the following issue in the Linux kernel code: i915: fix DRM_I915_GVT_KVMGT dependencies
Problem Details: Depending on x86 and KVM is not enough, as the kvm helper functions that get called here are controlled by CONFIG_KVM_X86, which is disabled if both KVM_INTEL and KVM_AMD are turned off. ERROR: modpost: "kvm_write_track_remove_gfn" [drivers/gpu/drm/i915/kvmgt.ko] undefined! ERROR: modpost: "kvm_page_t...
```diff diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig index faa253b27664..14ac351fd76d 100644 --- a/drivers/gpu/drm/i915/Kconfig +++ b/drivers/gpu/drm/i915/Kconfig @@ -123,9 +123,8 @@ config DRM_I915_USERPTR config DRM_I915_GVT_KVMGT tristate "Enable KVM host support Intel GVT-g graphics v...
05b94cae1c47f94588c3e7096963c1007c4d9c1d
Analyze and fix the following issue in the Linux kernel code: powerpc/fadump: Move fadump_cma_init to setup_arch() after initmem_init()
Problem Details: During early init CMA_MIN_ALIGNMENT_BYTES can be PAGE_SIZE, since pageblock_order is still zero and it gets initialized later during initmem_init() e.g. setup_arch() -> initmem_init() -> sparse_init() -> set_pageblock_order() One such use case where this causes issue is - early_setup() -> early_init_d...
```diff diff --git a/arch/powerpc/include/asm/fadump.h b/arch/powerpc/include/asm/fadump.h index ef40c9b6972a..3638f04447f5 100644 --- a/arch/powerpc/include/asm/fadump.h +++ b/arch/powerpc/include/asm/fadump.h @@ -34,4 +34,11 @@ extern int early_init_dt_scan_fw_dump(unsigned long node, const char *uname, in...
6faeac507beb2935d9171a01c3877b0505689c58
Analyze and fix the following issue in the Linux kernel code: powerpc/fadump: Reserve page-aligned boot_memory_size during fadump_reserve_mem
Problem Details: This patch refactors all CMA related initialization and alignment code to within fadump_cma_init() which gets called in the end. This also means that we keep [reserve_dump_area_start, boot_memory_size] page aligned during fadump_reserve_mem(). Then later in fadump_cma_init() we extract the aligned chun...
```diff diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c index 162327d66982..ffaec625b7a8 100644 --- a/arch/powerpc/kernel/fadump.c +++ b/arch/powerpc/kernel/fadump.c @@ -80,7 +80,7 @@ static struct cma *fadump_cma; */ static void __init fadump_cma_init(void) { - unsigned long long base, siz...
373b9338c9722a368925d83bc622c596896b328e
Analyze and fix the following issue in the Linux kernel code: uprobe: avoid out-of-bounds memory access of fetching args
Problem Details: Uprobe needs to fetch args into a percpu buffer, and then copy to ring buffer to avoid non-atomic context problem. Sometimes user-space strings, arrays can be very large, but the size of percpu buffer is only page size. And store_trace_args() won't check whether these data exceeds a single page or not...
```diff diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c index c40531d2cbad..13f9270ed5ab 100644 --- a/kernel/trace/trace_uprobe.c +++ b/kernel/trace/trace_uprobe.c @@ -875,6 +875,7 @@ struct uprobe_cpu_buffer { }; static struct uprobe_cpu_buffer __percpu *uprobe_cpu_buffer; static int uprobe_b...
a069f014797fdef8757f3adebc1c16416271a599
Analyze and fix the following issue in the Linux kernel code: bcachefs: Set bch_inode_unpacked.bi_snapshot in old inode path
Problem Details: This fixes a fsck bug on a very old filesystem (pre mainline merge). Fixes: 72350ee0ea22 ("bcachefs: Kill snapshot arg to fsck_write_inode()") Reported-by: Marcin Mirosław <marcin@mejor.pl> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/inode.c b/fs/bcachefs/inode.c index b9fde1566df1..6b7143e6abca 100644 --- a/fs/bcachefs/inode.c +++ b/fs/bcachefs/inode.c @@ -283,6 +283,8 @@ static noinline int bch2_inode_unpack_slowpath(struct bkey_s_c k, { memset(unpacked, 0, sizeof(*unpacked)); + unpacked->bi_snapshot = k.k->p...
e04ee8608914d00812e4a10288cf8d8905ced849
Analyze and fix the following issue in the Linux kernel code: bcachefs: Mark more errors as AUTOFIX
Problem Details: Reported-by: Marcin Mirosław <marcin@mejor.pl> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/sb-errors_format.h b/fs/bcachefs/sb-errors_format.h index aab328ac6dfa..937275d061fe 100644 --- a/fs/bcachefs/sb-errors_format.h +++ b/fs/bcachefs/sb-errors_format.h @@ -267,8 +267,8 @@ enum bch_fsck_flags { x(journal_entry_dup_same_device, 246, 0) \ x(inode_bi_subvol_missing, ...
06b919e3fedf4798a1f0f60e0b67caa192f724a7
Analyze and fix the following issue in the Linux kernel code: drm/panic: allow verbose version check
Problem Details: Clippy warns about a reimplementation of `RangeInclusive::contains`: error: manual `!RangeInclusive::contains` implementation --> drivers/gpu/drm/drm_panic_qr.rs:986:8 | 986 | if version < 1 || version > 40 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(1..=40)...
```diff diff --git a/drivers/gpu/drm/drm_panic_qr.rs b/drivers/gpu/drm/drm_panic_qr.rs index 2d4e367f0fcd..09500cddc009 100644 --- a/drivers/gpu/drm/drm_panic_qr.rs +++ b/drivers/gpu/drm/drm_panic_qr.rs @@ -983,6 +983,7 @@ pub unsafe extern "C" fn drm_panic_qr_generate( /// * If `url_len` = 0, only removes 3 bytes for...
27aef8a52e4b7f120ce47cd638d9d83065b759d2
Analyze and fix the following issue in the Linux kernel code: drm/panic: allow verbose boolean for clarity
Problem Details: Clippy complains about a non-minimal boolean expression with `nonminimal_bool`: error: this boolean expression can be simplified --> drivers/gpu/drm/drm_panic_qr.rs:722:9 | 722 | (x < 8 && y < 8) || (x < 8 && y >= end) || (x >= end && y < 8) | ^^^^^^^^^^^...
```diff diff --git a/drivers/gpu/drm/drm_panic_qr.rs b/drivers/gpu/drm/drm_panic_qr.rs index 58c46f366f76..2d4e367f0fcd 100644 --- a/drivers/gpu/drm/drm_panic_qr.rs +++ b/drivers/gpu/drm/drm_panic_qr.rs @@ -719,7 +719,10 @@ impl QrImage<'_> { fn is_finder(&self, x: u8, y: u8) -> bool { let end = self.wi...
3956ff8bc2f39a7e77d7a6da8d95c7ffc4928d64
Analyze and fix the following issue in the Linux kernel code: bcachefs: Don't use wait_event_interruptible() in recovery
Problem Details: Fix a bug where mount was failing with -ERESTARTSYS: https://github.com/koverstreet/bcachefs/issues/741 We only want the interruptible wait when called from fsync. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/fs-io.c b/fs/bcachefs/fs-io.c index 71d0fa387509..15d3f073b824 100644 --- a/fs/bcachefs/fs-io.c +++ b/fs/bcachefs/fs-io.c @@ -182,7 +182,7 @@ static int bch2_flush_inode(struct bch_fs *c, struct bch_inode_unpacked u; int ret = bch2_inode_find_by_inum(c, inode_inum(inode), &u) ?: -...
eb5db64c4570948e6ee0b0f53d658e136e06cd04
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix __bch2_fsck_err() warning
Problem Details: We only warn about having a btree_trans that wasn't passed in if we'll be prompting. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/error.c b/fs/bcachefs/error.c index 7a79f695ba2e..b679def8fb98 100644 --- a/fs/bcachefs/error.c +++ b/fs/bcachefs/error.c @@ -251,7 +251,10 @@ int __bch2_fsck_err(struct bch_fs *c, * delete the key) * - and we don't need to warn if we're not prompting */ - WARN_ON(!(flags & F...
c33a0a02a29bde53a85407f86f332ac4bbc5ab87
Analyze and fix the following issue in the Linux kernel code: arm64: dts: ti: k3-am62x-phyboard-lyra: Drop unnecessary McASP AFIFOs
Problem Details: Drop the McASP AFIFOs for better audio latency. This adds back a change that was lost while refactoring the device tree. Fixes: 554dd562a5f2 ("arm64: dts: ti: k3-am625-phyboard-lyra-rdk: Drop McASP AFIFOs") Signed-off-by: Nathan Morrisson <nmorrisson@phytec.com> Reviewed-by: Wadim Egorov <w.egorov@phy...
```diff diff --git a/arch/arm64/boot/dts/ti/k3-am62x-phyboard-lyra.dtsi b/arch/arm64/boot/dts/ti/k3-am62x-phyboard-lyra.dtsi index e4633af87eb9..d6ce53c6d748 100644 --- a/arch/arm64/boot/dts/ti/k3-am62x-phyboard-lyra.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62x-phyboard-lyra.dtsi @@ -433,8 +433,6 @@ 0 0 0 0 0 0 0...
773cca183440e74690dbb4f3f54bc7748f255821
Analyze and fix the following issue in the Linux kernel code: KVM: selftests: Fix out-of-bounds reads in CPUID test's array lookups
Problem Details: When looking for a "mangled", i.e. dynamic, CPUID entry, terminate the walk based on the number of array _entries_, not the size in bytes of the array. Iterating based on the total size of the array can result in false passes, e.g. if the random data beyond the array happens to match a CPUID entry's f...
```diff diff --git a/tools/testing/selftests/kvm/x86_64/cpuid_test.c b/tools/testing/selftests/kvm/x86_64/cpuid_test.c index 8c579ce714e9..fec03b11b059 100644 --- a/tools/testing/selftests/kvm/x86_64/cpuid_test.c +++ b/tools/testing/selftests/kvm/x86_64/cpuid_test.c @@ -60,7 +60,7 @@ static bool is_cpuid_mangled(const ...
9e2ffec543b088b4c7dc24a40438cbd3426fb71c
Analyze and fix the following issue in the Linux kernel code: eth: Fix typo 'accelaration'. 'exprienced' and 'rewritting'
Problem Details: There are some spelling mistakes of 'accelaration', 'exprienced' and 'rewritting' in comments which should be 'acceleration', 'experienced' and 'rewriting'. Suggested-by: Simon Horman <horms@kernel.org> Link: https://lore.kernel.org/all/20241017162846.GA51712@kernel.org/ Signed-off-by: WangYuli <wangy...
```diff diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index f5da2dace982..bda3742d4e32 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -12881,7 +12881,7 @@ static netdev_features_t bnxt_fix_features(struct net...
b544223bec9f710256543eadc1b8b8344f80d665
Analyze and fix the following issue in the Linux kernel code: net: phy: mediatek-ge-soc: Fix coding style
Problem Details: This patch fixes spelling errors, re-arrange vars with reverse Xmas tree and remove unnecessary parens in mediatek-ge-soc.c. Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
```diff diff --git a/drivers/net/phy/mediatek-ge-soc.c b/drivers/net/phy/mediatek-ge-soc.c index f4f9412d0cd7..e9c422f4e24b 100644 --- a/drivers/net/phy/mediatek-ge-soc.c +++ b/drivers/net/phy/mediatek-ge-soc.c @@ -408,16 +408,17 @@ static int tx_offset_cal_efuse(struct phy_device *phydev, u32 *buf) static int tx_am...
1c105bacb160b5918e917ab811552b7be69fc69c
Analyze and fix the following issue in the Linux kernel code: r8169: avoid duplicated messages if loading firmware fails and switch to warn level
Problem Details: In case of a problem with firmware loading we inform at the driver level, in addition the firmware load code itself issues warnings. Therefore switch to firmware_request_nowarn() to avoid duplicated error messages. In addition switch to warn level because the firmware is optional and typically just fix...
```diff diff --git a/drivers/net/ethernet/realtek/r8169_firmware.c b/drivers/net/ethernet/realtek/r8169_firmware.c index ed6e721b1555..bf055078a855 100644 --- a/drivers/net/ethernet/realtek/r8169_firmware.c +++ b/drivers/net/ethernet/realtek/r8169_firmware.c @@ -215,7 +215,7 @@ int rtl_fw_request_firmware(struct rtl_fw...
d3296a9d0bc2576a8e3dee7925d6f47e1f225fc2
Analyze and fix the following issue in the Linux kernel code: eth: fbnic: add CONFIG_PTP_1588_CLOCK_OPTIONAL dependency
Problem Details: fbnic fails to link as built-in when PTP support is in a loadable module: aarch64-linux-ld: drivers/net/ethernet/meta/fbnic/fbnic_ethtool.o: in function `fbnic_get_ts_info': fbnic_ethtool.c:(.text+0x428): undefined reference to `ptp_clock_index' aarch64-linux-ld: drivers/net/ethernet/meta/fbnic/fbnic_...
```diff diff --git a/drivers/net/ethernet/meta/Kconfig b/drivers/net/ethernet/meta/Kconfig index 85519690b837..831921b9d4d5 100644 --- a/drivers/net/ethernet/meta/Kconfig +++ b/drivers/net/ethernet/meta/Kconfig @@ -23,6 +23,7 @@ config FBNIC depends on !S390 depends on MAX_SKB_FRAGS < 22 depends on PCI_MSI + depe...
12bc14949c4a7272b509af0f1022a0deeb215fd8
Analyze and fix the following issue in the Linux kernel code: net: dsa: mv88e6xxx: Fix error when setting port policy on mv88e6393x
Problem Details: mv88e6393x_port_set_policy doesn't correctly shift the ptr value when converting the policy format between the old and new styles, so the target register ends up with the ptr being written over the data bits. Shift the pointer to align with the format expected by mv88e6393x_port_policy_write(). Fixes...
```diff diff --git a/drivers/net/dsa/mv88e6xxx/port.c b/drivers/net/dsa/mv88e6xxx/port.c index 5394a8cf7bf1..04053fdc6489 100644 --- a/drivers/net/dsa/mv88e6xxx/port.c +++ b/drivers/net/dsa/mv88e6xxx/port.c @@ -1713,6 +1713,7 @@ int mv88e6393x_port_set_policy(struct mv88e6xxx_chip *chip, int port, ptr = shift / 8; ...
5bb698e6fc514ddd9e23b6649b29a0934d8d8586
Analyze and fix the following issue in the Linux kernel code: drm/panic: correctly indent continuation of line in list item
Problem Details: It is common practice in Rust to indent the next line the same amount of space as the previous one if both belong to the same list item. Clippy checks for this with the lint `doc_lazy_continuation`. error: doc list item without indentation --> drivers/gpu/drm/drm_panic_qr.rs:979:5 | ...
```diff diff --git a/drivers/gpu/drm/drm_panic_qr.rs b/drivers/gpu/drm/drm_panic_qr.rs index 5b2386a515fa..58c46f366f76 100644 --- a/drivers/gpu/drm/drm_panic_qr.rs +++ b/drivers/gpu/drm/drm_panic_qr.rs @@ -976,7 +976,7 @@ pub unsafe extern "C" fn drm_panic_qr_generate( /// * `url_len`: Length of the URL. /// /// * ...
da13129a3f2a75d49469e1d6f7dcefac2d11d205
Analyze and fix the following issue in the Linux kernel code: drm/panic: remove redundant field when assigning value
Problem Details: Rust allows initializing fields of a struct without specifying the attribute that is assigned if the variable has the same name. In this instance this is done for all other attributes of the struct except for `data`. Clippy notes the redundant field name: error: redundant field names in struct ini...
```diff diff --git a/drivers/gpu/drm/drm_panic_qr.rs b/drivers/gpu/drm/drm_panic_qr.rs index 767a8eb0acec..5b2386a515fa 100644 --- a/drivers/gpu/drm/drm_panic_qr.rs +++ b/drivers/gpu/drm/drm_panic_qr.rs @@ -489,7 +489,7 @@ impl EncodedMsg<'_> { data.fill(0); let mut em = EncodedMsg { - da...
ae75c40117b53ae3d91dfc9d0bf06984a079f044
Analyze and fix the following issue in the Linux kernel code: drm/panic: prefer eliding lifetimes
Problem Details: Eliding lifetimes when possible instead of specifying them directly is both shorter and easier to read. Clippy notes this in the `needless_lifetimes` lint: error: the following explicit lifetimes could be elided: 'b --> drivers/gpu/drm/drm_panic_qr.rs:479:16 | 479 | fn new<'...
```diff diff --git a/drivers/gpu/drm/drm_panic_qr.rs b/drivers/gpu/drm/drm_panic_qr.rs index 7adfaa3d6222..767a8eb0acec 100644 --- a/drivers/gpu/drm/drm_panic_qr.rs +++ b/drivers/gpu/drm/drm_panic_qr.rs @@ -476,7 +476,7 @@ struct EncodedMsg<'a> { /// Data to be put in the QR code, with correct segment encoding, paddin...
7b6de57e0b2d1e62becfa3aac063c4c58d2c2c42
Analyze and fix the following issue in the Linux kernel code: drm/panic: remove unnecessary borrow in alignment_pattern
Problem Details: The function `alignment_pattern` returns a static reference to a `u8` slice. The borrow of the returned element in `ALIGNMENT_PATTERNS` is already a reference as defined in the array definition above so this borrow is unnecessary and removed by the compiler. Clippy notes this in `needless_borrow`: ...
```diff diff --git a/drivers/gpu/drm/drm_panic_qr.rs b/drivers/gpu/drm/drm_panic_qr.rs index 76decf49e678..7adfaa3d6222 100644 --- a/drivers/gpu/drm/drm_panic_qr.rs +++ b/drivers/gpu/drm/drm_panic_qr.rs @@ -239,7 +239,7 @@ impl Version { } fn alignment_pattern(&self) -> &'static [u8] { - &ALIGNMENT_P...
c408dd81678bb0a957eae96962c913c242e069f7
Analyze and fix the following issue in the Linux kernel code: drm/panic: avoid reimplementing Iterator::find
Problem Details: Rust's standard library's `std::iter::Iterator` trait provides a function `find` that finds the first element that satisfies a predicate. The function `Version::from_segments` is doing the same thing but is implementing the same logic itself. Clippy complains about this in the `manual_find` lint: ...
```diff diff --git a/drivers/gpu/drm/drm_panic_qr.rs b/drivers/gpu/drm/drm_panic_qr.rs index 1ef56cb07dfb..76decf49e678 100644 --- a/drivers/gpu/drm/drm_panic_qr.rs +++ b/drivers/gpu/drm/drm_panic_qr.rs @@ -209,12 +209,9 @@ const FORMAT_INFOS_QR_L: [u16; 8] = [ impl Version { /// Returns the smallest QR version t...
f559b2e9c5c5308850544ab59396b7d53cfc67bd
Analyze and fix the following issue in the Linux kernel code: KVM: nSVM: Ignore nCR3[4:0] when loading PDPTEs from memory
Problem Details: Ignore nCR3[4:0] when loading PDPTEs from memory for nested SVM, as bits 4:0 of CR3 are ignored when PAE paging is used, and thus VMRUN doesn't enforce 32-byte alignment of nCR3. In the absolute worst case scenario, failure to ignore bits 4:0 can result in an out-of-bounds read, e.g. if the target pag...
```diff diff --git a/arch/x86/kvm/svm/nested.c b/arch/x86/kvm/svm/nested.c index d5314cb7dff4..cf84103ce38b 100644 --- a/arch/x86/kvm/svm/nested.c +++ b/arch/x86/kvm/svm/nested.c @@ -63,8 +63,12 @@ static u64 nested_svm_get_tdp_pdptr(struct kvm_vcpu *vcpu, int index) u64 pdpte; int ret; + /* + * Note, nCR3 is "a...
731285fbb6f5bea357d79059db865f351626e689
Analyze and fix the following issue in the Linux kernel code: KVM: VMX: reset the segment cache after segment init in vmx_vcpu_reset()
Problem Details: Reset the segment cache after segment initialization in vmx_vcpu_reset() to harden KVM against caching stale/uninitialized data. Without the recent fix to bypass the cache in kvm_arch_vcpu_put(), the following scenario is possible: - vCPU is just created, and the vCPU thread is preempted before S...
```diff diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c index 1a4438358c5e..81ed596e4454 100644 --- a/arch/x86/kvm/vmx/vmx.c +++ b/arch/x86/kvm/vmx/vmx.c @@ -4888,9 +4888,6 @@ void vmx_vcpu_reset(struct kvm_vcpu *vcpu, bool init_event) vmx->hv_deadline_tsc = -1; kvm_set_cr8(vcpu, 0); - vmx_segment_ca...
5a279842441b68727d53b6333d0c3af90dd5a2f8
Analyze and fix the following issue in the Linux kernel code: KVM: x86: Clean up documentation for KVM_X86_QUIRK_SLOT_ZAP_ALL
Problem Details: Massage the documentation for KVM_X86_QUIRK_SLOT_ZAP_ALL to call out that it applies to moved memslots as well as deleted memslots, to avoid KVM's "fast zap" terminology (which has no meaning for userspace), and to reword the documented targeted zap behavior to specifically say that KVM _may_ zap a sub...
```diff diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst index e32471977d0a..edc070c6e19b 100644 --- a/Documentation/virt/kvm/api.rst +++ b/Documentation/virt/kvm/api.rst @@ -8098,13 +8098,15 @@ KVM_X86_QUIRK_MWAIT_NEVER_UD_FAULTS By default, KVM emulates MONITOR/MWAIT (if ...
45608a3eb4902f32010a8328c0a01ccda4b38c9b
Analyze and fix the following issue in the Linux kernel code: drm: panel: nv3052c: correct spi_device_id for RG35XX panel
Problem Details: The Anbernic RG35XX devices use an SPI LCD panel from an unknown OEM, with an NV3052C driver chip. As discussed previously, the integrating vendor and device name are preferred instead of the OEM serial. A previous patch corrected the device tree binding and of_device_id in the NV3052C driver, however...
```diff diff --git a/drivers/gpu/drm/panel/panel-newvision-nv3052c.c b/drivers/gpu/drm/panel/panel-newvision-nv3052c.c index d3baccfe6286..06e16a7c14a7 100644 --- a/drivers/gpu/drm/panel/panel-newvision-nv3052c.c +++ b/drivers/gpu/drm/panel/panel-newvision-nv3052c.c @@ -917,7 +917,7 @@ static const struct nv3052c_panel...
272167499ffac79d57d96b90d0458e0dad54488c
Analyze and fix the following issue in the Linux kernel code: Input: gscps2 - fix compilation error introduced with switch to guards
Problem Details: Change 44f920069911 ("Input: gscps2 - use guard notation when acquiring spinlock") introduced typos resulting in compile errors noticed by the kernel test robot. Fix them. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202410192242.GL0CoAbv-lkp@intel.com/ ...
```diff diff --git a/drivers/input/serio/gscps2.c b/drivers/input/serio/gscps2.c index cf0603d1a113..4fada5bc2a38 100644 --- a/drivers/input/serio/gscps2.c +++ b/drivers/input/serio/gscps2.c @@ -198,8 +198,6 @@ static void gscps2_enable(struct gscps2port *ps2port, int enable) static void gscps2_reset(struct gscps2po...
74432751ff638be0b343494cdb3e8c4624ac0093
Analyze and fix the following issue in the Linux kernel code: wifi: rtw89: 8852c: use 'int' as return type of error code pwr_{on,off}_func()
Problem Details: The return type of error code of rtw8852c_pwr_{on,off}_func() and its callee is 'int'. Correct it. Addresses-Coverity-ID: 1626056 ("Overflowed constant") Addresses-Coverity-ID: 1627945 ("Overflowed constant") Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/202410090043...
```diff diff --git a/drivers/net/wireless/realtek/rtw89/rtw8852c.c b/drivers/net/wireless/realtek/rtw89/rtw8852c.c index dbe77abb2c48..c58b3e8068f4 100644 --- a/drivers/net/wireless/realtek/rtw89/rtw8852c.c +++ b/drivers/net/wireless/realtek/rtw89/rtw8852c.c @@ -203,7 +203,7 @@ static void rtw8852c_ctrl_tx_path_tmac(st...