id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
e374b123ca602060c018a029f508dc175b8ba5b3
Analyze and fix the following issue in the Linux kernel code: media: platform: rzg2l-cru: Use %pe format specifier
Problem Details: The %pe format specifier is designed to print error pointers. It prints a symbolic error name (eg. -EINVAL) and it makes the code simpler by omitting PTR_ERR(). This patch fixes this cocci report: ./platform/renesas/rzg2l-cru/rzg2l-csi2.c:307:30-37: WARNING: Consider using %pe to print PTR_ERR() ./pla...
```diff diff --git a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c index 1520211e7418..0fbdae280fdc 100644 --- a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c +++ b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c @@ -303,8 +303,8 @@ static in...
53d94ec2eabf458cfb49ad3dce059e02bd85ae12
Analyze and fix the following issue in the Linux kernel code: media: imx8mq-mipi-csi2: Use %pe format specifier
Problem Details: The %pe format specifier is designed to print error pointers. It prints a symbolic error name (eg. -EINVAL) and it makes the code simpler by omitting PTR_ERR(). This patch fixes this cocci report: ./platform/nxp/imx8mq-mipi-csi2.c:422:23-30: WARNING: Consider using %pe to print PTR_ERR() Signed-off-b...
```diff diff --git a/drivers/media/platform/nxp/imx8mq-mipi-csi2.c b/drivers/media/platform/nxp/imx8mq-mipi-csi2.c index 3a4645f59a44..d333ff43539f 100644 --- a/drivers/media/platform/nxp/imx8mq-mipi-csi2.c +++ b/drivers/media/platform/nxp/imx8mq-mipi-csi2.c @@ -418,8 +418,8 @@ static int imx8mq_mipi_csi_calc_hs_settle...
610a0fcd80036fa27c7a198d4b0374417d392cc0
Analyze and fix the following issue in the Linux kernel code: media: mediatek: vcodec: Use %pe format specifier
Problem Details: The %pe format specifier is designed to print error pointers. It prints a symbolic error name (eg. -EINVAL) and it makes the code simpler by omitting PTR_ERR(). This patch fixes this cocci report: ./platform/mediatek/vcodec/common/mtk_vcodec_dbgfs.c:187:3-10: WARNING: Consider using %pe to print PTR_E...
```diff diff --git a/drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_dbgfs.c b/drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_dbgfs.c index 5ad3797836db..643d6fff088b 100644 --- a/drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_dbgfs.c +++ b/drivers/media/platform/mediatek/vcodec/common/mtk_...
ee738d5c91eb74c25b74ade10e089e842b7f1498
Analyze and fix the following issue in the Linux kernel code: media: ipu6: isys: Use %pe format specifier
Problem Details: The %pe format specifier is designed to print error pointers. It prints a symbolic error name (eg. -EINVAL) and it makes the code simpler by omitting PTR_ERR(). This patch fixes this cocci report: ./pci/intel/ipu6/ipu6-isys-csi2.c:91:22-29: WARNING: Consider using %pe to print PTR_ERR() Signed-off-by...
```diff diff --git a/drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c b/drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c index d1fece6210ab..d858976112ba 100644 --- a/drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c +++ b/drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c @@ -87,8 +87,8 @@ s64 ipu6_isys_csi2_get_link_freq(struct ipu...
96097ec153d1638b3c5286f0de888e5a7855ee0e
Analyze and fix the following issue in the Linux kernel code: media: ipu3-cio2: Use %pe format specifier
Problem Details: The %pe format specifier is designed to print error pointers. It prints a symbolic error name (eg. -EINVAL) and it makes the code simpler by omitting PTR_ERR(). This patch fixes this cocci report: ./pci/intel/ipu3/ipu3-cio2.c:318:19-26: WARNING: Consider using %pe to print PTR_ERR() Signed-off-by: Ri...
```diff diff --git a/drivers/media/pci/intel/ipu3/ipu3-cio2.c b/drivers/media/pci/intel/ipu3/ipu3-cio2.c index a87f105beb5e..986b9afd7cb5 100644 --- a/drivers/media/pci/intel/ipu3/ipu3-cio2.c +++ b/drivers/media/pci/intel/ipu3/ipu3-cio2.c @@ -314,8 +314,8 @@ static int cio2_csi2_calc_timing(struct cio2_device *cio2, st...
5e82eb357af8e0304b1231f1166b55e4c04e2bc4
Analyze and fix the following issue in the Linux kernel code: media: ipu-bridge: Use %pe format specifier
Problem Details: The %pe format specifier is designed to print error pointers. It prints a symbolic error name (eg. -EINVAL) and it makes the code simpler by omitting PTR_ERR(). This patch fixes this cocci report: ./pci/intel/ipu-bridge.c:567:3-10: WARNING: Consider using %pe to print PTR_ERR() Signed-off-by: Ricardo...
```diff diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel/ipu-bridge.c index 4e579352ab2c..153b2f3685b4 100644 --- a/drivers/media/pci/intel/ipu-bridge.c +++ b/drivers/media/pci/intel/ipu-bridge.c @@ -563,8 +563,8 @@ static void ipu_bridge_instantiate_vcm_work(struct work_struct *work) vcm_c...
8bcc9138a780194496ccfe2f22aaaeadce686211
Analyze and fix the following issue in the Linux kernel code: media: i2c: st-mipid02: Use %pe format specifier
Problem Details: The %pe format specifier is designed to print error pointers. It prints a symbolic error name (eg. -EINVAL) and it makes the code simpler by omitting PTR_ERR(). This patch fixes this cocci report: ./i2c/st-mipid02.c:751:3-10: WARNING: Consider using %pe to print PTR_ERR() Signed-off-by: Ricardo Ribal...
```diff diff --git a/drivers/media/i2c/st-mipid02.c b/drivers/media/i2c/st-mipid02.c index 41ae25b0911f..4675181af5fb 100644 --- a/drivers/media/i2c/st-mipid02.c +++ b/drivers/media/i2c/st-mipid02.c @@ -747,8 +747,8 @@ static int mipid02_parse_rx_ep(struct mipid02_dev *bridge) of_node_put(ep_node); if (IS_ERR(asd...
7f457b281cc363320fb954498b15156f9dbfc6e5
Analyze and fix the following issue in the Linux kernel code: media: rj54n1cb0c: Use %pe format specifier
Problem Details: The %pe format specifier is designed to print error pointers. It prints a symbolic error name (eg. -EINVAL) and it makes the code simpler by omitting PTR_ERR(). This patch fixes this cocci report: ./i2c/rj54n1cb0c.c:1361:4-11: WARNING: Consider using %pe to print PTR_ERR() ./i2c/rj54n1cb0c.c:1370:4-11...
```diff diff --git a/drivers/media/i2c/rj54n1cb0c.c b/drivers/media/i2c/rj54n1cb0c.c index 6dfc91216851..e95342d706c3 100644 --- a/drivers/media/i2c/rj54n1cb0c.c +++ b/drivers/media/i2c/rj54n1cb0c.c @@ -1357,8 +1357,8 @@ static int rj54n1_probe(struct i2c_client *client) rj54n1->pwup_gpio = gpiod_get_optional(&client...
b3c30874a9d9baf32ba834bd992b910e5c2f2bb3
Analyze and fix the following issue in the Linux kernel code: media: i2c: ov9282: Use %pe format specifier
Problem Details: The %pe format specifier is designed to print error pointers. It prints a symbolic error name (eg. -EINVAL) and it makes the code simpler by omitting PTR_ERR(). This patch fixes this cocci report: ./i2c/ov9282.c:1133:3-10: WARNING: Consider using %pe to print PTR_ERR() Signed-off-by: Ricardo Ribalda ...
```diff diff --git a/drivers/media/i2c/ov9282.c b/drivers/media/i2c/ov9282.c index a9f6176e9729..3e24d88f603c 100644 --- a/drivers/media/i2c/ov9282.c +++ b/drivers/media/i2c/ov9282.c @@ -1129,8 +1129,8 @@ static int ov9282_parse_hw_config(struct ov9282 *ov9282) ov9282->reset_gpio = devm_gpiod_get_optional(ov9282->dev...
ca1c388ad0441a76894b28e2204c78dfa8cbbdef
Analyze and fix the following issue in the Linux kernel code: media: i2c: ov5693: Use %pe format specifier
Problem Details: The %pe format specifier is designed to print error pointers. It prints a symbolic error name (eg. -EINVAL) and it makes the code simpler by omitting PTR_ERR(). This patch fixes this cocci report: ./i2c/ov5693.c:1296:9-16: WARNING: Consider using %pe to print PTR_ERR() Signed-off-by: Ricardo Ribalda ...
```diff diff --git a/drivers/media/i2c/ov5693.c b/drivers/media/i2c/ov5693.c index d294477f9dd3..4cc796bbee92 100644 --- a/drivers/media/i2c/ov5693.c +++ b/drivers/media/i2c/ov5693.c @@ -1292,8 +1292,8 @@ static int ov5693_probe(struct i2c_client *client) ov5693->xvclk = devm_v4l2_sensor_clk_get(&client->dev, "xvclk"...
24dc83173f4a384063e07c731dcae9dd2408507f
Analyze and fix the following issue in the Linux kernel code: media: i2c: ov5675: Use %pe format specifier
Problem Details: The %pe format specifier is designed to print error pointers. It prints a symbolic error name (eg. -EINVAL) and it makes the code simpler by omitting PTR_ERR(). This patch fixes this cocci report: ./i2c/ov5675.c:1188:9-16: WARNING: Consider using %pe to print PTR_ERR() Signed-off-by: Ricardo Ribalda ...
```diff diff --git a/drivers/media/i2c/ov5675.c b/drivers/media/i2c/ov5675.c index 30e27d39ee44..ea26df328189 100644 --- a/drivers/media/i2c/ov5675.c +++ b/drivers/media/i2c/ov5675.c @@ -1184,8 +1184,8 @@ static int ov5675_get_hwcfg(struct ov5675 *ov5675) ov5675->xvclk = devm_v4l2_sensor_clk_get(dev, NULL); if (IS_...
b97ef7b65ade812ab2b485b287e7fbbbacef067c
Analyze and fix the following issue in the Linux kernel code: media: i2c: mt9v111: Use %pe format specifier
Problem Details: The %pe format specifier is designed to print error pointers. It prints a symbolic error name (eg. -EINVAL) and it makes the code simpler by omitting PTR_ERR(). This patch fixes this cocci report: ./i2c/mt9v111.c:1143:3-10: WARNING: Consider using %pe to print PTR_ERR() ./i2c/mt9v111.c:1151:3-10: WARN...
```diff diff --git a/drivers/media/i2c/mt9v111.c b/drivers/media/i2c/mt9v111.c index b4f2703faa18..64a758c95ab7 100644 --- a/drivers/media/i2c/mt9v111.c +++ b/drivers/media/i2c/mt9v111.c @@ -1139,24 +1139,24 @@ static int mt9v111_probe(struct i2c_client *client) mt9v111->oe = devm_gpiod_get_optional(&client->dev, "en...
e027f53e058fc043e0146d53e650e03e44ae3f6e
Analyze and fix the following issue in the Linux kernel code: media: i2c: mt9m111: Use %pe format specifier
Problem Details: The %pe format specifier is designed to print error pointers. It prints a symbolic error name (eg. -EINVAL) and it makes the code simpler by omitting PTR_ERR(). This patch fixes this cocci report: ./i2c/mt9m111.c:1290:3-10: WARNING: Consider using %pe to print PTR_ERR() Signed-off-by: Ricardo Ribalda...
```diff diff --git a/drivers/media/i2c/mt9m111.c b/drivers/media/i2c/mt9m111.c index 05dcf37c6f01..3532c7c38bec 100644 --- a/drivers/media/i2c/mt9m111.c +++ b/drivers/media/i2c/mt9m111.c @@ -1286,8 +1286,8 @@ static int mt9m111_probe(struct i2c_client *client) mt9m111->regulator = devm_regulator_get(&client->dev, "...
e8fd8080e7a9c8c577e5dec5bd6d486a3f14011c
Analyze and fix the following issue in the Linux kernel code: media: i2c: max96717: Use %pe format specifier
Problem Details: The %pe format specifier is designed to print error pointers. It prints a symbolic error name (eg. -EINVAL) and it makes the code simpler by omitting PTR_ERR(). This patch fixes this cocci report: ./i2c/max96717.c:653:44-51: WARNING: Consider using %pe to print PTR_ERR() Signed-off-by: Ricardo Ribald...
```diff diff --git a/drivers/media/i2c/max96717.c b/drivers/media/i2c/max96717.c index c8ae7890d9fa..71ec4fdb8e3d 100644 --- a/drivers/media/i2c/max96717.c +++ b/drivers/media/i2c/max96717.c @@ -650,7 +650,7 @@ static int max96717_v4l2_notifier_register(struct max96717_priv *priv) fwnode_handle_put(ep_fwnode); if...
3a57a0763b4c082569a22a955c206fcb2e970ee8
Analyze and fix the following issue in the Linux kernel code: media: i2c: max9286: Use %pe format specifier
Problem Details: The %pe format specifier is designed to print error pointers. It prints a symbolic error name (eg. -EINVAL) and it makes the code simpler by omitting PTR_ERR(). This patch fixes this cocci report: ./i2c/max9286.c:755:7-14: WARNING: Consider using %pe to print PTR_ERR() Signed-off-by: Ricardo Ribalda ...
```diff diff --git a/drivers/media/i2c/max9286.c b/drivers/media/i2c/max9286.c index 7c0961688d61..e6e214f8294b 100644 --- a/drivers/media/i2c/max9286.c +++ b/drivers/media/i2c/max9286.c @@ -751,8 +751,8 @@ static int max9286_v4l2_notifier_register(struct max9286_priv *priv) mas = v4l2_async_nf_add_fwnode(&priv->not...
f7be2c2e59719b3a7dc1acd7523914baf9d827b3
Analyze and fix the following issue in the Linux kernel code: media: i2c: imx412: Use %pe format specifier
Problem Details: The %pe format specifier is designed to print error pointers. It prints a symbolic error name (eg. -EINVAL) and it makes the code simpler by omitting PTR_ERR(). This patch fixes this cocci report: ./i2c/imx412.c:931:3-10: WARNING: Consider using %pe to print PTR_ERR() Signed-off-by: Ricardo Ribalda <...
```diff diff --git a/drivers/media/i2c/imx412.c b/drivers/media/i2c/imx412.c index 7bbd639a9ddf..b3826f803547 100644 --- a/drivers/media/i2c/imx412.c +++ b/drivers/media/i2c/imx412.c @@ -927,8 +927,8 @@ static int imx412_parse_hw_config(struct imx412 *imx412) imx412->reset_gpio = devm_gpiod_get_optional(imx412->dev, ...
03e5b11a063d68f85254f775fcd886cbaad8ed08
Analyze and fix the following issue in the Linux kernel code: media: i2c: imx335: Use %pe format specifier
Problem Details: The %pe format specifier is designed to print error pointers. It prints a symbolic error name (eg. -EINVAL) and it makes the code simpler by omitting PTR_ERR(). This patch fixes this cocci report: ./i2c/imx335.c:1013:3-10: WARNING: Consider using %pe to print PTR_ERR() Signed-off-by: Ricardo Ribalda ...
```diff diff --git a/drivers/media/i2c/imx335.c b/drivers/media/i2c/imx335.c index c043df2f15fb..71ed9a0d84a2 100644 --- a/drivers/media/i2c/imx335.c +++ b/drivers/media/i2c/imx335.c @@ -1009,8 +1009,8 @@ static int imx335_parse_hw_config(struct imx335 *imx335) imx335->reset_gpio = devm_gpiod_get_optional(imx335->dev...
c268a1e9afbbf4b12953207d1407c8340149890b
Analyze and fix the following issue in the Linux kernel code: media: i2c: imx274: Use %pe format specifier
Problem Details: The %pe format specifier is designed to print error pointers. It prints a symbolic error name (eg. -EINVAL) and it makes the code simpler by omitting PTR_ERR(). This patch fixes this cocci report: ./i2c/imx274.c:2038:32-39: WARNING: Consider using %pe to print PTR_ERR() Signed-off-by: Ricardo Ribalda...
```diff diff --git a/drivers/media/i2c/imx274.c b/drivers/media/i2c/imx274.c index d86d08c29174..8ec78b60bea6 100644 --- a/drivers/media/i2c/imx274.c +++ b/drivers/media/i2c/imx274.c @@ -2034,8 +2034,7 @@ static int imx274_probe(struct i2c_client *client) /* initialize regmap */ imx274->regmap = devm_regmap_init_i2...
e1fa799310e093db54ab0ccc0a4424a97e340b85
Analyze and fix the following issue in the Linux kernel code: media: i2c: ds90ub953: Use %pe format specifier
Problem Details: The %pe format specifier is designed to print error pointers. It prints a symbolic error name (eg. -EINVAL) and it makes the code simpler by omitting PTR_ERR(). This patch fixes this cocci report: ./i2c/ds90ub953.c:779:44-51: WARNING: Consider using %pe to print PTR_ERR() Signed-off-by: Ricardo Ribal...
```diff diff --git a/drivers/media/i2c/ds90ub953.c b/drivers/media/i2c/ds90ub953.c index e3fc9d66970a..087bb4ea5559 100644 --- a/drivers/media/i2c/ds90ub953.c +++ b/drivers/media/i2c/ds90ub953.c @@ -776,7 +776,7 @@ static int ub953_v4l2_notifier_register(struct ub953_data *priv) fwnode_handle_put(ep_fwnode); if (...
9b4677ed2a26ee1f59035f949742489ede317f61
Analyze and fix the following issue in the Linux kernel code: media: i2c: ds90ub913: Use %pe format specifier
Problem Details: The %pe format specifier is designed to print error pointers. It prints a symbolic error name (eg. -EINVAL) and it makes the code simpler by omitting PTR_ERR(). This patch fixes this cocci report: ./i2c/ds90ub913.c:625:44-51: WARNING: Consider using %pe to print PTR_ERR() Signed-off-by: Ricardo Ribal...
```diff diff --git a/drivers/media/i2c/ds90ub913.c b/drivers/media/i2c/ds90ub913.c index 73150061ea45..e97e499b04e6 100644 --- a/drivers/media/i2c/ds90ub913.c +++ b/drivers/media/i2c/ds90ub913.c @@ -622,7 +622,7 @@ static int ub913_v4l2_notifier_register(struct ub913_data *priv) fwnode_handle_put(ep_fwnode); if (...
f85015f473bbae6b6b835fe4a23d4f9481775555
Analyze and fix the following issue in the Linux kernel code: media: ccs: Use %pe format specifier
Problem Details: The %pe format specifier is designed to print error pointers. It prints a symbolic error name (eg. -EINVAL) and it makes the code simpler by omitting PTR_ERR() This patch fixes this cocci report: ./i2c/ccs/ccs-core.c:3241:3-10: WARNING: Consider using %pe to print PTR_ERR() ./i2c/ccs/ccs-core.c:3298:3...
```diff diff --git a/drivers/media/i2c/ccs/ccs-core.c b/drivers/media/i2c/ccs/ccs-core.c index 1c889c878abd..f8523140784c 100644 --- a/drivers/media/i2c/ccs/ccs-core.c +++ b/drivers/media/i2c/ccs/ccs-core.c @@ -3237,8 +3237,8 @@ static int ccs_probe(struct i2c_client *client) dev_info(&client->dev, "no clock defined...
435becbe2ecad8ddec6061b710b611a912283716
Analyze and fix the following issue in the Linux kernel code: media: ar0521: Use %pe format specifier
Problem Details: The %pe format specifier is designed to print error pointers. It prints a symbolic error name (eg. -EINVAL) and it makes the code simpler by omitting PTR_ERR() This patch fixes this cocci report: ./i2c/ar0521.c:1113:31-38: WARNING: Consider using %pe to print PTR_ERR() Signed-off-by: Ricardo Ribalda ...
```diff diff --git a/drivers/media/i2c/ar0521.c b/drivers/media/i2c/ar0521.c index 939bf590d4b2..f156058500e3 100644 --- a/drivers/media/i2c/ar0521.c +++ b/drivers/media/i2c/ar0521.c @@ -1109,8 +1109,8 @@ static int ar0521_probe(struct i2c_client *client) ar0521_supply_names[cnt]); if (IS_ERR(supply)) { - ...
ce5bf59e0eea1c14c918c44683cfae78c438b92d
Analyze and fix the following issue in the Linux kernel code: media: adv7842: Use %pe format specifier
Problem Details: The %pe format specifier is designed to print error pointers. It prints a symbolic error name (eg. -EINVAL) and it makes the code simpler by omitting PTR_ERR() This patch fixes this cocci report: ./i2c/adv7842.c:3470:16-23: WARNING: Consider using %pe to print PTR_ERR() Signed-off-by: Ricardo Ribalda...
```diff diff --git a/drivers/media/i2c/adv7842.c b/drivers/media/i2c/adv7842.c index 21c3d3682e0b..ea6966c0605e 100644 --- a/drivers/media/i2c/adv7842.c +++ b/drivers/media/i2c/adv7842.c @@ -3469,8 +3469,8 @@ static struct i2c_client *adv7842_dummy_client(struct v4l2_subdev *sd, const cha cp = i2c_new_dummy_device(...
283ea98f2ad97d66b90b6aba6f69dd32d1dd7c69
Analyze and fix the following issue in the Linux kernel code: media: mn88443x: Use %pe format specifier
Problem Details: The %pe format specifier is designed to print error pointers. It prints a symbolic error name (eg. -EINVAL) and it makes the code simpler by omitting PTR_ERR() This patch fixes this cocci report: ./dvb-frontends/mn88443x.c:698:3-10: WARNING: Consider using %pe to print PTR_ERR() ./dvb-frontends/mn8844...
```diff diff --git a/drivers/media/dvb-frontends/mn88443x.c b/drivers/media/dvb-frontends/mn88443x.c index 7a58f53ab999..818c4e67364c 100644 --- a/drivers/media/dvb-frontends/mn88443x.c +++ b/drivers/media/dvb-frontends/mn88443x.c @@ -694,8 +694,7 @@ static int mn88443x_probe(struct i2c_client *client) chip->mclk =...
f6493b52971ac94b1af3e83a819643e767ee44b4
Analyze and fix the following issue in the Linux kernel code: media: dvbdev: Use %pe format specifier
Problem Details: The %pe format specifier is designed to print error pointers. It prints a symbolic error name (eg. -EINVAL) and it makes the code simpler by omitting PTR_ERR() This patch fixes this cocci report: ./dvb-core/dvbdev.c:575:48-55: WARNING: Consider using %pe to print PTR_ERR() Signed-off-by: Ricardo Riba...
```diff diff --git a/drivers/media/dvb-core/dvbdev.c b/drivers/media/dvb-core/dvbdev.c index 9df7c213716a..8b980d371a45 100644 --- a/drivers/media/dvb-core/dvbdev.c +++ b/drivers/media/dvb-core/dvbdev.c @@ -571,8 +571,8 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev, MKDEV(D...
3662b54c16924b03197ec80f9764aabdf2c90231
Analyze and fix the following issue in the Linux kernel code: media: v4l2-mem2mem: Document that v4l2_m2m_get_vq() never returns NULL
Problem Details: The v4l2_m2m_get_vq() never returns a NULL pointer, as the internal get_queue_ctx() helper always returns a non-NULL pointer. Many drivers check the return value against NULL, due to a combination of old code and cargo-cult programming. Even v4l2-mem2mem.c contains unneeded NULL checks. Clarify the AP...
```diff diff --git a/drivers/media/v4l2-core/v4l2-mem2mem.c b/drivers/media/v4l2-core/v4l2-mem2mem.c index 21acd9bc8607..9fa8833e445f 100644 --- a/drivers/media/v4l2-core/v4l2-mem2mem.c +++ b/drivers/media/v4l2-core/v4l2-mem2mem.c @@ -123,13 +123,7 @@ static struct v4l2_m2m_queue_ctx *get_queue_ctx(struct v4l2_m2m_ctx ...
59a2d3f38ab23cce4cd9f0c4a5e08fdfe9e67ae7
Analyze and fix the following issue in the Linux kernel code: drm/xe/uapi: Hide the madvise autoreset behind a VM_BIND flag
Problem Details: The madvise implementation currently resets the SVM madvise if the underlying CPU map is unmapped. This is in an attempt to mimic the CPU madvise behaviour. However, it's not clear that this is a desired behaviour since if the end app user relies on it for malloc()ed objects or stack objects, it may no...
```diff diff --git a/drivers/gpu/drm/xe/xe_svm.c b/drivers/gpu/drm/xe/xe_svm.c index da2a412f80c0..129e7818565c 100644 --- a/drivers/gpu/drm/xe/xe_svm.c +++ b/drivers/gpu/drm/xe/xe_svm.c @@ -302,6 +302,11 @@ static int xe_svm_range_set_default_attr(struct xe_vm *vm, u64 range_start, u64 if (!vma) return -EINVAL; ...
b3af8658ec70f2196190c66103478352286aba3b
Analyze and fix the following issue in the Linux kernel code: drm/xe: Retain vma flags when recreating and splitting vmas for madvise
Problem Details: When splitting and restoring vmas for madvise, we only copied the XE_VMA_SYSTEM_ALLOCATOR flag. That meant we lost flags for read_only, dumpable and sparse (in case anyone would call madvise for the latter). Instead, define a mask of relevant flags and ensure all are replicated, To simplify this and m...
```diff diff --git a/drivers/gpu/drm/xe/xe_pt.c b/drivers/gpu/drm/xe/xe_pt.c index e39da95f3a05..d22fd1ccc0ba 100644 --- a/drivers/gpu/drm/xe/xe_pt.c +++ b/drivers/gpu/drm/xe/xe_pt.c @@ -2022,7 +2022,7 @@ static int op_prepare(struct xe_vm *vm, case DRM_GPUVA_OP_MAP: if ((!op->map.immediate && xe_vm_in_fault_mode(...
bce13d6ecd6c0e6c3376ac53617b30d19ce2a5c6
Analyze and fix the following issue in the Linux kernel code: drm/gpusvm, drm/xe: Allow mixed mappings for userptr
Problem Details: Compute kernels often issue memory copies immediately after completion. If the memory being copied is an SVM pointer that was faulted into the device and then bound via userptr, it is undesirable to move that memory. Worse, if userptr is mixed between system and device memory, the bind operation may be...
```diff diff --git a/drivers/gpu/drm/drm_gpusvm.c b/drivers/gpu/drm/drm_gpusvm.c index cb906765897e..73e550c8ff8c 100644 --- a/drivers/gpu/drm/drm_gpusvm.c +++ b/drivers/gpu/drm/drm_gpusvm.c @@ -1363,7 +1363,8 @@ map_pages: order = drm_gpusvm_hmm_pfn_to_order(pfns[i], i, npages); if (is_device_private_page(page) ...
96feb73def02d175850daa0e7c2c90c876681b5c
Analyze and fix the following issue in the Linux kernel code: crypto: authenc - Correctly pass EINPROGRESS back up to the caller
Problem Details: When authenc is invoked with MAY_BACKLOG, it needs to pass EINPROGRESS notifications back up to the caller when the underlying algorithm returns EBUSY synchronously. However, if the EBUSY comes from the second part of an authenc call, i.e., it is asynchronous, both the EBUSY and the subsequent EINPROG...
```diff diff --git a/crypto/authenc.c b/crypto/authenc.c index a723769c8777..ac679ce2cb95 100644 --- a/crypto/authenc.c +++ b/crypto/authenc.c @@ -37,7 +37,7 @@ struct authenc_request_ctx { static void authenc_request_complete(struct aead_request *req, int err) { - if (err != -EINPROGRESS) + if (err != -EINPROGRESS...
6f6e309328d53a10c0fe1f77dec2db73373179b6
Analyze and fix the following issue in the Linux kernel code: crypto: af_alg - zero initialize memory allocated via sock_kmalloc
Problem Details: Several crypto user API contexts and requests allocated with sock_kmalloc() were left uninitialized, relying on callers to set fields explicitly. This resulted in the use of uninitialized data in certain error paths or when new fields are added in the future. The ACVP patches also contain two user-spa...
```diff diff --git a/crypto/af_alg.c b/crypto/af_alg.c index ca6fdcc6c54a..6c271e55f44d 100644 --- a/crypto/af_alg.c +++ b/crypto/af_alg.c @@ -1212,15 +1212,14 @@ struct af_alg_async_req *af_alg_alloc_areq(struct sock *sk, if (unlikely(!areq)) return ERR_PTR(-ENOMEM); + memset(areq, 0, areqlen); + ctx->infligh...
7cf6e0b69b0d90ab042163e5bbddda0dfcf8b6a7
Analyze and fix the following issue in the Linux kernel code: crypto: caam - Add check for kcalloc() in test_len()
Problem Details: As kcalloc() may fail, check its return value to avoid a NULL pointer dereference when passing the buffer to rng->read(). On allocation failure, log the error and return since test_len() returns void. Fixes: 2be0d806e25e ("crypto: caam - add a test for the RNG") Cc: stable@vger.kernel.org Signed-off-b...
```diff diff --git a/drivers/crypto/caam/caamrng.c b/drivers/crypto/caam/caamrng.c index b3d14a7f4dd1..0eb43c862516 100644 --- a/drivers/crypto/caam/caamrng.c +++ b/drivers/crypto/caam/caamrng.c @@ -181,7 +181,9 @@ static inline void test_len(struct hwrng *rng, size_t len, bool wait) struct device *dev = ctx->ctrldev...
9271d0ea07c27e6f482f20b615c2a4bba991e68c
Analyze and fix the following issue in the Linux kernel code: can: m_can: add support for optional reset
Problem Details: This patch has been split from the original series [1]. In some SoCs (observed on the STM32MP15) the M_CAN IP core keeps the CAN state and CAN error counters over an internal reset cycle. The STM32MP15 SoC provides an external reset, which is shared between both M_CAN cores. Add support for an option...
```diff diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c index ad4f577c1ef7..48b7a67336b5 100644 --- a/drivers/net/can/m_can/m_can.c +++ b/drivers/net/can/m_can/m_can.c @@ -23,6 +23,7 @@ #include <linux/pinctrl/consumer.h> #include <linux/platform_device.h> #include <linux/pm_runtime.h> +#i...
c7fbb8218b4ad35fec0bd2256d2b9c8d60331f33
Analyze and fix the following issue in the Linux kernel code: sysfs: check visibility before changing group attribute ownership
Problem Details: Since commit 0c17270f9b92 ("net: sysfs: Implement is_visible for phys_(port_id, port_name, switch_id)"), __dev_change_net_namespace() can hit WARN_ON() when trying to change owner of a file that isn't visible. See the trace below: WARNING: CPU: 6 PID: 2938 at net/core/dev.c:12410 __dev_change_net_nam...
```diff diff --git a/fs/sysfs/group.c b/fs/sysfs/group.c index 2d78e94072a0..e142bac4f9f8 100644 --- a/fs/sysfs/group.c +++ b/fs/sysfs/group.c @@ -498,17 +498,26 @@ int compat_only_sysfs_link_entry_to_kobj(struct kobject *kobj, } EXPORT_SYMBOL_GPL(compat_only_sysfs_link_entry_to_kobj); -static int sysfs_group_attrs...
a91c8096590bd7801a26454789f2992094fe36da
Analyze and fix the following issue in the Linux kernel code: devcoredump: Fix circular locking dependency with devcd->mutex.
Problem Details: The original code causes a circular locking dependency found by lockdep. ====================================================== WARNING: possible circular locking dependency detected 6.16.0-rc6-lgci-xe-xe-pw-151626v3+ #1 Tainted: G S U ------------------------------------------------------ xe_fault_...
```diff diff --git a/drivers/base/devcoredump.c b/drivers/base/devcoredump.c index 37faf6156d7c..55bdc7f5e59d 100644 --- a/drivers/base/devcoredump.c +++ b/drivers/base/devcoredump.c @@ -23,50 +23,46 @@ struct devcd_entry { void *data; size_t datalen; /* - * Here, mutex is required to serialize the calls to del_...
873f10cf8e4d59605bc38fa1051dea8ee56fe3be
Analyze and fix the following issue in the Linux kernel code: RISC-V: KVM: Read HGEIP CSR on the correct cpu
Problem Details: When executing kvm_riscv_vcpu_aia_has_interrupts, the vCPU may have migrated and the IMSIC VS-file have not been updated yet, currently the HGEIP CSR should be read from the imsic->vsfile_cpu ( the pCPU before migration ) via on_each_cpu_mask, but this will trigger an IPI call and repeated IPI within a...
```diff diff --git a/arch/riscv/kvm/aia_imsic.c b/arch/riscv/kvm/aia_imsic.c index fda0346f0ea1..11422cb95a64 100644 --- a/arch/riscv/kvm/aia_imsic.c +++ b/arch/riscv/kvm/aia_imsic.c @@ -689,8 +689,20 @@ bool kvm_riscv_vcpu_aia_imsic_has_interrupt(struct kvm_vcpu *vcpu) */ read_lock_irqsave(&imsic->vsfile_lock, ...
a429b76114aaca3ef1aff4cd469dcf025431bd11
Analyze and fix the following issue in the Linux kernel code: erofs: fix crafted invalid cases for encoded extents
Problem Details: Robert recently reported two corrupted images that can cause system crashes, which are related to the new encoded extents introduced in Linux 6.15: - The first one [1] has plen != 0 (e.g. plen == 0x2000000) but (plen & Z_EROFS_EXTENT_PLEN_MASK) == 0. It is used to represent special extents s...
```diff diff --git a/fs/erofs/zmap.c b/fs/erofs/zmap.c index e5581dbeb4c2..8007814f721e 100644 --- a/fs/erofs/zmap.c +++ b/fs/erofs/zmap.c @@ -596,7 +596,7 @@ static int z_erofs_map_blocks_ext(struct inode *inode, vi->z_fragmentoff = map->m_plen; if (recsz > offsetof(struct z_erofs_extent, pstart_lo)) vi->...
4db26c65d25ab74c66250d6b853ad1131fc86751
Analyze and fix the following issue in the Linux kernel code: ARM: dts: aspeed: santabarbara: Add gpio line name
Problem Details: Add GPIO line name for userspace control or monitoring - Add leak-related line names to report chassis leak event - Add debug-card-mux to control debug card access - Add FM_MAIN_PWREN_RMC_EN_ISO_R to receive RMC power control signal Signed-off-by: Fred Chen <fredchen.openbmc@gmail.com> Signed-off-by: ...
```diff diff --git a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-santabarbara.dts b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-santabarbara.dts index c0334abf9cda..3f36c8e03f48 100644 --- a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-santabarbara.dts +++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-santabarbara.d...
85893094535cced32b33766e283240164a5b11f8
Analyze and fix the following issue in the Linux kernel code: ARM: dts: aspeed: fuji-data64: Enable mac3 controller
Problem Details: "mac3" controller was removed from the initial version of fuji-data64 dts because the rgmii setting is incorrect, but dropping mac3 leads to regression in the existing fuji platform, because fuji.dts simply includes fuji-data64.dts. This patch adds mac3 back to fuji-data64.dts to fix the fuji regressi...
```diff diff --git a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-fuji-data64.dts b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-fuji-data64.dts index aa9576d8ab56..48ca25f57ef6 100644 --- a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-fuji-data64.dts +++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-fuji-data64.dts @...
295e3beead10e96c1feda7ed145113bb9191e296
Analyze and fix the following issue in the Linux kernel code: Input: cyttsp5 - use %pe format specifier
Problem Details: The %pe format specifier is designed to print error pointers. It prints a symbolic error name (eg. -EINVAL) and it makes the code simpler by omitting PTR_ERR() This patch fixes this cocci report: ./cyttsp5.c:927:3-10: WARNING: Consider using %pe to print PTR_ERR() Signed-off-by: Ricardo Ribalda <riba...
```diff diff --git a/drivers/input/touchscreen/cyttsp5.c b/drivers/input/touchscreen/cyttsp5.c index 071b7c9bf566..47f4271395a6 100644 --- a/drivers/input/touchscreen/cyttsp5.c +++ b/drivers/input/touchscreen/cyttsp5.c @@ -923,8 +923,8 @@ static int cyttsp5_i2c_probe(struct i2c_client *client) regmap = devm_regmap_...
7f864458e9a6d2000b726d14b3d3a706ac92a3b0
Analyze and fix the following issue in the Linux kernel code: net: stmmac: dwmac-rk: Fix disabling set_clock_selection
Problem Details: On all platforms set_clock_selection() writes to a GRF register. This requires certain clocks running and thus should happen before the clocks are disabled. This has been noticed on RK3576 Sige5, which hangs during system suspend when trying to suspend the second network interface. Note, that suspendi...
```diff diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c index 51ea0caf16c1..0786816e05f0 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c @@ -1446,14 +1446,15 @@ static int gmac_clk_enable(struct...
39a913db6a47fd988353cf83f0ccd6a1ee6e2db3
Analyze and fix the following issue in the Linux kernel code: net: macb: remove bp->queue_mask
Problem Details: The low 16 bits of GEM_DCFG6 tell us which queues are enabled in HW. In theory, there could be holes in the bitfield. In practice, the macb driver would fail if there were holes as most loops iterate upon bp->num_queues. Only macb_init() iterated correctly. - Drop bp->queue_mask field. - Error out a...
```diff diff --git a/drivers/net/ethernet/cadence/macb.h b/drivers/net/ethernet/cadence/macb.h index f696b2ddc412..5b7d4cdb204d 100644 --- a/drivers/net/ethernet/cadence/macb.h +++ b/drivers/net/ethernet/cadence/macb.h @@ -1290,7 +1290,6 @@ struct macb { unsigned int tx_ring_size; unsigned int num_queues; - uns...
178ca30889a13b555dddab7689fd2cc58c8e5dac
Analyze and fix the following issue in the Linux kernel code: Revert "net/sched: Fix mirred deadlock on device recursion"
Problem Details: This reverts commits 0f022d32c3eca477fbf79a205243a6123ed0fe11 and 44180feaccf266d9b0b28cc4ceaac019817deb5c. Prior patch in this series implemented loop detection in act_mirred, we can remove q->owner to save some cycles in the fast path. Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: ...
```diff diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index 738cd5b13c62..32e9961570b4 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h @@ -117,7 +117,6 @@ struct Qdisc { struct qdisc_skb_head q; struct gnet_stats_basic_sync bstats; struct gnet_stats_queue qstats; - int ...
fe946a751d9b52b7c45ca34899723b314b79b249
Analyze and fix the following issue in the Linux kernel code: net/sched: act_mirred: add loop detection
Problem Details: Commit 0f022d32c3ec ("net/sched: Fix mirred deadlock on device recursion") added code in the fast path, even when act_mirred is not used. Prepare its revert by implementing loop detection in act_mirred. Adds an array of device pointers in struct netdev_xmit. tcf_mirred_is_act_redirect() can detect i...
```diff diff --git a/include/linux/netdevice_xmit.h b/include/linux/netdevice_xmit.h index 813a19122ebb..cc232508e695 100644 --- a/include/linux/netdevice_xmit.h +++ b/include/linux/netdevice_xmit.h @@ -2,6 +2,12 @@ #ifndef _LINUX_NETDEVICE_XMIT_H #define _LINUX_NETDEVICE_XMIT_H +#if IS_ENABLED(CONFIG_NET_ACT_MIRRE...
bf29555f5bdc017bac22ca66fcb6c9f46ec8788f
Analyze and fix the following issue in the Linux kernel code: rtnetlink: Allow deleting FDB entries in user namespace
Problem Details: Creating FDB entries is possible from a non-initial user namespace when having CAP_NET_ADMIN, yet, when deleting FDB entries, processes receive an EPERM because the capability is always checked against the initial user namespace. This restricts the FDB management from unprivileged containers. Drop the...
```diff diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 8040ff7c356e..576d5ec3bb36 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -4715,9 +4715,6 @@ static int rtnl_fdb_del(struct sk_buff *skb, struct nlmsghdr *nlh, int err; u16 vid; - if (!netlink_capable(skb, CAP_NET_ADMIN)) - r...
32f072d9eaf9c31c2b0527a4a3370570a731e3cc
Analyze and fix the following issue in the Linux kernel code: rust: cpufreq: fix formatting
Problem Details: We do our best to keep the repository `rustfmt`-clean, thus run the tool to fix the formatting issue. Link: https://docs.kernel.org/rust/coding-guidelines.html#style-formatting Link: https://rust-for-linux.com/contributing#submit-checklist-addendum Fixes: f97aef092e19 ("cpufreq: Make drivers using CPU...
```diff diff --git a/rust/kernel/cpufreq.rs b/rust/kernel/cpufreq.rs index 21b5b9b8acc1..1a555fcb120a 100644 --- a/rust/kernel/cpufreq.rs +++ b/rust/kernel/cpufreq.rs @@ -38,8 +38,7 @@ use macros::vtable; const CPUFREQ_NAME_LEN: usize = bindings::CPUFREQ_NAME_LEN as usize; /// Default transition latency value in na...
1b0124ad5039678a9dfafb6aafef6f430a246b91
Analyze and fix the following issue in the Linux kernel code: net: rmnet: Fix checksum offload header v5 and aggregation packet formatting
Problem Details: Packet format for checksum offload header v5 and aggregation, and header type table for the former, are shown in normal paragraphs instead. Use appropriate markup. Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/202510150...
```diff diff --git a/Documentation/networking/device_drivers/cellular/qualcomm/rmnet.rst b/Documentation/networking/device_drivers/cellular/qualcomm/rmnet.rst index 289c146a8291..6877a3260582 100644 --- a/Documentation/networking/device_drivers/cellular/qualcomm/rmnet.rst +++ b/Documentation/networking/device_drivers/c...
e1048520750dd9369ec97554ab308ff1ff932ec6
Analyze and fix the following issue in the Linux kernel code: Octeontx2-af: Fix pci_alloc_irq_vectors() return value check
Problem Details: In cgx_probe() when pci_alloc_irq_vectors() fails the error value will be negative and that check is sufficient. err = pci_alloc_irq_vectors(pdev, nvec, nvec, PCI_IRQ_MSIX); if (err < 0 || err != nvec) { ... } When pci_alloc_irq_vectors() fail to allocate nvec number of vectors, -E...
```diff diff --git a/drivers/net/ethernet/marvell/octeontx2/af/cgx.c b/drivers/net/ethernet/marvell/octeontx2/af/cgx.c index ec0e11c77cbf..42044cd810b1 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/cgx.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/cgx.c @@ -1994,7 +1994,7 @@ static int cgx_probe(struct pci...
5348d6312446929edabced02bd6438bfe5220e31
Analyze and fix the following issue in the Linux kernel code: net/mlx5e: psp, avoid 'accel' NULL pointer dereference
Problem Details: The 'accel' parameter of mlx5e_txwqe_build_eseg_csum() and the similar 'state' parameter of mlx5e_accel_tx_ids_len() were NULL when called from mlx5i_sq_xmit() and were causing kernel panics from that context. Fix that by passing in a local empty mlx5e_accel_tx_state variable, thus guaranteeing that '...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c index b7227afcb51d..2702b3885f06 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c @@ -256,7 +256,7 @@ mlx5e_tx_wqe_inline_mode(struct m...
d0d3e9c2867b32c9c70e39e74b9425871cf0042a
Analyze and fix the following issue in the Linux kernel code: net: gro: clear skb_shinfo(skb)->hwtstamps in napi_reuse_skb()
Problem Details: Some network drivers assume this field is zero after napi_get_frags(). We must clear it in napi_reuse_skb() otherwise the following can happen: 1) A packet is received, and skb_shinfo(skb)->hwtstamps is populated because a bit in the receive descriptor announced hwtstamp availability for this p...
```diff diff --git a/net/core/gro.c b/net/core/gro.c index 5ba4504cfd28..76f9c3712422 100644 --- a/net/core/gro.c +++ b/net/core/gro.c @@ -639,6 +639,8 @@ EXPORT_SYMBOL(gro_receive_skb); static void napi_reuse_skb(struct napi_struct *napi, struct sk_buff *skb) { + struct skb_shared_info *shinfo; + if (unlikely(sk...
aaf043a5688114703ae2c1482b92e7e0754d684e
Analyze and fix the following issue in the Linux kernel code: net/mlx5e: Return 1 instead of 0 in invalid case in mlx5e_mpwrq_umr_entry_size()
Problem Details: When building with Clang 20 or newer, there are some objtool warnings from unexpected fallthroughs to other functions: vmlinux.o: warning: objtool: mlx5e_mpwrq_mtts_per_wqe() falls through to next function mlx5e_mpwrq_max_num_entries() vmlinux.o: warning: objtool: mlx5e_mpwrq_max_log_rq_size() fal...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/params.c b/drivers/net/ethernet/mellanox/mlx5/core/en/params.c index 3692298e10f2..c9bdee9a8b30 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/params.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/params.c @@ -100,7 +100,7 @@ u8 mlx5e_mpwrq_um...
75cea9860aa6b2350d90a8d78fed114d27c7eca2
Analyze and fix the following issue in the Linux kernel code: net: usb: rtl8150: Fix frame padding
Problem Details: TX frames aren't padded and unknown memory is sent into the ether. Theoretically, it isn't even guaranteed that the extra memory exists and can be sent out, which could cause further problems. In practice, I found that plenty of tailroom exists in the skb itself (in my test with ping at least) and skb...
```diff diff --git a/drivers/net/usb/rtl8150.c b/drivers/net/usb/rtl8150.c index 92add3daadbb..278e6cb6f4d9 100644 --- a/drivers/net/usb/rtl8150.c +++ b/drivers/net/usb/rtl8150.c @@ -685,9 +685,16 @@ static netdev_tx_t rtl8150_start_xmit(struct sk_buff *skb, rtl8150_t *dev = netdev_priv(netdev); int count, res; +...
483fc19e9cb1256b6521266a3c62907f5912089a
Analyze and fix the following issue in the Linux kernel code: x86/sgx: Introduce functions to count the sgx_(vepc_)open()
Problem Details: Currently, when SGX is compromised and the microcode update fix is applied, the machine needs to be rebooted to invalidate old SGX crypto-assets and make SGX be in an updated safe state. It's not friendly for the cloud. To avoid having to reboot, a new ENCLS[EUPDATESVN] is introduced to update SGX env...
```diff diff --git a/arch/x86/kernel/cpu/sgx/driver.c b/arch/x86/kernel/cpu/sgx/driver.c index 7f8d1e11dbee..79d6020dfe9c 100644 --- a/arch/x86/kernel/cpu/sgx/driver.c +++ b/arch/x86/kernel/cpu/sgx/driver.c @@ -14,7 +14,7 @@ u64 sgx_attributes_reserved_mask; u64 sgx_xfrm_reserved_mask = ~0x3; u32 sgx_misc_reserved_ma...
2ada9cb1df3f5405a01d013b708b1b0914efccfe
Analyze and fix the following issue in the Linux kernel code: drm/i915: Fix conversion between clock ticks and nanoseconds
Problem Details: When tick values are large, the multiplication by NSEC_PER_SEC is larger than 64 bits and results in bad conversions. The issue is seen in PMU busyness counters that look like they have wrapped around due to bad conversion. i915 PMU implementation returns monotonically increasing counters. If a count ...
```diff diff --git a/drivers/gpu/drm/i915/gt/intel_gt_clock_utils.c b/drivers/gpu/drm/i915/gt/intel_gt_clock_utils.c index 88b147fa5cb1..c90b35881a26 100644 --- a/drivers/gpu/drm/i915/gt/intel_gt_clock_utils.c +++ b/drivers/gpu/drm/i915/gt/intel_gt_clock_utils.c @@ -205,7 +205,7 @@ static u64 div_u64_roundup(u64 nom, u...
1c67c4366955c73debb0704f6793b779ccf0db59
Analyze and fix the following issue in the Linux kernel code: drm/i915/bw: Relocate intel_bw_crtc_min_cdclk()
Problem Details: intel_bw_crtc_min_cdclk() (aka. the thing that deals with what bspec calls "Maximum Pipe Read Bandwidth") doesn't really have anything to do with the rest of intel_bw.c (which is all about SAGV/QGV and memory bandwidth). Move it into intel_crtc.c (for the lack of a better place). And I don't really wa...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_bw.c b/drivers/gpu/drm/i915/display/intel_bw.c index d03da1ed4541..92a060e02cf3 100644 --- a/drivers/gpu/drm/i915/display/intel_bw.c +++ b/drivers/gpu/drm/i915/display/intel_bw.c @@ -827,50 +827,6 @@ void intel_bw_init_hw(struct intel_display *display) icl_get_...
1b1d2fae36544083227086f9705e3bb35f6fe15c
Analyze and fix the following issue in the Linux kernel code: docs/hwmon: Fix broken links warnings in lm90.rst
Problem Details: This patch fixes warnings in Documentation/hwmon/lm90.rst reported when running 'make linkcheckdocs'. On 2011-09-23 National Semiconductors became part of Texas Instruments and national.com is no longer accessible. The datasheet resources for the chips are now available at Texas Instruments website an...
```diff diff --git a/Documentation/hwmon/lm90.rst b/Documentation/hwmon/lm90.rst index 98452eed16d5..79c023521d39 100644 --- a/Documentation/hwmon/lm90.rst +++ b/Documentation/hwmon/lm90.rst @@ -9,7 +9,9 @@ Supported chips: Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e - Datasheet: Publicly a...
a3c4a0a42e61aad1056a3d33fd603c1ae66d4288
Analyze and fix the following issue in the Linux kernel code: sched_ext: fix flag check for deferred callbacks
Problem Details: When scheduling the deferred balance callbacks, check SCX_RQ_BAL_CB_PENDING instead of SCX_RQ_BAL_PENDING. This way schedule_deferred() properly tests whether there is already a pending request for queue_balance_callback() to be invoked at the end of .balance(). Fixes: a8ad873113d3 ("sched_ext: defer ...
```diff diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c index 12c9c3595692..ecb251e883ea 100644 --- a/kernel/sched/ext.c +++ b/kernel/sched/ext.c @@ -792,7 +792,7 @@ static void schedule_deferred(struct rq *rq) return; /* Don't do anything if there already is a deferred operation. */ - if (rq->scx.flags & S...
5a869d017793399fd1d2609ff27e900534173eb3
Analyze and fix the following issue in the Linux kernel code: nvme/tcp: handle tls partially sent records in write_space()
Problem Details: With TLS enabled, records that are encrypted and appended to TLS TX list can fail to see a retry if the underlying TCP socket is busy, for example, hitting an EAGAIN from tcp_sendmsg_locked(). This is not known to the NVMe TCP driver, as the TLS layer successfully generated a record. Typically, the TL...
```diff diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c index 1413788ca7d5..9a96df1a511c 100644 --- a/drivers/nvme/host/tcp.c +++ b/drivers/nvme/host/tcp.c @@ -1081,6 +1081,9 @@ static void nvme_tcp_write_space(struct sock *sk) queue = sk->sk_user_data; if (likely(queue && sk_stream_is_writeable(sk))...
f6fddc6df3fc0cffce329b87927db4eb5989728d
Analyze and fix the following issue in the Linux kernel code: bpf: Fix memory leak in __lookup_instance error path
Problem Details: When __lookup_instance() allocates a func_instance structure but fails to allocate the must_write_set array, it returns an error without freeing the previously allocated func_instance. This causes a memory leak of 192 bytes (sizeof(struct func_instance)) each time this error path is triggered. Fix by ...
```diff diff --git a/kernel/bpf/liveness.c b/kernel/bpf/liveness.c index 3c611aba7f52..1e6538f59a78 100644 --- a/kernel/bpf/liveness.c +++ b/kernel/bpf/liveness.c @@ -195,8 +195,10 @@ static struct func_instance *__lookup_instance(struct bpf_verifier_env *env, return ERR_PTR(-ENOMEM); result->must_write_set = kvca...
0c1999ed33722f85476a248186d6e0eb2bf3dd2a
Analyze and fix the following issue in the Linux kernel code: selftests: arg_parsing: Ensure data is flushed to disk before reading.
Problem Details: test_parse_test_list_file writes some data to /tmp/bpf_arg_parsing_test.XXXXXX and parse_test_list_file() will read the data back. However, after writing data to that file, we forget to call fsync() and it's causing testing failure in my laptop. This patch helps fix it by adding the missing fsync() c...
```diff diff --git a/tools/testing/selftests/bpf/prog_tests/arg_parsing.c b/tools/testing/selftests/bpf/prog_tests/arg_parsing.c index fbf0d9c2f58b..e27d66b75fb1 100644 --- a/tools/testing/selftests/bpf/prog_tests/arg_parsing.c +++ b/tools/testing/selftests/bpf/prog_tests/arg_parsing.c @@ -144,6 +144,9 @@ static void t...
ed80cc4667ac997b84546e6d35f0a0ae525d239c
Analyze and fix the following issue in the Linux kernel code: HID: logitech-hidpp: Add HIDPP_QUIRK_RESET_HI_RES_SCROLL
Problem Details: The Logitech G502 Hero Wireless's high resolution scrolling resets after being unplugged without notifying the driver, causing extremely slow scrolling. The only indication of this is a battery update packet, so add a quirk to detect when the device is unplugged and re-enable the scrolling. Link: htt...
```diff diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c index aaef405a717e..5e763de4b94f 100644 --- a/drivers/hid/hid-logitech-hidpp.c +++ b/drivers/hid/hid-logitech-hidpp.c @@ -75,6 +75,7 @@ MODULE_PARM_DESC(disable_tap_to_click, #define HIDPP_QUIRK_HIDPP_CONSUMER_VENDOR_KEYS BIT(27) ...
1e3e330c07076a0582385bbea029c9cc918fa30d
Analyze and fix the following issue in the Linux kernel code: irqchip: Pass platform device to platform drivers
Problem Details: The IRQCHIP_PLATFORM_DRIVER macros can be used to convert OF irqchip drivers to platform drivers but currently reuse the OF init callback prototype that only takes OF nodes as arguments. This forces drivers to do reverse lookups of their struct devices during probe if they need them for things like dev...
```diff diff --git a/drivers/irqchip/irq-bcm2712-mip.c b/drivers/irqchip/irq-bcm2712-mip.c index 8466646e5a2d..4761974ad650 100644 --- a/drivers/irqchip/irq-bcm2712-mip.c +++ b/drivers/irqchip/irq-bcm2712-mip.c @@ -232,16 +232,12 @@ err_put: return ret; } -static int mip_of_msi_init(struct device_node *node, struc...
c700e7279b29948f5d2aee30df2dbd3124df3b9c
Analyze and fix the following issue in the Linux kernel code: drm/rockchip: dw_hdmi: use correct SCLIN mask for RK3228
Problem Details: In dw_hdmi_rk3228_setup_hpd(), the SCLIN mask incorrectly references the RK3328 variant. This change updates it to the RK3228-specific mask RK3228_HDMI_SCLIN_MSK using FIELD_PREP_WM16, ensuring proper HPD and I2C pin configuration for RK3228. Change: RK3328_HDMI_SCLIN_MSK -> RK3228_HDMI_SCLIN_MSK Fix...
```diff diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c index 7b613997bb50..727cdf768161 100644 --- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c +++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c @@ -361,7 +361,7 @@ static void dw_hdmi_rk3228_setup_hpd(struct dw_hd...
762a3d1ca2cfe9965417d784cd044c702fda4aca
Analyze and fix the following issue in the Linux kernel code: x86/idtentry: Add missing '*' to kernel-doc lines
Problem Details: Fix kernel-doc warnings by adding the missing '*' to each line. Warning: include/asm/idtentry.h:395 bad line: when raised from kernel mode Warning: include/asm/idtentry.h:405 bad line: when raised from user mode Since this is in a kernel-doc block, these lines need a leading " *" on each li...
```diff diff --git a/arch/x86/include/asm/idtentry.h b/arch/x86/include/asm/idtentry.h index abd637e54e94..3218770670d3 100644 --- a/arch/x86/include/asm/idtentry.h +++ b/arch/x86/include/asm/idtentry.h @@ -393,7 +393,7 @@ static __always_inline void __##func(struct pt_regs *regs) /** * DEFINE_IDTENTRY_VC_KERNEL -...
d77daa49085b067137d0adbe3263f75a7ee13a1b
Analyze and fix the following issue in the Linux kernel code: spi: aspeed: fix spelling mistake "triming" -> "trimming"
Problem Details: There is a spelling mistake in a dev_warn message. Fix it. Signed-off-by: Colin Ian King <coking@nvidia.com> Link: https://patch.msgid.link/20251016153000.9142-1-coking@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org>
```diff diff --git a/drivers/spi/spi-aspeed-smc.c b/drivers/spi/spi-aspeed-smc.c index 0c3de371fd39..f3a7189afd51 100644 --- a/drivers/spi/spi-aspeed-smc.c +++ b/drivers/spi/spi-aspeed-smc.c @@ -539,7 +539,7 @@ static int aspeed_spi_trim_window_size(struct aspeed_spi *aspi) } while (total_sz > aspi->ahb_window_size);...
5021ccb44dc6a22a3508316442d1304371ca55db
Analyze and fix the following issue in the Linux kernel code: drm/i915: Reject modes with linetime > 64 usec
Problem Details: Reject modes whose linetime exceeds 64 usec. First reason being that WM_LINETIME is limited to (nearly) 64 usec. Additionally knowing the linetime is bounded will help with determining whether overflows may be a concern during various calculations. I decided to round up, and accept the linetime==64 ...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index 65a7da694ef6..4367ecfab2b3 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -7978,6 +7978,14 @@ enum drm_mode_status intel_mode_valid(stru...
83f81f5499b511552b40d3995a11640d70bd928c
Analyze and fix the following issue in the Linux kernel code: drm/komeda: Convert logging in komeda_crtc.c to drm_* with drm_device parameter
Problem Details: Replace all dev_err(), dev_warn(), dev_info() and DRM_ERROR/WARN/INFO() calls in drivers/gpu/drm/arm/display/komeda/komeda_crtc.c with the corresponding drm_err(), drm_warn(), and drm_info() helpers. The new drm_*() logging functions take a struct drm_device * as the first argument. This allows the DR...
```diff diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c b/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c index 2ad33559a33a..5a66948ffd24 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c +++ b/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c @@ -111,6 +111,7 @@ komeda_crtc_atomic_check(stru...
86404a9e3013d814a772ac407573be5d3cd4ee0d
Analyze and fix the following issue in the Linux kernel code: drm/msm: make sure last_fence is always updated
Problem Details: Update last_fence in the vm-bind path instead of kernel managed path. last_fence is used to wait for work to finish in vm_bind contexts but not used for kernel managed contexts. This fixes a bug where last_fence is not waited on context close leading to faults as resources are freed while in use. Fi...
```diff diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c b/drivers/gpu/drm/msm/msm_gem_submit.c index 3ab3b27134f9..75d9f3574370 100644 --- a/drivers/gpu/drm/msm/msm_gem_submit.c +++ b/drivers/gpu/drm/msm/msm_gem_submit.c @@ -414,6 +414,11 @@ static void submit_attach_object_fences(struct msm_gem_submit *submit) ...
b4789aac9d3441d9f830f0a4022d8dc122d6cab3
Analyze and fix the following issue in the Linux kernel code: drm/msm/a6xx: Fix GMU firmware parser
Problem Details: Current parser logic for GMU firmware assumes a dword aligned payload size for every block. This is not true for all GMU firmwares. So, fix this by using correct 'size' value in the calculation for the offset for the next block's header. Fixes: c6ed04f856a4 ("drm/msm/a6xx: A640/A650 GMU firmware path"...
```diff diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c index fc62fef2fed8..4e6dc16e4a4c 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c @@ -780,6 +780,9 @@ static bool fw_block_mem(struct a6xx_gmu_bo *bo, const struct block_heade...
830d68f2cb8ab6fb798bb9555016709a9e012af0
Analyze and fix the following issue in the Linux kernel code: drm/msm: Fix pgtable prealloc error path
Problem Details: The following splat was reported: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000010 Mem abort info: ESR = 0x0000000096000004 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x04: level 0 transl...
```diff diff --git a/drivers/gpu/drm/msm/msm_iommu.c b/drivers/gpu/drm/msm/msm_iommu.c index 0e18619f96cb..a188617653e8 100644 --- a/drivers/gpu/drm/msm/msm_iommu.c +++ b/drivers/gpu/drm/msm/msm_iommu.c @@ -338,6 +338,8 @@ msm_iommu_pagetable_prealloc_allocate(struct msm_mmu *mmu, struct msm_mmu_preall ret = kmem_c...
9f0fa1801fe4503eb119a4523a59a494768fda5d
Analyze and fix the following issue in the Linux kernel code: gpio: pca953x: enable latch only on edge-triggered inputs
Problem Details: The latched input feature of the pca953x GPIO controller is useful when an input is configured to trigger interrupts on rising or falling edges, because it allows retrieving which edge type caused a given interrupt even if the pin state changes again before the interrupt handler has a chance to run. Bu...
```diff diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c index b46927f55038..9e72439f6c92 100644 --- a/drivers/gpio/gpio-pca953x.c +++ b/drivers/gpio/gpio-pca953x.c @@ -854,10 +854,13 @@ static void pca953x_irq_bus_sync_unlock(struct irq_data *d) int level; if (chip->driver_data & PCA_PCAL) ...
6de1dec1c166c7f7324ce52ccfdf43e2fa743b19
Analyze and fix the following issue in the Linux kernel code: udp: do not use skb_release_head_state() before skb_attempt_defer_free()
Problem Details: Michal reported and bisected an issue after recent adoption of skb_attempt_defer_free() in UDP. The issue here is that skb_release_head_state() is called twice per skb, one time from skb_consume_udp(), then a second time from skb_defer_free_flush() and napi_consume_skb(). As Sabrina suggested, remove...
```diff diff --git a/net/core/skbuff.c b/net/core/skbuff.c index bc12790017b0..6be01454f262 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -7200,6 +7200,7 @@ nodefer: kfree_skb_napi_cache(skb); DEBUG_NET_WARN_ON_ONCE(skb_dst(skb)); DEBUG_NET_WARN_ON_ONCE(skb->destructor); + DEBUG_NET_WARN_ON_ONCE(skb_n...
0b7d9b25e4bc2e478c9d06281a65f930769fca09
Analyze and fix the following issue in the Linux kernel code: spi: airoha: fix reading/writing of flashes with more than one plane per lun
Problem Details: Attaching UBI on the flash with more than one plane per lun will lead to the following error: [ 2.980989] spi-nand spi0.0: Micron SPI NAND was found. [ 2.986309] spi-nand spi0.0: 256 MiB, block size: 128 KiB, page size: 2048, OOB size: 128 [ 2.994978] 2 fixed-partitions partitions found on MT...
```diff diff --git a/drivers/spi/spi-airoha-snfi.c b/drivers/spi/spi-airoha-snfi.c index 8143fbb0cf4e..b78163eaed61 100644 --- a/drivers/spi/spi-airoha-snfi.c +++ b/drivers/spi/spi-airoha-snfi.c @@ -733,8 +733,9 @@ static ssize_t airoha_snand_dirmap_read(struct spi_mem_dirmap_desc *desc, if (err) goto error_dma_un...
20d7b236b78c7ec685a22db5689b9c829975e0c3
Analyze and fix the following issue in the Linux kernel code: spi: airoha: switch back to non-dma mode in the case of error
Problem Details: Current dirmap code does not switch back to non-dma mode in the case of error. This is wrong. This patch fixes dirmap read/write error path. Fixes: a403997c12019 ("spi: airoha: add SPI-NAND Flash controller driver") Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu> Acked-by: Lorenzo ...
```diff diff --git a/drivers/spi/spi-airoha-snfi.c b/drivers/spi/spi-airoha-snfi.c index 0b89dc42545b..8143fbb0cf4e 100644 --- a/drivers/spi/spi-airoha-snfi.c +++ b/drivers/spi/spi-airoha-snfi.c @@ -698,13 +698,13 @@ static ssize_t airoha_snand_dirmap_read(struct spi_mem_dirmap_desc *desc, err = airoha_snand_nfi_co...
edd2e261b1babb92213089b5feadca12e3459322
Analyze and fix the following issue in the Linux kernel code: spi: airoha: add support of dual/quad wires spi modes to exec_op() handler
Problem Details: Booting without this patch and disabled dirmap support results in [ 2.980719] spi-nand spi0.0: Micron SPI NAND was found. [ 2.986040] spi-nand spi0.0: 256 MiB, block size: 128 KiB, page size: 2048, OOB size: 128 [ 2.994709] 2 fixed-partitions partitions found on MTD device spi0.0 [ 3.00107...
```diff diff --git a/drivers/spi/spi-airoha-snfi.c b/drivers/spi/spi-airoha-snfi.c index 043a03cd90a1..0b89dc42545b 100644 --- a/drivers/spi/spi-airoha-snfi.c +++ b/drivers/spi/spi-airoha-snfi.c @@ -192,6 +192,14 @@ #define SPI_NAND_OP_RESET 0xff #define SPI_NAND_OP_DIE_SELECT 0xc2 +/* SNAND FIFO commands */ +#...
4314ffce4eb81a6c18700af1b6e29b6e0c6b9e37
Analyze and fix the following issue in the Linux kernel code: spi: airoha: return an error for continuous mode dirmap creation cases
Problem Details: This driver can accelerate single page operations only, thus continuous reading mode should not be used. Continuous reading will use sizes up to the size of one erase block. This size is much larger than the size of single flash page. Use this difference to identify continuous reading and return an er...
```diff diff --git a/drivers/spi/spi-airoha-snfi.c b/drivers/spi/spi-airoha-snfi.c index dbe640986825..043a03cd90a1 100644 --- a/drivers/spi/spi-airoha-snfi.c +++ b/drivers/spi/spi-airoha-snfi.c @@ -618,6 +618,10 @@ static int airoha_snand_dirmap_create(struct spi_mem_dirmap_desc *desc) if (desc->info.offset + desc->...
86f54f9b6c17d6567c69e3a6fed52fdf5d7dbe93
Analyze and fix the following issue in the Linux kernel code: slab: reset slab->obj_ext when freeing and it is OBJEXTS_ALLOC_FAIL
Problem Details: If obj_exts allocation failed, slab->obj_exts is set to OBJEXTS_ALLOC_FAIL, But we do not clear it when freeing the slab. Since OBJEXTS_ALLOC_FAIL and MEMCG_DATA_OBJEXTS currently share the same bit position, during the release of the associated folio, a VM_BUG_ON_FOLIO() check in folio_memcg_kmem() is...
```diff diff --git a/mm/slub.c b/mm/slub.c index 13ae4491136a..a8fcc7e6f25a 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -2170,8 +2170,15 @@ static inline void free_slab_obj_exts(struct slab *slab) struct slabobj_ext *obj_exts; obj_exts = slab_obj_exts(slab); - if (!obj_exts) + if (!obj_exts) { + /* + * If obj_ex...
5801e65206b065b0b2af032f7f1eef222aa2fd83
Analyze and fix the following issue in the Linux kernel code: drm/sched: Fix potential double free in drm_sched_job_add_resv_dependencies
Problem Details: When adding dependencies with drm_sched_job_add_dependency(), that function consumes the fence reference both on success and failure, so in the latter case the dma_fence_put() on the error path (xarray failed to expand) is a double free. Interestingly this bug appears to have been present ever since c...
```diff diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c index 46119aacb809..c39f0245e3a9 100644 --- a/drivers/gpu/drm/scheduler/sched_main.c +++ b/drivers/gpu/drm/scheduler/sched_main.c @@ -965,13 +965,14 @@ int drm_sched_job_add_resv_dependencies(struct drm_sched_job *job, ...
ea138a607709bf72c162f62d2a670fe899d73daa
Analyze and fix the following issue in the Linux kernel code: RISC-V: KVM: Fix check for local interrupts on riscv32
Problem Details: To set all 64 bits in the mask on a 32-bit system, the constant must have type `unsigned long long`. Fixes: 6b1e8ba4bac4 ("RISC-V: KVM: Use bitmap for irqs_pending and irqs_pending_mask") Signed-off-by: Samuel Holland <samuel.holland@sifive.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Link...
```diff diff --git a/arch/riscv/kvm/vcpu.c b/arch/riscv/kvm/vcpu.c index bccb919ca615..5ce35aba6069 100644 --- a/arch/riscv/kvm/vcpu.c +++ b/arch/riscv/kvm/vcpu.c @@ -212,7 +212,7 @@ int kvm_cpu_has_pending_timer(struct kvm_vcpu *vcpu) int kvm_arch_vcpu_runnable(struct kvm_vcpu *vcpu) { - return (kvm_riscv_vcpu_has...
8f8ef09fcf6a3b00369bfc704e8f68d7474eca94
Analyze and fix the following issue in the Linux kernel code: drm/i915/panic: fix panic structure allocation memory leak
Problem Details: Separating the panic allocation from framebuffer allocation in commit 729c5f7ffa83 ("drm/{i915,xe}/panic: move framebuffer allocation where it belongs") failed to deallocate the panic structure anywhere. The fix is two-fold. First, free the panic structure in intel_user_framebuffer_destroy() in the ge...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_fb.c b/drivers/gpu/drm/i915/display/intel_fb.c index 9c256a2805e4..3958628c73e9 100644 --- a/drivers/gpu/drm/i915/display/intel_fb.c +++ b/drivers/gpu/drm/i915/display/intel_fb.c @@ -2114,6 +2114,7 @@ static void intel_user_framebuffer_destroy(struct drm_framebuff...
73cbcfe255f7edca915d978a7d1b0a11f2d62812
Analyze and fix the following issue in the Linux kernel code: sched/topology,x86: Fix build warning
Problem Details: A compile warning slipped through: arch/x86/kernel/smpboot.c:548:5: warning: no previous prototype for function 'arch_sched_node_distance' [-Wmissing-prototypes] Fixes: 4d6dd05d07d0 ("sched/topology: Fix sched domain build error for GNR, CWF in SNC-3 mode") Reported-by: Borislav Petkov <bp@alien8....
```diff diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h index 21041898157a..df943881f15b 100644 --- a/arch/x86/include/asm/topology.h +++ b/arch/x86/include/asm/topology.h @@ -325,4 +325,6 @@ static inline void freq_invariance_set_perf_ratio(u64 ratio, bool turbo_disabled extern void arc...
4bd451f4c2851eee7b6e17bb6fd6c9caaadbdc18
Analyze and fix the following issue in the Linux kernel code: net: fbnic: Fix page chunking logic when PAGE_SIZE > 4K
Problem Details: The HW always works on a 4K page size. When the OS supports larger pages, we fragment them across multiple BDQ descriptors. We were not properly incrementing the descriptor, which resulted in us specifying the last chunks id/addr and then 15 zero descriptors. This would cause packet loss and driver cra...
```diff diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c b/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c index b1e8ce89870f..57e18a68f5d2 100644 --- a/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c +++ b/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c @@ -887,6 +887,7 @@ static void fbnic_bd_prep(struct fbnic_ring *...
9b685058ca936752285c5520d351b828312ac965
Analyze and fix the following issue in the Linux kernel code: irqchip/qcom-irq-combiner: Fix section mismatch
Problem Details: Platform drivers can be probed after their init sections have been discarded so the probe callback must not live in init. Fixes: f20cc9b00c7b ("irqchip/qcom: Add IRQ combiner driver") Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
```diff diff --git a/drivers/irqchip/qcom-irq-combiner.c b/drivers/irqchip/qcom-irq-combiner.c index 18e696dc7f4d..9308088773be 100644 --- a/drivers/irqchip/qcom-irq-combiner.c +++ b/drivers/irqchip/qcom-irq-combiner.c @@ -222,7 +222,7 @@ static int get_registers(struct platform_device *pdev, struct combiner *comb) r...
f798bdb9aa81c425184f92e3d0b44d3b53d10da7
Analyze and fix the following issue in the Linux kernel code: irqchip/starfive-jh8100: Fix section mismatch
Problem Details: Platform drivers can be probed after their init sections have been discarded so the irqchip init callback must not live in init. Fixes: e4e535036173 ("irqchip: Add StarFive external interrupt controller") Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de...
```diff diff --git a/drivers/irqchip/irq-starfive-jh8100-intc.c b/drivers/irqchip/irq-starfive-jh8100-intc.c index 2460798ec158..117f2c651ebd 100644 --- a/drivers/irqchip/irq-starfive-jh8100-intc.c +++ b/drivers/irqchip/irq-starfive-jh8100-intc.c @@ -114,8 +114,7 @@ static void starfive_intc_irq_handler(struct irq_desc...
5b338fbb2b5b21d61a9eaba14dcf43108de30258
Analyze and fix the following issue in the Linux kernel code: irqchip/renesas-rzg2l: Fix section mismatch
Problem Details: Platform drivers can be probed after their init sections have been discarded so the irqchip init callbacks must not live in init. Fixes: d011c022efe27579 ("irqchip/renesas-rzg2l: Add support for RZ/Five SoC") Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Thomas Gleixner <tglx@linutroni...
```diff diff --git a/drivers/irqchip/irq-renesas-rzg2l.c b/drivers/irqchip/irq-renesas-rzg2l.c index 2a54adeb4cc7..12b6eb150301 100644 --- a/drivers/irqchip/irq-renesas-rzg2l.c +++ b/drivers/irqchip/irq-renesas-rzg2l.c @@ -597,14 +597,12 @@ static int rzg2l_irqc_common_init(struct device_node *node, struct device_node ...
64acfd8e680ff8992c101fe19aadb112ce551072
Analyze and fix the following issue in the Linux kernel code: irqchip/imx-mu-msi: Fix section mismatch
Problem Details: Platform drivers can be probed after their init sections have been discarded so the irqchip init callbacks must not live in init. Fixes: 70afdab904d2 ("irqchip: Add IMX MU MSI controller driver") Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
```diff diff --git a/drivers/irqchip/irq-imx-mu-msi.c b/drivers/irqchip/irq-imx-mu-msi.c index d2a4e8a61a42..41df168aa7da 100644 --- a/drivers/irqchip/irq-imx-mu-msi.c +++ b/drivers/irqchip/irq-imx-mu-msi.c @@ -296,9 +296,8 @@ static const struct imx_mu_dcfg imx_mu_cfg_imx8ulp = { }, }; -static int __init imx_m...
bbe1775924478e95372c2f896064ab6446000713
Analyze and fix the following issue in the Linux kernel code: irqchip/irq-brcmstb-l2: Fix section mismatch
Problem Details: Platform drivers can be probed after their init sections have been discarded so the irqchip init callbacks must not live in init. Fixes: 51d9db5c8fbb ("irqchip/irq-brcmstb-l2: Switch to IRQCHIP_PLATFORM_DRIVER") Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Thomas Gleixner <tglx@linutr...
```diff diff --git a/drivers/irqchip/irq-brcmstb-l2.c b/drivers/irqchip/irq-brcmstb-l2.c index 1bec5b2cd3f0..53e67c6c01f7 100644 --- a/drivers/irqchip/irq-brcmstb-l2.c +++ b/drivers/irqchip/irq-brcmstb-l2.c @@ -138,10 +138,8 @@ static void brcmstb_l2_intc_resume(struct irq_data *d) irq_reg_writel(gc, ~b->saved_mask, ...
bfc0c5beab1fde843677923cf008f41d583c980a
Analyze and fix the following issue in the Linux kernel code: irqchip/irq-bcm7120-l2: Fix section mismatch
Problem Details: Platform drivers can be probed after their init sections have been discarded so the irqchip init callbacks must not live in init. Fixes: 3ac268d5ed22 ("irqchip/irq-bcm7120-l2: Switch to IRQCHIP_PLATFORM_DRIVER") Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Thomas Gleixner <tglx@linutr...
```diff diff --git a/drivers/irqchip/irq-bcm7120-l2.c b/drivers/irqchip/irq-bcm7120-l2.c index ff22c3104401..b6c85560c42e 100644 --- a/drivers/irqchip/irq-bcm7120-l2.c +++ b/drivers/irqchip/irq-bcm7120-l2.c @@ -143,8 +143,7 @@ static int bcm7120_l2_intc_init_one(struct device_node *dn, return 0; } -static int __in...
e9db5332caaf4789ae3bafe72f61ad8e6e0c2d81
Analyze and fix the following issue in the Linux kernel code: irqchip/irq-bcm7038-l1: Fix section mismatch
Problem Details: Platform drivers can be probed after their init sections have been discarded so the irqchip init callback must not live in init. Fixes: c057c799e379 ("irqchip/irq-bcm7038-l1: Switch to IRQCHIP_PLATFORM_DRIVER") Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Thomas Gleixner <tglx@linutro...
```diff diff --git a/drivers/irqchip/irq-bcm7038-l1.c b/drivers/irqchip/irq-bcm7038-l1.c index 04fac0cc857f..eda33bd5d080 100644 --- a/drivers/irqchip/irq-bcm7038-l1.c +++ b/drivers/irqchip/irq-bcm7038-l1.c @@ -219,9 +219,8 @@ static int bcm7038_l1_set_affinity(struct irq_data *d, } #endif -static int __init bcm703...
a8452d1d59d46066051e676d5daa472cd08cb304
Analyze and fix the following issue in the Linux kernel code: irqchip/bcm2712-mip: Fix section mismatch
Problem Details: Platform drivers can be probed after their init sections have been discarded so the irqchip init callback must not live in init. Fixes: 32c6c054661a ("irqchip: Add Broadcom BCM2712 MSI-X interrupt controller") Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Thomas Gleixner <tglx@linutron...
```diff diff --git a/drivers/irqchip/irq-bcm2712-mip.c b/drivers/irqchip/irq-bcm2712-mip.c index 256c2d59f717..8466646e5a2d 100644 --- a/drivers/irqchip/irq-bcm2712-mip.c +++ b/drivers/irqchip/irq-bcm2712-mip.c @@ -232,7 +232,7 @@ err_put: return ret; } -static int __init mip_of_msi_init(struct device_node *node, ...
0435bcc4e5858c632c1b6d5afa637580d9779890
Analyze and fix the following issue in the Linux kernel code: irqchip/bcm2712-mip: Fix OF node reference imbalance
Problem Details: The init callback must not decrement the reference count of the provided irqchip OF node. This should not cause any trouble currently, but if the driver ever starts probe deferring it could lead to warnings about reference underflow and saturation. Fixes: 32c6c054661a ("irqchip: Add Broadcom BCM2712 ...
```diff diff --git a/drivers/irqchip/irq-bcm2712-mip.c b/drivers/irqchip/irq-bcm2712-mip.c index 9bd7bc0bf6d5..256c2d59f717 100644 --- a/drivers/irqchip/irq-bcm2712-mip.c +++ b/drivers/irqchip/irq-bcm2712-mip.c @@ -239,7 +239,6 @@ static int __init mip_of_msi_init(struct device_node *node, struct device_node * int re...
c6fceaf166479c05f7d3158ef08e78ae3e3dfa23
Analyze and fix the following issue in the Linux kernel code: ALSA: usb-audio: fix vendor quirk for Logitech H390
Problem Details: Vendor quirk QUIRK_FLAG_CTL_MSG_DELAY_1M was inadvertently missing when adding quirk for Logitech H390. Add it back. Fixes: 2b929b6eec0c ("ALSA: usb-audio: add mixer_playback_min_mute quirk for Logitech H390") Signed-off-by: Pauli Virtanen <pav@iki.fi> Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c index dac469a8d07a..71638e6dfb20 100644 --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c @@ -2183,6 +2183,7 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = { DEVICE_FLG(0x046d, 0x09a4, /* Logitech QuickCam E 3500 */ QUIRK_FLA...
abfc01077df66593f128d966fdad1d042facc9ac
Analyze and fix the following issue in the Linux kernel code: sched: Fix do_set_cpus_allowed() locking
Problem Details: All callers of do_set_cpus_allowed() only take p->pi_lock, which is not sufficient to actually change the cpumask. Again, this is mostly ok in these cases, but it results in unnecessarily complicated reasoning. Furthermore, there is no reason what so ever to not just take all the required locks, so do...
```diff diff --git a/kernel/kthread.c b/kernel/kthread.c index 31b072e8d427..832bd2afecc6 100644 --- a/kernel/kthread.c +++ b/kernel/kthread.c @@ -593,18 +593,16 @@ EXPORT_SYMBOL(kthread_create_on_node); static void __kthread_bind_mask(struct task_struct *p, const struct cpumask *mask, unsigned int state) { - unsig...
942b8db965006cf655d356162f7091a9238da94e
Analyze and fix the following issue in the Linux kernel code: sched: Fix migrate_disable_switch() locking
Problem Details: For some reason migrate_disable_switch() was more complicated than it needs to be, resulting in mind bending locking of dubious quality. Recognise that migrate_disable_switch() must be called before a context switch, but any place before that switch is equally good. Since the current place results in ...
```diff diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 4a4dbce77bd7..f2d16d10516a 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -2346,10 +2346,10 @@ static void migrate_disable_switch(struct rq *rq, struct task_struct *p) if (p->cpus_ptr != &p->cpus_mask) return; - /* - * Violates ...
6455ad5346c9cf755fa9dda6e326c4028fb3c853
Analyze and fix the following issue in the Linux kernel code: sched: Move sched_class::prio_changed() into the change pattern
Problem Details: Move sched_class::prio_changed() into the change pattern. And while there, extend it with sched_class::get_prio() in order to fix the deadline sitation. Suggested-by: Tejun Heo <tj@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Juri Lelli <juri.lelli@redhat.com>...
```diff diff --git a/kernel/sched/core.c b/kernel/sched/core.c index bd2c551de6d7..4a4dbce77bd7 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -2169,12 +2169,6 @@ inline int task_curr(const struct task_struct *p) return cpu_curr(task_cpu(p)) == p; } -void check_prio_changed(struct rq *rq, struct tas...
4d6dd05d07d00bc3bd91183dab4d75caa8018db9
Analyze and fix the following issue in the Linux kernel code: sched/topology: Fix sched domain build error for GNR, CWF in SNC-3 mode
Problem Details: It is possible for Granite Rapids (GNR) and Clearwater Forest (CWF) to have up to 3 dies per package. When sub-numa cluster (SNC-3) is enabled, each die will become a separate NUMA node in the package with different distances between dies within the same package. For example, on GNR, we see the follow...
```diff diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index eb289abece23..5709c9cab195 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c @@ -515,6 +515,76 @@ static void __init build_sched_topology(void) set_sched_topology(topology); } +#ifdef CONFIG_NUMA +static int sched...
79104becf42baeeb4a3f2b106f954b9fc7c10a3c
Analyze and fix the following issue in the Linux kernel code: sched/fair: Forfeit vruntime on yield
Problem Details: If a task yields, the scheduler may decide to pick it again. The task in turn may decide to yield immediately or shortly after, leading to a tight loop of yields. If there's another runnable task as this point, the deadline will be increased by the slice at each loop. This can cause the deadline to ru...
```diff diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index bc0b7ce8a65d..00f9d6c05d4c 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -9007,7 +9007,19 @@ static void yield_task_fair(struct rq *rq) */ rq_clock_skip_update(rq); - se->deadline += calc_delta_fair(se->slice, se); + /* + * For...
45e1dccc0653c50e377dae57ef086a8d0f71061d
Analyze and fix the following issue in the Linux kernel code: x86/insn: Simplify for_each_insn_prefix()
Problem Details: Use the new-found freedom of allowing variable declarions inside for() to simplify the for_each_insn_prefix() iterator to no longer need an external temporary. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
```diff diff --git a/arch/x86/boot/compressed/sev-handle-vc.c b/arch/x86/boot/compressed/sev-handle-vc.c index 7530ad8b768b..030001b46554 100644 --- a/arch/x86/boot/compressed/sev-handle-vc.c +++ b/arch/x86/boot/compressed/sev-handle-vc.c @@ -29,11 +29,10 @@ bool insn_has_rep_prefix(struct insn *insn) { insn_byte_t...
682505a0fce602b1634cf0a2ea76d017b60b4c81
Analyze and fix the following issue in the Linux kernel code: drm/i915/display: Add missing clock to C10 PHY state compute/HW readout
Problem Details: Clock value is missing from C10 hw readout stage. Let's fix this. Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Mika Kahola <mika.kahola@intel.com> Link: https://lore.kernel.org/r/20251015125446.3931198-8-mika.kahola@intel.com
```diff diff --git a/drivers/gpu/drm/i915/display/intel_cx0_phy.c b/drivers/gpu/drm/i915/display/intel_cx0_phy.c index f8c1338f9053..a74c1be225ac 100644 --- a/drivers/gpu/drm/i915/display/intel_cx0_phy.c +++ b/drivers/gpu/drm/i915/display/intel_cx0_phy.c @@ -2103,6 +2103,9 @@ static int intel_c10pll_calc_state(struct i...
938a3b2252a2565f4b78dc9281b93ad71593fe5f
Analyze and fix the following issue in the Linux kernel code: drm/i915/display: Fix PHY_C20_VDR_HDMI_RATE programming
Problem Details: The PHY_C20_VDR_HDMI_RATE registers 7:2 bits are reserved and they are not specified as a must-be-zero field. Accordingly this reserved field shouldn't be zeroed; to ensure that use an RMW to update the PHY_C20_HDMI_RATE field (which is bits 1:0 of the register). Reviewed-by: Luca Coelho <luciano.coel...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_cx0_phy.c b/drivers/gpu/drm/i915/display/intel_cx0_phy.c index 6e49659d2f17..f8c1338f9053 100644 --- a/drivers/gpu/drm/i915/display/intel_cx0_phy.c +++ b/drivers/gpu/drm/i915/display/intel_cx0_phy.c @@ -2714,9 +2714,10 @@ static void intel_c20_pll_program(struct i...