id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
37e7b536061a33c8f27030e3ffc5a717a6c319e3
Analyze and fix the following issue in the Linux kernel code: pinctrl: qcom: glymur: Drop unnecessary platform data from match table
Problem Details: The platform specific configuration is already passed on to the generic msm probe. So it's useless to exist in the match table next to the compatible. So drop it from match table. Fixes: 87ebcd8baebf ("pinctrl: qcom: Add glymur pinctrl driver") Signed-off-by: Abel Vesa <abel.vesa@linaro.org> Reviewed-...
```diff diff --git a/drivers/pinctrl/qcom/pinctrl-glymur.c b/drivers/pinctrl/qcom/pinctrl-glymur.c index 9913f98e9531..9781e7fcb3a1 100644 --- a/drivers/pinctrl/qcom/pinctrl-glymur.c +++ b/drivers/pinctrl/qcom/pinctrl-glymur.c @@ -1743,7 +1743,7 @@ static const struct msm_pinctrl_soc_data glymur_tlmm = { }; static ...
0e53b0bcad00107ce82968e86ca11a23f8a91f48
Analyze and fix the following issue in the Linux kernel code: arm64: dts: marvell: pxa1908: Add power domains
Problem Details: Update the APMU clock controller's compatible to allow the new power domain driver to probe. Also add the first two power domain consumers: IOMMU (fixes probing) and framebuffer. Signed-off-by: Duje Mihanović <duje@dujemihanovic.xyz>
```diff diff --git a/arch/arm64/boot/dts/marvell/mmp/pxa1908-samsung-coreprimevelte.dts b/arch/arm64/boot/dts/marvell/mmp/pxa1908-samsung-coreprimevelte.dts index 10e6730d71b6..b2ce5edd9c6a 100644 --- a/arch/arm64/boot/dts/marvell/mmp/pxa1908-samsung-coreprimevelte.dts +++ b/arch/arm64/boot/dts/marvell/mmp/pxa1908-sams...
645d81b886484e689527e4f23ab8ff10133d7664
Analyze and fix the following issue in the Linux kernel code: arm64: dts: samsung,coreprimevelte: add SDIO
Problem Details: Set some basic properties of the SDIO card of the samsung,coreprimevelte smartphone. The SDIO is used as an interface for WiFi, Bluetooth and FM radio serviced by the Marvell 88W8777 (SD8777) chipset. Support for this chipset is currently not in-tree because the firmware is not available in linux-firm...
```diff diff --git a/arch/arm64/boot/dts/marvell/mmp/pxa1908-samsung-coreprimevelte.dts b/arch/arm64/boot/dts/marvell/mmp/pxa1908-samsung-coreprimevelte.dts index 0ac1a24dc410..fadc34c13398 100644 --- a/arch/arm64/boot/dts/marvell/mmp/pxa1908-samsung-coreprimevelte.dts +++ b/arch/arm64/boot/dts/marvell/mmp/pxa1908-sams...
6370a996f308ea3276030769b7482b346e7cc7c1
Analyze and fix the following issue in the Linux kernel code: ASoC: codecs: Fix gain setting ranges for Renesas IDT821034 codec
Problem Details: The gain ranges specified in Renesas IDT821034 codec documentation are [-3dB;+13dB] in the transmit path (ADC) and [-13dB;+3dB] in the receive path (DAC). Allthough the registers allow programming values outside those ranges, the signal S/N and distorsion are only guaranteed in the specified ranges. S...
```diff diff --git a/sound/soc/codecs/idt821034.c b/sound/soc/codecs/idt821034.c index a03d4e5e7d14..cab2f2eecdfb 100644 --- a/sound/soc/codecs/idt821034.c +++ b/sound/soc/codecs/idt821034.c @@ -548,14 +548,14 @@ end: return ret; } -static const DECLARE_TLV_DB_LINEAR(idt821034_gain_in, -6520, 1306); -#define IDT82...
f6b85f1cec503aadc2b260c7648a09433897df1f
Analyze and fix the following issue in the Linux kernel code: ARM: dts: mediatek: mt6582: add mt6582 compatible to timer
Problem Details: Bindings already have mt6582 compatible for timer, so add that to DTSI. While at it, remove clock-names property (which is not required by timer node) and fix node address. Signed-off-by: Cristian Cozzolino <cristian_ci@protonmail.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno...
```diff diff --git a/arch/arm/boot/dts/mediatek/mt6582.dtsi b/arch/arm/boot/dts/mediatek/mt6582.dtsi index 8a14dc1759d6..54d675ecb390 100644 --- a/arch/arm/boot/dts/mediatek/mt6582.dtsi +++ b/arch/arm/boot/dts/mediatek/mt6582.dtsi @@ -66,12 +66,11 @@ reg = <0x10007000 0x100>; }; - timer: timer@11008000 { - ...
8365a3e1fdc3e9a69114165877e0ca281ffdc8de
Analyze and fix the following issue in the Linux kernel code: arm64: dts: mediatek: mt7986-bpi-r3: Change fan PWM value for mid speed
Problem Details: Popular cheap PWM fans for this machine, like the ones coming in heatsink+fan combos will not work properly at the currently defined medium speed. Trying different pwm setting using a command echo $value > /sys/devices/platform/pwm-fan/hwmon/hwmon1/pwm1 I found: pwm1 value fan rotation speed...
```diff diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts index e7654dc9a1c9..19f538d160ab 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts +++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts @@ -42,7 +42,7 @@...
11fb1a82aefa6f7fea6ac82334edb5639b9927df
Analyze and fix the following issue in the Linux kernel code: firmware: arm_ffa: Add support for IMPDEF value in the memory access descriptor
Problem Details: FF-A v1.2 introduced 16 byte IMPLEMENTATION DEFINED value in the endpoint memory access descriptor to allow any sender could to specify an its any custom value for each receiver. Also this value must be specified by the receiver when retrieving the memory region. The sender must ensure it informs the r...
```diff diff --git a/drivers/firmware/arm_ffa/driver.c b/drivers/firmware/arm_ffa/driver.c index 65bf1685350a..c72ee4756585 100644 --- a/drivers/firmware/arm_ffa/driver.c +++ b/drivers/firmware/arm_ffa/driver.c @@ -649,6 +649,26 @@ static u16 ffa_memory_attributes_get(u32 func_id) return FFA_MEM_NORMAL | FFA_MEM_WRIT...
7557f189942571821a09879edfcdfdafefe4d67f
Analyze and fix the following issue in the Linux kernel code: binder: Fix missing kernel-doc entries in binder.c
Problem Details: Fix several kernel-doc warnings in `drivers/android/binder.c` caused by undocumented struct members and function parameters. In particular, add missing documentation for the `@thread` parameter in binder_free_buf_locked(). Signed-off-by: Kriish Sharma <kriish.sharma2006@gmail.com> Acked-by: Carlos Ll...
```diff diff --git a/drivers/android/binder.c b/drivers/android/binder.c index 8c99ceaa303b..3a09c54bc37b 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -2418,10 +2418,10 @@ err_fd_not_accepted: /** * struct binder_ptr_fixup - data to be fixed-up in target buffer - * @offset offset in targ...
99559e5bb4c6795824b6531ad61519c1d9500079
Analyze and fix the following issue in the Linux kernel code: rust_binder: don't delete FreezeListener if there are pending duplicates
Problem Details: When userspace issues commands to a freeze listener, it identifies it using a cookie. Normally this cookie uniquely identifies a freeze listener, but when userspace clears a listener with the intent of deleting it, it's allowed to "regret" clearing it and create a new freeze listener for the same node ...
```diff diff --git a/drivers/android/binder/freeze.rs b/drivers/android/binder/freeze.rs index 74bebb8d4d9b..e304aceca7f3 100644 --- a/drivers/android/binder/freeze.rs +++ b/drivers/android/binder/freeze.rs @@ -106,7 +106,16 @@ impl DeliverToRead for FreezeMessage { return Ok(true); } if ...
2a67955de13624ec17d1c2504d2c9eeb37933b77
Analyze and fix the following issue in the Linux kernel code: perf bpf_counter: Fix opening of "any"(-1) CPU events
Problem Details: The bperf BPF counter code doesn't handle "any"(-1) CPU events, always wanting to aggregate a count against a CPU, which avoids the need for atomics so let's not change that. Force evsels used for BPF counters to require a CPU when not in system-wide mode so that the "any"(-1) value isn't used during m...
```diff diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index 84e06ec09cc2..4314012846ba 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c @@ -2542,6 +2542,7 @@ int cmd_stat(int argc, const char **argv) unsigned int interval, timeout; const char * const stat_subcommands[] = {...
6090e612cf24393335e709105db31b6d6e36d6ef
Analyze and fix the following issue in the Linux kernel code: perf build python: Don't leave a.out file when building with clang
Problem Details: Testing clang features doesn't specify a "-o" option so an a.out file is created and left in the make directory (not the output). Fix this by specifying a "-o" of "/dev/null". Reorganize the code a little to help with readability. Signed-off-by: Ian Rogers <irogers@google.com> Tested-by: Justin Stitt ...
```diff diff --git a/tools/perf/util/setup.py b/tools/perf/util/setup.py index 9cae2c472f4a..b65b1792ca05 100644 --- a/tools/perf/util/setup.py +++ b/tools/perf/util/setup.py @@ -23,10 +23,17 @@ assert srctree, "Environment variable srctree, for the Linux sources, not set" src_feature_tests = f'{srctree}/tools/build/...
12690401a4393238c391b7a6a861a28d26374013
Analyze and fix the following issue in the Linux kernel code: perf stat: Additional verbose details for <not supported> events
Problem Details: If an event shows as "<not supported>" in perf stat output, in verbose mode add the strerror output to help diagnose the issue. Consider: ``` $ perf stat -e cycles,data_read,instructions true Performance counter stats for 'true': 357,457 cycles:u <not supported> MiB data_read:u ...
```diff diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index 7006f848f87a..84e06ec09cc2 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c @@ -624,8 +624,9 @@ static enum counter_recovery stat_handle_error(struct evsel *counter, int err) */ if (err == EINVAL || err == ENOSYS...
b1aabb8ef09b4cf0cc0c92ca9dfd19482f3192c1
Analyze and fix the following issue in the Linux kernel code: staging: gpib: Fix device reference leak in fmh_gpib driver
Problem Details: The fmh_gpib driver contains a device reference count leak in fmh_gpib_attach_impl() where driver_find_device() increases the reference count of the device by get_device() when matching but this reference is not properly decreased. Add put_device() in fmh_gpib_detach(), which ensures that the reference...
```diff diff --git a/drivers/staging/gpib/fmh_gpib/fmh_gpib.c b/drivers/staging/gpib/fmh_gpib/fmh_gpib.c index 164dcfc3c9ef..f7bfb4a8e553 100644 --- a/drivers/staging/gpib/fmh_gpib/fmh_gpib.c +++ b/drivers/staging/gpib/fmh_gpib/fmh_gpib.c @@ -1517,6 +1517,11 @@ void fmh_gpib_detach(struct gpib_board *board) re...
92a2b74a6b5a5d9b076cd9aa75e63c6461cbd073
Analyze and fix the following issue in the Linux kernel code: staging: gpib: Fix sending clear and trigger events
Problem Details: This driver was not sending device clear or trigger events when the board entered the DCAS or DTAS state respectively in device mode. DCAS is the Device Clear Active State which is entered on receiving a selective device clear message (SDC) or universal device clear message (DCL) from the controller i...
```diff diff --git a/drivers/staging/gpib/ni_usb/ni_usb_gpib.c b/drivers/staging/gpib/ni_usb/ni_usb_gpib.c index 4dec87d12687..ea44a766fda2 100644 --- a/drivers/staging/gpib/ni_usb/ni_usb_gpib.c +++ b/drivers/staging/gpib/ni_usb/ni_usb_gpib.c @@ -327,7 +327,10 @@ static void ni_usb_soft_update_status(struct gpib_board ...
d3c4c1f29aadccf2f43530bfa1e60a6d8030fd4a
Analyze and fix the following issue in the Linux kernel code: staging: gpib: Fix no EOI on 1 and 2 byte writes
Problem Details: EOI (End Or Identify) is a hardware line on the GPIB bus that can be asserted with the last byte of a message to indicate the end of the transfer to the receiving device. In this driver, a write with send_eoi true is done in 3 parts: Send first byte directly Send remaining but 1 bytes using the fi...
```diff diff --git a/drivers/staging/gpib/agilent_82350b/agilent_82350b.c b/drivers/staging/gpib/agilent_82350b/agilent_82350b.c index 94bbb3b6576d..01a5bb43cd2d 100644 --- a/drivers/staging/gpib/agilent_82350b/agilent_82350b.c +++ b/drivers/staging/gpib/agilent_82350b/agilent_82350b.c @@ -182,10 +182,12 @@ static int ...
d4f335b410ddbe3e99f48f8b5ea78a25041274f1
Analyze and fix the following issue in the Linux kernel code: gpiolib: rename GPIO chip printk macros
Problem Details: The chip_$level() macros take struct gpio_chip as argument so make it follow the convention of using the 'gpiochip_' prefix. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
```diff diff --git a/drivers/gpio/gpiolib-cdev.c b/drivers/gpio/gpiolib-cdev.c index 175836467f21..ddc452b5ee23 100644 --- a/drivers/gpio/gpiolib-cdev.c +++ b/drivers/gpio/gpiolib-cdev.c @@ -2823,7 +2823,7 @@ int gpiolib_cdev_register(struct gpio_device *gdev, dev_t devt) if (!gc) return -ENODEV; - chip_dbg(gc, ...
2e5d147ba90e887271297f69721d2d88122c7c4f
Analyze and fix the following issue in the Linux kernel code: arm64: dts: allwinner: t527: avaota-a1: enable second Ethernet port
Problem Details: On the Avaota A1 board, the second Ethernet controller, aka the GMAC200, is connected to a second external RTL8211F-CG PHY. The PHY uses an external 25MHz crystal, and has the SoC's PJ16 pin connected to its reset pin. Enable the second Ethernet port. Also fix up the label for the existing external PH...
```diff diff --git a/arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts b/arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts index 1b054fa8ef74..054d0357c139 100644 --- a/arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts +++ b/arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts @@ -13,6 +13,7 @@ ...
7076938d20d22d5f75641f417f11edeee192e3cf
Analyze and fix the following issue in the Linux kernel code: arm64: dts: allwinner: a527: cubie-a5e: Enable second Ethernet port
Problem Details: On the Radxa Cubie A5E board, the second Ethernet controller, aka the GMAC200, is connected to a second external Maxio MAE0621A PHY. The PHY uses an external 25MHz crystal, and has the SoC's PJ16 pin connected to its reset pin. Enable the second Ethernet port. Also fix up the label for the existing ex...
```diff diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts b/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts index f82a8d121697..bfdf1728cd14 100644 --- a/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts +++ b/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts @@ -14,6 +14,7 @@ ...
66233e583d1e00b1742d1ba36ae31568109ba6bd
Analyze and fix the following issue in the Linux kernel code: ALSA: hda/tas2781: Set tas2781_hda::tasdevice_priv::chip_id as TAS5825 in case of tas5825
Problem Details: The software reset for TAS5825 is different form other chips, as it will set as 0x11 instead of 0x1 during reset in the tasdevice_reset(). So set tas2781_hda::tasdevice_priv::chip_id as TAS5825, tasdevice_reset() can work correctly. Fixes: 7ceb69ca82b1 ("ASoC: tas2781: Add tas2118, tas2x20, tas5825 su...
```diff diff --git a/sound/hda/codecs/side-codecs/tas2781_hda_i2c.c b/sound/hda/codecs/side-codecs/tas2781_hda_i2c.c index a126f04c3ed7..0357401a6023 100644 --- a/sound/hda/codecs/side-codecs/tas2781_hda_i2c.c +++ b/sound/hda/codecs/side-codecs/tas2781_hda_i2c.c @@ -669,6 +669,7 @@ static int tas2781_hda_i2c_probe(stru...
e2cc390a6629c76924a2740c54b144b9b28fca59
Analyze and fix the following issue in the Linux kernel code: iio: adc: ad7124: fix temperature channel
Problem Details: Fix temperature channel not working due to gain and offset not being initialized. For channels other than the voltage ones calibration is skipped (which is OK). However that results in the calibration register values tracked in st->channels[i].cfg all being zero. These zeros are later written to har...
```diff diff --git a/drivers/iio/adc/ad7124.c b/drivers/iio/adc/ad7124.c index 910b40393f77..61623cc6cb25 100644 --- a/drivers/iio/adc/ad7124.c +++ b/drivers/iio/adc/ad7124.c @@ -1525,10 +1525,6 @@ static int __ad7124_calibrate_all(struct ad7124_state *st, struct iio_dev *indio int ret, i; for (i = 0; i < st->num...
21553258b94861a73d7f2cf15469d69240e1170d
Analyze and fix the following issue in the Linux kernel code: iio:common:ssp_sensors: Fix an error handling path ssp_probe()
Problem Details: If an error occurs after a successful mfd_add_devices() call, it should be undone by a corresponding mfd_remove_devices() call, as already done in the remove function. Fixes: 50dd64d57eee ("iio: common: ssp_sensors: Add sensorhub driver") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.f...
```diff diff --git a/drivers/iio/common/ssp_sensors/ssp_dev.c b/drivers/iio/common/ssp_sensors/ssp_dev.c index 1e167dc673ca..da09c9f3ceb6 100644 --- a/drivers/iio/common/ssp_sensors/ssp_dev.c +++ b/drivers/iio/common/ssp_sensors/ssp_dev.c @@ -503,7 +503,7 @@ static int ssp_probe(struct spi_device *spi) ret = spi_setu...
bd886cdcbf9e746f61c74035a3acd42e9108e115
Analyze and fix the following issue in the Linux kernel code: iio: adc: ad7280a: fix ad7280_store_balance_timer()
Problem Details: Use correct argument to iio_str_to_fixpoint() to parse 3 decimal places. iio_str_to_fixpoint() has a bit of an unintuitive API where the fract_mult parameter is the multiplier of the first decimal place as if it was already an integer. So to get 3 decimal places, fract_mult must be 100 rather than 10...
```diff diff --git a/drivers/iio/adc/ad7280a.c b/drivers/iio/adc/ad7280a.c index dda2986ccda0..50a6ff7c8b1c 100644 --- a/drivers/iio/adc/ad7280a.c +++ b/drivers/iio/adc/ad7280a.c @@ -541,7 +541,7 @@ static ssize_t ad7280_store_balance_timer(struct iio_dev *indio_dev, int val, val2; int ret; - ret = iio_str_to_fix...
3db847df994d475db7812dde90376f2848bcd30a
Analyze and fix the following issue in the Linux kernel code: iio: buffer-dmaengine: enable .get_dma_dev()
Problem Details: Wire up the .get_dma_dev() callback to use the DMA buffer infrastructure's implementation. This ensures that DMABUF operations use the correct DMA device for mapping, which is essential for proper operation on systems where memory is mapped above the 32-bit range. Without this callback, the core would...
```diff diff --git a/drivers/iio/buffer/industrialio-buffer-dmaengine.c b/drivers/iio/buffer/industrialio-buffer-dmaengine.c index e9d9a7d39fe1..27dd56334345 100644 --- a/drivers/iio/buffer/industrialio-buffer-dmaengine.c +++ b/drivers/iio/buffer/industrialio-buffer-dmaengine.c @@ -177,6 +177,8 @@ static const struct i...
0bf1bfde53b30da7fd7f4a6c3db5b8e77888958d
Analyze and fix the following issue in the Linux kernel code: iio: pressure: bmp280: correct meas_time_us calculation
Problem Details: Correction of meas_time_us initialization based on an observation and partial patch by David Lechner. The constant part of the measurement time (as described in the datasheet and implemented in the BM(P/E)2 Sensor API) was apparently forgotten (it was already correctly applied for the BMP380) and is n...
```diff diff --git a/drivers/iio/pressure/bmp280-core.c b/drivers/iio/pressure/bmp280-core.c index c04e8bb4c993..d983ce9c0b99 100644 --- a/drivers/iio/pressure/bmp280-core.c +++ b/drivers/iio/pressure/bmp280-core.c @@ -1040,13 +1040,16 @@ static int bmp280_wait_conv(struct bmp280_data *data) unsigned int reg, meas_ti...
8a6b7989ff0cd0a95c93be1927f2af7ad10f28de
Analyze and fix the following issue in the Linux kernel code: iio: adc: stm32-dfsdm: fix st,adc-alt-channel property handling
Problem Details: Initially st,adc-alt-channel property was defined as an enum in the DFSDM binding. The DFSDM binding has been changed to use the new IIO backend framework, along with the adoption of IIO generic channels. In this new binding st,adc-alt-channel is defined as a boolean property, but it is still handled h...
```diff diff --git a/drivers/iio/adc/stm32-dfsdm-adc.c b/drivers/iio/adc/stm32-dfsdm-adc.c index 74b1b4dc6e81..9664b9bd75d4 100644 --- a/drivers/iio/adc/stm32-dfsdm-adc.c +++ b/drivers/iio/adc/stm32-dfsdm-adc.c @@ -725,9 +725,8 @@ static int stm32_dfsdm_generic_channel_parse_of(struct stm32_dfsdm *dfsdm, } df_ch->s...
632757312d7eb320b66ca60e0cfe098ec53cee08
Analyze and fix the following issue in the Linux kernel code: iio: adc: ad7380: fix SPI offload trigger rate
Problem Details: Add a special case to double the SPI offload trigger rate when all channels of a single-ended chip are enabled in a buffered read. The single-ended chips in the AD738x family can only do simultaneous sampling of half their channels and have a multiplexer to allow reading the other half. To comply with...
```diff diff --git a/drivers/iio/adc/ad7380.c b/drivers/iio/adc/ad7380.c index fa251dc1aae6..bfd908deefc0 100644 --- a/drivers/iio/adc/ad7380.c +++ b/drivers/iio/adc/ad7380.c @@ -1227,6 +1227,14 @@ static int ad7380_offload_buffer_postenable(struct iio_dev *indio_dev) if (ret) return ret; + /* + * When the sequ...
9b45744bf09fc2a3287e05287141d6e123c125a7
Analyze and fix the following issue in the Linux kernel code: iio: adc: rtq6056: Correct the sign bit index
Problem Details: The vshunt/current reported register is a signed 16bit integer. The sign bit index should be '15', not '16'. Fixes: 4396f45d211b ("iio: adc: Add rtq6056 support") Reported-by: Andy Hsu <andy_ya_hsu@wiwynn.com> Signed-off-by: ChiYuan Huang <cy_huang@richtek.com> Reviewed-by: David Lechner <dlechner@bay...
```diff diff --git a/drivers/iio/adc/rtq6056.c b/drivers/iio/adc/rtq6056.c index ad9738228b7f..2bf3a09ac6b0 100644 --- a/drivers/iio/adc/rtq6056.c +++ b/drivers/iio/adc/rtq6056.c @@ -300,7 +300,7 @@ static int rtq6056_adc_read_channel(struct rtq6056_priv *priv, return IIO_VAL_INT; case RTQ6056_REG_SHUNTVOLT: cas...
ffc74ad539136ae9e16f7b5f2e4582e88018cd49
Analyze and fix the following issue in the Linux kernel code: iio: adc: ad4030: Fix _scale value for common-mode channels
Problem Details: Previously, the driver always used the amount of precision bits of differential input channels to provide the scale to mV. Though, differential and common-mode voltage channels have different amount of precision bits and the correct number of precision bits must be considered to get to a proper mV scal...
```diff diff --git a/drivers/iio/adc/ad4030.c b/drivers/iio/adc/ad4030.c index 1bc2f9a22470..d8bee6a4215a 100644 --- a/drivers/iio/adc/ad4030.c +++ b/drivers/iio/adc/ad4030.c @@ -385,7 +385,7 @@ static int ad4030_get_chan_scale(struct iio_dev *indio_dev, struct ad4030_state *st = iio_priv(indio_dev); const struct i...
51cb04abd39097209b871e95ffa7e8584ce7dcba
Analyze and fix the following issue in the Linux kernel code: dt-bindings: usb: qcom,snps-dwc3: Fix bindings for X1E80100
Problem Details: Add the missing multiport controller binding to target list. Fix minItems for interrupt-names to avoid the following error on High Speed controller: usb@a200000: interrupt-names: ['dwc_usb3', 'pwr_event', 'dp_hs_phy_irq', 'dm_hs_phy_irq'] is too short Fixes: 6e762f7b8edc ("dt-bindings: usb: Introduc...
```diff diff --git a/Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml b/Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml index dfd084ed9024..d49a58d5478f 100644 --- a/Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml +++ b/Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml @@ -68,6 +68,...
dddc0f71485f1f29f236e387632181bcc09019a0
Analyze and fix the following issue in the Linux kernel code: usb: misc: Add x86 dependency for Intel USBIO driver
Problem Details: The Intel USBIO driver is x86 only, other architectures have ACPI so add an appropriate depenecy plus compile test. Fixes: 121a0f839dbb3 ("usb: misc: Add Intel USBIO bridge driver") Signed-off-by: Peter Robinson <pbrobinson@gmail.com> Reviewed-by: Hans de Goede <hansg@kernel.org> Signed-off-by: Greg K...
```diff diff --git a/drivers/usb/misc/Kconfig b/drivers/usb/misc/Kconfig index 09ac6f1c985f..0b56b773dbdf 100644 --- a/drivers/usb/misc/Kconfig +++ b/drivers/usb/misc/Kconfig @@ -182,6 +182,7 @@ config USB_LJCA config USB_USBIO tristate "Intel USBIO Bridge support" depends on USB && ACPI + depends on X86 || COMPIL...
bd8c3ce6d7a205b3ba3ef9815db4c6932290ec59
Analyze and fix the following issue in the Linux kernel code: dt-bindings: usb: switch: split out ports definition
Problem Details: The ports definition currently defined in the usb-switch.yaml fits standards devices which are either recipient of altmode muxing and orientation switching events or an element of the USB Super Speed data lanes. This doesn't necessarely fit combo PHYs like the Qualcomm USB3/DP Combo which has a differ...
```diff diff --git a/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml b/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml index 6a47e08e0e97..f9cffbb2df07 100644 --- a/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml +++ b/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.ya...
b8719569a0971f971a117c67c462360d7bbc0fcc
Analyze and fix the following issue in the Linux kernel code: dt-bindings: iio: accel: bosch,bma220 setup SPI clock mode
Problem Details: Assert CPOL for a high-idle clock signal and CPHA for sampling on the trailing (rising) edge. Quoting from the datasheet: "During the transitions on CSB, SCK must be high. SDI and SDO are driven at the falling edge of SCK and should be captured at the rising edge of SCK." The sensor does not func...
```diff diff --git a/Documentation/devicetree/bindings/iio/accel/bosch,bma220.yaml b/Documentation/devicetree/bindings/iio/accel/bosch,bma220.yaml index da047258aca3..0e27ec74065a 100644 --- a/Documentation/devicetree/bindings/iio/accel/bosch,bma220.yaml +++ b/Documentation/devicetree/bindings/iio/accel/bosch,bma220.ya...
0b028373f87a354ad5f7665034f71007b8f3d9e2
Analyze and fix the following issue in the Linux kernel code: iio: adc: ad7124: use devm_mutex_init()
Problem Details: Use devm_mutex_init() to initialize the mutex to handle automatically freeing in debug builds. Signed-off-by: David Lechner <dlechner@baylibre.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
```diff diff --git a/drivers/iio/adc/ad7124.c b/drivers/iio/adc/ad7124.c index b13a7824ae01..dff935360e6d 100644 --- a/drivers/iio/adc/ad7124.c +++ b/drivers/iio/adc/ad7124.c @@ -1486,7 +1486,10 @@ static int ad7124_setup(struct ad7124_state *st) st->adc_control &= ~AD7124_ADC_CONTROL_MODE; st->adc_control |= FIELD...
2758246d287549e1088eae350654160cbf4d424f
Analyze and fix the following issue in the Linux kernel code: usb: dwc3: Don't call clk_bulk_disable_unprepare() twice
Problem Details: devm_clk_bulk_get_all_enabled() is used in the probe, so clk_bulk_disable_unprepare() should not be called explicitly in the remove function. Fixes: e0b6dc00c701 ("usb: dwc3: add generic driver to support flattened") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Acked-by: Thinh Ngu...
```diff diff --git a/drivers/usb/dwc3/dwc3-generic-plat.c b/drivers/usb/dwc3/dwc3-generic-plat.c index d96b20570002..f8ad79c08c4e 100644 --- a/drivers/usb/dwc3/dwc3-generic-plat.c +++ b/drivers/usb/dwc3/dwc3-generic-plat.c @@ -85,11 +85,8 @@ static int dwc3_generic_probe(struct platform_device *pdev) static void dwc3_...
268eb6fb908bc82ce479e4dba9a2cad11f536c9c
Analyze and fix the following issue in the Linux kernel code: dt-bindings: usb: dwc3-imx8mp: dma-range is required only for imx8mp
Problem Details: Only i.MX8MP need dma-range property to let USB controller work properly. Remove dma-range from required list and add limitation for imx8mp. Fixes: d2a704e29711 ("dt-bindings: usb: dwc3-imx8mp: add imx8mp dwc3 glue bindings") Cc: stable <stable@kernel.org> Reviewed-by: Jun Li <jun.li@nxp.com> Signed-o...
```diff diff --git a/Documentation/devicetree/bindings/usb/fsl,imx8mp-dwc3.yaml b/Documentation/devicetree/bindings/usb/fsl,imx8mp-dwc3.yaml index baf130669c38..73e7a60a0060 100644 --- a/Documentation/devicetree/bindings/usb/fsl,imx8mp-dwc3.yaml +++ b/Documentation/devicetree/bindings/usb/fsl,imx8mp-dwc3.yaml @@ -89,13...
30cd2cb1abf4c4acdb1ddb468c946f68939819fb
Analyze and fix the following issue in the Linux kernel code: usb: typec: ucsi: Handle incorrect num_connectors capability
Problem Details: The UCSI spec states that the num_connectors field is 7 bits, and the 8th bit is reserved and should be set to zero. Some buggy FW has been known to set this bit, and it can lead to a system not booting. Flag that the FW is not behaving correctly, and auto-fix the value so that the system boots correct...
```diff diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c index 3f568f790f39..3995483a0aa0 100644 --- a/drivers/usb/typec/ucsi/ucsi.c +++ b/drivers/usb/typec/ucsi/ucsi.c @@ -1807,6 +1807,12 @@ static int ucsi_init(struct ucsi *ucsi) ret = -ENODEV; goto err_reset; } + /* Check if reserve...
5570ad1423ee60f6e972dadb63fb2e5f90a54cbe
Analyze and fix the following issue in the Linux kernel code: USB: Fix descriptor count when handling invalid MBIM extended descriptor
Problem Details: In cdc_parse_cdc_header(), the check for the USB_CDC_MBIM_EXTENDED_TYPE descriptor was using 'break' upon detecting an invalid length. This was incorrect because 'break' only exits the switch statement, causing the code to fall through to cnt++, thus incorrectly incrementing the count of parsed descri...
```diff diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index d2b2787be409..6138468c67c4 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c @@ -2431,7 +2431,7 @@ int cdc_parse_cdc_header(struct usb_cdc_parsed_header *hdr, break; case USB_CDC_MBIM_EXTENDED_TYPE: if (...
5ec6f9434225e18496a393f920b03eb46d67d71d
Analyze and fix the following issue in the Linux kernel code: ALSA: hda/realtek: Add quirk entry for HP ZBook 17 G6
Problem Details: HP ZBook 17 G6 with SSID 103c:860c requires a similar workaround as its 15-inch model in order to make the speaker and mute LED working. Add the corresponding quirk entry to address it. Link: https://bugzilla.kernel.org/show_bug.cgi?id=220372 Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <t...
```diff diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c index 214eb9df6ef8..6b9e5c091bf3 100644 --- a/sound/hda/codecs/realtek/alc269.c +++ b/sound/hda/codecs/realtek/alc269.c @@ -6397,6 +6397,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x103c, 0x854a, "H...
12d724f2852d094d68dccaf5101e0ef89a971cde
Analyze and fix the following issue in the Linux kernel code: ata: libata-core: relax checks in ata_read_log_directory()
Problem Details: Commit 6d4405b16d37 ("ata: libata-core: Cache the general purpose log directory") introduced caching of a device general purpose log directory to avoid repeated access to this log page during device scan. This change also added a check on this log page to verify that the log page version is 0x0001 as m...
```diff diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index ff53f5f029b4..2a210719c4ce 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -2174,13 +2174,10 @@ static int ata_read_log_directory(struct ata_device *dev) } version = get_unaligned_le16(&dev->gp_log_dir[0]); ...
1c1b2a247c384179fcc97b63bb0c17e112217d7a
Analyze and fix the following issue in the Linux kernel code: usb: typec: tipd: Fix error handling in cd321x_read_data_status
Problem Details: Right now cd321x_read_data_status always returns true even if it encounters any errors: tps6598x_read_data_status returns a boolean but we treated it as an errno and then we have a bunch of dev_errs in case tps6598x_block_read fails but just continue along and return true. Fix that to correctly report ...
```diff diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c index 2b1049c9a6f3..d0c86347251c 100644 --- a/drivers/usb/typec/tipd/core.c +++ b/drivers/usb/typec/tipd/core.c @@ -577,30 +577,36 @@ static bool cd321x_read_data_status(struct tps6598x *tps) int ret; ret = tps6598x_read_data_statu...
09bf21bf5249880f62fe759b53b14b4b52900c6c
Analyze and fix the following issue in the Linux kernel code: usbip: Fix locking bug in RT-enabled kernels
Problem Details: Interrupts are disabled before entering usb_hcd_giveback_urb(). A spinlock_t becomes a sleeping lock on PREEMPT_RT, so it cannot be acquired with disabled interrupts. Save the interrupt status and restore it after usb_hcd_giveback_urb(). syz reported: BUG: sleeping function called from invalid contex...
```diff diff --git a/drivers/usb/usbip/vhci_hcd.c b/drivers/usb/usbip/vhci_hcd.c index 0d6c10a8490c..f7e405abe608 100644 --- a/drivers/usb/usbip/vhci_hcd.c +++ b/drivers/usb/usbip/vhci_hcd.c @@ -831,15 +831,15 @@ out: no_need_xmit: usb_hcd_unlink_urb_from_ep(hcd, urb); no_need_unlink: - spin_unlock_irqrestore(&vhci...
622c811052b3c36df10c91e46ba9d511d318ac77
Analyze and fix the following issue in the Linux kernel code: staging: axis-fifo: drop debug print of remapped base address
Problem Details: The probe function prints the remapped base address with dev_dbg(). This message is not useful and printing kernel addresses is discouraged, so remove the debug print. Signed-off-by: Ovidiu Panait <ovidiu.panait.oss@gmail.com> Link: https://lore.kernel.org/r/20250919195400.3180039-6-ovidiu.panait.oss@...
```diff diff --git a/drivers/staging/axis-fifo/axis-fifo.c b/drivers/staging/axis-fifo/axis-fifo.c index a06f7c76658a..509d620d6ce7 100644 --- a/drivers/staging/axis-fifo/axis-fifo.c +++ b/drivers/staging/axis-fifo/axis-fifo.c @@ -588,8 +588,6 @@ static int axis_fifo_probe(struct platform_device *pdev) if (IS_ERR(fif...
70d45d4b349bf8a876a01508f5fcd32245f572ae
Analyze and fix the following issue in the Linux kernel code: staging: rtl8723bs: wrap long comments in rtw_ap.c
Problem Details: This patch fixes instances of comment lines in rtw_ap.c that exceeded the recommended 80–100 character limit. The affected comments were reflowed to span multiple lines, each starting with " * " as per kernel coding style guidelines. These are coding style cleanups only. No functional changes. Signed...
```diff diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c b/drivers/staging/rtl8723bs/core/rtw_ap.c index 121b9db76711..b12b53a8b3be 100644 --- a/drivers/staging/rtl8723bs/core/rtw_ap.c +++ b/drivers/staging/rtl8723bs/core/rtw_ap.c @@ -655,9 +655,12 @@ void start_bss_network(struct adapter *padapter) cur_bwmode = ...
9aa392c25d1cd4013449264fd0c9aa3d86b91a1f
Analyze and fix the following issue in the Linux kernel code: staging: rtl8723bs: add spaces around '+' operator in rtw_ap.c
Problem Details: This patch fixes instances where the '+' operator was used without surrounding spaces. Kernel coding style requires spaces around binary operators to improve readability. This is a coding style cleanup only. No functional changes. Signed-off-by: Rohan Tripathi <trohan2000@gmail.com> Link: https://lor...
```diff diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c b/drivers/staging/rtl8723bs/core/rtw_ap.c index 4cd9b7a74313..121b9db76711 100644 --- a/drivers/staging/rtl8723bs/core/rtw_ap.c +++ b/drivers/staging/rtl8723bs/core/rtw_ap.c @@ -1445,7 +1445,7 @@ static void update_bcn_wps_ie(struct adapter *padapter) wps_i...
c318aef7f32678471c88ab528fd02b6f3f845280
Analyze and fix the following issue in the Linux kernel code: staging: rtl8723bs: fix lines starting with '(' in rtw_ap.c
Problem Details: This patch removes cases where code lines began with an opening parenthesis or alignment issue, which is against kernel coding style. The affected expressions have been reformatted so that continuation lines align with the opening parenthesis of the statement. This is a coding style cleanup only. No f...
```diff diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c b/drivers/staging/rtl8723bs/core/rtw_ap.c index 2faa1e14a039..4cd9b7a74313 100644 --- a/drivers/staging/rtl8723bs/core/rtw_ap.c +++ b/drivers/staging/rtl8723bs/core/rtw_ap.c @@ -477,14 +477,14 @@ void update_sta_info_apmode(struct adapter *padapter, struct st...
7550f96a57c8f8b649113aaa2cc4f87a755c866e
Analyze and fix the following issue in the Linux kernel code: staging: rtl8723bs: Fix operator spacing in rtw_security.c
Problem Details: This file has multiple style issues where spaces were missing around operators. Cleaned up the entire file by adding the required spacing around the arithmetic, logical, and comparison operators to improve readibility and adhere to the Linux kernel coding style guidelines. Signed-off-by: Sameeksha San...
```diff diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c b/drivers/staging/rtl8723bs/core/rtw_security.c index 3d99d045f4b6..b2c783ada49b 100644 --- a/drivers/staging/rtl8723bs/core/rtw_security.c +++ b/drivers/staging/rtl8723bs/core/rtw_security.c @@ -62,14 +62,14 @@ void rtw_wep_encrypt(struct adapter *pada...
1869a635ad2bb1bcffafae019b413a64c0bb023f
Analyze and fix the following issue in the Linux kernel code: staging: gpib: tms9914: Fix typo in comment
Problem Details: Fix a typo found by codespell. Signed-off-by: Akiyoshi Kurita <weibu@redadmin.org> Link: https://lore.kernel.org/r/20250923182502.2573049-1-weibu@redadmin.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/gpib/tms9914/tms9914.c b/drivers/staging/gpib/tms9914/tms9914.c index 0d11b80bb982..72a11596a35e 100644 --- a/drivers/staging/gpib/tms9914/tms9914.c +++ b/drivers/staging/gpib/tms9914/tms9914.c @@ -535,7 +535,7 @@ int tms9914_read(struct gpib_board *board, struct tms9914_priv *priv,...
d51ffb3b4135e8f7a5375ee42b3747fdddb8e9de
Analyze and fix the following issue in the Linux kernel code: staging: rtl8723bs: Add missing MODULE_DESCRIPTION()
Problem Details: Add missing MODULE_DESCRIPTION() macro to the RTL8723BS SDIO interface driver to fix the modpost warning. Fixes modpost warning: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/staging/rtl8723bs/r8723bs.o Signed-off-by: Josephine Pfeiffer <hi@josie.lol> Link: https://lore.kernel.org/r/20250...
```diff diff --git a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c index f3caaa857c86..1d0239eef114 100644 --- a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c +++ b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c @@ -490,3 +490,5 @@ static void __exit rtw_drv_halt(void) sdio_...
109ff654934a4752f8875ded672efd1fbfe4d31d
Analyze and fix the following issue in the Linux kernel code: counter: microchip-tcb-capture: Allow shared IRQ for multi-channel TCBs
Problem Details: Mark the interrupt as IRQF_SHARED to permit multiple counter channels to share the same TCB IRQ line. Each Timer/Counter Block (TCB) instance shares a single IRQ line among its three internal channels. When multiple counter channels (e.g., counter@0 and counter@1) within the same TCB are enabled, the ...
```diff diff --git a/drivers/counter/microchip-tcb-capture.c b/drivers/counter/microchip-tcb-capture.c index 1a299d1f350b..19d457ae4c3b 100644 --- a/drivers/counter/microchip-tcb-capture.c +++ b/drivers/counter/microchip-tcb-capture.c @@ -451,7 +451,7 @@ static void mchp_tc_irq_remove(void *ptr) static int mchp_tc_irq...
0843ba458439f38efdc14aa359c14ad0127edb01
Analyze and fix the following issue in the Linux kernel code: powerpc/fadump: skip parameter area allocation when fadump is disabled
Problem Details: Fadump allocates memory to pass additional kernel command-line argument to the fadump kernel. However, this allocation is not needed when fadump is disabled. So avoid allocating memory for the additional parameter area in such cases. Fixes: f4892c68ecc1 ("powerpc/fadump: allocate memory for additional...
```diff diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c index 5782e743fd27..4ebc333dd786 100644 --- a/arch/powerpc/kernel/fadump.c +++ b/arch/powerpc/kernel/fadump.c @@ -1747,6 +1747,9 @@ void __init fadump_setup_param_area(void) { phys_addr_t range_start, range_end; + if (!fw_dump.fadump_...
2743cf75f7c92d2a0a4acabd7aef1c17d98fe123
Analyze and fix the following issue in the Linux kernel code: powerpc, ocxl: Fix extraction of struct xive_irq_data
Problem Details: Commit cc0cc23babc9 ("powerpc/xive: Untangle xive from child interrupt controller drivers") changed xive_irq_data to be stashed to chip_data instead of handler_data. However, multiple places are still attempting to read xive_irq_data from handler_data and get a NULL pointer deference bug. Update them ...
```diff diff --git a/arch/powerpc/kvm/book3s_xive.c b/arch/powerpc/kvm/book3s_xive.c index 1302b5ac5672..89a1b8c21ab4 100644 --- a/arch/powerpc/kvm/book3s_xive.c +++ b/arch/powerpc/kvm/book3s_xive.c @@ -916,8 +916,7 @@ int kvmppc_xive_attach_escalation(struct kvm_vcpu *vcpu, u8 prio, * it fires once. */ if (sin...
ef3e73a917ec7d080e0fb0e4015098a4fb0f1cff
Analyze and fix the following issue in the Linux kernel code: powerpc/pseries/msi: Fix NULL pointer dereference at irq domain teardown
Problem Details: pseries_msi_ops_teardown() reads pci_dev* from msi_alloc_info_t. However, pseries_msi_ops_prepare() does not populate this structure, thus it is all zeros. Consequently, pseries_msi_ops_teardown() triggers a NULL pointer dereference crash. struct pci_dev is available in struct irq_domain. Read it ther...
```diff diff --git a/arch/powerpc/platforms/pseries/msi.c b/arch/powerpc/platforms/pseries/msi.c index 825f9432e03d..a82aaa786e9e 100644 --- a/arch/powerpc/platforms/pseries/msi.c +++ b/arch/powerpc/platforms/pseries/msi.c @@ -443,8 +443,7 @@ static int pseries_msi_ops_prepare(struct irq_domain *domain, struct device *...
5ee7313022100af4dce7fc9d725be5f61762bac5
Analyze and fix the following issue in the Linux kernel code: ARM: dts: aspeed: Fix max31785 fan properties
Problem Details: Remove non-existant fan properties from max31785 nodes. Signed-off-by: Eddie James <eajames@linux.ibm.com> Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
```diff diff --git a/arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-bonnell.dts b/arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-bonnell.dts index 2f5d4075a64a..a37399ff3cea 100644 --- a/arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-bonnell.dts +++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-bonnell.dts @@ -277,15 +277,11 @@ #size-cells ...
50c833c5cd9450c8c67d32883ea290dcbd633ea0
Analyze and fix the following issue in the Linux kernel code: memory: tegra30-emc: Add the SoC model prefix to functions
Problem Details: Replace "tegra_emc" with "tegra30_emc" in all functions to: 1. Avoid name clashing with other Tegra EMC drivers which makes it easier to jump to function definitions, 2. Decode the calltraces a bit easier, 3. Unify with other Tegra MC and EMC drivers, which use the SoC model prefixes. No functio...
```diff diff --git a/drivers/memory/tegra/tegra30-emc.c b/drivers/memory/tegra/tegra30-emc.c index cca386af423e..914116d8ec16 100644 --- a/drivers/memory/tegra/tegra30-emc.c +++ b/drivers/memory/tegra/tegra30-emc.c @@ -413,7 +413,7 @@ static int emc_seq_update_timing(struct tegra_emc *emc) return 0; } -static irqr...
5c8c19417c9777aba1bc9a1d93c95edec48d8b19
Analyze and fix the following issue in the Linux kernel code: memory: tegra20-emc: Add the SoC model prefix to functions
Problem Details: Replace "tegra_emc" with "tegra20_emc" in all functions to: 1. Avoid name clashing with other Tegra EMC drivers which makes it easier to jump to function definitions, 2. Decode the calltraces a bit easier, 3. Unify with other Tegra MC and EMC drivers, which use the SoC model prefixes. No functio...
```diff diff --git a/drivers/memory/tegra/tegra20-emc.c b/drivers/memory/tegra/tegra20-emc.c index 18e266dde5d2..398cb8ae2e38 100644 --- a/drivers/memory/tegra/tegra20-emc.c +++ b/drivers/memory/tegra/tegra20-emc.c @@ -232,7 +232,7 @@ struct tegra_emc { bool mrr_error; }; -static irqreturn_t tegra_emc_isr(int irq,...
4ebcacbb4447cd3b05289e1e0e199a5e8ea0c6de
Analyze and fix the following issue in the Linux kernel code: memory: tegra186-emc: Add the SoC model prefix to functions
Problem Details: Replace "tegra_emc" with "tegra186_emc" in all functions to: 1. Avoid name clashing with other Tegra EMC drivers which makes it easier to jump to function definitions, 2. Decode the calltraces a bit easier, 3. Unify with other Tegra MC and EMC drivers, which use the SoC model prefixes. No functi...
```diff diff --git a/drivers/memory/tegra/tegra186-emc.c b/drivers/memory/tegra/tegra186-emc.c index a0de80afe3e9..9959ad5804b4 100644 --- a/drivers/memory/tegra/tegra186-emc.c +++ b/drivers/memory/tegra/tegra186-emc.c @@ -218,20 +218,20 @@ static int tegra186_emc_get_emc_dvfs_latency(struct tegra186_emc *emc) } /*...
e6e50496b7e77613ed5b610877f34e1197ce62da
Analyze and fix the following issue in the Linux kernel code: memory: tegra124-emc: Add the SoC model prefix to functions
Problem Details: Replace "tegra_emc" with "tegra124_emc" in all functions to: 1. Avoid name clashing with other Tegra EMC drivers which makes it easier to jump to function definitions, 2. Decode the calltraces a bit easier, 3. Unify with other Tegra MC and EMC drivers, which use the SoC model prefixes. No functi...
```diff diff --git a/drivers/memory/tegra/tegra124-emc.c b/drivers/memory/tegra/tegra124-emc.c index f4d703103d9c..9978ff911c47 100644 --- a/drivers/memory/tegra/tegra124-emc.c +++ b/drivers/memory/tegra/tegra124-emc.c @@ -571,8 +571,8 @@ static void emc_seq_wait_clkchange(struct tegra_emc *emc) dev_err(emc->dev, "cl...
f398631b769c43fd3c575ad6270bb0109a04b85a
Analyze and fix the following issue in the Linux kernel code: memory: tegra124-emc: Simplify and handle deferred probe with dev_err_probe()
Problem Details: Certain calls, like clk_get, can cause probe deferral and driver should handle it. Use dev_err_probe() to fix that and also change other non-deferred errors cases to make the code simpler. Reviewed-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.or...
```diff diff --git a/drivers/memory/tegra/tegra124-emc.c b/drivers/memory/tegra/tegra124-emc.c index f3372bd78ce8..f4d703103d9c 100644 --- a/drivers/memory/tegra/tegra124-emc.c +++ b/drivers/memory/tegra/tegra124-emc.c @@ -1379,9 +1379,8 @@ static int tegra_emc_interconnect_init(struct tegra_emc *emc) remove_nodes: ...
a52ddb98a674b01b6b5f2da1ed70a9f30d539f6b
Analyze and fix the following issue in the Linux kernel code: memory: tegra186-emc: Simplify and handle deferred probe with dev_err_probe()
Problem Details: Certain calls, like clk_get, can cause probe deferral and driver should handle it. Use dev_err_probe() to fix that and also change other non-deferred errors cases to make the code simpler. Reviewed-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.or...
```diff diff --git a/drivers/memory/tegra/tegra186-emc.c b/drivers/memory/tegra/tegra186-emc.c index 00baa7ab8921..a0de80afe3e9 100644 --- a/drivers/memory/tegra/tegra186-emc.c +++ b/drivers/memory/tegra/tegra186-emc.c @@ -302,9 +302,8 @@ static int tegra_emc_interconnect_init(struct tegra186_emc *emc) remove_nodes:...
57c9f6e29ccd44db882b943df2e72a4e54ebe0e3
Analyze and fix the following issue in the Linux kernel code: memory: tegra20-emc: Simplify and handle deferred probe with dev_err_probe()
Problem Details: Certain calls, like clk_get, can cause probe deferral and driver should handle it. Use dev_err_probe() to fix that and also change other non-deferred errors cases to make the code simpler. Also fix missing new line in error message of devm_devfreq_add_device(). Reviewed-by: Jon Hunter <jonathanh@nvi...
```diff diff --git a/drivers/memory/tegra/tegra20-emc.c b/drivers/memory/tegra/tegra20-emc.c index a34636a1c4c5..18e266dde5d2 100644 --- a/drivers/memory/tegra/tegra20-emc.c +++ b/drivers/memory/tegra/tegra20-emc.c @@ -1051,9 +1051,8 @@ static int tegra_emc_interconnect_init(struct tegra_emc *emc) remove_nodes: ic...
db2bd7ab1ae8c1f32a553b6eb36d6fecea41aab5
Analyze and fix the following issue in the Linux kernel code: memory: tegra30-emc: Simplify and handle deferred probe with dev_err_probe()
Problem Details: Certain calls, like clk_get, can cause probe deferral and driver should handle it. Use dev_err_probe() to fix that and also change other non-deferred errors cases to make the code simpler. Reviewed-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.or...
```diff diff --git a/drivers/memory/tegra/tegra30-emc.c b/drivers/memory/tegra/tegra30-emc.c index c96aa63a5aa0..cca386af423e 100644 --- a/drivers/memory/tegra/tegra30-emc.c +++ b/drivers/memory/tegra/tegra30-emc.c @@ -1563,9 +1563,8 @@ static int tegra_emc_interconnect_init(struct tegra_emc *emc) remove_nodes: ic...
0b4b77eff5f8cd9be062783a1c1e198d46d0a753
Analyze and fix the following issue in the Linux kernel code: doc: fix seg6_flowlabel path
Problem Details: This sysctl is not per interface; it's global per netns. Fixes: 292ecd9f5a94 ("doc: move seg6_flowlabel to seg6-sysctl.rst") Reported-by: Philippe Guibert <philippe.guibert@6wind.com> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by:...
```diff diff --git a/Documentation/networking/seg6-sysctl.rst b/Documentation/networking/seg6-sysctl.rst index 07c20e470baf..1b6af4779be1 100644 --- a/Documentation/networking/seg6-sysctl.rst +++ b/Documentation/networking/seg6-sysctl.rst @@ -25,6 +25,9 @@ seg6_require_hmac - INTEGER Default is 0. +/proc/sys/net/...
812f223fe9be03dc22abb85240b6f075135d2386
Analyze and fix the following issue in the Linux kernel code: tools/nolibc: handle NULL wstatus argument to waitpid()
Problem Details: wstatus is allowed to be NULL. Avoid a segmentation fault in this case. Fixes: 0c89abf5ab3f ("tools/nolibc: implement waitpid() in terms of waitid()") Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Acked-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Thomas Weißschuh <linux@weissschuh....
```diff diff --git a/tools/include/nolibc/sys/wait.h b/tools/include/nolibc/sys/wait.h index 4e66e1f7a03e..9d9319ba92cb 100644 --- a/tools/include/nolibc/sys/wait.h +++ b/tools/include/nolibc/sys/wait.h @@ -65,23 +65,29 @@ pid_t waitpid(pid_t pid, int *status, int options) switch (info.si_code) { case 0: - *stat...
65946eac6d888d50ae527c4e5c237dbe5cc3a2f2
Analyze and fix the following issue in the Linux kernel code: net: dlink: handle dma_map_single() failure properly
Problem Details: There is no error handling for `dma_map_single()` failures. Add error handling by checking `dma_mapping_error()` and freeing the `skb` using `dev_kfree_skb()` (process context) when it fails. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Yeounsu Moon <yyyynoom@gmail.com> Tested-on: D-Link D...
```diff diff --git a/drivers/net/ethernet/dlink/dl2k.c b/drivers/net/ethernet/dlink/dl2k.c index 1996d2e4e3e2..7077d705e471 100644 --- a/drivers/net/ethernet/dlink/dl2k.c +++ b/drivers/net/ethernet/dlink/dl2k.c @@ -508,25 +508,34 @@ static int alloc_list(struct net_device *dev) for (i = 0; i < RX_RING_SIZE; i++) { ...
3abc0e55ea1fa2250e52bc860e8f24b2b9a2093a
Analyze and fix the following issue in the Linux kernel code: net: mtk: wed: add dma mask limitation and GFP_DMA32 for device with more than 4GB DRAM
Problem Details: Limit tx/rx buffer address to 32-bit address space for board with more than 4GB DRAM. Fixes: 804775dfc2885 ("net: ethernet: mtk_eth_soc: add support for Wireless Ethernet Dispatch (WED)") Fixes: 6757d345dd7db ("net: ethernet: mtk_wed: introduce hw_rro support for MT7988") Tested-by: Daniel Pawlik <paw...
```diff diff --git a/drivers/net/ethernet/mediatek/mtk_wed.c b/drivers/net/ethernet/mediatek/mtk_wed.c index 3dbb113b792c..1ed1f88dd7f8 100644 --- a/drivers/net/ethernet/mediatek/mtk_wed.c +++ b/drivers/net/ethernet/mediatek/mtk_wed.c @@ -677,7 +677,7 @@ mtk_wed_tx_buffer_alloc(struct mtk_wed_device *dev) void *buf;...
d5d790ba1558dbb8d179054f514476e2ee970b8e
Analyze and fix the following issue in the Linux kernel code: net: usb: lan78xx: Fix lost EEPROM write timeout error(-ETIMEDOUT) in lan78xx_write_raw_eeprom
Problem Details: The function lan78xx_write_raw_eeprom failed to properly propagate EEPROM write timeout errors (-ETIMEDOUT). In the timeout fallthrough path, it first attempted to restore the pin configuration for LED outputs and then returned only the status of that restore operation, discarding the original timeout...
```diff diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c index 42d35cc6b421..28195d9a8d6b 100644 --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c @@ -1175,10 +1175,13 @@ static int lan78xx_write_raw_eeprom(struct lan78xx_net *dev, u32 offset, } write_raw_eeprom_done: - if (dev->chi...
db74b04edce1bc86b9a5acc724c7ca06f427ab60
Analyze and fix the following issue in the Linux kernel code: drm/bridge: lt9211: Drop check for last nibble of version register
Problem Details: There is now a new LT9211 rev. U5, which reports chip ID 0x18 0x01 0xe4 . The previous LT9211 reported chip ID 0x18 0x01 0xe3 , which is what the driver checks for right now. Since there is a possibility there will be yet another revision of the LT9211 in the future, drop the last version nibble check ...
```diff diff --git a/drivers/gpu/drm/bridge/lontium-lt9211.c b/drivers/gpu/drm/bridge/lontium-lt9211.c index 399fa7eebd49..03fc8fd10f20 100644 --- a/drivers/gpu/drm/bridge/lontium-lt9211.c +++ b/drivers/gpu/drm/bridge/lontium-lt9211.c @@ -121,8 +121,7 @@ static int lt9211_read_chipid(struct lt9211 *ctx) } /* Test...
54b91e54b113d4f15ab023a44f508251db6e22e7
Analyze and fix the following issue in the Linux kernel code: tracing: Stop fortify-string from warning in tracing_mark_raw_write()
Problem Details: The way tracing_mark_raw_write() records its data is that it has the following structure: struct { struct trace_entry; int id; char buf[]; }; But memcpy(&entry->id, buf, size) triggers the following warning when the size is greater than the id: ------------[ cut here ]------------ memcpy: d...
```diff diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index bbb89206a891..eb256378e65b 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -7441,7 +7441,8 @@ static ssize_t write_raw_marker_to_buffer(struct trace_array *tr, ssize_t written; size_t size; - size = sizeof(*entry) + cnt; + /* c...
fd6db58867924d2bfbc4ece4b0092f697f9fc31c
Analyze and fix the following issue in the Linux kernel code: slab: fix barn NULL pointer dereference on memoryless nodes
Problem Details: Phil reported a boot failure once sheaves become used in commits 59faa4da7cd4 ("maple_tree: use percpu sheaves for maple_node_cache") and 3accabda4da1 ("mm, vma: use percpu sheaves for vm_area_struct cache"): BUG: kernel NULL pointer dereference, address: 0000000000000040 #PF: supervisor read access...
```diff diff --git a/mm/slub.c b/mm/slub.c index 135c408e0515..b1f15598fbfd 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -504,10 +504,18 @@ static inline struct kmem_cache_node *get_node(struct kmem_cache *s, int node) return s->node[node]; } -/* Get the barn of the current cpu's memory node */ +/* + * Get the barn o...
1cf11d80db5df805b538c942269e05a65bcaf5bc
Analyze and fix the following issue in the Linux kernel code: ALSA: hda: Fix missing pointer check in hda_component_manager_init function
Problem Details: The __component_match_add function may assign the 'matchptr' pointer the value ERR_PTR(-ENOMEM), which will subsequently be dereferenced. The call stack leading to the error looks like this: hda_component_manager_init |-> component_match_add |-> component_match_add_release |-> __component...
```diff diff --git a/sound/hda/codecs/side-codecs/hda_component.c b/sound/hda/codecs/side-codecs/hda_component.c index bcf47a301697..8a2a200600a7 100644 --- a/sound/hda/codecs/side-codecs/hda_component.c +++ b/sound/hda/codecs/side-codecs/hda_component.c @@ -174,6 +174,10 @@ int hda_component_manager_init(struct hda_co...
8527bbb33936340525a3504a00932b2f8fd75754
Analyze and fix the following issue in the Linux kernel code: ALSA: hda: cs35l41: Fix NULL pointer dereference in cs35l41_get_acpi_mute_state()
Problem Details: Return value of a function acpi_evaluate_dsm() is dereferenced without checking for NULL, but it is usually checked for this function. acpi_evaluate_dsm() may return NULL, when acpi_evaluate_object() returns acpi_status other than ACPI_SUCCESS, so add a check to prevent the crach. Found by Linux Ver...
```diff diff --git a/sound/hda/codecs/side-codecs/cs35l41_hda.c b/sound/hda/codecs/side-codecs/cs35l41_hda.c index c04208e685a0..c0f2a3ff77a1 100644 --- a/sound/hda/codecs/side-codecs/cs35l41_hda.c +++ b/sound/hda/codecs/side-codecs/cs35l41_hda.c @@ -1410,6 +1410,8 @@ static int cs35l41_get_acpi_mute_state(struct cs35l...
bda745ee8fbb63330d8f2f2ea4157229a5df959e
Analyze and fix the following issue in the Linux kernel code: tracing: Fix tracing_mark_raw_write() to use buf and not ubuf
Problem Details: The fix to use a per CPU buffer to read user space tested only the writes to trace_marker. But it appears that the selftests are missing tests to the trace_maker_raw file. The trace_maker_raw file is used by applications that writes data structures and not strings into the file, and the tools read the ...
```diff diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 0fd582651293..bbb89206a891 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -7497,12 +7497,12 @@ tracing_mark_raw_write(struct file *filp, const char __user *ubuf, if (tr == &global_trace) { guard(rcu)(); list_for_each_entry_r...
b0f2942a16017f88395d768afedd7373860968ce
Analyze and fix the following issue in the Linux kernel code: kbuild: Use '--strip-unneeded-symbol' for removing module device table symbols
Problem Details: After commit 5ab23c7923a1 ("modpost: Create modalias for builtin modules"), relocatable RISC-V kernels with CONFIG_KASAN=y start failing when attempting to strip the module device table symbols: riscv64-linux-objcopy: not stripping symbol `__mod_device_table__kmod_irq_starfive_jh8100_intc__of__starf...
```diff diff --git a/scripts/Makefile.vmlinux b/scripts/Makefile.vmlinux index c02f85c2e241..ced4379550d7 100644 --- a/scripts/Makefile.vmlinux +++ b/scripts/Makefile.vmlinux @@ -87,7 +87,7 @@ remove-section-$(CONFIG_ARCH_VMLINUX_NEEDS_RELOCS) += '.rel*' '!.rel*.dyn' # https://sourceware.org/git/?p=binutils-gdb.git;a=...
505f5224b197b77169c977e747cbc18b222f85f9
Analyze and fix the following issue in the Linux kernel code: KVM: selftests: Verify that reads to inaccessible guest_memfd VMAs SIGBUS
Problem Details: Expand the guest_memfd negative testcases for overflow and MAP_PRIVATE to verify that reads to inaccessible memory also get a SIGBUS. Reviewed-by: Ackerley Tng <ackerleytng@google.com> Tested-by: Ackerley Tng <ackerleytng@google.com> Reviewed-by: Lisa Wang <wyihan@google.com> Tested-by: Lisa Wang <wyi...
```diff diff --git a/tools/testing/selftests/kvm/guest_memfd_test.c b/tools/testing/selftests/kvm/guest_memfd_test.c index f5372fdf096d..e7d9aeb418d3 100644 --- a/tools/testing/selftests/kvm/guest_memfd_test.c +++ b/tools/testing/selftests/kvm/guest_memfd_test.c @@ -84,6 +84,7 @@ static void test_fault_sigbus(int fd, s...
f91187c0ecc6358ccecf533c5fcc6b7dbb4735cb
Analyze and fix the following issue in the Linux kernel code: KVM: selftests: Add wrapper macro to handle and assert on expected SIGBUS
Problem Details: Extract the guest_memfd test's SIGBUS handling functionality into a common TEST_EXPECT_SIGBUS() macro in anticipation of adding more SIGBUS testcases. Eating a SIGBUS isn't terrible difficult, but it requires a non-trivial amount of boilerplate code, and using a macro allows selftests to print out the ...
```diff diff --git a/tools/testing/selftests/kvm/guest_memfd_test.c b/tools/testing/selftests/kvm/guest_memfd_test.c index 640636c76eb9..73c2e54e7297 100644 --- a/tools/testing/selftests/kvm/guest_memfd_test.c +++ b/tools/testing/selftests/kvm/guest_memfd_test.c @@ -14,8 +14,6 @@ #include <linux/bitmap.h> #include <l...
44c6cb9fe9888b371e31165b2854bd0f4e2787d4
Analyze and fix the following issue in the Linux kernel code: KVM: guest_memfd: Allow mmap() on guest_memfd for x86 VMs with private memory
Problem Details: Allow mmap() on guest_memfd instances for x86 VMs with private memory as the need to track private vs. shared state in the guest_memfd instance is only pertinent to INIT_SHARED. Doing mmap() on private memory isn't terrible useful (yet!), but it's now possible, and will be desirable when guest_memfd g...
```diff diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 4b8138bd4857..fe3dc3eb4331 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -13942,10 +13942,11 @@ bool kvm_arch_no_poll(struct kvm_vcpu *vcpu) #ifdef CONFIG_KVM_GUEST_MEMFD /* - * KVM doesn't yet support mmap() on guest_memfd for VMs wit...
9aef71c892a55e004419923ba7129abe3e58d9f1
Analyze and fix the following issue in the Linux kernel code: KVM: Explicitly mark KVM_GUEST_MEMFD as depending on KVM_GENERIC_MMU_NOTIFIER
Problem Details: Add KVM_GENERIC_MMU_NOTIFIER as a dependency for selecting KVM_GUEST_MEMFD, as guest_memfd relies on kvm_mmu_invalidate_{begin,end}(), which are defined if and only if the generic mmu_notifier implementation is enabled. The missing dependency is currently benign as s390 is the only KVM arch that doesn...
```diff diff --git a/virt/kvm/Kconfig b/virt/kvm/Kconfig index 1b7d5be0b6c4..a01cc5743137 100644 --- a/virt/kvm/Kconfig +++ b/virt/kvm/Kconfig @@ -113,6 +113,7 @@ config KVM_GENERIC_MEMORY_ATTRIBUTES bool config KVM_GUEST_MEMFD + depends on KVM_GENERIC_MMU_NOTIFIER select XARRAY_MULTI b...
5d3341d684be80892d8f6f9812f90f9274b81177
Analyze and fix the following issue in the Linux kernel code: KVM: guest_memfd: Invalidate SHARED GPAs if gmem supports INIT_SHARED
Problem Details: When invalidating gmem ranges, e.g. in response to PUNCH_HOLE, process all possible range types (PRIVATE vs. SHARED) for the gmem instance. Since since guest_memfd doesn't yet support in-place conversions, simply pivot on INIT_SHARED as a gmem instance can currently only have private or shared memory,...
```diff diff --git a/virt/kvm/guest_memfd.c b/virt/kvm/guest_memfd.c index cf3afba23a6b..e10d2c71e78c 100644 --- a/virt/kvm/guest_memfd.c +++ b/virt/kvm/guest_memfd.c @@ -102,8 +102,17 @@ static struct folio *kvm_gmem_get_folio(struct inode *inode, pgoff_t index) return filemap_grab_folio(inode->i_mapping, index); }...
fe2bf6234e947bf5544db6d386af1df2a8db80f3
Analyze and fix the following issue in the Linux kernel code: KVM: guest_memfd: Add INIT_SHARED flag, reject user page faults if not set
Problem Details: Add a guest_memfd flag to allow userspace to state that the underlying memory should be configured to be initialized as shared, and reject user page faults if the guest_memfd instance's memory isn't shared. Because KVM doesn't yet support in-place private<=>shared conversions, all guest_memfd memory e...
```diff diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst index 7ba92f2ced38..754b662a453c 100644 --- a/Documentation/virt/kvm/api.rst +++ b/Documentation/virt/kvm/api.rst @@ -6438,6 +6438,11 @@ specified via KVM_CREATE_GUEST_MEMFD. Currently defined flags: ============================ ==...
034417c1439a533a315562a57bd340d963eaac6b
Analyze and fix the following issue in the Linux kernel code: KVM: x86/pmu: Don't try to get perf capabilities for hybrid CPUs
Problem Details: Explicitly zero kvm_host_pmu instead of attempting to get the perf PMU capabilities when running on a hybrid CPU to avoid running afoul of perf's sanity check. ------------[ cut here ]------------ WARNING: arch/x86/events/core.c:3089 at perf_get_x86_pmu_capability+0xd/0xc0, Call Trace: <TASK>...
```diff diff --git a/arch/x86/kvm/pmu.c b/arch/x86/kvm/pmu.c index 40ac4cb44ed2..487ad19a236e 100644 --- a/arch/x86/kvm/pmu.c +++ b/arch/x86/kvm/pmu.c @@ -108,16 +108,18 @@ void kvm_init_pmu_capability(const struct kvm_pmu_ops *pmu_ops) bool is_intel = boot_cpu_data.x86_vendor == X86_VENDOR_INTEL; int min_nr_gp_ctr...
971843c511c3c2f6eda96c6b03442913bfee6148
Analyze and fix the following issue in the Linux kernel code: ext4: free orphan info with kvfree
Problem Details: Orphan info is now getting allocated with kvmalloc_array(). Free it with kvfree() instead of kfree() to avoid complaints from mm. Reported-by: Chris Mason <clm@meta.com> Fixes: 0a6ce20c1564 ("ext4: verify orphan file size is not too big") Cc: stable@vger.kernel.org Signed-off-by: Jan Kara <jack@suse.c...
```diff diff --git a/fs/ext4/orphan.c b/fs/ext4/orphan.c index 33c3a89396b1..82d5e7501455 100644 --- a/fs/ext4/orphan.c +++ b/fs/ext4/orphan.c @@ -513,7 +513,7 @@ void ext4_release_orphan_info(struct super_block *sb) return; for (i = 0; i < oi->of_blocks; i++) brelse(oi->of_binfo[i].ob_bh); - kfree(oi->of_binfo...
1d3ad183943b38eec2acf72a0ae98e635dc8456b
Analyze and fix the following issue in the Linux kernel code: ext4: detect invalid INLINE_DATA + EXTENTS flag combination
Problem Details: syzbot reported a BUG_ON in ext4_es_cache_extent() when opening a verity file on a corrupted ext4 filesystem mounted without a journal. The issue is that the filesystem has an inode with both the INLINE_DATA and EXTENTS flags set: EXT4-fs error (device loop0): ext4_cache_extents:545: inode #15: ...
```diff diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index f9e4ac87211e..e99306a8f47c 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -5319,6 +5319,14 @@ struct inode *__ext4_iget(struct super_block *sb, unsigned long ino, } ei->i_flags = le32_to_cpu(raw_inode->i_flags); ext4_set_inode_flags(inode, true);...
0145a99eacae7b67baba62a1036ef7c4b5e90a7a
Analyze and fix the following issue in the Linux kernel code: drm/xe: Fix copyright in xe_ttm_stolen_mgr
Problem Details: - Correct Red Hat copyright year from "2002" to "2022". - Sort the include lines alphabetically. No functional changes intended. Reviewed-by: Tejas Upadhyay <tejas.upadhyay@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com> Link: https://lore.k...
```diff diff --git a/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c b/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c index dc588255674d..9b00bdc8ef1a 100644 --- a/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c +++ b/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT /* * Copyright © 2021-2023 Intel Corp...
f85d4062bc6894747495136e7fc020a28a875a15
Analyze and fix the following issue in the Linux kernel code: drm/xe: Fix copyright and function naming in xe_ttm_sys_mgr
Problem Details: - Correct Red Hat copyright year from "2002" to "2022". - Rename ttm_sys_mgr_fini() to xe_ttm_sys_mgr_fini() to avoid confusion with generic TTM helpers. No functional changes intended. Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com> Link: h...
```diff diff --git a/drivers/gpu/drm/xe/xe_ttm_sys_mgr.c b/drivers/gpu/drm/xe/xe_ttm_sys_mgr.c index d38b91872da3..3e404eb8d098 100644 --- a/drivers/gpu/drm/xe/xe_ttm_sys_mgr.c +++ b/drivers/gpu/drm/xe/xe_ttm_sys_mgr.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT /* * Copyright © 2021-2022 Intel Corporation - * ...
4cbc08649a54c3d533df9832342d52d409dfbbf0
Analyze and fix the following issue in the Linux kernel code: drm/xe: Enable media sampler power gating
Problem Details: Where applicable, enable media sampler power gating. Also, add it to the powergate_info debugfs. v2: Remove the sampler powergate status since it is cleared quickly anyway. v3: Use vcs mask (Rodrigo) and fix the version check for media v4: Remove extra spaces v5: Media samplers are independent of vcs ...
```diff diff --git a/drivers/gpu/drm/xe/regs/xe_gt_regs.h b/drivers/gpu/drm/xe/regs/xe_gt_regs.h index 06cb6b02ec64..51f2a03847f9 100644 --- a/drivers/gpu/drm/xe/regs/xe_gt_regs.h +++ b/drivers/gpu/drm/xe/regs/xe_gt_regs.h @@ -342,6 +342,7 @@ #define POWERGATE_ENABLE XE_REG(0xa210) #define RENDER_POWERGATE_ENABLE...
ce740955b238761ec1d8cf0590d7e6802d3a813a
Analyze and fix the following issue in the Linux kernel code: dt-bindings: bus: renesas-bsc: allow additional properties
Problem Details: Allow additional properties to enable devices attached to the bus. Fixes warnings like these: arch/arm/boot/dts/renesas/sh73a0-kzm9g.dtb: bus@fec10000 (renesas,bsc-sh73a0): Unevaluated properties are not allowed ('ethernet@10000000' was unexpected) arch/arm/boot/dts/renesas/r8a73a4-ape6evm.dtb: bus@fe...
```diff diff --git a/Documentation/devicetree/bindings/bus/renesas,bsc.yaml b/Documentation/devicetree/bindings/bus/renesas,bsc.yaml index f53a37785413..ff3c78317d28 100644 --- a/Documentation/devicetree/bindings/bus/renesas,bsc.yaml +++ b/Documentation/devicetree/bindings/bus/renesas,bsc.yaml @@ -41,6 +41,18 @@ proper...
5f8d41172931a92339c5cce81a3142065fa56e45
Analyze and fix the following issue in the Linux kernel code: bpf: Fix handling maps with no BTF and non-constant offsets for the bpf_wq
Problem Details: Fix handling maps with no BTF and non-constant offsets for the bpf_wq. This de-duplicates logic with other internal structs (task_work, timer), keeps error reporting consistent, and makes future changes to the layout handling centralized. Fixes: d940c9b94d7e ("bpf: add support for KF_ARG_PTR_TO_WORKQ...
```diff diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index 85a953124412..c908015b2d34 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -8479,6 +8479,9 @@ static int check_map_field_pointer(struct bpf_verifier_env *env, u32 regno, case BPF_TASK_WORK: field_off = map->record->task_work...
838baa351cee86526973fb3ef49c0f4c1b2f3b0c
Analyze and fix the following issue in the Linux kernel code: bpf: Craft non-linear skbs in BPF_PROG_TEST_RUN
Problem Details: This patch adds support for crafting non-linear skbs in BPF test runs for tc programs. The size of the linear area is given by ctx->data_end, with a minimum of ETH_HLEN always pulled in the linear area. If ctx or ctx->data_end are null, a linear skb is used. This is particularly useful to test support...
```diff diff --git a/net/bpf/test_run.c b/net/bpf/test_run.c index b9b49d0c7014..05e30ff5b6f9 100644 --- a/net/bpf/test_run.c +++ b/net/bpf/test_run.c @@ -447,7 +447,7 @@ static int bpf_test_run(struct bpf_prog *prog, void *ctx, u32 repeat, static int bpf_test_finish(const union bpf_attr *kattr, union bpf_att...
d8accf661fcf3088ef4c349ab56ecd19a5071b19
Analyze and fix the following issue in the Linux kernel code: bpf: Refactor cleanup of bpf_prog_test_run_skb
Problem Details: This bit of refactoring aims to simplify how we free memory in bpf_prog_test_run_skb to avoid code duplication. Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com> Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org> Tested-by: syzbot@syzkaller.appspotmail.com Link: https://patch.msgid.link/8971...
```diff diff --git a/net/bpf/test_run.c b/net/bpf/test_run.c index dfb03ee0bb62..a39b26739a1e 100644 --- a/net/bpf/test_run.c +++ b/net/bpf/test_run.c @@ -990,10 +990,10 @@ int bpf_prog_test_run_skb(struct bpf_prog *prog, const union bpf_attr *kattr, u32 size = kattr->test.data_size_in; u32 repeat = kattr->test.rep...
4b471b736ea1ce08113a12bd7dcdaea621b0f65f
Analyze and fix the following issue in the Linux kernel code: ext4, doc: fix and improve directory hash tree description
Problem Details: Some of the details about how directory hash trees work were confusing or outright wrong, this patch should fix those. A note on dx_tail's dt_reserved member, as far as I can tell the kernel never sets this explicitly, so its content is apparently left-overs from what was there before (for the dx_root...
```diff diff --git a/Documentation/filesystems/ext4/directory.rst b/Documentation/filesystems/ext4/directory.rst index 6eece8e31df8..9b003a4d453f 100644 --- a/Documentation/filesystems/ext4/directory.rst +++ b/Documentation/filesystems/ext4/directory.rst @@ -183,10 +183,10 @@ in the place where the name normally goes. ...
328a782cb138029182e521c08f50eb1587db955d
Analyze and fix the following issue in the Linux kernel code: ext4: wait for ongoing I/O to complete before freeing blocks
Problem Details: When freeing metadata blocks in nojournal mode, ext4_forget() calls bforget() to clear the dirty flag on the buffer_head and remvoe associated mappings. This is acceptable if the metadata has not yet begun to be written back. However, if the write-back has already started but is not yet completed, ext4...
```diff diff --git a/fs/ext4/ext4_jbd2.c b/fs/ext4/ext4_jbd2.c index b3e9b7bd7978..a0e66bc10093 100644 --- a/fs/ext4/ext4_jbd2.c +++ b/fs/ext4/ext4_jbd2.c @@ -280,9 +280,16 @@ int __ext4_forget(const char *where, unsigned int line, handle_t *handle, bh, is_metadata, inode->i_mode, test_opt(inode->i_sb, DATA_F...
9338d660b79a0dfe4eb3fe9bd748054cded87d4f
Analyze and fix the following issue in the Linux kernel code: s390/vmlinux.lds.S: Move .vmlinux.info to end of allocatable sections
Problem Details: When building s390 defconfig with binutils older than 2.32, there are several warnings during the final linking stage: s390-linux-ld: .tmp_vmlinux1: warning: allocated section `.got.plt' not in segment s390-linux-ld: .tmp_vmlinux2: warning: allocated section `.got.plt' not in segment s390-linux-...
```diff diff --git a/arch/s390/kernel/vmlinux.lds.S b/arch/s390/kernel/vmlinux.lds.S index feecf1a6ddb4..d74d4c52ccd0 100644 --- a/arch/s390/kernel/vmlinux.lds.S +++ b/arch/s390/kernel/vmlinux.lds.S @@ -214,6 +214,28 @@ SECTIONS DWARF_DEBUG ELF_DETAILS + /* + * Make sure that the .got.plt is either completely em...
8ec3af916fe3954381cf3555ea03dc5adf4d0e8e
Analyze and fix the following issue in the Linux kernel code: kbuild: Add '.rel.*' strip pattern for vmlinux
Problem Details: Prior to binutils commit c12d9fa2afe ("Support objcopy --remove-section=.relaFOO") [1] in 2.32, stripping relocation sections required the trailing period (i.e., '.rel.*') to work properly. After commit 3e86e4d74c04 ("kbuild: keep .modinfo section in vmlinux.unstripped"), there is an error with binuti...
```diff diff --git a/scripts/Makefile.vmlinux b/scripts/Makefile.vmlinux index a62639982be5..c02f85c2e241 100644 --- a/scripts/Makefile.vmlinux +++ b/scripts/Makefile.vmlinux @@ -83,6 +83,9 @@ endif remove-section-y := .modinfo remove-section-$(CONFIG_ARCH_VMLINUX_NEEDS_RELOCS) += ...
4b47a3aefb29c523ca66f0d28de8db15a10f9352
Analyze and fix the following issue in the Linux kernel code: kbuild: Restore pattern to avoid stripping .rela.dyn from vmlinux
Problem Details: Commit 0ce5139fd96e ("kbuild: always create intermediate vmlinux.unstripped") removed the pattern to avoid stripping .rela.dyn sections added by commit e9d86b8e17e7 ("scripts: Do not strip .rela.dyn section"). Restore it so that .rela.dyn sections remain in the final vmlinux. Fixes: 0ce5139fd96e ("kbu...
```diff diff --git a/scripts/Makefile.vmlinux b/scripts/Makefile.vmlinux index 7c6ae9886f8f..a62639982be5 100644 --- a/scripts/Makefile.vmlinux +++ b/scripts/Makefile.vmlinux @@ -82,7 +82,7 @@ endif # --------------------------------------------------------------------------- remove-section-y ...
4f375ade6aa9f37fd72d7a78682f639772089eed
Analyze and fix the following issue in the Linux kernel code: bpf: Avoid RCU context warning when unpinning htab with internal structs
Problem Details: When unpinning a BPF hash table (htab or htab_lru) that contains internal structures (timer, workqueue, or task_work) in its values, a BUG warning is triggered: BUG: sleeping function called from invalid context at kernel/bpf/hashtab.c:244 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 14, na...
```diff diff --git a/kernel/bpf/inode.c b/kernel/bpf/inode.c index f90bdcc0a047..81780bcf8d25 100644 --- a/kernel/bpf/inode.c +++ b/kernel/bpf/inode.c @@ -775,7 +775,7 @@ static int bpf_show_options(struct seq_file *m, struct dentry *root) return 0; } -static void bpf_free_inode(struct inode *inode) +static void b...
3c652c3a71de1d30d72dc82c3bead8deb48eb749
Analyze and fix the following issue in the Linux kernel code: jbd2: ensure that all ongoing I/O complete before freeing blocks
Problem Details: When releasing file system metadata blocks in jbd2_journal_forget(), if this buffer has not yet been checkpointed, it may have already been written back, currently be in the process of being written back, or has not yet written back. jbd2_journal_forget() calls jbd2_journal_try_remove_checkpoint() to ...
```diff diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c index c7867139af69..3e510564de6e 100644 --- a/fs/jbd2/transaction.c +++ b/fs/jbd2/transaction.c @@ -1659,6 +1659,7 @@ int jbd2_journal_forget(handle_t *handle, struct buffer_head *bh) int drop_reserve = 0; int err = 0; int was_modified = 0; + int ...
07ca98f906a403637fc5e513a872a50ef1247f3b
Analyze and fix the following issue in the Linux kernel code: xsk: Harden userspace-supplied xdp_desc validation
Problem Details: Turned out certain clearly invalid values passed in xdp_desc from userspace can pass xp_{,un}aligned_validate_desc() and then lead to UBs or just invalid frames to be queued for xmit. desc->len close to ``U32_MAX`` with a non-zero pool->tx_metadata_len can cause positive integer overflow and wraparoun...
```diff diff --git a/net/xdp/xsk_queue.h b/net/xdp/xsk_queue.h index f16f390370dc..1eb8d9f8b104 100644 --- a/net/xdp/xsk_queue.h +++ b/net/xdp/xsk_queue.h @@ -143,14 +143,24 @@ static inline bool xp_unused_options_set(u32 options) static inline bool xp_aligned_validate_desc(struct xsk_buff_pool *pool, struct...
469d638d1520a9332cd0d034690e75e845610a51
Analyze and fix the following issue in the Linux kernel code: bpf: Fix sleepable context for async callbacks
Problem Details: Fix the BPF verifier to correctly determine the sleepable context of async callbacks based on the async primitive type rather than the arming program's context. The bug is in in_sleepable() which uses OR logic to check if the current execution context is sleepable. When a sleepable program arms a time...
```diff diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index ff40e5e65c43..32123c4b041a 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -515,6 +515,7 @@ static bool is_callback_calling_kfunc(u32 btf_id); static bool is_bpf_throw_kfunc(struct bpf_insn *insn); static bool is_bpf_wq_set_c...
4b47a8601b71ad98833b447d465592d847b4dc77
Analyze and fix the following issue in the Linux kernel code: NFSD: Define a proc_layoutcommit for the FlexFiles layout type
Problem Details: Avoid a crash if a pNFS client should happen to send a LAYOUTCOMMIT operation on a FlexFiles layout. Reported-by: Robert Morris <rtm@csail.mit.edu> Closes: https://lore.kernel.org/linux-nfs/152f99b2-ba35-4dec-93a9-4690e625dccd@oracle.com/T/#t Cc: Thomas Haynes <loghyr@hammerspace.com> Cc: stable@vger....
```diff diff --git a/fs/nfsd/flexfilelayout.c b/fs/nfsd/flexfilelayout.c index c318cf74e388..0f1a35400cd5 100644 --- a/fs/nfsd/flexfilelayout.c +++ b/fs/nfsd/flexfilelayout.c @@ -125,6 +125,13 @@ nfsd4_ff_proc_getdeviceinfo(struct super_block *sb, struct svc_rqst *rqstp, return 0; } +static __be32 +nfsd4_ff_proc_l...
75188605c56d10c1bd3b1cd94f4872f349c3a9c8
Analyze and fix the following issue in the Linux kernel code: drm/xe: Handle mixed mappings and existing VRAM on atomic faults
Problem Details: Moving to VRAM will fail if mixed mappings are present or if the page is already located in VRAM. Atomic faults that require a move to VRAM currently retry without attempting to evict mixed mappings or locate existing VRAM mappings. This patch fixes the issue by attempting to evict mixed mappings or f...
```diff diff --git a/drivers/gpu/drm/xe/xe_svm.c b/drivers/gpu/drm/xe/xe_svm.c index 7e2db71ff34e..b268ee0d2271 100644 --- a/drivers/gpu/drm/xe/xe_svm.c +++ b/drivers/gpu/drm/xe/xe_svm.c @@ -1073,7 +1073,17 @@ retry: drm_dbg(&vm->xe->drm, "VRAM allocation failed, falling back to retrying fault, asid=%u, errn...