* drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c: broken emergency poweroff handling
@ 2017-09-23 19:04 Pavel Machek
0 siblings, 0 replies; only message in thread
From: Pavel Machek @ 2017-09-23 19:04 UTC (permalink / raw)
To: bskeggs, airlied, colin.king, martin.peres, dri-devel, nouveau,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1122 bytes --]
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
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-09-23 19:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-23 19:04 drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c: broken emergency poweroff handling Pavel Machek
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.