- Fix NULL pointer access when the cooling device transition stats
table failed to allocate due to a big number of states (Manaf Meethalavalappu Pallikunhi). -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEGn3N4YVz0WNVyHskqDIjiipP6E8FAmBRxJ4ACgkQqDIjiipP 6E+84AgAmp7T+2VaQjukte76KH0gsg5v1mpXT+LK2HUC9ofH76eHTwY7M/6IyLmt 1V5CBetBe393ZvFn3SF2o5ipwnRWufHLgyoTO+AYLTWvJyBQC83rLUjUGqozMpOU XFO1kLUvxYso//FS6wC3//Dfs8oMLx6SBY7k2qPTG2p0sahNC0QzSar/5Nbls9Ev YEEpNzvd+FVMNSyZiYrMYlZv6VcFEn7ZPZLLj24Eut7A61Pbg8fc6iV8Ku26roiK AQs5iZ0eHyzz1uW9I6obi+77OB9Fk8tpJJonlnyzZ2diMFbeaIawbhjzBMWzUgeb rIJizEsNzlZHqre8ADbZ8yRgpITvcQ== =rftQ -----END PGP SIGNATURE----- Merge tag 'thermal-v5.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux Pull thermal framework fix from Daniel Lezcano: "Fix NULL pointer access when the cooling device transition stats table failed to allocate due to a big number of states (Manaf Meethalavalappu Pallikunhi)" * tag 'thermal-v5.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux: thermal/core: Add NULL pointer check before using cooling device stats
This commit is contained in:
commit
35d8c39d0e
|
@ -674,6 +674,9 @@ void thermal_cooling_device_stats_update(struct thermal_cooling_device *cdev,
|
|||
{
|
||||
struct cooling_dev_stats *stats = cdev->stats;
|
||||
|
||||
if (!stats)
|
||||
return;
|
||||
|
||||
spin_lock(&stats->lock);
|
||||
|
||||
if (stats->state == new_state)
|
||||
|
|
Loading…
Reference in New Issue