id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
3f7dda36e0b6dfa2cd26191f754ba061ab8191f2 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: dma: fix memory leak running mt76_dma_tx_cleanup | Problem Details:
Fix device unregister memory leak and alway cleanup all configured
rx queues in mt76_dma_tx_cleanup routine.
Fixes: 52546e27787e ("wifi: mt76: add WED RX support to dma queue alloc")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name> | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/dma.c b/drivers/net/wireless/mediatek/mt76/dma.c
index 805684f249ce..d29cb6cda2a9 100644
--- a/drivers/net/wireless/mediatek/mt76/dma.c
+++ b/drivers/net/wireless/mediatek/mt76/dma.c
@@ -960,8 +960,7 @@ void mt76_dma_cleanup(struct mt76_dev *dev)
struct mt76_qu... |
1b88b47e898edef0e56e3a2f4e49f052a136153d | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: dma: free rx_head in mt76_dma_rx_cleanup | Problem Details:
Free rx_head skb in mt76_dma_rx_cleanup routine in order to avoid
possible memory leak at module unload.
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name> | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/dma.c b/drivers/net/wireless/mediatek/mt76/dma.c
index 6037976efe5c..805684f249ce 100644
--- a/drivers/net/wireless/mediatek/mt76/dma.c
+++ b/drivers/net/wireless/mediatek/mt76/dma.c
@@ -721,6 +721,7 @@ mt76_dma_rx_cleanup(struct mt76_dev *dev, struct mt76_queue *... |
da5b4d93e141b52c5a71d0c41a042d1bcaf70d2e | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: fix memory leak in mt7996_mcu_exit | Problem Details:
Always purge mcu skb queues in mt7996_mcu_exit routine even if
mt7996_firmware_state fails.
Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name> | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
index d781c6e0f33a..d593ed9e3f73 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
@@ -2460,13 +2460,14 @@ void mt7996_mcu_exit(struct m... |
49bd78282e79ad177d14f37f4049f0605bf92dad | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7915: fix memory leak in mt7915_mcu_exit | Problem Details:
Always purge mcu skb queues in mt7915_mcu_exit routine even if
mt7915_firmware_state fails.
Fixes: e57b7901469f ("mt76: add mac80211 driver for MT7915 PCIe-based chipsets")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name> | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
index 04d1da170fac..640c7cf59b9e 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
@@ -2362,13 +2362,14 @@ void mt7915_mcu_exit(struct m... |
c36457a8f34d1e0fc55fbbd7b8b2d716af3f6289 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7921: fix invalid remain_on_channel duration | Problem Details:
round_jiffies_up() may change the duration reported from chip. We should
take the real timeout for current channel privilege.
Fixes: 034ae28b56f1 ("wifi: mt76: mt7921: introduce remain_on_channel support")
Signed-off-by: Deren Wu <deren.wu@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelog... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
index c4ca6905f050..1e1f34a6d601 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
@@ -174,7 +174,7 @@ mt7921_mcu_uni_roc_event(struct m... |
0d82fc956edb67b5755cc64ac6b9aee79cfbbff0 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: connac: fix POWER_CTRL command name typo | Problem Details:
Fix typo MCU_UNI_CMD_POWER_CREL to MCU_UNI_CMD_POWER_CTRL.
Fixes: 779d34de055e ("wifi: mt76: connac: add more unified command IDs")
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name> | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h
index f1e942b9a887..82fdf6d794bc 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h
@@ -1198,7 +1198,7 @@ enum {
MC... |
793445cf812506375cbe4c59d0fb9f648f716e88 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: update register for CFEND_RATE | Problem Details:
In newer chipsets, CFEND_RATE setting has been moved to different hw
module.
Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices")
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name> | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
index 0b3e28748e76..ce4242f90e9f 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
@@ -1690,7 +1690,7 @@ void mt7996_mac_set_timing(stru... |
eb1fdb9f5a2280de6820624cd02e0863babab683 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: fix chainmask calculation in mt7996_set_antenna() | Problem Details:
Fix per-band chainmask when restoring from the dev chainmask.
Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices")
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name> | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/main.c b/drivers/net/wireless/mediatek/mt76/mt7996/main.c
index 4421cd54311b..c423b052e4f4 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/main.c
@@ -880,7 +880,10 @@ mt7996_set_antenna(struct ie... |
914189af23b83c9a83a0137a3a40f17de7d2c618 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7921: fix channel switch fail in monitor mode | Problem Details:
When the chanctx enabled, IEEE80211_CONF_CHANGE_CHANNEL in .config()
would not be called anymore. mt76 cannot control RF channel for monitor.
Add monitor type set-channel flow in .change_chanctx().
Fixes: 41ac53c899bd ("wifi: mt76: mt7921: introduce chanctx support")
Reviewed-by: Sean Wang <sean.wang@... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/main.c b/drivers/net/wireless/mediatek/mt76/mt7921/main.c
index 722df8eea91f..cdb0d6190393 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/main.c
@@ -1706,7 +1706,10 @@ static void mt7921_ctx_ite... |
3b2f02861f1d051f9db3b622b348c3c921c62275 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7915: add chip id condition in mt7915_check_eeprom() | Problem Details:
When flash mode is enabled, and the eeprom data in the flash is not for
the current chipset, it'll still be checked valid, and the default
eeprom bin won't be loaded.
(e.g., mt7915 NIC inserted with mt7916 eeprom data in the flash.)
Fix this kind of case by adding chip id into consideration in
mt7915_... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.c b/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.c
index 24efa280dd86..a79628933948 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.c
@@ -33,11 +33,14 @@ static int mt7915_che... |
ecaccdae7a7e8f76eeb6544295ca0593c2f65a33 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7915: rework mt7915_thermal_temp_store() | Problem Details:
Call mt7915_mcu_set_thermal_protect() through
mt7915_thermal_temp_store() to update firmware trigger/restore temp
directly.
Fixes: 02ee68b95d81 ("mt76: mt7915: add control knobs for thermal throttling")
Reviewed-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Howard Hsu <howard-yh.hsu@mediatek.c... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/init.c b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
index be435ae56bbf..0ab9e1320fac 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
@@ -83,9 +83,23 @@ static ssize_t mt7915_thermal_... |
5ad42d19f6596e54b091827c397fdb7c091d45f7 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7915: rework mt7915_mcu_set_thermal_throttling | Problem Details:
This patch includes 2 changes:
1. Firmware expects to disable thermal protect first before
reconfiguring.
2. Separate setting thermal_protect and setting thermal_tx_duty into
different functions. These two firmware commands do not need to send
together.
Fixes: 34b877d972be ("mt76: mt7915: add thermal ... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/init.c b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
index 11407e18e56a..be435ae56bbf 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
@@ -134,9 +134,6 @@ mt7915_thermal_set_cur_thrott... |
7d12b38ab6f6b77198cd3a66db19587bbdd3308c | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7915: call mt7915_mcu_set_thermal_throttling() only after init_work | Problem Details:
Enable thermal management by default shall not be executed during mcu
init. This causes thermal configuration being reset to the firmware
default settings.
Fixes: 0063b86c9120 ("mt76: mt7915e: Enable thermal management by default")
Reviewed-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Howard ... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/init.c b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
index 571c94835942..11407e18e56a 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
@@ -201,8 +201,7 @@ static int mt7915_thermal_ini... |
de19b9c83654e323d83f839a550ca4af37fea15b | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7921: fix deadlock in mt7921_abort_roc | Problem Details:
When mt7921_abort_roc is called with dev->mutex held, it can deadlock while
calling cancel_work_sync(&phy->roc_work), because the work function could
be waiting to acquire the mutex.
Fix this by flushing the work before taking the mutex
Reported-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Fix... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/main.c b/drivers/net/wireless/mediatek/mt76/mt7921/main.c
index 76ac5069638f..722df8eea91f 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/main.c
@@ -422,15 +422,15 @@ void mt7921_roc_timer(struc... |
4722dd4029c63f10414ffd8d3ffdd6c748391cd7 | Analyze and fix the following issue in the Linux kernel code: ARM: dts: stihxxx-b2120: fix polarity of reset line of tsin0 port | Problem Details:
According to c8sectpfe driver code we first drive reset line low and
then high to reset the port, therefore the reset line is supposed to
be annotated as "active low". This will be important when we convert
the driver to gpiod API.
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-... | ```diff
diff --git a/arch/arm/boot/dts/stihxxx-b2120.dtsi b/arch/arm/boot/dts/stihxxx-b2120.dtsi
index 920a0bad7494..8d9a2dfa76f1 100644
--- a/arch/arm/boot/dts/stihxxx-b2120.dtsi
+++ b/arch/arm/boot/dts/stihxxx-b2120.dtsi
@@ -178,7 +178,7 @@
tsin-num = <0>;
serial-not-parallel;
i2c-bus = <&ssc2>;
- r... |
97801cfcf9565247bcc53b67ea47fa87b1704375 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: mediatek: mt8195: Fix vdosys* compatible strings | Problem Details:
When vdosys1 was initially added, it was incorrectly assumed to be
compatible with vdosys0, and thus both had the same mt8195-mmsys
compatible attached.
This has since been corrected in commit b237efd47df7 ("dt-bindings:
arm: mediatek: mmsys: change compatible for MT8195") and commit
82219cfbef18 ("dt... | ```diff
diff --git a/arch/arm64/boot/dts/mediatek/mt8195.dtsi b/arch/arm64/boot/dts/mediatek/mt8195.dtsi
index 5d31536f4c48..c10cfeb1214d 100644
--- a/arch/arm64/boot/dts/mediatek/mt8195.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8195.dtsi
@@ -2146,7 +2146,7 @@
};
vdosys0: syscon@1c01a000 {
- compatible = "med... |
e2b018cb55151cbee2c4b8f48ef731f0a683b9b6 | Analyze and fix the following issue in the Linux kernel code: power: supply: bq27xxx: fix reporting critical level | Problem Details:
The EDV1/SOC1 flag is set when the battery voltage drops below the
threshold set in EEPROM. From observing the capacity_level reported by
the driver, and reading the datasheet, EDV1 remains set even when
EDVF/SOCF gets set. Thus, bq27xxx_battery_capacity_level() never reaches
the CAPACITY_LEVEL_CRITICA... | ```diff
diff --git a/drivers/power/supply/bq27xxx_battery.c b/drivers/power/supply/bq27xxx_battery.c
index 8bf048fbd36a..5ff6f44fd47b 100644
--- a/drivers/power/supply/bq27xxx_battery.c
+++ b/drivers/power/supply/bq27xxx_battery.c
@@ -1917,10 +1917,10 @@ static int bq27xxx_battery_capacity_level(struct bq27xxx_device_i... |
c85c191694cb1cf290b11059b3d2de8a2732ffd0 | Analyze and fix the following issue in the Linux kernel code: power: supply: remove faulty cooling logic | Problem Details:
The rn5t618 power driver fails to register
a cooling device because POWER_SUPPLY_PROP_CHARGE_CONTROL_LIMIT_MAX
is missing but availability is not checked before registering
cooling device. After improved error checking in the thermal
code, the registration of the power supply fails entirely.
Checking ... | ```diff
diff --git a/drivers/power/supply/power_supply_core.c b/drivers/power/supply/power_supply_core.c
index 7c790c41e2fe..cc5b2e22b42a 100644
--- a/drivers/power/supply/power_supply_core.c
+++ b/drivers/power/supply/power_supply_core.c
@@ -1186,83 +1186,6 @@ static void psy_unregister_thermal(struct power_supply *ps... |
d7544cbe04e74e9dd33a94481ffe9b2e63222cd6 | Analyze and fix the following issue in the Linux kernel code: dt-bindings: reset: syscon-reboot: Add priority property | Problem Details:
This new optional priority property allows to specify custom priority level
of reset device. Prior this change priority level was hardcoded to 192 and
not possible to specify or change. Specifying other value is needed for
some boards. Default level when not specified stays at 192 as before.
Signed-of... | ```diff
diff --git a/Documentation/devicetree/bindings/power/reset/syscon-reboot.yaml b/Documentation/devicetree/bindings/power/reset/syscon-reboot.yaml
index da2509724812..75061124d9a8 100644
--- a/Documentation/devicetree/bindings/power/reset/syscon-reboot.yaml
+++ b/Documentation/devicetree/bindings/power/reset/sysc... |
1c9ded98bd4e5b87756423e0abededda6f4ba0b8 | Analyze and fix the following issue in the Linux kernel code: ASoC: codecs: fix platform_no_drv_owner.cocci warning | Problem Details:
./sound/soc/codecs/aw88395/aw88395.c:572:3-8: No need to set .owner here. The core will do it.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3935
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Link: https://lore.kernel.org/r/20230203011504... | ```diff
diff --git a/sound/soc/codecs/aw88395/aw88395.c b/sound/soc/codecs/aw88395/aw88395.c
index bce403744c1a..16ca7ac5ad28 100644
--- a/sound/soc/codecs/aw88395/aw88395.c
+++ b/sound/soc/codecs/aw88395/aw88395.c
@@ -569,7 +569,6 @@ MODULE_DEVICE_TABLE(i2c, aw88395_i2c_id);
static struct i2c_driver aw88395_i2c_drive... |
480b26226873c88e482575ceb0d0a38d76e1be57 | Analyze and fix the following issue in the Linux kernel code: ASoC: dt-bindings: meson: fix gx-card codec node regex | Problem Details:
'codec' is a valid node name when there is a single codec
in the link. Fix the node regular expression to apply this.
Fixes: fd00366b8e41 ("ASoC: meson: gx: add sound card dt-binding documentation")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlows... | ```diff
diff --git a/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml b/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml
index 5b8d59245f82..b358fd601ed3 100644
--- a/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml
+++ b/Documentation/devicetree/bindings/sound/amlo... |
e398bbb9834a2f6cbe27cbd72956159ecc92055f | Analyze and fix the following issue in the Linux kernel code: ASoC: dt-bindings: create component common schema | Problem Details:
All DAIs are component but not all components are DAI.
Move the component properties (sound-name-prefix ATM) to a separate schema
file so it can be used by non-DAI components, such as auxiliary devices.
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.koz... | ```diff
diff --git a/Documentation/devicetree/bindings/sound/component-common.yaml b/Documentation/devicetree/bindings/sound/component-common.yaml
new file mode 100644
index 000000000000..37766c5f3974
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/component-common.yaml
@@ -0,0 +1,21 @@
+# SPDX-License-Iden... |
c5a61db9bf897494fb0657eeb24dfdcb1aab1fc4 | Analyze and fix the following issue in the Linux kernel code: ASoC: SOF: fix intel-soundwire link failure | Problem Details:
My randconfig build setup ran into a rare build failure with
CONFIG_SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE=y
CONFIG_SND_SOC_SOF_INTEL_SOUNDWIRE=m
CONFIG_SOUNDWIRE=y
CONFIG_SOUNDWIRE_INTEL=m
CONFIG_SND_SOC_SOF_HDA=y
CONFIG_SND_SOC_SOF_INTEL_TGL=y
x86_64-linux-ld: sound/soc/sof/intel/hda.o: in funct... | ```diff
diff --git a/sound/soc/sof/intel/Kconfig b/sound/soc/sof/intel/Kconfig
index 36a0e2bf30ff..715ba8a7f2f8 100644
--- a/sound/soc/sof/intel/Kconfig
+++ b/sound/soc/sof/intel/Kconfig
@@ -322,8 +322,8 @@ config SND_SOC_SOF_HDA_PROBES
config SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE
tristate
- select SOUNDWIRE_I... |
66b9e94cb7783d3c632e2c1b436b26ece8c14e5d | Analyze and fix the following issue in the Linux kernel code: ASoC: mediatek: mt8188: remove etdm dead code | Problem Details:
Some Smatch static checker warning like below was found.
sound/soc/mediatek/mt8188/mt8188-dai-etdm.c:2487
mt8188_dai_etdm_parse_of()
warn: 'ret' returned from snprintf() might be larger than 48
2479 for (i = 0; i < MT8188_AFE_IO_ETDM_NUM; i++) {
2480 dai_id = ETDM_TO_D... | ```diff
diff --git a/sound/soc/mediatek/mt8188/mt8188-dai-etdm.c b/sound/soc/mediatek/mt8188/mt8188-dai-etdm.c
index 0b79c1cc293b..071841903c62 100644
--- a/sound/soc/mediatek/mt8188/mt8188-dai-etdm.c
+++ b/sound/soc/mediatek/mt8188/mt8188-dai-etdm.c
@@ -2480,24 +2480,14 @@ static void mt8188_dai_etdm_parse_of(struct m... |
7206b517665e8b59d7e18877d9741da193cd3325 | Analyze and fix the following issue in the Linux kernel code: drm/i915/dsb: Pimp debug/error prints | Problem Details:
Print the crtc/DSB id information to make it clear which DSB engine
we're talking about.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230118163040.29808-3-ville.syrjala@linux.intel.com
Reviewed-by: Animesh Manna <animesh.manna@intel... | ```diff
diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c b/drivers/gpu/drm/i915/display/intel_dsb.c
index 96bc117fd6a0..f41146fc84d7 100644
--- a/drivers/gpu/drm/i915/display/intel_dsb.c
+++ b/drivers/gpu/drm/i915/display/intel_dsb.c
@@ -88,7 +88,8 @@ static bool assert_dsb_has_room(struct intel_dsb *dsb)
/* e... |
1af546c2cec6e28b6bbe01a4ad0c38e96e54fcb4 | Analyze and fix the following issue in the Linux kernel code: drm/i915/fbdev: Implement fb_dirty for intel custom fb helper | Problem Details:
After disconnecting damage worker from update logic it's left to fbdev
emulation implementation to have fb_dirty function. Currently intel
fbdev doesn't have it. This is causing problems to features (PSR, FBC,
DRRS) relying on dirty callback.
Implement simple fb_dirty callback to deliver notifications... | ```diff
diff --git a/drivers/gpu/drm/i915/display/intel_fbdev.c b/drivers/gpu/drm/i915/display/intel_fbdev.c
index 19f3b5d92a55..d39db8050c69 100644
--- a/drivers/gpu/drm/i915/display/intel_fbdev.c
+++ b/drivers/gpu/drm/i915/display/intel_fbdev.c
@@ -321,8 +321,20 @@ out_unlock:
return ret;
}
+static int intelfb_d... |
0c05e7bd2d017a3a9a0f4e9a19ad4acf1f616f12 | Analyze and fix the following issue in the Linux kernel code: livepatch,x86: Clear relocation targets on a module removal | Problem Details:
Josh reported a bug:
When the object to be patched is a module, and that module is
rmmod'ed and reloaded, it fails to load with:
module: x86/modules: Skipping invalid relocation target, existing value is nonzero for type 2, loc 00000000ba0302e9, val ffffffffa03e293c
livepatch: failed to initi... | ```diff
diff --git a/arch/x86/kernel/module.c b/arch/x86/kernel/module.c
index 0a09d816794b..790fa9f4a342 100644
--- a/arch/x86/kernel/module.c
+++ b/arch/x86/kernel/module.c
@@ -128,22 +128,27 @@ int apply_relocate(Elf32_Shdr *sechdrs,
return 0;
}
#else /*X86_64*/
-static int __apply_relocate_add(Elf64_Shdr *sechd... |
9e6a1825aca8568f624abeeb047969c72aa4c183 | Analyze and fix the following issue in the Linux kernel code: iommu: dart: DART_T8110_ERROR range should be 0 to 5 | Problem Details:
This was detected by smatch as one "else if" statement could never be
reached. Confirmed bit order by comparing with python implementation [1].
drivers/iommu/apple-dart.c:991 apple_dart_t8110_irq()
warn: duplicate check 'error_code == ((((1))) << (3))'
(previous on line 989)
Link: https://github.co... | ```diff
diff --git a/drivers/iommu/apple-dart.c b/drivers/iommu/apple-dart.c
index 1fc64a42c890..abedcffed237 100644
--- a/drivers/iommu/apple-dart.c
+++ b/drivers/iommu/apple-dart.c
@@ -111,8 +111,8 @@
#define DART_T8110_ERROR_MASK 0x104
-#define DART_T8110_ERROR_READ_FAULT BIT(4)
-#define DART_T8110_ERROR_WRITE_... |
4a0d4265659b1078db3432cb80ceaf26ad921704 | Analyze and fix the following issue in the Linux kernel code: iommu/vt-d: Add IOMMU perfmon overflow handler support | Problem Details:
While enabled to count events and an event occurrence causes the counter
value to increment and roll over to or past zero, this is termed a
counter overflow. The overflow can trigger an interrupt. The IOMMU
perfmon needs to handle the case properly.
New HW IRQs are allocated for each IOMMU device for ... | ```diff
diff --git a/drivers/iommu/intel/dmar.c b/drivers/iommu/intel/dmar.c
index 0e429bab436f..43db6ebe8b57 100644
--- a/drivers/iommu/intel/dmar.c
+++ b/drivers/iommu/intel/dmar.c
@@ -1879,6 +1879,8 @@ static inline int dmar_msi_reg(struct intel_iommu *iommu, int irq)
return DMAR_FECTL_REG;
else if (iommu->pr_i... |
7232ab8b89e9ea32f07370643635a13641ce9c3c | Analyze and fix the following issue in the Linux kernel code: iommu/vt-d: Add IOMMU perfmon support | Problem Details:
Implement the IOMMU performance monitor capability, which supports the
collection of information about key events occurring during operation of
the remapping hardware, to aid performance tuning and debug.
The IOMMU perfmon support is implemented as part of the IOMMU driver and
interfaces with the Linu... | ```diff
diff --git a/Documentation/ABI/testing/sysfs-bus-event_source-devices-iommu b/Documentation/ABI/testing/sysfs-bus-event_source-devices-iommu
new file mode 100644
index 000000000000..988210a0e8ce
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-bus-event_source-devices-iommu
@@ -0,0 +1,29 @@
+What: /sys/bus/... |
a6a5006dad572a53b5df3f47e1471d207ae9ba49 | Analyze and fix the following issue in the Linux kernel code: iommu/vt-d: Retrieve IOMMU perfmon capability information | Problem Details:
The performance monitoring infrastructure, perfmon, is to support
collection of information about key events occurring during operation of
the remapping hardware, to aid performance tuning and debug. Each
remapping hardware unit has capability registers that indicate support
for performance monitoring ... | ```diff
diff --git a/drivers/iommu/intel/Kconfig b/drivers/iommu/intel/Kconfig
index b7dff5092fd2..12e1e90fdae1 100644
--- a/drivers/iommu/intel/Kconfig
+++ b/drivers/iommu/intel/Kconfig
@@ -96,4 +96,15 @@ config INTEL_IOMMU_SCALABLE_MODE_DEFAULT_ON
passing intel_iommu=sm_on to the kernel. If not sure, please use
... |
e06d24435596c8afcaa81c0c498f5b0ec4ee2b7c | Analyze and fix the following issue in the Linux kernel code: iommu/vt-d: Set No Execute Enable bit in PASID table entry | Problem Details:
Setup No Execute Enable bit (Bit 133) of a scalable mode PASID entry.
This is to allow the use of XD bit of the first level page table.
Fixes: ddf09b6d43ec ("iommu/vt-d: Setup pasid entries for iova over first level")
Signed-off-by: Ashok Raj <ashok.raj@intel.com>
Signed-off-by: Lu Baolu <baolu.lu@lin... | ```diff
diff --git a/drivers/iommu/intel/pasid.c b/drivers/iommu/intel/pasid.c
index fb3c7020028d..ec964ac7d797 100644
--- a/drivers/iommu/intel/pasid.c
+++ b/drivers/iommu/intel/pasid.c
@@ -364,6 +364,16 @@ static inline void pasid_set_page_snoop(struct pasid_entry *pe, bool value)
pasid_set_bits(&pe->val[1], 1 << 2... |
b6b26d86c61c441144c72f842f7469bb686e1211 | Analyze and fix the following issue in the Linux kernel code: iommu/amd: Add a length limitation for the ivrs_acpihid command-line parameter | Problem Details:
The 'acpiid' buffer in the parse_ivrs_acpihid function may overflow,
because the string specifier in the format string sscanf()
has no width limitation.
Found by InfoTeCS on behalf of Linux Verification Center
(linuxtesting.org) with SVACE.
Fixes: ca3bf5d47cec ("iommu/amd: Introduces ivrs_acpihid ker... | ```diff
diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c
index 467b194975b3..19a46b9f7357 100644
--- a/drivers/iommu/amd/init.c
+++ b/drivers/iommu/amd/init.c
@@ -3475,15 +3475,26 @@ found:
return 1;
}
+#define ACPIID_LEN (ACPIHID_UID_LEN + ACPIHID_HID_LEN)
+
static int __init parse_ivrs_acpihid(c... |
cf5c1c87c2391649e05e58ecc6dfc3dc5ebebc05 | Analyze and fix the following issue in the Linux kernel code: iommu/dart: Fix apple_dart_device_group for PCI groups | Problem Details:
pci_device_group() can return an already existing IOMMU group if the PCI
device's pagetables have to be shared with another one due to bus
toplogy, isolation features and/or DMA alias quirks.
apple_dart_device_group() however assumes that the group has just been
created and overwrites its iommudata whi... | ```diff
diff --git a/drivers/iommu/apple-dart.c b/drivers/iommu/apple-dart.c
index 42666617803d..1fc64a42c890 100644
--- a/drivers/iommu/apple-dart.c
+++ b/drivers/iommu/apple-dart.c
@@ -835,6 +835,29 @@ static void apple_dart_release_group(void *iommu_data)
mutex_unlock(&apple_dart_groups_lock);
}
+static int app... |
55bf243c514553e907efcf2bda92ba090eca8c64 | Analyze and fix the following issue in the Linux kernel code: kernel/printk/index.c: fix memory leak with using debugfs_lookup() | Problem Details:
When calling debugfs_lookup() the result must have dput() called on it,
otherwise the memory will leak over time. To make things simpler, just
call debugfs_lookup_and_remove() instead which handles all of the logic
at once.
Cc: Chris Down <chris@chrisdown.name>
Cc: Petr Mladek <pmladek@suse.com>
Cc: ... | ```diff
diff --git a/kernel/printk/index.c b/kernel/printk/index.c
index c85be186a783..a6b27526baaf 100644
--- a/kernel/printk/index.c
+++ b/kernel/printk/index.c
@@ -145,7 +145,7 @@ static void pi_create_file(struct module *mod)
#ifdef CONFIG_MODULES
static void pi_remove_file(struct module *mod)
{
- debugfs_remove... |
189d496b48b1731f21f19ff3b7109ec724f5dcb2 | Analyze and fix the following issue in the Linux kernel code: iommu/exynos: Add missing set_platform_dma_ops callback | Problem Details:
Add set_platform_dma_ops() required for proper driver operation on ARM
32bit arch after recent changes in the IOMMU framework (detach ops
removal).
Fixes: c1fe9119ee70 ("iommu: Add set_platform_dma_ops callbacks")
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Link: https://lore.kernel.org... | ```diff
diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c
index 29ec713e8a21..7eaa58ced4ae 100644
--- a/drivers/iommu/exynos-iommu.c
+++ b/drivers/iommu/exynos-iommu.c
@@ -1346,8 +1346,10 @@ static void exynos_iommu_release_device(struct device *dev)
struct iommu_group *group = iommu_group_get... |
5ae20a8050d08a51fef9769cd53237551f259dbe | Analyze and fix the following issue in the Linux kernel code: platform/x86: int3472/discrete: Create a LED class device for the privacy LED | Problem Details:
On some systems, e.g. the Lenovo ThinkPad X1 Yoga gen 7 and the ThinkPad
X1 Nano gen 2 there is no clock-enable pin, triggering the:
"No clk GPIO. The privacy LED won't work" warning and causing the privacy
LED to not work.
Fix this by modeling the privacy LED as a LED class device rather then
integra... | ```diff
diff --git a/drivers/platform/x86/intel/int3472/Makefile b/drivers/platform/x86/intel/int3472/Makefile
index cfec7784c5c9..9f16cb514397 100644
--- a/drivers/platform/x86/intel/int3472/Makefile
+++ b/drivers/platform/x86/intel/int3472/Makefile
@@ -1,4 +1,4 @@
obj-$(CONFIG_INTEL_SKL_INT3472) += intel_skl_int347... |
0cb2a8f3456ff1cc51d571e287a48e8fddc98ec2 | Analyze and fix the following issue in the Linux kernel code: PCI: mt7621: Delay phy ports initialization | Problem Details:
Some devices like ZBT WE1326 and ZBT WF3526-P and some Netgear models need
to delay phy port initialization after calling the mt7621_pcie_init_port()
driver function to get into reliable boots for both warm and hard resets.
The delay required to detect the ports seems to be in the range [75-100]
milli... | ```diff
diff --git a/drivers/pci/controller/pcie-mt7621.c b/drivers/pci/controller/pcie-mt7621.c
index ee7aad09d627..63a5f4463a9f 100644
--- a/drivers/pci/controller/pcie-mt7621.c
+++ b/drivers/pci/controller/pcie-mt7621.c
@@ -60,6 +60,7 @@
#define PCIE_PORT_LINKUP BIT(0)
#define PCIE_PORT_CNT 3
+#define INIT_PO... |
ce93fdb5f2ca5c9e2a9668411cc39091507f8dc9 | Analyze and fix the following issue in the Linux kernel code: net: phylink: move phy_device_free() to correctly release phy device | Problem Details:
After calling fwnode_phy_find_device(), the phy device refcount is
incremented. Then, when the phy device is attached to a netdev with
phy_attach_direct(), the refcount is also incremented but only
decremented in the caller if phy_attach_direct() fails. Move
phy_device_free() before the "if" to always ... | ```diff
diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
index 09cc65c0da93..4d2519cdb801 100644
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -1812,10 +1812,9 @@ int phylink_fwnode_phy_connect(struct phylink *pl,
ret = phy_attach_direct(pl->netdev, phy_dev, flags,
pl->li... |
d1fcb7493fc36a192b19fb8b046c416d05b6d6fe | Analyze and fix the following issue in the Linux kernel code: tools/power/x86/intel-speed-select: v1.14 release | Problem Details:
This release adds following change:
- Minor fixes for coverity static analysis
- Don't read cpufreq on offline CPUs
- SST turbo-freq enable on auto mode when user disables SMT from
kernel command line
- Fix uncore frequency display
- Set uncore frequency max/min limits on perf level change
Signed-off-... | ```diff
diff --git a/tools/power/x86/intel-speed-select/isst-config.c b/tools/power/x86/intel-speed-select/isst-config.c
index 15bee7f52044..55d0a35df41c 100644
--- a/tools/power/x86/intel-speed-select/isst-config.c
+++ b/tools/power/x86/intel-speed-select/isst-config.c
@@ -15,7 +15,7 @@ struct process_cmd_struct {
i... |
0d5eea3527e4618ee32fce91a5d54638a7f8c411 | Analyze and fix the following issue in the Linux kernel code: tools/power/x86/intel-speed-select: Fix display of uncore min frequency | Problem Details:
Uncore P1 is not uncore minmum frequency. This is uncore base frequency.
Correct display from uncore-frequency-min(MHz)
to uncore-frequency-base(Mhz).
To get uncore min frequency use mailbox command
CONFIG_TDP_GET_RATIO_INFO. Use this mailbox to get uncore frequency
limits when present.
Signed-off-by... | ```diff
diff --git a/tools/power/x86/intel-speed-select/isst-core.c b/tools/power/x86/intel-speed-select/isst-core.c
index f701b45c832c..2bfc118c4b87 100644
--- a/tools/power/x86/intel-speed-select/isst-core.c
+++ b/tools/power/x86/intel-speed-select/isst-core.c
@@ -156,6 +156,29 @@ void isst_get_uncore_p0_p1_info(stru... |
87b93dd1fbb23b9bbae461bb2c01f6d93c7524d9 | Analyze and fix the following issue in the Linux kernel code: dt-bindings: pinctrl: qcom,msm8909: correct GPIO name pattern and example | Problem Details:
The MSM8909 TLMM pin controller has GPIOs 0-112, so narrow the pattern
and gpio-ranges in the example.
Fixes: c249ec7ba1b1 ("dt-bindings: pinctrl: Add DT schema for qcom,msm8909-tlmm")
Reviewed-by: Stephan Gerhold <stephan@gerhold.net>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.... | ```diff
diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,msm8909-tlmm.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,msm8909-tlmm.yaml
index 449e6e34be61..85082adc1811 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,msm8909-tlmm.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,msm... |
21773790a77284777ab538203d1ba16a352b5909 | Analyze and fix the following issue in the Linux kernel code: scripts/tags.sh: fix the Kconfig tags generation when using latest ctags | Problem Details:
The Kconfig language has already been built-in in the latest ctags, so it
would error exit if we try to define it as an user-defined language via
'--langdef=kconfig'. This results that there is no Kconfig tags in the
final tag file. Fix this by skipping the user Kconfig definition for the
latest ctag... | ```diff
diff --git a/scripts/tags.sh b/scripts/tags.sh
index e137cf15aae9..84775f08260f 100755
--- a/scripts/tags.sh
+++ b/scripts/tags.sh
@@ -264,10 +264,12 @@ exuberant()
--$CTAGS_EXTRA=+fq --c-kinds=+px --fields=+iaS --langmap=c:+.h \
"${regex[@]}"
- setup_regex exuberant kconfig
- all_kconfigs | xargs $1 -a ... |
602ce7b8e1343b19c0cf93a3dd1926838ac5a1cc | Analyze and fix the following issue in the Linux kernel code: nilfs2: prevent WARNING in nilfs_dat_commit_end() | Problem Details:
If nilfs2 reads a corrupted disk image and its DAT metadata file contains
invalid lifetime data for a virtual block number, a kernel warning can be
generated by the WARN_ON check in nilfs_dat_commit_end() and can panic if
the kernel is booted with panic_on_warn.
This patch avoids the issue with a sani... | ```diff
diff --git a/fs/nilfs2/dat.c b/fs/nilfs2/dat.c
index 1e7f653c1df7..9cf6ba58f585 100644
--- a/fs/nilfs2/dat.c
+++ b/fs/nilfs2/dat.c
@@ -158,6 +158,7 @@ void nilfs_dat_commit_start(struct inode *dat, struct nilfs_palloc_req *req,
int nilfs_dat_prepare_end(struct inode *dat, struct nilfs_palloc_req *req)
{
str... |
e89bd9e7d8eb63a183040eaf0c9640fdb34ec47a | Analyze and fix the following issue in the Linux kernel code: lib/zlib: remove redundation assignement of avail_in dfltcc_gdht() | Problem Details:
cppcheck reports
lib/zlib_dfltcc/dfltcc_deflate.c:65:21: warning: Redundant assignment of 'avail_in' to itself. [selfAssignment]
size_t avail_in = avail_in = strm->avail_in;
Only setting avail_in once is needed.
Link: https://lkml.kernel.org/r/20230128165048.1245792-1-trix@redhat.com
Fixes: aa5b3... | ```diff
diff --git a/lib/zlib_dfltcc/dfltcc_deflate.c b/lib/zlib_dfltcc/dfltcc_deflate.c
index 80924f067c24..b732b6d9e35d 100644
--- a/lib/zlib_dfltcc/dfltcc_deflate.c
+++ b/lib/zlib_dfltcc/dfltcc_deflate.c
@@ -62,7 +62,7 @@ static void dfltcc_gdht(
{
deflate_state *state = (deflate_state *)strm->state;
stru... |
cc6003916ed46d7a67d91ee32de0f9138047d55f | Analyze and fix the following issue in the Linux kernel code: lib/Kconfig.debug: do not enable DEBUG_PREEMPT by default | Problem Details:
In workloads where this_cpu operations are frequently performed,
enabling DEBUG_PREEMPT may result in significant increase in
runtime overhead due to frequent invocation of
__this_cpu_preempt_check() function.
This can be demonstrated through benchmarks such as hackbench where this
configuration resul... | ```diff
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 918bda4ee120..a97aca81db24 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1246,13 +1246,16 @@ config DEBUG_TIMEKEEPING
config DEBUG_PREEMPT
bool "Debug preemptible kernel"
depends on DEBUG_KERNEL && PREEMPTION && TRACE_IRQFLAGS_SUPPORT
- ... |
0dbae46550363c88cf073aafc0e0b244b9f43555 | Analyze and fix the following issue in the Linux kernel code: lib/zlib: fix DFLTCC ignoring flush modes when avail_in == 0 | Problem Details:
This commit is based on:
https://github.com/zlib-ng/zlib-ng/commit/40acb3f
Link: https://lkml.kernel.org/r/20230126131428.1222214-5-zaslonko@linux.ibm.com
Signed-off-by: Mikhail Zaslonko <zaslonko@linux.ibm.com>
Acked-by: Ilya Leoshkevich <iii@linux.ibm.com>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc... | ```diff
diff --git a/lib/zlib_dfltcc/dfltcc_deflate.c b/lib/zlib_dfltcc/dfltcc_deflate.c
index dc85ec890163..211d344710d5 100644
--- a/lib/zlib_dfltcc/dfltcc_deflate.c
+++ b/lib/zlib_dfltcc/dfltcc_deflate.c
@@ -142,7 +142,8 @@ again:
/* Clear history. */
if (flush == Z_FULL_FLUSH)
param->... |
195c5ad9d179dbea1c9026f2af5b3eb77f8205b3 | Analyze and fix the following issue in the Linux kernel code: lib/zlib: fix DFLTCC not flushing EOBS when creating raw streams | Problem Details:
This commit is based on:
https://github.com/zlib-ng/zlib-ng/commit/ca99a88
Link: https://lkml.kernel.org/r/20230126131428.1222214-4-zaslonko@linux.ibm.com
Signed-off-by: Mikhail Zaslonko <zaslonko@linux.ibm.com>
Acked-by: Ilya Leoshkevich <iii@linux.ibm.com>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc... | ```diff
diff --git a/lib/zlib_deflate/deflate.c b/lib/zlib_deflate/deflate.c
index 8a878d0d892c..f30d6b8a69b2 100644
--- a/lib/zlib_deflate/deflate.c
+++ b/lib/zlib_deflate/deflate.c
@@ -451,17 +451,24 @@ int zlib_deflate(
Assert(strm->avail_out > 0, "bug2");
if (flush != Z_FINISH) return Z_OK;
- if (s->... |
4cc06c9afbb4dbed007f06450127ab745d6dc450 | Analyze and fix the following issue in the Linux kernel code: lib/zlib: adjust offset calculation for dfltcc_state | Problem Details:
Patch series "lib/zlib: Set of s390 DFLTCC related patches for kernel zlib".
Patches 1-7 represent a set of s390 zlib hardware support (DFLTCC) related
fixes and enhancements integrated from zlib-ng repo relevant to kernel
zlib (https://github.com/zlib-ng/zlib-ng).
Since the official zlib repository ... | ```diff
diff --git a/lib/zlib_dfltcc/dfltcc.h b/lib/zlib_dfltcc/dfltcc.h
index 2a2fac1d050a..1f63094366e9 100644
--- a/lib/zlib_dfltcc/dfltcc.h
+++ b/lib/zlib_dfltcc/dfltcc.h
@@ -100,8 +100,9 @@ struct dfltcc_state {
char msg[64]; /* Buffer for strm->msg */
};
+#define ALIGN_UP(p, size) (__... |
5124a0a549857c4b87173280e192eea24dea72ad | Analyze and fix the following issue in the Linux kernel code: nilfs2: replace WARN_ONs for invalid DAT metadata block requests | Problem Details:
If DAT metadata file block access fails due to corruption of the DAT file
or abnormal virtual block numbers held by b-trees or inodes, a kernel
warning is generated.
This replaces the WARN_ONs by error output, so that a kernel, booted with
panic_on_warn, does not panic. This patch also replaces the d... | ```diff
diff --git a/fs/nilfs2/dat.c b/fs/nilfs2/dat.c
index 9930fa901039..1e7f653c1df7 100644
--- a/fs/nilfs2/dat.c
+++ b/fs/nilfs2/dat.c
@@ -40,8 +40,21 @@ static inline struct nilfs_dat_info *NILFS_DAT_I(struct inode *dat)
static int nilfs_dat_prepare_entry(struct inode *dat,
struct nilfs_palloc_req *req, i... |
1b381f6fe495fffbbdace1ee530afb74287c809d | Analyze and fix the following issue in the Linux kernel code: scripts/spelling.txt: add "exsits" pattern and fix typo instances | Problem Details:
Fix typos and add the following to the scripts/spelling.txt:
exsits||exists
Link: https://lkml.kernel.org/r/20230126152205.959277-1-luca.ceresoli@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org> | ```diff
diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c
index 620ae5b2d80d..6b7603765383 100644
--- a/drivers/infiniband/ulp/iser/iscsi_iser.c
+++ b/drivers/infiniband/ulp/iser/iscsi_iser.c
@@ -446,7 +446,7 @@ iscsi_iser_conn_create(struct iscsi_cls_session *cls_session,... |
a1f46ff2ff88ab8cec64953422f207a81ff379f8 | Analyze and fix the following issue in the Linux kernel code: cramfs: Kconfig: fix spelling & punctuation | Problem Details:
Fix spelling and hyphenation in cramfs Kconfig.
Link: https://lkml.kernel.org/r/20230124181631.15204-1-rdunlap@infradead.org
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org> | ```diff
diff --git a/fs/cramfs/Kconfig b/fs/cramfs/Kconfig
index d98cef0dbb6b..4612c9bbf102 100644
--- a/fs/cramfs/Kconfig
+++ b/fs/cramfs/Kconfig
@@ -38,7 +38,7 @@ config CRAMFS_MTD
default y if !CRAMFS_BLOCKDEV
help
This option allows the CramFs driver to load data directly from
- a linear adressed memory r... |
74b7046d329770ea9dd105ca321ad6abb91bdbbb | Analyze and fix the following issue in the Linux kernel code: fs: hfsplus: initialize fsdata in hfsplus_file_truncate() | Problem Details:
When aops->write_begin() does not initialize fsdata, KMSAN may report an
error passing the latter to aops->write_end().
Fix this by unconditionally initializing fsdata.
Link: https://lkml.kernel.org/r/20221121112134.407362-5-glider@google.com
Signed-off-by: Alexander Potapenko <glider@google.com>
Sug... | ```diff
diff --git a/fs/hfsplus/extents.c b/fs/hfsplus/extents.c
index 721f779b4ec3..7a542f3dbe50 100644
--- a/fs/hfsplus/extents.c
+++ b/fs/hfsplus/extents.c
@@ -554,7 +554,7 @@ void hfsplus_file_truncate(struct inode *inode)
if (inode->i_size > hip->phys_size) {
struct address_space *mapping = inode->i_mapping;
... |
e52a418d81fb3c9db187ca9aa519c534b30962a8 | Analyze and fix the following issue in the Linux kernel code: fs: hfs: initialize fsdata in hfs_file_truncate() | Problem Details:
When aops->write_begin() does not initialize fsdata, KMSAN may report an
error passing the latter to aops->write_end().
Fix this by unconditionally initializing fsdata.
Link: https://lkml.kernel.org/r/20221121112134.407362-4-glider@google.com
Signed-off-by: Alexander Potapenko <glider@google.com>
Sug... | ```diff
diff --git a/fs/hfs/extent.c b/fs/hfs/extent.c
index 3f7e9bef9874..6d1878b99b30 100644
--- a/fs/hfs/extent.c
+++ b/fs/hfs/extent.c
@@ -486,7 +486,7 @@ void hfs_file_truncate(struct inode *inode)
inode->i_size);
if (inode->i_size > HFS_I(inode)->phys_size) {
struct address_space *mapping = inode->i_mappi... |
d7f1d71e5ef630ab9e15b5821d297a9e1a5fa1da | Analyze and fix the following issue in the Linux kernel code: checkpatch: warn when Reported-by: is not followed by Link: | Problem Details:
Encourage patch authors to link to reports by issuing a warning, if a
Reported-by: is not accompanied by a link to the report. Those links are
often extremely useful for any code archaeologist that wants to know more
about the backstory of a change than the commit message provides. That
includes main... | ```diff
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index facebdc6ee07..10c82f8f3636 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3157,8 +3157,20 @@ sub process {
"Co-developed-by and Signed-off-by: name/email do not match \n" . "$here\n" . $rawline . "\n" .$rawlines[$lin... |
76f381bb77a0164267d059dd17112605242b2c56 | Analyze and fix the following issue in the Linux kernel code: checkpatch: warn when unknown tags are used for links | Problem Details:
Patch series "checkpatch.pl: warn about discouraged tags and missing Link:
tags", v4.
The first two changes make checkpatch.pl check for a few mistakes wrt to
links to bug reports Linus recently complained about a few times.
Avoiding those is also important for my regression tracking efforts a lot,
a... | ```diff
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index a6d6d7e1d0cf..facebdc6ee07 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3252,6 +3252,18 @@ sub process {
$commit_log_possible_stack_dump = 0;
}
+# Check for odd tags before a URI/URL
+ if ($in_commit_log &&
+ $... |
06dcb0138f5f815f50142234b2e06f5540471715 | Analyze and fix the following issue in the Linux kernel code: Documentation: sysctl: correct kexec_load_disabled | Problem Details:
Patch series "kexec: Add new parameter to limit the access to kexec", v6.
Add two parameter to specify how many times a kexec kernel can be loaded.
These parameter allow hardening the system.
While we are at it, fix a documentation issue and refactor some code.
This patch (of 3):
kexec_load_disab... | ```diff
diff --git a/Documentation/admin-guide/sysctl/kernel.rst b/Documentation/admin-guide/sysctl/kernel.rst
index 46e3d62c0eea..b53c0235cb43 100644
--- a/Documentation/admin-guide/sysctl/kernel.rst
+++ b/Documentation/admin-guide/sysctl/kernel.rst
@@ -453,9 +453,10 @@ this allows system administrators to override th... |
227849a33a8ba2ee6fdff0a0a724b2af1c3b344c | Analyze and fix the following issue in the Linux kernel code: fat: fix return value of vfat_bad_char() and vfat_replace_char() functions | Problem Details:
These functions returns boolean value not wide character.
Link: https://lkml.kernel.org/r/20221226142512.13848-1-pali@kernel.org
Signed-off-by: Pali Rohár <pali@kernel.org>
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org> | ```diff
diff --git a/fs/fat/namei_vfat.c b/fs/fat/namei_vfat.c
index 21620054e1c4..0735e4f0aeed 100644
--- a/fs/fat/namei_vfat.c
+++ b/fs/fat/namei_vfat.c
@@ -200,7 +200,7 @@ static const struct dentry_operations vfat_dentry_ops = {
/* Characters that are undesirable in an MS-DOS file name */
-static inline wchar_... |
e227db4d4f125efb1cae2f1337da85bc10b3185e | Analyze and fix the following issue in the Linux kernel code: userns: fix a struct's kernel-doc notation | Problem Details:
Use the 'struct' keyword for a struct's kernel-doc notation to avoid a
kernel-doc warning:
kernel/user_namespace.c:232: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* idmap_key struct holds the information necessary to find an i... | ```diff
diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c
index 54211dbd516c..1d8e47bed3f1 100644
--- a/kernel/user_namespace.c
+++ b/kernel/user_namespace.c
@@ -229,7 +229,7 @@ void __put_user_ns(struct user_namespace *ns)
EXPORT_SYMBOL(__put_user_ns);
/**
- * idmap_key struct holds the information ne... |
aa0b42b7b4b54f0341a1ef5c44360e0e386951f1 | Analyze and fix the following issue in the Linux kernel code: ntfs: fix multiple kernel-doc warnings | Problem Details:
Fix many W=1 kernel-doc warnings in fs/ntfs/:
fs/ntfs/aops.c:30: warning: Incorrect use of kernel-doc format: * ntfs_end_buffer_async_read - async io completion for reading attributes
fs/ntfs/aops.c:46: warning: expecting prototype for aops.c(). Prototype was for ntfs_end_buffer_async_read() instead
... | ```diff
diff --git a/fs/ntfs/aops.c b/fs/ntfs/aops.c
index 9364d35b4a10..e8aeba124a95 100644
--- a/fs/ntfs/aops.c
+++ b/fs/ntfs/aops.c
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-or-later
-/**
+/*
* aops.c - NTFS kernel address space operations and page cache handling.
*
* Copyright (c) 2001-2014 Anton A... |
d3fcf834b248b94e0d5b849b25dbb53debe1b5dd | Analyze and fix the following issue in the Linux kernel code: freevxfs: fix kernel-doc warnings | Problem Details:
Fix multiple kernel-doc warnings in freevxfs:
fs/freevxfs/vxfs_subr.c:45: warning: Function parameter or member 'mapping' not described in 'vxfs_get_page'
fs/freevxfs/vxfs_subr.c:45: warning: Excess function parameter 'ip' description in 'vxfs_get_page'
2 warnings
fs/freevxfs/vxfs_subr.c:101: warning:... | ```diff
diff --git a/fs/freevxfs/vxfs_subr.c b/fs/freevxfs/vxfs_subr.c
index c99282df7761..f439877ea6e8 100644
--- a/fs/freevxfs/vxfs_subr.c
+++ b/fs/freevxfs/vxfs_subr.c
@@ -31,7 +31,7 @@ vxfs_put_page(struct page *pp)
/**
* vxfs_get_page - read a page into memory.
- * @ip: inode to read from
+ * @mapping: mappi... |
a3ea42ff8f3c977ac568f0530d2c13a639858764 | Analyze and fix the following issue in the Linux kernel code: checkpatch: mark kunmap() and kunmap_atomic() deprecated | Problem Details:
It was suggested by Fabio that kunmap() be marked deprecated in
checkpatch.[1] This did not seem necessary until an invalid conversion of
kmap_local_page() appeared in mainline.[2][3] The introduction of this bug
would have been flagged with kunmap() being marked deprecated.
Add kunmap() and kunmap_at... | ```diff
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 78cc595b98ce..a6d6d7e1d0cf 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -823,7 +823,9 @@ our %deprecated_apis = (
"get_state_synchronize_sched" => "get_state_synchronize_rcu",
"cond_synchronize_sched" => "cond_synchroniz... |
828dfc0f7b84b175be32c286a70331ab55e80139 | Analyze and fix the following issue in the Linux kernel code: scripts/spelling.txt: add `permitted' | Problem Details:
Patch series "spelling: Fix some trivial typos".
Seems like permitted has two t's :), Lets add that to spellings to help
others.
This patch (of 3):
Add another common typo. Noticed when I sent a patch with the typo and
in kvm and of.
[ribalda@chromium.org: fix trivial typo]
Link: https://lkml.ke... | ```diff
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 5cc3efa0e21c..56e1cf7c339e 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -2615,8 +2615,8 @@ static bool emulator_io_port_access_allowed(struct x86_emulate_ctxt *ctxt,
return true;
}
-static bool emulator_io_permited(st... |
805afd8300998948d16bdba0358dcfeb202a70d5 | Analyze and fix the following issue in the Linux kernel code: lib/percpu_counter: percpu_counter_add_batch() overflow/underflow | Problem Details:
Patch series "various irq handling fixes/docu updates".
If an interrupt happens between __this_cpu_read(*fbc->counters) and
this_cpu_add(*fbc->counters, amount), and that interrupt modifies the
per_cpu_counter, then the this_cpu_add() after the interrupt returns may
under/overflow.
Link: https://lkml... | ```diff
diff --git a/lib/percpu_counter.c b/lib/percpu_counter.c
index 42f729c8e56c..dba56c5c1837 100644
--- a/lib/percpu_counter.c
+++ b/lib/percpu_counter.c
@@ -73,28 +73,33 @@ void percpu_counter_set(struct percpu_counter *fbc, s64 amount)
EXPORT_SYMBOL(percpu_counter_set);
/*
- * This function is both preempt a... |
a9dc087fd3c484fd1ed18c5efb290efaaf44ce03 | Analyze and fix the following issue in the Linux kernel code: hfs: fix missing hfs_bnode_get() in __hfs_bnode_create | Problem Details:
Syzbot found a kernel BUG in hfs_bnode_put():
kernel BUG at fs/hfs/bnode.c:466!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 3634 Comm: kworker/u4:5 Not tainted 6.1.0-rc7-syzkaller-00190-g97ee9d1c1696 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/2... | ```diff
diff --git a/fs/hfs/bnode.c b/fs/hfs/bnode.c
index 2015e42e752a..6add6ebfef89 100644
--- a/fs/hfs/bnode.c
+++ b/fs/hfs/bnode.c
@@ -274,6 +274,7 @@ static struct hfs_bnode *__hfs_bnode_create(struct hfs_btree *tree, u32 cnid)
tree->node_hash[hash] = node;
tree->node_hash_cnt++;
} else {
+ hfs_bnode_get(... |
6338bb05c15f88e2f4beae296ef389224837758c | Analyze and fix the following issue in the Linux kernel code: error-injection: remove EI_ETYPE_NONE | Problem Details:
Patch series "error-injection: Clarify the requirements of error
injectable functions".
Patches for clarifying the requirement of error injectable functions and
to remove the confusing EI_ETYPE_NONE.
This patch (of 2):
Since the EI_ETYPE_NONE is confusing type, replace it with appropriate
errno. T... | ```diff
diff --git a/include/asm-generic/error-injection.h b/include/asm-generic/error-injection.h
index fbca56bd9cbc..c0b9d3217ed9 100644
--- a/include/asm-generic/error-injection.h
+++ b/include/asm-generic/error-injection.h
@@ -4,7 +4,6 @@
#if defined(__KERNEL__) && !defined(__ASSEMBLY__)
enum {
- EI_ETYPE_NONE,... |
d83d7ed260283560700d4034a80baad46620481b | Analyze and fix the following issue in the Linux kernel code: kernel/irq/irqdomain.c: fix memory leak with using debugfs_lookup() | Problem Details:
When calling debugfs_lookup() the result must have dput() called on it,
otherwise the memory will leak over time. To make things simpler, just
call debugfs_lookup_and_remove() instead which handles all of the logic
at once.
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: stable <stable@kernel.org>
Revie... | ```diff
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index 8fe1da9614ee..e2096b51c004 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -1915,7 +1915,7 @@ static void debugfs_add_domain_dir(struct irq_domain *d)
static void debugfs_remove_domain_dir(struct irq_domain *d)
{
- debugf... |
6dfb0771429a63db8561d44147f2bb76f93e1c86 | Analyze and fix the following issue in the Linux kernel code: HV: hv_balloon: fix memory leak with using debugfs_lookup() | Problem Details:
When calling debugfs_lookup() the result must have dput() called on it,
otherwise the memory will leak over time. To make things simpler, just
call debugfs_lookup_and_remove() instead which handles all of the logic
at once.
Cc: "K. Y. Srinivasan" <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@micros... | ```diff
diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_balloon.c
index cbe43e2567a7..64ac5bdee3a6 100644
--- a/drivers/hv/hv_balloon.c
+++ b/drivers/hv/hv_balloon.c
@@ -1963,7 +1963,7 @@ static void hv_balloon_debugfs_init(struct hv_dynmem_device *b)
static void hv_balloon_debugfs_exit(struct hv_dynmem_devic... |
9160cffd45ee93bc20de134e4f127dac9af0cc18 | Analyze and fix the following issue in the Linux kernel code: mpage: convert __mpage_writepage() to use a folio more fully | Problem Details:
This is just a conversion to the folio API. While there are some nods
towards supporting multi-page folios in here, the blocks array is still
sized for one page's worth of blocks, and there are other assumptions such
as the blocks_per_page variable.
[willy@infradead.org: fix accidentally-triggering W... | ```diff
diff --git a/fs/mpage.c b/fs/mpage.c
index 4890369bb10a..b9b7f6dc9c37 100644
--- a/fs/mpage.c
+++ b/fs/mpage.c
@@ -443,13 +443,11 @@ void clean_page_buffers(struct page *page)
static int __mpage_writepage(struct folio *folio, struct writeback_control *wbc,
void *data)
{
- struct page *page = &folio->... |
00cdf76012ab78b225345e8cf77d5391b4680b45 | Analyze and fix the following issue in the Linux kernel code: mm: add memcpy_from_file_folio() | Problem Details:
This is the equivalent of memcpy_from_page(). It differs in that it takes
the position in a file instead of offset in a folio, it accepts the total
number of bytes to be copied (instead of the number of bytes to be copied
from this folio) and it returns how many bytes were copied from the folio,
rathe... | ```diff
diff --git a/include/linux/highmem.h b/include/linux/highmem.h
index e22509420ac6..348701dae77f 100644
--- a/include/linux/highmem.h
+++ b/include/linux/highmem.h
@@ -413,6 +413,35 @@ static inline void memzero_page(struct page *page, size_t offset, size_t len)
kunmap_local(addr);
}
+/**
+ * memcpy_from_fi... |
3222d8c2a7f888bf38b845b125e9470b12108a4d | Analyze and fix the following issue in the Linux kernel code: block: remove ->rw_page | Problem Details:
The ->rw_page method is a special purpose bypass of the usual bio handling
path that is limited to single-page reads and writes and synchronous which
causes a lot of extra code in the drivers, callers and the block layer.
The only remaining user is the MM swap code. Switch that swap code to
simply su... | ```diff
diff --git a/block/bdev.c b/block/bdev.c
index edc110d90df4..1795c7d4b99e 100644
--- a/block/bdev.c
+++ b/block/bdev.c
@@ -304,84 +304,6 @@ out:
}
EXPORT_SYMBOL(thaw_bdev);
-/**
- * bdev_read_page() - Start reading a page from a block device
- * @bdev: The device to read the page from
- * @sector: The offse... |
a8c1408f870ef5308088b02c76082136b2c514ad | Analyze and fix the following issue in the Linux kernel code: mm: remove the swap_readpage return value | Problem Details:
swap_readpage always returns 0, and no caller checks the return value.
[akpm@linux-foundation.org: fix void-returning swap_readpage() stub, per Keith]
Link: https://lkml.kernel.org/r/20230125133436.447864-3-hch@lst.de
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dan Williams <dan.j.willi... | ```diff
diff --git a/mm/page_io.c b/mm/page_io.c
index 905d9fcc0c96..84b348fe4c7c 100644
--- a/mm/page_io.c
+++ b/mm/page_io.c
@@ -444,11 +444,9 @@ static void swap_readpage_fs(struct page *page,
*plug = sio;
}
-int swap_readpage(struct page *page, bool synchronous,
- struct swap_iocb **plug)
+void swap_readpa... |
17d3ef432dcbe80c134f1f79e2ed1ebd1076eab1 | Analyze and fix the following issue in the Linux kernel code: mm: move debug checks from __vunmap to remove_vm_area | Problem Details:
All these checks apply to the free_vm_area interface as well, so move them
to the common routine.
Link: https://lkml.kernel.org/r/20230121071051.1143058-9-hch@lst.de
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Reviewed-by: David Hildenbrand <da... | ```diff
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index bc6791a0adbe..cb8c8cd161c8 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -2573,11 +2573,20 @@ struct vm_struct *remove_vm_area(const void *addr)
might_sleep();
+ if (WARN(!PAGE_ALIGNED(addr), "Trying to vfree() bad address (%p)\n",
+ addr))
+ return NULL... |
cfccd2e63e7e0c84c514676cffa755dd71a3b2bc | Analyze and fix the following issue in the Linux kernel code: mm, compaction: finish pageblocks on complete migration failure | Problem Details:
Commit 7efc3b726103 ("mm/compaction: fix set skip in
fast_find_migrateblock") address an issue where a pageblock selected by
fast_find_migrateblock() was ignored. Unfortunately, the same fix
resulted in numerous reports of khugepaged or kcompactd stalling for long
periods of time or consuming 100% of ... | ```diff
diff --git a/mm/compaction.c b/mm/compaction.c
index 91acde906ae3..d73578af44cc 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -2392,6 +2392,7 @@ compact_zone(struct compact_control *cc, struct capture_control *capc)
cc->finish_pageblock = true;
}
+rescan:
switch (isolate_migratepages(cc)) {
... |
48731c8436c68ce5597dfe72f3836bd6808bedde | Analyze and fix the following issue in the Linux kernel code: mm, compaction: rename compact_control->rescan to finish_pageblock | Problem Details:
Patch series "Fix excessive CPU usage during compaction".
Commit 7efc3b726103 ("mm/compaction: fix set skip in fast_find_migrateblock")
fixed a problem where pageblocks found by fast_find_migrateblock() were
ignored. Unfortunately there were numerous bug reports complaining about high
CPU usage and ma... | ```diff
diff --git a/mm/compaction.c b/mm/compaction.c
index b758b00a4885..28a9596609fe 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -1101,12 +1101,12 @@ isolate_success_no_list:
/*
* Avoid isolating too much unless this block is being
- * rescanned (e.g. dirty/writeback pages, parallel allocation)
... |
c5acf1f6f0a11b8e521ad43f59b1bed27dcf34f6 | Analyze and fix the following issue in the Linux kernel code: mm/gup.c: fix typo in comments | Problem Details:
Link: https://lkml.kernel.org/r/20230125180847.4542-1-jongwooo.han@gmail.com
Signed-off-by: Jongwoo Han <jongwooo.han@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org> | ```diff
diff --git a/mm/gup.c b/mm/gup.c
index 38ba1697dd61..c4b793385ed2 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -1055,7 +1055,7 @@ static int check_vma_flags(struct vm_area_struct *vma, unsigned long gup_flags)
* This does not guarantee that the page exists in the user mappings when
* __get_user_pages returns, an... |
420ef683b5217338bc679c33fd9361b52f53a526 | Analyze and fix the following issue in the Linux kernel code: kasan: reset page tags properly with sampling | Problem Details:
The implementation of page_alloc poisoning sampling assumed that
tag_clear_highpage resets page tags for __GFP_ZEROTAGS allocations.
However, this is no longer the case since commit 70c248aca9e7 ("mm: kasan:
Skip unpoisoning of user pages").
This leads to kernel crashes when MTE-enabled userspace map... | ```diff
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 717f12e83b85..5ebce58026f1 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -2476,7 +2476,7 @@ inline void post_alloc_hook(struct page *page, unsigned int order,
bool init = !want_init_on_free() && want_init_on_alloc(gfp_flags) &&
!should_skip_init... |
2e126aa29007353f069c3bab5c2cf52d231cd3ae | Analyze and fix the following issue in the Linux kernel code: mm/sparse: fix "unused function 'pgdat_to_phys'" warning | Problem Details:
W=1 build with clangs complains:
mm/sparse.c:347:27: warning: unused function 'pgdat_to_phys' [-Wunused-function]
static inline phys_addr_t pgdat_to_phys(struct pglist_data *pgdat)
^
1 warning generated.
pgdat_to_phys() is only used by functions defined when
CONFIG_MEMORY... | ```diff
diff --git a/mm/sparse.c b/mm/sparse.c
index 2779b419ef2a..fb7aeb1899a4 100644
--- a/mm/sparse.c
+++ b/mm/sparse.c
@@ -318,6 +318,7 @@ size_t mem_section_usage_size(void)
return sizeof(struct mem_section_usage) + usemap_size();
}
+#ifdef CONFIG_MEMORY_HOTREMOVE
static inline phys_addr_t pgdat_to_phys(stru... |
6b3f013bb90e737b06c7955571407190b4c760ce | Analyze and fix the following issue in the Linux kernel code: mm/damon: update comments in damon.h for damon_attrs | Problem Details:
Patch series "mm/damon: misc fixes".
This patchset contains three miscellaneous simple fixes for DAMON online
tuning.
This patch (of 3):
Commit cbeaa77b0449 ("mm/damon/core: use a dedicated struct for monitoring
attributes") moved monitoring intervals from damon_ctx to a new struct,
damon_attrs, bu... | ```diff
diff --git a/include/linux/damon.h b/include/linux/damon.h
index dfb245bb3053..d5d4d19928e0 100644
--- a/include/linux/damon.h
+++ b/include/linux/damon.h
@@ -354,10 +354,10 @@ struct damon_ctx;
* users should register the low level operations for their target address
* space and usecase via the &damon_ctx.... |
782e4179535971c3574c367bfaaefea8970b3e0b | Analyze and fix the following issue in the Linux kernel code: mm/kmemleak: fix UAF bug in kmemleak_scan() | Problem Details:
Commit 6edda04ccc7c ("mm/kmemleak: prevent soft lockup in first object
iteration loop of kmemleak_scan()") fixes soft lockup problem in
kmemleak_scan() by periodically doing a cond_resched(). It does take a
reference of the current object before doing it. Unfortunately, if the
object has been deleted... | ```diff
diff --git a/mm/kmemleak.c b/mm/kmemleak.c
index 69327b71fcf9..d9b242cfdb1c 100644
--- a/mm/kmemleak.c
+++ b/mm/kmemleak.c
@@ -13,11 +13,12 @@
*
* The following locks and mutexes are used by kmemleak:
*
- * - kmemleak_lock (raw_spinlock_t): protects the object_list modifications and
- * accesses to the ... |
6061e740822530a4ef443548b19c4e0bc6342c7a | Analyze and fix the following issue in the Linux kernel code: mm/kmemleak: simplify kmemleak_cond_resched() usage | Problem Details:
Patch series "mm/kmemleak: Simplify kmemleak_cond_resched() & fix UAF", v2.
It was found that a KASAN use-after-free error was reported in the
kmemleak_scan() function. After further examination, it is believe that
even though a reference is taken from the current object, it does not
prevent the obje... | ```diff
diff --git a/mm/kmemleak.c b/mm/kmemleak.c
index 55dc8b8b0616..69327b71fcf9 100644
--- a/mm/kmemleak.c
+++ b/mm/kmemleak.c
@@ -1472,22 +1472,17 @@ static void scan_gray_list(void)
/*
* Conditionally call resched() in an object iteration loop while making sure
* that the given object won't go away without R... |
b507808ebce23561d4ff8c2aa1fb949fe402bc61 | Analyze and fix the following issue in the Linux kernel code: mm: implement memory-deny-write-execute as a prctl | Problem Details:
Patch series "mm: In-kernel support for memory-deny-write-execute (MDWE)",
v2.
The background to this is that systemd has a configuration option called
MemoryDenyWriteExecute [2], implemented as a SECCOMP BPF filter. Its aim
is to prevent a user task from inadvertently creating an executable
mapping ... | ```diff
diff --git a/include/linux/mman.h b/include/linux/mman.h
index 58b3abd457a3..cee1e4b566d8 100644
--- a/include/linux/mman.h
+++ b/include/linux/mman.h
@@ -156,4 +156,38 @@ calc_vm_flag_bits(unsigned long flags)
}
unsigned long vm_commit_limit(void);
+
+/*
+ * Denies creating a writable executable mapping or... |
d0634a622be35df2dfa80dc14ee1482ae1889cb2 | Analyze and fix the following issue in the Linux kernel code: Documentation: mm: use `s/higmem/highmem/` fix typo for highmem | Problem Details:
We should use highmem replace higmem.
Link: https://lkml.kernel.org/r/20230118025403.1531-1-wangdeming@inspur.com
Signed-off-by: Deming Wang <wangdeming@inspur.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Cc: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>
Cc: Jonathan Corbet <corbet@lwn.net>
C... | ```diff
diff --git a/Documentation/mm/highmem.rst b/Documentation/mm/highmem.rst
index e691a06fb337..4503868b0865 100644
--- a/Documentation/mm/highmem.rst
+++ b/Documentation/mm/highmem.rst
@@ -83,7 +83,7 @@ list shows them in order of preference of use.
for pages which are known to not come from ZONE_HIGHMEM. Howe... |
148aa87e4f631e98d926d006604116fd2b2f3a93 | Analyze and fix the following issue in the Linux kernel code: mm/cma: fix potential memory loss on cma_declare_contiguous_nid | Problem Details:
Suppose memblock_alloc_range_nid() with highmem_start succeeds when
cma_declare_contiguous_nid is called with !fixed on a 32-bit system with
PHYS_ADDR_T_64BIT enabled with memblock.bottom_up == false.
But the next trial to memblock_alloc_range_nid() to allocate in [SIZE_4G,
limits) nullifies former su... | ```diff
diff --git a/mm/cma.c b/mm/cma.c
index a75b17b03b66..a7263aa02c92 100644
--- a/mm/cma.c
+++ b/mm/cma.c
@@ -321,18 +321,6 @@ int __init cma_declare_contiguous_nid(phys_addr_t base,
} else {
phys_addr_t addr = 0;
- /*
- * All pages in the reserved area must come from the same zone.
- * If the requeste... |
5649d113ffce9f532a9ecc5ab96a93e02efbf283 | Analyze and fix the following issue in the Linux kernel code: swap_state: update shadow_nodes for anonymous page | Problem Details:
Shadow_nodes is for shadow nodes reclaiming of workingset handling, it is
updated when page cache add or delete since long time ago workingset only
supported page cache. But when workingset supports anonymous page
detection, we missied updating shadow nodes for it. This caused that
shadow nodes of an... | ```diff
diff --git a/include/linux/xarray.h b/include/linux/xarray.h
index 44dd6d6e01bc..741703b45f61 100644
--- a/include/linux/xarray.h
+++ b/include/linux/xarray.h
@@ -1643,7 +1643,8 @@ static inline void xas_set_order(struct xa_state *xas, unsigned long index,
* @update: Function to call when updating a node.
*... |
04bac040bc71b4b37550eed5854f34ca161756f9 | Analyze and fix the following issue in the Linux kernel code: mm/hugetlb: convert get_hwpoison_huge_page() to folios | Problem Details:
Straightforward conversion of get_hwpoison_huge_page() to
get_hwpoison_hugetlb_folio(). Reduces two references to a head page in
memory-failure.c
[arnd@arndb.de: fix get_hwpoison_hugetlb_folio() stub]
Link: https://lkml.kernel.org/r/20230119111920.635260-1-arnd@kernel.org
Link: https://lkml.kernel.... | ```diff
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index cf60fe741c1d..a51e6daacac6 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -172,7 +172,7 @@ bool hugetlb_reserve_pages(struct inode *inode, long from, long to,
long hugetlb_unreserve_pages(struct inode *inode, long start... |
7ec7096b8577d3b899c1dae456a414f2d08c7ddb | Analyze and fix the following issue in the Linux kernel code: mm/page_ext: init page_ext early if there are no deferred struct pages | Problem Details:
page_ext must be initialized after all struct pages are initialized.
Therefore, page_ext is initialized after page_alloc_init_late(), and can
optionally be initialized earlier via early_page_ext kernel parameter
which as a side effect also disables deferred struct pages.
Allow to automatically init p... | ```diff
diff --git a/include/linux/page_ext.h b/include/linux/page_ext.h
index 67314f648aeb..bc2e39090a1f 100644
--- a/include/linux/page_ext.h
+++ b/include/linux/page_ext.h
@@ -29,6 +29,8 @@ struct page_ext_operations {
bool need_shared_flags;
};
+extern bool deferred_struct_pages;
+
#ifdef CONFIG_PAGE_EXTENSIO... |
8808ecab3afc18958a9216911cd7967017e7057c | Analyze and fix the following issue in the Linux kernel code: filemap: convert filemap_map_pmd() to take a folio | Problem Details:
Patch series "Some more filemap folio conversions".
Three more places which could easily be converted to folios. The third
one fixes a minor bug in readahead_expand(), but it's only a performance
bug and there are few users of readahead_expand(), so I don't think it's
worth backporting.
This patch ... | ```diff
diff --git a/mm/filemap.c b/mm/filemap.c
index 31bf18ec6d01..b6b7efc9abc0 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -3259,22 +3259,24 @@ out_retry:
}
EXPORT_SYMBOL(filemap_fault);
-static bool filemap_map_pmd(struct vm_fault *vmf, struct page *page)
+static bool filemap_map_pmd(struct vm_fault *vmf, s... |
90c9d13a47d45f2f16530c4d62af2fa4d74dfd16 | Analyze and fix the following issue in the Linux kernel code: mm: remove page_evictable() | Problem Details:
Patch series "Remove leftover mlock/munlock page wrappers".
We no longer need the various mlock page functions as all callers have
folios.
This patch (of 4):
This function now has no users. Also update the unevictable-lru
documentation to discuss folios instead of pages (mostly).
[akpm@linux-foun... | ```diff
diff --git a/Documentation/mm/unevictable-lru.rst b/Documentation/mm/unevictable-lru.rst
index 2a90d0721dd9..552c63eef954 100644
--- a/Documentation/mm/unevictable-lru.rst
+++ b/Documentation/mm/unevictable-lru.rst
@@ -12,7 +12,7 @@ Introduction
This document describes the Linux memory manager's "Unevictable... |
2cf1338454a8a9a0b3c1271ccb521afa2d6ae241 | Analyze and fix the following issue in the Linux kernel code: mm: fix khugepaged with shmem_enabled=advise | Problem Details:
Pass vm_flags as a parameter to shmem_is_huge, rather than reading the
flags from the vm_area_struct in question. This allows the updated flags
from hugepage_madvise to be passed to the check, which is necessary
because madvise does not update the vm_area_struct's flags until after
hugepage_madvise re... | ```diff
diff --git a/include/linux/shmem_fs.h b/include/linux/shmem_fs.h
index d500ea967dc7..d09d54be4ffd 100644
--- a/include/linux/shmem_fs.h
+++ b/include/linux/shmem_fs.h
@@ -92,14 +92,8 @@ extern struct page *shmem_read_mapping_page_gfp(struct address_space *mapping,
extern void shmem_truncate_range(struct inode ... |
6189eb82f0aec8a877190bf52e629c687ed02773 | Analyze and fix the following issue in the Linux kernel code: mm/page_ext: do not allocate space for page_ext->flags if not needed | Problem Details:
There is 8 byte page_ext->flags field allocated per page whenever
CONFIG_PAGE_EXTENSION is enabled. However, not every user of page_ext
uses flags. Therefore, check whether flags is needed at least by one user
and if so allocate space for it.
For example when page_table_check is enabled, on a machin... | ```diff
diff --git a/include/linux/page_ext.h b/include/linux/page_ext.h
index 22be4582faae..67314f648aeb 100644
--- a/include/linux/page_ext.h
+++ b/include/linux/page_ext.h
@@ -7,15 +7,33 @@
#include <linux/stackdepot.h>
struct pglist_data;
+
+/**
+ * struct page_ext_operations - per page_ext client operations
+ ... |
2321ba3e3733f513e46e29b9c70512ecddbf1085 | Analyze and fix the following issue in the Linux kernel code: mm/debug_vm_pgtable: more pte_swp_exclusive() sanity checks | Problem Details:
Patch series "mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE on all
architectures with swap PTEs".
This is the follow-up on [1]:
[PATCH v2 0/8] mm: COW fixes part 3: reliable GUP R/W FOLL_GET of
anonymous pages
After we implemented __HAVE_ARCH_PTE_SWP_EXCLUSIVE on most prominent
enterprise architectures... | ```diff
diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c
index bb3328f46126..ff8d6f6af896 100644
--- a/mm/debug_vm_pgtable.c
+++ b/mm/debug_vm_pgtable.c
@@ -811,13 +811,36 @@ static void __init pmd_swap_soft_dirty_tests(struct pgtable_debug_args *args) {
static void __init pte_swap_exclusive_tests(struct pgt... |
b213ef6b72b5f1f9d333f8aca05440db4e302b46 | Analyze and fix the following issue in the Linux kernel code: m68k/mm/motorola: specify pmd_page() type | Problem Details:
Failing to specify a specific type here breaks anything that relies on the
type being explicitly known, such as page_folio().
Make explicit the type of null pointer returned here.
Link: https://lkml.kernel.org/r/ad6be2821bbd6af10966b3704568ff458b270d9c.1673526881.git.lstoakes@gmail.com
Signed-off-by:... | ```diff
diff --git a/arch/m68k/include/asm/motorola_pgtable.h b/arch/m68k/include/asm/motorola_pgtable.h
index 7ac3d64c6b33..562b54e09850 100644
--- a/arch/m68k/include/asm/motorola_pgtable.h
+++ b/arch/m68k/include/asm/motorola_pgtable.h
@@ -124,7 +124,7 @@ static inline void pud_set(pud_t *pudp, pmd_t *pmdp)
* expe... |
82b249361f2d1627acc7dbbdab1c80246a02fd4a | Analyze and fix the following issue in the Linux kernel code: mm/mmap: fix comment of unmapped_area{_topdown} | Problem Details:
The low_limit of unmapped area information is inclusive, and the
hight_limit is not, so make symbol to be [ instead of (.
And replace hight_limit to high_limit.
Link: https://lkml.kernel.org/r/20230111132036.801404-1-vernon2gm@gmail.com
Fixes: 3499a13168da ("mm/mmap: use maple tree for unmapped_area{... | ```diff
diff --git a/mm/mmap.c b/mm/mmap.c
index 0641e6e0016c..335ba3df9898 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -1558,8 +1558,8 @@ static inline int accountable_mapping(struct file *file, vm_flags_t vm_flags)
* the correct alignment and offset, all from @info. Note: current->mm is used
* for the search.
*
-... |
f942b0f0528d1198b94b8211c84d4f28a654c0ff | Analyze and fix the following issue in the Linux kernel code: maple_tree: fix comment of mte_destroy_walk | Problem Details:
The parameter name of maple tree is mt, make the comment be mt instead of
mn, and the separator between the parameter name and the description to be
: instead of -.
Link: https://lkml.kernel.org/r/20230111135348.803181-1-vernon2gm@gmail.com
Fixes: 54a611b60590 ("Maple Tree: add new data structure")
Si... | ```diff
diff --git a/lib/maple_tree.c b/lib/maple_tree.c
index 5be99550e36d..1c5d3b640a24 100644
--- a/lib/maple_tree.c
+++ b/lib/maple_tree.c
@@ -5579,8 +5579,8 @@ free_leaf:
/*
* mte_destroy_walk() - Free a tree or sub-tree.
- * @enode - the encoded maple node (maple_enode) to start
- * @mn - the tree to free - ... |
21a000fe97a018c6d25be63892afb4fd8210ab57 | Analyze and fix the following issue in the Linux kernel code: mm: reimplement compound_nr() | Problem Details:
Turn compound_nr() into a wrapper around folio_nr_pages(). Similarly to
compound_order(), casting the struct page directly to struct folio
preserves the existing behaviour, while calling page_folio() would change
the behaviour. Move thp_nr_pages() down in the file so that compound_nr()
can be after f... | ```diff
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 3adc37cebe6f..3acf09d5b0bd 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1005,18 +1005,6 @@ static inline void set_compound_order(struct page *page, unsigned int order)
#endif
}
-/* Returns the number of pages in this potentially comp... |
91ec7f284a0c445b251caba942c993ebf7b6db9f | Analyze and fix the following issue in the Linux kernel code: mm/debug: remove call to head_compound_mapcount() | Problem Details:
Call folio_entire_mapcount() instead.
Link: https://lkml.kernel.org/r/20230111142915.1001531-13-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org> | ```diff
diff --git a/mm/debug.c b/mm/debug.c
index 8e58e8dab0b2..9d3d893dc7f4 100644
--- a/mm/debug.c
+++ b/mm/debug.c
@@ -94,9 +94,9 @@ static void __dump_page(struct page *page)
page, page_ref_count(head), mapcount, mapping,
page_to_pgoff(page), page_to_pfn(page));
if (compound) {
- pr_warn("head:%p order:... |
4d510f3da4c216d4c2695395f67aec38e2aa6cc7 | Analyze and fix the following issue in the Linux kernel code: mm: add folio_add_new_anon_rmap() | Problem Details:
In contrast to other rmap functions, page_add_new_anon_rmap() is always
called with a freshly allocated page. That means it can't be called with
a tail page. Turn page_add_new_anon_rmap() into folio_add_new_anon_rmap()
and add a page_add_new_anon_rmap() wrapper. Callers can be converted
individually... | ```diff
diff --git a/include/linux/rmap.h b/include/linux/rmap.h
index bd3504d11b15..aa682a2a93ce 100644
--- a/include/linux/rmap.h
+++ b/include/linux/rmap.h
@@ -194,6 +194,8 @@ void page_add_anon_rmap(struct page *, struct vm_area_struct *,
unsigned long address, rmap_t flags);
void page_add_new_anon_rmap(struct ... |
baabcfc93d3b5b14c52eb5c18d38627c32d2d82b | Analyze and fix the following issue in the Linux kernel code: mm/mmap: fix typo in comment | Problem Details:
Replace "parital" with "partial".
Link: https://lkml.kernel.org/r/20230110145353.1658435-1-vernon2gm@gmail.com
Signed-off-by: Vernon Yang <vernon2gm@gmail.com>
Cc: Liam Howlett <liam.howlett@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org> | ```diff
diff --git a/mm/mmap.c b/mm/mmap.c
index 4fe29b8f99b0..0641e6e0016c 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -2889,7 +2889,7 @@ out:
}
/*
- * brk_munmap() - Unmap a parital vma.
+ * brk_munmap() - Unmap a partial vma.
* @mas: The maple tree state.
* @vma: The vma to be modified
* @newbrk: the start o... |
377c16fa3f3c60d21e4b05314c8be034ce37f2eb | Analyze and fix the following issue in the Linux kernel code: bpftool: profile online CPUs instead of possible | Problem Details:
The number of online cpu may be not equal to possible cpu.
"bpftool prog profile" can not create pmu event on possible
but on online cpu.
$ dmidecode -s system-product-name
PowerEdge R620
$ cat /sys/devices/system/cpu/possible
0-47
$ cat /sys/devices/system/cpu/online
0-31
Disable cpu dynamically:
$ ... | ```diff
diff --git a/tools/bpf/bpftool/prog.c b/tools/bpf/bpftool/prog.c
index cfc9fdc1e863..e87738dbffc1 100644
--- a/tools/bpf/bpftool/prog.c
+++ b/tools/bpf/bpftool/prog.c
@@ -2233,10 +2233,38 @@ static void profile_close_perf_events(struct profiler_bpf *obj)
profile_perf_event_cnt = 0;
}
+static int profile_op... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.