id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
4983d2f55f34748e64f22b514dd5fbfab1c6b0ad
Analyze and fix the following issue in the Linux kernel code: ALSA: sb: Convert to snd_seq bus probe mechanism
Problem Details: The snd_seq bus got a dedicated probe function. Make use of that. This fixes a runtime warning about the driver needing to be converted to the bus probe method. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/cca...
```diff diff --git a/sound/isa/sb/emu8000_synth.c b/sound/isa/sb/emu8000_synth.c index 9bec85ec55b4..3414c6d0695f 100644 --- a/sound/isa/sb/emu8000_synth.c +++ b/sound/isa/sb/emu8000_synth.c @@ -21,9 +21,8 @@ MODULE_LICENSE("GPL"); /* * create a new hardware dependent device for Emu8000 */ -static int snd_emu8000_...
505b57e52c9eeef810df23af6064aeb79b601f00
Analyze and fix the following issue in the Linux kernel code: ALSA: opl4: Convert to snd_seq bus probe mechanism
Problem Details: The snd_seq bus got a dedicated probe function. Make use of that. This fixes a runtime warning about the driver needing to be converted to the bus probe method. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/15c...
```diff diff --git a/sound/drivers/opl4/opl4_seq.c b/sound/drivers/opl4/opl4_seq.c index 7bb22089a093..fd6f15be6109 100644 --- a/sound/drivers/opl4/opl4_seq.c +++ b/sound/drivers/opl4/opl4_seq.c @@ -118,9 +118,8 @@ static void snd_opl4_seq_free_port(void *private_data) snd_midi_channel_free_set(opl4->chset); } -st...
376cdcd3ff18c08540178bc95e1dba49228cd2bd
Analyze and fix the following issue in the Linux kernel code: ALSA: opl3: Convert to snd_seq bus probe mechanism
Problem Details: The snd_seq bus got a dedicated probe function. Make use of that. This fixes a runtime warning about the driver needing to be converted to the bus probe method. Note that the remove callback returns void now. The actual return value was ignored before (see device_remove() in drivers/base/dd.c), so the...
```diff diff --git a/sound/drivers/opl3/opl3_seq.c b/sound/drivers/opl3/opl3_seq.c index d3278428d360..b77d8e8f12fb 100644 --- a/sound/drivers/opl3/opl3_seq.c +++ b/sound/drivers/opl3/opl3_seq.c @@ -201,9 +201,8 @@ static int snd_opl3_synth_create_port(struct snd_opl3 * opl3) /* ------------------------------ */ -...
d1c83a79e3985e7d5961dfe8adb76e1d9a624fb2
Analyze and fix the following issue in the Linux kernel code: ALSA: seq: ump: Convert to snd_seq bus probe mechanism
Problem Details: The snd_seq bus got a dedicated probe function. Make use of that. This fixes a runtime warning about the driver needing to be converted to the bus probe method. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/054...
```diff diff --git a/sound/core/seq/seq_ump_client.c b/sound/core/seq/seq_ump_client.c index 27247babb16d..a96d21981cbe 100644 --- a/sound/core/seq/seq_ump_client.c +++ b/sound/core/seq/seq_ump_client.c @@ -452,9 +452,8 @@ static const struct snd_seq_ump_ops seq_ump_ops = { }; /* create a sequencer client and ports...
2e514916e90fd709c07be2a9e2965aa0c66997ee
Analyze and fix the following issue in the Linux kernel code: ALSA: seq: midi: Convert to snd_seq bus probe mechanism
Problem Details: The snd_seq bus got a dedicated probe function. Make use of that. This fixes a runtime warning about the driver needing to be converted to the bus probe method. Note that the remove callback returns void now. The actual return value was ignored before (see device_remove() in drivers/base/dd.c), so the...
```diff diff --git a/sound/core/seq/seq_midi.c b/sound/core/seq/seq_midi.c index 581e138a3115..de7ec7d15f23 100644 --- a/sound/core/seq/seq_midi.c +++ b/sound/core/seq/seq_midi.c @@ -265,9 +265,8 @@ static void snd_seq_midisynth_delete(struct seq_midisynth *msynth) /* register new midi synth port */ static int -snd...
4cb92fa763823d813d22b45b7f18fcf6e85a72ad
Analyze and fix the following issue in the Linux kernel code: s390/pci: Fix cyclic dead-lock in zpci_zdev_put() and zpci_scan_devices()
Problem Details: When triggering PCI device recovery by writing into the SysFS attribute `recover` of a Physical Function with existing child SR-IOV Virtual Functions, lockdep is reporting a possible deadlock between three threads: Thread (A) Thread (B) Thread (C) | ...
```diff diff --git a/.clang-format b/.clang-format index 2ceca764122f..c7060124a47a 100644 --- a/.clang-format +++ b/.clang-format @@ -748,6 +748,7 @@ ForEachMacros: - 'ynl_attr_for_each_nested' - 'ynl_attr_for_each_payload' - 'zorro_for_each_dev' + - 'zpci_bus_for_each' IncludeBlocks: Preserve IncludeCat...
430f7803b69cd5e5694e5dfc884c6628870af36e
Analyze and fix the following issue in the Linux kernel code: dmaengine: ti: k3-udma: fix device leak on udma lookup
Problem Details: Make sure to drop the reference taken when looking up the UDMA platform device. Note that holding a reference to a platform device does not prevent its driver data from going away so there is no point in keeping the reference after the lookup helper returns. Fixes: d70241913413 ("dmaengine: ti: k3-ud...
```diff diff --git a/drivers/dma/ti/k3-udma-private.c b/drivers/dma/ti/k3-udma-private.c index 05228bf00033..624360423ef1 100644 --- a/drivers/dma/ti/k3-udma-private.c +++ b/drivers/dma/ti/k3-udma-private.c @@ -42,9 +42,9 @@ struct udma_dev *of_xudma_dev_get(struct device_node *np, const char *property) } ud = pl...
4fc17b1c6d2e04ad13fd6c21cfbac68043ec03f9
Analyze and fix the following issue in the Linux kernel code: dmaengine: ti: dma-crossbar: fix device leak on am335x route allocation
Problem Details: Make sure to drop the reference taken when looking up the crossbar platform device during am335x route allocation. Fixes: 42dbdcc6bf96 ("dmaengine: ti-dma-crossbar: Add support for crossbar on AM33xx/AM43xx") Cc: stable@vger.kernel.org # 4.4 Cc: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Jo...
```diff diff --git a/drivers/dma/ti/dma-crossbar.c b/drivers/dma/ti/dma-crossbar.c index e52b0e139900..ff05b150ad37 100644 --- a/drivers/dma/ti/dma-crossbar.c +++ b/drivers/dma/ti/dma-crossbar.c @@ -79,34 +79,35 @@ static void *ti_am335x_xbar_route_allocate(struct of_phandle_args *dma_spec, { struct platform_device ...
dc7e44db01fc2498644e3106db3e62a9883a93d5
Analyze and fix the following issue in the Linux kernel code: dmaengine: ti: dma-crossbar: fix device leak on dra7x route allocation
Problem Details: Make sure to drop the reference taken when looking up the crossbar platform device during dra7x route allocation. Note that commit 615a4bfc426e ("dmaengine: ti: Add missing put_device in ti_dra7_xbar_route_allocate") fixed the leak in the error paths but the reference is still leaking on successful al...
```diff diff --git a/drivers/dma/ti/dma-crossbar.c b/drivers/dma/ti/dma-crossbar.c index 7f17ee87a6dc..e52b0e139900 100644 --- a/drivers/dma/ti/dma-crossbar.c +++ b/drivers/dma/ti/dma-crossbar.c @@ -288,6 +288,8 @@ static void *ti_dra7_xbar_route_allocate(struct of_phandle_args *dma_spec, ti_dra7_xbar_write(xbar->i...
b1b590a590af13ded598e70f0b72bc1e515787a1
Analyze and fix the following issue in the Linux kernel code: dmaengine: stm32: dmamux: fix OF node leak on route allocation failure
Problem Details: Make sure to drop the reference taken to the DMA master OF node also on late route allocation failures. Fixes: df7e762db5f6 ("dmaengine: Add STM32 DMAMUX driver") Cc: stable@vger.kernel.org # 4.15 Cc: Pierre-Yves MORDRET <pierre-yves.mordret@foss.st.com> Signed-off-by: Johan Hovold <johan@kernel....
```diff diff --git a/drivers/dma/stm32/stm32-dmamux.c b/drivers/dma/stm32/stm32-dmamux.c index 791179760782..2bd218dbabbb 100644 --- a/drivers/dma/stm32/stm32-dmamux.c +++ b/drivers/dma/stm32/stm32-dmamux.c @@ -143,7 +143,7 @@ static void *stm32_dmamux_route_allocate(struct of_phandle_args *dma_spec, ret = pm_runtime...
dd6e4943889fb354efa3f700e42739da9bddb6ef
Analyze and fix the following issue in the Linux kernel code: dmaengine: stm32: dmamux: fix device leak on route allocation
Problem Details: Make sure to drop the reference taken when looking up the DMA mux platform device during route allocation. Note that holding a reference to a device does not prevent its driver data from going away so there is no point in keeping the reference. Fixes: df7e762db5f6 ("dmaengine: Add STM32 DMAMUX driver...
```diff diff --git a/drivers/dma/stm32/stm32-dmamux.c b/drivers/dma/stm32/stm32-dmamux.c index 8d77e2a7939a..791179760782 100644 --- a/drivers/dma/stm32/stm32-dmamux.c +++ b/drivers/dma/stm32/stm32-dmamux.c @@ -90,23 +90,25 @@ static void *stm32_dmamux_route_allocate(struct of_phandle_args *dma_spec, struct stm32_dma...
9fb490323997dcb6f749cd2660a17a39854600cd
Analyze and fix the following issue in the Linux kernel code: dmaengine: sh: rz-dmac: fix device leak on probe failure
Problem Details: Make sure to drop the reference taken when looking up the ICU device during probe also on probe failures (e.g. probe deferral). Fixes: 7de873201c44 ("dmaengine: sh: rz-dmac: Add RZ/V2H(P) support") Cc: stable@vger.kernel.org # 6.16 Cc: Fabrizio Castro <fabrizio.castro.jz@renesas.com> Signed-off-by: Jo...
```diff diff --git a/drivers/dma/sh/rz-dmac.c b/drivers/dma/sh/rz-dmac.c index 1f687b08d6b8..38137e8d80b9 100644 --- a/drivers/dma/sh/rz-dmac.c +++ b/drivers/dma/sh/rz-dmac.c @@ -854,6 +854,13 @@ static int rz_dmac_chan_probe(struct rz_dmac *dmac, return 0; } +static void rz_dmac_put_device(void *_dev) +{ + struct...
d9847e6d1d91462890ba297f7888fa598d47e76e
Analyze and fix the following issue in the Linux kernel code: dmaengine: lpc32xx-dmamux: fix device leak on route allocation
Problem Details: Make sure to drop the reference taken when looking up the DMA mux platform device during route allocation. Note that holding a reference to a device does not prevent its driver data from going away so there is no point in keeping the reference. Fixes: 5d318b595982 ("dmaengine: Add dma router for pl08...
```diff diff --git a/drivers/dma/lpc32xx-dmamux.c b/drivers/dma/lpc32xx-dmamux.c index 351d7e23e615..33be714740dd 100644 --- a/drivers/dma/lpc32xx-dmamux.c +++ b/drivers/dma/lpc32xx-dmamux.c @@ -95,11 +95,12 @@ static void *lpc32xx_dmamux_reserve(struct of_phandle_args *dma_spec, struct lpc32xx_dmamux_data *dmamux = ...
d4d63059dee7e7cae0c4d9a532ed558bc90efb55
Analyze and fix the following issue in the Linux kernel code: dmaengine: lpc18xx-dmamux: fix device leak on route allocation
Problem Details: Make sure to drop the reference taken when looking up the DMA mux platform device during route allocation. Note that holding a reference to a device does not prevent its driver data from going away so there is no point in keeping the reference. Fixes: e5f4ae84be74 ("dmaengine: add driver for lpc18xx ...
```diff diff --git a/drivers/dma/lpc18xx-dmamux.c b/drivers/dma/lpc18xx-dmamux.c index 2b6436f4b193..d3ff521951b8 100644 --- a/drivers/dma/lpc18xx-dmamux.c +++ b/drivers/dma/lpc18xx-dmamux.c @@ -57,30 +57,31 @@ static void *lpc18xx_dmamux_reserve(struct of_phandle_args *dma_spec, struct lpc18xx_dmamux_data *dmamux = ...
799900f01792cf8b525a44764f065f83fcafd468
Analyze and fix the following issue in the Linux kernel code: dmaengine: idxd: fix device leaks on compat bind and unbind
Problem Details: Make sure to drop the reference taken when looking up the idxd device as part of the compat bind and unbind sysfs interface. Fixes: 6e7f3ee97bbe ("dmaengine: idxd: move dsa_drv support to compatible mode") Cc: stable@vger.kernel.org # 5.15 Cc: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Johan Hov...
```diff diff --git a/drivers/dma/idxd/compat.c b/drivers/dma/idxd/compat.c index eff9943f1a42..95b8ef958633 100644 --- a/drivers/dma/idxd/compat.c +++ b/drivers/dma/idxd/compat.c @@ -20,11 +20,16 @@ static ssize_t unbind_store(struct device_driver *drv, const char *buf, size_t c int rc = -ENODEV; dev = bus_find_d...
ec25e60f9f95464aa11411db31d0906b3fb7b9f2
Analyze and fix the following issue in the Linux kernel code: dmaengine: dw: dmamux: fix OF node leak on route allocation failure
Problem Details: Make sure to drop the reference taken to the DMA master OF node also on late route allocation failures. Fixes: 134d9c52fca2 ("dmaengine: dw: dmamux: Introduce RZN1 DMA router support") Cc: stable@vger.kernel.org # 5.19 Cc: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Johan Hovold <johan@ke...
```diff diff --git a/drivers/dma/dw/rzn1-dmamux.c b/drivers/dma/dw/rzn1-dmamux.c index deadf135681b..cbec277af4dd 100644 --- a/drivers/dma/dw/rzn1-dmamux.c +++ b/drivers/dma/dw/rzn1-dmamux.c @@ -90,7 +90,7 @@ static void *rzn1_dmamux_route_allocate(struct of_phandle_args *dma_spec, if (test_and_set_bit(map->req_idx...
7bb7d696e0361bbfc1411462c784998cca0afcbb
Analyze and fix the following issue in the Linux kernel code: dmaengine: cv1800b-dmamux: fix device leak on route allocation
Problem Details: Make sure to drop the reference taken when looking up the DMA mux platform device during route allocation. Note that holding a reference to a device does not prevent its driver data from going away so there is no point in keeping the reference. Fixes: db7d07b5add4 ("dmaengine: add driver for Sophgo C...
```diff diff --git a/drivers/dma/cv1800b-dmamux.c b/drivers/dma/cv1800b-dmamux.c index e900d6595617..f7a952fcbc7d 100644 --- a/drivers/dma/cv1800b-dmamux.c +++ b/drivers/dma/cv1800b-dmamux.c @@ -102,11 +102,11 @@ static void *cv1800_dmamux_route_allocate(struct of_phandle_args *dma_spec, struct llist_node *node; un...
7c3a46ebf15a9796b763a54272407fdbf945bed8
Analyze and fix the following issue in the Linux kernel code: dmaengine: bcm-sba-raid: fix device leak on probe
Problem Details: Make sure to drop the reference taken when looking up the mailbox device during probe on probe failures and on driver unbind. Fixes: 743e1c8ffe4e ("dmaengine: Add Broadcom SBA RAID driver") Cc: stable@vger.kernel.org # 4.13 Signed-off-by: Johan Hovold <johan@kernel.org> Link: https://patch.msgid.link/...
```diff diff --git a/drivers/dma/bcm-sba-raid.c b/drivers/dma/bcm-sba-raid.c index 7f0e76439ce5..ed037fa883f6 100644 --- a/drivers/dma/bcm-sba-raid.c +++ b/drivers/dma/bcm-sba-raid.c @@ -1699,7 +1699,7 @@ static int sba_probe(struct platform_device *pdev) /* Prealloc channel resource */ ret = sba_prealloc_channel_r...
b9074b2d7a230b6e28caa23165e9d8bc0677d333
Analyze and fix the following issue in the Linux kernel code: dmaengine: at_hdmac: fix device leak on of_dma_xlate()
Problem Details: Make sure to drop the reference taken when looking up the DMA platform device during of_dma_xlate() when releasing channel resources. Note that commit 3832b78b3ec2 ("dmaengine: at_hdmac: add missing put_device() call in at_dma_xlate()") fixed the leak in a couple of error paths but the reference is st...
```diff diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c index 7d226453961f..22bb604a3f97 100644 --- a/drivers/dma/at_hdmac.c +++ b/drivers/dma/at_hdmac.c @@ -1765,6 +1765,7 @@ static int atc_alloc_chan_resources(struct dma_chan *chan) static void atc_free_chan_resources(struct dma_chan *chan) { struct ...
c7d436a6c1a274c1ac28d5fb3b8eb8f03b6d0e10
Analyze and fix the following issue in the Linux kernel code: dmaengine: xilinx: xdma: Fix regmap max_register
Problem Details: The max_register field is assigned the size of the register memory region instead of the offset of the last register. The result is that reading from the regmap via debugfs can cause a segmentation fault: tail /sys/kernel/debug/regmap/xdma.1.auto/registers Unable to handle kernel paging request at vir...
```diff diff --git a/drivers/dma/xilinx/xdma-regs.h b/drivers/dma/xilinx/xdma-regs.h index 6ad08878e938..70bca92621aa 100644 --- a/drivers/dma/xilinx/xdma-regs.h +++ b/drivers/dma/xilinx/xdma-regs.h @@ -9,6 +9,7 @@ /* The length of register space exposed to host */ #define XDMA_REG_SPACE_LEN 65536 +#define XDMA_MAX...
49400b701eca849c1b53717b1f5d779a8d066ec0
Analyze and fix the following issue in the Linux kernel code: dmaengine: mmp_pdma: fix DMA mask handling
Problem Details: The driver's existing logic for setting the DMA mask for "marvell,pdma-1.0" was flawed. It incorrectly relied on pdev->dev->coherent_dma_mask instead of declaring the hardware's fixed addressing capability. A cleaner and more correct approach is to define the mask directly based on the hardware limitat...
```diff diff --git a/drivers/dma/mmp_pdma.c b/drivers/dma/mmp_pdma.c index d07229a74886..86661eb3cde1 100644 --- a/drivers/dma/mmp_pdma.c +++ b/drivers/dma/mmp_pdma.c @@ -152,8 +152,8 @@ struct mmp_pdma_phy { * * Controller Configuration: * @run_bits: Control bits in DCSR register for channel start/stop - * @dm...
0bc03750deefc5fdab77b01c459bb1691c64c3c5
Analyze and fix the following issue in the Linux kernel code: x86/cpu: Drop vestigial PBE logic in AMD/Hygon/Centaur/Cyrix
Problem Details: Besides formatting changes, this logic dates back to Linux 2.4.0-test11 in November 2000. Prior to "Massive cleanup of CPU detection and bug handling", c->x86_capability was a single u32 containing cpuid(1).edx, cpuid(0x80000001).edx, or a synthesis thereof. X86_FEATURE_AMD3D was defined as the top b...
```diff diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index c04f53f43af1..c792c2afd849 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c @@ -1051,12 +1051,6 @@ static void init_amd(struct cpuinfo_x86 *c) early_init_amd(c); - /* - * Bit 31 in normal CPUID used for nonstan...
fb7bfa31b8e8569f154f2fe0ea6c2f03c0f087aa
Analyze and fix the following issue in the Linux kernel code: x86/cpu/amd: Correct the microcode table for Zenbleed
Problem Details: The good revisions are tied to exact steppings, meaning it's not valid to match on model number alone, let alone a range. This is probably only a latent issue. From public microcode archives, the following CPUs exist 17-30-00, 17-60-00, 17-70-00 and would be captured by the model ranges. They're lik...
```diff diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index bc94ff1e250a..86059f2c0fcd 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c @@ -951,26 +951,14 @@ static void init_amd_zen1(struct cpuinfo_x86 *c) } } -static bool cpu_has_zenbleed_microcode(void) -{ - u32 good_r...
b89bbf3e5154d0ad024eabb994dabde3fb9e1d6c
Analyze and fix the following issue in the Linux kernel code: ARM: dts: aspeed: clemente: move hdd_led to its own gpio-leds group
Problem Details: The gpio-leds driver requires all GPIOs in a group to be available; if any GPIO in the group is not available the whole group will not be created. The hdd_led GPIO is only present after standby power is enabled, which can prevent other LEDs in the same group from being created and blocks properly setti...
```diff diff --git a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-clemente.dts b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-clemente.dts index dfe8f6d0eeef..ea1bf6f402bd 100644 --- a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-clemente.dts +++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-clemente.dts @@ -96,7 +96,...
0cf964501fae7bda82c7f120f2ed8f848018b244
Analyze and fix the following issue in the Linux kernel code: ARM: dts: aspeed: santabarbara: Enable ipmb device for OCP debug card
Problem Details: Add an IPMB node for OCP debug card to support IPMI communication. Signed-off-by: Fred Chen <fredchen.openbmc@gmail.com> Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
```diff diff --git a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-santabarbara.dts b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-santabarbara.dts index 4312ead311df..0a3e2e241063 100644 --- a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-santabarbara.dts +++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-santabarbara.d...
157266edcc56715323de1bd60e49194b3b66a174
Analyze and fix the following issue in the Linux kernel code: x86/boot/e820: Simplify append_e820_table() and remove restriction on single-entry tables
Problem Details: So append_e820_table() begins with this weird condition that checks 'nr_entries': static int __init append_e820_table(struct boot_e820_entry *entries, u32 nr_entries) { /* Only one memory region (or negative)? Ignore it */ if (nr_entries < 2) return ...
```diff diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index 46960801c580..806fd92c226a 100644 --- a/arch/x86/kernel/e820.c +++ b/arch/x86/kernel/e820.c @@ -441,17 +441,22 @@ __init int e820__update_table(struct e820_table *table) return 0; } -__init static int __append_e820_table(struct boot_e820_en...
f40f3f32b34562672364f02f1b7f7929b8467768
Analyze and fix the following issue in the Linux kernel code: x86/boot/e820: Change e820_search_gap() to search for the highest-address PCI gap
Problem Details: Right now the main x86 function that determines the position and size of the 'PCI gap', e820_search_gap(), has this curious property: while (--idx >= 0) { ... if (gap >= *gap_size) { I.e. it will iterate the E820 table backwards, from its end to the beginning, and will search for larger a...
```diff diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index b8edc5e32d87..3fba5406502a 100644 --- a/arch/x86/kernel/e820.c +++ b/arch/x86/kernel/e820.c @@ -655,7 +655,7 @@ static int __init e820_search_gap(unsigned long *gap_start, unsigned long *gap_s if (last > end) { unsigned long gap = last - ...
58dcd82d2e2543e0aba4915613debec3c309849b
Analyze and fix the following issue in the Linux kernel code: x86/boot/e820: Standardize e820 table index variable types under 'u32'
Problem Details: So we have 'idx' types of 'int' and 'unsigned int', and sometimes we assign 'u32' fields such as e820_table::nr_entries to these 'int' values. While there's no real risk of overflow with these tables, make it all cleaner by standardizing on a single type: u32. This also happens to shrink the code a b...
```diff diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index a7dabf809b2b..39f29bf29b7c 100644 --- a/arch/x86/kernel/e820.c +++ b/arch/x86/kernel/e820.c @@ -76,7 +76,7 @@ EXPORT_SYMBOL(pci_mem_start); static bool _e820__mapped_any(struct e820_table *table, u64 start, u64 end, enum e820_type typ...
44f732f3ec8273b99252fcd47f873206d556a69f
Analyze and fix the following issue in the Linux kernel code: x86/boot/e820: Clean up confusing and self-contradictory verbiage around E820 related resource allocations
Problem Details: So the E820 code has a rather confusing area of code at around e820__reserve_resources(), which is, by its plain reading, rather self-contradictory. For example, the comment explaining e820__reserve_resources() claims: - '* Mark E820 reserved areas as busy for the resource manager' By 'E820 reserved...
```diff diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index 6bc06860c6b0..0316a186b42b 100644 --- a/arch/x86/kernel/e820.c +++ b/arch/x86/kernel/e820.c @@ -1064,37 +1064,44 @@ static unsigned long __init e820_type_to_iores_desc(struct e820_entry *entry) } } -static bool __init do_mark_busy(enum e820...
4d8e5a682be4136758a8beadd5aecc7f76276504
Analyze and fix the following issue in the Linux kernel code: x86/boot/e820: Print gaps in the E820 table
Problem Details: Gaps in the E820 table are not obvious at a glance and can easily be overlooked. Print out gaps in the E820 table: Before: BIOS-provided physical RAM map: BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved BIOS-e820: [mem...
```diff diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index 09c712aec2d0..460645d09c6c 100644 --- a/arch/x86/kernel/e820.c +++ b/arch/x86/kernel/e820.c @@ -202,18 +202,32 @@ static void __init e820_print_type(enum e820_type type) static void __init e820__print_table(const char *who) { + u64 range_end...
adbf61cc47cb72b102682e690ad323e1eda652c2
Analyze and fix the following issue in the Linux kernel code: x86/acpi/boot: Correct acpi_is_processor_usable() check again
Problem Details: ACPI v6.3 defined a new "Online Capable" MADT LAPIC flag. This bit is used in conjunction with the "Enabled" MADT LAPIC flag to determine if a CPU can be enabled/hotplugged by the OS after boot. Before the new bit was defined, the "Enabled" bit was explicitly described like this (ACPI v6.0 wording pro...
```diff diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index 9fa321a95eb3..d6138b2b633a 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c @@ -35,6 +35,7 @@ #include <asm/smp.h> #include <asm/i8259.h> #include <asm/setup.h> +#include <asm/hypervisor.h> #include "sle...
21433d3e3ca14d20f9b0c2237b3d3a1355af7907
Analyze and fix the following issue in the Linux kernel code: x86/platform/uv: Fix UBSAN array-index-out-of-bounds
Problem Details: When UBSAN is enabled, multiple array-index-out-of-bounds messages are printed: [ 0.000000] [ T0] UBSAN: array-index-out-of-bounds in arch/x86/kernel/apic/x2apic_uv_x.c:276:23 [ 0.000000] [ T0] index 1 is out of range for type '<unknown> [1]' ... [ 0.000000] [ T0] UBSAN: a...
```diff diff --git a/arch/x86/include/asm/uv/bios.h b/arch/x86/include/asm/uv/bios.h index 6989b824fd32..d0b62e255290 100644 --- a/arch/x86/include/asm/uv/bios.h +++ b/arch/x86/include/asm/uv/bios.h @@ -122,7 +122,7 @@ struct uv_systab { struct { u32 type:8; /* type of entry */ u32 offset:24; /* byte offset fro...
3010f06c52aa7da51493df59303ea733a614597b
Analyze and fix the following issue in the Linux kernel code: shmem_whiteout(): fix regression from tree-in-dcache series
Problem Details: Now that shmem_mknod() hashes the new dentry, d_rehash() in shmem_whiteout() should be removed. X-paperbag: brown Reported-by: Hugh Dickins <hughd@google.com> Acked-by: Hugh Dickins <hughd@google.com> Tested-by: Hugh Dickins <hughd@google.com> Fixes: 2313598222f9 ("convert ramfs and tmpfs") Signed-off...
```diff diff --git a/mm/shmem.c b/mm/shmem.c index 3f194c9842a8..d3edc809e2e7 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -4019,22 +4019,10 @@ static int shmem_whiteout(struct mnt_idmap *idmap, whiteout = d_alloc(old_dentry->d_parent, &old_dentry->d_name); if (!whiteout) return -ENOMEM; - error = shmem_mknod(i...
6f0b824a61f212e9707ff68abcabfdfa4724b811
Analyze and fix the following issue in the Linux kernel code: bpf: Fix bpf_seq_read docs for increased buffer size
Problem Details: Commit af65320948b8 ("bpf: Bump iter seq size to support BTF representation of large data structures") increased the fixed buffer size from PAGE_SIZE to PAGE_SIZE << 3, but the docs for the function didn't get updated at the same time. Update them. Signed-off-by: T.J. Mercier <tjmercier@google.com> Ac...
```diff diff --git a/kernel/bpf/bpf_iter.c b/kernel/bpf/bpf_iter.c index eec60b57bd3d..4b58d56ecab1 100644 --- a/kernel/bpf/bpf_iter.c +++ b/kernel/bpf/bpf_iter.c @@ -86,7 +86,7 @@ static bool bpf_iter_support_resched(struct seq_file *seq) /* bpf_seq_read, a customized and simpler version for bpf iterator. * The f...
0c01ea92f545ca7fcafdda6a8e29b65ef3a5ec74
Analyze and fix the following issue in the Linux kernel code: mm: Remove tlb_flush_reason::NR_TLB_FLUSH_REASONS from <linux/mm_types.h>
Problem Details: This has been unused since it was added 11 years ago in: d17d8f9dedb9 ("x86/mm: Add tracepoints for TLB flushes") Signed-off-by: Tal Zussman <tz2294@columbia.edu> Signed-off-by: Ingo Molnar <mingo@kernel.org> Reviewed-by: Rik van Riel <riel@surriel.com> Acked-by: David Hildenbrand <david@redhat.com...
```diff diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 9f6de068295d..42af2292951d 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -1631,7 +1631,6 @@ enum tlb_flush_reason { TLB_LOCAL_MM_SHOOTDOWN, TLB_REMOTE_SEND_IPI, TLB_REMOTE_WRONG_CPU, - NR_TLB_FLUSH_REASONS, }...
8b62e64e6d30fa047b3aefb1a36e1f80c8acb3d2
Analyze and fix the following issue in the Linux kernel code: x86/mm/tlb/trace: Export the TLB_REMOTE_WRONG_CPU enum in <trace/events/tlb.h>
Problem Details: When the TLB_REMOTE_WRONG_CPU enum was introduced for the tlb_flush tracepoint, the enum was not exported to user-space. Add it to the appropriate macro definition to enable parsing by userspace tools, as per: Link: https://lore.kernel.org/all/20150403013802.220157513@goodmis.org [ mingo: Capitaliz...
```diff diff --git a/include/trace/events/tlb.h b/include/trace/events/tlb.h index b4d8e7dc38f8..fb8369511685 100644 --- a/include/trace/events/tlb.h +++ b/include/trace/events/tlb.h @@ -12,8 +12,9 @@ EM( TLB_FLUSH_ON_TASK_SWITCH, "flush on task switch" ) \ EM( TLB_REMOTE_SHOOTDOWN, "remote shootdown" ) \ EM( ...
673b192dbe174b61bdf784d293b5a6e7f2fd20f6
Analyze and fix the following issue in the Linux kernel code: Input: pf1550 - remove "defined but unused" warning
Problem Details: If 'CONFIG_PM_SLEEP' is not set, compiler throws warning for *suspend() and *resume() function for this driver. Using new 'DEFINE_SIMPLE_DEV_PM_OPS' fixes it. Signed-off-by: Vaibhav Gupta <vaibhavgupta40@gmail.com> Link: https://patch.msgid.link/20251210211149.543928-1-vaibhavgupta40@gmail.com Signed-...
```diff diff --git a/drivers/input/misc/pf1550-onkey.c b/drivers/input/misc/pf1550-onkey.c index 9be6377151cb..0d1b570bbe47 100644 --- a/drivers/input/misc/pf1550-onkey.c +++ b/drivers/input/misc/pf1550-onkey.c @@ -173,7 +173,7 @@ static int pf1550_onkey_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM...
cdc996667c26b3c4570881cd9ad2c080da4ce331
Analyze and fix the following issue in the Linux kernel code: ALSA: hda: Remove unnecessary print function dev_err()
Problem Details: The print function dev_err() is redundant because platform_get_irq() already prints an error. ./sound/hda/controllers/cix-ipbloq.c:119:2-9: line 119 is redundant because platform_get_irq() already prints an error. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Closes: https://bugzilla.openanolis....
```diff diff --git a/sound/hda/controllers/cix-ipbloq.c b/sound/hda/controllers/cix-ipbloq.c index 99f9f48e91d4..c1084a915c13 100644 --- a/sound/hda/controllers/cix-ipbloq.c +++ b/sound/hda/controllers/cix-ipbloq.c @@ -115,10 +115,8 @@ static int cix_ipbloq_hda_init(struct cix_ipbloq_hda *hda, bus->addr = res->start;...
38b069333b58c86b7588d59cc55a065611190926
Analyze and fix the following issue in the Linux kernel code: drm/sched: Add several job helpers to avoid drivers touching scheduler state
Problem Details: In the past, drivers used to reach into scheduler internals—this must end because it makes it difficult to change scheduler internals, as driver-side code must also be updated. Add helpers to check if the scheduler is stopped and to query a job’s signaled state to avoid reaching into scheduler interna...
```diff diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c index 1d4f1b822e7b..5f08719a35f5 100644 --- a/drivers/gpu/drm/scheduler/sched_main.c +++ b/drivers/gpu/drm/scheduler/sched_main.c @@ -344,7 +344,7 @@ drm_sched_rq_select_entity_fifo(struct drm_gpu_scheduler *sched, */...
d2ea4d254d04a89e17504af0230c7268e3cac6bf
Analyze and fix the following issue in the Linux kernel code: file: ensure cleanup
Problem Details: Brown paper bag time. This is a silly oversight where I missed to drop the error condition checking to ensure we clean up on early error returns. I have an internal unit testset coming up for this which will catch all such issues going forward. Reported-by: Chris Mason <clm@fb.com> Reported-by: Jeff L...
```diff diff --git a/include/linux/file.h b/include/linux/file.h index cf389fde9bc2..27484b444d31 100644 --- a/include/linux/file.h +++ b/include/linux/file.h @@ -161,12 +161,10 @@ typedef struct fd_prepare class_fd_prepare_t; /* Do not use directly. */ static inline void class_fd_prepare_destructor(const struct fd_p...
d552fc632cf5b7e3b2808fd341708bd353072c45
Analyze and fix the following issue in the Linux kernel code: x86/hv: Add gitignore entry for generated header file
Problem Details: Commit 7bfe3b8ea6e3 ("Drivers: hv: Introduce mshv_vtl driver") added a new generated header file for the offsets into the mshv_vtl_cpu_context structure to be used by the low-level assembly code. But it didn't add the .gitignore file to go with it, so 'git status' and friends will mention it. Let's a...
```diff diff --git a/arch/x86/hyperv/.gitignore b/arch/x86/hyperv/.gitignore new file mode 100644 index 000000000000..333615d993b5 --- /dev/null +++ b/arch/x86/hyperv/.gitignore @@ -0,0 +1 @@ +mshv-asm-offsets.h ```
7ef2d25e477368bbd5c32e2265210e55644fdd48
Analyze and fix the following issue in the Linux kernel code: drm/xe: Track pre-production workaround support
Problem Details: When we're initially enabling driver support for a new platform/IP, we usually implement all workarounds documented in the WA database in the driver. Many of those workarounds are restricted to early steppings that only showed up in pre-production hardware (i.e., internal test chips that are not avail...
```diff diff --git a/drivers/gpu/drm/xe/regs/xe_gt_regs.h b/drivers/gpu/drm/xe/regs/xe_gt_regs.h index 917a088c28f2..93643da57428 100644 --- a/drivers/gpu/drm/xe/regs/xe_gt_regs.h +++ b/drivers/gpu/drm/xe/regs/xe_gt_regs.h @@ -227,6 +227,9 @@ #define MIRROR_FUSE1 XE_REG(0x911c) +#define FUSE2 XE_REG(0x9120)...
fbbd7ce627af733ded7971b2495b0d099a0a80da
Analyze and fix the following issue in the Linux kernel code: genirq: Don't overwrite interrupt thread flags on setup
Problem Details: Chris reported that the recent affinity management changes result in overwriting the already initialized thread flags. Use set_bit() to set the affinity bit instead of assigning the bit value to the flags. Fixes: 801afdfbfcd9 ("genirq: Fix interrupt threads affinity vs. cpuset isolated partitions") R...
```diff diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index 8b1b4c8a4f54..349ae7979da0 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -1414,7 +1414,7 @@ setup_irq_thread(struct irqaction *new, unsigned int irq, bool secondary) * Ensure the thread adjusts the affinity once it reaches the * ...
b912138df2993b6271500e5ecbd933acff14ac43
Analyze and fix the following issue in the Linux kernel code: drm/xe: Create page reclaim list on unbind
Problem Details: Page reclaim list (PRL) is preparation work for the page reclaim feature. The PRL is firstly owned by pt_update_ops and all other page reclaim operations will point back to this PRL. PRL generates its entries during the unbind page walker, updating the PRL. This PRL is restricted to a 4K page, so 512 ...
```diff diff --git a/drivers/gpu/drm/xe/Makefile b/drivers/gpu/drm/xe/Makefile index e5f3c2ec9e9a..8b43e391b3d3 100644 --- a/drivers/gpu/drm/xe/Makefile +++ b/drivers/gpu/drm/xe/Makefile @@ -95,6 +95,7 @@ xe-y += xe_bb.o \ xe_oa.o \ xe_observation.o \ xe_pagefault.o \ + xe_page_reclaim.o \ xe_pat.o \ xe_pci.o...
136209e6bd981e60db6c0e78f2919ff2f92312d4
Analyze and fix the following issue in the Linux kernel code: i3c: adi: Fix confusing cleanup.h syntax
Problem Details: Initializing automatic __free variables to NULL without need (e.g. branches with different allocations), followed by actual allocation is in contrary to explicit coding rules guiding cleanup.h: "Given that the "__free(...) = NULL" pattern for variables defined at the top of the function poses this pot...
```diff diff --git a/drivers/i3c/master/adi-i3c-master.c b/drivers/i3c/master/adi-i3c-master.c index 00eb80e492af..6380a38e6d29 100644 --- a/drivers/i3c/master/adi-i3c-master.c +++ b/drivers/i3c/master/adi-i3c-master.c @@ -332,10 +332,9 @@ static int adi_i3c_master_send_ccc_cmd(struct i3c_master_controller *m, ...
cc3b18f9fedec517e35b973d14670a37290f133c
Analyze and fix the following issue in the Linux kernel code: i3c: master: Fix confusing cleanup.h syntax
Problem Details: Initializing automatic __free variables to NULL without need (e.g. branches with different allocations), followed by actual allocation is in contrary to explicit coding rules guiding cleanup.h: "Given that the "__free(...) = NULL" pattern for variables defined at the top of the function poses this pot...
```diff diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c index ea45a519dd68..7f606c871648 100644 --- a/drivers/i3c/master.c +++ b/drivers/i3c/master.c @@ -1742,11 +1742,10 @@ EXPORT_SYMBOL_GPL(i3c_master_do_daa); struct i3c_dma *i3c_master_dma_map_single(struct device *dev, void *buf, size_t len, bool force_...
825aed0328588b2837636c1c5a0c48795d724617
Analyze and fix the following issue in the Linux kernel code: drm/xe: Restore engine registers before restarting schedulers after GT reset
Problem Details: During GT reset recovery in do_gt_restart(), xe_uc_start() was called before xe_reg_sr_apply_mmio() restored engine-specific registers. This created a race window where the scheduler could run jobs before hardware state was fully restored. This caused failures in eudebug tests (xe_exec_sip_eudebug@bre...
```diff diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c index 7caf781ba9e8..313ce83ab0e5 100644 --- a/drivers/gpu/drm/xe/xe_gt.c +++ b/drivers/gpu/drm/xe/xe_gt.c @@ -771,9 +771,6 @@ static int do_gt_restart(struct xe_gt *gt) xe_gt_sriov_pf_init_hw(gt); xe_mocs_init(gt); - err = xe_uc_start(&...
9869d3a6fed381f3b98404e26e1afc75d680cbf9
Analyze and fix the following issue in the Linux kernel code: block: fix race between wbt_enable_default and IO submission
Problem Details: When wbt_enable_default() is moved out of queue freezing in elevator_change(), it can cause the wbt inflight counter to become negative (-1), leading to hung tasks in the writeback path. Tasks get stuck in wbt_wait() because the counter is in an inconsistent state. The issue occurs because wbt_enable_...
```diff diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c index 4a8d3d96bfe4..6e54b1d3d8bc 100644 --- a/block/bfq-iosched.c +++ b/block/bfq-iosched.c @@ -7181,7 +7181,7 @@ static void bfq_exit_queue(struct elevator_queue *e) blk_stat_disable_accounting(bfqd->queue); blk_queue_flag_clear(QUEUE_FLAG_DISABLE_WB...
52bc483763262b66e51818a82e03cad0c5bfef67
Analyze and fix the following issue in the Linux kernel code: selftests: ublk: forbid multiple data copy modes
Problem Details: The kublk mock ublk server allows multiple data copy mode arguments to be passed on the command line (--zero_copy, --get_data, and --auto_zc). The ublk device will be created with all the requested feature flags, however kublk will only use one of the modes to interact with request data (arbitrarily pr...
```diff diff --git a/tools/testing/selftests/ublk/kublk.c b/tools/testing/selftests/ublk/kublk.c index f8fa102a627f..4dd02cb083ba 100644 --- a/tools/testing/selftests/ublk/kublk.c +++ b/tools/testing/selftests/ublk/kublk.c @@ -1613,7 +1613,7 @@ int main(int argc, char *argv[]) ctx.queue_depth = strtol(optarg, NULL,...
58eec4f3fc2878de51239916953b736b674d5071
Analyze and fix the following issue in the Linux kernel code: selftests: ublk: fix fio arguments in run_io_and_recover()
Problem Details: run_io_and_recover() invokes fio with --size="${size}", but the variable size doesn't exist. Thus, the argument expands to --size=, which causes fio to exit immediately with an error without issuing any I/O. Pass the value for size as the first argument to the function. Signed-off-by: Caleb Sander Mat...
```diff diff --git a/tools/testing/selftests/ublk/test_common.sh b/tools/testing/selftests/ublk/test_common.sh index 8a4dbd09feb0..6f1c042de40e 100755 --- a/tools/testing/selftests/ublk/test_common.sh +++ b/tools/testing/selftests/ublk/test_common.sh @@ -333,11 +333,12 @@ run_io_and_kill_daemon() run_io_and_recover(...
9637fc3bdd10c8e073f71897bd35babbd21e9b29
Analyze and fix the following issue in the Linux kernel code: selftests: ublk: fix overflow in ublk_queue_auto_zc_fallback()
Problem Details: The functions ublk_queue_use_zc(), ublk_queue_use_auto_zc(), and ublk_queue_auto_zc_fallback() were returning int, but performing bitwise AND on q->flags which is __u64. When a flag bit is set in the upper 32 bits (beyond INT_MAX), the result of the bitwise AND operation could overflow when cast to in...
```diff diff --git a/tools/testing/selftests/ublk/kublk.h b/tools/testing/selftests/ublk/kublk.h index fe42705c6d42..6e8f381f3481 100644 --- a/tools/testing/selftests/ublk/kublk.h +++ b/tools/testing/selftests/ublk/kublk.h @@ -390,19 +390,19 @@ static inline int ublk_completed_tgt_io(struct ublk_thread *t, return --i...
343f5683cfa443000904c88ce2e23656375fc51c
Analyze and fix the following issue in the Linux kernel code: accel/amdxdna: Fix race where send ring appears full due to delayed head update
Problem Details: The firmware sends a response and interrupts the driver before advancing the mailbox send ring head pointer. As a result, the driver may observe the response and attempt to send a new request before the firmware has updated the head pointer. In this window, the send ring still appears full, causing the...
```diff diff --git a/drivers/accel/amdxdna/amdxdna_mailbox.c b/drivers/accel/amdxdna/amdxdna_mailbox.c index a60a85ce564c..469242ed8224 100644 --- a/drivers/accel/amdxdna/amdxdna_mailbox.c +++ b/drivers/accel/amdxdna/amdxdna_mailbox.c @@ -191,26 +191,34 @@ mailbox_send_msg(struct mailbox_channel *mb_chann, struct mailb...
d69d3636f5f7a84bae7cd43473b3701ad9b7d544
Analyze and fix the following issue in the Linux kernel code: drm/xe: Increase TDF timeout
Problem Details: There are some corner cases where flushing transient data may take slightly longer than the 150us timeout we currently allow. Update the driver to use a 300us timeout instead based on the latest guidance from the hardware team. An update to the bspec to formally document this is expected to arrive soo...
```diff diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c index 24efb6a3e0ea..339b9aef9499 100644 --- a/drivers/gpu/drm/xe/xe_device.c +++ b/drivers/gpu/drm/xe/xe_device.c @@ -1057,7 +1057,7 @@ static void tdf_request_sync(struct xe_device *xe) * transient and need to be flushed.. */ ...
f5e1e5ec204da11fa87fdf006d451d80ce06e118
Analyze and fix the following issue in the Linux kernel code: sched_ext: Fix missing post-enqueue handling in move_local_task_to_local_dsq()
Problem Details: move_local_task_to_local_dsq() is used when moving a task from a non-local DSQ to a local DSQ on the same CPU. It directly manipulates the local DSQ without going through dispatch_enqueue() and was missing the post-enqueue handling that triggers preemption when SCX_ENQ_PREEMPT is set or the idle task i...
```diff diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c index c78efa99406f..695503a2f7d1 100644 --- a/kernel/sched/ext.c +++ b/kernel/sched/ext.c @@ -988,6 +988,14 @@ static void local_dsq_post_enq(struct scx_dispatch_q *dsq, struct task_struct *p struct rq *rq = container_of(dsq, struct rq, scx.local_dsq); bo...
530b6637c79e728d58f1d9b66bd4acf4b735b86d
Analyze and fix the following issue in the Linux kernel code: sched_ext: Factor out local_dsq_post_enq() from dispatch_enqueue()
Problem Details: Factor out local_dsq_post_enq() which performs post-enqueue handling for local DSQs - triggering resched_curr() if SCX_ENQ_PREEMPT is specified or if the current CPU is idle. No functional change. This will be used by the next patch to fix move_local_task_to_local_dsq(). Cc: stable@vger.kernel.org # ...
```diff diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c index c4465ccefea4..c78efa99406f 100644 --- a/kernel/sched/ext.c +++ b/kernel/sched/ext.c @@ -982,6 +982,22 @@ static void refill_task_slice_dfl(struct scx_sched *sch, struct task_struct *p) __scx_add_event(sch, SCX_EV_REFILL_SLICE_DFL, 1); } +static voi...
37343524f000d2a64359867d7024a73233d3b438
Analyze and fix the following issue in the Linux kernel code: btrfs: fix changeset leak on mmap write after failure to reserve metadata
Problem Details: If the call to btrfs_delalloc_reserve_metadata() fails we jump to the 'out_noreserve' label and there we never free the extent_changeset allocated by the previous call to btrfs_check_data_free_space() (if qgroups are enabled). Fix this by calling extent_changeset_free() under the 'out_noreserve' label....
```diff diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 1e0ff3d7210d..e42fd2beb1e3 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -2019,13 +2019,14 @@ out: else btrfs_delalloc_release_space(inode, data_reserved, page_start, reserved_space, true); - extent_changeset_free(data_reserved); out_...
b57f2ddd28737db6ff0e9da8467f0ab9d707e997
Analyze and fix the following issue in the Linux kernel code: btrfs: fix memory leak of fs_devices in degraded seed device path
Problem Details: In open_seed_devices(), when find_fsid() fails and we're in DEGRADED mode, a new fs_devices is allocated via alloc_fs_devices() but is never added to the seed_list before returning. This contrasts with the normal path where fs_devices is properly added via list_add(). If any error occurs later in read...
```diff diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index e81c8ac0d8ae..e35872149e2f 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -7131,6 +7131,7 @@ static struct btrfs_fs_devices *open_seed_devices(struct btrfs_fs_info *fs_info, fs_devices->seeding = true; fs_devices->opened = 1; + lis...
630efee9493cf64ff7b9a1652978807fef385fdd
Analyze and fix the following issue in the Linux kernel code: drm: Fix object leak in DRM_IOCTL_GEM_CHANGE_HANDLE
Problem Details: Add missing drm_gem_object_put() call when drm_gem_object_lookup() successfully returns an object. This fixes a GEM object reference leak that can prevent driver modules from unloading when using prime buffers. Fixes: 53096728b891 ("drm: Add DRM prime interface to reassign GEM handle") Cc: <stable@vge...
```diff diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c index f884d155a832..3b9df655e837 100644 --- a/drivers/gpu/drm/drm_gem.c +++ b/drivers/gpu/drm/drm_gem.c @@ -979,8 +979,10 @@ int drm_gem_change_handle_ioctl(struct drm_device *dev, void *data, if (!obj) return -ENOENT; - if (args->handle ...
bdae29d6512ddc589200b9ae6bda467bdbab863d
Analyze and fix the following issue in the Linux kernel code: rseq: Always inline rseq_debug_syscall_return()
Problem Details: To get the full benefit of: eaa9088d568c ("rseq: Use static branch for syscall exit debug when GENERIC_IRQ_ENTRY=y") clang needs an __always_inline instead of a plain inline qualifier: $ for i in {1..10}; do taskset -c 4 perf5 bench syscall basic -l 100000000 | grep "ops/sec"; done Before ...
```diff diff --git a/include/linux/rseq_entry.h b/include/linux/rseq_entry.h index c92167ff8a7f..a36b472627de 100644 --- a/include/linux/rseq_entry.h +++ b/include/linux/rseq_entry.h @@ -596,7 +596,7 @@ static __always_inline void rseq_exit_to_user_mode_legacy(void) void __rseq_debug_syscall_return(struct pt_regs *r...
d36067d6ea00827e9b8fc087d8216710cb99b3cf
Analyze and fix the following issue in the Linux kernel code: bug: Hush suggest-attribute=format for __warn_printf()
Problem Details: Recent additions to this function cause GCC 14.3.0 to get excited (W=1) and suggest a missing attribute: lib/bug.c: In function '__warn_printf': lib/bug.c:187:25: error: function '__warn_printf' be a candidate for 'gnu_printf' format attribute [-Werror=suggest-attribute=format] 187 | ...
```diff diff --git a/lib/bug.c b/lib/bug.c index c6f691f3d42d..623c467a8b76 100644 --- a/lib/bug.c +++ b/lib/bug.c @@ -173,6 +173,9 @@ struct bug_entry *find_bug(unsigned long bugaddr) return module_find_bug(bugaddr); } +__diag_push(); +__diag_ignore(GCC, all, "-Wsuggest-attribute=format", + "Not a valid __p...
b5e51ef787660bffe9cd059e7abe32f3b1667a98
Analyze and fix the following issue in the Linux kernel code: bug: Let report_bug_entry() provide the correct bugaddr
Problem Details: report_bug_entry() always provides zero for bugaddr but could easily extract the correct address from the provided bug_entry. Just do that to have proper warning messages. E.g. adding an artificial: void foo(void) { WARN_ONCE(1, "bar"); } function generates this warning message: WARNING: arch/s...
```diff diff --git a/lib/bug.c b/lib/bug.c index edd9041f89f3..c6f691f3d42d 100644 --- a/lib/bug.c +++ b/lib/bug.c @@ -262,7 +262,7 @@ enum bug_trap_type report_bug_entry(struct bug_entry *bug, struct pt_regs *regs) bool rcu = false; rcu = warn_rcu_enter(); - ret = __report_bug(bug, 0, regs); + ret = __report_bug...
526aafabd756cc56401b383d6ae554af3e21dcdd
Analyze and fix the following issue in the Linux kernel code: drm/tests: Handle EDEADLK in set_up_atomic_state()
Problem Details: Fedora/CentOS/RHEL CI is reporting intermittent failures while running the drm_validate_modeset test [1]: # drm_test_check_connector_changed_modeset: EXPECTATION FAILED at # drivers/gpu/drm/tests/drm_atomic_state_test.c:162 Expected ret == 0, but ret == -35 (0xffffffffffffffdd) Ch...
```diff diff --git a/drivers/gpu/drm/tests/drm_atomic_state_test.c b/drivers/gpu/drm/tests/drm_atomic_state_test.c index 1e857d86574c..bc27f65b2823 100644 --- a/drivers/gpu/drm/tests/drm_atomic_state_test.c +++ b/drivers/gpu/drm/tests/drm_atomic_state_test.c @@ -156,24 +156,29 @@ static int set_up_atomic_state(struct k...
141d95e42884628314f5ad9394657b0b35424300
Analyze and fix the following issue in the Linux kernel code: drm/tests: Handle EDEADLK in drm_test_check_valid_clones()
Problem Details: Fedora/CentOS/RHEL CI is reporting intermittent failures while running the drm_test_check_valid_clones() KUnit test. The error log can be either [1]: # drm_test_check_valid_clones: ASSERTION FAILED at # drivers/gpu/drm/tests/drm_atomic_state_test.c:295 Expected ret == param->expected_resu...
```diff diff --git a/drivers/gpu/drm/tests/drm_atomic_state_test.c b/drivers/gpu/drm/tests/drm_atomic_state_test.c index 2f6ac7a09f44..1e857d86574c 100644 --- a/drivers/gpu/drm/tests/drm_atomic_state_test.c +++ b/drivers/gpu/drm/tests/drm_atomic_state_test.c @@ -283,7 +283,14 @@ static void drm_test_check_valid_clones(...
fe27e709d91fb645182751b602cb88966b4a1bb6
Analyze and fix the following issue in the Linux kernel code: drm/tests: hdmi: Handle drm_kunit_helper_enable_crtc_connector() returning EDEADLK
Problem Details: Fedora/CentOS/RHEL CI is reporting intermittent failures while running the KUnit tests present in drm_hdmi_state_helper_test.c [1]. While the specific test causing the failure change between runs, all of them are caused by drm_kunit_helper_enable_crtc_connector() returning -EDEADLK. The error trace al...
```diff diff --git a/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c b/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c index 8bd412735000..70f9aa702143 100644 --- a/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c +++ b/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c @@ -257,10 +257,16 @@ static void drm_tes...
9415f749d34b926b9e4853da1462f4d941f89a0d
Analyze and fix the following issue in the Linux kernel code: perf/x86/intel: Fix NULL event dereference crash in handle_pmi_common()
Problem Details: handle_pmi_common() may observe an active bit set in cpuc->active_mask while the corresponding cpuc->events[] entry has already been cleared, which leads to a NULL pointer dereference. This can happen when interrupt throttling stops all events in a group while PEBS processing is still in progress. per...
```diff diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c index 853fe073bab3..bdf3f0d0fe21 100644 --- a/arch/x86/events/intel/core.c +++ b/arch/x86/events/intel/core.c @@ -3378,6 +3378,9 @@ static int handle_pmi_common(struct pt_regs *regs, u64 status) if (!test_bit(bit, cpuc->active_mask)) ...
e58c88f0cb2d8ed89de78f6f17409d29cfab6c5c
Analyze and fix the following issue in the Linux kernel code: Input: lkkbd - disable pending work before freeing device
Problem Details: lkkbd_interrupt() schedules lk->tq via schedule_work(), and the work handler lkkbd_reinit() dereferences the lkkbd structure and its serio/input_dev fields. lkkbd_disconnect() and error paths in lkkbd_connect() free the lkkbd structure without preventing the reinit work from being queued again until s...
```diff diff --git a/drivers/input/keyboard/lkkbd.c b/drivers/input/keyboard/lkkbd.c index c035216dd27c..2f130f819363 100644 --- a/drivers/input/keyboard/lkkbd.c +++ b/drivers/input/keyboard/lkkbd.c @@ -670,7 +670,8 @@ static int lkkbd_connect(struct serio *serio, struct serio_driver *drv) return 0; - fail3: seri...
ac87efcf9e42f07526438b67405659a8c1d0480e
Analyze and fix the following issue in the Linux kernel code: x86/boot/Documentation: Fix whitespace noise in boot.rst
Problem Details: There's a lot of unnecessary whitespace damage in this file: space before tabs, etc., that has no formatting or readability effect or advantages. Fix them. Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://patch.msgid.link/176535283007.498.16442167388418039352.tip-bot2@tip-bot2
```diff diff --git a/Documentation/arch/x86/boot.rst b/Documentation/arch/x86/boot.rst index 18574f010d46..dca3875a2435 100644 --- a/Documentation/arch/x86/boot.rst +++ b/Documentation/arch/x86/boot.rst @@ -95,26 +95,26 @@ Memory Layout The traditional memory map for the kernel loader, used for Image or zImage kernel...
c85285b32cc697d7612ee28a9ea9ded5e53d2b57
Analyze and fix the following issue in the Linux kernel code: drm/xe/multi_queue: Handle CGP context error
Problem Details: Trigger multi-queue context cleanup upon CGP context error notification from GuC. v4: Fix error message Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patch.msgid.link/20251211010249.1647839-30-niranjan...
```diff diff --git a/drivers/gpu/drm/xe/abi/guc_actions_abi.h b/drivers/gpu/drm/xe/abi/guc_actions_abi.h index 3e9fbed9cda6..8af3691626bf 100644 --- a/drivers/gpu/drm/xe/abi/guc_actions_abi.h +++ b/drivers/gpu/drm/xe/abi/guc_actions_abi.h @@ -142,6 +142,7 @@ enum xe_guc_action { XE_GUC_ACTION_REGISTER_CONTEXT_MULTI_Q...
d716a5088c88391daea7a3bd2b26589060309a79
Analyze and fix the following issue in the Linux kernel code: drm/xe/multi_queue: Handle tearing down of a multi queue
Problem Details: As all queues of a multi queue group use the primary queue of the group to interface with GuC. Hence there is a dependency between the queues of the group. So, when primary queue of a multi queue group is cleaned up, also trigger a cleanup of the secondary queues also. During cleanup, stop and re-start...
```diff diff --git a/drivers/gpu/drm/xe/xe_exec_queue.c b/drivers/gpu/drm/xe/xe_exec_queue.c index 256e2ce1fe69..d337b7bc2b80 100644 --- a/drivers/gpu/drm/xe/xe_exec_queue.c +++ b/drivers/gpu/drm/xe/xe_exec_queue.c @@ -87,6 +87,7 @@ static void xe_exec_queue_group_cleanup(struct xe_exec_queue *q) xe_lrc_put(lrc); ...
898a00f4b43311adfd4da1711ed2b72adc8c98a5
Analyze and fix the following issue in the Linux kernel code: drm/xe/multi_queue: Add multi queue priority property
Problem Details: Add support for queues of a multi queue group to set their priority within the queue group by adding property DRM_XE_EXEC_QUEUE_SET_PROPERTY_MULTI_QUEUE_PRIORITY. This is the only other property supported by secondary queues of a multi queue group, other than DRM_XE_EXEC_QUEUE_SET_PROPERTY_MULTI_QUEUE....
```diff diff --git a/drivers/gpu/drm/xe/xe_exec_queue.c b/drivers/gpu/drm/xe/xe_exec_queue.c index f76ec277c5af..aa46d154d04a 100644 --- a/drivers/gpu/drm/xe/xe_exec_queue.c +++ b/drivers/gpu/drm/xe/xe_exec_queue.c @@ -180,6 +180,7 @@ static struct xe_exec_queue *__xe_exec_queue_alloc(struct xe_device *xe, INIT_LIST_...
bc5775c59258e1da6fe393845ee5cdd25ca618f3
Analyze and fix the following issue in the Linux kernel code: drm/xe/multi_queue: Add GuC interface for multi queue support
Problem Details: Implement GuC commands and response along with the Context Group Page (CGP) interface for multi queue support. Ensure that only primary queue (q0) of a multi queue group communicate with GuC. The secondary queues of the group only need to maintain LRCA and interface with drm scheduler. Use primary qu...
```diff diff --git a/drivers/gpu/drm/xe/abi/guc_actions_abi.h b/drivers/gpu/drm/xe/abi/guc_actions_abi.h index 47756e4674a1..3e9fbed9cda6 100644 --- a/drivers/gpu/drm/xe/abi/guc_actions_abi.h +++ b/drivers/gpu/drm/xe/abi/guc_actions_abi.h @@ -139,6 +139,9 @@ enum xe_guc_action { XE_GUC_ACTION_DEREGISTER_G2G = 0x4508,...
d9ec63474648a258094704ce223c9249fa7bb279
Analyze and fix the following issue in the Linux kernel code: drm/xe/multi_queue: Add user interface for multi queue support
Problem Details: Multi Queue is a new mode of execution supported by the compute and blitter copy command streamers (CCS and BCS, respectively). It is an enhancement of the existing hardware architecture and leverages the same submission model. It enables support for efficient, parallel execution of multiple queues wit...
```diff diff --git a/drivers/gpu/drm/xe/xe_exec_queue.c b/drivers/gpu/drm/xe/xe_exec_queue.c index 02b75652d497..f76ec277c5af 100644 --- a/drivers/gpu/drm/xe/xe_exec_queue.c +++ b/drivers/gpu/drm/xe/xe_exec_queue.c @@ -13,6 +13,7 @@ #include <drm/drm_syncobj.h> #include <uapi/drm/xe_drm.h> +#include "xe_bo.h" #inc...
470cb09a2936d3c1ff8aeff46e3c14dcc4314e9b
Analyze and fix the following issue in the Linux kernel code: drm/plane: Fix IS_ERR() vs NULL bug drm_plane_create_color_pipeline_property()
Problem Details: The drm_property_create_enum() function returns NULL on error, it never returns error pointers. Fix the error checking to match. Fixes: 2afc3184f3b3 ("drm/plane: Add COLOR PIPELINE property") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Simon Ser <contact@emersion.fr> Link: ...
```diff diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c index f6cfa8ac090c..b87f5f30d36b 100644 --- a/drivers/gpu/drm/drm_plane.c +++ b/drivers/gpu/drm/drm_plane.c @@ -1867,9 +1867,9 @@ int drm_plane_create_color_pipeline_property(struct drm_plane *plane, prop = drm_property_create_enum(plane->...
9f769637a93fac81689b80df6855f545839cf999
Analyze and fix the following issue in the Linux kernel code: sched_ext: Fix bypass depth leak on scx_enable() failure
Problem Details: scx_enable() calls scx_bypass(true) to initialize in bypass mode and then scx_bypass(false) on success to exit. If scx_enable() fails during task initialization - e.g. scx_cgroup_init() or scx_init_task() returns an error - it jumps to err_disable while bypass is still active. scx_disable_workfn() then...
```diff diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c index bd74b371f52d..c4465ccefea4 100644 --- a/kernel/sched/ext.c +++ b/kernel/sched/ext.c @@ -41,6 +41,13 @@ static bool scx_init_task_enabled; static bool scx_switching_all; DEFINE_STATIC_KEY_FALSE(__scx_switched_all); +/* + * Tracks whether scx_enable()...
7319c2ceb2d74d54f24b7f5409b97aed406f0189
Analyze and fix the following issue in the Linux kernel code: drm/xe/vf: Reset recovery_queued after issuing RESFIX_START
Problem Details: During VF_RESTORE or VF_RESUME, the GuC sends a migration interrupt and clears the RESFIX_START marker. If migration or resume occurs before the VF issues its own RESFIX_START, VF KMD may receive two back-to-back migration interrupts. VF then sends RESFIX_START to indicate the beginning of fixups and R...
```diff diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_vf.c b/drivers/gpu/drm/xe/xe_gt_sriov_vf.c index 47612e67d462..b8b391cfc8eb 100644 --- a/drivers/gpu/drm/xe/xe_gt_sriov_vf.c +++ b/drivers/gpu/drm/xe/xe_gt_sriov_vf.c @@ -1171,10 +1171,6 @@ static bool vf_post_migration_shutdown(struct xe_gt *gt) return true; } ...
8d8cf42b03f149dcb545b547906306f3b474565e
Analyze and fix the following issue in the Linux kernel code: drm/xe/vf: Fix queuing of recovery work
Problem Details: Ensure VF migration recovery work is only queued when no recovery is already queued and teardown is not in progress. Fixes: b47c0c07c350 ("drm/xe/vf: Teardown VF post migration worker on driver unload") Signed-off-by: Satyanarayana K V P <satyanarayana.k.v.p@intel.com> Cc: Michal Wajdeczko <michal.waj...
```diff diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_vf.c b/drivers/gpu/drm/xe/xe_gt_sriov_vf.c index 3c806c8e5f3e..47612e67d462 100644 --- a/drivers/gpu/drm/xe/xe_gt_sriov_vf.c +++ b/drivers/gpu/drm/xe/xe_gt_sriov_vf.c @@ -781,7 +781,7 @@ static void vf_start_migration_recovery(struct xe_gt *gt) spin_lock(&gt->srio...
a67fd55f6a09f4119b7232c19e0f348fe31ab0db
Analyze and fix the following issue in the Linux kernel code: netfilter: nf_tables: remove redundant chain validation on register store
Problem Details: This validation predates the introduction of the state machine that determines when to enter slow path validation for error reporting. Currently, table validation is perform when: - new rule contains expressions that need validation. - new set element with jump/goto verdict. Validation on register s...
```diff diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c index f3de2f9bbebf..c46b1bb0efe0 100644 --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c @@ -11676,21 +11676,10 @@ static int nft_validate_register_store(const struct nft_ctx *ctx, enum nft_data_types t...
5ec8ca26fe93103577c904644b0957f069d0051a
Analyze and fix the following issue in the Linux kernel code: netfilter: nf_nat: remove bogus direction check
Problem Details: Jakub reports spurious failures of the 'conntrack_reverse_clash.sh' selftest. A bogus test makes nat core resort to port rewrite even though there is no need for this. When the test is made, nf_nat_used_tuple() would already have caused us to return if no other CPU had added a colliding entry. Moreov...
```diff diff --git a/net/netfilter/nf_nat_core.c b/net/netfilter/nf_nat_core.c index 78a61dac4ade..e6b24586d2fe 100644 --- a/net/netfilter/nf_nat_core.c +++ b/net/netfilter/nf_nat_core.c @@ -294,25 +294,13 @@ nf_nat_used_tuple_new(const struct nf_conntrack_tuple *tuple, ct = nf_ct_tuplehash_to_ctrack(thash); - /*...
a4ebfb9d95d78a12512b435a698ee6886d712571
Analyze and fix the following issue in the Linux kernel code: drm/xe/bo: Don't include the CCS metadata in the dma-buf sg-table
Problem Details: Some Xe bos are allocated with extra backing-store for the CCS metadata. It's never been the intention to share the CCS metadata when exporting such bos as dma-buf. Don't include it in the dma-buf sg-table. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Cc: Rodrigo Vivi <rod...
```diff diff --git a/drivers/gpu/drm/xe/xe_dma_buf.c b/drivers/gpu/drm/xe/xe_dma_buf.c index 54e42960daad..7c74a31d4486 100644 --- a/drivers/gpu/drm/xe/xe_dma_buf.c +++ b/drivers/gpu/drm/xe/xe_dma_buf.c @@ -124,7 +124,7 @@ static struct sg_table *xe_dma_buf_map(struct dma_buf_attachment *attach, case XE_PL_TT: sgt...
885bebac9909994050bbbeed0829c727e42bd1b7
Analyze and fix the following issue in the Linux kernel code: nfc: pn533: Fix error code in pn533_acr122_poweron_rdr()
Problem Details: Set the error code if "transferred != sizeof(cmd)" instead of returning success. Fixes: dbafc28955fa ("NFC: pn533: don't send USB data off of the stack") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://patch.msgid.link/aTfIJ9tZPmeUF4W1@stanley.mountain Signed-off-by: Jakub Kicins...
```diff diff --git a/drivers/nfc/pn533/usb.c b/drivers/nfc/pn533/usb.c index ffd7367ce119..018a80674f06 100644 --- a/drivers/nfc/pn533/usb.c +++ b/drivers/nfc/pn533/usb.c @@ -406,7 +406,7 @@ static int pn533_acr122_poweron_rdr(struct pn533_usb_phy *phy) if (rc || (transferred != sizeof(cmd))) { nfc_err(&phy->udev-...
3efadf028783a49ab2941294187c8b6dd86bf7da
Analyze and fix the following issue in the Linux kernel code: drm/me/gsc: mei interrupt top half should be in irq disabled context
Problem Details: MEI GSC interrupt comes from i915 or xe driver. It has top half and bottom half. Top half is called from i915/xe interrupt handler. It should be in irq disabled context. With RT kernel(PREEMPT_RT enabled), by default IRQ handler is in threaded IRQ. MEI GSC top half might be in threaded IRQ context. ge...
```diff diff --git a/drivers/gpu/drm/xe/xe_heci_gsc.c b/drivers/gpu/drm/xe/xe_heci_gsc.c index 2b3d49dd394c..495cdd4f948d 100644 --- a/drivers/gpu/drm/xe/xe_heci_gsc.c +++ b/drivers/gpu/drm/xe/xe_heci_gsc.c @@ -223,7 +223,7 @@ void xe_heci_gsc_irq_handler(struct xe_device *xe, u32 iir) if (xe->heci_gsc.irq < 0) re...
5914428e0e44c4dcb64ad42cc37fa23a57fd1c5c
Analyze and fix the following issue in the Linux kernel code: selftests/tc-testing: Create tests to exercise ets classes active list misplacements
Problem Details: Add a test case for a bug fixed by Jamal [1] and for scenario where an ets drr class is inserted into the active list twice. - Try to delete ets drr class' qdisc while still keeping it in the active list - Try to add ets class to the active list twice [1] https://lore.kernel.org/netdev/202511281519...
```diff diff --git a/tools/testing/selftests/tc-testing/tc-tests/infra/qdiscs.json b/tools/testing/selftests/tc-testing/tc-tests/infra/qdiscs.json index 47de27fd4f90..6a39640aa2a8 100644 --- a/tools/testing/selftests/tc-testing/tc-tests/infra/qdiscs.json +++ b/tools/testing/selftests/tc-testing/tc-tests/infra/qdiscs.js...
b1e125ae425aba9b45252e933ca8df52a843ec70
Analyze and fix the following issue in the Linux kernel code: net/sched: ets: Remove drr class from the active list if it changes to strict
Problem Details: Whenever a user issues an ets qdisc change command, transforming a drr class into a strict one, the ets code isn't checking whether that class was in the active list and removing it. This means that, if a user changes a strict class (which was in the active list) back to a drr one, that class will be a...
```diff diff --git a/net/sched/sch_ets.c b/net/sched/sch_ets.c index ae46643e596d..306e046276d4 100644 --- a/net/sched/sch_ets.c +++ b/net/sched/sch_ets.c @@ -664,6 +664,10 @@ static int ets_qdisc_change(struct Qdisc *sch, struct nlattr *opt, q->classes[i].deficit = quanta[i]; } } + for (i = q->nstrict; i < ns...
8a11ff0948b5ad09b71896b7ccc850625f9878d1
Analyze and fix the following issue in the Linux kernel code: caif: fix integer underflow in cffrml_receive()
Problem Details: The cffrml_receive() function extracts a length field from the packet header and, when FCS is disabled, subtracts 2 from this length without validating that len >= 2. If an attacker sends a malicious packet with a length field of 0 or 1 to an interface with FCS disabled, the subtraction causes an inte...
```diff diff --git a/net/caif/cffrml.c b/net/caif/cffrml.c index 6651a8dc62e0..d4d63586053a 100644 --- a/net/caif/cffrml.c +++ b/net/caif/cffrml.c @@ -92,8 +92,15 @@ static int cffrml_receive(struct cflayer *layr, struct cfpkt *pkt) len = le16_to_cpu(tmp); /* Subtract for FCS on length if FCS is not used. */ - if...
0c8b9a68b344ba2aa327278688d66c31f5f04275
Analyze and fix the following issue in the Linux kernel code: selftests: forwarding: vxlan_bridge_1q_mc_ul: Fix flakiness
Problem Details: This test runs an overlay traffic, forwarded over a multicast-routed VXLAN underlay. In order to determine whether packets reach their intended destination, it uses a TC match. For convenience, it uses a flower match, which however does not allow matching on the encapsulated packet. So various service ...
```diff diff --git a/tools/testing/selftests/net/forwarding/config b/tools/testing/selftests/net/forwarding/config index ce64518aaa11..75a6c3d3c1da 100644 --- a/tools/testing/selftests/net/forwarding/config +++ b/tools/testing/selftests/net/forwarding/config @@ -29,6 +29,7 @@ CONFIG_NET_ACT_VLAN=m CONFIG_NET_CLS_BASIC...
e33a6abdb744e3a015dd53e997c690081a8b985d
Analyze and fix the following issue in the Linux kernel code: ALSA: hda: cix-ipbloq: Use modern PM ops
Problem Details: When building without CONFIG_PM_SLEEP, there are several warnings (or errors with CONFIG_WERROR=y / W=e) from the cix-ipbloq driver: sound/hda/controllers/cix-ipbloq.c:378:12: error: 'cix_ipbloq_hda_runtime_resume' defined but not used [-Werror=unused-function] 378 | static int cix_ipbloq_hda_ru...
```diff diff --git a/sound/hda/controllers/cix-ipbloq.c b/sound/hda/controllers/cix-ipbloq.c index cc9153692ef5..99f9f48e91d4 100644 --- a/sound/hda/controllers/cix-ipbloq.c +++ b/sound/hda/controllers/cix-ipbloq.c @@ -407,10 +407,10 @@ static int cix_ipbloq_hda_runtime_resume(struct device *dev) } static const str...
601cc399a01049efa76be8f496541315dc9cf914
Analyze and fix the following issue in the Linux kernel code: mm: memfd_luo: add CONFIG_SHMEM dependency
Problem Details: The new memfd code fails to link without SHMEM: aarch64-linux-ld: mm/memfd_luo.o: in function `memfd_luo_retrieve_folios': memfd_luo.c:(.text.memfd_luo_retrieve_folios+0xdc): undefined reference to `shmem_add_to_page_cache' memfd_luo.c:(.text.memfd_luo_retrieve_folios+0x11c): undefined reference to `s...
```diff diff --git a/kernel/liveupdate/Kconfig b/kernel/liveupdate/Kconfig index 9b2515f31afb..d2aeaf13c3ac 100644 --- a/kernel/liveupdate/Kconfig +++ b/kernel/liveupdate/Kconfig @@ -54,6 +54,7 @@ config KEXEC_HANDOVER_ENABLE_DEFAULT config LIVEUPDATE bool "Live Update Orchestrator" depends on KEXEC_HANDOVER + dep...
402736a591b040360d36cfc27f6c371103177641
Analyze and fix the following issue in the Linux kernel code: mm: shmem: avoid build warning for CONFIG_SHMEM=n
Problem Details: The newly added 'flags' variable is unused and causes a warning if CONFIG_SHMEM is disabled, since the shmem_acct_size() macro it is passed into does nothing: mm/shmem.c: In function '__shmem_file_setup': mm/shmem.c:5816:23: error: unused variable 'flags' [-Werror=unused-variable] 5816 | unsi...
```diff diff --git a/mm/shmem.c b/mm/shmem.c index 679721e48a87..3c0601d76317 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -5799,8 +5799,15 @@ EXPORT_SYMBOL_GPL(shmem_truncate_range); #define shmem_vm_ops generic_file_vm_ops #define shmem_anon_vm_ops generic_file_vm_ops #define shmem_file_operations ramfs_file...
2214ec4bf89d0fd27717322d3983a2f3b469c7f3
Analyze and fix the following issue in the Linux kernel code: ocfs2: fix memory leak in ocfs2_merge_rec_left()
Problem Details: In 'ocfs2_merge_rec_left()', do not reset 'left_path' to NULL after move, thus allowing 'ocfs2_free_path()' to free it before return. Link: https://lkml.kernel.org/r/20251205065159.392749-1-dmantipov@yandex.ru Fixes: 677b975282e4 ("ocfs2: Add support for cross extent block") Signed-off-by: Dmitry Anti...
```diff diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index 46da66a883e4..e3195b7e0cd0 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c @@ -3655,7 +3655,6 @@ static int ocfs2_merge_rec_left(struct ocfs2_path *right_path, * So we use the new rightmost path. */ ocfs2_mv_path(right_path, left_path); -...
7efb45f9685fd9292413f15ea1212f7077c4a35f
Analyze and fix the following issue in the Linux kernel code: ocfs2: invalidate inode if i_mode is zero after block read
Problem Details: A panic occurs in ocfs2_unlink due to WARN_ON(inode->i_nlink == 0) when handling a corrupted inode with i_mode=0 and i_nlink=0 in memory. This "zombie" inode is created because ocfs2_read_locked_inode proceeds even after ocfs2_validate_inode_block successfully validates a block that structurally looks...
```diff diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c index 5986d90b007e..ae938fb7c521 100644 --- a/fs/ocfs2/inode.c +++ b/fs/ocfs2/inode.c @@ -1461,6 +1461,14 @@ int ocfs2_validate_inode_block(struct super_block *sb, goto bail; } + if ((!di->i_links_count && !di->i_links_count_hi) || !di->i_mode) { + mlog(M...
76b9701a54a23fe45dc15aacace616cca9671823
Analyze and fix the following issue in the Linux kernel code: ocfs2: avoid -Wflex-array-member-not-at-end warning
Problem Details: -Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. Use the new TRAILING_OVERLAP() helper to fix the following warning: fs/ocfs2/xattr.c:52:41: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-ar...
```diff diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c index 610f1a89d962..55508389ce56 100644 --- a/fs/ocfs2/xattr.c +++ b/fs/ocfs2/xattr.c @@ -49,9 +49,13 @@ #include "ocfs2_trace.h" struct ocfs2_xattr_def_value_root { - struct ocfs2_xattr_value_root xv; - struct ocfs2_extent_rec er; + /* Must be last as it en...
752ba0976b25d69cfac55137573298bd5dd88aa2
Analyze and fix the following issue in the Linux kernel code: ocfs2: add ocfs2_emergency_state helper and apply to setattr
Problem Details: Patch series "ocfs2: Refactor read-only checks to use ocfs2_emergency_state", v4. Following the fix for the `make_bad_inode` validation failure (syzbot ID: b93b65ee321c97861072), this separate series introduces a new helper function, `ocfs2_emergency_state()`, to improve and centralize read-only and e...
```diff diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 21d797ccccd0..ddca292944d7 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -1136,6 +1136,12 @@ int ocfs2_setattr(struct mnt_idmap *idmap, struct dentry *dentry, attr->ia_valid & ATTR_GID ? from_kgid(&init_user_ns, attr->ia_gid) : 0); + stat...
e6b4d264c8c883d8451c7b5f20cd96ddf94af3ef
Analyze and fix the following issue in the Linux kernel code: args: fix documentation to reflect the correct numbers
Problem Details: The macro uses up to 15 arguments. Reflect this in the top level comment. Link: https://lkml.kernel.org/r/20251201201018.765475-1-andriy.shevchenko@linux.intel.com Fixes: d51e783c17ba ("lsm: count the LSMs enabled at compile time") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Re...
```diff diff --git a/include/linux/args.h b/include/linux/args.h index 2e8e65d975c7..0562dc51435e 100644 --- a/include/linux/args.h +++ b/include/linux/args.h @@ -6,9 +6,9 @@ /* * How do these macros work? * - * In __COUNT_ARGS() _0 to _12 are just placeholders from the start + * In __COUNT_ARGS() _0 to _15 are ju...
039bef30e320827bac8990c9f29d2a68cd8adb5f
Analyze and fix the following issue in the Linux kernel code: ocfs2: fix kernel BUG in ocfs2_find_victim_chain
Problem Details: syzbot reported a kernel BUG in ocfs2_find_victim_chain() because the `cl_next_free_rec` field of the allocation chain list (next free slot in the chain list) is 0, triggring the BUG_ON(!cl->cl_next_free_rec) condition in ocfs2_find_victim_chain() and panicking the kernel. To fix this, an if condition...
```diff diff --git a/fs/ocfs2/suballoc.c b/fs/ocfs2/suballoc.c index 4b9d0ecd0981..8e6e5235b30c 100644 --- a/fs/ocfs2/suballoc.c +++ b/fs/ocfs2/suballoc.c @@ -1993,6 +1993,16 @@ static int ocfs2_claim_suballoc_bits(struct ocfs2_alloc_context *ac, } cl = (struct ocfs2_chain_list *) &fe->id2.i_chain; + if (!le16_to...
bf2c7bf5c48303b76f20537238292571e6aa29f3
Analyze and fix the following issue in the Linux kernel code: liveupdate: luo_core: fix redundant bound check in luo_ioctl()
Problem Details: The kernel test robot reported a Smatch warning: kernel/liveupdate/luo_core.c:402 luo_ioctl() warn: unsigned 'nr' is never less than zero. This occurs because 'nr' is unsigned and LIVEUPDATE_CMD_BASE is currently defined as 0, making the check (nr < LIVEUPDATE_CMD_BASE) always false. Remove the expli...
```diff diff --git a/kernel/liveupdate/luo_core.c b/kernel/liveupdate/luo_core.c index f7ecaf7740d1..944663d99dd9 100644 --- a/kernel/liveupdate/luo_core.c +++ b/kernel/liveupdate/luo_core.c @@ -399,10 +399,8 @@ static long luo_ioctl(struct file *filep, unsigned int cmd, unsigned long arg) int err; nr = _IOC_NR(c...
2a4f33430e96d0bebfa37b1d586098f61f030b06
Analyze and fix the following issue in the Linux kernel code: ocfs2: validate inline xattr size and entry count in ocfs2_xattr_ibody_list
Problem Details: Add comprehensive validation of inline xattr metadata in ocfs2_xattr_ibody_list() to prevent out-of-bounds access and use-after-free bugs when processing corrupted inline xattrs. The patch adds two critical validations: 1. Validates i_xattr_inline_size before use: - Ensures it does not exceed bloc...
```diff diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c index 73c028f452ac..610f1a89d962 100644 --- a/fs/ocfs2/xattr.c +++ b/fs/ocfs2/xattr.c @@ -971,13 +971,39 @@ static int ocfs2_xattr_ibody_list(struct inode *inode, struct ocfs2_xattr_header *header = NULL; struct ocfs2_inode_info *oi = OCFS2_I(inode); int re...
d86fea4294cb7878e3866eb567ee803d180a159b
Analyze and fix the following issue in the Linux kernel code: ocfs2: replace deprecated strcpy with strscpy
Problem Details: strcpy() has been deprecated [1] because it performs no bounds checking on the destination buffer, which can lead to buffer overflows. Replace it with the safer strscpy(). No functional changes. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strcpy [1] Link: https://lkml.kernel...
```diff diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index ba26d21344bd..46da66a883e4 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c @@ -10,6 +10,7 @@ #include <linux/fs.h> #include <linux/types.h> #include <linux/slab.h> +#include <linux/string.h> #include <linux/highmem.h> #include <linux/swap.h> #inc...
4ac577ae741e745ecfb64c5a9c7f52fc36aca022
Analyze and fix the following issue in the Linux kernel code: ocfs2: check tl_used after reading it from trancate log inode
Problem Details: The fuzz image has a truncate log inode whose tl_used is bigger than tl_count so it triggers the BUG in ocfs2_truncate_log_needs_flush() [1]. As what the check in ocfs2_truncate_log_needs_flush() does, just do same check into ocfs2_get_truncate_log_info() when truncate log inode is reading in so we ca...
```diff diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index 162711cc5b20..ba26d21344bd 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c @@ -6164,7 +6164,7 @@ static int ocfs2_get_truncate_log_info(struct ocfs2_super *osb, struct buffer_head *bh = NULL; struct ocfs2_dinode *di; struct ocfs2_truncate_log *tl...
b2135d1cb0e368dcdb8631ed2f232caefbd7711f
Analyze and fix the following issue in the Linux kernel code: liveupdate: luo_file: don't use invalid list iterator
Problem Details: If we exit a list_for_each_entry() without hitting a break then the list iterator points to an offset from the list_head. It's a non-NULL but invalid pointer and dereferencing it isn't allowed. Introduce a new "found" variable to test instead. Link: https://lkml.kernel.org/r/aSlMc4SS09Re4_xn@stanley...
```diff diff --git a/kernel/liveupdate/luo_file.c b/kernel/liveupdate/luo_file.c index ddff87917b21..a32a777f6df8 100644 --- a/kernel/liveupdate/luo_file.c +++ b/kernel/liveupdate/luo_file.c @@ -554,17 +554,20 @@ int luo_retrieve_file(struct luo_file_set *file_set, u64 token, { struct liveupdate_file_op_args args = ...
72e24456a54fe04710d89626cc5a88703e2f6202
Analyze and fix the following issue in the Linux kernel code: Revert "drm/amd/display: Fix pbn to kbps Conversion"
Problem Details: Deeply daisy chained DP/MST displays are no longer able to light up. This reverts commit e0dec00f3d05 ("drm/amd/display: Fix pbn to kbps Conversion") Cc: Jerry Zuo <jerry.zuo@amd.com> Reported-by: nat@nullable.se Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4756 Signed-off-by: Mario Limonci...
```diff diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c index dbd1da4d85d3..5e92eaa67aa3 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c @@ -8...