From: ebiederm@xmission.com (Eric W. Biederman)
To: Feng Hong <hongfeng@marvell.com>
Cc: "akpm\@linux-foundation.org" <akpm@linux-foundation.org>,
"gorcunov\@openvz.org" <gorcunov@openvz.org>,
"keescook\@chromium.org" <keescook@chromium.org>,
"serge.hallyn\@canonical.com" <serge.hallyn@canonical.com>,
"linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] poweroff: fix bug in orderly_poweroff
Date: Tue, 18 Sep 2012 22:58:24 -0700 [thread overview]
Message-ID: <87a9wma70f.fsf@xmission.com> (raw)
In-Reply-To: <E62404B31D39064FBDD0B843ADF05A7D2D395FC749@SC-VEXCH4.marvell.com> (Feng Hong's message of "Tue, 18 Sep 2012 22:07:04 -0700")
Feng Hong <hongfeng@marvell.com> writes:
> Hi, Eric
>
> 1. We are developing on an Android phone platform, we use thermal
> framework to monitor the temperature, when the temperature above like
> 110 degree, thermal framework will use orderly_shutdown to shutdown
> phone, however, on Android platform there is no " /sbin/poweroff " cmd
> ready . Then we want "fail ret" to trigger force shutdown (use
> kernel_power_off), but always we get "suc ret"
> 2. Here the caller just wait for "poweroff" userspace application, if
> it block the called, then it's the "poweroff" problem itself
> 3. As in the original orderly_shutdown design, we must get the right
> "ret", if this ret is always "0", then it obey orderly_poweroff design
> goal. Step 2: force shutdown is always useless code.
That sounds like a clear case that we need to change it to
UMH_WAIT_EXEC.
Changing it to UMH_WAIT_PROC seems much more dangerous.
Eric
next prev parent reply other threads:[~2012-09-19 5:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-19 3:27 hongfeng
2012-09-19 3:42 ` Kees Cook
2012-09-19 4:46 ` Eric W. Biederman
2012-09-19 5:07 ` Feng Hong
2012-09-19 5:58 ` Eric W. Biederman [this message]
2012-09-19 6:26 ` Feng Hong
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=87a9wma70f.fsf@xmission.com \
--to=ebiederm@xmission.com \
--cc=akpm@linux-foundation.org \
--cc=gorcunov@openvz.org \
--cc=hongfeng@marvell.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=serge.hallyn@canonical.com \
/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
Powered by JetHome