id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
f0a4e9fa656ceb3b2e4c296cf6226798d804fa22 | Analyze and fix the following issue in the Linux kernel code: i2c: designware: Actually make use of the I2C_DW_COMMON and I2C_DW symbol namespaces | Problem Details:
DEFAULT_SYMBOL_NAMESPACE must already be defined when <linux/export.h>
is included. So move the define above the include block.
Fixes: fd57a3325a77 ("i2c: designware: Move exports to I2C_DW namespaces")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Acked-by: Jarkko Nikula <jarkko.niku... | ```diff
diff --git a/drivers/i2c/busses/i2c-designware-common.c b/drivers/i2c/busses/i2c-designware-common.c
index 183a35038eef..8eb7bd640f8d 100644
--- a/drivers/i2c/busses/i2c-designware-common.c
+++ b/drivers/i2c/busses/i2c-designware-common.c
@@ -8,6 +8,9 @@
* Copyright (C) 2007 MontaVista Software Inc.
* Copyr... |
9860370c2172704b6b4f0075a0c2a29fd84af96a | Analyze and fix the following issue in the Linux kernel code: gpio: xilinx: Convert gpio_lock to raw spinlock | Problem Details:
irq_chip functions may be called in raw spinlock context. Therefore, we
must also use a raw spinlock for our own internal locking.
This fixes the following lockdep splat:
[ 5.349336] =============================
[ 5.353349] [ BUG: Invalid wait context ]
[ 5.357361] 6.13.0-rc5+ #69 Tainted: ... | ```diff
diff --git a/drivers/gpio/gpio-xilinx.c b/drivers/gpio/gpio-xilinx.c
index c6a8f2c82680..792d94c49077 100644
--- a/drivers/gpio/gpio-xilinx.c
+++ b/drivers/gpio/gpio-xilinx.c
@@ -65,7 +65,7 @@ struct xgpio_instance {
DECLARE_BITMAP(state, 64);
DECLARE_BITMAP(last_irq_read, 64);
DECLARE_BITMAP(dir, 64);
- ... |
10276f3e1c7e7f5de9f0bba58f8a849cb195253d | Analyze and fix the following issue in the Linux kernel code: net: pse-pd: Fix missing PI of_node description | Problem Details:
The PI of_node was not assigned in the regulator_config structure, leading
to failures in resolving the correct supply when different power supplies
are assigned to multiple PIs of a PSE controller. This fix ensures that the
of_node is properly set in the regulator_config, allowing accurate supply
reso... | ```diff
diff --git a/drivers/net/pse-pd/pse_core.c b/drivers/net/pse-pd/pse_core.c
index 887a477197a6..b0272616a861 100644
--- a/drivers/net/pse-pd/pse_core.c
+++ b/drivers/net/pse-pd/pse_core.c
@@ -422,6 +422,7 @@ devm_pse_pi_regulator_register(struct pse_controller_dev *pcdev,
rconfig.dev = pcdev->dev;
rconfig.dr... |
57ccb37a906fed786055f045918abda724117aab | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: fix beacon command during disabling | Problem Details:
When stopping AP, mac80211 frees beacon template before it calls
driver's stop_ap operation. In other words, on the path of stopping
AP, ieee80211_beacon_get_template() must returns NULL in
mt7996_mcu_add_beacon(). In such case mt7996 immediately returns
-EINVAL without telling FW to disable the beacon... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
index 9879c108cd0e..dcca8b931237 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
@@ -2520,7 +2520,7 @@ int mt7996_mcu_add_beacon(struc... |
da8352da1e4f476fdbf549a4efce4f3c618fde3b | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: fix ldpc setting | Problem Details:
The non-AP interfaces would not use conf->vht_ldpc so they never set
STA_CAP_VHT_LDPC even if peer-station support LDPC.
Check conf->vht_ldpc only for AP interface.
Without this patch, station only uses BCC to transmit packet in VHT mode.
Fixes: dda423dd65c3 ("wifi: mt76: mt7996: remove mt7996_mcu_be... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
index 9fb54388d975..9879c108cd0e 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
@@ -2066,7 +2066,7 @@ mt7996_mcu_sta_rate_ctrl_tlv(st... |
14749fe2ed360c92c1a2a76dac0b77f759234981 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: fix definition of tx descriptor | Problem Details:
For mt7992 chipsets, the definition of TXD.DW6.BIT10~15 has different
interpretations on different frame types. Driver only needs to fill
MSDU_CNT for non-management frames.
Fixes: 408566db8cad ("wifi: mt76: connac: add new definition of tx descriptor")
Co-developed-by: Shayne Chen <shayne.chen@mediat... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
index f5865d9688b7..bc8cba4dca47 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
@@ -826,6 +826,7 @@ void mt7996_mac_write_txwi(struct... |
5c2a25a1ab76a2976dddc5ffd58498866f3ef7c2 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: fix incorrect indexing of MIB FW event | Problem Details:
Fix wrong calculation of the channel times due to incorrect
interpretation from the FW event.
Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices")
Signed-off-by: Benjamin Lin <benjamin-jw.lin@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
index 58fc06a69539..9fb54388d975 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
@@ -3678,6 +3678,13 @@ int mt7996_mcu_get_chip_config... |
7e3aef59a403ade5dd4ea02edc2d7138a66d74b6 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: fix HE Phy capability | Problem Details:
Set HE SU PPDU And HE MU PPDU With 4x HE-LTF And 0.8 us GI within HE PHY
Capabilities element as 1 since hardware can support.
Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices")
Signed-off-by: Howard Hsu <howard-yh.hsu@mediatek.com>
Signed-off-by: Shayne Che... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/init.c b/drivers/net/wireless/mediatek/mt76/mt7996/init.c
index cdd4f72337df..f4dd3e6b3c28 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/init.c
@@ -1197,6 +1197,9 @@ mt7996_init_he_caps(struct ... |
2ffbdfc1bd78ba944c5754791c84f32232b513c6 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: fix the capability of reception of EHT MU PPDU | Problem Details:
This commit includes two changes. First, enable "EHT MU PPDU With 4x
EHT-LTF And 0.8us GI" in EHT Phy capabilities element since hardware
can support. Second, fix the value of "Maximum number of supported
EHT LTFs" in the same element, where the previous setting of 3 in
Bit 3-4 was incorrect.
Fixes: 3... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/init.c b/drivers/net/wireless/mediatek/mt76/mt7996/init.c
index 43293f72f1dc..cdd4f72337df 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/init.c
@@ -1352,21 +1352,20 @@ mt7996_init_eht_caps(stru... |
1816ad9381e0c150e4c44ce6dd6ee2c52008a052 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: add max mpdu len capability | Problem Details:
Set max mpdu len to 11454 according to hardware capability.
Without this patch, the max ampdu length would be 3895 and count not get
expected performance.
Fixes: 348533eb968d ("wifi: mt76: mt7996: add EHT capability init")
Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
Signed-off-by: Shayne Ch... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/init.c b/drivers/net/wireless/mediatek/mt76/mt7996/init.c
index d5337ceb9dc5..43293f72f1dc 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/init.c
@@ -1307,7 +1307,9 @@ mt7996_init_eht_caps(struct... |
0e19942e6d1c735c95b40123de1d6e81dc2c128d | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7925e: fix too long of wifi resume time | Problem Details:
The mt7925e takes a long time to resume in platform resume
scenarios. This is due to the mt7925 reconfiguring the tx
power for each wifi channel during resume. By streamlining
the process and removing redundant power configurations,
the resume time for the mt7925 can be shortened.
Signed-off-by: Quan ... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/init.c b/drivers/net/wireless/mediatek/mt76/mt7925/init.c
index f6f8ab38d5aa..f41ca4248497 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/init.c
@@ -63,9 +63,13 @@ void mt7925_regd_update(struct... |
a0f721b8d986b62b4de316444f2b2e356d17e3b5 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7925: fix CLC command timeout when suspend/resume | Problem Details:
When enter suspend/resume while in a connected state, the upper layer
will trigger disconnection before entering suspend, and at the same time,
it will trigger regd_notifier() and update CLC, causing the CLC event to
not be received due to suspend, resulting in a command timeout.
Therefore, the update... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/init.c b/drivers/net/wireless/mediatek/mt76/mt7925/init.c
index 34b6adc5ea0e..f6f8ab38d5aa 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/init.c
@@ -57,6 +57,18 @@ static int mt7925_thermal_init... |
1b97fc8443aea01922560de9f24a6383e6eb6ae8 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7925: fix the unfinished command of regd_notifier before suspend | Problem Details:
Before entering suspend, we need to ensure that all MCU command are
completed. In some cases, such as with regd_notifier, there is a
chance that CLC commands, will be executed before suspend.
Signed-off-by: Quan Zhou <quan.zhou@mediatek.com>
Link: https://patch.msgid.link/3af7b4e5bf7437832b016e3274365... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/init.c b/drivers/net/wireless/mediatek/mt76/mt7925/init.c
index ddc654b9ea5e..34b6adc5ea0e 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/init.c
@@ -79,11 +79,14 @@ mt7925_regd_notifier(struct w... |
d07ecb4f7070e84de49e8fa4e5a83dd52716d805 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: fix register mapping | Problem Details:
Bypass the entry when ofs is equal to dev->reg.map[i].size.
Without this patch, it would get incorrect register mapping when the CR
address is located at the boundary of an entry.
Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices")
Signed-off-by: Peter Chiu <... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mmio.c b/drivers/net/wireless/mediatek/mt76/mt7996/mmio.c
index d85abec19c6f..7a8ee6c75cf2 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/mmio.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/mmio.c
@@ -177,7 +177,7 @@ static u32 __mt7996_reg_addr(... |
dd1649ef966bb87053c17385ea2cfd1758f5385b | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7915: fix register mapping | Problem Details:
Bypass the entry when ofs is equal to dev->reg.map[i].size.
Without this patch, it would get incorrect register mapping when the CR
address is located at the boundary of an entry.
Fixes: cd4c314a65d3 ("mt76: mt7915: refine register definition")
Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
Si... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mmio.c b/drivers/net/wireless/mediatek/mt76/mt7915/mmio.c
index 530182e20ce2..876f0692850a 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mmio.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mmio.c
@@ -486,7 +486,7 @@ static u32 __mt7915_reg_addr(... |
e48da5c9ca293d775a1dd35fe26d44418dbc6715 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: fix monitor mode | Problem Details:
Enable sniffer mode via MCU command in order to properly enable promiscuous
mode on the device.
Link: https://patch.msgid.link/20250102163508.52945-24-nbd@nbd.name
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 e8a9394e5437..69dd565d8319 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/main.c
@@ -368,6 +368,7 @@ static void mt7996_set_monito... |
451bc9aea9a1a6fe53969e81a5cb1bd785c0d989 | Analyze and fix the following issue in the Linux kernel code: pinctrl: stm32: Add check for clk_enable() | Problem Details:
Convert the driver to clk_bulk*() API.
Add check for the return value of clk_bulk_enable() to catch
the potential error.
Fixes: 05d8af449d93 ("pinctrl: stm32: Keep pinctrl block clock enabled when LEVEL IRQ requested")
Signed-off-by: Mingwei Zheng <zmw12306@gmail.com>
Signed-off-by: Jiasheng Jiang <ji... | ```diff
diff --git a/drivers/pinctrl/stm32/pinctrl-stm32.c b/drivers/pinctrl/stm32/pinctrl-stm32.c
index 5b7fa77c1184..03f3f707d275 100644
--- a/drivers/pinctrl/stm32/pinctrl-stm32.c
+++ b/drivers/pinctrl/stm32/pinctrl-stm32.c
@@ -86,7 +86,6 @@ struct stm32_pinctrl_group {
struct stm32_gpio_bank {
void __iomem *ba... |
387ab042ace875a7386c6a76aa85a3aa36be9d78 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: do not add wcid entries to sta poll list during MCU reset | Problem Details:
Fixes linked list management issues during restart, where sta entries
can be recreated and reinitialized while still in the poll list, triggering
kernel warnings.
Link: https://patch.msgid.link/20241230194202.95065-14-nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name> | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mac80211.c b/drivers/net/wireless/mediatek/mt76/mac80211.c
index 3642c490fa6d..6db59652be6e 100644
--- a/drivers/net/wireless/mediatek/mt76/mac80211.c
+++ b/drivers/net/wireless/mediatek/mt76/mac80211.c
@@ -1595,6 +1595,18 @@ void mt76_wcid_cleanup(struct mt76_dev... |
cd043bbba6f9b71ebe0781d1bd2107565363c4b9 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7915: fix omac index assignment after hardware reset | Problem Details:
Reset per-phy mac address slot mask in order to avoid leaking entries.
Fixes: 8a55712d124f ("wifi: mt76: mt7915: enable full system reset support")
Link: https://patch.msgid.link/20241230194202.95065-12-nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name> | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
index 9b9158fdd4d9..e2693aea2e8e 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
@@ -1444,9 +1444,11 @@ static void
mt7915_mac_full_r... |
9b60e2ae511c959024ecf6578b3fbe85cd06d7cc | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7915: firmware restart on devices with a second pcie link | Problem Details:
It seems that the firmware checks the register used for detecting matching
PCIe links in order to figure out if a secondary PCIe link is enabled.
Write the register again just before starting the firmware on hw reset,
in order to fix an issue that left the second band unusable after restart.
Fixes: 90... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
index 1b9dcdec142b..9b9158fdd4d9 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
@@ -1388,6 +1388,8 @@ mt7915_mac_restart(struct mt791... |
82d6f1adfede540c6842173175c09b2bd3ebbe75 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7915: ensure that only one sta entry is active per mac address | Problem Details:
When a client is roaming to a different AP interface, a duplicate wtbl entry
can be created. This can lead to lost packets or aggregation issues until
the old entry expires.
In order to fix this issue, delete any conflicting entries from WTBL
whenever a station is authorized.
Link: https://patch.msgid... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/main.c b/drivers/net/wireless/mediatek/mt76/mt7915/main.c
index 2d4457fbb5ab..fd337aede99e 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/main.c
@@ -368,8 +368,12 @@ static int mt7915_set_key(st... |
228bc0e79c85269d36cc81e0288e95f2f9ba7ae1 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: only enable tx worker after setting the channel | Problem Details:
Avoids sending packets too early
Fixes: 0b3be9d1d34e ("wifi: mt76: add separate tx scheduling queue for off-channel tx")
Link: https://patch.msgid.link/20241230194202.95065-8-nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name> | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mac80211.c b/drivers/net/wireless/mediatek/mt76/mac80211.c
index 57c7b681645a..3642c490fa6d 100644
--- a/drivers/net/wireless/mediatek/mt76/mac80211.c
+++ b/drivers/net/wireless/mediatek/mt76/mac80211.c
@@ -958,11 +958,11 @@ int mt76_set_channel(struct mt76_phy *p... |
858fd2a53877b2e8b1d991a5a861ac34a0f55ef8 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: fix rx filter setting for bfee functionality | Problem Details:
Fix rx filter setting to prevent dropping NDPA frames. Without this
change, bfee functionality may behave abnormally.
Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices")
Link: https://patch.msgid.link/20241230194202.95065-5-nbd@nbd.name
Signed-off-by: Felix F... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/main.c b/drivers/net/wireless/mediatek/mt76/mt7996/main.c
index eb2388f079d9..d76a9dcfd148 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/main.c
@@ -488,8 +488,7 @@ static void mt7996_configure_... |
87594d2b1a00c3e72d64e49b6203858fe8fc1876 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7915: fix eifs value on older chipsets | Problem Details:
Use the default firmware values
Link: https://patch.msgid.link/20241230194202.95065-4-nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name> | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
index cf77ce0c8759..1b9dcdec142b 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
@@ -1163,7 +1163,7 @@ void mt7915_mac_set_timing(stru... |
56465b6fd064eb19f3103581753334c5dabaf8da | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7915: fix slot time for 5/6GHz | Problem Details:
It should only be set to 20 for long slot time on 2.4 GHz
Link: https://patch.msgid.link/20241230194202.95065-3-nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name> | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/main.c b/drivers/net/wireless/mediatek/mt76/mt7915/main.c
index 351285daac99..2d4457fbb5ab 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/main.c
@@ -634,7 +634,11 @@ static void mt7915_bss_info_... |
8ad8b8c2dc87fc3d34921330827914c7f2d74466 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7925: replace zero-length array with flexible-array member | Problem Details:
The current codebase makes use of the zero-length array language
extension to the C90 standard, but the preferred mechanism to declare
variable-length types such as these ones is a flexible array member[1],
introduced in C99:
struct foo {
int stuff;
struct boo array[];
};
By making use of the mecha... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
index 9bbe046630a0..d4d3ecf863c4 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
@@ -386,7 +386,7 @@ mt7925_mcu_tx_done_event(struct m... |
349460913a4d029cc37c9e3817b1903233b4a627 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7925: Properly handle responses for commands with events | Problem Details:
Properly retrieve the response for commands with events. Ensure accurate
handling of event-driven commands.
Fixes: 86c051f2c418 ("wifi: mt76: mt7925: enabling MLO when the firmware supports it")
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/main.c b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
index 116b6980c733..ddc67423efe2 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
@@ -1244,7 +1244,6 @@ void mt7925_mac_sta_remove(... |
816161051a039eeb1226fc85e2b38389f508906c | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7925: Cleanup MLO settings post-disconnection | Problem Details:
Clean up MLO settings after disconnection.
Fixes: 86c051f2c418 ("wifi: mt76: mt7925: enabling MLO when the firmware supports it")
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Link: https://patch.msgid.link/20241211011926.5002-16-sean.wang... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/main.c b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
index a4ffa34d58a4..116b6980c733 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
@@ -1149,8 +1149,7 @@ static void mt7925_mac_link... |
eb2a9a12c6092a26f632468d6610497d4f0e40da | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7925: Update mt7925_mcu_uni_[tx,rx]_ba for MLO | Problem Details:
Update mt7925_mcu_uni_[tx,rx]_ba for MLO support in firmware.
Fixes: 86c051f2c418 ("wifi: mt76: mt7925: enabling MLO when the firmware supports it")
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Link: https://patch.msgid.link/2024121101192... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/main.c b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
index a2d1c43098d3..a4ffa34d58a4 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
@@ -1258,22 +1258,22 @@ mt7925_ampdu_action(struc... |
28045ef2bc5bbeec4717da98bf31aca0faaccf02 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7925: Init secondary link PM state | Problem Details:
Initialize secondary link PM state.
Fixes: 86c051f2c418 ("wifi: mt76: mt7925: enabling MLO when the firmware supports it")
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Link: https://patch.msgid.link/20241211011926.5002-14-sean.wang@kernel... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/main.c b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
index dcdb9bcff3c4..a2d1c43098d3 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
@@ -1991,6 +1991,8 @@ mt7925_change_vif_links(str... |
8dafab9c4116a6a4fd870be03a3d9b66771dc5a8 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7925: Update secondary link PS flow | Problem Details:
Update the power-saving flow for secondary links.
Fixes: 86c051f2c418 ("wifi: mt76: mt7925: enabling MLO when the firmware supports it")
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Link: https://patch.msgid.link/20241211011926.5002-13-se... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/main.c b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
index a78aae7d1088..dcdb9bcff3c4 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
@@ -1903,6 +1903,13 @@ static void mt7925_link_in... |
30b721467c9c2510e26af6e78e92d7cc08a14bc4 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7925: Update mt7925_unassign_vif_chanctx for per-link BSS | Problem Details:
Update mt7925_unassign_vif_chanctx to support per-link BSS.
Fixes: 86c051f2c418 ("wifi: mt76: mt7925: enabling MLO when the firmware supports it")
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Link: https://patch.msgid.link/20241211011926.... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/main.c b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
index 1140af657793..a78aae7d1088 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
@@ -2081,18 +2081,16 @@ static void mt7925_unassi... |
90c10286b176421068b136da51ed83059a68e322 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7925: Update mt792x_rx_get_wcid for per-link STA | Problem Details:
Update mt792x_rx_get_wcid to support per-link STA.
Fixes: 86c051f2c418 ("wifi: mt76: mt7925: enabling MLO when the firmware supports it")
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Link: https://patch.msgid.link/20241211011926.5002-11-s... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt792x_mac.c b/drivers/net/wireless/mediatek/mt76/mt792x_mac.c
index 106273935b26..05978d9c7b91 100644
--- a/drivers/net/wireless/mediatek/mt76/mt792x_mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt792x_mac.c
@@ -153,7 +153,7 @@ struct mt76_wcid *mt792x_rx_get_w... |
0e02f6ed6a49577e29e0b1f7900fad3ed8ae870c | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7925: Update mt7925_mcu_sta_update for BC in ASSOC state | Problem Details:
Update mt7925_mcu_sta_update for broadcast (BC) in the ASSOC state.
Fixes: 86c051f2c418 ("wifi: mt76: mt7925: enabling MLO when the firmware supports it")
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Link: https://patch.msgid.link/2024121... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
index 60a12b0e45ee..4577e838f587 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
@@ -1903,7 +1903,11 @@ int mt7925_mcu_sta_update(stru... |
e6803d39a8aa59e557402a541a97ee04b06c49b2 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: Enhance mt7925_mac_link_sta_add to support MLO | Problem Details:
Enhance mt7925_mac_link_sta_add to support MLO.
Fixes: 86c051f2c418 ("wifi: mt76: mt7925: enabling MLO when the firmware supports it")
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Link: https://patch.msgid.link/20241211011926.5002-9-sean.... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/main.c b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
index 3cd3c3e289e7..1140af657793 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
@@ -878,9 +878,14 @@ static int mt7925_mac_link_s... |
ac03e5b82bc6b44e8ea3e7c7c624ee1445ff4e4b | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7925: Enhance mt7925_mac_link_bss_add to support MLO | Problem Details:
In mt7925_mac_link_bss_add(), the mt76_connac_mcu_uni_add_dev() function
must be executed only after all parameters have been properly initialized.
Fixes: 86c051f2c418 ("wifi: mt76: mt7925: enabling MLO when the firmware supports it")
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-o... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/main.c b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
index 268d216f09e2..3cd3c3e289e7 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
@@ -365,18 +365,14 @@ static int mt7925_mac_link_... |
4a596010b246816d7589d8d775b83833a59e63f9 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7925: Fix CNM Timeout with Single Active Link in MLO | Problem Details:
Fix CNM command timeout issue when only a single active link is available
during MLO connection to fix the following kernel log error.
[ 741.931030] wlan0: [link 1] local address be:90:e0:22:c4:22, AP link address 08:0c:43:7a:19:2a
[ 741.931042] wlan0: [link 1] determined AP 08:0c:43:7a:19:2a to be ... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
index 23d0b1d97956..60a12b0e45ee 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
@@ -1151,7 +1151,12 @@ int mt7925_mcu_set_mlo_roc(str... |
3f0d2178aaf1ed1c017e61cde9ce8a4432c804d1 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7925: fix wrong parameter for related cmd of chan info | Problem Details:
Fix incorrect parameters for the related channel information command.
Fixes: 86c051f2c418 ("wifi: mt76: mt7925: enabling MLO when the firmware supports it")
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Link: https://patch.msgid.link/20241... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
index 7105705113ba..23d0b1d97956 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
@@ -1198,6 +1198,8 @@ int mt7925_mcu_set_mlo_roc(stru... |
4f741a2378b27a6be5e63b829cae4eb9cf2484e7 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7925: Fix incorrect WCID phy_idx assignment | Problem Details:
Fix incorrect WCID phy_idx assignment.
Fixes: 86c051f2c418 ("wifi: mt76: mt7925: enabling MLO when the firmware supports it")
Signed-off-by: allan.wang <allan.wang@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Link: https://patch.msgid.link/20241211011926.5002-5-sean.wang@kernel.org
... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/main.c b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
index cbc7a5081025..268d216f09e2 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
@@ -384,7 +384,7 @@ static int mt7925_mac_link_bs... |
4911e4cb157cf87d5bdb3fa8e0c200032443371e | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7925: Fix incorrect WCID assignment for MLO | Problem Details:
For MLO, each link must have a corresponding WCID.
Fixes: 86c051f2c418 ("wifi: mt76: mt7925: enabling MLO when the firmware supports it")
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Link: https://patch.msgid.link/20241211011926.5002-3-se... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mac.c b/drivers/net/wireless/mediatek/mt76/mt7925/mac.c
index ddd406969061..a095fb31e391 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/mac.c
@@ -49,7 +49,7 @@ static void mt7925_mac_sta_poll(str... |
4d5427443595439c6cf5edfd9fb7224589f65b27 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7925: Fix incorrect MLD address in bss_mld_tlv for MLO support | Problem Details:
For this TLV, the address should be set to the MLD address rather than
the link address.
Fixes: 86c051f2c418 ("wifi: mt76: mt7925: enabling MLO when the firmware supports it")
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Link: https://pat... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
index 123a585098e3..7105705113ba 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
@@ -2459,6 +2459,7 @@ static void
mt7925_mcu_bss_mld... |
9e4c3a007f01f567f2a8af35decd1e3c1c151c0f | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: connac: Extend mt76_connac_mcu_uni_add_dev for MLO | Problem Details:
This commit extends the `mt76_connac_mcu_uni_add_dev` function to include
support for Multi-Link Operation (MLO). Additionally, backward
compatibility for MT7921 is preserved, enabling seamless integration with
existing setups.
Fixes: 86c051f2c418 ("wifi: mt76: mt7925: enabling MLO when the firmware s... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
index 804d3f5a5244..5373937b0e04 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
@@ -1113,7 +1113,7 @@ mt7615_mcu_uni_add_dev(struct m... |
64d571742b0ae44eee5efd51e2d4a09d7f6782fc | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7915: fix overflows seen when writing limit attributes | Problem Details:
DIV_ROUND_CLOSEST() after kstrtoul() results in an overflow if a large
number such as 18446744073709551615 is provided by the user.
Fix it by reordering clamp_val() and DIV_ROUND_CLOSEST() operations.
This commit was inspired by commit: 57ee12b6c514.
Fixes: 02ee68b95d81 ("mt76: mt7915: add control kno... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/init.c b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
index f82216d1bda0..bc983ab10b0c 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
@@ -82,7 +82,7 @@ static ssize_t mt7915_thermal_t... |
5adbc8ce5bbe7e311e2600b7d7d998a958873e98 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: fix overflows seen when writing limit attributes | Problem Details:
DIV_ROUND_CLOSEST() after kstrtoul() results in an overflow if a large
number such as 18446744073709551615 is provided by the user.
Fix it by reordering clamp_val() and DIV_ROUND_CLOSEST() operations.
This commit was inspired by commit: 57ee12b6c514.
Fixes: 6879b2e94172 ("wifi: mt76: mt7996: add therm... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/init.c b/drivers/net/wireless/mediatek/mt76/mt7996/init.c
index 2d36c7325137..8cfb122b48ac 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/init.c
@@ -82,7 +82,7 @@ static ssize_t mt7996_thermal_t... |
113d469e7e23579a64b0fbb2eadf9228763092be | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7925: fix the invalid ip address for arp offload | Problem Details:
The wrong ieee80211_vif will lead to get invalid ip address and
the correct ieee80211_vif can be obtained from ieee80211_bss_conf.
Fixes: 147324292979 ("wifi: mt76: mt7925: add link handling in the BSS_CHANGED_ARP_FILTER handler")
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Link: https:... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
index b43617dbd5fd..123a585098e3 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
@@ -123,10 +123,8 @@ EXPORT_SYMBOL_GPL(mt7925_mcu_reg... |
4d264f31b3074d361f65702dd7969861bcf1c158 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7925: fix get wrong chip cap from incorrect pointer | Problem Details:
Use tlv instead of skb, because using skb will get valid data
with wrong offset.
Fixes: 86c051f2c418 ("wifi: mt76: mt7925: enabling MLO when the firmware supports it")
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Link: https://patch.msgid.link/20241104051447.4286-1-mingyen.hsieh@mediatek... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
index a78883d4d6df..b43617dbd5fd 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
@@ -823,7 +823,7 @@ mt7925_mcu_get_nic_capability(str... |
85bb7c10c1a013ab29d4be07559105dd843c6f7d | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7925: fix wrong band_idx setting when enable sniffer mode | Problem Details:
Currently, sniffer mode does not support band auto,
so set band_idx to the default 0.
Fixes: 0cb349d742d1 ("wifi: mt76: mt7925: update mt7925_mac_link_bss_add for MLO")
Signed-off-by: Eric-SY Chang <eric-sy.chang@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Link: https://pa... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
index 0c2a2337c313..a78883d4d6df 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
@@ -1976,8 +1976,6 @@ int mt7925_get_txpwr_info(struc... |
5cd0bd815c8a48862a296df9b30e0ea0da14acd3 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7925: fix NULL deref check in mt7925_change_vif_links | Problem Details:
In mt7925_change_vif_links() devm_kzalloc() may return NULL but this
returned value is not checked.
Fixes: 69acd6d910b0 ("wifi: mt76: mt7925: add mt7925_change_vif_links")
Signed-off-by: Charles Han <hanchunchao@inspur.com>
Link: https://patch.msgid.link/20241025075554.181572-1-hanchunchao@inspur.com
... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/main.c b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
index 791c8b00e112..a5110f8485e5 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
@@ -1946,6 +1946,8 @@ mt7925_change_vif_links(str... |
57af267d2b8f5d88485c6372761386d79c5e6a1a | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7915: add module param to select 5 GHz or 6 GHz on MT7916 | Problem Details:
Due to a limitation in available memory, the MT7916 firmware can only
handle either 5 GHz or 6 GHz at a time. It does not support runtime
switching without a full restart.
On older firmware, this accidentally worked to some degree due to missing
checks, but couldn't be supported properly, because it l... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.c b/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.c
index bfdbc15abaa9..928e0b07a9bf 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.c
@@ -2,9 +2,14 @@
/* Copyright (C) 2020 M... |
126a516fe30639708e759678bcb10178938cc718 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7915: Fix an error handling path in mt7915_add_interface() | Problem Details:
If mt76_wcid_alloc() fails, the "mt76.mutex" mutex needs to be released as
done in the other error handling paths of mt7915_add_interface().
Fixes: f3049b88b2b3 ("wifi: mt76: mt7915: allocate vif wcid in the same range as stations")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Lin... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/main.c b/drivers/net/wireless/mediatek/mt76/mt7915/main.c
index 8183708a9b35..351285daac99 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/main.c
@@ -246,8 +246,10 @@ static int mt7915_add_interf... |
aa566ac6b7272e7ea5359cb682bdca36d2fc7e73 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7921: fix using incorrect group cipher after disconnection. | Problem Details:
To avoid incorrect cipher after disconnection, we should
do the key deletion process in this case.
Fixes: e6db67fa871d ("wifi: mt76: ignore key disable commands")
Signed-off-by: Michael Lo <michael.lo@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Tested-by: David Ruth <druth... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/main.c b/drivers/net/wireless/mediatek/mt76/mt7921/main.c
index 2ef8dbfc4a95..573a2cd7fe45 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/main.c
@@ -531,7 +531,13 @@ static int mt7921_set_key(st... |
f1b1e133a770fcdbd89551651232b034d2f7a27a | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt76u_vendor_request: Do not print error messages when -EPROTO | Problem Details:
When initializing the network card, unplugging the device will
trigger an -EPROTO error, resulting in a flood of error messages
being printed frantically.
The exception is printed as follows:
mt76x2u 2-2.4:1.0: vendor request req:47 off:9018 failed:-71
mt76x2u 2-2.4:1.0: vendor requ... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/usb.c b/drivers/net/wireless/mediatek/mt76/usb.c
index 58ff06823389..f9e67b8c3b3c 100644
--- a/drivers/net/wireless/mediatek/mt76/usb.c
+++ b/drivers/net/wireless/mediatek/mt76/usb.c
@@ -33,9 +33,9 @@ int __mt76u_vendor_request(struct mt76_dev *dev, u8 req, u8 req... |
386f2d9d57b6f7669e5070654852807eed249450 | Analyze and fix the following issue in the Linux kernel code: ARM: 9437/1: vfp: Fix typographical errors in vfpmodule.c | Problem Details:
Correct the misspellings of "noftify" (should be "notify") and "swtich"
(should be "switch").
Link: https://lore.kernel.org/r/20241114011939.296230-1-luoyifan@cmss.chinamobile.com
Signed-off-by: Luo Yifan <luoyifan@cmss.chinamobile.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-... | ```diff
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c
index d44867fc0c5e..7803d50b90f8 100644
--- a/arch/arm/vfp/vfpmodule.c
+++ b/arch/arm/vfp/vfpmodule.c
@@ -168,7 +168,7 @@ static void vfp_thread_copy(struct thread_info *thread)
/*
* When this function is called with the following 'cmd's, the f... |
e536057543791fbfa0d979f4e782933ea312c38c | Analyze and fix the following issue in the Linux kernel code: x86/kexec: Cope with relocate_kernel() not being at the start of the page | Problem Details:
A few places in the kexec control code page make the assumption that the first
instruction of relocate_kernel is at the very start of the page.
To allow for Clang CFI information to be added to relocate_kernel(), as well
as the general principle of removing unwarranted assumptions, fix them to use
the... | ```diff
diff --git a/arch/x86/kernel/relocate_kernel_64.S b/arch/x86/kernel/relocate_kernel_64.S
index 14ed40b7f322..af2cd06ff318 100644
--- a/arch/x86/kernel/relocate_kernel_64.S
+++ b/arch/x86/kernel/relocate_kernel_64.S
@@ -95,11 +95,10 @@ SYM_CODE_START_NOALIGN(relocate_kernel)
lea PAGE_SIZE(%rsi), %rsp
/* ju... |
2114796ca041f0d3e79e5dd165219b940b23c540 | Analyze and fix the following issue in the Linux kernel code: x86/kexec: Mark machine_kexec() with __nocfi | Problem Details:
A recent commit caused the relocate_kernel() function to be invoked through
a function pointer, but it does not have CFI information. The resulting trap
occurs after the IDT and GDT have been invalidated, leading to a triple-fault
if CONFIG_CFI_CLANG is enabled.
Using SYM_TYPED_FUNC_START() to provide... | ```diff
diff --git a/arch/x86/kernel/machine_kexec_64.c b/arch/x86/kernel/machine_kexec_64.c
index 9232ad1562c8..1440f792a86d 100644
--- a/arch/x86/kernel/machine_kexec_64.c
+++ b/arch/x86/kernel/machine_kexec_64.c
@@ -342,7 +342,7 @@ void machine_kexec_cleanup(struct kimage *image)
* Do not allocate memory (or fail ... |
279c83db24552e83caa09347358473e633e56617 | Analyze and fix the following issue in the Linux kernel code: i2c: riic: Use local `dev` pointer in `dev_err_probe()` | Problem Details:
Update the `riic_init_hw()` function to use the local `dev` pointer in
calls to `dev_err_probe()`. Previously, `riic_init_hw()` used
`riic->adapter.dev` in error reporting. Since this function is invoked
during the probe phase, the I2C adapter is not yet initialized, leading to
`(null) ...` being print... | ```diff
diff --git a/drivers/i2c/busses/i2c-riic.c b/drivers/i2c/busses/i2c-riic.c
index 4e2add343c9e..c555b6220e66 100644
--- a/drivers/i2c/busses/i2c-riic.c
+++ b/drivers/i2c/busses/i2c-riic.c
@@ -320,7 +320,7 @@ static int riic_init_hw(struct riic_dev *riic)
: I2C_MAX_FAST_MODE_FREQ;
if (t->bus_freq_h... |
eeed9150411a63dd0611490cf31fdae681427918 | Analyze and fix the following issue in the Linux kernel code: x86/kexec: Fix location of relocate_kernel with -ffunction-sections | Problem Details:
After commit
cb33ff9e063c ("x86/kexec: Move relocate_kernel to kernel .data section"),
kernels configured with an option that uses -ffunction-sections, such as
CONFIG_LTO_CLANG, crash when kexecing because the value of relocate_kernel
does not match the value of __relocate_kernel_start so incorrect... | ```diff
diff --git a/arch/x86/kernel/relocate_kernel_64.S b/arch/x86/kernel/relocate_kernel_64.S
index a95691b42c5c..14ed40b7f322 100644
--- a/arch/x86/kernel/relocate_kernel_64.S
+++ b/arch/x86/kernel/relocate_kernel_64.S
@@ -23,11 +23,11 @@
#define PAGE_ATTR (_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED | _PAGE_DIRTY)
... |
2cacf7f23a024ab1fdc603ca6a4f4c8b2de9f64e | Analyze and fix the following issue in the Linux kernel code: x86/kexec: Fix stack and handling of re-entry point for ::preserve_context | Problem Details:
A ::preserve_context kimage can be invoked more than once, and the entry point
can be different every time. When the callee returns to the kernel, it leaves
the address of its entry point for next time on the stack.
That being the case, one might reasonably assume that the caller would
allocate space ... | ```diff
diff --git a/arch/x86/kernel/relocate_kernel_64.S b/arch/x86/kernel/relocate_kernel_64.S
index 3ca3bf6b3f49..a95691b42c5c 100644
--- a/arch/x86/kernel/relocate_kernel_64.S
+++ b/arch/x86/kernel/relocate_kernel_64.S
@@ -113,8 +113,6 @@ SYM_CODE_START_LOCAL_NOALIGN(identity_mapped)
* %r13 original CR4 when rel... |
85d724df8c82c060dcdeb8d0de0bd986e6c37b72 | Analyze and fix the following issue in the Linux kernel code: x86/kexec: Use correct swap page in swap_pages function | Problem Details:
The swap_pages function expects the swap page to be in %r10, but there
was no documentation to that effect. Once upon a time the setup code
used to load its value from a kernel virtual address and save it to an
address which is accessible in the identity-mapped page tables, and
*happened* to use %r10 t... | ```diff
diff --git a/arch/x86/kernel/relocate_kernel_64.S b/arch/x86/kernel/relocate_kernel_64.S
index 6fce4b459652..3ca3bf6b3f49 100644
--- a/arch/x86/kernel/relocate_kernel_64.S
+++ b/arch/x86/kernel/relocate_kernel_64.S
@@ -264,6 +264,10 @@ SYM_CODE_END(virtual_mapped)
/* Do the copies */
SYM_CODE_START_LOCAL_NOA... |
4d5f1da98f5e94ecc39d6e7a990db2efe0ae3810 | Analyze and fix the following issue in the Linux kernel code: x86/kexec: Ensure preserve_context flag is set on return to kernel | Problem Details:
The swap_pages() function will only actually *swap*, as its name implies, if
the preserve_context flag in the %r11 register is non-zero. On the way back
from a ::preserve_context kexec, ensure that the %r11 register is non-zero so
that the pages get swapped back.
Fixes: 9e5683e2d0b5 ("x86/kexec: Only ... | ```diff
diff --git a/arch/x86/kernel/relocate_kernel_64.S b/arch/x86/kernel/relocate_kernel_64.S
index 9bd601dd8659..6fce4b459652 100644
--- a/arch/x86/kernel/relocate_kernel_64.S
+++ b/arch/x86/kernel/relocate_kernel_64.S
@@ -220,6 +220,7 @@ SYM_CODE_START_LOCAL_NOALIGN(identity_mapped)
movq kexec_pa_table_page(%rip... |
d144d8a65286fb4a9f06ca80dea6e02e7d846558 | Analyze and fix the following issue in the Linux kernel code: x86/kexec: Disable global pages before writing to control page | Problem Details:
The kernel switches to a new set of page tables during kexec. The global
mappings (_PAGE_GLOBAL==1) can remain in the TLB after this switch. This
is generally not a problem because the new page tables use a different
portion of the virtual address space than the normal kernel mappings.
The critical ex... | ```diff
diff --git a/arch/x86/kernel/relocate_kernel_64.S b/arch/x86/kernel/relocate_kernel_64.S
index 8bc86a1e056a..9bd601dd8659 100644
--- a/arch/x86/kernel/relocate_kernel_64.S
+++ b/arch/x86/kernel/relocate_kernel_64.S
@@ -70,14 +70,20 @@ SYM_CODE_START_NOALIGN(relocate_kernel)
movq kexec_pa_table_page(%rip), %r9... |
edc4ef0e0154096d6c0cf5e06af6fc330dbad9d1 | Analyze and fix the following issue in the Linux kernel code: RDMA/rxe: Fix the warning "__rxe_cleanup+0x12c/0x170 [rdma_rxe]" | Problem Details:
The Call Trace is as below:
"
<TASK>
? show_regs.cold+0x1a/0x1f
? __rxe_cleanup+0x12c/0x170 [rdma_rxe]
? __warn+0x84/0xd0
? __rxe_cleanup+0x12c/0x170 [rdma_rxe]
? report_bug+0x105/0x180
? handle_bug+0x46/0x80
? exc_invalid_op+0x19/0x70
? asm_exc_invalid_op+0x1b/0x20
? __rxe_cleanup+... | ```diff
diff --git a/drivers/infiniband/sw/rxe/rxe_pool.c b/drivers/infiniband/sw/rxe/rxe_pool.c
index 67567d62195e..d9cb682fd71f 100644
--- a/drivers/infiniband/sw/rxe/rxe_pool.c
+++ b/drivers/infiniband/sw/rxe/rxe_pool.c
@@ -178,7 +178,6 @@ int __rxe_cleanup(struct rxe_pool_elem *elem, bool sleepable)
{
struct rxe... |
42e6ddda4c17fa0d5120e3723d522649f8fc62fa | Analyze and fix the following issue in the Linux kernel code: RDMA/cxgb4: Notify rdma stack for IB_EVENT_QP_LAST_WQE_REACHED event | Problem Details:
This patch sends IB_EVENT_QP_LAST_WQE_REACHED event on a QP that is in
error state and associated with an SRQ. This behaviour is incorporated
in flush_qp() which is called when QP transitions to error state.
Supports SRQ drain functionality added by commit 844bc12e6da3 ("IB/core:
add support for draini... | ```diff
diff --git a/drivers/infiniband/hw/cxgb4/qp.c b/drivers/infiniband/hw/cxgb4/qp.c
index 7b5c4522b426..955f061a55e9 100644
--- a/drivers/infiniband/hw/cxgb4/qp.c
+++ b/drivers/infiniband/hw/cxgb4/qp.c
@@ -1599,6 +1599,7 @@ static void __flush_qp(struct c4iw_qp *qhp, struct c4iw_cq *rchp,
int count;
int rq_flu... |
91751e248256efc111e52e15115840c35d85abaf | Analyze and fix the following issue in the Linux kernel code: vsock: prevent null-ptr-deref in vsock_*[has_data|has_space] | Problem Details:
Recent reports have shown how we sometimes call vsock_*_has_data()
when a vsock socket has been de-assigned from a transport (see attached
links), but we shouldn't.
Previous commits should have solved the real problems, but we may have
more in the future, so to avoid null-ptr-deref, we can return 0
(n... | ```diff
diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c
index 74d35a871644..fa9d1b49599b 100644
--- a/net/vmw_vsock/af_vsock.c
+++ b/net/vmw_vsock/af_vsock.c
@@ -879,6 +879,9 @@ EXPORT_SYMBOL_GPL(vsock_create_connected);
s64 vsock_stream_has_data(struct vsock_sock *vsk)
{
+ if (WARN_ON(!vsk->transp... |
a24009bc9be60242651a21702609381b5092459e | Analyze and fix the following issue in the Linux kernel code: vsock: reset socket state when de-assigning the transport | Problem Details:
Transport's release() and destruct() are called when de-assigning the
vsock transport. These callbacks can touch some socket state like
sock flags, sk_state, and peer_shutdown.
Since we are reassigning the socket to a new transport during
vsock_connect(), let's reset these fields to have a clean state... | ```diff
diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c
index 5cf8109f672a..74d35a871644 100644
--- a/net/vmw_vsock/af_vsock.c
+++ b/net/vmw_vsock/af_vsock.c
@@ -491,6 +491,15 @@ int vsock_assign_transport(struct vsock_sock *vsk, struct vsock_sock *psk)
*/
vsk->transport->release(vsk);
vsock_... |
df137da9d6d166e87e40980e36eb8e0bc90483ef | Analyze and fix the following issue in the Linux kernel code: vsock/virtio: cancel close work in the destructor | Problem Details:
During virtio_transport_release() we can schedule a delayed work to
perform the closing of the socket before destruction.
The destructor is called either when the socket is really destroyed
(reference counter to zero), or it can also be called when we are
de-assigning the transport.
In the former cas... | ```diff
diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c
index 51a494b69be8..7f7de6d88096 100644
--- a/net/vmw_vsock/virtio_transport_common.c
+++ b/net/vmw_vsock/virtio_transport_common.c
@@ -26,6 +26,9 @@
/* Threshold for detecting small packets to copy */
#define GOOD_... |
f6abafcd32f9cfc4b1a2f820ecea70773e26d423 | Analyze and fix the following issue in the Linux kernel code: vsock/bpf: return early if transport is not assigned | Problem Details:
Some of the core functions can only be called if the transport
has been assigned.
As Michal reported, a socket might have the transport at NULL,
for example after a failed connect(), causing the following trace:
BUG: kernel NULL pointer dereference, address: 00000000000000a0
#PF: supervisor r... | ```diff
diff --git a/net/vmw_vsock/vsock_bpf.c b/net/vmw_vsock/vsock_bpf.c
index 4aa6e74ec295..f201d9eca1df 100644
--- a/net/vmw_vsock/vsock_bpf.c
+++ b/net/vmw_vsock/vsock_bpf.c
@@ -77,6 +77,7 @@ static int vsock_bpf_recvmsg(struct sock *sk, struct msghdr *msg,
size_t len, int flags, int *addr_len)
{
struc... |
2cb7c756f605ec02ffe562fb26828e4bcc5fdfc1 | Analyze and fix the following issue in the Linux kernel code: vsock/virtio: discard packets if the transport changes | Problem Details:
If the socket has been de-assigned or assigned to another transport,
we must discard any packets received because they are not expected
and would cause issues when we access vsk->transport.
A possible scenario is described by Hyunwoo Kim in the attached link,
where after a first connect() interrupted ... | ```diff
diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c
index 9acc13ab3f82..51a494b69be8 100644
--- a/net/vmw_vsock/virtio_transport_common.c
+++ b/net/vmw_vsock/virtio_transport_common.c
@@ -1628,8 +1628,11 @@ void virtio_transport_recv_pkt(struct virtio_transport *t,
... |
c139b6d1b4d27724987af5071177fb5f3d60c1e4 | Analyze and fix the following issue in the Linux kernel code: KVM: arm64: nv: Always evaluate HCR_EL2 using sanitising accessors | Problem Details:
A lot of the NV code depends on HCR_EL2.{E2H,TGE}, and we assume
in places that at least HCR_EL2.E2H is invariant for a given guest.
However, we make a point in *not* using the sanitising accessor
that would enforce this, and are at the mercy of the guest doing
stupid things. Clearly, that's not good.... | ```diff
diff --git a/arch/arm64/include/asm/kvm_emulate.h b/arch/arm64/include/asm/kvm_emulate.h
index cf811009a33c..240b479b15c3 100644
--- a/arch/arm64/include/asm/kvm_emulate.h
+++ b/arch/arm64/include/asm/kvm_emulate.h
@@ -184,29 +184,30 @@ static inline bool vcpu_is_el2(const struct kvm_vcpu *vcpu)
return vcpu_i... |
49440290a0935f428a1e43a5ac8dc275a647ff80 | Analyze and fix the following issue in the Linux kernel code: landlock: Handle weird files | Problem Details:
A corrupted filesystem (e.g. bcachefs) might return weird files.
Instead of throwing a warning and allowing access to such file, treat
them as regular files.
Cc: Dave Chinner <david@fromorbit.com>
Cc: Kent Overstreet <kent.overstreet@linux.dev>
Cc: Paul Moore <paul@paul-moore.com>
Reported-by: syzbot+... | ```diff
diff --git a/security/landlock/fs.c b/security/landlock/fs.c
index e31b97a9f175..7adb25150488 100644
--- a/security/landlock/fs.c
+++ b/security/landlock/fs.c
@@ -937,10 +937,6 @@ static access_mask_t get_mode_access(const umode_t mode)
switch (mode & S_IFMT) {
case S_IFLNK:
return LANDLOCK_ACCESS_FS_MAK... |
cbd6883ed8662073031a32f1294cdf53c8ec24a4 | Analyze and fix the following issue in the Linux kernel code: xfs: fix a double completion for buffers on in-memory targets | Problem Details:
__xfs_buf_submit calls xfs_buf_ioend when b_io_remaining hits zero. For
in-memory buftargs b_io_remaining is never incremented from it's initial
value of 1, so this always happens. Thus the extra call to xfs_buf_ioend
in _xfs_buf_ioapply causes a double completion. Fortunately
__xfs_buf_submit is on... | ```diff
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
index 6f313fbf7669..da38c18acbba 100644
--- a/fs/xfs/xfs_buf.c
+++ b/fs/xfs/xfs_buf.c
@@ -1657,10 +1657,8 @@ _xfs_buf_ioapply(
op |= REQ_META;
/* in-memory targets are directly mapped, no IO required. */
- if (xfs_buftarg_is_mem(bp->b_target)) {
- xfs_buf_... |
6a46e3e87b5964f21eb90e8abfee916141df1763 | Analyze and fix the following issue in the Linux kernel code: net: phy: microchip_t1: depend on PTP_1588_CLOCK_OPTIONAL | Problem Details:
When microchip_t1_phy is built in and phyptp is module
facing undefined reference issue. This get fixed when
microchip_t1_phy made dependent on PTP_1588_CLOCK_OPTIONAL.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202501090604.YEoJXCXi-lkp@intel.com
Fixe... | ```diff
diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
index dc625f2b3ae4..9ad3dbfd2f99 100644
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -287,8 +287,8 @@ config MICROCHIP_PHY
config MICROCHIP_T1_PHY
tristate "Microchip T1 PHYs"
- select MICROCHIP_PHY_RDS_PTP if NETWORK_PHY_TIME... |
ffc90e9ca61b0f619326a1417ff32efd6cc71ed2 | Analyze and fix the following issue in the Linux kernel code: pfcp: Destroy device along with udp socket's netns dismantle. | Problem Details:
pfcp_newlink() links the device to a list in dev_net(dev) instead
of net, where a udp tunnel socket is created.
Even when net is removed, the device stays alive on dev_net(dev).
Then, removing net triggers the splat below. [0]
In this example, pfcp0 is created in ns2, but the udp socket is
created in... | ```diff
diff --git a/drivers/net/pfcp.c b/drivers/net/pfcp.c
index 69434fd13f96..68d0d9e92a22 100644
--- a/drivers/net/pfcp.c
+++ b/drivers/net/pfcp.c
@@ -206,8 +206,8 @@ static int pfcp_newlink(struct net *net, struct net_device *dev,
goto exit_del_pfcp_sock;
}
- pn = net_generic(dev_net(dev), pfcp_net_id);
- l... |
eb28fd76c0a08a47b470677c6cef9dd1c60e92d1 | Analyze and fix the following issue in the Linux kernel code: gtp: Destroy device along with udp socket's netns dismantle. | Problem Details:
gtp_newlink() links the device to a list in dev_net(dev) instead of
src_net, where a udp tunnel socket is created.
Even when src_net is removed, the device stays alive on dev_net(dev).
Then, removing src_net triggers the splat below. [0]
In this example, gtp0 is created in ns2, and the udp socket is ... | ```diff
diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c
index 0f9cb0c378af..fbabada7d3ba 100644
--- a/drivers/net/gtp.c
+++ b/drivers/net/gtp.c
@@ -1524,7 +1524,7 @@ static int gtp_newlink(struct net *src_net, struct net_device *dev,
goto out_encap;
}
- gn = net_generic(dev_net(dev), gtp_net_id);
+ gn = net_g... |
46841c7053e6d25fb33e0534ef023833bf03e382 | Analyze and fix the following issue in the Linux kernel code: gtp: Use for_each_netdev_rcu() in gtp_genl_dump_pdp(). | Problem Details:
gtp_newlink() links the gtp device to a list in dev_net(dev).
However, even after the gtp device is moved to another netns,
it stays on the list but should be invisible.
Let's use for_each_netdev_rcu() for netdev traversal in
gtp_genl_dump_pdp().
Note that gtp_dev_list is no longer used under RCU, s... | ```diff
diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c
index 89a996ad8cd0..0f9cb0c378af 100644
--- a/drivers/net/gtp.c
+++ b/drivers/net/gtp.c
@@ -1525,7 +1525,7 @@ static int gtp_newlink(struct net *src_net, struct net_device *dev,
}
gn = net_generic(dev_net(dev), gtp_net_id);
- list_add_rcu(>p->list, &gn-... |
b967c4b9a103f80608fffb8d3145bb3fb4a3ea63 | Analyze and fix the following issue in the Linux kernel code: Revert "i2c: amd756: Fix endianness handling for word data" | Problem Details:
This reverts commit 70f3d3669c074efbcee32867a1ab71f5f7ead385. We
concluded that removing the comments is the right thing to do. This will
be done by an incremental patch.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> | ```diff
diff --git a/drivers/i2c/busses/i2c-amd756.c b/drivers/i2c/busses/i2c-amd756.c
index e551d63e96b1..fa0d5a2c3732 100644
--- a/drivers/i2c/busses/i2c-amd756.c
+++ b/drivers/i2c/busses/i2c-amd756.c
@@ -31,7 +31,6 @@
#include <linux/i2c.h>
#include <linux/acpi.h>
#include <linux/io.h>
-#include <linux/byteorder/... |
644f9108f3a505022ef43510e5143cb985e0cf8b | Analyze and fix the following issue in the Linux kernel code: udp: Make rehash4 independent in udp_lib_rehash() | Problem Details:
As discussed in [0], rehash4 could be missed in udp_lib_rehash() when
udp hash4 changes while hash2 doesn't change. This patch fixes this by
moving rehash4 codes out of rehash2 checking, and then rehash2 and
rehash4 are done separately.
By doing this, we no longer need to call rehash4 explicitly in
ud... | ```diff
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index e8953e88efef..86d282618515 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -533,7 +533,7 @@ begin:
return NULL;
}
-/* In hash4, rehash can happen in connect(), where hash4_cnt keeps unchanged. */
+/* udp_rehash4() only checks hslot4, and hash4_cnt is n... |
575a5adf48b06a2980c9eeffedf699ed5534fade | Analyze and fix the following issue in the Linux kernel code: USB: serial: quatech2: fix null-ptr-deref in qt2_process_read_urb() | Problem Details:
This patch addresses a null-ptr-deref in qt2_process_read_urb() due to
an incorrect bounds check in the following:
if (newport > serial->num_ports) {
dev_err(&port->dev,
"%s - port change to invalid port: %i\n",
__func__, newport);
... | ```diff
diff --git a/drivers/usb/serial/quatech2.c b/drivers/usb/serial/quatech2.c
index a317bdbd00ad..72fe83a6c978 100644
--- a/drivers/usb/serial/quatech2.c
+++ b/drivers/usb/serial/quatech2.c
@@ -503,7 +503,7 @@ static void qt2_process_read_urb(struct urb *urb)
newport = *(ch + 3);
- if (newport > serial... |
f1d3ad0ac143063247643bb698917efb88c21cf1 | Analyze and fix the following issue in the Linux kernel code: HID: intel-thc-hid: fix build errors in um mode | Problem Details:
Add dependency to ACPI to avoid acpi APIs missing in um mode.
Signed-off-by: Even Xu <even.xu@intel.com>
Suggested-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202501131826.sX2DubPG-lkp@intel.... | ```diff
diff --git a/drivers/hid/intel-thc-hid/Kconfig b/drivers/hid/intel-thc-hid/Kconfig
index 84c2db881bf4..91ec84902db8 100644
--- a/drivers/hid/intel-thc-hid/Kconfig
+++ b/drivers/hid/intel-thc-hid/Kconfig
@@ -6,6 +6,7 @@ menu "Intel THC HID Support"
config INTEL_THC_HID
tristate "Intel Touch Host Controller"... |
accabfaae0940f9427c782bfee7340ce4c15151c | Analyze and fix the following issue in the Linux kernel code: pinctrl: renesas: rzg2l: Fix PFC_MASK for RZ/V2H and RZ/G3E | Problem Details:
The PFC_MASK value for the PFC_mx registers is currently hardcoded to
0x07, which is correct for SoCs in the RZ/G2L family, but insufficient
for RZ/V2H and RZ/G3E, where the mask value should be 0x0f. This
discrepancy causes incorrect PFC register configuration on RZ/V2H and
RZ/G3E SoCs.
On RZ/G2L, t... | ```diff
diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c
index 4fae24453c11..ce4a07a3df49 100644
--- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c
+++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c
@@ -159,7 +159,7 @@
#define PWPR_REGWE_B BIT(5) /* OEN Register Write Enable, known... |
19fdc68aa7b90b1d3d600e873a3e050a39e7663d | Analyze and fix the following issue in the Linux kernel code: efi: sysfb_efi: fix W=1 warnings when EFI is not set | Problem Details:
A build with W=1 fails because there are code and data that are not
needed or used when CONFIG_EFI is not set. Move the "#ifdef CONFIG_EFI"
block to earlier in the source file so that the unused code/data are
not built.
drivers/firmware/efi/sysfb_efi.c:345:39: warning: ‘efifb_fwnode_ops’ defined but n... | ```diff
diff --git a/drivers/firmware/efi/sysfb_efi.c b/drivers/firmware/efi/sysfb_efi.c
index cc807ed35aed..1e509595ac03 100644
--- a/drivers/firmware/efi/sysfb_efi.c
+++ b/drivers/firmware/efi/sysfb_efi.c
@@ -91,6 +91,7 @@ void efifb_setup_from_dmi(struct screen_info *si, const char *opt)
_ret_; \
})
+#if... |
ccd582059a132f2bdc3486766ac57c24c465f471 | Analyze and fix the following issue in the Linux kernel code: mm/early_ioremap: add null pointer checks to prevent NULL-pointer dereference | Problem Details:
The early_ioremap interface can fail and return NULL in certain cases. To
prevent NULL-pointer dereference crashes, fixed issues in the acpi_extlog
and copy_early_mem interfaces, improving robustness when handling early
memory.
Link: https://lkml.kernel.org/r/20241212101004.1544070-1-guoweikang.kerne... | ```diff
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index f1fea506e20f..cebee310e200 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -259,6 +259,7 @@ static void __init relocate_initrd(void)
u64 ramdisk_image = get_ramdisk_image();
u64 ramdisk_size = get_ramdisk_size();
u... |
50910acd6f61573ac23d468f221fa06178f2bd29 | Analyze and fix the following issue in the Linux kernel code: selftests/mm: use sys_pkey helpers consistently | Problem Details:
sys_pkey_alloc, sys_pkey_free and sys_mprotect_pkey are currently used in
protections_keys.c, while pkey_sighandler_tests.c calls the libc wrappers
directly (e.g. pkey_mprotect()). This is probably ok when using glibc
(those symbols appeared a while ago), but Musl does not currently provide
them. Th... | ```diff
diff --git a/tools/testing/selftests/mm/Makefile b/tools/testing/selftests/mm/Makefile
index 0d5d8f2f8652..f430c4303c0d 100644
--- a/tools/testing/selftests/mm/Makefile
+++ b/tools/testing/selftests/mm/Makefile
@@ -158,11 +158,15 @@ $(TEST_GEN_FILES): vm_util.c thp_settings.c
$(OUTPUT)/uffd-stress: uffd-comm... |
71384f84cbbe7660023b01c1a0fa9cc7dbc487a7 | Analyze and fix the following issue in the Linux kernel code: selftests/mm: fix -Warray-bounds warnings in pkey_sighandler_tests | Problem Details:
GCC doesn't like dereferencing a pointer set to 0x1 (when building
at -O2):
pkey_sighandler_tests.c:166:9: warning: array subscript 0 is outside array bounds of 'int[0]' [-Warray-bounds=]
166 | *(int *) (0x1) = 1;
| ^~~~~~~~~~~~~~
cc1: note: source object is likely at address z... | ```diff
diff --git a/tools/testing/selftests/mm/pkey_sighandler_tests.c b/tools/testing/selftests/mm/pkey_sighandler_tests.c
index c593a426341c..c6c020a2a6f5 100644
--- a/tools/testing/selftests/mm/pkey_sighandler_tests.c
+++ b/tools/testing/selftests/mm/pkey_sighandler_tests.c
@@ -163,7 +163,7 @@ static void *thread_s... |
5b6b2799f617b3259d551980fa94f290d96bc593 | Analyze and fix the following issue in the Linux kernel code: selftests/mm: fix strncpy() length | Problem Details:
GCC complains (with -O2) that the length is equal to the destination size,
which is indeed invalid. Subtract 1 from the size of the array to leave
room for '\0'.
Link: https://lkml.kernel.org/r/20241209095019.1732120-4-kevin.brodsky@arm.com
Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com>
Cc: Aru... | ```diff
diff --git a/tools/testing/selftests/mm/write_to_hugetlbfs.c b/tools/testing/selftests/mm/write_to_hugetlbfs.c
index 1289d311efd7..34c91f7e6128 100644
--- a/tools/testing/selftests/mm/write_to_hugetlbfs.c
+++ b/tools/testing/selftests/mm/write_to_hugetlbfs.c
@@ -89,7 +89,7 @@ int main(int argc, char **argv)
... |
516fb516383ef39d881d116c6447826356883ad0 | Analyze and fix the following issue in the Linux kernel code: selftests/mm: fix -Wmaybe-uninitialized warnings | Problem Details:
A few -Wmaybe-uninitialized warnings show up when building the mm tests
with -O2. None of them looks worrying; silence them by initialising the
problematic variables.
Link: https://lkml.kernel.org/r/20241209095019.1732120-3-kevin.brodsky@arm.com
Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com>
Cc... | ```diff
diff --git a/tools/testing/selftests/mm/ksm_tests.c b/tools/testing/selftests/mm/ksm_tests.c
index b748c48908d9..dcdd5bb20f3d 100644
--- a/tools/testing/selftests/mm/ksm_tests.c
+++ b/tools/testing/selftests/mm/ksm_tests.c
@@ -776,7 +776,7 @@ err_out:
int main(int argc, char *argv[])
{
- int ret, opt;
+ int... |
8e36b2945e7057d956b5eb4a91cbf42eb5b26148 | Analyze and fix the following issue in the Linux kernel code: selftests/mm: fix condition in uffd_move_test_common() | Problem Details:
Patch series "pkeys kselftests improvements".
This series brings various cleanups and fixes for the mm (mostly pkeys)
kselftests. The original goal was to make the pkeys tests work out of the
box and without build warning - it turned out to be more involved than
expected.
The most important change i... | ```diff
diff --git a/tools/testing/selftests/mm/uffd-unit-tests.c b/tools/testing/selftests/mm/uffd-unit-tests.c
index a2e71b1636e7..74c884713bf7 100644
--- a/tools/testing/selftests/mm/uffd-unit-tests.c
+++ b/tools/testing/selftests/mm/uffd-unit-tests.c
@@ -1190,7 +1190,7 @@ uffd_move_test_common(uffd_test_args_t *tar... |
fa5d61791117177e4c6aa87f7d3c170fa6f1f43b | Analyze and fix the following issue in the Linux kernel code: selftests/mm: mremap_test: Remove unused variable and type mismatches | Problem Details:
Remove unused variable and fix type mismatches.
Link: https://lkml.kernel.org/r/20241209185624.2245158-5-usama.anjum@collabora.com
Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org> | ```diff
diff --git a/tools/testing/selftests/mm/mremap_test.c b/tools/testing/selftests/mm/mremap_test.c
index 5a3a9bcba640..d207a52f2b5b 100644
--- a/tools/testing/selftests/mm/mremap_test.c
+++ b/tools/testing/selftests/mm/mremap_test.c
@@ -34,7 +34,7 @@ struct config {
unsigned long long dest_alignment;
unsigned... |
8fee0d5c4888477c6c71143e58aabf1f5c5fe498 | Analyze and fix the following issue in the Linux kernel code: selftests/mm: mseal_test: remove unused variables | Problem Details:
Fix following warnings:
- Remove unused variables and fix following warnings:
Link: https://lkml.kernel.org/r/20241209185624.2245158-4-usama.anjum@collabora.com
Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org> | ```diff
diff --git a/tools/testing/selftests/mm/mseal_test.c b/tools/testing/selftests/mm/mseal_test.c
index 01675c412b2a..ad17005521a8 100644
--- a/tools/testing/selftests/mm/mseal_test.c
+++ b/tools/testing/selftests/mm/mseal_test.c
@@ -802,7 +802,7 @@ static void test_seal_mprotect_partial_mprotect_tail(bool seal)
... |
43448e5bbbad1fb168b728b8a7c0058ab1397375 | Analyze and fix the following issue in the Linux kernel code: selftests/mm: pagemap_ioctl: Fix types mismatches shown by compiler options | Problem Details:
Fix following warnings caught by compiler:
- There are several type mismatches among different variables.
- Remove unused variable warnings.
Link: https://lkml.kernel.org/r/20241209185624.2245158-3-usama.anjum@collabora.com
Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Signed-off-by... | ```diff
diff --git a/tools/testing/selftests/mm/pagemap_ioctl.c b/tools/testing/selftests/mm/pagemap_ioctl.c
index fdafce0654e9..57b4bba2b45f 100644
--- a/tools/testing/selftests/mm/pagemap_ioctl.c
+++ b/tools/testing/selftests/mm/pagemap_ioctl.c
@@ -34,8 +34,8 @@
#define PAGEMAP "/proc/self/pagemap"
int pagemap_fd;
... |
2f3577d16c8644455f215abb3c2f77aa32b967b1 | Analyze and fix the following issue in the Linux kernel code: selftests/mm: thp_settings: remove const from return type | Problem Details:
Patch series "selftest/mm: Remove warnings found by adding compiler flags".
Recently, I reviewed a patch on the mm/kselftest mailing list about a test
which had obvious type mismatch fix in it. It was strange why that wasn't
caught during development and when patch was accepted. This led me to
disco... | ```diff
diff --git a/tools/testing/selftests/mm/thp_settings.c b/tools/testing/selftests/mm/thp_settings.c
index 577eaab6266f..ad872af1c81a 100644
--- a/tools/testing/selftests/mm/thp_settings.c
+++ b/tools/testing/selftests/mm/thp_settings.c
@@ -87,7 +87,7 @@ int write_file(const char *path, const char *buf, size_t bu... |
fa00b8ef1803fe133b4897c25227aa0d298dd093 | Analyze and fix the following issue in the Linux kernel code: mm: perform all memfd seal checks in a single place | Problem Details:
We no longer actually need to perform these checks in the f_op->mmap()
hook any longer.
We already moved the operation which clears VM_MAYWRITE on a read-only
mapping of a write-sealed memfd in order to work around the restrictions
imposed by commit 5de195060b2e ("mm: resolve faulty mmap_region() erro... | ```diff
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index fc1ae5132127..62fb0cbc93ab 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -99,7 +99,6 @@ static const struct fs_parameter_spec hugetlb_fs_parameters[] = {
static int hugetlbfs_file_mmap(struct file *file, struct vm_area_struct *vma... |
24bd843b1d1017ffc479246c7fc17537eb180763 | Analyze and fix the following issue in the Linux kernel code: mm: enforce __must_check on VMA merge and split | Problem Details:
It is of critical importance to check the return results on VMA merge (and
split), failure to do so can result in use-after-free's. This bug has
recurred, so have the compiler enforce this check to prevent any future
repetition.
Link: https://lkml.kernel.org/r/20241206225036.273103-1-lorenzo.stoakes@... | ```diff
diff --git a/mm/vma.c b/mm/vma.c
index 06554a732bce..6fa240e5b0c5 100644
--- a/mm/vma.c
+++ b/mm/vma.c
@@ -447,8 +447,9 @@ void unmap_region(struct ma_state *mas, struct vm_area_struct *vma,
* has already been checked or doesn't make sense to fail.
* VMA Iterator will point to the original VMA.
*/
-static... |
79dc2bff4d8d36f04d7683916eb6d4eb9ea04da4 | Analyze and fix the following issue in the Linux kernel code: mm/damon/tests/vaddr-kunit.h: reduce stack consumption | Problem Details:
After "mm: move per-vma lock into vm_area_struct" we're hitting
mm/damon/tests/vaddr-kunit.h: In function 'damon_test_three_regions_in_vmas':
mm/damon/tests/vaddr-kunit.h:92:1: error: the frame size of 3280 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]
Fix by moving all those vmas off ... | ```diff
diff --git a/mm/damon/tests/vaddr-kunit.h b/mm/damon/tests/vaddr-kunit.h
index b9fe3bc8472b..7cd944266a92 100644
--- a/mm/damon/tests/vaddr-kunit.h
+++ b/mm/damon/tests/vaddr-kunit.h
@@ -68,7 +68,7 @@ static void damon_test_three_regions_in_vmas(struct kunit *test)
static struct mm_struct mm;
struct damon_a... |
19b65ffae985c16da237edccae324bcbf1a5408e | Analyze and fix the following issue in the Linux kernel code: selftests/mm: add fork CoW guard page test | Problem Details:
When we fork anonymous pages, apply a guard page then remove it, the
previous CoW mapping is cleared.
This might not be obvious to an outside observer without taking some time
to think about how the overall process functions, so document that this is
the case through a test, which also usefully assert... | ```diff
diff --git a/tools/testing/selftests/mm/guard-pages.c b/tools/testing/selftests/mm/guard-pages.c
index 7cdf815d0d63..ece37212a8a2 100644
--- a/tools/testing/selftests/mm/guard-pages.c
+++ b/tools/testing/selftests/mm/guard-pages.c
@@ -55,6 +55,12 @@ static int pidfd_open(pid_t pid, unsigned int flags)
return ... |
6375e95f381e3dc85065b6f74263a61522736203 | Analyze and fix the following issue in the Linux kernel code: mm: pgtable: reclaim empty PTE page in madvise(MADV_DONTNEED) | Problem Details:
Now in order to pursue high performance, applications mostly use some
high-performance user-mode memory allocators, such as jemalloc or
tcmalloc. These memory allocators use madvise(MADV_DONTNEED or MADV_FREE)
to release physical memory, but neither MADV_DONTNEED nor MADV_FREE will
release page table ... | ```diff
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 2e5ef71b8629..9372bc058b43 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -2320,6 +2320,7 @@ extern void pagefault_out_of_memory(void);
struct zap_details {
struct folio *single_folio; /* Locked folio to be unmapped */
bool even_cows; ... |
d8fd84dd4ce72e371a6604809e25e16e24b997d4 | Analyze and fix the following issue in the Linux kernel code: mm/hugetlb: don't map folios writable without VM_WRITE when copying during fork() | Problem Details:
If we have to trigger a hugetlb folio copy during fork() because the anon
folio might be pinned, we currently unconditionally create a writable PTE.
However, the VMA might not have write permissions (VM_WRITE) at that
point.
Fix it by checking the VMA for VM_WRITE. Make the code less error prone
by ... | ```diff
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index ac275a8864e0..c9d8c6a1c03c 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -5155,12 +5155,12 @@ const struct vm_operations_struct hugetlb_vm_ops = {
};
static pte_t make_huge_pte(struct vm_area_struct *vma, struct page *page,
- int writable)
+ bool try_mkwr... |
d5ea5e5e50dffd13fccedb690a0a1f27be56191a | Analyze and fix the following issue in the Linux kernel code: readahead: properly shorten readahead when falling back to do_page_cache_ra() | Problem Details:
When we succeed in creating some folios in page_cache_ra_order() but then
need to fallback to single page folios, we don't shorten the amount to
read passed to do_page_cache_ra() by the amount we've already read. This
then results in reading more and also in placing another readahead mark in
the middl... | ```diff
diff --git a/mm/readahead.c b/mm/readahead.c
index 50a64d8e06b0..2bc3abf07828 100644
--- a/mm/readahead.c
+++ b/mm/readahead.c
@@ -448,7 +448,8 @@ void page_cache_ra_order(struct readahead_control *ractl,
struct file_ra_state *ra, unsigned int new_order)
{
struct address_space *mapping = ractl->mapping;
-... |
7a1eb89f79188ec32599064eca7c14d42260760a | Analyze and fix the following issue in the Linux kernel code: readahead: don't shorten readahead window in read_pages() | Problem Details:
Patch series "readahead: Reintroduce fix for improper RA window sizing".
This small patch series reintroduces a fix of readahead window confusion
(and thus read throughput reduction) when page_cache_ra_order() ends up
failing due to folios already present in the page cache. After thinking
about this ... | ```diff
diff --git a/mm/readahead.c b/mm/readahead.c
index e151f4b13ca4..50a64d8e06b0 100644
--- a/mm/readahead.c
+++ b/mm/readahead.c
@@ -158,20 +158,10 @@ static void read_pages(struct readahead_control *rac)
if (aops->readahead) {
aops->readahead(rac);
- /*
- * Clean up the remaining folios. The sizes in ... |
5f1c8108e7ad510456733d143b8ffc4e2408b1a1 | Analyze and fix the following issue in the Linux kernel code: mm:kasan: fix sparse warnings: Should it be static? | Problem Details:
Yes, when making the global variables kasan_ptr_result and
kasan_int_result as static volatile, the warnings are removed and the
variable and assignments are retained, but when just static is used I
understand that it might be optimized.
Add a fix making the global varaibles - static volatile, removin... | ```diff
diff --git a/mm/kasan/kasan_test_c.c b/mm/kasan/kasan_test_c.c
index 99d4ff0ed57a..59d673400085 100644
--- a/mm/kasan/kasan_test_c.c
+++ b/mm/kasan/kasan_test_c.c
@@ -47,8 +47,8 @@ static struct {
* Some tests use these global variables to store return values from function
* calls that could otherwise be el... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.