From: Pavel Machek <pavel@ucw.cz>
To: bskeggs@redhat.com, airlied@linux.ie, colin.king@canonical.com,
martin.peres@free.fr, dri-devel@lists.freedesktop.org,
nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c: broken emergency poweroff handling
Date: Sat, 23 Sep 2017 21:04:06 +0200 [thread overview]
Message-ID: <20170923190406.GA21587@amd> (raw)
[-- 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 --]
reply other threads:[~2017-09-23 19:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20170923190406.GA21587@amd \
--to=pavel@ucw.cz \
--cc=airlied@linux.ie \
--cc=bskeggs@redhat.com \
--cc=colin.king@canonical.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.peres@free.fr \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).