id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
e1de438336222dbe27f2d4baa8c01074fcac2bef
Analyze and fix the following issue in the Linux kernel code: context_tracking, rcu: Rename DYNTICK_IRQ_NONIDLE into CT_NESTING_IRQ_NONIDLE
Problem Details: The context_tracking.state RCU_DYNTICKS subvariable has been renamed to RCU_WATCHING, and the 'dynticks' prefix can be dropped without losing any meaning. Signed-off-by: Valentin Schneider <vschneid@redhat.com> Reviewed-by: Frederic Weisbecker <frederic@kernel.org> Signed-off-by: Neeraj Upadhyay <neer...
```diff diff --git a/include/linux/context_tracking_state.h b/include/linux/context_tracking_state.h index 34fd504e53a8..0dbda59c9f37 100644 --- a/include/linux/context_tracking_state.h +++ b/include/linux/context_tracking_state.h @@ -7,7 +7,7 @@ #include <linux/context_tracking_irq.h> /* Offset to allow distinguis...
2ef2890b7a94fbbfa8fdf0a90499ae1df476b8e8
Analyze and fix the following issue in the Linux kernel code: context_tracking, rcu: Rename ct_dynticks_nmi_nesting_cpu() into ct_nmi_nesting_cpu()
Problem Details: The context_tracking.state RCU_DYNTICKS subvariable has been renamed to RCU_WATCHING, and the 'dynticks' prefix can be dropped without losing any meaning. Suggested-by: Frederic Weisbecker <frederic@kernel.org> Signed-off-by: Valentin Schneider <vschneid@redhat.com> Reviewed-by: Frederic Weisbecker <f...
```diff diff --git a/include/linux/context_tracking_state.h b/include/linux/context_tracking_state.h index 8f32fe599c5c..34fd504e53a8 100644 --- a/include/linux/context_tracking_state.h +++ b/include/linux/context_tracking_state.h @@ -92,7 +92,7 @@ static __always_inline long ct_nmi_nesting(void) return __this_cpu_re...
8375cb260d7e43610934af63748d1a51201449f8
Analyze and fix the following issue in the Linux kernel code: context_tracking, rcu: Rename ct_dynticks_nmi_nesting() into ct_nmi_nesting()
Problem Details: The context_tracking.state RCU_DYNTICKS subvariable has been renamed to RCU_WATCHING, and the 'dynticks' prefix can be dropped without losing any meaning. Suggested-by: Frederic Weisbecker <frederic@kernel.org> Signed-off-by: Valentin Schneider <vschneid@redhat.com> Reviewed-by: Frederic Weisbecker <f...
```diff diff --git a/include/linux/context_tracking_state.h b/include/linux/context_tracking_state.h index 12d00adf29e1..8f32fe599c5c 100644 --- a/include/linux/context_tracking_state.h +++ b/include/linux/context_tracking_state.h @@ -87,7 +87,7 @@ static __always_inline long ct_nesting_cpu(int cpu) return ct->nestin...
dc5fface4b30508933b515a4985401c8c8f6bcfd
Analyze and fix the following issue in the Linux kernel code: context_tracking, rcu: Rename struct context_tracking .dynticks_nmi_nesting into .nmi_nesting
Problem Details: The context_tracking.state RCU_DYNTICKS subvariable has been renamed to RCU_WATCHING, and the 'dynticks' prefix can be dropped without losing any meaning. [ neeraj.upadhyay: Fix htmldocs build error reported by Stephen Rothwell ] Suggested-by: Frederic Weisbecker <frederic@kernel.org> Signed-off-by: ...
```diff diff --git a/Documentation/RCU/Design/Data-Structures/Data-Structures.rst b/Documentation/RCU/Design/Data-Structures/Data-Structures.rst index 69860bbec202..28d9f9e1783f 100644 --- a/Documentation/RCU/Design/Data-Structures/Data-Structures.rst +++ b/Documentation/RCU/Design/Data-Structures/Data-Structures.rst @...
bca9455da531a3c2520c28ff349d0dab4e471d28
Analyze and fix the following issue in the Linux kernel code: context_tracking, rcu: Rename ct_dynticks_nesting_cpu() into ct_nesting_cpu()
Problem Details: The context_tracking.state RCU_DYNTICKS subvariable has been renamed to RCU_WATCHING, and the 'dynticks' prefix can be dropped without losing any meaning. Suggested-by: Frederic Weisbecker <frederic@kernel.org> Signed-off-by: Valentin Schneider <vschneid@redhat.com> Reviewed-by: Frederic Weisbecker <f...
```diff diff --git a/include/linux/context_tracking_state.h b/include/linux/context_tracking_state.h index 586c1ff22c2e..fd42d8120ac2 100644 --- a/include/linux/context_tracking_state.h +++ b/include/linux/context_tracking_state.h @@ -80,7 +80,7 @@ static __always_inline long ct_nesting(void) return __this_cpu_read(c...
bf66471987b4bd537bc800353ca7d39bfd1d1022
Analyze and fix the following issue in the Linux kernel code: context_tracking, rcu: Rename struct context_tracking .dynticks_nesting into .nesting
Problem Details: The context_tracking.state RCU_DYNTICKS subvariable has been renamed to RCU_WATCHING, reflect that change in the related helpers. [ neeraj.upadhyay: Fix htmldocs build error reported by Stephen Rothwell ] Suggested-by: Frederic Weisbecker <frederic@kernel.org> Signed-off-by: Valentin Schneider <vschn...
```diff diff --git a/Documentation/RCU/Design/Data-Structures/Data-Structures.rst b/Documentation/RCU/Design/Data-Structures/Data-Structures.rst index b34990c7c377..69860bbec202 100644 --- a/Documentation/RCU/Design/Data-Structures/Data-Structures.rst +++ b/Documentation/RCU/Design/Data-Structures/Data-Structures.rst @...
c1b2e36b8776a20a1fbdeb9d3be0637c00d671b0
Analyze and fix the following issue in the Linux kernel code: l2tp: flush workqueue before draining it
Problem Details: syzbot exposes a race where a net used by l2tp is removed while an existing pppol2tp socket is closed. In l2tp_pre_exit_net, l2tp queues TUNNEL_DELETE work items to close each tunnel in the net. When these are run, new SESSION_DELETE work items are queued to delete each session in the tunnel. This all ...
```diff diff --git a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c index b0bf0ae08e85..af87c781d6a6 100644 --- a/net/l2tp/l2tp_core.c +++ b/net/l2tp/l2tp_core.c @@ -1855,8 +1855,16 @@ static __net_exit void l2tp_pre_exit_net(struct net *net) } rcu_read_unlock_bh(); - if (l2tp_wq) + if (l2tp_wq) { + /* ensure that ...
2c04a4defcedfff1e6f99a898b068db0962f3ba2
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: drop dr_mode for Radxa ZERO 3W/3E
Problem Details: since dr_mode = "otg" can be used for USB gadget functions for U-Boot and Linux, there is no reason to set it to "peripheral". drop it. Fixes: 1a5c8d307c83 ("arm64: dts: rockchip: Add Radxa ZERO 3W/3E") Signed-off-by: FUKAUMI Naoki <naoki@radxa.com> Link: https://lore.kernel.org/r/20240802051508.498-1...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3566-radxa-zero-3.dtsi b/arch/arm64/boot/dts/rockchip/rk3566-radxa-zero-3.dtsi index 9cc7aa3298d0..de390d92c35e 100644 --- a/arch/arm64/boot/dts/rockchip/rk3566-radxa-zero-3.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-zero-3.dtsi @@ -493,7 +493,6 @@ }; &u...
8c51521de18755d4112a77a598a348b38d0af370
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: Raise Pinebook Pro's panel backlight PWM frequency
Problem Details: Increase the frequency of the PWM signal that drives the LED backlight of the Pinebook Pro's panel, from about 1.35 KHz (which equals to the PWM period of 740,740 ns), to exactly 8 kHz (which equals to the PWM period of 125,000 ns). Using a higher PWM frequency for the panel backlight, which reduces t...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts b/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts index 466762fe7535..a5a7e374bc59 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts @@ -31,7 +31,7 @@ backlight: ed...
aad41832326723627ad8ac9ee8a543b6dca4454d
Analyze and fix the following issue in the Linux kernel code: gpio: mlxbf3: Support shutdown() function
Problem Details: During Linux graceful reboot, the GPIO interrupts are not disabled. Since the drivers are not removed during graceful reboot, the logic to call mlxbf3_gpio_irq_disable() is not triggered. Interrupts that remain enabled can cause issues on subsequent boots. For example, the mlxbf-gige driver contains P...
```diff diff --git a/drivers/gpio/gpio-mlxbf3.c b/drivers/gpio/gpio-mlxbf3.c index d5906d419b0a..10ea71273c89 100644 --- a/drivers/gpio/gpio-mlxbf3.c +++ b/drivers/gpio/gpio-mlxbf3.c @@ -39,6 +39,8 @@ #define MLXBF_GPIO_CAUSE_OR_EVTEN0 0x14 #define MLXBF_GPIO_CAUSE_OR_CLRCAUSE 0x18 +#define MLXBF_GPIO_C...
c5d2291a3086f4b59ae42d5082cfe45ef9103062
Analyze and fix the following issue in the Linux kernel code: iio: adc: pac1921: add missing error return in probe()
Problem Details: This error path was intended to return, and not just print an error. The current code will lead to an error pointer dereference. Fixes: 371f778b83cd ("iio: adc: add support for pac1921") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Acked-by: Matteo Martelli <matteomartelli3@gmail.com> Link...
```diff diff --git a/drivers/iio/adc/pac1921.c b/drivers/iio/adc/pac1921.c index d04c6685d780..8200a47bdf21 100644 --- a/drivers/iio/adc/pac1921.c +++ b/drivers/iio/adc/pac1921.c @@ -1168,8 +1168,8 @@ static int pac1921_probe(struct i2c_client *client) priv->regmap = devm_regmap_init_i2c(client, &pac1921_regmap_con...
f2271ba6f0744a0175ed387577405697ee0360db
Analyze and fix the following issue in the Linux kernel code: iio: Fix spelling mistake "avaialable" -> "available"
Problem Details: There is a spelling mistake in a dev_warn message. Fix it. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://patch.msgid.link/20240807094745.4174785-1-colin.i.king@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
```diff diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c index 3f2bc6451325..6a6568d4a2cb 100644 --- a/drivers/iio/industrialio-core.c +++ b/drivers/iio/industrialio-core.c @@ -2002,7 +2002,7 @@ int iio_active_scan_mask_index(struct iio_dev *indio_dev) } dev_warn(indio_dev->dev.paren...
4f6ca3464d987054f5e75f097a97dcbb86a87569
Analyze and fix the following issue in the Linux kernel code: iio: dac: ltc2664: Fix off by one in ltc2664_channel_config()
Problem Details: This comparison should be >= ARRAY_SIZE() instead of >. The "mspan" variable is later used as an array index into ltc2664_mspan_lut[] so this is an off by one bug. Fixes: 4cc2fc445d2e ("iio: dac: ltc2664: Add driver for LTC2664 and LTC2672") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Lin...
```diff diff --git a/drivers/iio/dac/ltc2664.c b/drivers/iio/dac/ltc2664.c index 666ecdeb5f96..5be5345ac5c8 100644 --- a/drivers/iio/dac/ltc2664.c +++ b/drivers/iio/dac/ltc2664.c @@ -526,7 +526,7 @@ static int ltc2664_channel_config(struct ltc2664_state *st) return dev_err_probe(dev, -EINVAL, "adi,manual...
2837efdc7cef5b86b0c4d94a7410bc03cc2f003f
Analyze and fix the following issue in the Linux kernel code: iio: trigger: allow devices to suspend/resume theirs associated trigger
Problem Details: When a machine enters a sleep state while a trigger is associated to an iio device that trigger is not resumed after exiting the sleep state: provide iio device drivers a way to suspend and resume the associated trigger to solve the aforementioned bug. Each iio driver supporting external triggers is e...
```diff diff --git a/drivers/iio/industrialio-trigger.c b/drivers/iio/industrialio-trigger.c index 2e84776f4fbd..54416a384232 100644 --- a/drivers/iio/industrialio-trigger.c +++ b/drivers/iio/industrialio-trigger.c @@ -347,6 +347,7 @@ int iio_trigger_detach_poll_func(struct iio_trigger *trig, iio_trigger_put_irq(trig...
46e4ce4c11abf904dec37ea9a3b3c741cbcf34bd
Analyze and fix the following issue in the Linux kernel code: dt-bindings: iio: ad4695: fix common-mode-channel
Problem Details: The common-mode-channel property is a scalar, not an array, so we should not be using items: in the schema when specifying allowable values. Reported-by: Rob Herring <robh@kernel.org> Closes: https://lore.kernel.org/linux-iio/CAL_JsqKaddw8FnPfdnhKhHUb8AcTxFadc_eZmxjX0QxFR80=mw@mail.gmail.com/ Fixes: b...
```diff diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad4695.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad4695.yaml index a2e824e26691..310f046e139f 100644 --- a/Documentation/devicetree/bindings/iio/adc/adi,ad4695.yaml +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad4695.yaml @@ -136,8 +13...
c7668ac67bc21aebdd8e2d7f839bfffba31b7713
Analyze and fix the following issue in the Linux kernel code: dt-bindings: iio: asahi-kasei,ak8975: drop incorrect AK09116 compatible
Problem Details: All compatibles in this binding without prefixes were deprecated, so adding a new deprecated one after some time is not allowed, because it defies the core logic of deprecating things. Drop the AK09916 vendorless compatible. Fixes: 76e28aa97fa0 ("iio: magnetometer: ak8975: add AK09116 support") Signe...
```diff diff --git a/Documentation/devicetree/bindings/iio/magnetometer/asahi-kasei,ak8975.yaml b/Documentation/devicetree/bindings/iio/magnetometer/asahi-kasei,ak8975.yaml index 9790f75fc669..fe5145d3b73c 100644 --- a/Documentation/devicetree/bindings/iio/magnetometer/asahi-kasei,ak8975.yaml +++ b/Documentation/device...
da6e3160df230692bbd48a6d52318035f19595e2
Analyze and fix the following issue in the Linux kernel code: iio: magnetometer: ak8975: drop incorrect AK09116 compatible
Problem Details: All compatibles in this binding without prefixes were deprecated, so adding a new deprecated one after some time is not allowed, because it defies the core logic of deprecating things. Drop the AK09916 vendorless compatible. Fixes: 76e28aa97fa0 ("iio: magnetometer: ak8975: add AK09116 support") Signe...
```diff diff --git a/drivers/iio/magnetometer/ak8975.c b/drivers/iio/magnetometer/ak8975.c index dd466c5fa621..ccbebe5b66cd 100644 --- a/drivers/iio/magnetometer/ak8975.c +++ b/drivers/iio/magnetometer/ak8975.c @@ -1081,7 +1081,6 @@ static const struct of_device_id ak8975_of_match[] = { { .compatible = "asahi-kasei,a...
69eac4e1e293b94455f9cc68893126952007bac4
Analyze and fix the following issue in the Linux kernel code: iio: dac: ad9739a: add backend debugfs interface
Problem Details: Call iio_backend_debugfs_add() to add (if available) the backend debug interface. Signed-off-by: Nuno Sa <nuno.sa@analog.com> Link: https://patch.msgid.link/20240806-dev-backend-dac-direct-reg-access-v1-2-b84a6e8ee8a0@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
```diff diff --git a/drivers/iio/dac/ad9739a.c b/drivers/iio/dac/ad9739a.c index 799387f21b9f..615d1a196db3 100644 --- a/drivers/iio/dac/ad9739a.c +++ b/drivers/iio/dac/ad9739a.c @@ -431,7 +431,13 @@ static int ad9739a_probe(struct spi_device *spi) indio_dev->num_channels = ARRAY_SIZE(ad9739a_channels); indio_dev->...
2ad4e1ada8eebafa2d75a4b75eeeca882de6ada1
Analyze and fix the following issue in the Linux kernel code: wifi: brcmfmac: cfg80211: Handle SSID based pmksa deletion
Problem Details: wpa_supplicant 2.11 sends since 1efdba5fdc2c ("Handle PMKSA flush in the driver for SAE/OWE offload cases") SSID based PMKSA del commands. brcmfmac is not prepared and tries to dereference the NULL bssid and pmkid pointers in cfg80211_pmksa. PMKID_V3 operations support SSID based updates so copy the SS...
```diff diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index 1585a5653ee4..d4cc5fa92341 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -4...
ccbfcac05866ebe6eb3bc6d07b51d4ed4fcde436
Analyze and fix the following issue in the Linux kernel code: ALSA: timer: Relax start tick time check for slave timer elements
Problem Details: The recent addition of a sanity check for a too low start tick time seems breaking some applications that uses aloop with a certain slave timer setup. They may have the initial resolution 0, hence it's treated as if it were a too low value. Relax and skip the check for the slave timer instance for ad...
```diff diff --git a/sound/core/timer.c b/sound/core/timer.c index d104adc75a8b..71a07c1662f5 100644 --- a/sound/core/timer.c +++ b/sound/core/timer.c @@ -547,7 +547,7 @@ static int snd_timer_start1(struct snd_timer_instance *timeri, /* check the actual time for the start tick; * bail out as error if it's way too ...
4276a0bb62598966716e1ee1ac4a64d382cc9ef7
Analyze and fix the following issue in the Linux kernel code: x86/mm: Remove unused CR3_HW_ASID_BITS
Problem Details: Commit 6fd166aae78c ("x86/mm: Use/Fix PCID to optimize user/kernel switches") removed the last usage of CR3_HW_ASID_BITS and opted to use X86_CR3_PCID_BITS instead. Remove CR3_HW_ASID_BITS. Signed-off-by: Yosry Ahmed <yosryahmed@google.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: htt...
```diff diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c index 1fe9ba33c580..09950feffd07 100644 --- a/arch/x86/mm/tlb.c +++ b/arch/x86/mm/tlb.c @@ -86,9 +86,6 @@ * */ -/* There are 12 bits of space for ASIDS in CR3 */ -#define CR3_HW_ASID_BITS 12 - /* * When enabled, MITIGATION_PAGE_TABLE_ISOLATION consume...
03f9885c60adf73488fe32aab628ee3d4a39598e
Analyze and fix the following issue in the Linux kernel code: irqchip/riscv-aplic: Retrigger MSI interrupt on source configuration
Problem Details: The section 4.5.2 of the RISC-V AIA specification says that "any write to a sourcecfg register of an APLIC might (or might not) cause the corresponding interrupt-pending bit to be set to one if the rectified input value is high (= 1) under the new source mode." When the interrupt type is changed in th...
```diff diff --git a/drivers/irqchip/irq-riscv-aplic-msi.c b/drivers/irqchip/irq-riscv-aplic-msi.c index 028444af48bd..d7773f76e5d0 100644 --- a/drivers/irqchip/irq-riscv-aplic-msi.c +++ b/drivers/irqchip/irq-riscv-aplic-msi.c @@ -32,15 +32,10 @@ static void aplic_msi_irq_unmask(struct irq_data *d) aplic_irq_unmask(d...
72c0f57dbe8bf625108dc67e34f3472f28501776
Analyze and fix the following issue in the Linux kernel code: ALSA: pcm: Add xrun counter for snd_pcm_substream
Problem Details: This patch adds an xrun counter to snd_pcm_substream as an alternative to using logs from XRUN_DEBUG_BASIC. The counter provides a way to track the number of xrun occurences, accessible through the /proc interface. The counter is enabled when CONFIG_SND_PCM_XRUN_DEBUG is set. Example output: $ cat /...
```diff diff --git a/include/sound/pcm.h b/include/sound/pcm.h index ac8f3aef9205..384032b6c59c 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h @@ -498,6 +498,9 @@ struct snd_pcm_substream { /* misc flags */ unsigned int hw_opened: 1; unsigned int managed_buffer_alloc:1; +#ifdef CONFIG_SND_PCM_XRUN_DEB...
d73f0f49daa84176c3beee1606e73c7ffb6af8b2
Analyze and fix the following issue in the Linux kernel code: irqchip/xilinx: Fix shift out of bounds
Problem Details: The device tree property 'xlnx,kind-of-intr' is sanity checked that the bitmask contains only set bits which are in the range of the number of interrupts supported by the controller. The check is done by shifting the mask right by the number of supported interrupts and checking the result for zero. T...
```diff diff --git a/drivers/irqchip/irq-xilinx-intc.c b/drivers/irqchip/irq-xilinx-intc.c index 238d3d344949..7e08714d507f 100644 --- a/drivers/irqchip/irq-xilinx-intc.c +++ b/drivers/irqchip/irq-xilinx-intc.c @@ -189,7 +189,7 @@ static int __init xilinx_intc_of_init(struct device_node *intc, irqc->intr_mask = 0; ...
089332e703b681c8f62210ae5ef507df10324356
Analyze and fix the following issue in the Linux kernel code: wifi: ipw2x00: libipw: Avoid -Wflex-array-member-not-at-end warnings
Problem Details: -Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. So, in order to avoid ending up with a flexible-array member in the middle of multiple other structs, we use the `__struct_group()` helper to create a new tagged `struct libipw_hdr_3addr_hdr`. Thi...
```diff diff --git a/drivers/net/wireless/intel/ipw2x00/libipw.h b/drivers/net/wireless/intel/ipw2x00/libipw.h index 9065ca5b0208..bad080d33c07 100644 --- a/drivers/net/wireless/intel/ipw2x00/libipw.h +++ b/drivers/net/wireless/intel/ipw2x00/libipw.h @@ -345,14 +345,19 @@ struct libipw_hdr_2addr { } __packed; struc...
36aa649915439aa924fb45aec3a6a9acea04a501
Analyze and fix the following issue in the Linux kernel code: wifi: mwifiex: fix key_mgmt setting
Problem Details: bss_config->key_mgmt specifies the AKM suites that are usable in hardware. This variable is set to specific values while iterating over the advertised AKM suites. This means the final value of the variable depends on the order of the entries in the AKM suites array. Instead of setting the variable, jus...
```diff diff --git a/drivers/net/wireless/marvell/mwifiex/uap_cmd.c b/drivers/net/wireless/marvell/mwifiex/uap_cmd.c index 51fcae8726ed..7214b6cf304a 100644 --- a/drivers/net/wireless/marvell/mwifiex/uap_cmd.c +++ b/drivers/net/wireless/marvell/mwifiex/uap_cmd.c @@ -52,16 +52,17 @@ int mwifiex_set_secure_params(struct ...
ebb9d3ca8f7efc1b6a2f1750d1058eda444883d0
Analyze and fix the following issue in the Linux kernel code: firewire: core: correct range of block for case of switch statement
Problem Details: A commit d8527cab6c31 ("firewire: cdev: implement new event to notify response subaction with time stamp") adds an additional case, FW_CDEV_EVENT_RESPONSE2, into switch statement in complete_transaction(). However, the range of block is beyond to the case label and reaches neibour default label. This ...
```diff diff --git a/drivers/firewire/core-cdev.c b/drivers/firewire/core-cdev.c index 672a37fa8343..c211bb19c94e 100644 --- a/drivers/firewire/core-cdev.c +++ b/drivers/firewire/core-cdev.c @@ -589,11 +589,11 @@ static void complete_transaction(struct fw_card *card, int rcode, u32 request_ts queue_event(client, &e-...
0b4a4534d083e055831b3bc29c5eafc918ed4d86
Analyze and fix the following issue in the Linux kernel code: net/mlx5e: Fix queue stats access to non-existing channels splat
Problem Details: The queue stats API queries the queues according to the real_num_[tr]x_queues, in case the device is down and channels were not yet created, don't try to query their statistics. To trigger the panic, run this command before the interface is brought up: ./cli.py --spec ../../../Documentation/netlink/sp...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c index f04decca39f2..5df904639b0c 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -5296,7 +5296,7 @@ static void mlx5e_get_q...
cbc796be1779c4dbc9a482c7233995e2a8b6bfb3
Analyze and fix the following issue in the Linux kernel code: net/mlx5e: Correctly report errors for ethtool rx flows
Problem Details: Previously, an ethtool rx flow with no attrs would not be added to the NIC as it has no rules to configure the hw with, but it would be reported as successful to the caller (return code 0). This is confusing for the user as ethtool then reports "Added rule $num", but no rule was actually added. This c...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c index 3eccdadc0357..773624bb2c5d 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c @@ -734,7 +734,7 @@ m...
e6b5afd30b99b43682a7764e1a74a42fe4d5f4b3
Analyze and fix the following issue in the Linux kernel code: net/mlx5e: Take state lock during tx timeout reporter
Problem Details: mlx5e_safe_reopen_channels() requires the state lock taken. The referenced changed in the Fixes tag removed the lock to fix another issue. This patch adds it back but at a later point (when calling mlx5e_safe_reopen_channels()) to avoid the deadlock referenced in the Fixes tag. Fixes: eab0da38912e ("n...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c b/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c index 22918b2ef7f1..09433b91be17 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c @@ -146,7 +146,9 ...
ab6013a59b4d0947fda409c29426dc904959e632
Analyze and fix the following issue in the Linux kernel code: net/mlx5e: SHAMPO, Increase timeout to improve latency
Problem Details: During latency tests (netperf TCP_RR) a 30% degradation of HW GRO vs SW GRO was observed. This is due to SHAMPO triggering timeout filler CQEs instead of delivering the CQE for the packet. Having a short timeout for SHAMPO doesn't bring any benefits as it is the driver that does the merging, not the h...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/ethernet/mellanox/mlx5/core/en.h index 5fd82c67b6ab..bb5da42edc23 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h @@ -130,7 +130,7 @@ struct page_pool; #define MLX5E_PARAMS_MINIM...
c31fe2b5095d8c84562ce90db07600f7e9f318df
Analyze and fix the following issue in the Linux kernel code: net/mlx5: SD, Do not query MPIR register if no sd_group
Problem Details: Unconditionally calling the MPIR query on BF separate mode yields the FW syndrome below [1]. Do not call it unless admin clearly specified the SD group, i.e. expressing the intention of using the multi-PF netdev feature. This fix covers cases not covered in commit fca3b4791850 ("net/mlx5: Do not query...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c b/drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c index f6deb5a3f820..eeb0b7ea05f1 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/lib/sd.c @@ -126,7 +126,7 @@ static bool mlx5_sd_is_suppor...
c146f3d191147a12d6c9ac61c4e48ac2dc53edc0
Analyze and fix the following issue in the Linux kernel code: net: fs_enet: Fix warning due to wrong type
Problem Details: Building fs_enet on powerpc e500 leads to following warning: CC drivers/net/ethernet/freescale/fs_enet/mac-scc.o In file included from ./include/linux/build_bug.h:5, from ./include/linux/container_of.h:5, from ./include/linux/list.h:5, ...
```diff diff --git a/drivers/net/ethernet/freescale/fs_enet/mac-scc.c b/drivers/net/ethernet/freescale/fs_enet/mac-scc.c index a64cb6270515..9e89ac2b6ce3 100644 --- a/drivers/net/ethernet/freescale/fs_enet/mac-scc.c +++ b/drivers/net/ethernet/freescale/fs_enet/mac-scc.c @@ -131,15 +131,14 @@ static int setup_data(struc...
30b03f2a0592eee1267298298eac9dd655f55ab2
Analyze and fix the following issue in the Linux kernel code: udp: Fall back to software USO if IPv6 extension headers are present
Problem Details: In commit 10154dbded6d ("udp: Allow GSO transmit from devices with no checksum offload") we have intentionally allowed UDP GSO packets marked CHECKSUM_NONE to pass to the GSO stack, so that they can be segmented and checksummed by a software fallback when the egress device lacks these features. What w...
```diff diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c index bc8a9da750fe..b254a5dadfcf 100644 --- a/net/ipv4/udp_offload.c +++ b/net/ipv4/udp_offload.c @@ -282,6 +282,12 @@ struct sk_buff *__udp_gso_segment(struct sk_buff *gso_skb, skb_transport_header(gso_skb))) return ERR_PTR(-EINVAL); + /...
2b2bc3bab158b7e036508742b16cd8a3c2f59a12
Analyze and fix the following issue in the Linux kernel code: net: Make USO depend on CSUM offload
Problem Details: UDP segmentation offload inherently depends on checksum offload. It should not be possible to disable checksum offload while leaving USO enabled. Enforce this dependency in code. There is a single tx-udp-segmentation feature flag to indicate support for both IPv4/6, hence the devices wishing to suppor...
```diff diff --git a/net/core/dev.c b/net/core/dev.c index 751d9b70e6ad..f66e61407883 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -9912,6 +9912,15 @@ static void netdev_sync_lower_features(struct net_device *upper, } } +static bool netdev_has_ip_or_hw_csum(netdev_features_t features) +{ + netdev_features_t...
3a3be7ff9224f424e485287b54be00d2c6bd9c40
Analyze and fix the following issue in the Linux kernel code: gtp: pull network headers in gtp_dev_xmit()
Problem Details: syzbot/KMSAN reported use of uninit-value in get_dev_xmit() [1] We must make sure the IPv4 or Ipv6 header is pulled in skb->head before accessing fields in them. Use pskb_inet_may_pull() to fix this issue. [1] BUG: KMSAN: uninit-value in ipv6_pdp_find drivers/net/gtp.c:220 [inline] BUG: KMSAN: unin...
```diff diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c index 427b91aca50d..0696faf60013 100644 --- a/drivers/net/gtp.c +++ b/drivers/net/gtp.c @@ -1269,6 +1269,9 @@ static netdev_tx_t gtp_dev_xmit(struct sk_buff *skb, struct net_device *dev) if (skb_cow_head(skb, dev->needed_headroom)) goto tx_err; + if (!ps...
001412493e74d89166d2441b622eeaea00511bdc
Analyze and fix the following issue in the Linux kernel code: crypto: x86/aes-gcm - fix PREEMPT_RT issue in gcm_crypt()
Problem Details: On PREEMPT_RT, kfree() takes sleeping locks and must not be called with preemption disabled. Therefore, on PREEMPT_RT skcipher_walk_done() must not be called from within a kernel_fpu_{begin,end}() pair, even when it's the last call which is guaranteed to not allocate memory. Therefore, move the last ...
```diff diff --git a/arch/x86/crypto/aesni-intel_glue.c b/arch/x86/crypto/aesni-intel_glue.c index cd37de5ec404..d63ba9eaba3e 100644 --- a/arch/x86/crypto/aesni-intel_glue.c +++ b/arch/x86/crypto/aesni-intel_glue.c @@ -1366,6 +1366,8 @@ gcm_crypt(struct aead_request *req, int flags) err = skcipher_walk_aead_encrypt(...
4b7acc85de14ee8a2236f54445dc635d47eceac0
Analyze and fix the following issue in the Linux kernel code: hwrng: cctrng - Add missing clk_disable_unprepare in cctrng_resume
Problem Details: Add the missing clk_disable_unprepare() before return in cctrng_resume(). Fixes: a583ed310bb6 ("hwrng: cctrng - introduce Arm CryptoCell driver") Cc: <stable@vger.kernel.org> Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
```diff diff --git a/drivers/char/hw_random/cctrng.c b/drivers/char/hw_random/cctrng.c index c0d2f824769f..4c50efc46483 100644 --- a/drivers/char/hw_random/cctrng.c +++ b/drivers/char/hw_random/cctrng.c @@ -622,6 +622,7 @@ static int __maybe_unused cctrng_resume(struct device *dev) /* wait for Cryptocell reset comple...
d57e2f7cffd57fe2800332dec768ec1b67a4159f
Analyze and fix the following issue in the Linux kernel code: hwrng: bcm2835 - Add missing clk_disable_unprepare in bcm2835_rng_init
Problem Details: Add the missing clk_disable_unprepare() before return in bcm2835_rng_init(). Fixes: e5f9f41d5e62 ("hwrng: bcm2835 - add reset support") Cc: <stable@vger.kernel.org> Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> Signed-off-by: Herber...
```diff diff --git a/drivers/char/hw_random/bcm2835-rng.c b/drivers/char/hw_random/bcm2835-rng.c index b03e80300627..aa2b135e3ee2 100644 --- a/drivers/char/hw_random/bcm2835-rng.c +++ b/drivers/char/hw_random/bcm2835-rng.c @@ -94,8 +94,10 @@ static int bcm2835_rng_init(struct hwrng *rng) return ret; ret = reset_...
dcf4fef6631c302f9bdd188979fe3172e47a29c7
Analyze and fix the following issue in the Linux kernel code: hwrng: rockchip - add hwrng driver for Rockchip RK3568 SoC
Problem Details: Rockchip SoCs used to have a random number generator as part of their crypto device, and support for it has to be added to the corresponding driver. However newer Rockchip SoCs like the RK3568 have an independent True Random Number Generator device. This patch adds a driver for it, greatly inspired fro...
```diff diff --git a/MAINTAINERS b/MAINTAINERS index 0448c7eb3934..a0b4c1210e92 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -19727,6 +19727,7 @@ M: Daniel Golle <daniel@makrotopia.org> M: Aurelien Jarno <aurelien@aurel32.net> S: Maintained F: Documentation/devicetree/bindings/rng/rockchip,rk3568-rng.yaml +F: drive...
f5903f50070518b6722559d25744f8a8dbe5011e
Analyze and fix the following issue in the Linux kernel code: crypto: caam/qi* - Use cpumask_var_t instead of cpumask_t
Problem Details: Switch cpumask_t to cpumask_var_t as the former may be too big for the stack: CC [M] drivers/crypto/caam/qi.o CC [M] drivers/crypto/caam/caamalg_qi2.o ../drivers/crypto/caam/qi.c: In function ‘caam_qi_init’: ../drivers/crypto/caam/qi.c:808:1: warning: the frame size of 1056 bytes is larger than ...
```diff diff --git a/drivers/crypto/caam/caamalg_qi2.c b/drivers/crypto/caam/caamalg_qi2.c index 207dc422785a..44e1f8f46967 100644 --- a/drivers/crypto/caam/caamalg_qi2.c +++ b/drivers/crypto/caam/caamalg_qi2.c @@ -5006,10 +5006,14 @@ static int __cold dpaa2_dpseci_setup(struct fsl_mc_device *ls_dev) struct device *d...
9d3a7ff2ce1781a77ad6f8896e1256875c17631e
Analyze and fix the following issue in the Linux kernel code: hwrng: cn10k - Enable by default CN10K driver if Thunder SoC is enabled
Problem Details: Before commit addea5858b66 ("hwrng: Kconfig - Do not enable by default CN10K driver") the Marvell CN10K Random Number Generator was always enabled when HW_RANDOM was enabled. This was changed with that commit to prevent having this driver being always enabled on arm64. To prevent introducing regressio...
```diff diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig index 01e2e1ef82cf..ae5f3a01f554 100644 --- a/drivers/char/hw_random/Kconfig +++ b/drivers/char/hw_random/Kconfig @@ -555,6 +555,7 @@ config HW_RANDOM_ARM_SMCCC_TRNG config HW_RANDOM_CN10K tristate "Marvell CN10K Random Number...
3eb3cd5992f7a0c37edc8d05b4c38c98758d8671
Analyze and fix the following issue in the Linux kernel code: binfmt_flat: Fix corruption when not offsetting data start
Problem Details: Commit 04d82a6d0881 ("binfmt_flat: allow not offsetting data start") introduced a RISC-V specific variant of the FLAT format which does not allocate any space for the (obsolete) array of shared library pointers. However, it did not disable the code which initializes the array, resulting in the corrupti...
```diff diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c index c26545d71d39..cd6d5bbb4b9d 100644 --- a/fs/binfmt_flat.c +++ b/fs/binfmt_flat.c @@ -72,8 +72,10 @@ #ifdef CONFIG_BINFMT_FLAT_NO_DATA_START_OFFSET #define DATA_START_OFFSET_WORDS (0) +#define MAX_SHARED_LIBS_UPDATE (0) #else #define DATA_START_OFFSET...
4bbe6002931954bbe82b25f25990b987b0392e18
Analyze and fix the following issue in the Linux kernel code: perf daemon: Fix the build on 32-bit architectures
Problem Details: Noticed with: 1 6.22 debian:experimental-x-mipsel : FAIL gcc version 13.2.0 (Debian 13.2.0-25) builtin-daemon.c: In function 'cmd_session_list': builtin-daemon.c:691:35: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'time_t' {aka 'long long i...
```diff diff --git a/tools/perf/builtin-daemon.c b/tools/perf/builtin-daemon.c index de76bbc50bfb..5c9335fff2d3 100644 --- a/tools/perf/builtin-daemon.c +++ b/tools/perf/builtin-daemon.c @@ -1,5 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 #include <internal/lib.h> +#include <inttypes.h> #include <subcmd/parse-option...
8a2491db7bea6ad88ec568731eafd583501f1c96
Analyze and fix the following issue in the Linux kernel code: bcachefs: bcachefs_metadata_version_disk_accounting_v3
Problem Details: bcachefs_metadata_version_disk_accounting_v2 erroneously had padding bytes in disk_accounting_key, which is a problem because we have to guarantee that all unused bytes in disk_accounting_key are zeroed. Fortunately 6.11 isn't out yet, so it's cheap to fix this by spinning a new version. Reported-by:...
```diff diff --git a/fs/bcachefs/bcachefs_format.h b/fs/bcachefs/bcachefs_format.h index ad893684db52..b25f86356728 100644 --- a/fs/bcachefs/bcachefs_format.h +++ b/fs/bcachefs/bcachefs_format.h @@ -675,7 +675,8 @@ struct bch_sb_field_ext { x(btree_subvolume_children, BCH_VERSION(1, 6)) \ x(mi_btree_bitmap, BCH_...
2c402bd2e85b44dc00ef85b5c0e217de684b5372
Analyze and fix the following issue in the Linux kernel code: cxl/test: Skip cxl_setup_parent_dport() for emulated dports
Problem Details: The cxl_test unit test environment on qemu always hits below call trace with KASAN enabled: BUG: KASAN: slab-out-of-bounds in cxl_setup_parent_dport+0x480/0x530 [cxl_core] Read of size 1 at addr ff110000676014f8 by task (udev-worker)/676[ 24.424403] CPU: 2 PID: 676 Comm: (udev-worker) Tainted: G ...
```diff diff --git a/tools/testing/cxl/Kbuild b/tools/testing/cxl/Kbuild index 030b388800f0..3d1ca9e38b1f 100644 --- a/tools/testing/cxl/Kbuild +++ b/tools/testing/cxl/Kbuild @@ -14,6 +14,7 @@ ldflags-y += --wrap=cxl_dvsec_rr_decode ldflags-y += --wrap=devm_cxl_add_rch_dport ldflags-y += --wrap=cxl_rcd_component_reg_...
8c251c5ab1b7cd204231e4ee936bfe078a33f234
Analyze and fix the following issue in the Linux kernel code: cxl/pci: Get AER capability address from RCRB only for RCH dport
Problem Details: cxl_setup_parent_dport() needs to get RCH dport AER capability address from RCRB to disable AER interrupt. The function does not check if dport is RCH dport, it will get a wrong pci_host_bridge structure by dport_dev in VH case because dport_dev points to a pci device(RP or switch DSP) rather than a pc...
```diff diff --git a/drivers/cxl/core/pci.c b/drivers/cxl/core/pci.c index a663e7566c48..51132a575b27 100644 --- a/drivers/cxl/core/pci.c +++ b/drivers/cxl/core/pci.c @@ -834,11 +834,13 @@ static void cxl_disable_rch_root_ints(struct cxl_dport *dport) void cxl_setup_parent_dport(struct device *host, struct cxl_dport *...
d734422b7dd7d033fc02e421924e70dabf665b4c
Analyze and fix the following issue in the Linux kernel code: kbuild: rust-analyzer: mark `rust_is_available.sh` invocation as recursive
Problem Details: When calling the `rust_is_available.sh` script, we need to make the jobserver available to it, as commit ecab4115c44c ("kbuild: mark `rustc` (and others) invocations as recursive") explains and did for the others. Otherwise, we get a warning from `rustc` when calling `make rust-analyzer` with parallel...
```diff diff --git a/Makefile b/Makefile index 8ad55d6e7b60..8ed76eb9d438 100644 --- a/Makefile +++ b/Makefile @@ -1963,7 +1963,7 @@ tags TAGS cscope gtags: FORCE # Protocol). PHONY += rust-analyzer rust-analyzer: - $(Q)$(CONFIG_SHELL) $(srctree)/scripts/rust_is_available.sh + +$(Q)$(CONFIG_SHELL) $(srctree)/scripts...
02dfd63afe65f7bacad543ba2b10f77083ae7929
Analyze and fix the following issue in the Linux kernel code: rust: add intrinsics to fix `-Os` builds
Problem Details: Alice reported [1] that an arm64 build failed with: ld.lld: error: undefined symbol: __extendsfdf2 >>> referenced by core.a6f5fc5794e7b7b3-cgu.0 >>> rust/core.o:(<f32>::midpoint) in archive vmlinux.a >>> referenced by core.a6f5fc5794e7b7b3-cgu.0 >>> rust...
```diff diff --git a/rust/Makefile b/rust/Makefile index c41bae7ca8a3..8de3ebba9551 100644 --- a/rust/Makefile +++ b/rust/Makefile @@ -354,8 +354,8 @@ rust-analyzer: $(if $(KBUILD_EXTMOD),$(extmod_prefix),$(objtree))/rust-project.json redirect-intrinsics = \ - __addsf3 __eqsf2 __gesf2 __lesf2 __ltsf2 __mulsf3 __n...
336989d00f2140c7524b76126aa62c8a47a5a1d3
Analyze and fix the following issue in the Linux kernel code: perf annotate: Fix --group behavior when leader has no samples
Problem Details: When --group option is used, it should display all events together. But the current logic only checks if the first (leader) event has samples or not. Let's check the member events as well. Also it missed to put the linked samples from member evsels to the output RB-tree so that it can be displayed i...
```diff diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c index efcadb7620b8..1bfe41783a7c 100644 --- a/tools/perf/builtin-annotate.c +++ b/tools/perf/builtin-annotate.c @@ -632,13 +632,23 @@ static int __cmd_annotate(struct perf_annotate *ann) evlist__for_each_entry(session->evlist, pos) { ...
1e7c05292531e5b6bebe409cd531ed4ec0b2ff56
Analyze and fix the following issue in the Linux kernel code: irqdomain: Allow giving name suffix for domain
Problem Details: Devices can provide multiple interrupt lines. One reason for this is that a device has multiple subfunctions, each providing its own interrupt line. Another reason is that a device can be designed to be used (also) on a system where some of the interrupts can be routed to another processor. A line oft...
```diff diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index bfcffa2c7047..e432b6a12a32 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h @@ -295,6 +295,8 @@ struct irq_domain_chip_generic_info; * @virq_base: The first Linux interrupt number for legacy domains to * immedi...
13d675aea6cac5bb4619ef9e3fdd90129fe6d139
Analyze and fix the following issue in the Linux kernel code: perf debuginfo: Fix the build with !HAVE_DWARF_SUPPORT
Problem Details: In that case we have a set of placeholder functions, one of them uses a 'Dwarf_Addr' type that is not present as it is defined in the missing DWARF libraries, so provide a placeholder typedef for that as well. The build error before this patch: In file included from util/annotate.c:28: util/debug...
```diff diff --git a/tools/perf/util/debuginfo.h b/tools/perf/util/debuginfo.h index 4d65b8c605fc..ad6422c3f8ca 100644 --- a/tools/perf/util/debuginfo.h +++ b/tools/perf/util/debuginfo.h @@ -40,6 +40,8 @@ static inline void debuginfo__delete(struct debuginfo *dbg __maybe_unused) { } +typedef void Dwarf_Addr; + sta...
3e40aa29d47e231a54640addf6a09c1f64c5b63f
Analyze and fix the following issue in the Linux kernel code: PCI: Wait for Link before restoring Downstream Buses
Problem Details: __pci_reset_bus() calls pci_bridge_secondary_bus_reset() to perform the reset and also waits for the Secondary Bus to become again accessible. __pci_reset_bus() then calls pci_bus_restore_locked() that restores the PCI devices connected to the bus, and if necessary, recursively restores also the subord...
```diff diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index e3a49f66982d..98c7b732998a 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -5671,8 +5671,10 @@ static void pci_bus_restore_locked(struct pci_bus *bus) list_for_each_entry(dev, &bus->devices, bus_list) { pci_dev_restore(dev); - if (dev->s...
549dd786b61cd3db903f5d94d07fc5a89ccdbeb9
Analyze and fix the following issue in the Linux kernel code: drm/xe: Move VM dma-resv lock from xe_exec_queue_create to __xe_exec_queue_init
Problem Details: The critical section which requires the VM dma-resv is the call xe_lrc_create in __xe_exec_queue_init. Move this lock to __xe_exec_queue_init holding it just around xe_lrc_create. Not only is good practice, this also fixes a locking double of the VM dma-resv in the error paths of __xe_exec_queue_init a...
```diff diff --git a/drivers/gpu/drm/xe/xe_exec_queue.c b/drivers/gpu/drm/xe/xe_exec_queue.c index 956dc15b432a..971e1234b8ea 100644 --- a/drivers/gpu/drm/xe/xe_exec_queue.c +++ b/drivers/gpu/drm/xe/xe_exec_queue.c @@ -105,22 +105,35 @@ static struct xe_exec_queue *__xe_exec_queue_alloc(struct xe_device *xe, static ...
d5240fa65db071909e9d1d5adcc5fd1abc8e96fe
Analyze and fix the following issue in the Linux kernel code: nvdimm/pmem: Set dax flag for all 'PFN_MAP' cases
Problem Details: The dax is only supported on pfn type pmem devices since commit f467fee48da4 ("block: move the dax flag to queue_limits"). Trying to mount DAX filesystem fails with this error: mount: : wrong fs type, bad option, bad superblock on /dev/pmem7, missing codepage or helper program, or other erro...
```diff diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c index 1ae8b2351654..210fb77f51ba 100644 --- a/drivers/nvdimm/pmem.c +++ b/drivers/nvdimm/pmem.c @@ -498,7 +498,7 @@ static int pmem_attach_disk(struct device *dev, } if (fua) lim.features |= BLK_FEAT_FUA; - if (is_nd_pfn(dev)) + if (is_nd_pfn(dev...
f73286f3922f9968e850fe1e0e476d04dde2e57c
Analyze and fix the following issue in the Linux kernel code: dt-bindings: PCI: host-generic-pci: Drop minItems and maxItems of ranges
Problem Details: The ranges description states that "at least one non-prefetchable memory and one or both of prefetchable memory and IO space may also be provided." However, it should not limit the maximum number of ranges to 3. Freescale LS1028 and iMX95 use more than 3 ranges because the space splits some discontin...
```diff diff --git a/Documentation/devicetree/bindings/pci/host-generic-pci.yaml b/Documentation/devicetree/bindings/pci/host-generic-pci.yaml index bcfbaf5582cc..420d551e9af9 100644 --- a/Documentation/devicetree/bindings/pci/host-generic-pci.yaml +++ b/Documentation/devicetree/bindings/pci/host-generic-pci.yaml @@ -1...
90574d2a675947858b47008df8d07f75ea50d0d0
Analyze and fix the following issue in the Linux kernel code: rtla/osnoise: Prevent NULL dereference in error handling
Problem Details: If the "tool->data" allocation fails then there is no need to call osnoise_free_top() and, in fact, doing so will lead to a NULL dereference. Cc: stable@vger.kernel.org Cc: John Kacur <jkacur@redhat.com> Cc: "Luis Claudio R. Goncalves" <lgoncalv@redhat.com> Cc: Clark Williams <williams@redhat.com> Fix...
```diff diff --git a/tools/tracing/rtla/src/osnoise_top.c b/tools/tracing/rtla/src/osnoise_top.c index f594a44df840..2f756628613d 100644 --- a/tools/tracing/rtla/src/osnoise_top.c +++ b/tools/tracing/rtla/src/osnoise_top.c @@ -651,8 +651,10 @@ struct osnoise_tool *osnoise_init_top(struct osnoise_top_params *params) ...
d0949cd44a62c4c41b30ea7ae94d8c887f586882
Analyze and fix the following issue in the Linux kernel code: tracing: Return from tracing_buffers_read() if the file has been closed
Problem Details: When running the following: # cd /sys/kernel/tracing/ # echo 1 > events/sched/sched_waking/enable # echo 1 > events/sched/sched_switch/enable # echo 0 > tracing_on # dd if=per_cpu/cpu0/trace_pipe_raw of=/tmp/raw0.dat The dd task would get stuck in an infinite loop in the kernel. What would happe...
```diff diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 10cd38bce2f1..ebe7ce2f5f4a 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -7956,7 +7956,7 @@ tracing_buffers_read(struct file *filp, char __user *ubuf, trace_access_unlock(iter->cpu_file); if (ret < 0) { - if (trace_empty(ite...
9b103943ab281d137df1cdb48dcef329a87e0a06
Analyze and fix the following issue in the Linux kernel code: cgroup: Fix incorrect WARN_ON_ONCE() in css_release_work_fn()
Problem Details: It turns out that the WARN_ON_ONCE() call in css_release_work_fn introduced by commit ab0312526867 ("cgroup: Show # of subsystem CSSes in cgroup.stat") is incorrect. Although css->nr_descendants must be 0 when a css is released and ready to be freed, the corresponding cgrp->nr_dying_subsys[ss->id] may ...
```diff diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c index 601600afdd20..244ec600b4d8 100644 --- a/kernel/cgroup/cgroup.c +++ b/kernel/cgroup/cgroup.c @@ -5465,7 +5465,14 @@ static void css_release_work_fn(struct work_struct *work) ss->css_released(css); cgrp->nr_dying_subsys[ss->id]--; - WARN...
2124d84db293ba164059077944e6b429ba530495
Analyze and fix the following issue in the Linux kernel code: module: make waiting for a concurrent module loader interruptible
Problem Details: The recursive aes-arm-bs module load situation reported by Russell King is getting fixed in the crypto layer, but this in the meantime fixes the "recursive load hangs forever" by just making the waiting for the first module load be interruptible. This should now match the old behavior before commit 9b...
```diff diff --git a/kernel/module/main.c b/kernel/module/main.c index 6f4ec857bdef..71396e297499 100644 --- a/kernel/module/main.c +++ b/kernel/module/main.c @@ -3104,7 +3104,7 @@ static bool idempotent(struct idempotent *u, const void *cookie) struct idempotent *existing; bool first; - u->ret = 0; + u->ret = -E...
eedc060cff725ff53f284c63d55a42f49e6d2b3c
Analyze and fix the following issue in the Linux kernel code: firmware: arm_scmi: Fix voltage description in failure cases
Problem Details: Reset the reception buffer max size when a voltage domain description request fails, for example when the voltage domain returns an access permission error (SCMI_ERR_ACCESS) unless what only a single 32bit word is read back for the remaining voltage description requests responses leading to invalid inf...
```diff diff --git a/drivers/firmware/arm_scmi/voltage.c b/drivers/firmware/arm_scmi/voltage.c index 2175ffd6cef5..f1a7c04ae820 100644 --- a/drivers/firmware/arm_scmi/voltage.c +++ b/drivers/firmware/arm_scmi/voltage.c @@ -229,8 +229,10 @@ static int scmi_voltage_descriptors_get(const struct scmi_protocol_handle *ph, ...
bd02b0737f3816073e7a37a667190dea3c195e4a
Analyze and fix the following issue in the Linux kernel code: firmware: arm_scmi: Add support to reset the debug metrics
Problem Details: It is sometimes useful to reset all these SCMI communication debug metrics especially when we are interested in analysing these metrics during a particular workload or for a fixed time duration. Let us add the capability to reset all these metrics as once so that they can be counted during the period o...
```diff diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c index ade32a67ab63..ca910079d718 100644 --- a/drivers/firmware/arm_scmi/driver.c +++ b/drivers/firmware/arm_scmi/driver.c @@ -2864,6 +2864,24 @@ static const char * const dbg_counter_strs[] = { "err_protocol", }; +static s...
f6a905eaf6bfcf63d7b83d27bf3046e0e7a6f0a6
Analyze and fix the following issue in the Linux kernel code: firmware: arm_scmi: Create debugfs files for SCMI communication debug metrics
Problem Details: Now that the basic support to collect the SCMI communication debug metrics is in place, let us create debugfs files for the same so that they are accessible to the users/debuggers. Signed-off-by: Luke Parkin <luke.parkin@arm.com> Reviewed-by: Cristian Marussi <cristian.marussi@arm.com> Tested-by: Cris...
```diff diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c index 943ba03315de..ade32a67ab63 100644 --- a/drivers/firmware/arm_scmi/driver.c +++ b/drivers/firmware/arm_scmi/driver.c @@ -2847,6 +2847,36 @@ static int scmi_device_request_notifier(struct notifier_block *nb, return NOTIFY...
0b3d48c4726e1b20dffd2ff81a9d94d5d930220b
Analyze and fix the following issue in the Linux kernel code: firmware: arm_scmi: Track basic SCMI communication debug metrics
Problem Details: Add the support for counting some of the SCMI communication debug metrics like how many were sent successfully or with some errors, responses received, notifications and delayed responses, transfer timeouts and errors from the firmware/platform. In many cases, the traces exists. But the traces are not...
```diff diff --git a/drivers/firmware/arm_scmi/common.h b/drivers/firmware/arm_scmi/common.h index d414b0a43b3b..21c94deaf614 100644 --- a/drivers/firmware/arm_scmi/common.h +++ b/drivers/firmware/arm_scmi/common.h @@ -302,6 +302,20 @@ extern const struct scmi_desc scmi_optee_desc; void scmi_rx_callback(struct scmi_ch...
1b18d4295f9d1125bc7a799fc12924cd45fc04b1
Analyze and fix the following issue in the Linux kernel code: firmware: arm_scmi: Add support for debug metrics at the interface
Problem Details: Since SCMI involves interaction with the entity(software, firmware and/or hardware) providing services or features, it is quite useful to track certain metrics(for pure debugging purposes) like how many messages were sent or received, were there any failures, what kind of failures, ..etc. Add a new op...
```diff diff --git a/drivers/firmware/arm_scmi/Kconfig b/drivers/firmware/arm_scmi/Kconfig index aa5842be19b2..f35784d0a8dd 100644 --- a/drivers/firmware/arm_scmi/Kconfig +++ b/drivers/firmware/arm_scmi/Kconfig @@ -55,6 +55,20 @@ config ARM_SCMI_RAW_MODE_SUPPORT_COEX operate normally, thing which could make an SCMI...
67927a1b255d883881be9467508e0af9a5e0be9d
Analyze and fix the following issue in the Linux kernel code: usbnet: ipheth: fix carrier detection in modes 1 and 4
Problem Details: Apart from the standard "configurations", "interfaces" and "alternate interface settings" in USB, iOS devices also have a notion of "modes". In different modes, the device exposes a different set of available configurations. Depending on the iOS version, and depending on the current mode, the length a...
```diff diff --git a/drivers/net/usb/ipheth.c b/drivers/net/usb/ipheth.c index cdc72559790a..46afb95ffabe 100644 --- a/drivers/net/usb/ipheth.c +++ b/drivers/net/usb/ipheth.c @@ -355,13 +355,14 @@ static int ipheth_carrier_set(struct ipheth_device *dev) 0x02, /* index */ dev->ctrl_buf, IPHETH_CTRL_BUF_SIZE, ...
36fb51479e3c1112013f60f01e3b9725f8f9baf7
Analyze and fix the following issue in the Linux kernel code: net: stmmac: xgmac: use const char arrays for string constants
Problem Details: Jiri Slaby advises me that the preferred mechanism for declaring string constants is static char arrays, so use that here. This mostly reverts commit 1692b9775e74 ("net: stmmac: xgmac: use #define for string constants") That commit was a fix for commit 46eba193d04f ("net: stmmac: xgmac: fix handling ...
```diff diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c index f196cd99d510..cbf2dd976ab1 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c @@ -846,42 +846,41 @@ static const st...
5bdacb0907c1f531995b6ba47b832ac3a0182ae9
Analyze and fix the following issue in the Linux kernel code: drm/xe/pf: Fix VF config validation on multi-GT platforms
Problem Details: When validating VF config on the media GT, we may wrongly report that VF is already partially configured on it, as we consider GGTT and LMEM provisioning done on the primary GT (since both GGTT and LMEM are tile-level resources, not a GT-level). This will cause skipping a VF auto-provisioning on the m...
```diff diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c b/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c index 52c7277d243d..227527785afd 100644 --- a/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c +++ b/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c @@ -1928,6 +1928,7 @@ static int pf_validate_vf_config(struct xe_gt *gt, ...
f6c9a097b55e1955e3dd35f1de4828d3ed67534c
Analyze and fix the following issue in the Linux kernel code: ALSA: usx2y: Drop no longer used variable
Problem Details: The recent conversion to the standard print API included some cleanups and that changed the code no longer referring to a variable iters at usb_stream_start(). This caused a compiler warning in the end. Let's drop the unused variable. Fixes: f8466d91f36d ("ALSA: usx2y: Use standard print API") Report...
```diff diff --git a/sound/usb/usx2y/usb_stream.c b/sound/usb/usx2y/usb_stream.c index 66ea610aa433..3122cf653273 100644 --- a/sound/usb/usx2y/usb_stream.c +++ b/sound/usb/usx2y/usb_stream.c @@ -665,7 +665,7 @@ static void i_playback_start(struct urb *urb) int usb_stream_start(struct usb_stream_kernel *sk) { struct...
af1d53b6e0ebef5ea57887e23619b2bb33a6f4de
Analyze and fix the following issue in the Linux kernel code: ALSA: caiaq: Fix unused variable warning
Problem Details: The recent cleanup of caiaq driver forgot to remove the unused loop variable: sound/usb/caiaq/audio.c: In function 'snd_usb_caiaq_pcm_prepare': sound/usb/caiaq/audio.c:179:41: error: unused variable 'i' [-Werror=unused-variable] Fixes: e95b9f7f2ee0 ("ALSA: snd-usb-caiaq: use snd_pcm_rate_to_rate_bit")...
```diff diff --git a/sound/usb/caiaq/audio.c b/sound/usb/caiaq/audio.c index e62a4ea1d19c..772c0ecb7077 100644 --- a/sound/usb/caiaq/audio.c +++ b/sound/usb/caiaq/audio.c @@ -176,7 +176,7 @@ static int snd_usb_caiaq_pcm_hw_free(struct snd_pcm_substream *sub) static int snd_usb_caiaq_pcm_prepare(struct snd_pcm_substr...
528baf4f62dd57dee1a1076390b0921ad32b88a8
Analyze and fix the following issue in the Linux kernel code: ALSA: sparc: Fix a typo at dev_*() conversion
Problem Details: There was a stupid typo left that broke the build. Fix it. Fixes: d41abde89483 ("ALSA: sparc: Use standard print API") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202408090648.J2EAijjH-lkp@intel.com/ Link: https://patch.msgid.link/20240809073923.3735-1...
```diff diff --git a/sound/sparc/cs4231.c b/sound/sparc/cs4231.c index 5f39b7847d31..a1339f9ef12a 100644 --- a/sound/sparc/cs4231.c +++ b/sound/sparc/cs4231.c @@ -2015,7 +2015,7 @@ static int snd_cs4231_ebus_create(struct snd_card *card, if (ebus_dma_register(&chip->p_dma.ebus_info)) { snd_cs4231_ebus_free(chip)...
b09b6f26adc407b0af7a7ad767f1e753a348d951
Analyze and fix the following issue in the Linux kernel code: media: solo6x10: use 'time_left' variable with wait_for_completion_timeout()
Problem Details: There is a confusing pattern in the kernel to use a variable named 'timeout' to store the result of wait_for_completion_timeout() causing patterns like: timeout = wait_for_completion_timeout(...) if (!timeout) return -ETIMEDOUT; with all kinds of permutations. Use 'time_left' as a var...
```diff diff --git a/drivers/media/pci/solo6x10/solo6x10-p2m.c b/drivers/media/pci/solo6x10/solo6x10-p2m.c index ca70a864a3ef..5f100e5e03d9 100644 --- a/drivers/media/pci/solo6x10/solo6x10-p2m.c +++ b/drivers/media/pci/solo6x10/solo6x10-p2m.c @@ -57,7 +57,7 @@ int solo_p2m_dma_desc(struct solo_dev *solo_dev, i...
24a19e4b3a1abc548e45d35d7ce8f2b6b6c65ce7
Analyze and fix the following issue in the Linux kernel code: media: platform: exynos-gsc: use 'time_left' variable with wait_event_timeout()
Problem Details: There is a confusing pattern in the kernel to use a variable named 'timeout' to store the result of wait_event_timeout() causing patterns like: timeout = wait_event_timeout(...) if (!timeout) return -ETIMEDOUT; with all kinds of permutations. Use 'time_left' as a variable to make the ...
```diff diff --git a/drivers/media/platform/samsung/exynos-gsc/gsc-core.c b/drivers/media/platform/samsung/exynos-gsc/gsc-core.c index 618ae55fe396..f45f5c8612a6 100644 --- a/drivers/media/platform/samsung/exynos-gsc/gsc-core.c +++ b/drivers/media/platform/samsung/exynos-gsc/gsc-core.c @@ -1225,7 +1225,7 @@ static void...
bafa00652c860665060b5f6ab01eb58e970c854e
Analyze and fix the following issue in the Linux kernel code: media: fimc-is: use 'time_left' variable with wait_event_timeout()
Problem Details: There is a confusing pattern in the kernel to use a variable named 'timeout' to store the result of wait_event_timeout() causing patterns like: timeout = wait_event_timeout(...) if (!timeout) return -ETIMEDOUT; with all kinds of permutations. Use 'time_left' as a variable to make the ...
```diff diff --git a/drivers/media/platform/samsung/exynos4-is/fimc-core.c b/drivers/media/platform/samsung/exynos4-is/fimc-core.c index aae74b501a42..adfc2d73d04b 100644 --- a/drivers/media/platform/samsung/exynos4-is/fimc-core.c +++ b/drivers/media/platform/samsung/exynos4-is/fimc-core.c @@ -822,7 +822,7 @@ err: sta...
9b2bf29410e962fd657cc50c7baa198506f1fc11
Analyze and fix the following issue in the Linux kernel code: media: bdisp: use 'time_left' variable with wait_event_timeout()
Problem Details: There is a confusing pattern in the kernel to use a variable named 'timeout' to store the result of wait_event_timeout() causing patterns like: timeout = wait_event_timeout(...) if (!timeout) return -ETIMEDOUT; with all kinds of permutations. Use 'time_left' as a variable to make the ...
```diff diff --git a/drivers/media/platform/st/sti/bdisp/bdisp-v4l2.c b/drivers/media/platform/st/sti/bdisp/bdisp-v4l2.c index 1328b4eb6b9f..c7ee6e1a4451 100644 --- a/drivers/media/platform/st/sti/bdisp/bdisp-v4l2.c +++ b/drivers/media/platform/st/sti/bdisp/bdisp-v4l2.c @@ -1160,7 +1160,7 @@ static void bdisp_irq_timeo...
6f93a2abecbed904f7c47a2041050f911c098767
Analyze and fix the following issue in the Linux kernel code: media: docs: Fix newline typos in capture.c
Problem Details: Commit d7894721f73b ("media: docs: Fix newline typo") aimed to fix the newline typos in capture.c, but some of the typos were not fixed. Fix the remaining newline typos. Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
```diff diff --git a/Documentation/userspace-api/media/v4l/capture.c.rst b/Documentation/userspace-api/media/v4l/capture.c.rst index eef6772967a1..349541b1dac0 100644 --- a/Documentation/userspace-api/media/v4l/capture.c.rst +++ b/Documentation/userspace-api/media/v4l/capture.c.rst @@ -333,7 +333,7 @@ file: media/v4l/c...
a151766bd3688f6803e706c6433a7c8d3c6a6a94
Analyze and fix the following issue in the Linux kernel code: media: qcom: camss: Fix ordering of pm_runtime_enable
Problem Details: pm_runtime_enable() should happen prior to vfe_get() since vfe_get() calls pm_runtime_resume_and_get(). This is a basic race condition that doesn't show up for most users so is not widely reported. If you blacklist qcom-camss in modules.d and then subsequently modprobe the module post-boot it is possi...
```diff diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c index 51b1d3550421..d64985ca6e88 100644 --- a/drivers/media/platform/qcom/camss/camss.c +++ b/drivers/media/platform/qcom/camss/camss.c @@ -2283,6 +2283,8 @@ static int camss_probe(struct platform_device *pdev) ...
25f18cb1b673220b76a86ebef8e7fb79bd303b27
Analyze and fix the following issue in the Linux kernel code: media: qcom: camss: Remove use_count guard in stop_streaming
Problem Details: The use_count check was introduced so that multiple concurrent Raw Data Interfaces RDIs could be driven by different virtual channels VCs on the CSIPHY input driving the video pipeline. This is an invalid use of use_count though as use_count pertains to the number of times a video entity has been open...
```diff diff --git a/drivers/media/platform/qcom/camss/camss-video.c b/drivers/media/platform/qcom/camss/camss-video.c index cd72feca618c..3b8fc31d957c 100644 --- a/drivers/media/platform/qcom/camss/camss-video.c +++ b/drivers/media/platform/qcom/camss/camss-video.c @@ -297,12 +297,6 @@ static void video_stop_streaming...
c8ad75010c5bafe014860f33fc73a887ab561209
Analyze and fix the following issue in the Linux kernel code: media: raspberrypi: VIDEO_RASPBERRYPI_PISP_BE should depend on ARCH_BCM2835
Problem Details: Currently, the Raspberry Pi PiSP Backend (BE) ISP is only present on the Broadcom BCM2712-based Raspberry Pi 5. Hence add a dependency on ARCH_BCM2835, to prevent asking the user about this driver when configuring a kernel without Broadcom BCM2835 family support. The dependency can be relaxed if/when...
```diff diff --git a/drivers/media/platform/raspberrypi/pisp_be/Kconfig b/drivers/media/platform/raspberrypi/pisp_be/Kconfig index 38c0f8305d62..46765a2e4c4d 100644 --- a/drivers/media/platform/raspberrypi/pisp_be/Kconfig +++ b/drivers/media/platform/raspberrypi/pisp_be/Kconfig @@ -2,6 +2,7 @@ config VIDEO_RASPBERRYPI_...
e25cc4be4616fcf5689622b3226d648aab253cdb
Analyze and fix the following issue in the Linux kernel code: Revert "media: tuners: fix error return code of hybrid_tuner_request_state()"
Problem Details: This reverts commit b9302fa7ed979e84b454e4ca92192cf485a4ed41. As Fedor Pchelkin pointed out, this commit violates the convention of using the macro return value, which causes errors. For example, in functions tda18271_attach(), xc5000_attach(), simple_tuner_attach(). Link: https://lore.kernel.org/lin...
```diff diff --git a/drivers/media/tuners/tuner-i2c.h b/drivers/media/tuners/tuner-i2c.h index 07aeead0644a..724952e001cd 100644 --- a/drivers/media/tuners/tuner-i2c.h +++ b/drivers/media/tuners/tuner-i2c.h @@ -133,10 +133,8 @@ static inline int tuner_i2c_xfer_send_recv(struct tuner_i2c_props *props, } \ if ...
74e07a9a26a49ab60ee8ef09238c63ff461dfdd0
Analyze and fix the following issue in the Linux kernel code: media: i2c: GC08A3: Fix spelling mistake "STRAEMING_REG" -> "STREAMING_REG"
Problem Details: There is a spelling mistake in a dev_err message. Fix it. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
```diff diff --git a/drivers/media/i2c/gc08a3.c b/drivers/media/i2c/gc08a3.c index 7680d807e7a5..84de5cff958d 100644 --- a/drivers/media/i2c/gc08a3.c +++ b/drivers/media/i2c/gc08a3.c @@ -948,7 +948,7 @@ static int gc08a3_start_streaming(struct gc08a3 *gc08a3) ret = cci_write(gc08a3->regmap, GC08A3_STREAMING_REG, 1,...
ac80fcad7eaf7f28af9e0a098284ee7e921c596e
Analyze and fix the following issue in the Linux kernel code: media: i2c: GC05A2: Fix spelling mistake "Horizental" -> "Horizontal"
Problem Details: There is a spelling mistake in a string in the gc05a2_test_pattern_menu array. Fix it. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
```diff diff --git a/drivers/media/i2c/gc05a2.c b/drivers/media/i2c/gc05a2.c index dcba29ee725c..0413c557e594 100644 --- a/drivers/media/i2c/gc05a2.c +++ b/drivers/media/i2c/gc05a2.c @@ -65,7 +65,7 @@ static const char *const gc05a2_test_pattern_menu[] = { "No Pattern", "Fade_to_gray_Color Bar", "Color Bar", - "P...
46d7ebfe6a75a454a5fa28604f0ef1491f9d8d14
Analyze and fix the following issue in the Linux kernel code: drivers: media: dvb-frontends/rtl2830: fix an out-of-bounds write error
Problem Details: Ensure index in rtl2830_pid_filter does not exceed 31 to prevent out-of-bounds access. dev->filters is a 32-bit value, so set_bit and clear_bit functions should only operate on indices from 0 to 31. If index is 32, it will attempt to access a non-existent 33rd bit, leading to out-of-bounds access. Cha...
```diff diff --git a/drivers/media/dvb-frontends/rtl2830.c b/drivers/media/dvb-frontends/rtl2830.c index a1e62d49200b..aa4ef9aedf17 100644 --- a/drivers/media/dvb-frontends/rtl2830.c +++ b/drivers/media/dvb-frontends/rtl2830.c @@ -609,7 +609,7 @@ static int rtl2830_pid_filter(struct dvb_frontend *fe, u8 index, u16 pid,...
8ae06f360cfaca2b88b98ca89144548b3186aab1
Analyze and fix the following issue in the Linux kernel code: drivers: media: dvb-frontends/rtl2832: fix an out-of-bounds write error
Problem Details: Ensure index in rtl2832_pid_filter does not exceed 31 to prevent out-of-bounds access. dev->filters is a 32-bit value, so set_bit and clear_bit functions should only operate on indices from 0 to 31. If index is 32, it will attempt to access a non-existent 33rd bit, leading to out-of-bounds access. Cha...
```diff diff --git a/drivers/media/dvb-frontends/rtl2832.c b/drivers/media/dvb-frontends/rtl2832.c index acb5c575bace..3b4e46dac1bf 100644 --- a/drivers/media/dvb-frontends/rtl2832.c +++ b/drivers/media/dvb-frontends/rtl2832.c @@ -983,7 +983,7 @@ static int rtl2832_pid_filter(struct dvb_frontend *fe, u8 index, u16 pid,...
34acbac08940359cf93d91d238ee281d8953e663
Analyze and fix the following issue in the Linux kernel code: Documentation: media: Fix v4l2_av1_segmentation table formatting
Problem Details: Fix incorrect formatting. Signed-off-by: Fritz Koenig <frkoenig@chromium.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> [hverkuil: added missing commit message]
```diff diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-codec-stateless.rst b/Documentation/userspace-api/media/v4l/ext-ctrls-codec-stateless.rst index 22bde00d42df..e8d2d56d794f 100644 --- a/Documentation/userspace-api/media/v4l/ext-ctrls-codec-stateless.rst +++ b/Documentation/userspace-api/media/v4l/ext...
677126b274806d8a33e7581c115bcf404b00ac8d
Analyze and fix the following issue in the Linux kernel code: media: Documentation: Fix spelling of "blanking"
Problem Details: "Blanking" should be spelled as such, not "balanking". Fix it. Reported-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
```diff diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-image-process.rst b/Documentation/userspace-api/media/v4l/ext-ctrls-image-process.rst index b1c2ab2854af..27803dca8d3e 100644 --- a/Documentation/userspace-api/media/v4l/ext-ctrls-image-process.rst +++ b/Documentation/userspace-api/media/v4l/ext-ctrls...
09612576046a3cd29bd2b2b88c5813b1dfe96775
Analyze and fix the following issue in the Linux kernel code: net: sungem_phy: Constify struct mii_phy_def
Problem Details: 'struct mii_phy_def' are not modified in this driver. Constifying these structures moves some data to a read-only section, so increase overall security. While at it fix the checkpatch warning related to this patch (some missing newlines and spaces around *) On a x86_64, with allmodconfig: Before: ==...
```diff diff --git a/drivers/net/sungem_phy.c b/drivers/net/sungem_phy.c index d591e33268e5..55aa8d0c8e1f 100644 --- a/drivers/net/sungem_phy.c +++ b/drivers/net/sungem_phy.c @@ -893,7 +893,7 @@ static const struct mii_phy_ops bcm5201_phy_ops = { .read_link = genmii_read_link, }; -static struct mii_phy_def bcm5201...
36bb22a08a69d9984a8399c07310d18b115eae20
Analyze and fix the following issue in the Linux kernel code: cifs: cifs_inval_name_dfs_link_error: correct the check for fullpath
Problem Details: Replace the always-true check tcon->origin_fullpath with check of server->leaf_fullpath See https://bugzilla.kernel.org/show_bug.cgi?id=219083 The check of the new @tcon will always be true during mounting, since @tcon->origin_fullpath will only be set after the tree is connected to the latest common...
```diff diff --git a/fs/smb/client/misc.c b/fs/smb/client/misc.c index 3fe5bfc389d0..c6f11e6f9eb9 100644 --- a/fs/smb/client/misc.c +++ b/fs/smb/client/misc.c @@ -1234,6 +1234,7 @@ int cifs_inval_name_dfs_link_error(const unsigned int xid, const char *full_path, bool *islink) { + struct TCP_Server_Info...
344576fa6a69ce1292ef669c8d50c2088c36dc1e
Analyze and fix the following issue in the Linux kernel code: sched_ext: Improve logging around enable/disable
Problem Details: sched_ext currently doesn't generate messages when the BPF scheduler is enabled and disabled unless there are errors. It is useful to have paper trail. Improve logging around enable/disable: - Generate info messages on enable and non-error disable. - Update error exit message formatting so that it's ...
```diff diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c index 17af9c46d891..143c4207a826 100644 --- a/kernel/sched/ext.c +++ b/kernel/sched/ext.c @@ -4013,11 +4013,11 @@ static const char *scx_exit_reason(enum scx_exit_kind kind) { switch (kind) { case SCX_EXIT_UNREG: - return "Scheduler unregistered from us...
991ef53a4832941c8130008ef35c66ec88c7fa0f
Analyze and fix the following issue in the Linux kernel code: sched_ext: Make scx_rq_online() also test cpu_active() in addition to SCX_RQ_ONLINE
Problem Details: scx_rq_online() currently only tests SCX_RQ_ONLINE. This isn't fully correct - e.g. consume_dispatch_q() uses task_run_on_remote_rq() which tests scx_rq_online() to see whether the current rq can run the task, and, if so, calls consume_remote_task() to migrate the task to @rq. While the test itself was...
```diff diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c index 9efb54172495..17af9c46d891 100644 --- a/kernel/sched/ext.c +++ b/kernel/sched/ext.c @@ -1818,7 +1818,14 @@ dispatch: static bool scx_rq_online(struct rq *rq) { - return likely(rq->scx.flags & SCX_RQ_ONLINE); + /* + * Test both cpu_active() and %SCX...
72763ea3d45c7f9fd69b825468afbf4d11c5ffc2
Analyze and fix the following issue in the Linux kernel code: sched_ext: Fix unsafe list iteration in process_ddsp_deferred_locals()
Problem Details: process_ddsp_deferred_locals() executes deferred direct dispatches to the local DSQs of remote CPUs. It iterates the tasks on rq->scx.ddsp_deferred_locals list, removing and calling dispatch_to_local_dsq() on each. However, the list is protected by the rq lock that can be dropped by dispatch_to_local_d...
```diff diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c index 60a7eb7d8a9e..9efb54172495 100644 --- a/kernel/sched/ext.c +++ b/kernel/sched/ext.c @@ -2726,17 +2726,19 @@ static void set_next_task_scx(struct rq *rq, struct task_struct *p, bool first) static void process_ddsp_deferred_locals(struct rq *rq) { - s...
e422c0bfd9e47e399e86bcc483f49d8b54064fc2
Analyze and fix the following issue in the Linux kernel code: drm/xe: fix WA 14018094691
Problem Details: This WA is applied while initializing the media GT, but it a primary GT WA (because it modifies a register on the primary GT), so the XE_WA macro is returning false even when the WA should be applied. Fix this by using the primary GT in the macro. Note that this WA only applies to PXP and we don't yet...
```diff diff --git a/drivers/gpu/drm/xe/xe_gsc.c b/drivers/gpu/drm/xe/xe_gsc.c index f8239a13fa2b..77ce44e845c5 100644 --- a/drivers/gpu/drm/xe/xe_gsc.c +++ b/drivers/gpu/drm/xe/xe_gsc.c @@ -260,7 +260,7 @@ static int gsc_upload_and_init(struct xe_gsc *gsc) struct xe_tile *tile = gt_to_tile(gt); int ret; - if (XE...
636cdf6fbddff4780ff4452a82afb099292b88b1
Analyze and fix the following issue in the Linux kernel code: drm/xe/guc: Enable w/a 14022293748 and 22019794406
Problem Details: Enable workarounds for HW bug where render engine reset fails. Given that we're bumping the minimum required GuC version to 70.29, we're guaranteed to always have support for this KLV in the GuC. v2: Enable KLV correctly for either workaround (Lucas) v4: Add check for minimum supported GuC firmware ve...
```diff diff --git a/drivers/gpu/drm/xe/abi/guc_klvs_abi.h b/drivers/gpu/drm/xe/abi/guc_klvs_abi.h index 8f9f60b28306..6b30743a2f6c 100644 --- a/drivers/gpu/drm/xe/abi/guc_klvs_abi.h +++ b/drivers/gpu/drm/xe/abi/guc_klvs_abi.h @@ -351,6 +351,7 @@ enum xe_guc_klv_ids { GUC_WORKAROUND_KLV_ID_GAM_PFQ_SHADOW_TAIL_POLLING...
599c19397b17d197fc1184bbc950f163a292efc9
Analyze and fix the following issue in the Linux kernel code: perf callchain: Fix stitch LBR memory leaks
Problem Details: The 'struct callchain_cursor_node' has a 'struct map_symbol' whose maps and map members are reference counted. Ensure these values use a _get routine to increment the reference counts and use map_symbol__exit() to release the reference counts. Do similar for 'struct thread's prev_lbr_cursor, but save ...
```diff diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c index 8477edefc299..706be5e4a076 100644 --- a/tools/perf/util/machine.c +++ b/tools/perf/util/machine.c @@ -2270,8 +2270,12 @@ static void save_lbr_cursor_node(struct thread *thread, cursor->curr = cursor->first; else cursor->curr = curs...
05a3d6e9307250a5911d75308e4363466794ab21
Analyze and fix the following issue in the Linux kernel code: selinux: revert our use of vma_is_initial_heap()
Problem Details: Unfortunately it appears that vma_is_initial_heap() is currently broken for applications that do not currently have any heap allocated, e.g. brk == start_brk. The breakage is such that it will cause SELinux to check for the process/execheap permission on memory regions that cross brk/start_brk even wh...
```diff diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 55c78c318ccd..bfa61e005aac 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -3852,7 +3852,17 @@ static int selinux_file_mprotect(struct vm_area_struct *vma, if (default_noexec && (prot & PROT_EXEC) && !(vma->vm...
0c84bde4f37ba27d50e4c70ecacd33fe4a57030d
Analyze and fix the following issue in the Linux kernel code: media: Revert "media: dvb-usb: Fix unexpected infinite loop in dvb_usb_read_remote_control()"
Problem Details: This reverts commit 2052138b7da52ad5ccaf74f736d00f39a1c9198c. This breaks the TeVii s480 dual DVB-S2 S660. The device has a bulk in endpoint but no corresponding out endpoint, so the device does not pass the "has both receive and send bulk endpoint" test. Seemingly this device does not use dvb_usb_ge...
```diff diff --git a/drivers/media/usb/dvb-usb/dvb-usb-init.c b/drivers/media/usb/dvb-usb/dvb-usb-init.c index 22d83ac18eb7..fbf58012becd 100644 --- a/drivers/media/usb/dvb-usb/dvb-usb-init.c +++ b/drivers/media/usb/dvb-usb/dvb-usb-init.c @@ -23,40 +23,11 @@ static int dvb_usb_force_pid_filter_usage; module_param_name...
5003d0ce5c7da3a02c0aff771f516f99731e7390
Analyze and fix the following issue in the Linux kernel code: ASoC: meson: axg-fifo: fix irq scheduling issue with PREEMPT_RT
Problem Details: With PREEMPT_RT enabled a spinlock_t becomes a sleeping lock. This is usually not a problem with spinlocks used in IRQ context since IRQ handlers get threaded. However, if IRQF_ONESHOT is set, the primary handler won't be force-threaded and runs always in hardirq context. This is a problem because spi...
```diff diff --git a/sound/soc/meson/axg-fifo.c b/sound/soc/meson/axg-fifo.c index 7e6090af720b..75909196b769 100644 --- a/sound/soc/meson/axg-fifo.c +++ b/sound/soc/meson/axg-fifo.c @@ -207,25 +207,18 @@ static irqreturn_t axg_fifo_pcm_irq_block(int irq, void *dev_id) status = FIELD_GET(STATUS1_INT_STS, status); a...
6675e76a5c441b52b1b983ebb714122087020ebe
Analyze and fix the following issue in the Linux kernel code: ASoC: amd: yc: Add quirk entry for OMEN by HP Gaming Laptop 16-n0xxx
Problem Details: Fix the missing mic on OMEN by HP Gaming Laptop 16-n0xxx by adding the quirk entry with the board ID 8A44. Cc: stable@vger.kernel.org Link: https://bugzilla.suse.com/show_bug.cgi?id=1227182 Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20240807170249.16490-1-tiwai@suse.de ...
```diff diff --git a/sound/soc/amd/yc/acp6x-mach.c b/sound/soc/amd/yc/acp6x-mach.c index d30752c0dab2..0523c16305db 100644 --- a/sound/soc/amd/yc/acp6x-mach.c +++ b/sound/soc/amd/yc/acp6x-mach.c @@ -416,6 +416,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = { DMI_MATCH(DMI_BOARD_NAME, "8A43"), } ...
cb5b81bc9a448f8db817566f60f92e2ea788ea0f
Analyze and fix the following issue in the Linux kernel code: module: warn about excessively long module waits
Problem Details: Russell King reported that the arm cbc(aes) crypto module hangs when loaded, and Herbert Xu bisected it to commit 9b9879fc0327 ("modules: catch concurrent module loads, treat them as idempotent"), and noted: "So what's happening here is that the first modprobe tries to load a fallback CBC implement...
```diff diff --git a/kernel/module/main.c b/kernel/module/main.c index d9592195c5bb..6f4ec857bdef 100644 --- a/kernel/module/main.c +++ b/kernel/module/main.c @@ -3183,15 +3183,28 @@ static int idempotent_init_module(struct file *f, const char __user * uargs, int if (!f || !(f->f_mode & FMODE_READ)) return -EBADF;...
f39bae2e028b841732ca81d8131d27b48a6051ad
Analyze and fix the following issue in the Linux kernel code: bcachefs: Switch to .get_inode_acl()
Problem Details: .set_acl() requires a dentry, and if one isn't passed it marks the VFS inode as not having an ACL. This has been causing inodes with ACLs to have them "disappear" on bcachefs filesystem, depending on which path those inodes get pulled into the cache from. Switching to .get_inode_acl(), like other loc...
```diff diff --git a/fs/bcachefs/acl.c b/fs/bcachefs/acl.c index a7b425d3c8a0..331a17f3f113 100644 --- a/fs/bcachefs/acl.c +++ b/fs/bcachefs/acl.c @@ -272,16 +272,19 @@ bch2_acl_to_xattr(struct btree_trans *trans, return xattr; } -struct posix_acl *bch2_get_acl(struct mnt_idmap *idmap, - struct dentry *de...