Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'thermal-6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull thermal control fixes from Rafael Wysocki:
"Fix two issues introduced recently and one driver problem leading to a
NULL pointer dereference in some cases.

Specifics:

- Add missing EXPORT_SYMBOL_GPL in the thermal core and add back the
required 'trips' property to the thermal zone DT bindings (Daniel
Lezcano)

- Prevent the int340x_thermal driver from crashing when a package
with a buffer of 0 length is returned by an ACPI control method
evaluated by it (Lee, Chun-Yi)"

* tag 'thermal-6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
thermal/int340x_thermal: handle data_vault when the value is ZERO_SIZE_PTR
dt-bindings: thermal: Fix missing required property
thermal/core: Add missing EXPORT_SYMBOL_GPL

+7 -4
+1
Documentation/devicetree/bindings/thermal/thermal-zones.yaml
··· 214 214 - polling-delay 215 215 - polling-delay-passive 216 216 - thermal-sensors 217 + - trips 217 218 218 219 additionalProperties: false 219 220
+5 -4
drivers/thermal/intel/int340x_thermal/int3400_thermal.c
··· 527 527 priv->data_vault = kmemdup(obj->package.elements[0].buffer.pointer, 528 528 obj->package.elements[0].buffer.length, 529 529 GFP_KERNEL); 530 - if (!priv->data_vault) 530 + if (ZERO_OR_NULL_PTR(priv->data_vault)) 531 531 goto out_free; 532 532 533 533 bin_attr_data_vault.private = priv->data_vault; ··· 597 597 goto free_imok; 598 598 } 599 599 600 - if (priv->data_vault) { 600 + if (!ZERO_OR_NULL_PTR(priv->data_vault)) { 601 601 result = sysfs_create_group(&pdev->dev.kobj, 602 602 &data_attribute_group); 603 603 if (result) ··· 615 615 free_sysfs: 616 616 cleanup_odvp(priv); 617 617 if (priv->data_vault) { 618 - sysfs_remove_group(&pdev->dev.kobj, &data_attribute_group); 618 + if (!ZERO_OR_NULL_PTR(priv->data_vault)) 619 + sysfs_remove_group(&pdev->dev.kobj, &data_attribute_group); 619 620 kfree(priv->data_vault); 620 621 } 621 622 free_uuid: ··· 648 647 if (!priv->rel_misc_dev_res) 649 648 acpi_thermal_rel_misc_device_remove(priv->adev->handle); 650 649 651 - if (priv->data_vault) 650 + if (!ZERO_OR_NULL_PTR(priv->data_vault)) 652 651 sysfs_remove_group(&pdev->dev.kobj, &data_attribute_group); 653 652 sysfs_remove_group(&pdev->dev.kobj, &uuid_attribute_group); 654 653 sysfs_remove_group(&pdev->dev.kobj, &imok_attribute_group);
+1
drivers/thermal/thermal_core.c
··· 1329 1329 kfree(tz); 1330 1330 return ERR_PTR(result); 1331 1331 } 1332 + EXPORT_SYMBOL_GPL(thermal_zone_device_register_with_trips); 1332 1333 1333 1334 struct thermal_zone_device *thermal_zone_device_register(const char *type, int ntrips, int mask, 1334 1335 void *devdata, struct thermal_zone_device_ops *ops,