id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
12cda920212a49fa22d9e8b9492ac4ea013310a4
Analyze and fix the following issue in the Linux kernel code: net: hns3: fix kernel crash problem in concurrent scenario
Problem Details: When link status change, the nic driver need to notify the roce driver to handle this event, but at this time, the roce driver may uninit, then cause kernel crash. To fix the problem, when link status change, need to check whether the roce registered, and when uninit, need to wait link update finish. ...
```diff diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index 43cc6ee4d87d..82574ce0194f 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -3086,9 +3086,7 @@...
7fcb9cb2fe47294e16067c3cfd25332c8662a115
Analyze and fix the following issue in the Linux kernel code: coresight: Fix ref leak when of_coresight_parse_endpoint() fails
Problem Details: of_graph_get_next_endpoint() releases the reference to the previous endpoint on each iteration, but when parsing fails the loop exits early meaning the last reference is never dropped. Fix it by dropping the refcount in the exit condition. Fixes: d375b356e687 ("coresight: Fix support for sparsely pop...
```diff diff --git a/drivers/hwtracing/coresight/coresight-platform.c b/drivers/hwtracing/coresight/coresight-platform.c index 9d550f5697fa..57a009552cc5 100644 --- a/drivers/hwtracing/coresight/coresight-platform.c +++ b/drivers/hwtracing/coresight/coresight-platform.c @@ -297,8 +297,10 @@ static int of_get_coresight_...
c8a4bdca928debacf49524d1b09dbf27e88e1f18
Analyze and fix the following issue in the Linux kernel code: hwmon: (cros_ec) Fix access to restricted __le16
Problem Details: 0-day complains: drivers-hwmon-cros_ec_hwmon.c:sparse:sparse:cast-to-restricted-__le16 Fix by using a __le16 typed variable as parameter to le16_to_cpu(). Fixes: bc3e45258096 ("hwmon: add ChromeOS EC driver") Cc: Thomas Weißschuh <linux@weissschuh.net> Cc: Tzung-Bi Shih <tzungbi@kernel.org> Signed-o...
```diff diff --git a/drivers/hwmon/cros_ec_hwmon.c b/drivers/hwmon/cros_ec_hwmon.c index b3ba7247e06b..5514cf780b8b 100644 --- a/drivers/hwmon/cros_ec_hwmon.c +++ b/drivers/hwmon/cros_ec_hwmon.c @@ -26,12 +26,13 @@ struct cros_ec_hwmon_priv { static int cros_ec_hwmon_read_fan_speed(struct cros_ec_device *cros_ec, u8 i...
1f72dd046270ff44e5fd43045c4d0bb025f88607
Analyze and fix the following issue in the Linux kernel code: hwmon: (cros_ec) Prevent read overflow in probe()
Problem Details: The "resp.sensor_name" comes from cros_ec_cmd() and it hasn't necessarily been NUL terminated. We had not intended to read past "sensor_name_size" bytes, however, there is a width vs precision bug in the format string. The format needs to be precision '%.*s' instead of width '%*s'. Precision prevents ...
```diff diff --git a/drivers/hwmon/cros_ec_hwmon.c b/drivers/hwmon/cros_ec_hwmon.c index 41f268fa8260..b3ba7247e06b 100644 --- a/drivers/hwmon/cros_ec_hwmon.c +++ b/drivers/hwmon/cros_ec_hwmon.c @@ -212,7 +212,7 @@ static void cros_ec_hwmon_probe_temp_sensors(struct device *dev, struct cros_ec_ continue; senso...
0eafc58f2194dbd01d4be40f99a697681171995b
Analyze and fix the following issue in the Linux kernel code: HID: i2c-hid: elan: fix reset suspend current leakage
Problem Details: The Elan eKTH5015M touch controller found on the Lenovo ThinkPad X13s shares the VCC33 supply with other peripherals that may remain powered during suspend (e.g. when enabled as wakeup sources). The reset line is also wired so that it can be left deasserted when the supply is off. This is important a...
```diff diff --git a/drivers/hid/i2c-hid/i2c-hid-of-elan.c b/drivers/hid/i2c-hid/i2c-hid-of-elan.c index 5b91fb106cfc..091e37933225 100644 --- a/drivers/hid/i2c-hid/i2c-hid-of-elan.c +++ b/drivers/hid/i2c-hid/i2c-hid-of-elan.c @@ -31,6 +31,7 @@ struct i2c_hid_of_elan { struct regulator *vcc33; struct regulator *vcc...
e822ce43968daf9da4368617d2c948c22ccf93f9
Analyze and fix the following issue in the Linux kernel code: arm64: dts: amlogic: gxbb-odroidc2: fix invalid reset-gpio property
Problem Details: This fixes the following: hub@1: 'reset-gpio' does not match any of the regexes: 'pinctrl-[0-9]+' from schema $id: http://devicetree.org/schemas/usb/genesys,gl850g.yaml# Tested-by: Christian Hewitt <christianshewitt@gmail.com> Link: https://lore.kernel.org/r/20240606-topic-amlogic-upstream-bindings-f...
```diff diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts index c431986e6a33..c37cc6b036cd 100644 --- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts @@ -408,6 +408,6 @@ compatible = "...
edc15ee0e43948568fa5380c9147feb9a767ae67
Analyze and fix the following issue in the Linux kernel code: arm64: dts: amlogic: a1: drop the invalid reset-name for usb@fe004400
Problem Details: This fixes the following: usb@fe004400: 'reset-name' does not match any of the regexes: '^usb@[0-9a-f]+$', 'pinctrl-[0-9]+' Tested-by: Christian Hewitt <christianshewitt@gmail.com> Link: https://lore.kernel.org/r/20240606-topic-amlogic-upstream-bindings-fixes-dts-v1-11-62e812729541@linaro.org Signed-o...
```diff diff --git a/arch/arm64/boot/dts/amlogic/meson-a1.dtsi b/arch/arm64/boot/dts/amlogic/meson-a1.dtsi index c16f57b5ce9f..e5366d4239b1 100644 --- a/arch/arm64/boot/dts/amlogic/meson-a1.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-a1.dtsi @@ -466,7 +466,6 @@ assigned-clocks = <&clkc_periphs CLKID_USB_BUS>; ...
ea99706a438f19cf352242ffabab46bbc76a03d3
Analyze and fix the following issue in the Linux kernel code: arm64: dts: amlogic: a1: use correct node name for mmc controller
Problem Details: This fixes the following: sd@10000: $nodename:0: 'sd@10000' does not match '^mmc(@.*)?$' Tested-by: Christian Hewitt <christianshewitt@gmail.com> Link: https://lore.kernel.org/r/20240606-topic-amlogic-upstream-bindings-fixes-dts-v1-10-62e812729541@linaro.org Signed-off-by: Neil Armstrong <neil.armstro...
```diff diff --git a/arch/arm64/boot/dts/amlogic/meson-a1.dtsi b/arch/arm64/boot/dts/amlogic/meson-a1.dtsi index a3ff266fb17d..c16f57b5ce9f 100644 --- a/arch/arm64/boot/dts/amlogic/meson-a1.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-a1.dtsi @@ -432,7 +432,7 @@ clock-names = "fixpll_in", "hifipll_in"; }; - ...
e5d4d006a8c5504dfebce7f090ddfb75444491ba
Analyze and fix the following issue in the Linux kernel code: arm64: dts: amlogic: c3: use correct compatible for gpio_intc node
Problem Details: This fixes the following: interrupt-controller@4080: compatible: 'oneOf' conditional failed, one must be fixed: ['amlogic,meson-gpio-intc', 'amlogic,c3-gpio-intc'] is too long 'amlogic,meson-gpio-intc' is not one of ['amlogic,meson8-gpio-intc', 'amlogic,meson8b-gpio-intc', 'amlogic,meson-gxbb-gpio-in...
```diff diff --git a/arch/arm64/boot/dts/amlogic/amlogic-c3.dtsi b/arch/arm64/boot/dts/amlogic/amlogic-c3.dtsi index 32a754fe7990..f8fb060c49ae 100644 --- a/arch/arm64/boot/dts/amlogic/amlogic-c3.dtsi +++ b/arch/arm64/boot/dts/amlogic/amlogic-c3.dtsi @@ -111,8 +111,7 @@ }; gpio_intc: interrupt-controller@4080...
0cb2a3b0d10a3938df546913d738bca121667455
Analyze and fix the following issue in the Linux kernel code: arm64: dts: amlogic: axg: fix tdm audio-controller clock order
Problem Details: This fixes the following: audio-controller-0: clock-names:0: 'sclk' was expected from schema $id: http://devicetree.org/schemas/sound/amlogic,axg-tdm-iface.yaml# audio-controller-0: clock-names:1: 'lrclk' was expected from schema $id: http://devicetree.org/schemas/sound/amlogic,axg-tdm-iface.yaml# au...
```diff diff --git a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi index 6d12b760b90f..e9b22868983d 100644 --- a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi @@ -25,10 +25,10 @@ compatible = "amlogic,axg-tdm-iface"; #sound-da...
5dab35f183b30c40fb7fb99015811edde96f90d6
Analyze and fix the following issue in the Linux kernel code: arm64: dts: amlogic: g12a-u200: add missing AVDD-supply to acodec
Problem Details: This fixes the following: audio-controller@32000: 'AVDD-supply' is a required property Tested-by: Christian Hewitt <christianshewitt@gmail.com> Link: https://lore.kernel.org/r/20240606-topic-amlogic-upstream-bindings-fixes-dts-v1-7-62e812729541@linaro.org Signed-off-by: Neil Armstrong <neil.armstrong@...
```diff diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts index f1a071e13dee..0e239939ade6 100644 --- a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts +++ b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts @@ -373,6 +373,7 @@ }; &acodec { + AVDD-supply = ...
4b7df533684032233f65ea1157ec94215ab3f3da
Analyze and fix the following issue in the Linux kernel code: arm64: dts: amlogic: g12a-u200: drop invalid sound-dai-cells
Problem Details: This fixes the following: audio-amplifier-0: '#sound-dai-cells' does not match any of the regexes: 'pinctrl-[0-9]+' Tested-by: Christian Hewitt <christianshewitt@gmail.com> Link: https://lore.kernel.org/r/20240606-topic-amlogic-upstream-bindings-fixes-dts-v1-6-62e812729541@linaro.org Signed-off-by: Ne...
```diff diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts index 3da7922d83f1..f1a071e13dee 100644 --- a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts +++ b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts @@ -24,7 +24,6 @@ compatible = "simple-audio-ampli...
94befcb819d47b155554997ccfac52354d1b4380
Analyze and fix the following issue in the Linux kernel code: arm64: dts: amlogic: sm1: fix tdm controllers compatible
Problem Details: Fixes the following: audio-controller@300: compatible: ['amlogic,sm1-tdmin', 'amlogic,axg-tdmin'] is too long from schema $id: http://devicetree.org/schemas/sound/amlogic,axg-tdm-formatters.yaml# audio-controller@340: compatible: ['amlogic,sm1-tdmin', 'amlogic,axg-tdmin'] is too long from schema $id:...
```diff diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1.dtsi b/arch/arm64/boot/dts/amlogic/meson-sm1.dtsi index 6822c2f3cfed..d13cf5b4aac7 100644 --- a/arch/arm64/boot/dts/amlogic/meson-sm1.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-sm1.dtsi @@ -275,8 +275,7 @@ }; tdmin_a: audio-controller@300 { - compat...
2478d7bee215cdf6a3a581239d12a17407e30771
Analyze and fix the following issue in the Linux kernel code: arm64: dts: amlogic: sm1: fix tdm audio-controller clock order
Problem Details: Fix the clock order in the tdm audio-controller nodes, this fixes the following errors: audio-controller-0: clock-names:0: 'sclk' was expected from schema $id: http://devicetree.org/schemas/sound/amlogic,axg-tdm-iface.yaml# audio-controller-0: clock-names:1: 'lrclk' was expected from schema $id: htt...
```diff diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1.dtsi b/arch/arm64/boot/dts/amlogic/meson-sm1.dtsi index 643f94d9d08e..6822c2f3cfed 100644 --- a/arch/arm64/boot/dts/amlogic/meson-sm1.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-sm1.dtsi @@ -17,10 +17,10 @@ compatible = "amlogic,axg-tdm-iface"; #sound-da...
cf42ea27fd7f087b43da27b709267211e7e0e8c4
Analyze and fix the following issue in the Linux kernel code: arm64: dts: amlogic: move ao_pinctrl into aobus
Problem Details: The AO pinctrl was mis-described as beeing part of AO rti sysctrl, move it it into aobus like it's also done in GX SoCs, and remove the now invalid '#address-cells', '#size-cells' & 'ranges from the sys-ctrl@0 node. This fixes: sys-ctrl@0: '#address-cells', '#size-cells', 'ranges' do not match any of ...
```diff diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi index b058ed78faf0..138fb18c6480 100644 --- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi @@ -1741,9 +1741,6 @@ compatible = "amlo...
1095ad0e92175d19cb7f0b5256af300c921a2d63
Analyze and fix the following issue in the Linux kernel code: arm64: dts: amlogic: meson-g12b-bananapi: remove invalid fan on wrong pwm_cd controller
Problem Details: The fan is connected to the GPIOAO_10 pin, which can be connected to the pwm_AO_cd controller, but this one is already used for the vddcpu_b regulator. The fan was wrongly described as using the pwm_cd with the invalid "pwm-gpios" property, both are wrong so remove the fan until we find an acceptable ...
```diff diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-bananapi.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-bananapi.dtsi index 4b8db872bbf3..6a346cb86a53 100644 --- a/arch/arm64/boot/dts/amlogic/meson-g12b-bananapi.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-bananapi.dtsi @@ -44,13 +44,6 @@ reset-gpios...
8d3ae46c64336b538898af76b4f504dfbe89b886
Analyze and fix the following issue in the Linux kernel code: dt-bindings: HID: i2c-hid: add dedicated Ilitek ILI2901 schema
Problem Details: The Ilitek ILI2901 touch screen controller was apparently incorrectly added to the Elan eKTH6915 schema simply because it also has a reset gpio and is currently managed by the Elan driver in Linux. The two controllers are not related even if an unfortunate wording in the commit message adding the Ilit...
```diff diff --git a/Documentation/devicetree/bindings/input/elan,ekth6915.yaml b/Documentation/devicetree/bindings/input/elan,ekth6915.yaml index dc4ac41f2441..c1fcf8c90c24 100644 --- a/Documentation/devicetree/bindings/input/elan,ekth6915.yaml +++ b/Documentation/devicetree/bindings/input/elan,ekth6915.yaml @@ -20,7 ...
89e1ee118d6f0ee6bd6e80d8fe08839875daa241
Analyze and fix the following issue in the Linux kernel code: hid: asus: asus_report_fixup: fix potential read out of bounds
Problem Details: syzbot reported a potential read out of bounds in asus_report_fixup. this patch adds checks so that a read out of bounds will not occur Signed-off-by: Andrew Ballance <andrewjballance@gmail.com> Reported-by: <syzbot+07762f019fd03d01f04c@syzkaller.appspotmail.com> Closes: https://syzkaller.appspot.co...
```diff diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c index 02de2bf4f790..37e6d25593c2 100644 --- a/drivers/hid/hid-asus.c +++ b/drivers/hid/hid-asus.c @@ -1204,8 +1204,8 @@ static __u8 *asus_report_fixup(struct hid_device *hdev, __u8 *rdesc, } /* match many more n-key devices */ - if (drvdata->qui...
0b90dfda222e38b7ca8dad6e098e36f5186f0b94
Analyze and fix the following issue in the Linux kernel code: perf maps: Fix use after free in __maps__fixup_overlap_and_insert
Problem Details: In the case 'before' and 'after' are broken out from pos, maps_by_address may be changed by __maps__insert, as such it needs re-reading. Don't ignore the return value from __maps_insert. Fixes: 659ad3492b91 ("perf maps: Switch from rbtree to lazily sorted array for addresses") Signed-off-by: Ian Roge...
```diff diff --git a/tools/perf/util/maps.c b/tools/perf/util/maps.c index 16b39db594f4..eaada3e0f5b4 100644 --- a/tools/perf/util/maps.c +++ b/tools/perf/util/maps.c @@ -741,7 +741,6 @@ static unsigned int first_ending_after(struct maps *maps, const struct map *map) */ static int __maps__fixup_overlap_and_insert(st...
a88d60903696c01de577558080ec4fc738a70475
Analyze and fix the following issue in the Linux kernel code: cifs: Don't advance the I/O iterator before terminating subrequest
Problem Details: There's now no need to make sure subreq->io_iter is advanced to match subreq->transferred before calling one of the netfs subrequest termination functions as the check has been removed netfslib and the iterator is reset prior to retrying a subreq. Fixes: 3ee1a1fc3981 ("cifs: Cut over to using netfslib...
```diff diff --git a/fs/smb/client/smb2pdu.c b/fs/smb/client/smb2pdu.c index 993ac36c3d58..38a06e8a0f90 100644 --- a/fs/smb/client/smb2pdu.c +++ b/fs/smb/client/smb2pdu.c @@ -4577,8 +4577,6 @@ smb2_readv_callback(struct mid_q_entry *mid) if (rdata->subreq.start < rdata->subreq.rreq->i_size) rdata->result = 0; ...
02c418774f76a0a36a6195c9dbf8971eb4130a15
Analyze and fix the following issue in the Linux kernel code: smb: client: fix deadlock in smb2_find_smb_tcon()
Problem Details: Unlock cifs_tcp_ses_lock before calling cifs_put_smb_ses() to avoid such deadlock. Cc: stable@vger.kernel.org Signed-off-by: Enzo Matsumiya <ematsumiya@suse.de> Reviewed-by: Shyam Prasad N <sprasad@microsoft.com> Reviewed-by: Paulo Alcantara (Red Hat) <pc@manguebit.com> Signed-off-by: Steve French <st...
```diff diff --git a/fs/smb/client/smb2transport.c b/fs/smb/client/smb2transport.c index 02135a605305..1476c445cadc 100644 --- a/fs/smb/client/smb2transport.c +++ b/fs/smb/client/smb2transport.c @@ -216,8 +216,8 @@ smb2_find_smb_tcon(struct TCP_Server_Info *server, __u64 ses_id, __u32 tid) } tcon = smb2_find_smb_s...
e96b2933152fd87b6a41765b2f58b158fde855b6
Analyze and fix the following issue in the Linux kernel code: net: sfp: Always call `sfp_sm_mod_remove()` on remove
Problem Details: If the module is in SFP_MOD_ERROR, `sfp_sm_mod_remove()` will not be run. As a consequence, `sfp_hwmon_remove()` is not getting run either, leaving a stale `hwmon` device behind. `sfp_sm_mod_remove()` itself checks `sfp->sm_mod_state` anyways, so this check was not really needed in the first place. Fi...
```diff diff --git a/drivers/net/phy/sfp.c b/drivers/net/phy/sfp.c index 3f9cbd797fd6..a5684ef5884b 100644 --- a/drivers/net/phy/sfp.c +++ b/drivers/net/phy/sfp.c @@ -2429,8 +2429,7 @@ static void sfp_sm_module(struct sfp *sfp, unsigned int event) /* Handle remove event globally, it resets this state machine */ i...
9185afeac2a3dcce8300a5684291a43c2838cfd6
Analyze and fix the following issue in the Linux kernel code: modpost: do not warn about missing MODULE_DESCRIPTION() for vmlinux.o
Problem Details: Building with W=1 incorrectly emits the following warning: WARNING: modpost: missing MODULE_DESCRIPTION() in vmlinux.o This check should apply only to modules. Fixes: 1fffe7a34c89 ("script: modpost: emit a warning when the description is missing") Signed-off-by: Masahiro Yamada <masahiroy@kernel.o...
```diff diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 937294ff164f..f48d72d22dc2 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -1647,10 +1647,11 @@ static void read_symbols(const char *modname) namespace = get_next_modinfo(&info, "import_ns", namespace); } + + ...
96c965667b9dbbd713acdffa95ebab8c225f8595
Analyze and fix the following issue in the Linux kernel code: kbuild: explicitly run mksysmap as sed script from link-vmlinux.sh
Problem Details: In commit b18b047002b7 ("kbuild: change scripts/mksysmap into sed script"), the mksysmap script was transformed into a sed script, made directly executable with "#!/bin/sed -f". Apparently, the path to sed is different on NixOS. The shebang can't use the env command, otherwise the "sed -f" command wou...
```diff diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh index 46ce5d04dbeb..518c70b8db50 100755 --- a/scripts/link-vmlinux.sh +++ b/scripts/link-vmlinux.sh @@ -193,7 +193,7 @@ kallsyms_step() mksysmap() { info NM ${2} - ${NM} -n "${1}" | "${srctree}/scripts/mksysmap" > "${2}" + ${NM} -n "${1}" | sed ...
a9a34fc737aea5d5d7a47c885f5ed45dfb1df07f
Analyze and fix the following issue in the Linux kernel code: dt-bindings: ufs: qcom,ufs: drop source clock entries
Problem Details: There is no need to mention and/or to touch in any way the intermediate (source) clocks. Drop them from MSM8996 UFSHCD schema, making it follow the example lead by all other platforms. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Acked-by: Manivannan Sadhasivam <manivannan.sadhasi...
```diff diff --git a/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml b/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml index cd3680dc002f..25a5edeea164 100644 --- a/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml +++ b/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml @@ -46,11 +46,11 @@ properties: ...
7ba38c2a9e1a8d11d5286ef8e14f86247d5443ff
Analyze and fix the following issue in the Linux kernel code: Input: wacom_w8001 - correct device name generation
Problem Details: Fixes: 6c7cc1a29d1e ("Input: wacom_w8001 - simplify device name generation") Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com> Link: https://lore.kernel.org/r/20240605164656.61623-1-jason.gerecke@wacom.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
```diff diff --git a/drivers/input/touchscreen/wacom_w8001.c b/drivers/input/touchscreen/wacom_w8001.c index c61908518afe..4ddb6b3baba5 100644 --- a/drivers/input/touchscreen/wacom_w8001.c +++ b/drivers/input/touchscreen/wacom_w8001.c @@ -649,7 +649,7 @@ static int w8001_connect(struct serio *serio, struct serio_driver...
f3a5367c679d31473d3fbb391675055b4792c309
Analyze and fix the following issue in the Linux kernel code: btrfs: protect folio::private when attaching extent buffer folios
Problem Details: [BUG] Since v6.8 there are rare kernel crashes reported by various people, the common factor is bad page status error messages like this: BUG: Bad page state in process kswapd0 pfn:d6e840 page: refcount:0 mapcount:0 mapping:000000007512f4f2 index:0x2796c2c7c pfn:0xd6e840 aops:btree_aops ino:1...
```diff diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 597387e9f040..f688fab55251 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -3689,6 +3689,8 @@ static struct extent_buffer *grab_extent_buffer( struct folio *folio = page_folio(page); struct extent_buffer *exists; + lockdep_asse...
2f6b884dfcc55065b76d2bf1e2424b93991ae92d
Analyze and fix the following issue in the Linux kernel code: function_graph: Rename BYTE_NUMBER to CHAR_NUMBER in selftests
Problem Details: The function_graph selftests checks various size variables to pass from the entry of the function to the exit. It tests 1, 2, 4 and 8 byte words. The 1 byte macro was called BYTE_NUMBER but that is used in the sh architecture: arch/sh/include/asm/bitops-op32.h Just rename the macro to CHAR_NUMBER. Li...
```diff diff --git a/kernel/trace/trace_selftest.c b/kernel/trace/trace_selftest.c index 369efc569238..adf0f436d84b 100644 --- a/kernel/trace/trace_selftest.c +++ b/kernel/trace/trace_selftest.c @@ -758,7 +758,7 @@ trace_selftest_startup_function(struct tracer *trace, struct trace_array *tr) #ifdef CONFIG_DYNAMIC_FT...
9a2a3aab7329f1e62982531559866b90d5a5208b
Analyze and fix the following issue in the Linux kernel code: fgraph: Remove some unused functions
Problem Details: These functions are defined in the fgraph.c file, but not called elsewhere, so delete these unused functions. kernel/trace/fgraph.c:273:1: warning: unused function 'set_bitmap_bits'. kernel/trace/fgraph.c:259:19: warning: unused function 'get_fgraph_type'. Link: https://lore.kernel.org/linux-trace-ke...
```diff diff --git a/kernel/trace/fgraph.c b/kernel/trace/fgraph.c index c0e428c87ea5..a13551a023aa 100644 --- a/kernel/trace/fgraph.c +++ b/kernel/trace/fgraph.c @@ -255,12 +255,6 @@ static inline int get_frame_offset(struct task_struct *t, int offset) return __get_offset(t->ret_stack[offset]); } -/* Get FGRAPH_T...
4057fd2cddaea0d6f6c5f8af4a455741f5632259
Analyze and fix the following issue in the Linux kernel code: function_graph: Do not update pid func if CONFIG_DYNAMIC_FTRACE not enabled
Problem Details: The ftrace subops is only defined if CONFIG_DYNAMIC_FTRACE is enabled. If it is not, function tracing is extremely limited, and the subops in the ftrace_ops structure is not defined (and will fail to compile). If DYNAMIC_FTRACE is not enabled, then function graph filtering will not work (as it shouldn'...
```diff diff --git a/kernel/trace/fgraph.c b/kernel/trace/fgraph.c index 63d828054c79..c0e428c87ea5 100644 --- a/kernel/trace/fgraph.c +++ b/kernel/trace/fgraph.c @@ -1177,6 +1177,7 @@ void fgraph_update_pid_func(void) if (!(graph_ops.flags & FTRACE_OPS_FL_INITIALIZED)) return; +#ifdef CONFIG_DYNAMIC_FTRACE li...
0c4d8cbb2ce20df3a72b5b3189d93b5c0cc3e968
Analyze and fix the following issue in the Linux kernel code: function_graph: Make fgraph_do_direct static key static
Problem Details: The static branch key "fgraph_do_direct" was not declared static but is only used in one file. Change it to a static variable. Link: https://lore.kernel.org/linux-trace-kernel/20240605202708.936515302@goodmis.org Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficio...
```diff diff --git a/kernel/trace/fgraph.c b/kernel/trace/fgraph.c index 4bf91eebbb08..63d828054c79 100644 --- a/kernel/trace/fgraph.c +++ b/kernel/trace/fgraph.c @@ -515,7 +515,7 @@ static struct fgraph_ops fgraph_stub = { static struct fgraph_ops *fgraph_direct_gops = &fgraph_stub; DEFINE_STATIC_CALL(fgraph_func, f...
86b49970e071921490ebab3d982d93dd616cd967
Analyze and fix the following issue in the Linux kernel code: ftrace: Fix prototypes for ftrace_startup/shutdown_subops()
Problem Details: The ftrace_startup_subops() was in the wrong header, and both functions were not defined on !CONFIG_DYNAMIC_FTRACE. Link: https://lore.kernel.org/linux-trace-kernel/20240605202708.773583114@goodmis.org Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: ...
```diff diff --git a/kernel/trace/ftrace_internal.h b/kernel/trace/ftrace_internal.h index bfba10c2fcf1..4bb1e881154a 100644 --- a/kernel/trace/ftrace_internal.h +++ b/kernel/trace/ftrace_internal.h @@ -15,6 +15,7 @@ extern struct ftrace_ops global_ops; int ftrace_startup(struct ftrace_ops *ops, int command); int ftr...
6800e63cf97bae62bca56d8e691544540d945f53
Analyze and fix the following issue in the Linux kernel code: drm/xe: move disable_c6 call
Problem Details: disable c6 called in guc_pc_fini_hw is unreachable. GuC PC init returns earlier if skip_guc_pc is true and never registers the finish call thus making disable_c6 unreachable. move this call to gt idle. v2: rebase v3: add fixes tag (Himal) Fixes: 975e4a3795d4 ("drm/xe: Manually setup C6 when skip_gu...
```diff diff --git a/drivers/gpu/drm/xe/xe_gt_idle.c b/drivers/gpu/drm/xe/xe_gt_idle.c index a6ab8bb4571d..5d6181117ab2 100644 --- a/drivers/gpu/drm/xe/xe_gt_idle.c +++ b/drivers/gpu/drm/xe/xe_gt_idle.c @@ -197,6 +197,12 @@ static void gt_idle_fini(void *arg) xe_gt_idle_disable_pg(gt); + if (gt_to_xe(gt)->info.sk...
21b708554648177a0078962c31629bce31ef5d83
Analyze and fix the following issue in the Linux kernel code: drm/xe/xe_gt_idle: use GT forcewake domain assertion
Problem Details: The rc6 registers used in disable_c6 function belong to the GT forcewake domain. Hence change the forcewake assertion to check GT forcewake domain. v2: add fixes tag (Himal) Fixes: 975e4a3795d4 ("drm/xe: Manually setup C6 when skip_guc_pc is set") Signed-off-by: Riana Tauro <riana.tauro@intel.com> Re...
```diff diff --git a/drivers/gpu/drm/xe/xe_gt_idle.c b/drivers/gpu/drm/xe/xe_gt_idle.c index 0109d1d2e9c4..a6ab8bb4571d 100644 --- a/drivers/gpu/drm/xe/xe_gt_idle.c +++ b/drivers/gpu/drm/xe/xe_gt_idle.c @@ -250,7 +250,7 @@ void xe_gt_idle_enable_c6(struct xe_gt *gt) void xe_gt_idle_disable_c6(struct xe_gt *gt) { xe...
399ced9594dfab51b782798efe60a2376cd5b724
Analyze and fix the following issue in the Linux kernel code: rcu/tasks: Fix stale task snaphot for Tasks Trace
Problem Details: When RCU-TASKS-TRACE pre-gp takes a snapshot of the current task running on all online CPUs, no explicit ordering synchronizes properly with a context switch. This lack of ordering can permit the new task to miss pre-grace-period update-side accesses. The following diagram, courtesy of Paul, shows th...
```diff diff --git a/kernel/rcu/tasks.h b/kernel/rcu/tasks.h index 4dc56b6e27c0..ba3440a45b6d 100644 --- a/kernel/rcu/tasks.h +++ b/kernel/rcu/tasks.h @@ -1747,6 +1747,16 @@ static void rcu_tasks_trace_pregp_step(struct list_head *hop) // allow safe access to the hop list. for_each_online_cpu(cpu) { rcu_read_loc...
ce79b73336d51288129f510569f389b93affe56c
Analyze and fix the following issue in the Linux kernel code: drm/i915: Don't use __func__ as prefix for drm_dbg_printer
Problem Details: Updated code of drm_dbg_printer() is already printing symbolic name of the caller like drm_dbg() does. Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240517163406.2348-4-michal.wajdeczk...
```diff diff --git a/drivers/gpu/drm/i915/gt/intel_reset.c b/drivers/gpu/drm/i915/gt/intel_reset.c index 6161f7a3ff70..735cd23a43c6 100644 --- a/drivers/gpu/drm/i915/gt/intel_reset.c +++ b/drivers/gpu/drm/i915/gt/intel_reset.c @@ -1025,7 +1025,7 @@ void intel_gt_set_wedged(struct intel_gt *gt) if (GEM_SHOW_DEBUG())...
c2ef66e9ad882ab4b055a86657c20c61d203f003
Analyze and fix the following issue in the Linux kernel code: drm/print: Improve drm_dbg_printer
Problem Details: With recent introduction of a generic drm dev printk function, we can now store and use location where drm_dbg_printer was invoked and output it's symbolic name like we do for all drm debug prints. Cc: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: ...
```diff diff --git a/drivers/gpu/drm/drm_print.c b/drivers/gpu/drm/drm_print.c index 94e8f3542846..cf24dfdeb6b2 100644 --- a/drivers/gpu/drm/drm_print.c +++ b/drivers/gpu/drm/drm_print.c @@ -217,8 +217,7 @@ void __drm_printfn_dbg(struct drm_printer *p, struct va_format *vaf) if (!__drm_debug_enabled(category)) ret...
0d11307022978f1f395da587285c06c9cea47288
Analyze and fix the following issue in the Linux kernel code: drm/print: Add missing [drm] prefix to drm based WARN
Problem Details: All drm_device based logging macros, except those related to WARN, include the [drm] prefix. Fix that. [ ] 0000:00:00.0: this is a warning [ ] 0000:00:00.0: drm_WARN_ON(true) vs [ ] 0000:00:00.0: [drm] this is a warning [ ] 0000:00:00.0: [drm] drm_WARN_ON(true) Signed-off-by: Michal Wajdeczko...
```diff diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h index 089950ad8681..112f8830b372 100644 --- a/include/drm/drm_print.h +++ b/include/drm/drm_print.h @@ -632,12 +632,12 @@ void __drm_err(const char *format, ...); /* Helper for struct drm_device based WARNs */ #define drm_WARN(drm, condition, fo...
b9f147cdc2c0bf54ca2c25ed185806f1fc6da65f
Analyze and fix the following issue in the Linux kernel code: rcutorture: Add missing MODULE_DESCRIPTION() macros
Problem Details: Fix the following 'make W=1' warnings: WARNING: modpost: missing MODULE_DESCRIPTION() in kernel/rcu/rcutorture.o WARNING: modpost: missing MODULE_DESCRIPTION() in kernel/rcu/rcuscale.o WARNING: modpost: missing MODULE_DESCRIPTION() in kernel/rcu/refscale.o Signed-off-by: Jeff Johnson <quic_jjohnson@q...
```diff diff --git a/kernel/rcu/rcuscale.c b/kernel/rcu/rcuscale.c index 8db4fedaaa1e..b53a9e8f5904 100644 --- a/kernel/rcu/rcuscale.c +++ b/kernel/rcu/rcuscale.c @@ -42,6 +42,7 @@ #include "rcu.h" +MODULE_DESCRIPTION("Read-Copy Update module-based scalability-test facility"); MODULE_LICENSE("GPL"); MODULE_AUTHO...
6040072f4774a575fa67b912efe7722874be337b
Analyze and fix the following issue in the Linux kernel code: rcutorture: Fix rcu_torture_fwd_cb_cr() data race
Problem Details: On powerpc systems, spinlock acquisition does not order prior stores against later loads. This means that this statement: rfcp->rfc_next = NULL; Can be reordered to follow this statement: WRITE_ONCE(*rfcpp, rfcp); Which is then a data race with rcu_torture_fwd_prog_cr(), specifically, this state...
```diff diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c index 44cc455e1b61..cafe047d046e 100644 --- a/kernel/rcu/rcutorture.c +++ b/kernel/rcu/rcutorture.c @@ -2630,7 +2630,7 @@ static void rcu_torture_fwd_cb_cr(struct rcu_head *rhp) spin_lock_irqsave(&rfp->rcu_fwd_lock, flags); rfcpp = rfp->rcu_fwd_...
4c830eef806679dc243e191f962c488dd9d00708
Analyze and fix the following issue in the Linux kernel code: tools/memory-model: Fix bug in lock.cat
Problem Details: Andrea reported that the following innocuous litmus test: C T {} P0(spinlock_t *x) { int r0; spin_lock(x); spin_unlock(x); r0 = spin_is_locked(x); } gives rise to a nonsensical empty result with no executions: $ herd7 -conf linux-kernel.cfg T.litmus Test T Required States 0 Ok Witnesses Posit...
```diff diff --git a/tools/memory-model/lock.cat b/tools/memory-model/lock.cat index 53b5a492739d..21ba65086938 100644 --- a/tools/memory-model/lock.cat +++ b/tools/memory-model/lock.cat @@ -102,19 +102,19 @@ let rf-lf = rfe-lf | rfi-lf * within one of the lock's critical sections returns False. *) -(* rfi for RU...
ddd7432d621daf93baf36e353ab7472d69dd692f
Analyze and fix the following issue in the Linux kernel code: kcsan: Add missing MODULE_DESCRIPTION() macro
Problem Details: Fix the warning reported by 'make C=1 W=1': WARNING: modpost: missing MODULE_DESCRIPTION() in kernel/kcsan/kcsan_test.o Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Reviewed-by: Marco Elver <elver@google.com> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
```diff diff --git a/kernel/kcsan/kcsan_test.c b/kernel/kcsan/kcsan_test.c index 0c17b4c83e1c..117d9d4d3c3b 100644 --- a/kernel/kcsan/kcsan_test.c +++ b/kernel/kcsan/kcsan_test.c @@ -1620,5 +1620,6 @@ static struct kunit_suite kcsan_test_suite = { kunit_test_suites(&kcsan_test_suite); +MODULE_DESCRIPTION("KCSAN te...
3b37a419b710797138c31c0f41c2a7d8aa9f62cd
Analyze and fix the following issue in the Linux kernel code: dt-bindings: vendor-prefixes: Add PrimeView
Problem Details: The Prime View International (PVI) is a LCD panel manufacturer. Signed-off-by: Primoz Fiser <primoz.fiser@norik.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20240606080104.3663355-1-primoz.fiser@norik.com Signed-off-by: Neil Armstrong <neil.armstrong@linaro....
```diff diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml index 51ca841db26e..77eccc5c4889 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml @@ -1164,6 +1164,8 @@ pat...
5d30de4311d2d4165e78dc021c5cacb7496b3491
Analyze and fix the following issue in the Linux kernel code: drm/xe: Do not dereference NULL job->fence in trace points
Problem Details: job->fence is not assigned until xe_sched_job_arm(), check for job->fence in xe_sched_job_seqno() so any usage of this function (trace points) do not result in NULL ptr dereference. Also check job->fence before assigning error in job trace points. Fixes: 0ac7a2c745e8 ("drm/xe: Don't initialize fences ...
```diff diff --git a/drivers/gpu/drm/xe/xe_sched_job.h b/drivers/gpu/drm/xe/xe_sched_job.h index 002c3b5c0a5c..f362e28455db 100644 --- a/drivers/gpu/drm/xe/xe_sched_job.h +++ b/drivers/gpu/drm/xe/xe_sched_job.h @@ -70,7 +70,7 @@ to_xe_sched_job(struct drm_sched_job *drm) static inline u32 xe_sched_job_seqno(struct x...
0ee14725471cea66e03e3cd4f4c582d759de502c
Analyze and fix the following issue in the Linux kernel code: mm/util: Swap kmemdup_array() arguments
Problem Details: GCC 14.1 complains about the argument usage of kmemdup_array(): drivers/soc/tegra/fuse/fuse-tegra.c:130:65: error: 'kmemdup_array' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Werror=calloc-transposed-args] 130 | fuse->lookups = kmemdup_array(fuse...
```diff diff --git a/drivers/soc/tegra/fuse/fuse-tegra.c b/drivers/soc/tegra/fuse/fuse-tegra.c index b6bfd6729df3..d27667283846 100644 --- a/drivers/soc/tegra/fuse/fuse-tegra.c +++ b/drivers/soc/tegra/fuse/fuse-tegra.c @@ -127,8 +127,8 @@ static void tegra_fuse_print_sku_info(struct tegra_sku_info *tegra_sku_info) s...
84a8bc3ec225b28067b168e9410e452c83d706da
Analyze and fix the following issue in the Linux kernel code: selftests: net: lib: set 'i' as local
Problem Details: Without this, the 'i' variable declared before could be overridden by accident, e.g. for i in "${@}"; do __ksft_status_merge "${i}" ## 'i' has been modified foo "${i}" ## using 'i' with an unexpected value done After a quick look, it looks like 'i' is currently not u...
```diff diff --git a/tools/testing/selftests/net/lib.sh b/tools/testing/selftests/net/lib.sh index e2f51102d7e1..9155c914c064 100644 --- a/tools/testing/selftests/net/lib.sh +++ b/tools/testing/selftests/net/lib.sh @@ -27,6 +27,7 @@ __ksft_status_merge() local -A weights local weight=0 + local i for i in "$@"; ...
79322174bcc780b99795cb89d237b26006a8b94b
Analyze and fix the following issue in the Linux kernel code: selftests: net: lib: avoid error removing empty netns name
Problem Details: If there is an error to create the first netns with 'setup_ns()', 'cleanup_ns()' will be called with an empty string as first parameter. The consequences is that 'cleanup_ns()' will try to delete an invalid netns, and wait 20 seconds if the netns list is empty. Instead of just checking if the name is...
```diff diff --git a/tools/testing/selftests/net/lib.sh b/tools/testing/selftests/net/lib.sh index a422e10d3d3a..e2f51102d7e1 100644 --- a/tools/testing/selftests/net/lib.sh +++ b/tools/testing/selftests/net/lib.sh @@ -15,7 +15,7 @@ ksft_xfail=2 ksft_skip=4 # namespace list created by setup_ns -NS_LIST="" +NS_LIST=...
41b02ea4c0adfcc6761fbfed42c3ce6b6412d881
Analyze and fix the following issue in the Linux kernel code: selftests: net: lib: support errexit with busywait
Problem Details: If errexit is enabled ('set -e'), loopy_wait -- or busywait and others using it -- will stop after the first failure. Note that if the returned status of loopy_wait is checked, and even if errexit is enabled, Bash will not stop at the first error. Fixes: 25ae948b4478 ("selftests/net: add lib.sh") Cc:...
```diff diff --git a/tools/testing/selftests/net/lib.sh b/tools/testing/selftests/net/lib.sh index edc030e81a46..a422e10d3d3a 100644 --- a/tools/testing/selftests/net/lib.sh +++ b/tools/testing/selftests/net/lib.sh @@ -67,9 +67,7 @@ loopy_wait() while true do local out - out=$("$@") - local ret=$? - if ((!ret...
225d3de749d0c76564a59aaa3e5b772fce6f0cf7
Analyze and fix the following issue in the Linux kernel code: drm/ci: uprev IGT
Problem Details: test-list.txt and test-list-full.txt are not generated for cross-builds and they are required by drm-ci for testing arm32 targets. This is fixed in igt-gpu-tools. So uprev IGT to include the commit which fixes this issue. Also disable building xe driver tests for non-intel platforms. Reviewed-by: Dmit...
```diff diff --git a/drivers/gpu/drm/ci/build-igt.sh b/drivers/gpu/drm/ci/build-igt.sh index b7d2a49a6db3..eddb5f782a5e 100644 --- a/drivers/gpu/drm/ci/build-igt.sh +++ b/drivers/gpu/drm/ci/build-igt.sh @@ -45,6 +45,10 @@ MESON_OPTIONS="-Doverlay=disabled \ -Dlibunwind=enabled ...
9c5219349b5bc588071529985eacd779a0dacfb7
Analyze and fix the following issue in the Linux kernel code: drm/ci: add farm variable
Problem Details: Mesa uses structured logs for logging and debug purpose, https://mesa.pages.freedesktop.org/-/mesa/-/jobs/59165650/artifacts/results/job_detail.json Since drm-ci uses the mesa scripts, add the farm variable and update the device type for missing jobs. Signed-off-by: Vignesh Raman <vignesh.raman@colla...
```diff diff --git a/drivers/gpu/drm/ci/test.yml b/drivers/gpu/drm/ci/test.yml index 8bc63912fddb..2615f67f6aa3 100644 --- a/drivers/gpu/drm/ci/test.yml +++ b/drivers/gpu/drm/ci/test.yml @@ -24,6 +24,7 @@ variables: HWCI_TEST_SCRIPT: "/install/igt_runner.sh" DEBIAN_ARCH: "armhf" + FARM: collabora dep...
cc806b74466672a9bbd4e9a04265d44eb506b686
Analyze and fix the following issue in the Linux kernel code: drm/ci: uprev mesa version
Problem Details: zlib.net is not allowing tarball download anymore and results in below error in kernel+rootfs_arm32 container build, urllib.error.HTTPError: HTTP Error 403: Forbidden urllib.error.HTTPError: HTTP Error 415: Unsupported Media Type Uprev mesa to latest version which includes a fix for this issue. https:...
```diff diff --git a/drivers/gpu/drm/ci/build-igt.sh b/drivers/gpu/drm/ci/build-igt.sh index 500fa4f5c30a..7859554756c4 100644 --- a/drivers/gpu/drm/ci/build-igt.sh +++ b/drivers/gpu/drm/ci/build-igt.sh @@ -32,4 +32,4 @@ tar -cf artifacts/igt.tar /igt # Pass needed files to the test stage S3_ARTIFACT_NAME="igt.tar.gz...
7015843afcaf68c132784c89528dfddc0005e483
Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Fix send_signal test with nested CONFIG_PARAVIRT
Problem Details: Alexei reported that send_signal test may fail with nested CONFIG_PARAVIRT configs. In this particular case, the base VM is AMD with 166 cpus, and I run selftests with regular qemu on top of that and indeed send_signal test failed. I also tried with an Intel box with 80 cpus and there is no issue. The...
```diff diff --git a/tools/testing/selftests/bpf/prog_tests/send_signal.c b/tools/testing/selftests/bpf/prog_tests/send_signal.c index 920aee41bd58..6cc69900b310 100644 --- a/tools/testing/selftests/bpf/prog_tests/send_signal.c +++ b/tools/testing/selftests/bpf/prog_tests/send_signal.c @@ -156,7 +156,8 @@ static void t...
92959898fdd6f398a799faf0bdcb1f7afc35d055
Analyze and fix the following issue in the Linux kernel code: drm/i915: Reduce DDI clock gating printk level from NOTICE to DEBUG
Problem Details: No idea why the DDI clock gating print is done with drm_notice(). Just use drm_dbg_kms() since no one is going to be interested in this under normal circumstances. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240605113336.11194-1-vi...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c index 3c3fc53376ce..c76bbd13bb27 100644 --- a/drivers/gpu/drm/i915/display/intel_ddi.c +++ b/drivers/gpu/drm/i915/display/intel_ddi.c @@ -2072,9 +2072,9 @@ void intel_ddi_sanitize_encoder_pll_mapping(struct intel_en...
2ed22161b19b11239aa742804549f63edd7c91e3
Analyze and fix the following issue in the Linux kernel code: ASoC: atmel: atmel-classd: Re-add dai_link->platform to fix card init
Problem Details: The removed dai_link->platform component cause a fail which is exposed at runtime. (ex: when a sound tool is used) This patch re-adds the dai_link->platform component to have a full card registered. Before this patch: :~$ aplay -l **** List of PLAYBACK Hardware Devices **** card 0: CLASSD [CLASSD], de...
```diff diff --git a/sound/soc/atmel/atmel-classd.c b/sound/soc/atmel/atmel-classd.c index 6aed1ee443b4..ba314b279919 100644 --- a/sound/soc/atmel/atmel-classd.c +++ b/sound/soc/atmel/atmel-classd.c @@ -473,19 +473,22 @@ static int atmel_classd_asoc_card_init(struct device *dev, if (!dai_link) return -ENOMEM; - ...
208f53102a0b66d5735868c717de32ef49a20050
Analyze and fix the following issue in the Linux kernel code: drm/i915/display: include xe_bo.h, gem_object_types etc. where needed
Problem Details: Include what you use. The dependencies on the headers, and what they include, is a bit convoluted. Add xe compat gem/gem_object_types.h. Fix all the places needed. Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Jani Nikula <jani.nikula...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.c b/drivers/gpu/drm/i915/display/intel_atomic_plane.c index a4ce39a7f265..980c5dc70763 100644 --- a/drivers/gpu/drm/i915/display/intel_atomic_plane.c +++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.c @@ -32,6 +32,7 @@ */ #include <linux/dma...
09fe2bfa6b83f865126ce3964744863f69a4a030
Analyze and fix the following issue in the Linux kernel code: ata: pata_macio: Fix max_segment_size with PAGE_SIZE == 64K
Problem Details: The pata_macio driver advertises a max_segment_size of 0xff00, because the hardware doesn't cope with requests >= 64K. However the SCSI core requires max_segment_size to be at least PAGE_SIZE, which is a problem for pata_macio when the kernel is built with 64K pages. In older kernels the SCSI core wo...
```diff diff --git a/drivers/ata/pata_macio.c b/drivers/ata/pata_macio.c index 817838e2f70e..3cb455a32d92 100644 --- a/drivers/ata/pata_macio.c +++ b/drivers/ata/pata_macio.c @@ -915,10 +915,13 @@ static const struct scsi_host_template pata_macio_sht = { .sg_tablesize = MAX_DCMDS, /* We may not need that strict on...
009f6f42c67e9de737d6d3d199f92b21a8cb9622
Analyze and fix the following issue in the Linux kernel code: KVM: PPC: Book3S HV: Fix the get_one_reg of SDAR
Problem Details: The kvmppc_get_one_reg_hv() for SDAR is wrongly getting the SIAR instead of SDAR, possibly a paste error emanating from the previous refactoring. Patch fixes the wrong get_one_reg() for the same. Fixes: ebc88ea7a6ad ("KVM: PPC: Book3S HV: Use accessors for VCPU registers") Signed-off-by: Shivaprasad ...
```diff diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index b33d01c45b4d..a9522693063e 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c @@ -2305,7 +2305,7 @@ static int kvmppc_get_one_reg_hv(struct kvm_vcpu *vcpu, u64 id, *val = get_reg_val(id, kvmppc_get_siar_h...
f9ca6a10be20479d526f27316cc32cfd1785ed39
Analyze and fix the following issue in the Linux kernel code: KVM: PPC: Book3S HV: Fix the set_one_reg for MMCR3
Problem Details: The kvmppc_set_one_reg_hv() wrongly get() the value instead of set() for MMCR3. Fix the same. Fixes: 5752fe0b811b ("KVM: PPC: Book3S HV: Save/restore new PMU registers") Signed-off-by: Shivaprasad G Bhat <sbhat@linux.ibm.com> Reviewed-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Michael Elle...
```diff diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index 9df24fb50b0e..b33d01c45b4d 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c @@ -2540,7 +2540,7 @@ static int kvmppc_set_one_reg_hv(struct kvm_vcpu *vcpu, u64 id, vcpu->arch.mmcrs = set_reg_val(id, *val)...
54ec2bd9e0173b75daf84675d07c56584f96564b
Analyze and fix the following issue in the Linux kernel code: KVM: PPC: Book3S HV nestedv2: Fix doorbell emulation
Problem Details: Doorbell emulation is broken for KVM on PAPR guests as support for DPDES was not added in the initial patch series. Due to this, a KVM on PAPR guest with SMT > 1 cannot be booted with the XICS interrupt controller as doorbells are setup in the initial probe path when using XICS (pSeries_smp_probe()). ...
```diff diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index 83bd331a4ef4..9df24fb50b0e 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c @@ -4187,6 +4187,11 @@ static int kvmhv_vcpu_entry_nestedv2(struct kvm_vcpu *vcpu, u64 time_limit, int trap; long rc; + if ...
55dfb8bed6fe8bda390cc71cca878d11a9407099
Analyze and fix the following issue in the Linux kernel code: KVM: PPC: Book3S HV nestedv2: Add DPDES support in helper library for Guest state buffer
Problem Details: Add support for using DPDES in the library for using guest state buffers. DPDES support is needed for enabling usage of doorbells in a L2 KVM on PAPR guest. Fixes: 6ccbbc33f06a ("KVM: PPC: Add helper library for Guest State Buffers") Cc: stable@vger.kernel.org # v6.7+ Signed-off-by: Gautam Menghani <g...
```diff diff --git a/Documentation/arch/powerpc/kvm-nested.rst b/Documentation/arch/powerpc/kvm-nested.rst index 630602a8aa00..5defd13cc6c1 100644 --- a/Documentation/arch/powerpc/kvm-nested.rst +++ b/Documentation/arch/powerpc/kvm-nested.rst @@ -546,7 +546,9 @@ table information. +--------+-------+----+--------+-----...
22b639253ec046d66c69c54b9d28bb1bd30f3a7a
Analyze and fix the following issue in the Linux kernel code: tracing: Fix trace_pid_list_free() kernel-doc
Problem Details: make C=1 reports: kernel/trace/pid_list.c:458: warning: Function parameter or struct member 'pid_list' not described in 'trace_pid_list_free' Add the missing parameter to the trace_pid_list_free() kernel-doc. Link: https://lore.kernel.org/linux-trace-kernel/20240506-trace_pid_list_free-kdoc-v1-1-c70...
```diff diff --git a/kernel/trace/pid_list.c b/kernel/trace/pid_list.c index 95106d02b32d..19b271a12c99 100644 --- a/kernel/trace/pid_list.c +++ b/kernel/trace/pid_list.c @@ -451,6 +451,7 @@ struct trace_pid_list *trace_pid_list_alloc(void) /** * trace_pid_list_free - Frees an allocated pid_list. + * @pid_list: Th...
0dcc53abf58d572d34c5313de85f607cd33fc691
Analyze and fix the following issue in the Linux kernel code: net: ethtool: fix the error condition in ethtool_get_phy_stats_ethtool()
Problem Details: Clang static checker (scan-build) warning: net/ethtool/ioctl.c:line 2233, column 2 Called function pointer is null (null dereference). Return '-EOPNOTSUPP' when 'ops->get_ethtool_phy_stats' is NULL to fix this typo error. Fixes: 201ed315f967 ("net/ethtool/ioctl: split ethtool_get_phy_stats into multi...
```diff diff --git a/net/ethtool/ioctl.c b/net/ethtool/ioctl.c index 5a55270aa86e..e645d751a5e8 100644 --- a/net/ethtool/ioctl.c +++ b/net/ethtool/ioctl.c @@ -2220,7 +2220,7 @@ static int ethtool_get_phy_stats_ethtool(struct net_device *dev, const struct ethtool_ops *ops = dev->ethtool_ops; int n_stats, ret; - if...
b01e1c030770ff3b4fe37fc7cc6bca03f594133f
Analyze and fix the following issue in the Linux kernel code: ipv6: fix possible race in __fib6_drop_pcpu_from()
Problem Details: syzbot found a race in __fib6_drop_pcpu_from() [1] If compiler reads more than once (*ppcpu_rt), second read could read NULL, if another cpu clears the value in rt6_get_pcpu_route(). Add a READ_ONCE() to prevent this race. Also add rcu_read_lock()/rcu_read_unlock() because we rely on RCU protection ...
```diff diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c index 31d77885bcae..6e57c03e3255 100644 --- a/net/ipv6/ip6_fib.c +++ b/net/ipv6/ip6_fib.c @@ -966,6 +966,7 @@ static void __fib6_drop_pcpu_from(struct fib6_nh *fib6_nh, if (!fib6_nh->rt6i_pcpu) return; + rcu_read_lock(); /* release the reference to t...
45c7f555bf5e716d9c6ffb737e97d4cc9b4c21ef
Analyze and fix the following issue in the Linux kernel code: kconfig: doc: document behavior of 'select' and 'imply' followed by 'if'
Problem Details: Documentation/kbuild/kconfig-language.rst explains the behavior of 'select' as follows: reverse dependencies can be used to force a lower limit of another symbol. The value of the current menu symbol is used as the minimal value <symbol> can be set to. This is not true when the 'select' propert...
```diff diff --git a/Documentation/kbuild/kconfig-language.rst b/Documentation/kbuild/kconfig-language.rst index 86be5b857cc4..1fb3f5e6193c 100644 --- a/Documentation/kbuild/kconfig-language.rst +++ b/Documentation/kbuild/kconfig-language.rst @@ -150,6 +150,12 @@ applicable everywhere (see syntax). That will limit th...
bf83266a1eef8251e2f126dba635039de069104a
Analyze and fix the following issue in the Linux kernel code: kconfig: doc: fix a typo in the note about 'imply'
Problem Details: This sentence does not make sense due to a typo. Fix it. Fixes: def2fbffe62c ("kconfig: allow symbols implied by y to become m") Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
```diff diff --git a/Documentation/kbuild/kconfig-language.rst b/Documentation/kbuild/kconfig-language.rst index 555c2f839969..86be5b857cc4 100644 --- a/Documentation/kbuild/kconfig-language.rst +++ b/Documentation/kbuild/kconfig-language.rst @@ -184,7 +184,7 @@ applicable everywhere (see syntax). ability to hook in...
efaf24e30ec39ebbea9112227485805a48b0ceb1
Analyze and fix the following issue in the Linux kernel code: af_unix: Annotate data-race of sk->sk_shutdown in sk_diag_fill().
Problem Details: While dumping sockets via UNIX_DIAG, we do not hold unix_state_lock(). Let's use READ_ONCE() to read sk->sk_shutdown. Fixes: e4e541a84863 ("sock-diag: Report shutdown for inet and unix sockets (v2)") Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
```diff diff --git a/net/unix/diag.c b/net/unix/diag.c index 321336f91a0a..937edf4afed4 100644 --- a/net/unix/diag.c +++ b/net/unix/diag.c @@ -165,7 +165,7 @@ static int sk_diag_fill(struct sock *sk, struct sk_buff *skb, struct unix_diag_r sock_diag_put_meminfo(sk, skb, UNIX_DIAG_MEMINFO)) goto out_nlmsg_trim;...
5d915e584d8408211d4567c22685aae8820bfc55
Analyze and fix the following issue in the Linux kernel code: af_unix: Use skb_queue_len_lockless() in sk_diag_show_rqlen().
Problem Details: We can dump the socket queue length via UNIX_DIAG by specifying UDIAG_SHOW_RQLEN. If sk->sk_state is TCP_LISTEN, we return the recv queue length, but here we do not hold recvq lock. Let's use skb_queue_len_lockless() in sk_diag_show_rqlen(). Fixes: c9da99e6475f ("unix_diag: Fixup RQLEN extension rep...
```diff diff --git a/net/unix/diag.c b/net/unix/diag.c index 116cf508aea4..321336f91a0a 100644 --- a/net/unix/diag.c +++ b/net/unix/diag.c @@ -104,7 +104,7 @@ static int sk_diag_show_rqlen(struct sock *sk, struct sk_buff *nlskb) struct unix_diag_rqlen rql; if (READ_ONCE(sk->sk_state) == TCP_LISTEN) { - rql.udiag...
83690b82d228b3570565ebd0b41873933238b97f
Analyze and fix the following issue in the Linux kernel code: af_unix: Use skb_queue_empty_lockless() in unix_release_sock().
Problem Details: If the socket type is SOCK_STREAM or SOCK_SEQPACKET, unix_release_sock() checks the length of the peer socket's recvq under unix_state_lock(). However, unix_stream_read_generic() calls skb_unlink() after releasing the lock. Also, for SOCK_SEQPACKET, __skb_try_recv_datagram() unlinks skb without unix_...
```diff diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index eb3ba3448ed3..80846279de9f 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -631,7 +631,7 @@ static void unix_release_sock(struct sock *sk, int embrion) unix_state_lock(skpair); /* No more writes */ WRITE_ONCE(skpair->sk_shutdown,...
45d872f0e65593176d880ec148f41ad7c02e40a7
Analyze and fix the following issue in the Linux kernel code: af_unix: Use unix_recvq_full_lockless() in unix_stream_connect().
Problem Details: Once sk->sk_state is changed to TCP_LISTEN, it never changes. unix_accept() takes advantage of this characteristics; it does not hold the listener's unix_state_lock() and only acquires recvq lock to pop one skb. It means unix_state_lock() does not prevent the queue length from changing in unix_stream...
```diff diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 623ee39657e2..eb3ba3448ed3 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -221,15 +221,9 @@ static inline int unix_may_send(struct sock *sk, struct sock *osk) return unix_peer(osk) == NULL || unix_our_peer(sk, osk); } -static inline in...
bd9f2d05731f6a112d0c7391a0d537bfc588dbe6
Analyze and fix the following issue in the Linux kernel code: af_unix: Annotate data-race of net->unx.sysctl_max_dgram_qlen.
Problem Details: net->unx.sysctl_max_dgram_qlen is exposed as a sysctl knob and can be changed concurrently. Let's use READ_ONCE() in unix_create1(). Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
```diff diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index de2a5e334a88..623ee39657e2 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -976,7 +976,7 @@ static struct sock *unix_create1(struct net *net, struct socket *sock, int kern, sk->sk_hash = unix_unbound_hash(sk); sk->sk_allocation = GFP_KE...
b0632e53e0da8054e36bc973f0eec69d30f1b7c6
Analyze and fix the following issue in the Linux kernel code: af_unix: Annotate data-races around sk->sk_sndbuf.
Problem Details: sk_setsockopt() changes sk->sk_sndbuf under lock_sock(), but it's not used in af_unix.c. Let's use READ_ONCE() to read sk->sk_sndbuf in unix_writable(), unix_dgram_sendmsg(), and unix_stream_sendmsg(). Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> Signe...
```diff diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index e7b74207aa3b..de2a5e334a88 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -533,7 +533,7 @@ static int unix_dgram_peer_wake_me(struct sock *sk, struct sock *other) static int unix_writable(const struct sock *sk, unsigned char state) { re...
0aa3be7b3e1f8f997312cc4705f8165e02806f8f
Analyze and fix the following issue in the Linux kernel code: af_unix: Annotate data-races around sk->sk_state in UNIX_DIAG.
Problem Details: While dumping AF_UNIX sockets via UNIX_DIAG, sk->sk_state is read locklessly. Let's use READ_ONCE() there. Note that the result could be inconsistent if the socket is dumped during the state change. This is common for other SOCK_DIAG and similar interfaces. Fixes: c9da99e6475f ("unix_diag: Fixup RQ...
```diff diff --git a/net/unix/diag.c b/net/unix/diag.c index ae39538c5042..116cf508aea4 100644 --- a/net/unix/diag.c +++ b/net/unix/diag.c @@ -65,7 +65,7 @@ static int sk_diag_dump_icons(struct sock *sk, struct sk_buff *nlskb) u32 *buf; int i; - if (sk->sk_state == TCP_LISTEN) { + if (READ_ONCE(sk->sk_state) == T...
af4c733b6b1aded4dc808fafece7dfe6e9d2ebb3
Analyze and fix the following issue in the Linux kernel code: af_unix: Annotate data-race of sk->sk_state in unix_stream_read_skb().
Problem Details: unix_stream_read_skb() is called from sk->sk_data_ready() context where unix_state_lock() is not held. Let's use READ_ONCE() there. Fixes: 77462de14a43 ("af_unix: Add read_sock for stream socket types") Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com...
```diff diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 4ef9c21783a5..e7b74207aa3b 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -2659,7 +2659,7 @@ static struct sk_buff *manage_oob(struct sk_buff *skb, struct sock *sk, static int unix_stream_read_skb(struct sock *sk, skb_read_actor_t recv_a...
8a34d4e8d9742a24f74998f45a6a98edd923319b
Analyze and fix the following issue in the Linux kernel code: af_unix: Annotate data-races around sk->sk_state in sendmsg() and recvmsg().
Problem Details: The following functions read sk->sk_state locklessly and proceed only if the state is TCP_ESTABLISHED. * unix_stream_sendmsg * unix_stream_read_generic * unix_seqpacket_sendmsg * unix_seqpacket_recvmsg Let's use READ_ONCE() there. Fixes: a05d2ad1c1f3 ("af_unix: Only allow recv on connected s...
```diff diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 4763c26ae480..4ef9c21783a5 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -2226,7 +2226,7 @@ static int unix_stream_sendmsg(struct socket *sock, struct msghdr *msg, } if (msg->msg_namelen) { - err = sk->sk_state == TCP_ESTABLISHED ? ...
1b536948e805aab61a48c5aa5db10c9afee880bd
Analyze and fix the following issue in the Linux kernel code: af_unix: Annotate data-race of sk->sk_state in unix_accept().
Problem Details: Once sk->sk_state is changed to TCP_LISTEN, it never changes. unix_accept() takes the advantage and reads sk->sk_state without holding unix_state_lock(). Let's use READ_ONCE() there. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> Signed-off-by: Paolo Ab...
```diff diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 84552826530d..4763c26ae480 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -1710,7 +1710,7 @@ static int unix_accept(struct socket *sock, struct socket *newsock, goto out; arg->err = -EINVAL; - if (sk->sk_state != TCP_LISTEN) + if (RE...
a9bf9c7dc6a5899c01cb8f6e773a66315a5cd4b7
Analyze and fix the following issue in the Linux kernel code: af_unix: Annotate data-race of sk->sk_state in unix_stream_connect().
Problem Details: As small optimisation, unix_stream_connect() prefetches the client's sk->sk_state without unix_state_lock() and checks if it's TCP_CLOSE. Later, sk->sk_state is checked again under unix_state_lock(). Let's use READ_ONCE() for the first check and TCP_CLOSE directly for the second check. Fixes: 1da177...
```diff diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 3bacf47cb94d..84552826530d 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -1481,7 +1481,6 @@ static int unix_stream_connect(struct socket *sock, struct sockaddr *uaddr, struct sk_buff *skb = NULL; long timeo; int err; - int st; er...
eb0718fb3e97ad0d6f4529b810103451c90adf94
Analyze and fix the following issue in the Linux kernel code: af_unix: Annotate data-races around sk->sk_state in unix_write_space() and poll().
Problem Details: unix_poll() and unix_dgram_poll() read sk->sk_state locklessly and calls unix_writable() which also reads sk->sk_state without holding unix_state_lock(). Let's use READ_ONCE() in unix_poll() and unix_dgram_poll() and pass it to unix_writable(). While at it, we remove TCP_SYN_SENT check in unix_dgram_...
```diff diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index b37b53767b29..3bacf47cb94d 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -530,9 +530,9 @@ static int unix_dgram_peer_wake_me(struct sock *sk, struct sock *other) return 0; } -static int unix_writable(const struct sock *sk) +static int...
3a0f38eb285c8c2eead4b3230c7ac2983707599d
Analyze and fix the following issue in the Linux kernel code: af_unix: Annotate data-race of sk->sk_state in unix_inq_len().
Problem Details: ioctl(SIOCINQ) calls unix_inq_len() that checks sk->sk_state first and returns -EINVAL if it's TCP_LISTEN. Then, for SOCK_STREAM sockets, unix_inq_len() returns the number of bytes in recvq. However, unix_inq_len() does not hold unix_state_lock(), and the concurrent listen() might change the state af...
```diff diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 424d021a4d7d..b37b53767b29 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -3017,7 +3017,7 @@ long unix_inq_len(struct sock *sk) struct sk_buff *skb; long amount = 0; - if (sk->sk_state == TCP_LISTEN) + if (READ_ONCE(sk->sk_state) == T...
942238f9735a4a4ebf8274b218d9a910158941d1
Analyze and fix the following issue in the Linux kernel code: af_unix: Annodate data-races around sk->sk_state for writers.
Problem Details: sk->sk_state is changed under unix_state_lock(), but it's read locklessly in many places. This patch adds WRITE_ONCE() on the writer side. We will add READ_ONCE() to the lockless readers in the following patches. Fixes: 83301b5367a9 ("af_unix: Set TCP_ESTABLISHED for datagram sockets too") Fixes: 1d...
```diff diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index b162164b7a42..424d021a4d7d 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -616,7 +616,7 @@ static void unix_release_sock(struct sock *sk, int embrion) u->path.dentry = NULL; u->path.mnt = NULL; state = sk->sk_state; - sk->sk_state = T...
26bfb8b57063f52b867f9b6c8d1742fcb5bd656c
Analyze and fix the following issue in the Linux kernel code: af_unix: Set sk->sk_state under unix_state_lock() for truly disconencted peer.
Problem Details: When a SOCK_DGRAM socket connect()s to another socket, the both sockets' sk->sk_state are changed to TCP_ESTABLISHED so that we can register them to BPF SOCKMAP. When the socket disconnects from the peer by connect(AF_UNSPEC), the state is set back to TCP_CLOSE. Then, the peer's state is also set to ...
```diff diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 25b49efc0926..b162164b7a42 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -570,7 +570,6 @@ static void unix_dgram_disconnected(struct sock *sk, struct sock *other) sk_error_report(other); } } - other->sk_state = TCP_CLOSE; } st...
0fc670d07d5de36a54f061f457743c9cde1d8b46
Analyze and fix the following issue in the Linux kernel code: KVM: selftests: Fix RISC-V compilation
Problem Details: Due to commit 2b7deea3ec7c ("Revert "kvm: selftests: move base kvm_util.h declarations to kvm_util_base.h"") kvm selftests now requires explicitly including ucall_common.h when needed. The commit added the directives everywhere they were needed at the time, but, by merge time, new places had been merge...
```diff diff --git a/tools/testing/selftests/kvm/lib/riscv/ucall.c b/tools/testing/selftests/kvm/lib/riscv/ucall.c index 14ee17151a59..b5035c63d516 100644 --- a/tools/testing/selftests/kvm/lib/riscv/ucall.c +++ b/tools/testing/selftests/kvm/lib/riscv/ucall.c @@ -9,6 +9,7 @@ #include "kvm_util.h" #include "processor...
6c9b5ba73ca77ef3863cda6560856fdfe7dc237a
Analyze and fix the following issue in the Linux kernel code: arm64: dts: amlogic: ad402: move thermal-zones to top node
Problem Details: It appears that this accidentally got added into the spi node, causing a warning. arch/arm64/boot/dts/amlogic/meson-a1-ad402.dts:119.16-161.4: Warning (spi_bus_reg): /soc/spi@fd000400/thermal-zones: missing or empty reg property Fixes: 593ab951232b ("arm64: dts: amlogic: ad402: setup thermal-zones") ...
```diff diff --git a/arch/arm64/boot/dts/amlogic/meson-a1-ad402.dts b/arch/arm64/boot/dts/amlogic/meson-a1-ad402.dts index c8579b6e67cf..6883471a93b4 100644 --- a/arch/arm64/boot/dts/amlogic/meson-a1-ad402.dts +++ b/arch/arm64/boot/dts/amlogic/meson-a1-ad402.dts @@ -84,37 +84,6 @@ vin-supply = <&vddao_3v3>; regul...
101388b8ef1027be72e399beeb97293cce67bb24
Analyze and fix the following issue in the Linux kernel code: cpufreq: ti-cpufreq: Handle deferred probe with dev_err_probe()
Problem Details: Handle deferred probing gracefully by using dev_err_probe() to not spam console with unnecessary error messages. Fixes: f88d152dc739 ("cpufreq: ti: Migrate to dev_pm_opp_set_config()") Signed-off-by: Primoz Fiser <primoz.fiser@norik.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
```diff diff --git a/drivers/cpufreq/ti-cpufreq.c b/drivers/cpufreq/ti-cpufreq.c index 714ed53753fa..5af85c4cbad0 100644 --- a/drivers/cpufreq/ti-cpufreq.c +++ b/drivers/cpufreq/ti-cpufreq.c @@ -417,7 +417,7 @@ static int ti_cpufreq_probe(struct platform_device *pdev) ret = dev_pm_opp_set_config(opp_data->cpu_dev, ...
9d262f35b1155d6f56b6fd1dc054ec218e42696b
Analyze and fix the following issue in the Linux kernel code: HID: add missing MODULE_DESCRIPTION() macros
Problem Details: make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-a4tech.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-apple.o WARNING: modpost: missing MODULE_DESCRIPTIO...
```diff diff --git a/drivers/hid/hid-a4tech.c b/drivers/hid/hid-a4tech.c index 2cbc32dda7f7..54bfaf61182b 100644 --- a/drivers/hid/hid-a4tech.c +++ b/drivers/hid/hid-a4tech.c @@ -163,4 +163,5 @@ static struct hid_driver a4_driver = { }; module_hid_driver(a4_driver); +MODULE_DESCRIPTION("HID driver for some a4tech \...
b0c9a26435413b81799047a7be53255640432547
Analyze and fix the following issue in the Linux kernel code: net: wwan: iosm: Fix tainted pointer delete is case of region creation fail
Problem Details: In case of region creation fail in ipc_devlink_create_region(), previously created regions delete process starts from tainted pointer which actually holds error code value. Fix this bug by decreasing region index before delete. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: ...
```diff diff --git a/drivers/net/wwan/iosm/iosm_ipc_devlink.c b/drivers/net/wwan/iosm/iosm_ipc_devlink.c index bef6819986e9..33d6342124bc 100644 --- a/drivers/net/wwan/iosm/iosm_ipc_devlink.c +++ b/drivers/net/wwan/iosm/iosm_ipc_devlink.c @@ -211,7 +211,7 @@ static int ipc_devlink_create_region(struct iosm_devlink *dev...
0d92e4a7ffd5c42b9fa864692f82476c0bf8bcc8
Analyze and fix the following issue in the Linux kernel code: KVM: arm64: Disassociate vcpus from redistributor region on teardown
Problem Details: When tearing down a redistributor region, make sure we don't have any dangling pointer to that region stored in a vcpu. Fixes: e5a35635464b ("kvm: arm64: vgic-v3: Introduce vgic_v3_free_redist_region()") Reported-by: Alexander Potapenko <glider@google.com> Reviewed-by: Oliver Upton <oliver.upton@linux...
```diff diff --git a/arch/arm64/kvm/vgic/vgic-init.c b/arch/arm64/kvm/vgic/vgic-init.c index 8f5b7a3e7009..7f68cf58b978 100644 --- a/arch/arm64/kvm/vgic/vgic-init.c +++ b/arch/arm64/kvm/vgic/vgic-init.c @@ -391,7 +391,7 @@ static void kvm_vgic_dist_destroy(struct kvm *kvm) if (dist->vgic_model == KVM_DEV_TYPE_ARM_V...
9aa61d8ecb7f6f176ff8247a41a4f6eea8376112
Analyze and fix the following issue in the Linux kernel code: perf: parse-events: Fix compilation error while defining DEBUG_PARSER
Problem Details: Compiling perf tool with 'DEBUG_PARSER=1' leads to errors: $> make -C tools/perf PARSER_DEBUG=1 NO_LIBTRACEEVENT=1 ... CC util/expr-flex.o CC util/expr.o util/parse-events.c:33:12: error: redundant redeclaration of ‘parse_events_debug’ [-Werror=redundant-decls] 33 | extern int parse_e...
```diff diff --git a/tools/perf/util/expr.c b/tools/perf/util/expr.c index b8875aac8f87..b2536a59c44e 100644 --- a/tools/perf/util/expr.c +++ b/tools/perf/util/expr.c @@ -25,10 +25,6 @@ #include <math.h> #include "pmu.h" -#ifdef PARSER_DEBUG -extern int expr_debug; -#endif - struct expr_id_data { union { stru...
831bcbcead6668ebf20b64fdb27518f1362ace3a
Analyze and fix the following issue in the Linux kernel code: Drivers: hv: Cosmetic changes for hv.c and balloon.c
Problem Details: Fix issues reported by checkpatch.pl script in hv.c and balloon.c - Remove unnecessary parentheses - Remove extra newlines - Remove extra spaces - Add spaces between comparison operators - Remove comparison with NULL in if statements No functional changes intended Signed-off-by: Aditya Nagesh <a...
```diff diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c index a8ad728354cb..e0d676c74f14 100644 --- a/drivers/hv/hv.c +++ b/drivers/hv/hv.c @@ -45,8 +45,8 @@ int hv_init(void) * This involves a hypercall. */ int hv_post_message(union hv_connection_id connection_id, - enum hv_message_type message_type, - void ...
14ae2fd12be8c5089e43fee8a21cd8631699b97a
Analyze and fix the following issue in the Linux kernel code: net/mlx5e: SHAMPO, Coalesce skb fragments to page size
Problem Details: When doing hardware GRO (SHAMPO), the driver puts each data payload of a packet from the wire into one skb fragment. TCP Zero-Copy expects page sized skb fragments to be able to do it's page-flipping magic. With the current way of arranging fragments by the driver, only specific MTUs (page sized multip...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c index f1fbf60d0356..43f018567faf 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c @@ -523,15 +523,23 @@ mlx5e_add_skb_shared_info_frag(...
083dbb54c4809bcd56c5c09360ee8c7760a55d71
Analyze and fix the following issue in the Linux kernel code: net/mlx5e: SHAMPO, Disable gso_size for non GRO packets
Problem Details: When HW GRO is enabled, forwarding of packets is broken due to gso_size being set incorrectly on non GRO packets. Non GRO packets have a skb GRO count of 1. mlx5 always sets gso_size on the skb, even for non GRO packets. It leans on the fact that gso_size is normally reset in napi_gro_complete(). But ...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c index b3ef0dd23729..a13fa760f948 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c @@ -2267,6 +2267,8 @@ mlx5e_shampo_flush_skb(struct m...
a64bbd8c286fa67319df73ce842e3f6c7b08b6f6
Analyze and fix the following issue in the Linux kernel code: net/mlx5e: SHAMPO, Fix FCS config when HW GRO on
Problem Details: For the following scenario: ethtool --features eth3 rx-gro-hw on ethtool --features eth3 rx-fcs on ethtool --features eth3 rx-fcs off ... there is a firmware error because the driver enables HW GRO first while FCS is still enabled. This patch fixes this by swapping the order of HW GRO and FCS for th...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c index c53c99dde558..d0808dbe69d3 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -4259,13 +4259,19 @@ int mlx5e_set_feature...
fba8334721e266f92079632598e46e5f89082f30
Analyze and fix the following issue in the Linux kernel code: net/mlx5e: SHAMPO, Fix invalid WQ linked list unlink
Problem Details: When all the strides in a WQE have been consumed, the WQE is unlinked from the WQ linked list (mlx5_wq_ll_pop()). For SHAMPO, it is possible to receive CQEs with 0 consumed strides for the same WQE even after the WQE is fully consumed and unlinked. This triggers an additional unlink for the same wqe wh...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c index 1ddfa00f923f..b3ef0dd23729 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c @@ -2375,6 +2375,9 @@ mpwrq_cqe_out: if (likely(wi-...
70bd03b89f20b9bbe51a7f73c4950565a17a45f7
Analyze and fix the following issue in the Linux kernel code: net/mlx5e: SHAMPO, Fix incorrect page release
Problem Details: Under the following conditions: 1) No skb created yet 2) header_size == 0 (no SHAMPO header) 3) header_index + 1 % MLX5E_SHAMPO_WQ_HEADER_PER_PAGE == 0 (this is the last page fragment of a SHAMPO header page) a new skb is formed with a page that is NOT a SHAMPO header page (it is a regular data pag...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c index 369d101bf03c..1ddfa00f923f 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c @@ -2369,7 +2369,8 @@ static void mlx5e_handle_rx_cqe...
8e99e770f7eab8f8127098df7824373c4b4e8b5c
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: x1e80100: Fix PCIe 6a reg offsets and add MHI
Problem Details: The actual size of the DBI region is 0xf20 and the start of the ELBI region is 0xf40, according to the documentation. So fix them. While at it, add the MHI region as well. Fixes: 5eb83fc10289 ("arm64: dts: qcom: x1e80100: Add PCIe nodes") Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Signed-of...
```diff diff --git a/arch/arm64/boot/dts/qcom/x1e80100.dtsi b/arch/arm64/boot/dts/qcom/x1e80100.dtsi index 5f90a0b3c016..05e4d491ec18 100644 --- a/arch/arm64/boot/dts/qcom/x1e80100.dtsi +++ b/arch/arm64/boot/dts/qcom/x1e80100.dtsi @@ -2737,15 +2737,17 @@ device_type = "pci"; compatible = "qcom,pcie-x1e80100"; ...
0e500122d0e9932f985ba13b9f66e191ff604ffd
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: x1e80100: Disable the SMB2360 4th instance by default
Problem Details: The CRD board doesn't have the 4th SMB2360 PMIC populated while the QCP does. So enable it on QCP only. This fixes the warning for the missing PMIC on CRD as well. Fixes: 2559e61e7ef4 ("arm64: dts: qcom: x1e80100-pmics: Add the missing PMICs") Reviewed-by: Johan Hovold <johan+linaro@kernel.org> Tested...
```diff diff --git a/arch/arm64/boot/dts/qcom/x1e80100-pmics.dtsi b/arch/arm64/boot/dts/qcom/x1e80100-pmics.dtsi index a5662d39fdff..e34e70922cd3 100644 --- a/arch/arm64/boot/dts/qcom/x1e80100-pmics.dtsi +++ b/arch/arm64/boot/dts/qcom/x1e80100-pmics.dtsi @@ -522,6 +522,8 @@ #address-cells = <1>; #size-cells = <0>...
3d930f1750ce30a6c36dbc71f8ff7e20322b94d7
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: sc7280: Disable SuperSpeed instances in park mode
Problem Details: On SC7280, in host mode, it is observed that stressing out controller results in HC died error: xhci-hcd.12.auto: xHCI host not responding to stop endpoint command xhci-hcd.12.auto: xHCI host controller not responding, assume dead xhci-hcd.12.auto: HC died; cleaning up And at this instant only res...
```diff diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi index c3aaa09b8187..ba43fba2c551 100644 --- a/arch/arm64/boot/dts/qcom/sc7280.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi @@ -4232,6 +4232,7 @@ iommus = <&apps_smmu 0xe0 0x0>; snps,dis_u2_susphy_quirk; sn...
5b8baed4b88132c12010ce6ca1b56f00d122e376
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: sc7180: Disable SuperSpeed instances in park mode
Problem Details: On SC7180, in host mode, it is observed that stressing out controller results in HC died error: xhci-hcd.12.auto: xHCI host not responding to stop endpoint command xhci-hcd.12.auto: xHCI host controller not responding, assume dead xhci-hcd.12.auto: HC died; cleaning up And at this instant only res...
```diff diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi index 52d074a4fbf3..9ab0c98cac05 100644 --- a/arch/arm64/boot/dts/qcom/sc7180.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi @@ -3066,6 +3066,7 @@ iommus = <&apps_smmu 0x540 0>; snps,dis_u2_susphy_quirk; snp...
d6c6b85bf5582bbe2efefa9a083178b5f7eef439
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: qrb4210-rb2: make L9A always-on
Problem Details: The L9A regulator is used to further control voltage regulators on the board. It can be used to disable VBAT_mains, 1.8V, 3.3V, 5V rails). Make sure that is stays always on to prevent undervolting of these volage rails. Fixes: 8d58a8c0d930 ("arm64: dts: qcom: Add base qrb4210-rb2 board dts") Reviewed-...
```diff diff --git a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts index cb8a62714a30..1c7de7f2db79 100644 --- a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts +++ b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts @@ -414,6 +414,8 @@ regulator-min-microvolt = <1800000>; regulator-max-mi...
f77e7bd40c3c2d79685e9cc80de874b69a976f55
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: qrb4210-rb2: switch I2C2 to i2c-gpio
Problem Details: On the Qualcomm RB2 platform the I2C bus connected to the LT9611UXC bridge under some circumstances can go into a state when all transfers timeout. This causes both issues with fetching of EDID and with updating of the bridge's firmware. While we are debugging the issue, switch corresponding I2C bus to...
```diff diff --git a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts index 2c39bb1b97db..cb8a62714a30 100644 --- a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts +++ b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts @@ -60,6 +60,17 @@ }; }; + i2c2_gpio: i2c { + compatible = "i2c-gpio"; + ...
b7b545ccc08873e107aa24c461b1fdb123dd3761
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: qrb2210-rb1: switch I2C2 to i2c-gpio
Problem Details: On the Qualcomm RB1 platform the I2C bus connected to the LT9611UXC bridge under some circumstances can go into a state when all transfers timeout. This causes both issues with fetching of EDID and with updating of the bridge's firmware. While we are debugging the issue, switch corresponding I2C bus to...
```diff diff --git a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts index bb5191422660..8c27d52139a1 100644 --- a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts +++ b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts @@ -59,6 +59,17 @@ }; }; + i2c2_gpio: i2c { + compatible = "i2c-gpio"; + ...