id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
2bc7e7c1a3bc9bd0cbf0f71006f6fe7ef24a00c2
Analyze and fix the following issue in the Linux kernel code: ext4: disallow ea_inodes with extended attributes
Problem Details: An ea_inode stores the value of an extended attribute; it can not have extended attributes itself, or this will cause recursive nightmares. Add a check in ext4_iget() to make sure this is the case. Cc: stable@kernel.org Reported-by: syzbot+e44749b6ba4d0434cd47@syzkaller.appspotmail.com Signed-off-by: ...
```diff diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 258f3cbed347..02de439bf1f0 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -4647,6 +4647,9 @@ static const char *check_igot_inode(struct inode *inode, ext4_iget_flags flags) if (flags & EXT4_IGET_EA_INODE) { if (!(EXT4_I(inode)->i_flags & EXT4_EA_I...
b928dfdcb27d8fa59917b794cfba53052a2f050f
Analyze and fix the following issue in the Linux kernel code: ext4: set lockdep subclass for the ea_inode in ext4_xattr_inode_cache_find()
Problem Details: If the ea_inode has been pushed out of the inode cache while there is still a reference in the mb_cache, the lockdep subclass will not be set on the inode, which can lead to some lockdep false positives. Fixes: 33d201e0277b ("ext4: fix lockdep warning about recursive inode locking") Cc: stable@kernel....
```diff diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c index a27208129a80..ff7ab63c5b4f 100644 --- a/fs/ext4/xattr.c +++ b/fs/ext4/xattr.c @@ -1539,6 +1539,7 @@ ext4_xattr_inode_cache_find(struct inode *inode, const void *value, EXT4_IGET_EA_INODE); if (IS_ERR(ea_inode)) goto next_entry; + ext4_xattr_...
2997d94b5dd0e8b10076f5e0b6f18410c73e28bd
Analyze and fix the following issue in the Linux kernel code: x86/resctrl: Only show tasks' pid in current pid namespace
Problem Details: When writing a task id to the "tasks" file in an rdtgroup, rdtgroup_tasks_write() treats the pid as a number in the current pid namespace. But when reading the "tasks" file, rdtgroup_tasks_show() shows the list of global pids from the init namespace, which is confusing and incorrect. To be more robust...
```diff diff --git a/arch/x86/kernel/cpu/resctrl/rdtgroup.c b/arch/x86/kernel/cpu/resctrl/rdtgroup.c index 6ad33f355861..61cdd9b1bb6d 100644 --- a/arch/x86/kernel/cpu/resctrl/rdtgroup.c +++ b/arch/x86/kernel/cpu/resctrl/rdtgroup.c @@ -726,11 +726,15 @@ unlock: static void show_rdt_tasks(struct rdtgroup *r, struct seq_...
55c33e5ee6d3dff13125bdd32b7fa98260680a31
Analyze and fix the following issue in the Linux kernel code: spi: spi-qcom-qspi: Add newline to PIO fallback warning
Problem Details: A warning added in commit b5762d95607e ("spi: spi-qcom-qspi: Add DMA mode support") was missing a newline. Add it. Reported-by: Stephen Boyd <swboyd@chromium.org> Closes: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4573857/comment/44331d65_79128099/ Fixes: b5762d95607e (...
```diff diff --git a/drivers/spi/spi-qcom-qspi.c b/drivers/spi/spi-qcom-qspi.c index a3991e617c90..a8a683d6145c 100644 --- a/drivers/spi/spi-qcom-qspi.c +++ b/drivers/spi/spi-qcom-qspi.c @@ -445,7 +445,7 @@ static int qcom_qspi_transfer_one(struct spi_master *master, qcom_qspi_dma_xfer(ctrl); goto exit; } -...
60413129ee2b38a80347489270af7f6e1c1de4d0
Analyze and fix the following issue in the Linux kernel code: ASoC: es8316: Do not set rate constraints for unsupported MCLKs
Problem Details: When using the codec through the generic audio graph card, there are at least two calls of es8316_set_dai_sysclk(), with the effect of limiting the allowed sample rates according to the MCLK/LRCK ratios supported by the codec: 1. During audio card setup, to set the initial MCLK - see asoc_simple_in...
```diff diff --git a/sound/soc/codecs/es8316.c b/sound/soc/codecs/es8316.c index 18d485e6921a..ccecfdf70064 100644 --- a/sound/soc/codecs/es8316.c +++ b/sound/soc/codecs/es8316.c @@ -369,13 +369,11 @@ static int es8316_set_dai_sysclk(struct snd_soc_dai *codec_dai, int count = 0; es8316->sysclk = freq; + es8316->s...
6f073429037cd79d7311cd8236311c53f5ea8f01
Analyze and fix the following issue in the Linux kernel code: ASoC: es8316: Increment max value for ALC Capture Target Volume control
Problem Details: The following error occurs when trying to restore a previously saved ALSA mixer state (tested on a Rock 5B board): $ alsactl --no-ucm -f /tmp/asound.state store hw:Analog $ alsactl --no-ucm -I -f /tmp/asound.state restore hw:Analog alsactl: set_control:1475: Cannot write control '2:0:0:ALC Captu...
```diff diff --git a/sound/soc/codecs/es8316.c b/sound/soc/codecs/es8316.c index a27d80956459..18d485e6921a 100644 --- a/sound/soc/codecs/es8316.c +++ b/sound/soc/codecs/es8316.c @@ -52,7 +52,12 @@ static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(dac_vol_tlv, -9600, 50, 1); static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(adc...
c4fb6880edc15866a530c7b8f2698ae65f80cfab
Analyze and fix the following issue in the Linux kernel code: spi: dt-bindings: restrict node name suffixes
Problem Details: Make the pattern matching node names a bit stricter to improve DTS consistency. The pattern is restricted to: 1. Only one unit address or one -N suffix, 2. -N suffixes to decimal numbers. Suggested-by: Rob Herring <robh@kernel.org> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> L...
```diff diff --git a/Documentation/devicetree/bindings/spi/spi-controller.yaml b/Documentation/devicetree/bindings/spi/spi-controller.yaml index 90945f59b7e8..524f6fe8c27b 100644 --- a/Documentation/devicetree/bindings/spi/spi-controller.yaml +++ b/Documentation/devicetree/bindings/spi/spi-controller.yaml @@ -17,7 +17,...
2ce38cc1e8fea4e251e4563e436104369bf3b322
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: sc8180x: Introduce Primus
Problem Details: Introduce support for the SC8180X reference device, aka Primus, with debug UART, regulators, UFS and USB support. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Bjorn Andersson <andersson@kernel.org> Link: https://lore.kernel.org...
```diff diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile index 1ad68b728f50..c004849a095c 100644 --- a/arch/arm64/boot/dts/qcom/Makefile +++ b/arch/arm64/boot/dts/qcom/Makefile @@ -147,6 +147,7 @@ dtb-$(CONFIG_ARCH_QCOM) += sc7280-herobrine-zombie-nvme-lte.dtb dtb-$(CONFIG_ARCH_QCOM) ...
1eac0f956608e5bfb5a588ac2a7e98a8e1928e75
Analyze and fix the following issue in the Linux kernel code: dt-bindings: phy: qcom,qmp-usb: fix bindings error
Problem Details: Merge two allOf clauses, which sneaked in in two different patches. Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml:109:1: found duplicate key "allOf" with value "[]" (original value: "[]") Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml:109:1: [erro...
```diff diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml index 2c3e2ede6671..f99fbbcd68fb 100644 --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml +++ b/Documentation/devicetre...
db3e33dd8bd956f165436afdbdbf1c653fb3c8e6
Analyze and fix the following issue in the Linux kernel code: module: fix module load for ia64
Problem Details: Frank reported boot regression in ia64 as: ELILO v3.16 for EFI/IA-64 .. Uncompressing Linux... done Loading file AC100221.initrd.img...done [ 0.000000] Linux version 6.4.0-rc3 (root@x4270) (ia64-linux-gcc (GCC) 12.2.0, GNU ld (GNU Binutils) 2.39) #1 SMP Thu May 25 15:52:20 CEST 2023 [ 0.000000] ...
```diff diff --git a/kernel/module/main.c b/kernel/module/main.c index 044aa2c9e3cb..4e2cf784cf8c 100644 --- a/kernel/module/main.c +++ b/kernel/module/main.c @@ -1521,14 +1521,14 @@ static void __layout_sections(struct module *mod, struct load_info *info, bool i MOD_RODATA, MOD_RO_AFTER_INIT, MOD_DATA, - MOD...
774a9636514764ddc0d072ae0d1d1c01a47e6ddd
Analyze and fix the following issue in the Linux kernel code: nvme: check IO start time when deciding to defer KA
Problem Details: When a command completes, we set a flag which will skip sending a keep alive at the next run of nvme_keep_alive_work when TBKAS is on. However, if the command was submitted long ago, it's possible that the controller may have also restarted its keep alive timer (as a result of receiving the command) lo...
```diff diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 6417c7928fa3..dbfca1b925f8 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -397,7 +397,16 @@ void nvme_complete_rq(struct request *req) trace_nvme_complete_rq(req); nvme_cleanup_cmd(req); - if (ctrl->kas) + /* +...
ea4d453b9ec9ea279c39744cd0ecb47ef48ede35
Analyze and fix the following issue in the Linux kernel code: nvme: double KA polling frequency to avoid KATO with TBKAS on
Problem Details: With TBKAS on, the completion of one command can defer sending a keep alive for up to twice the delay between successive runs of nvme_keep_alive_work. The current delay of KATO / 2 thus makes it possible for one command to defer sending a keep alive for up to KATO, which can result in the controller de...
```diff diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index c6cba1cc101c..6417c7928fa3 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -1163,9 +1163,25 @@ EXPORT_SYMBOL_NS_GPL(nvme_passthru_end, NVME_TARGET_PASSTHRU); * The host should send Keep Alive commands at half of t...
31a5978243d24d77be4bacca56c78a0fbc43b00d
Analyze and fix the following issue in the Linux kernel code: nvme: fix miss command type check
Problem Details: In the function nvme_passthru_end(), only the value of the command opcode is checked, without checking the command type (IO command or Admin command). When we send a Dataset Management command (The opcode of the Dataset Management command is the same as the Set Feature command), kernel thinks it is a s...
```diff diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 1f0cbb77b249..c6cba1cc101c 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -1115,7 +1115,7 @@ u32 nvme_passthru_start(struct nvme_ctrl *ctrl, struct nvme_ns *ns, u8 opcode) } EXPORT_SYMBOL_NS_GPL(nvme_passthru_start...
422db30713ac84080a8c4b3efa9dd560b654ed57
Analyze and fix the following issue in the Linux kernel code: perf kvm powerpc: Add missing rename opf pmu_have_event() to perf_pmus__have_event()
Problem Details: Missed function rename from pmu_have_event to perf_pmus__have_event made the perf build fail on powerpc. Committer notes: The perf_pmus__have_event() is declared in util/pmus.h, so use it instead of by now needless util/pmu.h. Fixes: 1eaf496ed386934f ("perf pmu: Separate pmu and pmus") Reported-by: ...
```diff diff --git a/tools/perf/arch/powerpc/util/kvm-stat.c b/tools/perf/arch/powerpc/util/kvm-stat.c index ea1220d66b67..d9a0ac1cdf30 100644 --- a/tools/perf/arch/powerpc/util/kvm-stat.c +++ b/tools/perf/arch/powerpc/util/kvm-stat.c @@ -5,7 +5,7 @@ #include "util/debug.h" #include "util/evsel.h" #include "util/evl...
e60c230588d88036f974cec7e93361e2c4f62226
Analyze and fix the following issue in the Linux kernel code: ARM: dts: qcom: apq8074-dragonboard: Set DMA as remotely controlled
Problem Details: Add the qcom,controlled-remotely property for the blsp2_bam controller node. This board requires this, otherwise the board stalls during the boot for some reason (most probably because TZ mishandles the protection error and keeps on looping somewhere inside). Fixes: 62bc81792223 dts: msm8974: Add blsp...
```diff diff --git a/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts b/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts index 1345df7cbd00..6b047c679370 100644 --- a/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts +++ b/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts @@ -23,6 +23,10 @@ status = "okay"; }; +&blsp2_dma {...
05e916f1db2fff88f316b6f94929b4b3b8414498
Analyze and fix the following issue in the Linux kernel code: ARM: dts: qcom: apq8084: correct thermal sensor unit-address
Problem Details: Match unit-address to reg entry to fix dtbs W=1 warnings: Warning (simple_bus_reg): /soc/thermal-sensor@fc4a8000: simple-bus unit address format error, expected "fc4a9000" Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Signe...
```diff diff --git a/arch/arm/boot/dts/qcom-apq8084.dtsi b/arch/arm/boot/dts/qcom-apq8084.dtsi index b653ea40c441..207124d68128 100644 --- a/arch/arm/boot/dts/qcom-apq8084.dtsi +++ b/arch/arm/boot/dts/qcom-apq8084.dtsi @@ -506,7 +506,7 @@ }; }; - tsens: thermal-sensor@fc4a8000 { + tsens: thermal-sensor@fc4a9...
26fe8ec355328c35e2768cb9758341c0256dc953
Analyze and fix the following issue in the Linux kernel code: ARM: dts: qcom: msm8960-cdp: move regulator out of simple-bus
Problem Details: Regulators is not a bus, so drop incomplete simple-bus usage to fix dtbs W=1 warning: Warning (simple_bus_reg): /regulators/gpio-regulator: missing or empty reg/ranges property Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> ...
```diff diff --git a/arch/arm/boot/dts/qcom-msm8960-cdp.dts b/arch/arm/boot/dts/qcom-msm8960-cdp.dts index 8fa2befa629a..6c1bc3818883 100644 --- a/arch/arm/boot/dts/qcom-msm8960-cdp.dts +++ b/arch/arm/boot/dts/qcom-msm8960-cdp.dts @@ -15,16 +15,12 @@ stdout-path = "serial0:115200n8"; }; - regulators { - compati...
600efc01c98d3369d1fc5caee531159c43bc3939
Analyze and fix the following issue in the Linux kernel code: ARM: dts: qcom: apq8060-dragonboard: move regulators out of simple-bus
Problem Details: Regulators is not a bus, so drop incomplete simple-bus usage to fix dtbs W=1 warnings: Warning (simple_bus_reg): /regulators/regulator-fixed: missing or empty reg/ranges property Warning (simple_bus_reg): /regulators/xc622a331mrg: missing or empty reg/ranges property Warning (simple_bus_reg): /r...
```diff diff --git a/arch/arm/boot/dts/qcom-apq8060-dragonboard.dts b/arch/arm/boot/dts/qcom-apq8060-dragonboard.dts index e8fe321f3d89..db4c791b2e2f 100644 --- a/arch/arm/boot/dts/qcom-apq8060-dragonboard.dts +++ b/arch/arm/boot/dts/qcom-apq8060-dragonboard.dts @@ -18,50 +18,46 @@ stdout-path = "serial0:115200n8"; ...
51500b3aac5d2fc102d607c3517f7a1ee2f29dca
Analyze and fix the following issue in the Linux kernel code: ARM: dts: qcom: ipq8064: correct LED node names
Problem Details: GPIO LEDs is not a bus, so drop unit-address and also start suffix numbering from 0: Warning (unit_address_vs_reg): /soc/leds/led@7: node has a unit name, but no reg or ranges property Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@lina...
```diff diff --git a/arch/arm/boot/dts/qcom-ipq8064-rb3011.dts b/arch/arm/boot/dts/qcom-ipq8064-rb3011.dts index 4d509876294b..104eb729c2d6 100644 --- a/arch/arm/boot/dts/qcom-ipq8064-rb3011.dts +++ b/arch/arm/boot/dts/qcom-ipq8064-rb3011.dts @@ -323,7 +323,7 @@ pinctrl-0 = <&leds_pins>; pinctrl-names = "defaul...
dcbd24008bfa9b2fc63ea34092b036f3f76b35db
Analyze and fix the following issue in the Linux kernel code: ARM: dts: qcom: msm8974: correct pronto unit-address
Problem Details: Match unit-address to reg entry to fix dtbs W=1 warnings: Warning (simple_bus_reg): /soc/remoteproc@fb21b000: simple-bus unit address format error, expected "fb204000" Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Signed-of...
```diff diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom-msm8974.dtsi index 9f0a6d7a3867..b30d59844136 100644 --- a/arch/arm/boot/dts/qcom-msm8974.dtsi +++ b/arch/arm/boot/dts/qcom-msm8974.dtsi @@ -706,7 +706,7 @@ clock-names = "core"; }; - pronto: remoteproc@fb21b000 { + pronto: rem...
fd9936dfe45765bd74c8100b8e228675482cd3ca
Analyze and fix the following issue in the Linux kernel code: ARM: dts: qcom: sdx55: correct rsc unit-address
Problem Details: Match unit-address to reg entry to fix dtbs W=1 warnings: Warning (simple_bus_reg): /soc/rsc@17840000: simple-bus unit address format error, expected "17830000" Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Signed-off-by: B...
```diff diff --git a/arch/arm/boot/dts/qcom-sdx55.dtsi b/arch/arm/boot/dts/qcom-sdx55.dtsi index 72d82a9a6cc5..06c2646dd673 100644 --- a/arch/arm/boot/dts/qcom-sdx55.dtsi +++ b/arch/arm/boot/dts/qcom-sdx55.dtsi @@ -792,7 +792,7 @@ }; }; - apps_rsc: rsc@17840000 { + apps_rsc: rsc@17830000 { compatible = "...
e054c9c38f439613a2c4dd81db46909ba532b1b9
Analyze and fix the following issue in the Linux kernel code: ARM: dts: qcom: ipq4019: correct syscon unit-address
Problem Details: Match unit-address to reg entry to fix dtbs W=1 warnings: Warning (simple_bus_reg): /soc/syscon@1fcb000: simple-bus unit address format error, expected "1fc0000" Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Signed-off-by: ...
```diff diff --git a/arch/arm/boot/dts/qcom-sdx55.dtsi b/arch/arm/boot/dts/qcom-sdx55.dtsi index 342c3d14001e..72d82a9a6cc5 100644 --- a/arch/arm/boot/dts/qcom-sdx55.dtsi +++ b/arch/arm/boot/dts/qcom-sdx55.dtsi @@ -515,7 +515,7 @@ #hwlock-cells = <1>; }; - tcsr: syscon@1fcb000 { + tcsr: syscon@1fc0000 { ...
edcbdd57de499305e2a3737d4a73fe387f71d84c
Analyze and fix the following issue in the Linux kernel code: ARM: dts: qcom: ipq4019: fix broken NAND controller properties override
Problem Details: After renaming NAND controller node name from "qpic-nand" to "nand-controller", the board DTS/DTSI also have to be updated: Warning (unit_address_vs_reg): /soc/qpic-nand@79b0000: node has a unit name, but no reg or ranges property Cc: <stable@vger.kernel.org> Fixes: 9e1e00f18afc ("ARM: dts: qcom: F...
```diff diff --git a/arch/arm/boot/dts/qcom-ipq4019-ap.dk04.1-c1.dts b/arch/arm/boot/dts/qcom-ipq4019-ap.dk04.1-c1.dts index 79b0c6318e52..0993f840d1fc 100644 --- a/arch/arm/boot/dts/qcom-ipq4019-ap.dk04.1-c1.dts +++ b/arch/arm/boot/dts/qcom-ipq4019-ap.dk04.1-c1.dts @@ -11,9 +11,9 @@ dma-controller@7984000 { sta...
a0f19091d4f5bbe97485592257b88007eb5b1998
Analyze and fix the following issue in the Linux kernel code: ARM: dts: qcom: msm8660: Fix regulator node names
Problem Details: commit 04715461abf7 altered the node names in a DTSI file used by qcom-apq8060-dragonboard.dts breaking the board. Align the node names in the DTS file and the board boots again. Cc: stable@vger.kernel.org Fixes: 85055a1eecc1 ("ARM: dts: qcom-msm8660: align RPM regulators node name with bindings") Sig...
```diff diff --git a/arch/arm/boot/dts/qcom-apq8060-dragonboard.dts b/arch/arm/boot/dts/qcom-apq8060-dragonboard.dts index 8e4b61e4d4b1..e8fe321f3d89 100644 --- a/arch/arm/boot/dts/qcom-apq8060-dragonboard.dts +++ b/arch/arm/boot/dts/qcom-apq8060-dragonboard.dts @@ -451,7 +451,7 @@ * PM8901 supplies "preliminary reg...
fcfe84236ec0974fe92f0578d1d58ed805c4b70f
Analyze and fix the following issue in the Linux kernel code: usb: typec: tps6598x: Fix broken polling mode after system suspend/resume
Problem Details: During system resume we need to resume the polling workqueue if client->irq is not set else polling will no longer work. Fixes: 0d6a119cecd7 ("usb: typec: tps6598x: Add support for polling interrupts status") Signed-off-by: Roger Quadros <rogerq@kernel.org> Reviewed-by: Heikki Krogerus <heikki.krogeru...
```diff diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c index 438cc40660a1..603dbd44deba 100644 --- a/drivers/usb/typec/tipd/core.c +++ b/drivers/usb/typec/tipd/core.c @@ -920,7 +920,7 @@ static int __maybe_unused tps6598x_resume(struct device *dev) enable_irq(client->irq); } - if (cli...
0f7b6a433097808e7f3e82f837ccc1353f070e4a
Analyze and fix the following issue in the Linux kernel code: ASoC: SOF: Intel: HDA: Limit the number of dai drivers for nocodec mode
Problem Details: With a common kernel config for nocodec and codec modes, the number of DAI drivers will be set to 15 for nocodec as well. So adjust this when set the machine params for the nocodec mode if the debug flag is set. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Pierre...
```diff diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c index 3153e21f100a..835c2568dd60 100644 --- a/sound/soc/sof/intel/hda.c +++ b/sound/soc/sof/intel/hda.c @@ -1562,7 +1562,11 @@ void hda_set_mach_params(struct snd_soc_acpi_mach *mach, mach_params = &mach->mach_params; mach_params->platform...
0178f1e5d9845a31024eddd37e93a182e2dbab5d
Analyze and fix the following issue in the Linux kernel code: spi-dw-core.c: Fix error checking for debugfs_create_dir
Problem Details: This patch fixes the error checking in spi-dw-core.c in debugfs_create_dir. The DebugFS kernel API is developed in a way that the caller can safely ignore the errors that occur during the creation of DebugFS nodes. Signed-off-by: Osama Muhammad <osmtendev@gmail.com> Link: https://lore.kernel.org/r/202...
```diff diff --git a/drivers/spi/spi-dw-core.c b/drivers/spi/spi-dw-core.c index 7778b19bcb6c..071a7604a8ab 100644 --- a/drivers/spi/spi-dw-core.c +++ b/drivers/spi/spi-dw-core.c @@ -57,21 +57,18 @@ static const struct debugfs_reg32 dw_spi_dbgfs_regs[] = { DW_SPI_DBGFS_REG("RX_SAMPLE_DLY", DW_SPI_RX_SAMPLE_DLY), }; ...
959c34765cf1d0688077ec5f41f9b71a9e70a6f1
Analyze and fix the following issue in the Linux kernel code: regulator: stm32-pwr: Fix regulator disabling
Problem Details: The following shows up in the kernel log on systems using the STM32MP15xx USBPHYC: " regulator regulator.19: regulator disable timed out! reg18: failed to disable: -ETIMEDOUT " This 'regulator.19' is 'pwr@50001000' 'reg18' in stm32mp151.dts DT, or "Power control (PWR)" register "PWR_CR3" bits "REG18" o...
```diff diff --git a/drivers/regulator/stm32-pwr.c b/drivers/regulator/stm32-pwr.c index 0e101dff6dda..4c60eddad60d 100644 --- a/drivers/regulator/stm32-pwr.c +++ b/drivers/regulator/stm32-pwr.c @@ -93,7 +93,7 @@ static int stm32_pwr_reg_disable(struct regulator_dev *rdev) writel_relaxed(val, priv->base + REG_PWR_CR3...
c3079282fdf7285b4133d6d1a7901b7923d6db09
Analyze and fix the following issue in the Linux kernel code: ASoC: ti: davinci-mcasp: Use pcm_for_each_format() macro
Problem Details: Use pcm_for_each_format for the PCM format iteration and fix the following sparse warnings. sound/soc/ti/davinci-mcasp.c:1336:26: sparse: warning: restricted snd_pcm_format_t degrades to integer sound/soc/ti/davinci-mcasp.c:1358:26: sparse: warning: restricted snd_pcm_format_t degrades to integer soun...
```diff diff --git a/sound/soc/ti/davinci-mcasp.c b/sound/soc/ti/davinci-mcasp.c index c0892be2992b..172fea764a31 100644 --- a/sound/soc/ti/davinci-mcasp.c +++ b/sound/soc/ti/davinci-mcasp.c @@ -1328,15 +1328,16 @@ static int davinci_mcasp_hw_rule_slot_width(struct snd_pcm_hw_params *params, struct davinci_mcasp_rule...
0c331fd1dccfba657129380ee084b95c1cedfbef
Analyze and fix the following issue in the Linux kernel code: spi: qup: Request DMA before enabling clocks
Problem Details: It is usually better to request all necessary resources (clocks, regulators, ...) before starting to make use of them. That way they do not change state in case one of the resources is not available yet and probe deferral (-EPROBE_DEFER) is necessary. This is particularly important for DMA channels and...
```diff diff --git a/drivers/spi/spi-qup.c b/drivers/spi/spi-qup.c index 944ef6b42bce..00e5e88e72c4 100644 --- a/drivers/spi/spi-qup.c +++ b/drivers/spi/spi-qup.c @@ -1028,23 +1028,8 @@ static int spi_qup_probe(struct platform_device *pdev) return -ENXIO; } - ret = clk_prepare_enable(cclk); - if (ret) { - dev_e...
b6b5c6426efe27cbd954409a50604d99c79bd42b
Analyze and fix the following issue in the Linux kernel code: ASoC: amd: ps: fix for acp_lock access in pdm driver
Problem Details: Sending the mutex address(acp_lock) as platform data during ACP PDM platform driver register sequence, its creating copy of the platform data. Referencing this platform data in ACP PDM driver results incorrect reference to the common lock usage. Instead of directly passing the lock address as platform...
```diff diff --git a/sound/soc/amd/ps/pci-ps.c b/sound/soc/amd/ps/pci-ps.c index afddb9a77ba4..b1337b96ea8d 100644 --- a/sound/soc/amd/ps/pci-ps.c +++ b/sound/soc/amd/ps/pci-ps.c @@ -211,8 +211,7 @@ static int create_acp63_platform_devs(struct pci_dev *pci, struct acp63_dev_data case ACP63_PDM_DEV_MASK: adata->pdm...
33e20b07bec4991c169e3c6ff28c2126583724fc
Analyze and fix the following issue in the Linux kernel code: x86/realmode: Make stack lock work in trampoline_compat()
Problem Details: The stack locking and stack assignment macro LOAD_REALMODE_ESP fails to work when invoked from the 64bit trampoline entry point: trampoline_start64 trampoline_compat LOAD_REALMODE_ESP <- lock Accessing tr_lock is only possible from 16bit mode. For the compat entry point this needs to be pa_tr_l...
```diff diff --git a/arch/x86/realmode/rm/trampoline_64.S b/arch/x86/realmode/rm/trampoline_64.S index 4822ad2a5e89..c9f76fae902e 100644 --- a/arch/x86/realmode/rm/trampoline_64.S +++ b/arch/x86/realmode/rm/trampoline_64.S @@ -37,12 +37,16 @@ .text .code16 -.macro LOAD_REALMODE_ESP +.macro LOCK_AND_LOAD_REALMODE_...
a5961bed5429cf1134d7f539b4ed60317012f84d
Analyze and fix the following issue in the Linux kernel code: pinctrl: sunplus: Add check for kmalloc
Problem Details: Fix Smatch static checker warning: potential null dereference 'configs'. (kmalloc returns null) Fixes: aa74c44be19c ("pinctrl: Add driver for Sunplus SP7021") Signed-off-by: Wells Lu <wellslutw@gmail.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/16852772...
```diff diff --git a/drivers/pinctrl/sunplus/sppctl.c b/drivers/pinctrl/sunplus/sppctl.c index 6bbbab3a6fdf..e91ce5b5d559 100644 --- a/drivers/pinctrl/sunplus/sppctl.c +++ b/drivers/pinctrl/sunplus/sppctl.c @@ -834,11 +834,6 @@ static int sppctl_dt_node_to_map(struct pinctrl_dev *pctldev, struct device_node int i, si...
7183c37fd53eee1e795206e625da12a5d7ec1e1a
Analyze and fix the following issue in the Linux kernel code: serial: cpm_uart: Fix a COMPILE_TEST dependency
Problem Details: In a COMPILE_TEST configuration, the cpm_uart driver uses symbols from the cpm_uart_cpm2.c file. This file is compiled only when CONFIG_CPM2 is set. Without this dependency, the linker fails with some missing symbols for COMPILE_TEST configuration that needs SERIAL_CPM without enabling CPM2. This lea...
```diff diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig index 398e5aac2e77..3e3fb377d90d 100644 --- a/drivers/tty/serial/Kconfig +++ b/drivers/tty/serial/Kconfig @@ -762,7 +762,7 @@ config SERIAL_PMACZILOG_CONSOLE config SERIAL_CPM tristate "CPM SCC/SMC serial port support" - depends on CPM2 |...
192d43e91e0fdbd51b64ba36e773cbdf38dda505
Analyze and fix the following issue in the Linux kernel code: soc: fsl: cpm1: Fix TSA and QMC dependencies in case of COMPILE_TEST
Problem Details: In order to compile tsa.c and qmc.c, CONFIG_CPM must be set. Without this dependency, the linker fails with some missing symbols for COMPILE_TEST configurations that need QMC without enabling CPM. Signed-off-by: Herve Codina <herve.codina@bootlin.com> Reported-by: kernel test robot <lkp@intel.com> Li...
```diff diff --git a/drivers/soc/fsl/qe/Kconfig b/drivers/soc/fsl/qe/Kconfig index 7268c2fbcbc1..e0d096607fef 100644 --- a/drivers/soc/fsl/qe/Kconfig +++ b/drivers/soc/fsl/qe/Kconfig @@ -36,7 +36,7 @@ config UCC config CPM_TSA tristate "CPM TSA support" depends on OF && HAS_IOMEM - depends on CPM1 || COMPILE_TEST ...
2474e05467c00f7d51af3039b664de6886325257
Analyze and fix the following issue in the Linux kernel code: tty: serial: fsl_lpuart: use UARTCTRL_TXINV to send break instead of UARTCTRL_SBK
Problem Details: LPUART IP now has two known bugs, one is that CTS has higher priority than the break signal, which causes the break signal sending through UARTCTRL_SBK may impacted by the CTS input if the HW flow control is enabled. It exists on all platforms we support in this driver. So we add a workaround patch for...
```diff diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index c91916e13648..7486a2b8556c 100644 --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c @@ -1495,34 +1495,36 @@ static void lpuart_break_ctl(struct uart_port *port, int break_state) static void lpuart32...
134f49dec0b6aca3259cd8259de4c572048bd207
Analyze and fix the following issue in the Linux kernel code: serial: 8250_tegra: Fix an error handling path in tegra_uart_probe()
Problem Details: If an error occurs after reset_control_deassert(), it must be re-asserted, as already done in the .remove() function. Fixes: c6825c6395b7 ("serial: 8250_tegra: Create Tegra specific 8250 driver") Cc: stable <stable@kernel.org> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: htt...
```diff diff --git a/drivers/tty/serial/8250/8250_tegra.c b/drivers/tty/serial/8250/8250_tegra.c index 2509e7f74ccf..89956bbf34d9 100644 --- a/drivers/tty/serial/8250/8250_tegra.c +++ b/drivers/tty/serial/8250/8250_tegra.c @@ -113,13 +113,15 @@ static int tegra_uart_probe(struct platform_device *pdev) ret = serial8...
63212608a92a1ff10ae56dbb14e9fb685f7e4ffa
Analyze and fix the following issue in the Linux kernel code: selftests: mptcp: userspace pm: skip if MPTCP is not supported
Problem Details: Selftests are supposed to run on any kernels, including the old ones not supporting MPTCP. A new check is then added to make sure MPTCP is supported. If not, the test stops and is marked as "skipped". Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: 259a834fadda ("selftests: mp...
```diff diff --git a/tools/testing/selftests/net/mptcp/userspace_pm.sh b/tools/testing/selftests/net/mptcp/userspace_pm.sh index b1eb7bce599d..8092399d911f 100755 --- a/tools/testing/selftests/net/mptcp/userspace_pm.sh +++ b/tools/testing/selftests/net/mptcp/userspace_pm.sh @@ -1,6 +1,10 @@ #!/bin/bash # SPDX-License...
cf6f0fda7af7e8e016070bfee6b189e671a0c776
Analyze and fix the following issue in the Linux kernel code: selftests: mptcp: sockopt: skip if MPTCP is not supported
Problem Details: Selftests are supposed to run on any kernels, including the old ones not supporting MPTCP. A new check is then added to make sure MPTCP is supported. If not, the test stops and is marked as "skipped". Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: dc65fe82fb07 ("selftests: mp...
```diff diff --git a/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh b/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh index 1b70c0a304ce..ff5adbb9c7f2 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh @@ -1,6 +1,8 @@ #!/bin/bash # SPDX-Lice...
9161f21c74a1a0e7bb39eb84ea0c86b23c92fc87
Analyze and fix the following issue in the Linux kernel code: selftests: mptcp: simult flows: skip if MPTCP is not supported
Problem Details: Selftests are supposed to run on any kernels, including the old ones not supporting MPTCP. A new check is then added to make sure MPTCP is supported. If not, the test stops and is marked as "skipped". Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: 1a418cb8e888 ("mptcp: simult...
```diff diff --git a/tools/testing/selftests/net/mptcp/simult_flows.sh b/tools/testing/selftests/net/mptcp/simult_flows.sh index 9f22f7e5027d..36a3c9d92e20 100755 --- a/tools/testing/selftests/net/mptcp/simult_flows.sh +++ b/tools/testing/selftests/net/mptcp/simult_flows.sh @@ -1,6 +1,8 @@ #!/bin/bash # SPDX-License-...
46565acdd29facbf418a11e4a3791b3c8967308d
Analyze and fix the following issue in the Linux kernel code: selftests: mptcp: diag: skip if MPTCP is not supported
Problem Details: Selftests are supposed to run on any kernels, including the old ones not supporting MPTCP. A new check is then added to make sure MPTCP is supported. If not, the test stops and is marked as "skipped". Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: df62f2ec3df6 ("selftests/mpt...
```diff diff --git a/tools/testing/selftests/net/mptcp/diag.sh b/tools/testing/selftests/net/mptcp/diag.sh index ef628b16fe9b..4eacdb1ab962 100755 --- a/tools/testing/selftests/net/mptcp/diag.sh +++ b/tools/testing/selftests/net/mptcp/diag.sh @@ -1,6 +1,8 @@ #!/bin/bash # SPDX-License-Identifier: GPL-2.0 +. "$(dirn...
715c78a82e00f848f99ef76e6f6b89216ccba268
Analyze and fix the following issue in the Linux kernel code: selftests: mptcp: join: skip if MPTCP is not supported
Problem Details: Selftests are supposed to run on any kernels, including the old ones not supporting MPTCP. A new check is then added to make sure MPTCP is supported. If not, the test stops and is marked as "skipped". Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: b08fbf241064 ("selftests: ad...
```diff diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh index 4f3fe45f8f71..96f63172b8fe 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -10,6 +10,8 @@ # because it's invoked by variable...
0f4955a40dafe18a1122e3714d8173e4b018e869
Analyze and fix the following issue in the Linux kernel code: selftests: mptcp: pm nl: skip if MPTCP is not supported
Problem Details: Selftests are supposed to run on any kernels, including the old ones not supporting MPTCP. A new check is then added to make sure MPTCP is supported. If not, the test stops and is marked as "skipped". Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: eedbc685321b ("selftests: ad...
```diff diff --git a/tools/testing/selftests/net/mptcp/pm_netlink.sh b/tools/testing/selftests/net/mptcp/pm_netlink.sh index 89839d1ff9d8..32f7533e0919 100755 --- a/tools/testing/selftests/net/mptcp/pm_netlink.sh +++ b/tools/testing/selftests/net/mptcp/pm_netlink.sh @@ -1,6 +1,8 @@ #!/bin/bash # SPDX-License-Identifi...
d83013bdf90a7994a474b0e650a7fc94b0d4ded6
Analyze and fix the following issue in the Linux kernel code: selftests: mptcp: connect: skip if MPTCP is not supported
Problem Details: Selftests are supposed to run on any kernels, including the old ones not supporting MPTCP. A new check is then added to make sure MPTCP is supported. If not, the test stops and is marked as "skipped". Note that this check can also mark the test as failed if 'SELFTESTS_MPTCP_LIB_EXPECT_ALL_FEATURES' en...
```diff diff --git a/tools/testing/selftests/net/mptcp/Makefile b/tools/testing/selftests/net/mptcp/Makefile index 43a723626126..7b936a926859 100644 --- a/tools/testing/selftests/net/mptcp/Makefile +++ b/tools/testing/selftests/net/mptcp/Makefile @@ -9,7 +9,7 @@ TEST_PROGS := mptcp_connect.sh pm_netlink.sh mptcp_join.s...
d328fe87067480cf2bd0b58dab428a98d31dbb7e
Analyze and fix the following issue in the Linux kernel code: selftests: mptcp: join: avoid using 'cmp --bytes'
Problem Details: BusyBox's 'cmp' command doesn't support the '--bytes' parameter. Some CIs -- i.e. LKFT -- use BusyBox and have the mptcp_join.sh test failing [1] because their 'cmp' command doesn't support this '--bytes' option: cmp: unrecognized option '--bytes=1024' BusyBox v1.35.0 () multi-call binary. ...
```diff diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh index 26310c17b4c6..4f3fe45f8f71 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -17,6 +17,7 @@ sout="" cin="" cinfail="" cinsen...
20ec397d694b05d3e7150e3ba15047c53e7e6b94
Analyze and fix the following issue in the Linux kernel code: tty: serial: fsl_lpuart: Check the return value of dmaengine_tx_status
Problem Details: Coverity reports the Unchecked return value (CHECKED_RETURN) warning: Calling dmaengine_tx_status without checking return value. So here add the return value check for dmaengine_tx_status() function to make coverity happy. Fixes: cf9aa72d2f91 ("tty: serial: fsl_lpuart: optimize the timer based EOP lo...
```diff diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index 0e56fa64b4ce..0718c9f48d21 100644 --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c @@ -1286,13 +1286,19 @@ static void lpuart_dma_rx_complete(void *arg) static void lpuart_timer_func(struct timer_lis...
25614735a647693c1260f253dc3ab32127697806
Analyze and fix the following issue in the Linux kernel code: serial: 8250: lock port for UART_IER access in omap8250_irq()
Problem Details: omap8250_irq() accesses UART_IER. This register is modified twice by each console write (serial8250_console_write()) under the port lock. omap8250_irq() must also take the port lock to guanentee synchronized access to UART_IER. Since the port lock is already being taken for the stop_rx() callback and ...
```diff diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c index 34939462fd69..3225c95fde1d 100644 --- a/drivers/tty/serial/8250/8250_omap.c +++ b/drivers/tty/serial/8250/8250_omap.c @@ -659,17 +659,18 @@ static irqreturn_t omap8250_irq(int irq, void *dev_id) if ((lsr & UART_LSR_OE...
51e45fba14bf08b66bca764a083c7f2e2ff62f01
Analyze and fix the following issue in the Linux kernel code: serial: core: lock port for start_rx() in uart_resume_port()
Problem Details: The only user of the start_rx() callback (qcom_geni) directly calls its own stop_rx() callback. Since stop_rx() requires that the port->lock is taken and interrupts are disabled, the start_rx() callback has the same requirement. Fixes: cfab87c2c271 ("serial: core: Introduce callback for start_rx and d...
```diff diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index 37ad53616372..f856c7fae2fd 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -2430,8 +2430,11 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *uport) if (console_susp...
ca73a892c5bec4b08a2fa22b3015e98ed905abb7
Analyze and fix the following issue in the Linux kernel code: serial: 8250: lock port for stop_rx() in omap8250_irq()
Problem Details: The uarts_ops stop_rx() callback expects that the port->lock is taken and interrupts are disabled. Fixes: 1fe0e1fa3209 ("serial: 8250_omap: Handle optional overrun-throttle-ms property") Signed-off-by: John Ogness <john.ogness@linutronix.de> Reviewed-by: Tony Lindgren <tony@atomide.com> Link: https://...
```diff diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c index fbca0692aa51..c17d98161d5e 100644 --- a/drivers/tty/serial/8250/8250_omap.c +++ b/drivers/tty/serial/8250/8250_omap.c @@ -658,7 +658,9 @@ static irqreturn_t omap8250_irq(int irq, void *dev_id) up->ier = port->seria...
abcb0cf1f5b2d99b1d117a4dbce334120e358d6d
Analyze and fix the following issue in the Linux kernel code: serial: core: lock port for stop_rx() in uart_suspend_port()
Problem Details: The uarts_ops stop_rx() callback expects that the port->lock is taken and interrupts are disabled. Fixes: c9d2325cdb92 ("serial: core: Do stop_rx in suspend path for console if console_suspend is disabled") Signed-off-by: John Ogness <john.ogness@linutronix.de> Reviewed-by: Douglas Anderson <dianders@...
```diff diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index 4b98d13555c0..37ad53616372 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -2333,8 +2333,11 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *uport) * able to Re-st...
e003498ec055eef3847e5433273df1e151b9af4b
Analyze and fix the following issue in the Linux kernel code: firewire: fix build failure due to missing module license
Problem Details: The added KUnit test has no MODULE_LICENSE even if built for tristate. It brings build failure in linux-next integration. This commit releases the test under GPL and fixes the bug. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Closes: https://lore.kernel.org/lkml/20230530122450.1603af75@canb.a...
```diff diff --git a/drivers/firewire/uapi-test.c b/drivers/firewire/uapi-test.c index c6ebf02e3d45..2fcbede4fab1 100644 --- a/drivers/firewire/uapi-test.c +++ b/drivers/firewire/uapi-test.c @@ -85,3 +85,5 @@ static struct kunit_suite structure_layout_test_suite = { .test_cases = structure_layout_test_cases, }; kun...
1919b39fc6eabb9a6f9a51706ff6d03865f5df29
Analyze and fix the following issue in the Linux kernel code: net: mana: Fix perf regression: remove rx_cqes, tx_cqes counters
Problem Details: The apc->eth_stats.rx_cqes is one per NIC (vport), and it's on the frequent and parallel code path of all queues. So, r/w into this single shared variable by many threads on different CPUs creates a lot caching and memory overhead, hence perf regression. And, it's not accurate due to the high volume co...
```diff diff --git a/drivers/net/ethernet/microsoft/mana/mana_en.c b/drivers/net/ethernet/microsoft/mana/mana_en.c index 06d6292e09b3..d907727c7b7a 100644 --- a/drivers/net/ethernet/microsoft/mana/mana_en.c +++ b/drivers/net/ethernet/microsoft/mana/mana_en.c @@ -1279,8 +1279,6 @@ static void mana_poll_tx_cq(struct mana...
91539341a3b6e9c868024a4292455dae36e6f58c
Analyze and fix the following issue in the Linux kernel code: irqchip/gic: Correctly validate OF quirk descriptors
Problem Details: When checking for OF quirks, make sure either 'compatible' or 'property' is set, and give up otherwise. This avoids non-OF quirks being randomly applied as they don't have any of the OF data that need checking. Cc: Douglas Anderson <dianders@chromium.org> Reported-by: Geert Uytterhoeven <geert+renesa...
```diff diff --git a/drivers/irqchip/irq-gic-common.c b/drivers/irqchip/irq-gic-common.c index de47b51cdadb..afd6a1841715 100644 --- a/drivers/irqchip/irq-gic-common.c +++ b/drivers/irqchip/irq-gic-common.c @@ -16,6 +16,8 @@ void gic_enable_of_quirks(const struct device_node *np, const struct gic_quirk *quirks, v...
1d7650b8ce6041be4ea0436ad7a69c057b4d22f8
Analyze and fix the following issue in the Linux kernel code: net: phy: microchip_t1s: fix reset complete status handling
Problem Details: As per the datasheet DS-LAN8670-1-2-60001573C.pdf, the Reset Complete status bit in the STS2 register has to be checked before proceeding to the initial configuration. Reading STS2 register will also clear the Reset Complete interrupt which is non-maskable. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Si...
```diff diff --git a/drivers/net/phy/microchip_t1s.c b/drivers/net/phy/microchip_t1s.c index 7abecad28bf1..0ecef87e5882 100644 --- a/drivers/net/phy/microchip_t1s.c +++ b/drivers/net/phy/microchip_t1s.c @@ -14,6 +14,9 @@ #define LAN867X_REG_IRQ_1_CTL 0x001C #define LAN867X_REG_IRQ_2_CTL 0x001D +#define LAN867X_REG_...
71c6aa0305e3d2365d3bfd0134b4025d9e7ba388
Analyze and fix the following issue in the Linux kernel code: net/smc: Don't use RMBs not mapped to new link in SMCRv2 ADD LINK
Problem Details: We encountered a crash when using SMCRv2. It is caused by a logical error in smc_llc_fill_ext_v2(). BUG: kernel NULL pointer dereference, address: 0000000000000014 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 0 P4D 0 Oops: 0000 [#1] PREEMPT SMP PTI CP...
```diff diff --git a/net/smc/smc_llc.c b/net/smc/smc_llc.c index 8423e8e0063f..7a8d9163d186 100644 --- a/net/smc/smc_llc.c +++ b/net/smc/smc_llc.c @@ -617,6 +617,8 @@ static int smc_llc_fill_ext_v2(struct smc_llc_msg_add_link_v2_ext *ext, goto out; buf_pos = smc_llc_get_first_rmb(lgr, &buf_lst); for (i = 0; i < ...
b24aa141c2ff26c919237aee61ea1818fc6780d9
Analyze and fix the following issue in the Linux kernel code: net/smc: Scan from current RMB list when no position specified
Problem Details: When finding the first RMB of link group, it should start from the current RMB list whose index is 0. So fix it. Fixes: b4ba4652b3f8 ("net/smc: extend LLC layer for SMC-Rv2") Signed-off-by: Wen Gu <guwen@linux.alibaba.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
```diff diff --git a/net/smc/smc_llc.c b/net/smc/smc_llc.c index a0840b8c935b..8423e8e0063f 100644 --- a/net/smc/smc_llc.c +++ b/net/smc/smc_llc.c @@ -578,7 +578,10 @@ static struct smc_buf_desc *smc_llc_get_next_rmb(struct smc_link_group *lgr, { struct smc_buf_desc *buf_next; - if (!buf_pos || list_is_last(&buf_p...
061c228967f0e3f7aecdd32ee370ee745d96168d
Analyze and fix the following issue in the Linux kernel code: platform/surface: aggregator_tabletsw: Add support for book mode in POS subsystem
Problem Details: Devices with a type-cover have an additional "book" mode, deactivating type-cover input and turning off its backlight. This is currently unsupported, leading to the warning surface_aggregator_tablet_mode_switch 01:26:01:00:01: unknown device posture for type-cover: 6 Therefore, add support for this...
```diff diff --git a/drivers/platform/surface/surface_aggregator_tabletsw.c b/drivers/platform/surface/surface_aggregator_tabletsw.c index 4a029f5db20a..c0a1a5869246 100644 --- a/drivers/platform/surface/surface_aggregator_tabletsw.c +++ b/drivers/platform/surface/surface_aggregator_tabletsw.c @@ -340,6 +340,7 @@ enum ...
9bed667033e66083d363a11e9414ad401ecc242c
Analyze and fix the following issue in the Linux kernel code: platform/surface: aggregator_tabletsw: Add support for book mode in KIP subsystem
Problem Details: Devices with a type-cover have an additional "book" mode, deactivating type-cover input and turning off its backlight. This is currently unsupported, leading to the warning surface_aggregator_tablet_mode_switch 01:0e:01:00:01: unknown KIP cover state: 6 Therefore, add support for this state and map...
```diff diff --git a/drivers/platform/surface/surface_aggregator_tabletsw.c b/drivers/platform/surface/surface_aggregator_tabletsw.c index 8f52b62d1c19..4a029f5db20a 100644 --- a/drivers/platform/surface/surface_aggregator_tabletsw.c +++ b/drivers/platform/surface/surface_aggregator_tabletsw.c @@ -210,6 +210,7 @@ enum ...
539e0a7f9105d19c00629c3f4da00330488e8c60
Analyze and fix the following issue in the Linux kernel code: platform/surface: aggregator: Allow completion work-items to be executed in parallel
Problem Details: Currently, event completion work-items are restricted to be run strictly in non-parallel fashion by the respective workqueue. However, this has lead to some problems: In some instances, the event notifier function called inside this completion workqueue takes a non-negligible amount of time to execute...
```diff diff --git a/drivers/platform/surface/aggregator/controller.c b/drivers/platform/surface/aggregator/controller.c index 535581c0471c..7fc602e01487 100644 --- a/drivers/platform/surface/aggregator/controller.c +++ b/drivers/platform/surface/aggregator/controller.c @@ -825,7 +825,7 @@ static int ssam_cplt_init(str...
1d9e93fad549bc38f593147479ee063f2872c170
Analyze and fix the following issue in the Linux kernel code: memory: brcmstb_dpfe: fix testing array offset after use
Problem Details: Code should first check for valid value of array offset, then use it as the index. Fixes smatch warning: drivers/memory/brcmstb_dpfe.c:443 __send_command() error: testing array offset 'cmd' after use. Fixes: 2f330caff577 ("memory: brcmstb: Add driver for DPFE") Acked-by: Markus Mayer <mmayer@broad...
```diff diff --git a/drivers/memory/brcmstb_dpfe.c b/drivers/memory/brcmstb_dpfe.c index 76c82e9c8fce..9339f80b21c5 100644 --- a/drivers/memory/brcmstb_dpfe.c +++ b/drivers/memory/brcmstb_dpfe.c @@ -434,15 +434,17 @@ static void __finalize_command(struct brcmstb_dpfe_priv *priv) static int __send_command(struct brcmst...
6a988251c4e53da33107c1975f578904c0635b43
Analyze and fix the following issue in the Linux kernel code: ARM: dts: s5pv210: Fix typo in comments, fix pinctrl header
Problem Details: Change 'specfic' to 'specific' and make the pinctrl DTSI header more like the s3c64xx pinctrl DTSI (previously it was copied from the main s5pv210 DTSI, and not changed to match the new contents). Signed-off-by: Artur Weber <aweber.kernel@gmail.com> Link: https://lore.kernel.org/r/20230519190625.7844-...
```diff diff --git a/arch/arm/boot/dts/s5pv210-pinctrl.dtsi b/arch/arm/boot/dts/s5pv210-pinctrl.dtsi index ae0b4a423746..af740abd9e0f 100644 --- a/arch/arm/boot/dts/s5pv210-pinctrl.dtsi +++ b/arch/arm/boot/dts/s5pv210-pinctrl.dtsi @@ -1,19 +1,15 @@ // SPDX-License-Identifier: GPL-2.0 /* - * Samsung's S5PV210 SoC devi...
316c31fba6eda4543d5e234b13d0c0605a83a643
Analyze and fix the following issue in the Linux kernel code: ARM: dts: s3c64xx: Fix some typos in comments
Problem Details: Change 'specfic' to 'specific'. Signed-off-by: Artur Weber <aweber.kernel@gmail.com> Link: https://lore.kernel.org/r/20230519190625.7844-3-aweber.kernel@gmail.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
```diff diff --git a/arch/arm/boot/dts/s3c6400.dtsi b/arch/arm/boot/dts/s3c6400.dtsi index 8c28e8a0c824..7cc785a63866 100644 --- a/arch/arm/boot/dts/s3c6400.dtsi +++ b/arch/arm/boot/dts/s3c6400.dtsi @@ -5,7 +5,7 @@ * Copyright (c) 2013 Tomasz Figa <tomasz.figa@gmail.com> * * Samsung's S3C6400 SoC device nodes are...
2f6905307a7bb998e819c03097f3cc54a51b015a
Analyze and fix the following issue in the Linux kernel code: ARM: dts: exynos: Fix some typos in comments
Problem Details: Change 'specfic' to 'specific', 'optiosn' to 'options' and remove duplicated 'are listed' in DTSI heading comments. Signed-off-by: Artur Weber <aweber.kernel@gmail.com> Link: https://lore.kernel.org/r/20230519190625.7844-2-aweber.kernel@gmail.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski...
```diff diff --git a/arch/arm/boot/dts/exynos3250-pinctrl.dtsi b/arch/arm/boot/dts/exynos3250-pinctrl.dtsi index 011ba2eff29e..07828551d4b3 100644 --- a/arch/arm/boot/dts/exynos3250-pinctrl.dtsi +++ b/arch/arm/boot/dts/exynos3250-pinctrl.dtsi @@ -5,8 +5,8 @@ * Copyright (c) 2014 Samsung Electronics Co., Ltd. * htt...
5364e37799c83d405175b2e1e1065c7c247949b3
Analyze and fix the following issue in the Linux kernel code: ARM: dts: stm32: fix ltdc warnings in stm32mp15 boards
Problem Details: Those concern: * "#size-cells" and "#address-cells" wrongly used * residual "reg" property appearing on endpoints where it could be avoided Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com> Reviewed-by: Marek Vasut <marex@denx.de> Signed-off-by: Alexandre Torgue <alexandre.t...
```diff diff --git a/arch/arm/boot/dts/stm32mp151.dtsi b/arch/arm/boot/dts/stm32mp151.dtsi index a98ae58e2c1c..bf3830dca742 100644 --- a/arch/arm/boot/dts/stm32mp151.dtsi +++ b/arch/arm/boot/dts/stm32mp151.dtsi @@ -1529,11 +1529,6 @@ clock-names = "lcd"; resets = <&rcc LTDC_R>; status = "disabled"; - - po...
f7164b346a9009e5b70671bb72e32e1cc22a90b4
Analyze and fix the following issue in the Linux kernel code: ARM: dts: stm32: fix dsi warnings on stm32mp15 boards
Problem Details: Fixes DSI related warnings: * "#size-cells" and "#address-cells" wrongly used * Changed 'panel-dsi@0' to 'panel@0' according to dsi-controller.yaml Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com> Reviewed-by: Marek Vasut <marex@denx.de> Signed-off-by: Alexandre Torgue <alexandr...
```diff diff --git a/arch/arm/boot/dts/stm32mp157.dtsi b/arch/arm/boot/dts/stm32mp157.dtsi index 54e73ccea446..5e733cd16ff9 100644 --- a/arch/arm/boot/dts/stm32mp157.dtsi +++ b/arch/arm/boot/dts/stm32mp157.dtsi @@ -24,14 +24,7 @@ clock-names = "pclk", "ref", "px_clk"; resets = <&rcc DSI_R>; reset-names = "a...
0c211488ef36db3d52c8b8ae9931e508272f5a11
Analyze and fix the following issue in the Linux kernel code: ARM: dts: stm32: fix warnings on stm32f469-disco board
Problem Details: Several warnings appear when building and checking stm32f429 device-tree: arch/arm/boot/dts/stm32f469-disco.dts:182.28-184.5: Warning (unit_address_vs_reg): /soc/display-controller@40016800/port/endpoint@0: node has a unit name, but no reg or ranges property .../arch/arm/boot/dts/stm32f469-disco.dtb:...
```diff diff --git a/arch/arm/boot/dts/stm32f469-disco.dts b/arch/arm/boot/dts/stm32f469-disco.dts index 5a0daf8e8b11..cbbd521bf010 100644 --- a/arch/arm/boot/dts/stm32f469-disco.dts +++ b/arch/arm/boot/dts/stm32f469-disco.dts @@ -160,7 +160,7 @@ }; }; - panel-dsi@0 { + panel@0 { compatible = "orisetech,otm80...
020c69c1a793ed29d28793808eddd75210c858dd
Analyze and fix the following issue in the Linux kernel code: rxrpc: Truncate UTS_RELEASE for rxrpc version
Problem Details: UTS_RELEASE has a maximum length of 64 which can cause rxrpc_version to exceed the 65 byte message limit. Per the rx spec[1]: "If a server receives a packet with a type value of 13, and the client-initiated flag set, it should respond with a 65-byte payload containing a string that identifies the vers...
```diff diff --git a/net/rxrpc/af_rxrpc.c b/net/rxrpc/af_rxrpc.c index 31f738d65f1c..da0b3b5157d5 100644 --- a/net/rxrpc/af_rxrpc.c +++ b/net/rxrpc/af_rxrpc.c @@ -980,6 +980,7 @@ static int __init af_rxrpc_init(void) BUILD_BUG_ON(sizeof(struct rxrpc_skb_priv) > sizeof_field(struct sk_buff, cb)); ret = -ENOMEM; + ...
0cf765e598712addec34d0208cc1418c151fefb2
Analyze and fix the following issue in the Linux kernel code: ARM: dts: stm32: Shorten the AV96 HDMI sound card name
Problem Details: Fix the following error in kernel log due to too long sound card name: " asoc-audio-graph-card sound: ASoC: driver name too long 'STM32MP1-AV96-HDMI' -> 'STM32MP1-AV96-H' " Fixes: e027da342772 ("ARM: dts: stm32: Add bindings for audio on AV96") Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by:...
```diff diff --git a/arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi b/arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi index 302efac5d26f..2b52515457e4 100644 --- a/arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi +++ b/arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi @@ -87,7 +87,7 @@ sound { compatib...
811154e234db72f0a11557a84ba9640f8b3bc823
Analyze and fix the following issue in the Linux kernel code: KVM: arm64: Populate fault info for watchpoint
Problem Details: When handling ESR_ELx_EC_WATCHPT_LOW, far_el2 member of struct kvm_vcpu_fault_info will be copied to far member of struct kvm_debug_exit_arch and exposed to the userspace. The userspace will see stale values from older faults if the fault info does not get populated. Fixes: 8fb2046180a0 ("KVM: arm64: ...
```diff diff --git a/arch/arm64/kvm/hyp/include/hyp/switch.h b/arch/arm64/kvm/hyp/include/hyp/switch.h index e78a08a72a3c..5c15c58f90cc 100644 --- a/arch/arm64/kvm/hyp/include/hyp/switch.h +++ b/arch/arm64/kvm/hyp/include/hyp/switch.h @@ -412,17 +412,21 @@ static bool kvm_hyp_handle_cp15_32(struct kvm_vcpu *vcpu, u64 *...
719dfd5925e186e09a2a6f23016936ac436f3d78
Analyze and fix the following issue in the Linux kernel code: powerpc/xmon: Use KSYM_NAME_LEN in array size
Problem Details: kallsyms_lookup() which in turn calls kallsyms_lookup_buildid() writes to index "KSYM_NAME_LEN - 1". Thus the array passed as namebuf to kallsyms_lookup() should be KSYM_NAME_LEN in size. In xmon.c the array was defined to be "128" bytes directly, without using KSYM_NAME_LEN. Commit b8a94bfb3395 ("ka...
```diff diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index 728d3c257e4a..70c4c59a1a8f 100644 --- a/arch/powerpc/xmon/xmon.c +++ b/arch/powerpc/xmon/xmon.c @@ -88,7 +88,7 @@ static unsigned long ndump = 64; static unsigned long nidump = 16; static unsigned long ncsum = 4096; static int termch; -st...
81d358b118dc364bd147432db569d4d400a5a4f2
Analyze and fix the following issue in the Linux kernel code: powerpc/crypto: Fix aes-gcm-p10 link errors
Problem Details: The recently added P10 AES/GCM code added some files containing CRYPTOGAMS perl-asm code which are near duplicates of the p8 files found in drivers/crypto/vmx. In particular the newly added files produce functions with identical names to the existing code. When the kernel is built with CONFIG_CRYPTO_...
```diff diff --git a/arch/powerpc/crypto/Makefile b/arch/powerpc/crypto/Makefile index 05c7486f42c5..7b4f516abec1 100644 --- a/arch/powerpc/crypto/Makefile +++ b/arch/powerpc/crypto/Makefile @@ -22,15 +22,15 @@ sha1-ppc-spe-y := sha1-spe-asm.o sha1-spe-glue.o sha256-ppc-spe-y := sha256-spe-asm.o sha256-spe-glue.o crc...
34dfde4ad87b84d21278a7e19d92b5b2c68e6c4d
Analyze and fix the following issue in the Linux kernel code: tcp: Return user_mss for TCP_MAXSEG in CLOSE/LISTEN state if user_mss set
Problem Details: This patch replaces the tp->mss_cache check in getting TCP_MAXSEG with tp->rx_opt.user_mss check for CLOSE/LISTEN sock. Since tp->mss_cache is initialized with TCP_MSS_DEFAULT, checking if it's zero is probably a bug. With this change, getting TCP_MAXSEG before connecting will return default MSS norma...
```diff diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 635607ac37e4..8d20d9221238 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -4078,7 +4078,8 @@ int do_tcp_getsockopt(struct sock *sk, int level, switch (optname) { case TCP_MAXSEG: val = tp->mss_cache; - if (!val && ((1 << sk->sk_state) & (TCPF_CLOSE...
4faeee0cf8a5d88d63cdbc3bab124fb0e6aed08c
Analyze and fix the following issue in the Linux kernel code: tcp: deny tcp_disconnect() when threads are waiting
Problem Details: Historically connect(AF_UNSPEC) has been abused by syzkaller and other fuzzers to trigger various bugs. A recent one triggers a divide-by-zero [1], and Paolo Abeni was able to diagnose the issue. tcp_recvmsg_locked() has tests about sk_state being not TCP_LISTEN and TCP REPAIR mode being not used. T...
```diff diff --git a/include/net/sock.h b/include/net/sock.h index 656ea89f60ff..b418425d7230 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -336,6 +336,7 @@ struct sk_filter; * @sk_cgrp_data: cgroup data for this cgroup * @sk_memcg: this socket's memory cgroup association * @sk_write_pending: a w...
6ffc57ea004234d9373c57b204fd10370a69f392
Analyze and fix the following issue in the Linux kernel code: af_packet: do not use READ_ONCE() in packet_bind()
Problem Details: A recent patch added READ_ONCE() in packet_bind() and packet_bind_spkt() This is better handled by reading pkt_sk(sk)->num later in packet_do_bind() while appropriate lock is held. READ_ONCE() in writers are often an evidence of something being wrong. Fixes: 822b5a1c17df ("af_packet: Fix data-races ...
```diff diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index a1f9a0e9f3c8..a2dbeb264f26 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -3201,6 +3201,9 @@ static int packet_do_bind(struct sock *sk, const char *name, int ifindex, lock_sock(sk); spin_lock(&po->bind_lock); + if (!pr...
0684f29a89e58944a9bfae3a8b5c1a217e44c960
Analyze and fix the following issue in the Linux kernel code: netlink: specs: correct types of legacy arrays
Problem Details: ethtool has some attrs which dump multiple scalars into an attribute. The spec currently expects one attr per entry. Fixes: a353318ebf24 ("tools: ynl: populate most of the ethtool spec") Acked-by: Stanislav Fomichev <sdf@google.com> Link: https://lore.kernel.org/r/20230526220653.65538-1-kuba@kernel.or...
```diff diff --git a/Documentation/netlink/specs/ethtool.yaml b/Documentation/netlink/specs/ethtool.yaml index 129f413ea349..3abc576ff797 100644 --- a/Documentation/netlink/specs/ethtool.yaml +++ b/Documentation/netlink/specs/ethtool.yaml @@ -60,22 +60,6 @@ attribute-sets: type: nest nested-attributes...
36936a56e1814f6c526fe71fbf980beab4f5577a
Analyze and fix the following issue in the Linux kernel code: net: usb: qmi_wwan: Set DTR quirk for BroadMobi BM818
Problem Details: BM818 is based on Qualcomm MDM9607 chipset. Fixes: 9a07406b00cd ("net: usb: qmi_wwan: Add the BroadMobi BM818 card") Cc: stable@vger.kernel.org Signed-off-by: Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm> Acked-by: Bjørn Mork <bjorn@mork.no> Link: https://lore.kernel.org/r/20230526-bm818-dtr...
```diff diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c index 571e37e67f9c..f1865d047971 100644 --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c @@ -1325,7 +1325,7 @@ static const struct usb_device_id products[] = { {QMI_FIXED_INTF(0x2001, 0x7e3d, 4)}, /* D-Link DWM-222 A2 */ {...
ef1bc119ceb52d22a83f72b8dfce1dd64a3cca05
Analyze and fix the following issue in the Linux kernel code: net: fix signedness bug in skb_splice_from_iter()
Problem Details: The "len" variable needs to be signed for the error handling to work correctly. Fixes: 2e910b95329c ("net: Add a function to splice pages into an skbuff for MSG_SPLICE_PAGES") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: David Howells <dhowells@redhat.com> Reviewed-by: Jiri Pir...
```diff diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 653abd8a6975..7c4338221b17 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -6931,8 +6931,8 @@ ssize_t skb_splice_from_iter(struct sk_buff *skb, struct iov_iter *iter, unsigned int i; while (iter->count > 0) { - ssize_t space, nr; - size_...
7f875850f20a42f488840c9df7af91ef7db2d576
Analyze and fix the following issue in the Linux kernel code: ata: libata-scsi: Use correct device no in ata_find_dev()
Problem Details: For devices not attached to a port multiplier and managed directly by libata, the device number passed to ata_find_dev() must always be lower than the maximum number of devices returned by ata_link_max_devices(). That is 1 for SATA devices or 2 for an IDE link with master+slave devices. This device num...
```diff diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 7bb12deab70c..8ce90284eb34 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -2694,18 +2694,36 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc) return 0; } -static struct ata_device *ata_find_dev(st...
0ebee0a6f73e7169fb2ee59587aad2880438485a
Analyze and fix the following issue in the Linux kernel code: interconnect: qcom: rpm: allocate enough data in probe()
Problem Details: This was not allocating enough bytes. There are two issue here. First, there was a typo where it was taking the size of the pointer instead of the size of the struct, "sizeof(qp->intf_clks)" vs "sizeof(*qp->intf_clks)". Second, it's an array of "cd_num" clocks so we need to allocate space for more th...
```diff diff --git a/drivers/interconnect/qcom/icc-rpm.c b/drivers/interconnect/qcom/icc-rpm.c index f4627c4a1bdd..6acc7686ed38 100644 --- a/drivers/interconnect/qcom/icc-rpm.c +++ b/drivers/interconnect/qcom/icc-rpm.c @@ -436,7 +436,7 @@ int qnoc_probe(struct platform_device *pdev) if (!qp) return -ENOMEM; - qp...
e81a16e77259294cd4ff0a9c1fbe5aa0e311a47d
Analyze and fix the following issue in the Linux kernel code: soc: qcom: ocmem: Add OCMEM hardware version print
Problem Details: It might be useful to know what hardware version of the OCMEM block the SoC contains. Add a debug print for that. Signed-off-by: Luca Weiss <luca@z3ntu.xyz> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Signed-off-by: Bjorn Andersson <andersson@kernel.org> Link: https://lore.kernel.org/r/20230...
```diff diff --git a/drivers/soc/qcom/ocmem.c b/drivers/soc/qcom/ocmem.c index 199fe9872035..aaddc3cc53b7 100644 --- a/drivers/soc/qcom/ocmem.c +++ b/drivers/soc/qcom/ocmem.c @@ -76,6 +76,10 @@ struct ocmem { #define OCMEM_REG_GFX_MPU_START 0x00001004 #define OCMEM_REG_GFX_MPU_END 0x00001008 +#define OCMEM_HW_V...
274cf2bdd6c94da2bf293f5a6c9a5f712dd4b01e
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: pm8916: Rename &wcd_codec -> &pm8916_codec
Problem Details: All definitions in pm8916.dtsi use the &pm8916_ label prefix, only the codec uses the &wcd_codec label. &wcd_codec is confusing because the codec on MSM8916 is split into a "wcd-digital" and "wcd-analog" part and both could be described with &wcd_codec. Let's just name it &pm8916_codec so it's consist...
```diff diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dts b/arch/arm64/boot/dts/qcom/apq8016-sbc.dts index 9081825c9574..923646766ef1 100644 --- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dts +++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dts @@ -324,6 +324,14 @@ firmware-name = "qcom/apq8016/mba.mbn", "qcom/apq8016/mode...
835f939501769253eb7eb2dc5389b8592a63a3ed
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: msm8916/39: Clean up MDSS labels
Problem Details: Right now MDSS related definitions cannot be properly grouped together in board DTs because the labels do not use consistent prefixes. The DSI PHY label is particularly weird because the DSI number is at the end (&dsi_phy0) while DSI itself is called &dsi0. Follow the example of more recent SoCs and g...
```diff diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dts b/arch/arm64/boot/dts/qcom/apq8016-sbc.dts index 4f3d837578fd..9081825c9574 100644 --- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dts +++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dts @@ -211,7 +211,7 @@ port@0 { reg = <0>; adv7533_in: endpoint { - ...
fdfc21f65023dbbfe11dcd8f106230668ba8d9e5
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: msm8916/39: Use consistent name for I2C/SPI pinctrl
Problem Details: Make the labels for the BLSP I2C/SPI pinctrl consistent with the one used for UART by adding the missing blsp_ prefix. This allows having them properly grouped together. The nodes are only reordered in msm8939.dtsi for now since the pinctrl definitions in msm8916-pins.dtsi are currently still unordere...
```diff diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dts b/arch/arm64/boot/dts/qcom/apq8016-sbc.dts index 19bf429a973e..4f3d837578fd 100644 --- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dts +++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dts @@ -479,15 +479,15 @@ * 2mA drive strength is not enough when connecting multip...
5da80b28bf25c3458c7beb23794ff53622ce7eb4
Analyze and fix the following issue in the Linux kernel code: x86/smp: Initialize cpu_primary_thread_mask late
Problem Details: Marking primary threads in the cpumask during early boot is only correct in certain configurations, but broken e.g. for the legacy hyperthreading detection. This is due to the complete mess in the CPUID evaluation code which initializes smp_num_siblings only half during early init and fixes it up late...
```diff diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c index 209c5052556d..af49e24b46a4 100644 --- a/arch/x86/kernel/apic/apic.c +++ b/arch/x86/kernel/apic/apic.c @@ -2398,6 +2398,21 @@ static void cpu_mark_primary_thread(unsigned int cpu, unsigned int apicid) if (smp_num_siblings == 1 || !(ap...
5842d1d9c1b0d17e0c29eae65ae1f245f83682dd
Analyze and fix the following issue in the Linux kernel code: RDMA/irdma: Fix Local Invalidate fencing
Problem Details: If the local invalidate fence is indicated in the WR, only the read fence is currently being set in WQE. Fix this to set both the read and local fence in the WQE. Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs") Link: https://lore.kernel.org/r/20230522155654.1309-4-shiraz.salee...
```diff diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c index 68ce3cd40002..eaa12c124598 100644 --- a/drivers/infiniband/hw/irdma/verbs.c +++ b/drivers/infiniband/hw/irdma/verbs.c @@ -3292,6 +3292,7 @@ static int irdma_post_send(struct ib_qp *ibqp, break; case IB_WR_LOCAL_I...
c8f304d75f6c6cc679a73f89591f9a915da38f09
Analyze and fix the following issue in the Linux kernel code: RDMA/irdma: Prevent QP use after free
Problem Details: There is a window where the poll cq may use a QP that has been freed. This can happen if a CQE is polled before irdma_clean_cqes() can clear the CQE's related to the QP and the destroy QP races to free the QP memory. then the QP structures are used in irdma_poll_cq. Fix this by moving the clearing of ...
```diff diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c index ab5cdf782785..68ce3cd40002 100644 --- a/drivers/infiniband/hw/irdma/verbs.c +++ b/drivers/infiniband/hw/irdma/verbs.c @@ -522,11 +522,6 @@ static int irdma_destroy_qp(struct ib_qp *ibqp, struct ib_udata *udata) if (!i...
492061bfc045d815aa5414c1a5eaf373c2fb89fe
Analyze and fix the following issue in the Linux kernel code: arm64: dts: mediatek: add missing cache properties
Problem Details: As all level 2 and level 3 caches are unified, add required cache-unified properties to fix warnings like: mt7622-rfb1.dtb: l2-cache: 'cache-unified' is a required property Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20230421223157.115367-1-kr...
```diff diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi index 006cd639059f..36ef2dbe8add 100644 --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi @@ -101,6 +101,7 @@ L2: l2-cache { compatible = "cache"; cache-level =...
ea6c5f21efecbaa3a14cb21c5bc0e23c84473a11
Analyze and fix the following issue in the Linux kernel code: arm64: dts: mediatek: mt8195: Add mediatek,broken-save-restore-fw to cherry
Problem Details: Firmware shipped on mt8195 Chromebooks is affected by the GICR save/restore issue as described by the patch ("dt-bindings: interrupt-controller: arm,gic-v3: Add quirk for Mediatek SoCs w/ broken FW"). Add the quirk property. Fixes: 5eb2e303ec6b ("arm64: dts: mediatek: Introduce MT8195 Cherry platform'...
```diff diff --git a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi index d20e0ea92c5f..37a3e9de90ff 100644 --- a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi @@ -255,6 +255,10 @@ }; }; +&gic { + mediatek,br...
d72cfbd6fcf7cd02084991eee47ecc9f4b4c1e69
Analyze and fix the following issue in the Linux kernel code: arm64: dts: mediatek: mt8192: Add mediatek,broken-save-restore-fw to asurada
Problem Details: Firmware shipped on mt8192 Chromebooks is affected by the GICR save/restore issue as described by the patch ("dt-bindings: interrupt-controller: arm,gic-v3: Add quirk for Mediatek SoCs w/ broken FW"). Add the quirk property. Fixes: 331fae2fc922 ("arm64: dts: mediatek: Introduce MT8192-based Asurada bo...
```diff diff --git a/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi b/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi index 5a440504d4f9..0e8b34117090 100644 --- a/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi @@ -275,6 +275,10 @@ remote-endpoint = <&anx762...
42127f578ebde652d1373e0233356fbd351675c4
Analyze and fix the following issue in the Linux kernel code: arm64: dts: mediatek: mt8183: Add mediatek,broken-save-restore-fw to kukui
Problem Details: Firmware shipped on mt8183 Chromebooks is affected by the GICR save/restore issue as described by the patch ("dt-bindings: interrupt-controller: arm,gic-v3: Add quirk for Mediatek SoCs w/ broken FW"). Add the quirk property. Fixes: cd894e274b74 ("arm64: dts: mt8183: Add krane-sku176 board") Reviewed-b...
```diff diff --git a/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi b/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi index 63952c1251df..8892b2f64a0f 100644 --- a/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi @@ -292,6 +292,10 @@ }; }; +&gic { + mediatek,broken...
57bf5b2d1002cfd6e8d363fc2caebe415bf33ba4
Analyze and fix the following issue in the Linux kernel code: soc: mediatek: mtk-mutex: Remove unnecessary .owner
Problem Details: Remove .owner field if calls are used which set it automatically. ./drivers/soc/mediatek/mtk-mutex.c:1054:3-8: No need to set .owner here. The core will do it. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4869 Signed-off-by: Jiapeng Chong <ji...
```diff diff --git a/drivers/soc/mediatek/mtk-mutex.c b/drivers/soc/mediatek/mtk-mutex.c index 26f3d9a41496..4aa0913817ae 100644 --- a/drivers/soc/mediatek/mtk-mutex.c +++ b/drivers/soc/mediatek/mtk-mutex.c @@ -1051,7 +1051,6 @@ static struct platform_driver mtk_mutex_driver = { .probe = mtk_mutex_probe, .driver ...
44d0fb387b53e56c8a050bac5c7d460e21eb226f
Analyze and fix the following issue in the Linux kernel code: mm: page_table_check: Ensure user pages are not slab pages
Problem Details: The current uses of PageAnon in page table check functions can lead to type confusion bugs between struct page and slab [1], if slab pages are accidentally mapped into the user space. This is because slab reuses the bits in struct page to store its internal states, which renders PageAnon ineffective on...
```diff diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 1c68d67b832f..92a2063a0a23 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h @@ -617,6 +617,12 @@ PAGEFLAG_FALSE(VmemmapSelfHosted, vmemmap_self_hosted) * Please note that, confusingly, "page_mapping" refers to t...
d0b861653f8c16839c3035875b556afc4472f941
Analyze and fix the following issue in the Linux kernel code: usb: usbfs: Use consistent mmap functions
Problem Details: When hcd->localmem_pool is non-null, localmem_pool is used to allocate DMA memory. In this case, the dma address will be properly returned (in dma_handle), and dma_mmap_coherent should be used to map this memory into the user space. However, the current implementation uses pfn_remap_range, which is sup...
```diff diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index 3936ca7f7d2f..fcf68818e999 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb/core/devio.c @@ -235,7 +235,7 @@ static int usbdev_mmap(struct file *file, struct vm_area_struct *vma) size_t size = vma->vm_end - vma->vm_start; void *me...
0143d148d1e882fb1538dc9974c94d63961719b9
Analyze and fix the following issue in the Linux kernel code: usb: usbfs: Enforce page requirements for mmap
Problem Details: The current implementation of usbdev_mmap uses usb_alloc_coherent to allocate memory pages that will later be mapped into the user space. Meanwhile, usb_alloc_coherent employs three different methods to allocate memory, as outlined below: * If hcd->localmem_pool is non-null, it uses gen_pool_dma_alloc...
```diff diff --git a/drivers/usb/core/buffer.c b/drivers/usb/core/buffer.c index fbb087b728dc..268ccbec88f9 100644 --- a/drivers/usb/core/buffer.c +++ b/drivers/usb/core/buffer.c @@ -172,3 +172,44 @@ void hcd_buffer_free( } dma_free_coherent(hcd->self.sysdev, size, addr, dma); } + +void *hcd_buffer_alloc_pages(str...
967c28b23f6c89bb8eef6a046ea88afe0d7c1029
Analyze and fix the following issue in the Linux kernel code: erofs: kill hooked chains to avoid loops on deduplicated compressed images
Problem Details: After heavily stressing EROFS with several images which include a hand-crafted image of repeated patterns for more than 46 days, I found two chains could be linked with each other almost simultaneously and form a loop so that the entire loop won't be submitted. As a consequence, the corresponding file...
```diff diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c index 22be768a5b8a..d29552ea53fc 100644 --- a/fs/erofs/zdata.c +++ b/fs/erofs/zdata.c @@ -93,11 +93,8 @@ struct z_erofs_pcluster { /* let's avoid the valid 32-bit kernel addresses */ -/* the chained workgroup has't submitted io (still open) */ +/* the end of...
56ad9b2110699a80eb5f49413add2bf4b90bb285
Analyze and fix the following issue in the Linux kernel code: PCI: rcar-host: Remove unused static pcie_base and pcie_dev
Problem Details: After the L1 link state transition exception handler rework, the static copies of the remapped PCIe controller address and the PCIe device pointer became unused. Remove them. Link: https://lore.kernel.org/r/f29a8c37bd906dfbe23208cc2b089da17e339a75.1684857051.git.geert+renesas@glider.be Fixes: 6e36203...
```diff diff --git a/drivers/pci/controller/pcie-rcar-host.c b/drivers/pci/controller/pcie-rcar-host.c index e80e56b2a842..7ffcd0f5aa45 100644 --- a/drivers/pci/controller/pcie-rcar-host.c +++ b/drivers/pci/controller/pcie-rcar-host.c @@ -41,21 +41,6 @@ struct rcar_msi { int irq2; }; -#ifdef CONFIG_ARM -/* - * Her...
7b32040f6d7f885ffc09a6df7c17992d56d2eab8
Analyze and fix the following issue in the Linux kernel code: dt-bindings: usb: snps,dwc3: Fix "snps,hsphy_interface" type
Problem Details: The "snps,hsphy_interface" is string, not u8. Fix the type. Fixes: 389d77658801 ("dt-bindings: usb: Convert DWC USB3 bindings to DT schema") Cc: stable <stable@kernel.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Marek Vasut <marex@denx.de> Link: https://lore.ke...
```diff diff --git a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml b/Documentation/devicetree/bindings/usb/snps,dwc3.yaml index 50edc4da780e..4f7625955ccc 100644 --- a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml +++ b/Documentation/devicetree/bindings/usb/snps,dwc3.yaml @@ -287,7 +287,7 @@ properties: ...
046895105d9666ab56e86ce8dd9786f8003125c6
Analyze and fix the following issue in the Linux kernel code: usb: misc: eud: Fix indentation issues
Problem Details: Fix a couple of indentation issues in EUD driver. Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org> Link: https://lore.kernel.org/r/20230517211756.2483552-4-bhupesh.sharma@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/usb/misc/qcom_eud.c b/drivers/usb/misc/qcom_eud.c index 0dc414463759..7f371ea1248c 100644 --- a/drivers/usb/misc/qcom_eud.c +++ b/drivers/usb/misc/qcom_eud.c @@ -22,10 +22,10 @@ #define EUD_REG_VBUS_INT_CLR 0x0080 #define EUD_REG_CSR_EUD_EN 0x1014 #define EUD_REG_SW_ATTACH_DET 0x1018 -#d...
f16135918b5f8b510db014ecf0a069e34c02382e
Analyze and fix the following issue in the Linux kernel code: usb: misc: eud: Fix eud sysfs path (use 'qcom_eud')
Problem Details: The eud sysfs enablement path is currently mentioned in the Documentation as: /sys/bus/platform/drivers/eud/.../enable Instead it should be: /sys/bus/platform/drivers/qcom_eud/.../enable Fix the same. Fixes: 9a1bf58ccd44 ("usb: misc: eud: Add driver support for Embedded USB Debugger(EUD)") Revie...
```diff diff --git a/Documentation/ABI/testing/sysfs-driver-eud b/Documentation/ABI/testing/sysfs-driver-eud index 83f3872182a4..2bab0db2d2f0 100644 --- a/Documentation/ABI/testing/sysfs-driver-eud +++ b/Documentation/ABI/testing/sysfs-driver-eud @@ -1,4 +1,4 @@ -What: /sys/bus/platform/drivers/eud/.../enable +What: ...
7126a2aeabae696f73d9497f32c5d212d7311916
Analyze and fix the following issue in the Linux kernel code: usb: Switch i2c drivers back to use .probe()
Problem Details: After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new() call-back type"), all drivers being converted to .probe_new() and then 03c835f498b5 ("i2c: Switch .probe() to not take an id parameter") convert back to (the new) .probe() to be able to eventually drop .probe_new() from struct i2c_driver...
```diff diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c index ce1da80d3365..1f3329ef5c7a 100644 --- a/drivers/usb/misc/usb251xb.c +++ b/drivers/usb/misc/usb251xb.c @@ -746,7 +746,7 @@ static struct i2c_driver usb251xb_i2c_driver = { .of_match_table = usb251xb_of_match, .pm = &usb251xb_pm_op...