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-v5.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux

Pull thermal fixes from Daniel Lezcano:

- Fix thermal shutdown after a suspend/resume due to a wrong TCC value
restored on Intel platform (Antoine Tenart)

- Fix potential buffer overflow when building the list of policies. The
buffer size is not updated after writing to it (Dan Carpenter)

- Fix wrong check against IS_ERR instead of NULL (Ansuel Smith)

* tag 'thermal-v5.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux:
thermal/drivers/tsens: Fix wrong check for tzd in irq handlers
thermal/core: Potential buffer overflow in thermal_build_list_of_policies()
thermal/drivers/int340x: Do not set a wrong tcc offset on resume

+8 -8
+3 -2
drivers/thermal/intel/int340x_thermal/processor_thermal_device.c
··· 107 107 return 0; 108 108 } 109 109 110 - static unsigned int tcc_offset_save; 110 + static int tcc_offset_save = -1; 111 111 112 112 static ssize_t tcc_offset_degree_celsius_store(struct device *dev, 113 113 struct device_attribute *attr, const char *buf, ··· 352 352 proc_dev = dev_get_drvdata(dev); 353 353 proc_thermal_read_ppcc(proc_dev); 354 354 355 - tcc_offset_update(tcc_offset_save); 355 + if (tcc_offset_save >= 0) 356 + tcc_offset_update(tcc_offset_save); 356 357 357 358 return 0; 358 359 }
+2 -2
drivers/thermal/qcom/tsens.c
··· 417 417 const struct tsens_sensor *s = &priv->sensor[i]; 418 418 u32 hw_id = s->hw_id; 419 419 420 - if (IS_ERR(s->tzd)) 420 + if (!s->tzd) 421 421 continue; 422 422 if (!tsens_threshold_violated(priv, hw_id, &d)) 423 423 continue; ··· 467 467 const struct tsens_sensor *s = &priv->sensor[i]; 468 468 u32 hw_id = s->hw_id; 469 469 470 - if (IS_ERR(s->tzd)) 470 + if (!s->tzd) 471 471 continue; 472 472 if (!tsens_threshold_violated(priv, hw_id, &d)) 473 473 continue;
+3 -4
drivers/thermal/thermal_core.c
··· 222 222 { 223 223 struct thermal_governor *pos; 224 224 ssize_t count = 0; 225 - ssize_t size = PAGE_SIZE; 226 225 227 226 mutex_lock(&thermal_governor_lock); 228 227 229 228 list_for_each_entry(pos, &thermal_governor_list, governor_list) { 230 - size = PAGE_SIZE - count; 231 - count += scnprintf(buf + count, size, "%s ", pos->name); 229 + count += scnprintf(buf + count, PAGE_SIZE - count, "%s ", 230 + pos->name); 232 231 } 233 - count += scnprintf(buf + count, size, "\n"); 232 + count += scnprintf(buf + count, PAGE_SIZE - count, "\n"); 234 233 235 234 mutex_unlock(&thermal_governor_lock); 236 235