id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
a00f2015acdbd8a4b3d2382eaeebe11db1925fad
Analyze and fix the following issue in the Linux kernel code: drm/panthor: validate group queue count
Problem Details: A panthor group can have at most MAX_CS_PER_CSG panthor queues. Fixes: 4bdca11507928 ("drm/panthor: Add the driver frontend block") Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> # v1 Reviewed-by: Steven Price <steven.price@arm.com> Signed-off...
```diff diff --git a/drivers/gpu/drm/panthor/panthor_drv.c b/drivers/gpu/drm/panthor/panthor_drv.c index 1116f2d2826e..4d8e9b34702a 100644 --- a/drivers/gpu/drm/panthor/panthor_drv.c +++ b/drivers/gpu/drm/panthor/panthor_drv.c @@ -1094,7 +1094,7 @@ static int panthor_ioctl_group_create(struct drm_device *ddev, void *da...
22b65a40574e597e1919ca22cc3535c2b541f764
Analyze and fix the following issue in the Linux kernel code: rust: time: Implement Add<Delta>/Sub<Delta> for Instant
Problem Details: In order to copy the behavior rust currently follows for basic arithmetic operations and panic if the result of an addition or subtraction results in a value that would violate the invariants of Instant, but only if the kernel has overflow checking for rust enabled. Signed-off-by: Lyude Paul <lyude@re...
```diff diff --git a/rust/kernel/time.rs b/rust/kernel/time.rs index 7320d8715bcc..642c42a520a8 100644 --- a/rust/kernel/time.rs +++ b/rust/kernel/time.rs @@ -25,6 +25,7 @@ //! C header: [`include/linux/ktime.h`](srctree/include/linux/ktime.h). use core::marker::PhantomData; +use core::ops; pub mod delay; pub m...
a984da24e7ac411c95bab7b6c127bae4927f9d03
Analyze and fix the following issue in the Linux kernel code: rust: hrtimer: Document the return value for HrTimerHandle::cancel()
Problem Details: Just a drive-by fix I noticed: we don't actually document what the return value from cancel() does, so do that. Signed-off-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Andreas Hindborg <a.hindborg@kernel.org> Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com> Link: https://lore.kernel.org/r/...
```diff diff --git a/rust/kernel/time/hrtimer.rs b/rust/kernel/time/hrtimer.rs index 144e3b57cc78..6bfc0223f4f5 100644 --- a/rust/kernel/time/hrtimer.rs +++ b/rust/kernel/time/hrtimer.rs @@ -324,6 +324,8 @@ pub unsafe trait HrTimerHandle { /// Note that the timer might be started by a concurrent start operation. I...
9b2bfdbf43adb9929c5ddcdd96efedbf1c88cf53
Analyze and fix the following issue in the Linux kernel code: phy: mscc: Stop taking ts_lock for tx_queue and use its own lock
Problem Details: When transmitting a PTP frame which is timestamp using 2 step, the following warning appears if CONFIG_PROVE_LOCKING is enabled: ============================= [ BUG: Invalid wait context ] 6.17.0-rc1-00326-ge6160462704e #427 Not tainted ----------------------------- ptp4l/119 is trying to lock: c2a44ed...
```diff diff --git a/drivers/net/phy/mscc/mscc_ptp.c b/drivers/net/phy/mscc/mscc_ptp.c index 72847320cb65..d692df7d975c 100644 --- a/drivers/net/phy/mscc/mscc_ptp.c +++ b/drivers/net/phy/mscc/mscc_ptp.c @@ -456,12 +456,12 @@ static void vsc85xx_dequeue_skb(struct vsc85xx_ptp *ptp) *p++ = (reg >> 24) & 0xff; } - ...
1939a9fcb80353dd8b111aa1e79c691afbde08b4
Analyze and fix the following issue in the Linux kernel code: Input: i8042 - add TUXEDO InfinityBook Pro Gen10 AMD to i8042 quirk table
Problem Details: Occasionally wakes up from suspend with missing input on the internal keyboard. Setting the quirks appears to fix the issue for this device as well. Signed-off-by: Christoffer Sandberg <cs@tuxedo.de> Signed-off-by: Werner Sembach <wse@tuxedocomputers.com> Cc: stable@vger.kernel.org Link: https://lore....
```diff diff --git a/drivers/input/serio/i8042-acpipnpio.h b/drivers/input/serio/i8042-acpipnpio.h index 6ed9fc34948c..1caa6c4ca435 100644 --- a/drivers/input/serio/i8042-acpipnpio.h +++ b/drivers/input/serio/i8042-acpipnpio.h @@ -1155,6 +1155,20 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst ...
fd2004d82d8d8faa94879e3de3096c8511728637
Analyze and fix the following issue in the Linux kernel code: selftest: net: Fix weird setsockopt() in bind_bhash.c.
Problem Details: bind_bhash.c passes (SO_REUSEADDR | SO_REUSEPORT) to setsockopt(). In the asm-generic definition, the value happens to match with the bare SO_REUSEPORT, (2 | 15) == 15, but not on some arch. arch/alpha/include/uapi/asm/socket.h:18:#define SO_REUSEADDR 0x0004 arch/alpha/include/uapi/asm/socket.h:24:#d...
```diff diff --git a/tools/testing/selftests/net/bind_bhash.c b/tools/testing/selftests/net/bind_bhash.c index 57ff67a3751e..da04b0b19b73 100644 --- a/tools/testing/selftests/net/bind_bhash.c +++ b/tools/testing/selftests/net/bind_bhash.c @@ -75,7 +75,7 @@ static void *setup(void *arg) int *array = (int *)arg; fo...
ed42d80f3bae89592fbb2ffaf8b6b2e720d53f6a
Analyze and fix the following issue in the Linux kernel code: tools: gpio: remove the include directory on make clean
Problem Details: Remove the generated include directory when running make clean. Fixes: 8674cea84dc6 ("tools/gpio: move to tools buildsystem") Signed-off-by: Zhang Jiao <zhangjiao2@cmss.chinamobile.com> Link: https://lore.kernel.org/r/20250903063621.2424-1-zhangjiao2@cmss.chinamobile.com [Bartosz: add Fixes tag, impro...
```diff diff --git a/tools/gpio/Makefile b/tools/gpio/Makefile index ed565eb52275..342e056c8c66 100644 --- a/tools/gpio/Makefile +++ b/tools/gpio/Makefile @@ -77,7 +77,7 @@ $(OUTPUT)gpio-watch: $(GPIO_WATCH_IN) clean: rm -f $(ALL_PROGRAMS) - rm -f $(OUTPUT)include/linux/gpio.h + rm -rf $(OUTPUT)include find $(or...
4844123fe0b853a4982c02666cb3fd863d701d50
Analyze and fix the following issue in the Linux kernel code: ppp: fix memory leak in pad_compress_skb
Problem Details: If alloc_skb() fails in pad_compress_skb(), it returns NULL without releasing the old skb. The caller does: skb = pad_compress_skb(ppp, skb); if (!skb) goto drop; drop: kfree_skb(skb); When pad_compress_skb() returns NULL, the reference to the old skb is lost and kfree_skb(skb) e...
```diff diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c index 824c8dc4120b..702a7f7183ce 100644 --- a/drivers/net/ppp/ppp_generic.c +++ b/drivers/net/ppp/ppp_generic.c @@ -1744,7 +1744,6 @@ pad_compress_skb(struct ppp *ppp, struct sk_buff *skb) */ if (net_ratelimit()) netdev_err(pp...
8bbceba7dc5090c00105e006ce28d1292cfda8dd
Analyze and fix the following issue in the Linux kernel code: net: xilinx: axienet: Add error handling for RX metadata pointer retrieval
Problem Details: Add proper error checking for dmaengine_desc_get_metadata_ptr() which can return an error pointer and lead to potential crashes or undefined behaviour if the pointer retrieval fails. Properly handle the error by unmapping DMA buffer, freeing the skb and returning early to prevent further processing wi...
```diff diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c index 0d8a05fe541a..ec6d47dc984a 100644 --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c @@ -1168,6 +1168,15 @@ static void axienet_dm...
9524f95c4042545ee8fc3191b9b89c61a1aca6fb
Analyze and fix the following issue in the Linux kernel code: clk: qcom: Select the intended config in QCS_DISPCC_615
Problem Details: Commit 9b47105f5434 ("clk: qcom: dispcc-qcs615: Add QCS615 display clock controller driver") adds the config QCS_DISPCC_615, which selects the non-existing config QCM_GCC_615. Probably, this is just a three-letter abbreviation mix-up here, though. There is a config named QCS_GCC_615, and the related co...
```diff diff --git a/drivers/clk/qcom/Kconfig b/drivers/clk/qcom/Kconfig index 1dbb254de8be..580a64754f1d 100644 --- a/drivers/clk/qcom/Kconfig +++ b/drivers/clk/qcom/Kconfig @@ -531,7 +531,7 @@ config QCM_DISPCC_2290 config QCS_DISPCC_615 tristate "QCS615 Display Clock Controller" - select QCM_GCC_615 + select QC...
1e50f5c9965252ed6657b8692cd7366784d60616
Analyze and fix the following issue in the Linux kernel code: clk: qcom: common: Fix NULL vs IS_ERR() check in qcom_cc_icc_register()
Problem Details: The devm_clk_hw_get_clk() function doesn't return NULL, it returns error pointers. Update the checking to match. Fixes: 8737ec830ee3 ("clk: qcom: common: Add interconnect clocks support") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Imran Shaik <imran.shaik@oss.qualcomm.com> R...
```diff diff --git a/drivers/clk/qcom/common.c b/drivers/clk/qcom/common.c index 37c3008e6c1b..121591886774 100644 --- a/drivers/clk/qcom/common.c +++ b/drivers/clk/qcom/common.c @@ -277,8 +277,8 @@ static int qcom_cc_icc_register(struct device *dev, icd[i].slave_id = desc->icc_hws[i].slave_id; hws = &desc->clks[...
8ece3173f87df03935906d0c612c2aeda9db92ca
Analyze and fix the following issue in the Linux kernel code: firmware: meson_sm: fix device leak at probe
Problem Details: Make sure to drop the reference to the secure monitor device taken by of_find_device_by_node() when looking up its driver data on behalf of other drivers (e.g. during probe). Note that holding a reference to the platform device does not prevent its driver data from going away so there is no point in k...
```diff diff --git a/drivers/firmware/meson/meson_sm.c b/drivers/firmware/meson/meson_sm.c index f25a9746249b..3ab67aaa9e5d 100644 --- a/drivers/firmware/meson/meson_sm.c +++ b/drivers/firmware/meson/meson_sm.c @@ -232,11 +232,16 @@ EXPORT_SYMBOL(meson_sm_call_write); struct meson_sm_firmware *meson_sm_get(struct devi...
79d15f23f232f90bfd8823239fd57b964d053548
Analyze and fix the following issue in the Linux kernel code: gpio: nomadik: wrap a local variable in a necessary ifdef
Problem Details: The 'desc' local variable in nmk_gpio_dbg_show_one() is now only used with CONFIG_PINCTRL_NOMADIK enabled so wrap its declaration with an appropriate ifdef. Fixes: ddeb66d2cb10 ("gpio: nomadik: don't print out global GPIO numbers in debugfs callbacks") Reported-by: kernel test robot <lkp@intel.com> Cl...
```diff diff --git a/drivers/gpio/gpio-nomadik.c b/drivers/gpio/gpio-nomadik.c index fde4b416faa8..97c5cd33279d 100644 --- a/drivers/gpio/gpio-nomadik.c +++ b/drivers/gpio/gpio-nomadik.c @@ -400,7 +400,9 @@ void nmk_gpio_dbg_show_one(struct seq_file *s, struct pinctrl_dev *pctldev, struct gpio_chip *chip, unsign...
8aefd2724451dedea1368d3915ab2dd5ecebc3cb
Analyze and fix the following issue in the Linux kernel code: riscv: sophgo: dts: sg2044: Change msi irq type to IRQ_TYPE_EDGE_RISING
Problem Details: Fix msi irq type to be the correct type, although this field is not used yet. Signed-off-by: Chen Wang <unicorn_wang@outlook.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Inochi Amaoto <inochiama@gmail.com> # Sophgo SRD3-10 Link: https://lore.kernel.org/all/c38b9b1682af978473705b...
```diff diff --git a/arch/riscv/boot/dts/sophgo/sg2044.dtsi b/arch/riscv/boot/dts/sophgo/sg2044.dtsi index 6ec955744b0c..320c4d1d08e6 100644 --- a/arch/riscv/boot/dts/sophgo/sg2044.dtsi +++ b/arch/riscv/boot/dts/sophgo/sg2044.dtsi @@ -214,7 +214,7 @@ reg-names = "clr", "doorbell"; #msi-cells = <0>; msi-cont...
a4bd4c330d5deaaa54db3a2ca4d2dd402d3a7248
Analyze and fix the following issue in the Linux kernel code: riscv: sophgo: dts: sg2042: Change msi irq type to IRQ_TYPE_EDGE_RISING
Problem Details: Fix msi irq type to be the correct type, although this field is not used yet. Signed-off-by: Chen Wang <unicorn_wang@outlook.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/831c1b650c575380d56ef3e2faed9bee278c9006.1756953919.git.unicorn_wang@outlook.com
```diff diff --git a/arch/riscv/boot/dts/sophgo/sg2042.dtsi b/arch/riscv/boot/dts/sophgo/sg2042.dtsi index b3e4d3c18fdc..6430c6e25c00 100644 --- a/arch/riscv/boot/dts/sophgo/sg2042.dtsi +++ b/arch/riscv/boot/dts/sophgo/sg2042.dtsi @@ -190,7 +190,7 @@ reg-names = "clr", "doorbell"; msi-controller; #msi-cells...
2ef3886ce626dcdab0cbc452dbbebc19f57133d8
Analyze and fix the following issue in the Linux kernel code: irqchip/gic-v2m: Handle Multiple MSI base IRQ Alignment
Problem Details: The PCI Local Bus Specification 3.0 (section 6.8.1.6) allows modifying the low-order bits of the MSI Message DATA register to encode nr_irqs interrupt numbers in the log2(nr_irqs) bits for the domain. The problem arises if the base vector (GICV2m base spi) is not aligned with nr_irqs; in this case, th...
```diff diff --git a/drivers/irqchip/irq-gic-v2m.c b/drivers/irqchip/irq-gic-v2m.c index 24ef5af569fe..8a3410c2b7b5 100644 --- a/drivers/irqchip/irq-gic-v2m.c +++ b/drivers/irqchip/irq-gic-v2m.c @@ -153,14 +153,19 @@ static int gicv2m_irq_domain_alloc(struct irq_domain *domain, unsigned int virq, { msi_alloc_info_t ...
638ca7601f41a3f8368811f3185b06e2547b7a0f
Analyze and fix the following issue in the Linux kernel code: ASoC: cs42l43: Rename system suspend callback and fix debug print
Problem Details: There is some confusion around cs42l43_codec_runtime_force_suspend(). This function is the system suspend callback, however the name and the debug print both use the words runtime. Rename the function to the simpler cs42l43_codec_suspend() and correct the debug print. Signed-off-by: Charles Keepax <ck...
```diff diff --git a/sound/soc/codecs/cs42l43.c b/sound/soc/codecs/cs42l43.c index b0c27d696c58..4d1779941581 100644 --- a/sound/soc/codecs/cs42l43.c +++ b/sound/soc/codecs/cs42l43.c @@ -2386,11 +2386,11 @@ static int cs42l43_codec_runtime_resume(struct device *dev) return 0; } -static int cs42l43_codec_runtime_fo...
16c912ec34edc4d7daecde58e40d480858830a12
Analyze and fix the following issue in the Linux kernel code: ASoC: SDCA: Fix return value in detected_mode_handler()
Problem Details: The detected mode IRQ handler should return an irqreturn_t not a regular error code. Correct the return value in detected_mode_handler(). Fixes: b9ab3b618241 ("ASoC: SDCA: Add some initial IRQ handlers") Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Message-ID: <20250820163717.1095846-...
```diff diff --git a/sound/soc/sdca/sdca_interrupts.c b/sound/soc/sdca/sdca_interrupts.c index 8018773ee426..79bf3042f57d 100644 --- a/sound/soc/sdca/sdca_interrupts.c +++ b/sound/soc/sdca/sdca_interrupts.c @@ -155,7 +155,7 @@ static irqreturn_t detected_mode_handler(int irq, void *data) SDCA_CTL_SELECTED_MO...
f81e63047600d023cbfda372b6de8f2821ff6839
Analyze and fix the following issue in the Linux kernel code: ASoC: SDCA: Fix return value in sdca_regmap_mbq_size()
Problem Details: The MBQ size function returns an integer representing the size of a Control. Currently if the Control is not found the function will return false which makes little sense. Correct this typo to return -EINVAL. Fixes: e3f7caf74b79 ("ASoC: SDCA: Add generic regmap SDCA helpers") Signed-off-by: Charles Ke...
```diff diff --git a/sound/soc/sdca/sdca_regmap.c b/sound/soc/sdca/sdca_regmap.c index 5cb3048ea8cf..72f893e00ff5 100644 --- a/sound/soc/sdca/sdca_regmap.c +++ b/sound/soc/sdca/sdca_regmap.c @@ -196,7 +196,7 @@ int sdca_regmap_mbq_size(struct sdca_function_data *function, unsigned int reg) control = function_find_c...
68f27f7c7708183e7873c585ded2f1b057ac5b97
Analyze and fix the following issue in the Linux kernel code: ASoC: qcom: q6apm-lpass-dais: Fix NULL pointer dereference if source graph failed
Problem Details: If earlier opening of source graph fails (e.g. ADSP rejects due to incorrect audioreach topology), the graph is closed and "dai_data->graph[dai->id]" is assigned NULL. Preparing the DAI for sink graph continues though and next call to q6apm_lpass_dai_prepare() receives dai_data->graph[dai->id]=NULL le...
```diff diff --git a/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c b/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c index a0d90462fd6a..20974f10406b 100644 --- a/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c +++ b/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c @@ -213,8 +213,10 @@ static int q6apm_lpass_dai_prepare(struct snd_pcm_substream *sub...
e54d34e4b309787fc0d4202a638143490c2fe319
Analyze and fix the following issue in the Linux kernel code: drm/i915/hdcp: use generic poll_timeout_us() instead of wait_for()
Problem Details: Prefer generic poll helpers over i915 custom helpers. The functional change is losing the exponentially growing sleep of wait_for(), which used to be 10, 20, 40, ..., 640, and 1280 us. Use an arbitrary constant 100 us sleep instead. The timeout remains at 1 ms. While at it, use the last failing valu...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c b/drivers/gpu/drm/i915/display/intel_hdcp.c index 7af3dffa1eb0..910e34bd73a9 100644 --- a/drivers/gpu/drm/i915/display/intel_hdcp.c +++ b/drivers/gpu/drm/i915/display/intel_hdcp.c @@ -817,6 +817,7 @@ static int intel_hdcp_auth(struct intel_connector *connec...
a85ead6d7f74438bc779927fe7b78b0c86addb6b
Analyze and fix the following issue in the Linux kernel code: drm/xe/debugfs: Move sa_info from gt to tile directory
Problem Details: Our drm-based suballocator is implemented per-tile so it is better to show its debug information also per-tile debugfs directory, not under per-gt directory as it is done today. To allow adding more per-tile attributes, prepare necessary helper functions, like we already did for per-gt or per-uc attri...
```diff diff --git a/drivers/gpu/drm/xe/Makefile b/drivers/gpu/drm/xe/Makefile index 987e4fe10538..95c0f0a9b403 100644 --- a/drivers/gpu/drm/xe/Makefile +++ b/drivers/gpu/drm/xe/Makefile @@ -325,6 +325,7 @@ ifeq ($(CONFIG_DEBUG_FS),y) xe_gt_stats.o \ xe_guc_debugfs.o \ xe_huc_debugfs.o \ + xe_tile_debugfs.o \...
e53f8b12a21c2974b66fa8c706090182da06fff3
Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: Fix 6 GHz Band capabilities element advertisement in lower bands
Problem Details: Currently, when adding the 6 GHz Band Capabilities element, the channel list of the wiphy is checked to determine if 6 GHz is supported for a given virtual interface. However, in a multi-radio wiphy (e.g., one that has both lower bands and 6 GHz combined), the wiphy advertises support for all bands. As...
```diff diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index a4a715f6f1c3..f37068a533f4 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c @@ -624,6 +624,9 @@ int mesh_add_he_6ghz_cap_ie(struct ieee80211_sub_if_data *sdata, if (!sband) return -EINVAL; + if (sband->band != NL80211_BAND_6GHZ) + re...
7c0c01a216e6d9e1d169c0f6f3b5522e6da708ed
Analyze and fix the following issue in the Linux kernel code: vdso/datastore: Gate time data behind CONFIG_GENERIC_GETTIMEOFDAY
Problem Details: When the generic vDSO does not provide time functions, as for example on riscv32, then the time data store is not necessary. Avoid allocating these time data pages when not used. Fixes: df7fcbefa710 ("vdso: Add generic time data storage") Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix....
```diff diff --git a/lib/vdso/datastore.c b/lib/vdso/datastore.c index 3693c6caf2c4..a565c30c71a0 100644 --- a/lib/vdso/datastore.c +++ b/lib/vdso/datastore.c @@ -11,14 +11,14 @@ /* * The vDSO data page. */ -#ifdef CONFIG_HAVE_GENERIC_VDSO +#ifdef CONFIG_GENERIC_GETTIMEOFDAY static union { struct vdso_time_data...
36b75dcb1e25739a3a0975699208c98f4b55d012
Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: consider links for validating SCAN_FLAG_AP in scan request during MLO
Problem Details: Commit 78a7a126dc5b ("wifi: mac80211: validate SCAN_FLAG_AP in scan request during MLO") introduced a check that rejects scan requests if any link is already beaconing. This works fine when all links share the same radio, but breaks down in multi-radio setups. Consider a scenario where a 2.4 GHz link ...
```diff diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index fca93cd36bd3..b26f61f13605 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -3007,6 +3007,9 @@ static int ieee80211_scan(struct wiphy *wiphy, struct cfg80211_scan_request *req) { struct ieee80211_sub_if_data *sdata; + struct ieee8021...
5f9d5fd8e08968e66d0212f782fc24d76e52800f
Analyze and fix the following issue in the Linux kernel code: wifi: cfg80211: fix return value in cfg80211_get_radio_idx_by_chan()
Problem Details: If a valid radio index is not found, the function returns -ENOENT. If the channel argument itself is invalid, it returns -EINVAL. However, since the caller only checks for < 0, the distinction between these error codes is not utilized much. Also, handling these two distinct error codes throughout the c...
```diff diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 406626ff6cc8..cb1c36be2749 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -9548,7 +9548,7 @@ int cfg80211_iter_combinations(struct wiphy *wiphy, * @wiphy: the wiphy * @chan: channel for which the supported radio index is...
8a47d940cf81cf14de48dc80846d29295babffbf
Analyze and fix the following issue in the Linux kernel code: eth: fbnic: split fbnic_enable()
Problem Details: Factor out handling a single nv from fbnic_enable() to make it reusable for queue ops. Use a __ prefix for the factored out code. The real fbnic_nv_enable() which will include fbnic_wrfl() will be added with the qops, to avoid unused function warnings. Signed-off-by: Jakub Kicinski <kuba@kernel.org> L...
```diff diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c b/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c index 8384e73b4492..38dd1afb7005 100644 --- a/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c +++ b/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c @@ -2584,33 +2584,36 @@ static void fbnic_enable_rcq(struct fbnic...
cbfc047429ee8a3c726ca44fcc63bd85faa250a2
Analyze and fix the following issue in the Linux kernel code: eth: fbnic: split fbnic_disable()
Problem Details: Factor out handling a single nv from fbnic_disable() to make it reusable for queue ops. Use a __ prefix for the factored out code. The real fbnic_nv_disable() which will include fbnic_wrfl() will be added with the qops, to avoid unused function warnings. Signed-off-by: Jakub Kicinski <kuba@kernel.org>...
```diff diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c b/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c index dc0735b20739..7d6bf35acfd4 100644 --- a/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c +++ b/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c @@ -2180,31 +2180,35 @@ void fbnic_napi_disable(struct fbnic_net ...
bbcc6d16dea4b5c878d56a8d25daf996c6b8a1d4
Analyze and fix the following issue in the Linux kernel code: media: platform: mtk-mdp3: Add missing MT8188 compatible to comp_dt_ids
Problem Details: Commit 4a81656c8eaa ("arm64: dts: mediatek: mt8188: Address binding warnings for MDP3 nodes") caused a regression on the MDP functionality when it removed the MT8195 compatibles from the MDP3 nodes, since the MT8188 compatible was not yet listed as a possible MDP component compatible in mdp_comp_dt_ids...
```diff diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-comp.c b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-comp.c index 683c066ed975..7fcb2fbdd64e 100644 --- a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-comp.c +++ b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-comp.c @@ -1530,6 +1530,9 @@ static cons...
f55cd3798af82e6a07424c84f797938c18216463
Analyze and fix the following issue in the Linux kernel code: media: adv7180: Power down decoder when configuring the device
Problem Details: Some variants of the chip (ADV7180) have it's decoder powered up after reset, while others (ADV7280, ADV7281, ADV7282, ADV7283) have it powered down. This is tracked by the feature flag ADV7180_FLAG_RESET_POWERED. At probe this flag is used to initialize the state variable powered which keeps track of...
```diff diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c index 8409ee9acc4f..bb94b9a7b3c7 100644 --- a/drivers/media/i2c/adv7180.c +++ b/drivers/media/i2c/adv7180.c @@ -214,7 +214,6 @@ struct adv7180_state { struct gpio_desc *pwdn_gpio; struct gpio_desc *rst_gpio; v4l2_std_id curr_norm; - b...
031f2bf0323e7b7408ec968fa90490ab7a11889b
Analyze and fix the following issue in the Linux kernel code: media: adv7180: Move adv7180_set_power() and init_device()
Problem Details: Move the two functions adv7180_set_power() and init_device() earlier in the file so they in future changes can be used from .querystd and .s_stream as the driver is reworked to drop the usage of .s_power. While at it fix two style issues in init_device() that checkpatch complains about. - Two cases...
```diff diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c index 5d90b8ab9b6d..ef63b0ee9b8d 100644 --- a/drivers/media/i2c/adv7180.c +++ b/drivers/media/i2c/adv7180.c @@ -274,6 +274,38 @@ static int adv7180_vpp_write(struct adv7180_state *state, unsigned int reg, return i2c_smbus_write_byte_data(s...
0a228624bcc00af41f281a2a84c928595a74c17d
Analyze and fix the following issue in the Linux kernel code: net: atm: fix memory leak in atm_register_sysfs when device_register fail
Problem Details: When device_register() return error in atm_register_sysfs(), which can be triggered by kzalloc fail in device_private_init() or other reasons, kmemleak reports the following memory leaks: unreferenced object 0xffff88810182fb80 (size 8): comm "insmod", pid 504, jiffies 4294852464 hex dump (first 8 ...
```diff diff --git a/net/atm/resources.c b/net/atm/resources.c index b19d851e1f44..7c6fdedbcf4e 100644 --- a/net/atm/resources.c +++ b/net/atm/resources.c @@ -112,7 +112,9 @@ struct atm_dev *atm_dev_register(const char *type, struct device *parent, if (atm_proc_dev_register(dev) < 0) { pr_err("atm_proc_dev_regis...
2a1eea8fd601db4c52f0d14f8871663b7b052c91
Analyze and fix the following issue in the Linux kernel code: drm/sysfb: Remove double assignment to pointer crtc_state
Problem Details: The declaration of pointer crtc_state includes an assignment to crtc_state. The double assignment of crtc_state is redundant and can be removed. Fixes: 061963cd9e5b ("drm/sysfb: Blit to CRTC destination format") Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Reviewed-by: Thomas Zimmermann <tzi...
```diff diff --git a/drivers/gpu/drm/sysfb/drm_sysfb_modeset.c b/drivers/gpu/drm/sysfb/drm_sysfb_modeset.c index 963c380fea64..ddb4a7523ee6 100644 --- a/drivers/gpu/drm/sysfb/drm_sysfb_modeset.c +++ b/drivers/gpu/drm/sysfb/drm_sysfb_modeset.c @@ -238,8 +238,7 @@ void drm_sysfb_plane_helper_atomic_update(struct drm_plan...
4039ce7ef40474d5ba46f414c50cc7020b9cf8ae
Analyze and fix the following issue in the Linux kernel code: netfilter: nf_tables: Introduce NFTA_DEVICE_PREFIX
Problem Details: This new attribute is supposed to be used instead of NFTA_DEVICE_NAME for simple wildcard interface specs. It holds a NUL-terminated string representing an interface name prefix to match on. While kernel code to distinguish full names from prefixes in NFTA_DEVICE_NAME is simpler than this solution, re...
```diff diff --git a/include/uapi/linux/netfilter/nf_tables.h b/include/uapi/linux/netfilter/nf_tables.h index 2beb30be2c5f..8e0eb832bc01 100644 --- a/include/uapi/linux/netfilter/nf_tables.h +++ b/include/uapi/linux/netfilter/nf_tables.h @@ -1784,10 +1784,12 @@ enum nft_synproxy_attributes { * enum nft_device_attrib...
661a4f307fe0f80c1d544e09476ccba9037e8e65
Analyze and fix the following issue in the Linux kernel code: selftests: netfilter: fix udpclash tool hang
Problem Details: Yi Chen reports that 'udpclash' loops forever depending on compiler (and optimization level used); while (x == 1) gets optimized into for (;;). Add volatile qualifier to avoid that. While at it, also run it under timeout(1) and fix the resize script to not ignore the timeout passed as second paramete...
```diff diff --git a/tools/testing/selftests/net/netfilter/conntrack_clash.sh b/tools/testing/selftests/net/netfilter/conntrack_clash.sh index 606a43a60f73..7fc6c5dbd551 100755 --- a/tools/testing/selftests/net/netfilter/conntrack_clash.sh +++ b/tools/testing/selftests/net/netfilter/conntrack_clash.sh @@ -99,7 +99,7 @@...
a08b4dcad9fae495bcd88b91fb3410abf77d268e
Analyze and fix the following issue in the Linux kernel code: tools/sched_ext: Add compat helper for scx_bpf_cpu_curr()
Problem Details: Introduce a compatibility helper that allows BPF schedulers to use scx_bpf_cpu_curr() on older kernels. Fixes: 20b158094a1ad ("sched_ext: Introduce scx_bpf_cpu_curr()") Cc: Christian Loehle <christian.loehle@arm.com> Signed-off-by: Andrea Righi <arighi@nvidia.com> Signed-off-by: Tejun Heo <tj@kernel.o...
```diff diff --git a/tools/sched_ext/include/scx/common.bpf.h b/tools/sched_ext/include/scx/common.bpf.h index 342c7c48df5a..06e2551033cb 100644 --- a/tools/sched_ext/include/scx/common.bpf.h +++ b/tools/sched_ext/include/scx/common.bpf.h @@ -104,7 +104,7 @@ bool scx_bpf_task_running(const struct task_struct *p) __ksym...
fece859855497d444b5efef23d022ab788f14303
Analyze and fix the following issue in the Linux kernel code: drm/xe/vm: Fix error handling in xe_vm_query_vmas_attrs_ioctl()
Problem Details: copy_to_user() returns the number of bytes not copied on failure, not a negative error code. Update the logic to return -EFAULT instead of the number of bytes to correctly signal the error. Fixes: 418807860e94 ("drm/xe/uapi: Add UAPI for querying VMA count and memory attributes") Cc: Matthew Brost <ma...
```diff diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c index 3ff3c67aa79d..f55f96bb240a 100644 --- a/drivers/gpu/drm/xe/xe_vm.c +++ b/drivers/gpu/drm/xe/xe_vm.c @@ -2288,6 +2288,8 @@ int xe_vm_query_vmas_attrs_ioctl(struct drm_device *dev, void *data, struct drm_ err = copy_to_user(attrs_user,...
294912f93d0fd4d537b7605d2e5fa6f735794c75
Analyze and fix the following issue in the Linux kernel code: drm/xe: Fix indentation in xe_zap_ptes_in_madvise_range
Problem Details: Fix misleading indentation around WRITE_ONCE in pte zap loop. No functional change intended. Fixes: ada7486c5668 ("drm/xe: Implement madvise ioctl for xe") Cc: Matthew Brost <matthew.brost@intel.com> Cc: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Tejas Upadhyay <tejas.upadhyay@intel.com> Li...
```diff diff --git a/drivers/gpu/drm/xe/xe_vm_madvise.c b/drivers/gpu/drm/xe/xe_vm_madvise.c index 09c5783ee523..732577dfe519 100644 --- a/drivers/gpu/drm/xe/xe_vm_madvise.c +++ b/drivers/gpu/drm/xe/xe_vm_madvise.c @@ -201,12 +201,12 @@ static u8 xe_zap_ptes_in_madvise_range(struct xe_vm *vm, u64 start, u64 end) i...
3be306cccdccede13e3cefd0c14e430cc2b7c9c7
Analyze and fix the following issue in the Linux kernel code: mm/memory-failure: fix redundant updates for already poisoned pages
Problem Details: Duplicate memory errors can be reported by multiple sources. Passing an already poisoned page to action_result() causes issues: * The amount of hardware corrupted memory is incorrectly updated. * Per NUMA node MF stats are incorrectly updated. * Redundant "already poisoned" messages are printed. Avo...
```diff diff --git a/mm/memory-failure.c b/mm/memory-failure.c index fc30ca4804bf..10b3c281c2ae 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -956,7 +956,7 @@ static const char * const action_page_types[] = { [MF_MSG_BUDDY] = "free buddy page", [MF_MSG_DAX] = "dax page", [MF_MSG_UNSPLIT_THP] ...
e67f0bd05519012eaabaae68618ffc4ed30ab680
Analyze and fix the following issue in the Linux kernel code: s390: kexec: initialize kexec_buf struct
Problem Details: The kexec_buf structure was previously declared without initialization. commit bf454ec31add ("kexec_file: allow to place kexec_buf randomly") added a field that is always read but not consistently populated by all architectures. This un-initialized field will contain garbage. This is also triggering a...
```diff diff --git a/arch/s390/kernel/kexec_elf.c b/arch/s390/kernel/kexec_elf.c index 4d364de43799..143e34a4eca5 100644 --- a/arch/s390/kernel/kexec_elf.c +++ b/arch/s390/kernel/kexec_elf.c @@ -16,7 +16,7 @@ static int kexec_file_add_kernel_elf(struct kimage *image, struct s390_load_data *data) { - struct ...
8afbd0045922b8146acf1a78ae818693e0468dbd
Analyze and fix the following issue in the Linux kernel code: riscv: kexec: initialize kexec_buf struct
Problem Details: The kexec_buf structure was previously declared without initialization. commit bf454ec31add ("kexec_file: allow to place kexec_buf randomly") added a field that is always read but not consistently populated by all architectures. This un-initialized field will contain garbage. This is also triggering a...
```diff diff --git a/arch/riscv/kernel/kexec_elf.c b/arch/riscv/kernel/kexec_elf.c index 56444c7bd34e..531d348db84d 100644 --- a/arch/riscv/kernel/kexec_elf.c +++ b/arch/riscv/kernel/kexec_elf.c @@ -28,7 +28,7 @@ static int riscv_kexec_elf_load(struct kimage *image, struct elfhdr *ehdr, int i; int ret = 0; size_t...
04d3cd43700a2d0fe4bfb1012a8ec7f2e34a3507
Analyze and fix the following issue in the Linux kernel code: arm64: kexec: initialize kexec_buf struct in load_other_segments()
Problem Details: Patch series "kexec: Fix invalid field access". The kexec_buf structure was previously declared without initialization. commit bf454ec31add ("kexec_file: allow to place kexec_buf randomly") added a field that is always read but not consistently populated by all architectures. This un-initialized fie...
```diff diff --git a/arch/arm64/kernel/machine_kexec_file.c b/arch/arm64/kernel/machine_kexec_file.c index af1ca875c52c..410060ebd86d 100644 --- a/arch/arm64/kernel/machine_kexec_file.c +++ b/arch/arm64/kernel/machine_kexec_file.c @@ -94,7 +94,7 @@ int load_other_segments(struct kimage *image, char *initrd, unsigne...
e6b543ca9806d7bced863f43020e016ee996c057
Analyze and fix the following issue in the Linux kernel code: mm/damon/reclaim: avoid divide-by-zero in damon_reclaim_apply_parameters()
Problem Details: When creating a new scheme of DAMON_RECLAIM, the calculation of 'min_age_region' uses 'aggr_interval' as the divisor, which may lead to division-by-zero errors. Fix it by directly returning -EINVAL when such a case occurs. Link: https://lkml.kernel.org/r/20250827115858.1186261-3-yanquanmin1@huawei.co...
```diff diff --git a/mm/damon/reclaim.c b/mm/damon/reclaim.c index 3c71b4596676..fb7c982a0018 100644 --- a/mm/damon/reclaim.c +++ b/mm/damon/reclaim.c @@ -194,6 +194,11 @@ static int damon_reclaim_apply_parameters(void) if (err) return err; + if (!damon_reclaim_mon_attrs.aggr_interval) { + err = -EINVAL; + got...
711f19dfd783ffb37ca4324388b9c4cb87e71363
Analyze and fix the following issue in the Linux kernel code: mm/damon/lru_sort: avoid divide-by-zero in damon_lru_sort_apply_parameters()
Problem Details: Patch series "mm/damon: avoid divide-by-zero in DAMON module's parameters application". DAMON's RECLAIM and LRU_SORT modules perform no validation on user-configured parameters during application, which may lead to division-by-zero errors. Avoid the divide-by-zero by adding validation checks when DAM...
```diff diff --git a/mm/damon/lru_sort.c b/mm/damon/lru_sort.c index 151a9de5ad8b..b5a5ed16a7a5 100644 --- a/mm/damon/lru_sort.c +++ b/mm/damon/lru_sort.c @@ -198,6 +198,11 @@ static int damon_lru_sort_apply_parameters(void) if (err) return err; + if (!damon_lru_sort_mon_attrs.sample_interval) { + err = -EINVAL...
ce652aac9c90a96c6536681d17518efb1f660fb8
Analyze and fix the following issue in the Linux kernel code: mm/damon/core: set quota->charged_from to jiffies at first charge window
Problem Details: Kernel initializes the "jiffies" timer as 5 minutes below zero, as shown in include/linux/jiffies.h /* * Have the 32 bit jiffies value wrap 5 minutes after boot * so jiffies wrap bugs show up earlier. */ #define INITIAL_JIFFIES ((unsigned long)(unsigned int) (-300*HZ)) And jiffies comparison hel...
```diff diff --git a/mm/damon/core.c b/mm/damon/core.c index 106ee8b0f2d5..c2e0b469fd43 100644 --- a/mm/damon/core.c +++ b/mm/damon/core.c @@ -2111,6 +2111,10 @@ static void damos_adjust_quota(struct damon_ctx *c, struct damos *s) if (!quota->ms && !quota->sz && list_empty(&quota->goals)) return; + /* First char...
21cc2b5c5062a256ae9064442d37ebbc23f5aef7
Analyze and fix the following issue in the Linux kernel code: mm/hugetlb: add missing hugetlb_lock in __unmap_hugepage_range()
Problem Details: When restoring a reservation for an anonymous page, we need to check to freeing a surplus. However, __unmap_hugepage_range() causes data race because it reads h->surplus_huge_pages without the protection of hugetlb_lock. And adjust_reservation is a boolean variable that indicates whether reservations...
```diff diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 753f99b4c718..eed59cfb5d21 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -5851,7 +5851,7 @@ void __unmap_hugepage_range(struct mmu_gather *tlb, struct vm_area_struct *vma, spinlock_t *ptl; struct hstate *h = hstate_vma(vma); unsigned long sz = huge_page_siz...
669602b5b7386e4fa00fc67b045ca3fd816e685d
Analyze and fix the following issue in the Linux kernel code: init/main.c: fix boot time tracing crash
Problem Details: Steven Rostedt reported a crash with "ftrace=function" kernel command line: [ 0.159269] BUG: kernel NULL pointer dereference, address: 000000000000001c [ 0.160254] #PF: supervisor read access in kernel mode [ 0.160975] #PF: error_code(0x0000) - not-present page [ 0.161697] PGD 0 P4D 0 [ ...
```diff diff --git a/init/main.c b/init/main.c index 0ee0ee7b7c2c..5753e9539ae6 100644 --- a/init/main.c +++ b/init/main.c @@ -956,6 +956,7 @@ void start_kernel(void) sort_main_extable(); trap_init(); mm_core_init(); + maple_tree_init(); poking_init(); ftrace_init(); @@ -973,7 +974,6 @@ void start_kernel(vo...
397f6d14f9c370e4910e6885294c340f39dedbf5
Analyze and fix the following issue in the Linux kernel code: mm/memory_hotplug: fix hwpoisoned large folio handling in do_migrate_range()
Problem Details: In do_migrate_range(), the hwpoisoned folio may be large folio, which can't be handled by unmap_poisoned_folio(). I can reproduce this issue in qemu after adding delay in memory_failure() BUG: kernel NULL pointer dereference, address: 0000000000000000 Workqueue: kacpi_hotplug acpi_hotplug_work_fn RIP...
```diff diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 1f15af712bc3..74318c787715 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -1815,8 +1815,14 @@ static void do_migrate_range(unsigned long start_pfn, unsigned long end_pfn) pfn = folio_pfn(folio) + folio_nr_pages(folio) - 1; if (...
394bfac1c7f7b701c2c93834c5761b9c9ceeebcf
Analyze and fix the following issue in the Linux kernel code: mm/khugepaged: fix the address passed to notifier on testing young
Problem Details: Commit 8ee53820edfd ("thp: mmu_notifier_test_young") introduced mmu_notifier_test_young(), but we are passing the wrong address. In xxx_scan_pmd(), the actual iteration address is "_address" not "address". We seem to misuse the variable on the very beginning. Change it to the right one. [akpm@linux-...
```diff diff --git a/mm/khugepaged.c b/mm/khugepaged.c index 6b40bdfd224c..b486c1d19b2d 100644 --- a/mm/khugepaged.c +++ b/mm/khugepaged.c @@ -1417,8 +1417,8 @@ static int hpage_collapse_scan_pmd(struct mm_struct *mm, */ if (cc->is_khugepaged && (pte_young(pteval) || folio_test_young(folio) || - fol...
8156210d36a43e76372312c87eb5ea3dbb405a85
Analyze and fix the following issue in the Linux kernel code: ax25: properly unshare skbs in ax25_kiss_rcv()
Problem Details: Bernard Pidoux reported a regression apparently caused by commit c353e8983e0d ("net: introduce per netns packet chains"). skb->dev becomes NULL and we crash in __netif_receive_skb_core(). Before above commit, different kind of bugs or corruptions could happen without a major crash. But the root caus...
```diff diff --git a/net/ax25/ax25_in.c b/net/ax25/ax25_in.c index 1cac25aca637..f2d66af86359 100644 --- a/net/ax25/ax25_in.c +++ b/net/ax25/ax25_in.c @@ -433,6 +433,10 @@ free: int ax25_kiss_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *ptype, struct net_device *orig_dev) { + skb = skb_sh...
a125c8fb9ddbcb0602103a50727a476fd30dec01
Analyze and fix the following issue in the Linux kernel code: mctp: return -ENOPROTOOPT for unknown getsockopt options
Problem Details: In mctp_getsockopt(), unrecognized options currently return -EINVAL. In contrast, mctp_setsockopt() returns -ENOPROTOOPT for unknown options. Update mctp_getsockopt() to also return -ENOPROTOOPT for unknown options. This aligns the behavior of getsockopt() and setsockopt(), and matches the standard ke...
```diff diff --git a/net/mctp/af_mctp.c b/net/mctp/af_mctp.c index df4e8cf33899..685524800d70 100644 --- a/net/mctp/af_mctp.c +++ b/net/mctp/af_mctp.c @@ -425,7 +425,7 @@ static int mctp_getsockopt(struct socket *sock, int level, int optname, return 0; } - return -EINVAL; + return -ENOPROTOOPT; } /* helpers ...
cc282f73bc0cbdf3ee7af2f2d3a2ef4e6b19242d
Analyze and fix the following issue in the Linux kernel code: net/smc: Remove validation of reserved bits in CLC Decline message
Problem Details: Currently SMC code is validating the reserved bits while parsing the incoming CLC decline message & when this validation fails, its treated as a protocol error. As a result, the SMC connection is terminated instead of falling back to TCP. As per RFC7609[1] specs we shouldn't be validating the reserved ...
```diff diff --git a/net/smc/smc_clc.c b/net/smc/smc_clc.c index 5a4db151fe95..08be56dfb3f2 100644 --- a/net/smc/smc_clc.c +++ b/net/smc/smc_clc.c @@ -426,8 +426,6 @@ smc_clc_msg_decl_valid(struct smc_clc_msg_decline *dclc) { struct smc_clc_msg_hdr *hdr = &dclc->hdr; - if (hdr->typev1 != SMC_TYPE_R && hdr->typev1 ...
a51160f8da850a65afbf165f5bbac7ffb388bf74
Analyze and fix the following issue in the Linux kernel code: ipv4: Fix NULL vs error pointer check in inet_blackhole_dev_init()
Problem Details: The inetdev_init() function never returns NULL. Check for error pointers instead. Fixes: 22600596b675 ("ipv4: give an IPv4 dev to blackhole_netdev") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Simon Horman <horms@kernel.org> Reviewed-by: Eric Dumazet <edumazet@google.com> Lin...
```diff diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index c47d3828d4f6..942a887bf089 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c @@ -340,14 +340,13 @@ static void inetdev_destroy(struct in_device *in_dev) static int __init inet_blackhole_dev_init(void) { - int err = 0; + struct in_device *in_d...
9e3d71a92e561ccc77025689dab25d201fee7a3e
Analyze and fix the following issue in the Linux kernel code: net: thunder_bgx: decrement cleanup index before use
Problem Details: All paths in probe that call goto defer do so before assigning phydev and thus it makes sense to cleanup the prior index. It also fixes a bug where index 0 does not get cleaned up. Fixes: b7d3e3d3d21a ("net: thunderx: Don't leak phy device references on -EPROBE_DEFER condition.") Signed-off-by: Rosen ...
```diff diff --git a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c index 0f913db4814e..9efb60842ad1 100644 --- a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c +++ b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c @@ -1519,11 +1519,11 @@ defer: * for phy d...
9d28f94912589f04ab51fbccaef287d4f40e0d1f
Analyze and fix the following issue in the Linux kernel code: net: thunder_bgx: add a missing of_node_put
Problem Details: phy_np needs to get freed, just like the other child nodes. Fixes: 5fc7cf179449 ("net: thunderx: Cleanup PHY probing code.") Signed-off-by: Rosen Penev <rosenp@gmail.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20250901213018.47392-1-rosenp@gmail.com Signed-off-by: ...
```diff diff --git a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c index 21495b5dce25..0f913db4814e 100644 --- a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c +++ b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c @@ -1493,13 +1493,17 @@ static int bgx_init_o...
c9110e6f7237f4a314e2b87b75a8a158b9877a7b
Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Fix count write in testapp_xdp_metadata_copy()
Problem Details: Commit 4b302092553c ("selftests/xsk: Add tail adjustment tests and support check") added a new global to xsk_xdp_progs.c, but left out the access in the testapp_xdp_metadata_copy() function. Since bpf_map_update_elem() will write to the whole bss section, it gets truncated. Fix by writing to skel_rx->b...
```diff diff --git a/tools/testing/selftests/bpf/xskxceiver.c b/tools/testing/selftests/bpf/xskxceiver.c index a29de0713f19..352adc8df2d1 100644 --- a/tools/testing/selftests/bpf/xskxceiver.c +++ b/tools/testing/selftests/bpf/xskxceiver.c @@ -2276,25 +2276,13 @@ static int testapp_xdp_metadata_copy(struct test_spec *te...
2a912258c90e895363c0ffc0be8a47f112ab67b7
Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Upon failures, exit with code 1 in test_xsk.sh
Problem Details: Currently, even if some subtests fails, the end result will still yield "ok 1 selftests: bpf: test_xsk.sh". Fix it by exiting with 1 if there are any failures. Signed-off-by: Ricardo B. Marlière <rbm@suse.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: Magnus Karlsson <magnus.karlsso...
```diff diff --git a/tools/testing/selftests/bpf/test_xsk.sh b/tools/testing/selftests/bpf/test_xsk.sh index 65aafe0003db..62db060298a4 100755 --- a/tools/testing/selftests/bpf/test_xsk.sh +++ b/tools/testing/selftests/bpf/test_xsk.sh @@ -241,4 +241,6 @@ done if [ $failures -eq 0 ]; then echo "All tests suc...
3bc32fd9db47a20f38b0783364fdb2f2f1c97220
Analyze and fix the following issue in the Linux kernel code: net: phylink: move PHY interrupt request to non-fail path
Problem Details: The blamed commit added code which could return an error after we requested the PHY interrupt. When we return an error, the caller will call phy_detach() which fails to free the interrupt. Rearrange the code such that failing operations happen before the interrupt is requested, thereby allowing phy_de...
```diff diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c index f1b57e3fdf30..c7cb95aa8007 100644 --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c @@ -2141,9 +2141,6 @@ static int phylink_bringup_phy(struct phylink *pl, struct phy_device *phy, __ETHTOOL_LINK_MODE_MASK_NBITS, pl->s...
9be5c47908e669db4934ef9c129b28bbc879a8be
Analyze and fix the following issue in the Linux kernel code: dt-bindings: display/msm: expand to support MST
Problem Details: On a vast majority of Qualcomm chipsets DisplayPort controller can support several MST streams (up to 4x). To support MST these chipsets use up to 4 stream pixel clocks for the DisplayPort controller and several extra register regions. Expand corresponding region and clock bindings for these platforms ...
```diff diff --git a/Documentation/devicetree/bindings/display/msm/dp-controller.yaml b/Documentation/devicetree/bindings/display/msm/dp-controller.yaml index afe01332d66c..aeb4e4f36044 100644 --- a/Documentation/devicetree/bindings/display/msm/dp-controller.yaml +++ b/Documentation/devicetree/bindings/display/msm/dp-c...
2c97ee44d29e90e0e1687c15bca4f1aa8eff3d78
Analyze and fix the following issue in the Linux kernel code: dt-bindings: display/msm: qcom,x1e80100-mdss: correct DP addresses
Problem Details: Fix c&p error and correct example to use 32-bit addressing (as the rest of the example DT does) instead of 64-bit (as the platform does). It got unnoticed before since DP controller node wasn't validated against DT schema because of the missing compatible. Fixes: 81de267367d4 ("dt-bindings: display/m...
```diff diff --git a/Documentation/devicetree/bindings/display/msm/qcom,x1e80100-mdss.yaml b/Documentation/devicetree/bindings/display/msm/qcom,x1e80100-mdss.yaml index 3b01a0e47333..e35230a86437 100644 --- a/Documentation/devicetree/bindings/display/msm/qcom,x1e80100-mdss.yaml +++ b/Documentation/devicetree/bindings/d...
afc9e583c0b28f885ef6aa5ef6ea098204c263ed
Analyze and fix the following issue in the Linux kernel code: dt-bindings: display/msm: dp-controller: document DP on SM7150
Problem Details: The qcom,sm7150-dp compatible is documented in schema. Mark DisplayPort controller as compatible with SM8350. Fixes: 726eded12dd7 ("dt-bindings: display/msm: Add SM7150 MDSS") Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Acked-by: Rob Herring (Arm) <robh@kernel.org> Patchwork: h...
```diff diff --git a/Documentation/devicetree/bindings/display/msm/dp-controller.yaml b/Documentation/devicetree/bindings/display/msm/dp-controller.yaml index 0f814aa6f514..a18183f7ec21 100644 --- a/Documentation/devicetree/bindings/display/msm/dp-controller.yaml +++ b/Documentation/devicetree/bindings/display/msm/dp-c...
5484265fd685d752bb75dd8b34f617dd9991ba5c
Analyze and fix the following issue in the Linux kernel code: dt-bindings: display/msm: dp-controller: fix fallback for SM6350
Problem Details: Currently SM6350 uses qcom,sm8350-dp as a fallback compatible entry. This works, but adding DP MST support will reveal that this SoC is not fully compatible with SM8350 platform: the former one doesn't provide MST support, while the latter one will get it. DT schema for SM8350 is going to demand MST-re...
```diff diff --git a/Documentation/devicetree/bindings/display/msm/dp-controller.yaml b/Documentation/devicetree/bindings/display/msm/dp-controller.yaml index aed3bafa67e3..0f814aa6f514 100644 --- a/Documentation/devicetree/bindings/display/msm/dp-controller.yaml +++ b/Documentation/devicetree/bindings/display/msm/dp-c...
5d6b58c932ec451a5c41482790eb5b1ecf165a94
Analyze and fix the following issue in the Linux kernel code: net: lockless sock_i_ino()
Problem Details: Followup of commit c51da3f7a161 ("net: remove sock_i_uid()") A recent syzbot report was the trigger for this change. Over the years, we had many problems caused by the read_lock[_bh](&sk->sk_callback_lock) in sock_i_uid(). We could fix smc_diag_dump_proto() or make a more radical move: Instead of w...
```diff diff --git a/include/net/sock.h b/include/net/sock.h index c8a4b283df6f..fb13322a11fc 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -285,6 +285,7 @@ struct sk_filter; * @sk_ack_backlog: current listen backlog * @sk_max_ack_backlog: listen backlog set in listen() * @sk_uid: user id of owne...
ede965fd555ac2536cf651893a998dbfd8e57b86
Analyze and fix the following issue in the Linux kernel code: i2c: rtl9300: remove broken SMBus Quick operation support
Problem Details: Remove the SMBus Quick operation from this driver because it is not natively supported by the hardware and is wrongly implemented in the driver. The I2C controllers in Realtek RTL9300 and RTL9310 are SMBus-compliant but there doesn't seem to be native support for the SMBus Quick operation. It is not e...
```diff diff --git a/drivers/i2c/busses/i2c-rtl9300.c b/drivers/i2c/busses/i2c-rtl9300.c index 2b3e80aa1bdf..9e1f71fed0fe 100644 --- a/drivers/i2c/busses/i2c-rtl9300.c +++ b/drivers/i2c/busses/i2c-rtl9300.c @@ -225,15 +225,6 @@ static int rtl9300_i2c_smbus_xfer(struct i2c_adapter *adap, u16 addr, unsigned s } swi...
06418cb5a1a542a003fdb4ad8e76ea542d57cfba
Analyze and fix the following issue in the Linux kernel code: i2c: rtl9300: ensure data length is within supported range
Problem Details: Add an explicit check for the xfer length to 'rtl9300_i2c_config_xfer' to ensure the data length isn't within the supported range. In particular a data length of 0 is not supported by the hardware and causes unintended or destructive behaviour. This limitation becomes obvious when looking at the regis...
```diff diff --git a/drivers/i2c/busses/i2c-rtl9300.c b/drivers/i2c/busses/i2c-rtl9300.c index 1a63790f1957..2b3e80aa1bdf 100644 --- a/drivers/i2c/busses/i2c-rtl9300.c +++ b/drivers/i2c/busses/i2c-rtl9300.c @@ -99,6 +99,9 @@ static int rtl9300_i2c_config_xfer(struct rtl9300_i2c *i2c, struct rtl9300_i2c_c { u32 val, ...
cd6c956fbc13156bcbcca084b46a8380caebc2a8
Analyze and fix the following issue in the Linux kernel code: i2c: rtl9300: fix channel number bound check
Problem Details: Fix the current check for number of channels (child nodes in the device tree). Before, this was: if (device_get_child_node_count(dev) >= RTL9300_I2C_MUX_NCHAN) RTL9300_I2C_MUX_NCHAN gives the maximum number of channels so checking with '>=' isn't correct because it doesn't allow the last channel numb...
```diff diff --git a/drivers/i2c/busses/i2c-rtl9300.c b/drivers/i2c/busses/i2c-rtl9300.c index cfafe089102a..1a63790f1957 100644 --- a/drivers/i2c/busses/i2c-rtl9300.c +++ b/drivers/i2c/busses/i2c-rtl9300.c @@ -353,7 +353,7 @@ static int rtl9300_i2c_probe(struct platform_device *pdev) platform_set_drvdata(pdev, i2c...
b4ada0618eed0fbd1b1630f73deb048c592b06a1
Analyze and fix the following issue in the Linux kernel code: tools: ynl-gen: fix nested array counting
Problem Details: The blamed commit introduced the concept of split attribute counting, and later allocating an array to hold them, however TypeArrayNest wasn't updated to use the new counting variable. Abbreviated example from tools/net/ynl/generated/nl80211-user.c: nl80211_if_combination_attributes_parse(...): unsi...
```diff diff --git a/tools/net/ynl/pyynl/ynl_gen_c.py b/tools/net/ynl/pyynl/ynl_gen_c.py index ef032e17fec4..eb295756c3bf 100755 --- a/tools/net/ynl/pyynl/ynl_gen_c.py +++ b/tools/net/ynl/pyynl/ynl_gen_c.py @@ -830,7 +830,7 @@ class TypeArrayNest(Type): 'ynl_attr_for_each_nested(attr2, attr) {', ...
017bda80fd0ddd24ea8cf932c3bd970491e0abc1
Analyze and fix the following issue in the Linux kernel code: genetlink: fix typo in comment
Problem Details: In this context "not that ..." should properly be "note that ...". Signed-off-by: Asbjørn Sloth Tønnesen <ast@fiberby.net> Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20250902154640.759815-4-ast@fiberby.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
```diff diff --git a/include/net/genetlink.h b/include/net/genetlink.h index a03d56765832..7b84f2cef8b1 100644 --- a/include/net/genetlink.h +++ b/include/net/genetlink.h @@ -62,7 +62,7 @@ struct genl_info; * @small_ops: the small-struct operations supported by this family * @n_small_ops: number of small-struct ope...
929324913e0caabea91b50fa71e41d70b766f7dc
Analyze and fix the following issue in the Linux kernel code: net: Add rfs_needed() helper
Problem Details: Add a helper to check if RFS is needed or not. Allows to make the code a bit cleaner and the next patch to have MPTCP use this helper to decide whether or not to iterate over the subflows. tun_flow_update() was calling sock_rps_record_flow_hash() regardless of the state of rfs_needed. This was not rea...
```diff diff --git a/include/net/rps.h b/include/net/rps.h index 9917dce42ca4..f1794cd2e7fb 100644 --- a/include/net/rps.h +++ b/include/net/rps.h @@ -85,11 +85,8 @@ static inline void rps_record_sock_flow(struct rps_sock_flow_table *table, WRITE_ONCE(table->ents[index], val); } -#endif /* CONFIG_RPS */ - -static...
0059f3b82fe713481a1ccfe28ebe6a2489e77df3
Analyze and fix the following issue in the Linux kernel code: docs: admin-guide: Fix typo in nfsroot.rst
Problem Details: There is an obvious mistake in nfsroot.rst where pxelinux was wrongly written as pxeliunx. Fix it. Signed-off-by: Zenghui Yu <zenghui.yu@linux.dev> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20250827144738.43361-1-zenghui.yu@linux.dev
```diff diff --git a/Documentation/admin-guide/nfs/nfsroot.rst b/Documentation/admin-guide/nfs/nfsroot.rst index 135218f33394..06990309c6ff 100644 --- a/Documentation/admin-guide/nfs/nfsroot.rst +++ b/Documentation/admin-guide/nfs/nfsroot.rst @@ -342,7 +342,7 @@ They depend on various facilities being available: When...
3f65aa8ede2377c47c11f1c38b44226b8ca60477
Analyze and fix the following issue in the Linux kernel code: Documentation: dev-tools: Fix a typo in autofdo documentation
Problem Details: Use "cat /proc/cpuinfo" instead of "cat proc/cpuinfo". Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20250831151118.1274826-1-harshit.m.mogalapalli@oracle.com
```diff diff --git a/Documentation/dev-tools/autofdo.rst b/Documentation/dev-tools/autofdo.rst index 1f0a451e9ccd..bcf06e7d6ffa 100644 --- a/Documentation/dev-tools/autofdo.rst +++ b/Documentation/dev-tools/autofdo.rst @@ -131,11 +131,11 @@ Here is an example workflow for AutoFDO kernel: For Zen3:: - $ c...
a4c2ff6e507ebb47761865289772494e717d035a
Analyze and fix the following issue in the Linux kernel code: Documentation: Fix spelling mistakes
Problem Details: Corrected a few spelling mistakes to improve the readability. Signed-off-by: Ranganath V N <vnranganath.20@gmail.com> Acked-by: Rob Herring (Arm) <robh@kernel.org> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20250902...
```diff diff --git a/Documentation/devicetree/bindings/submitting-patches.rst b/Documentation/devicetree/bindings/submitting-patches.rst index 46d0b036c97e..191085b0d5e8 100644 --- a/Documentation/devicetree/bindings/submitting-patches.rst +++ b/Documentation/devicetree/bindings/submitting-patches.rst @@ -66,7 +66,7 @@...
59ffc9beeb8b332940d36f4b9803352b7f893f5a
Analyze and fix the following issue in the Linux kernel code: selinux: fix sel_read_bool() allocation and error handling
Problem Details: Switch sel_read_bool() from using get_zeroed_page() and free_page() to a stack-allocated buffer. This also fixes a memory leak in the error path when security_get_bool_value() returns an error. Reported-by: Matthew Wilcox <willy@infradead.org> Signed-off-by: Stephen Smalley <stephen.smalley.work@gmail...
```diff diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c index 9aa1d03ab612..232e087bce3e 100644 --- a/security/selinux/selinuxfs.c +++ b/security/selinux/selinuxfs.c @@ -1203,7 +1203,7 @@ static ssize_t sel_read_bool(struct file *filep, char __user *buf, size_t count, loff_t *ppos) { ...
b65988af71af62b81bbc6af0cbe05b18eaef4da5
Analyze and fix the following issue in the Linux kernel code: tracing: fix grammar error in debugging.rst
Problem Details: Signed-off-by: Ryan Chung <seokwoo.chung130@gmail.com> Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20250831101736.11519-3-seokwoo.chung130@gmail.com
```diff diff --git a/Documentation/trace/debugging.rst b/Documentation/trace/debugging.rst index d54bc500af80..4d88c346fc38 100644 --- a/Documentation/trace/debugging.rst +++ b/Documentation/trace/debugging.rst @@ -59,7 +59,7 @@ There is various methods of acquiring the state of the system when a kernel crash occurs. ...
d5067034725b1a0b2c785cea9cfce68776a94042
Analyze and fix the following issue in the Linux kernel code: Revert "drm/nouveau: Remove waitque for sched teardown"
Problem Details: This reverts: commit bead88002227 ("drm/nouveau: Remove waitque for sched teardown") commit 5f46f5c7af8c ("drm/nouveau: Add new callback for scheduler teardown") from the drm/sched teardown leak fix series: https://lore.kernel.org/dri-devel/20250710125412.128476-2-phasta@kernel.org/ The aforementio...
```diff diff --git a/drivers/gpu/drm/nouveau/nouveau_fence.c b/drivers/gpu/drm/nouveau/nouveau_fence.c index 9f345a008717..869d4335c0f4 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fence.c +++ b/drivers/gpu/drm/nouveau/nouveau_fence.c @@ -240,21 +240,6 @@ nouveau_fence_emit(struct nouveau_fence *fence) return ret; }...
2d503aafdf70357e279ffef42ae18474328cc223
Analyze and fix the following issue in the Linux kernel code: drivers: firmware: bcm47xx_sprom: fix spelling
Problem Details: Fix spelling in bcm47xx_sprom.c as follows, specififc --> specific Signed-off-by: Akhilesh Patil <akhilesh@ee.iitb.ac.in> Link: https://lore.kernel.org/r/aHt+Ey5AQ0dsCuB4@bhairav-test.ee.iitb.ac.in Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
```diff diff --git a/drivers/firmware/broadcom/bcm47xx_sprom.c b/drivers/firmware/broadcom/bcm47xx_sprom.c index 14fbcd11657c..fdcd3a07abcd 100644 --- a/drivers/firmware/broadcom/bcm47xx_sprom.c +++ b/drivers/firmware/broadcom/bcm47xx_sprom.c @@ -404,7 +404,7 @@ static void bcm47xx_sprom_fill_auto(struct ssb_sprom *spr...
4540f1d23e7f387880ce46d11b5cd3f27248bf8d
Analyze and fix the following issue in the Linux kernel code: audit: fix out-of-bounds read in audit_compare_dname_path()
Problem Details: When a watch on dir=/ is combined with an fsnotify event for a single-character name directly under / (e.g., creating /a), an out-of-bounds read can occur in audit_compare_dname_path(). The helper parent_len() returns 1 for "/". In audit_compare_dname_path(), when parentlen equals the full path length...
```diff diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c index e3f42018ed46..f7708fe2c457 100644 --- a/kernel/auditfilter.c +++ b/kernel/auditfilter.c @@ -1326,7 +1326,7 @@ int audit_compare_dname_path(const struct qstr *dname, const char *path, int par /* handle trailing slashes */ pathlen -= parentlen; ...
e1a8805e5d263453ad76a4f50ab3b1c18ea07560
Analyze and fix the following issue in the Linux kernel code: PCI: tegra: Fix devm_kcalloc() argument order for port->phys allocation
Problem Details: Fix incorrect argument order in devm_kcalloc() when allocating port->phys. The original call used sizeof(phy) as the number of elements and port->lanes as the element size, which is reversed. While this happens to produce the correct total allocation size with current pointer size and lane counts, the...
```diff diff --git a/drivers/pci/controller/pci-tegra.c b/drivers/pci/controller/pci-tegra.c index 467ddc701adc..bb88767a3797 100644 --- a/drivers/pci/controller/pci-tegra.c +++ b/drivers/pci/controller/pci-tegra.c @@ -1344,7 +1344,7 @@ static int tegra_pcie_port_get_phys(struct tegra_pcie_port *port) unsigned int i;...
467e00b30dfe75c4cfc2197ceef1fddca06adc25
Analyze and fix the following issue in the Linux kernel code: drm/amd/amdgpu: Fix missing error return on kzalloc failure
Problem Details: Currently the kzalloc failure check just sets reports the failure and sets the variable ret to -ENOMEM, which is not checked later for this specific error. Fix this by just returning -ENOMEM rather than setting ret. Fixes: 4fb930715468 ("drm/amd/amdgpu: remove redundant host to psp cmd buf allocations...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index 23484317a5fa..693357caa9a8 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c @@ -448,7 +448,7 @@ static int psp_sw_init(struct amdgpu_ip_block *ip_block) psp->c...
e117ff1129daa7d63536833f39285e50ad52379d
Analyze and fix the following issue in the Linux kernel code: cgroup/cpuset: Prevent NULL pointer access in free_tmpmasks()
Problem Details: Commit 5806b3d05165 ("cpuset: decouple tmpmasks and cpumasks freeing in cgroup") separates out the freeing of tmpmasks into a new free_tmpmask() helper but removes the NULL pointer check in the process. Unfortunately a NULL pointer can be passed to free_tmpmasks() in cpuset_handle_hotplug() if cpuset v...
```diff diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c index a78ccd11ce9b..c0c281a8860d 100644 --- a/kernel/cgroup/cpuset.c +++ b/kernel/cgroup/cpuset.c @@ -484,6 +484,9 @@ static inline int alloc_tmpmasks(struct tmpmasks *tmp) */ static inline void free_tmpmasks(struct tmpmasks *tmp) { + if (!tmp) + ...
666d2206f1ee8a4f21ffbec438381a524a62815b
Analyze and fix the following issue in the Linux kernel code: perf tests: Fix "PE file support" test build
Problem Details: filename__read_build_id() now takes a blocking/non-blocking argument. The original behavior of filename__read_build_id() was blocking so add block=true to fix the build. Fixes: 2c369d91d093 ("perf symbol: Add blocking argument to filename__read_build_id") Signed-off-by: James Clark <james.clark@linaro...
```diff diff --git a/tools/perf/tests/pe-file-parsing.c b/tools/perf/tests/pe-file-parsing.c index 30c7da79e109..8b31d1d05f90 100644 --- a/tools/perf/tests/pe-file-parsing.c +++ b/tools/perf/tests/pe-file-parsing.c @@ -37,7 +37,7 @@ static int run_dir(const char *d) size_t idx; scnprintf(filename, PATH_MAX, "%s/p...
217efb440933bf97a78ef328b211d8a39f4ff171
Analyze and fix the following issue in the Linux kernel code: ARM: dts: microchip: sama7d65: Force SDMMC Legacy mode
Problem Details: The SDMMC in this IP currently only supports legacy mode due to a hardware quirk, setting the flags to reflect the limitation. Fixes: deaa14ab6b06 ("ARM: dts: microchip: add support for sama7d65_curiosity board") Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com> Acked-by: Nicolas Ferre <nicolas.f...
```diff diff --git a/arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dts b/arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dts index 7eaf6ca233ec..d086437f5e6f 100644 --- a/arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dts +++ b/arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dts @@ -387,6 +387,8 @@ ...
62ba9a86eac78e21a13b71c36a006d8c99d87270
Analyze and fix the following issue in the Linux kernel code: ARM: dts: stm32: add Hardware debug port (HDP) on stm32mp15
Problem Details: Add the hdp devicetree node for stm32mp15 SoC family Keep the node disabled as HDP needs the pinctrl SoC configuration to be able to output its mux output signal outside of the SoC, on the SoC pad. This configuration is provided in the board dtsi file through 'pinctrl-*' properties as well as HDP mux ...
```diff diff --git a/arch/arm/boot/dts/st/stm32mp151.dtsi b/arch/arm/boot/dts/st/stm32mp151.dtsi index 0daa8ffe2ff5..b1b568dfd126 100644 --- a/arch/arm/boot/dts/st/stm32mp151.dtsi +++ b/arch/arm/boot/dts/st/stm32mp151.dtsi @@ -270,6 +270,13 @@ status = "disabled"; }; + hdp: pinctrl@5002a000 { + compatible =...
b3646b905272e14d8bf9173e14b79d4d625cb84d
Analyze and fix the following issue in the Linux kernel code: ARM: dts: stm32: add Hardware debug port (HDP) on stm32mp13
Problem Details: Add the hdp devicetree node for stm32mp13 SoC family. Keep the node disabled as HDP needs the pinctrl SoC configuration to be able to output its mux output signal outside of the SoC, on the SoC pad. This configuration is provided in the board dtsi file through 'pinctrl-*' properties as well as HDP mux...
```diff diff --git a/arch/arm/boot/dts/st/stm32mp131.dtsi b/arch/arm/boot/dts/st/stm32mp131.dtsi index ace9495b9b06..151ffd0bdef9 100644 --- a/arch/arm/boot/dts/st/stm32mp131.dtsi +++ b/arch/arm/boot/dts/st/stm32mp131.dtsi @@ -954,6 +954,13 @@ status = "disabled"; }; + hdp: pinctrl@5002a000 { + compatible =...
5ebf512f335053a42482ebff91e46c6dc156bf8c
Analyze and fix the following issue in the Linux kernel code: sched: Fix sched_numa_find_nth_cpu() if mask offline
Problem Details: sched_numa_find_nth_cpu() uses a bsearch to look for the 'closest' CPU in sched_domains_numa_masks and given cpus mask. However they might not intersect if all CPUs in the cpus mask are offline. bsearch will return NULL in that case, bail out instead of dereferencing a bogus pointer. The previous beha...
```diff diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c index 977e133bb8a4..6e2f54169e66 100644 --- a/kernel/sched/topology.c +++ b/kernel/sched/topology.c @@ -2201,6 +2201,8 @@ int sched_numa_find_nth_cpu(const struct cpumask *cpus, int cpu, int node) goto unlock; hop_masks = bsearch(&k, k.masks,...
c5c30a37369313d1f8b84e96e6a4397b4e2b4eb8
Analyze and fix the following issue in the Linux kernel code: x86/boot: Move startup code out of __head section
Problem Details: Move startup code out of the __head section, now that this no longer has a special significance. Move everything into .text or .init.text as appropriate, so that startup code is not kept around unnecessarily. [ bp: Fold in hunk to fix 32-bit CPU hotplug: Reported-by: kernel test robot <oliver.sa...
```diff diff --git a/arch/x86/boot/compressed/sev.c b/arch/x86/boot/compressed/sev.c index a5e002ff6bff..57670c172b25 100644 --- a/arch/x86/boot/compressed/sev.c +++ b/arch/x86/boot/compressed/sev.c @@ -32,9 +32,6 @@ struct ghcb *boot_ghcb; #undef __init #define __init -#undef __head -#define __head - #define __BO...
7b38dec3c5af54665a4b29483aa02bd1c1e71cf1
Analyze and fix the following issue in the Linux kernel code: x86/boot: Create a confined code area for startup code
Problem Details: In order to be able to have tight control over which code may execute from the early 1:1 mapping of memory, but still link vmlinux as a single executable, prefix all symbol references in startup code with __pi_, and invoke it from outside using the __pi_ prefix. Use objtool to check that no absolute s...
```diff diff --git a/arch/x86/boot/startup/Makefile b/arch/x86/boot/startup/Makefile index 32737f4ab5a8..e8fdf020b422 100644 --- a/arch/x86/boot/startup/Makefile +++ b/arch/x86/boot/startup/Makefile @@ -4,6 +4,7 @@ KBUILD_AFLAGS += -D__DISABLE_EXPORTS KBUILD_CFLAGS += -D__DISABLE_EXPORTS -mcmodel=small -fPIC \ ...
0d6e4563fc03d83f948e6a6f7963cc31a4c81914
Analyze and fix the following issue in the Linux kernel code: objtool: Add action to check for absence of absolute relocations
Problem Details: The x86 startup code must not use absolute references to code or data, as it executes before the kernel virtual mapping is up. Add an action to objtool to check all allocatable sections (with the exception of __patchable_function_entries, which uses absolute references for nebulous reasons) and raise ...
```diff diff --git a/tools/objtool/arch/x86/decode.c b/tools/objtool/arch/x86/decode.c index 98c4713c1b09..0ad5cc70ecbe 100644 --- a/tools/objtool/arch/x86/decode.c +++ b/tools/objtool/arch/x86/decode.c @@ -880,3 +880,15 @@ unsigned int arch_reloc_size(struct reloc *reloc) return 8; } } + +bool arch_absolute_relo...
37dbd78f98a80e89b5413f4649d0fbd023d99b2f
Analyze and fix the following issue in the Linux kernel code: x86/sev: Move GHCB page based HV communication out of startup code
Problem Details: Both the decompressor and the core kernel implement an early #VC handler, which only deals with CPUID instructions, and full featured one, which can handle any #VC exception. The former communicates with the hypervisor using the MSR based protocol, whereas the latter uses a shared GHCB page, which is ...
```diff diff --git a/arch/x86/boot/compressed/sev-handle-vc.c b/arch/x86/boot/compressed/sev-handle-vc.c index 89dd02de2a0f..7530ad8b768b 100644 --- a/arch/x86/boot/compressed/sev-handle-vc.c +++ b/arch/x86/boot/compressed/sev-handle-vc.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 #include "misc.h" +#inclu...
b39c915a4f365cce6bdc0e538ed95d31823aea8f
Analyze and fix the following issue in the Linux kernel code: libperf event: Ensure tracing data is multiple of 8 sized
Problem Details: Perf's synthetic-events.c will ensure 8-byte alignment of tracing data, writing it after a perf_record_header_tracing_data event. Add padding to struct perf_record_header_tracing_data to make it 16-byte rather than 12-byte sized. Fixes: 055c67ed39887c55 ("perf tools: Move event synthesizing routines ...
```diff diff --git a/tools/lib/perf/include/perf/event.h b/tools/lib/perf/include/perf/event.h index 6608f1e3701b..aa1e91c97a22 100644 --- a/tools/lib/perf/include/perf/event.h +++ b/tools/lib/perf/include/perf/event.h @@ -291,6 +291,7 @@ struct perf_record_header_event_type { struct perf_record_header_tracing_data { ...
8b93f8933d37591d17c59fd71b18fc61966d9515
Analyze and fix the following issue in the Linux kernel code: perf test shell lock_contention: Extra debug diagnostics
Problem Details: In test_record_concurrent, as stderr is sent to /dev/null, error messages are hidden. Change this to gather the error messages and dump them on failure. Some minor sh->bash changes to add some more diagnostics in trap_cleanup. Reviewed-by: James Clark <james.clark@linaro.org> Signed-off-by: Ian Roger...
```diff diff --git a/tools/perf/tests/shell/lock_contention.sh b/tools/perf/tests/shell/lock_contention.sh index d33d9e4392b0..7248a74ca2a3 100755 --- a/tools/perf/tests/shell/lock_contention.sh +++ b/tools/perf/tests/shell/lock_contention.sh @@ -7,14 +7,17 @@ set -e err=0 perfdata=$(mktemp /tmp/__perf_test.perf.data...
2354479026d726954ff86ce82f4b649637319661
Analyze and fix the following issue in the Linux kernel code: perf evsel: Avoid container_of on a NULL leader
Problem Details: An evsel should typically have a leader of itself, however, in tests like 'Sample parsing' a NULL leader may occur and the container_of will return a corrupt pointer. Avoid this with an explicit NULL test. Fixes: fba7c86601e2e42d ("libperf: Move 'leader' from tools/perf to perf_evsel::leader") Review...
```diff diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index d264c143b592..496f42434327 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -3935,6 +3935,8 @@ bool evsel__is_hybrid(const struct evsel *evsel) struct evsel *evsel__leader(const struct evsel *evsel) { + if (evsel->core...
4bd5bd8dbd41a208fb73afb65bda6f38e2b5a637
Analyze and fix the following issue in the Linux kernel code: perf test trace_btf_enum: Skip if permissions are insufficient
Problem Details: Modify test behavior to skip if BPF calls fail with "Operation not permitted". Fixes: d66763fed30f0bd8 ("perf test trace_btf_enum: Add regression test for the BTF augmentation of enums in 'perf trace'") Reviewed-by: James Clark <james.clark@linaro.org> Signed-off-by: Ian Rogers <irogers@google.com> Ac...
```diff diff --git a/tools/perf/tests/shell/trace_btf_enum.sh b/tools/perf/tests/shell/trace_btf_enum.sh index 572001d75d78..03e9f680a4a6 100755 --- a/tools/perf/tests/shell/trace_btf_enum.sh +++ b/tools/perf/tests/shell/trace_btf_enum.sh @@ -23,6 +23,14 @@ check_vmlinux() { fi } +check_permissions() { + if perf...
78d853512d6f979cf0cc41566e4f6cd82995ff34
Analyze and fix the following issue in the Linux kernel code: perf disasm: Avoid undefined behavior in incrementing NULL
Problem Details: Incrementing NULL is undefined behavior and triggers ubsan during the perf annotate test. Split a compound statement over two lines to avoid this. Fixes: 98f69a573c668a18 ("perf annotate: Split out util/disasm.c") Reviewed-by: Collin Funk <collin.funk1@gmail.com> Reviewed-by: James Clark <james.clark...
```diff diff --git a/tools/perf/util/disasm.c b/tools/perf/util/disasm.c index b1e4919d016f..e257bd918c89 100644 --- a/tools/perf/util/disasm.c +++ b/tools/perf/util/disasm.c @@ -390,13 +390,16 @@ static int jump__parse(struct arch *arch, struct ins_operands *ops, struct map_s * skip over possible up to 2 operands t...
8ad25ebfa70e86860559b306bbc923c7db4fcac6
Analyze and fix the following issue in the Linux kernel code: genirq/test: Ensure CPU 1 is online for hotplug test
Problem Details: It's possible to run these tests on platforms that think they have a hotpluggable CPU1, but for whatever reason, CPU1 is not online and can't be brought online: # irq_cpuhotplug_test: EXPECTATION FAILED at kernel/irq/irq_test.c:210 Expected remove_cpu(1) == 0, but remove_cpu(1) == 1 (0...
```diff diff --git a/kernel/irq/irq_test.c b/kernel/irq/irq_test.c index bbb89a3e1153..e2d31914b3c4 100644 --- a/kernel/irq/irq_test.c +++ b/kernel/irq/irq_test.c @@ -179,6 +179,8 @@ static void irq_cpuhotplug_test(struct kunit *test) kunit_skip(test, "requires more than 1 CPU for CPU hotplug"); if (!cpu_is_hotplu...
add03fdb9d52411cabb3872fb7692df6f4c67586
Analyze and fix the following issue in the Linux kernel code: genirq/test: Drop CONFIG_GENERIC_IRQ_MIGRATION assumptions
Problem Details: Not all platforms use the generic IRQ migration code, even if they select GENERIC_IRQ_MIGRATION. (See, for example, powerpc / pseries_cpu_disable().) If such platforms don't perform managed shutdown the same way, the interrupt may not actually shut down, and these tests fail: [ 4.357022][ T101] ...
```diff diff --git a/kernel/irq/irq_test.c b/kernel/irq/irq_test.c index 56baeb5041d6..bbb89a3e1153 100644 --- a/kernel/irq/irq_test.c +++ b/kernel/irq/irq_test.c @@ -203,13 +203,9 @@ static void irq_cpuhotplug_test(struct kunit *test) KUNIT_EXPECT_EQ(test, desc->depth, 1); KUNIT_EXPECT_EQ(test, remove_cpu(1), 0)...
0c888bc86d672e551ce5c58b891c8b44f8967643
Analyze and fix the following issue in the Linux kernel code: genirq/test: Depend on SPARSE_IRQ
Problem Details: Some architectures have a static interrupt layout, with a limited number of interrupts. Without SPARSE_IRQ, the test may not be able to allocate any fake interrupts, and the test will fail. (This occurs on ARCH=m68k, for example.) Additionally, managed-affinity is only supported with CONFIG_SPARSE_IRQ...
```diff diff --git a/kernel/irq/Kconfig b/kernel/irq/Kconfig index 8bc4de38d7af..1b4254d19a73 100644 --- a/kernel/irq/Kconfig +++ b/kernel/irq/Kconfig @@ -143,6 +143,7 @@ config GENERIC_IRQ_KEXEC_CLEAR_VM_FORWARD config IRQ_KUNIT_TEST bool "KUnit tests for IRQ management APIs" if !KUNIT_ALL_TESTS depends on KUNIT=...
f8a44f9babd054ff19e20a30cab661d716ad5459
Analyze and fix the following issue in the Linux kernel code: genirq/test: Select IRQ_DOMAIN
Problem Details: These tests use irq_domain_alloc_descs() and so require CONFIG_IRQ_DOMAIN. Fixes: 66067c3c8a1e ("genirq: Add kunit tests for depth counts") Reported-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-...
```diff diff --git a/kernel/irq/Kconfig b/kernel/irq/Kconfig index 36673640c4fc..8bc4de38d7af 100644 --- a/kernel/irq/Kconfig +++ b/kernel/irq/Kconfig @@ -144,6 +144,7 @@ config IRQ_KUNIT_TEST bool "KUnit tests for IRQ management APIs" if !KUNIT_ALL_TESTS depends on KUNIT=y default KUNIT_ALL_TESTS + select IRQ_DO...
c9163915a93d40e32c4e4aeb942c0adcb190d72e
Analyze and fix the following issue in the Linux kernel code: genirq/test: Fix depth tests on architectures with NOREQUEST by default.
Problem Details: The new irq KUnit tests fail on some architectures (notably PowerPC and 32-bit ARM), as the request_irq() call fails due to the ARCH_IRQ_INIT_FLAGS containing IRQ_NOREQUEST, yielding the following errors: [10:17:45] # irq_free_disabled_test: EXPECTATION FAILED at kernel/irq/irq_test.c:88 [10:17:45...
```diff diff --git a/kernel/irq/irq_test.c b/kernel/irq/irq_test.c index a75abebed7f2..e220e7b2fc18 100644 --- a/kernel/irq/irq_test.c +++ b/kernel/irq/irq_test.c @@ -54,6 +54,9 @@ static void irq_disable_depth_test(struct kunit *test) desc = irq_to_desc(virq); KUNIT_ASSERT_PTR_NE(test, desc, NULL); + /* On some ...
9a12e2fb3f517d5bd72efa565a8e591e6fff311c
Analyze and fix the following issue in the Linux kernel code: Input: tsc2007 - prevent overflow in pressure calculation
Problem Details: The touch resistance calculation in the tsc2007 driver is prone to overflow if (z2 - z1) is large and also x is reasonably big. This overflow results in the driver emitting input events when very little touch pressure is applied. In these events the x and y coordinates can be substantially off. Avoid ...
```diff diff --git a/drivers/input/touchscreen/tsc2007_core.c b/drivers/input/touchscreen/tsc2007_core.c index 05e00a084c88..948935de894b 100644 --- a/drivers/input/touchscreen/tsc2007_core.c +++ b/drivers/input/touchscreen/tsc2007_core.c @@ -23,6 +23,7 @@ #include <linux/input.h> #include <linux/interrupt.h> #inclu...