Pavel Machek
2017-Sep-23 19:04 UTC
[Nouveau] drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c: broken emergency poweroff handling
Hi! Not only it is unneccessarily complex, it is also broken; GFP_ATOMIC allocation can fail.. and then you fail to shut down the machine. Someone please fix this. Thanks, Pavel --- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c @@ -120,6 +120,11 @@ nvkm_therm_sensor_event(struct nvkm_therm *therm, enum nvkm_therm_thrs thrs, struct work_struct *work; work = kmalloc(sizeof(*work), GFP_ATOMIC); + /* FIXME: + 1) this is total overkill, orderly_poweroff() already + uses schedule_work internally + 2) it would be good to at least printk what is going on + */ if (work) { INIT_WORK(work, nv_poweroff_work); schedule_work(work); -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 181 bytes Desc: Digital signature URL: <https://lists.freedesktop.org/archives/nouveau/attachments/20170923/23455290/attachment.sig>
Reasonably Related Threads
- noveau: emergency shutdown handling is overcomplex and broken
- noveau: emergency shutdown handling is overcomplex and broken
- [PATCH] drm/nouveau/therm: fix spelling mistake on array thresolds
- [RFC PATCH 01/29] therm: split return code and value in nvkm_get_temp
- [PATCH 03/32] therm: Split return code and value in nvkm_get_temp