All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: bskeggs@redhat.com, airlied@linux.ie,
	dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Subject: noveau: emergency shutdown handling is overcomplex and broken
Date: Tue, 25 Oct 2016 12:50:50 +0200	[thread overview]
Message-ID: <20161025105050.GA20923@amd> (raw)

[-- Attachment #1: Type: text/plain, Size: 948 bytes --]


diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c
index b9703c0..adb1deb 100644
--- 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);

GFP_ATOMIC is not reliable. Plus, see the fixme.

Best regards,
									Pavel
									
-- 
(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 --]

             reply	other threads:[~2016-10-25 10:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-25 10:50 Pavel Machek [this message]
2016-10-25 11:09 ` [Nouveau] noveau: emergency shutdown handling is overcomplex and broken Karol Herbst
2016-10-25 11:09   ` Karol Herbst
2016-10-25 11:13   ` [Nouveau] " Pavel Machek
2016-10-25 11:13     ` Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161025105050.GA20923@amd \
    --to=pavel@ucw.cz \
    --cc=airlied@linux.ie \
    --cc=bskeggs@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nouveau@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.