All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel J Blueman <daniel.blueman@gmail.com>
To: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: [2.6.35-rc3] reboot mutex 'bug'...
Date: Mon, 14 Jun 2010 16:16:34 +0100	[thread overview]
Message-ID: <AANLkTimDcTnyEPmt2ZcCM1UWtn4AYKotiqyjobJApkO7@mail.gmail.com> (raw)

When halting 2.6.35-rc3 compiled on ARM with debugging, the kernel
warns [1] about the reboot_mutex being taken at kernel/sys.c:392 [2]
and held across do_exit() since kernel_power_off() doesn't necessarily
stop execution.

Does it make sense to annotate the reboot_mutex lock or is another
approach suggested?

Daniel

--- [1]

=====================================
[ BUG: lock held at task exit time! ]
-------------------------------------
halt/3874 is exiting with locks still held!
1 lock held by halt/3874:
 #0:  (reboot_mutex){+.+...}, at: [<c0070424>] sys_reboot+0x98/0x1c4

stack backtrace:
[<c003ab58>] (unwind_backtrace+0x0/0xe8) from [<c04ba3f0>]
(dump_stack+0x18/0x1c)
[<c04ba3f0>] (dump_stack+0x18/0x1c) from [<c008aea8>]
(debug_check_no_locks_held+0x74/)
[<c008aea8>] (debug_check_no_locks_held+0x74/0x90) from [<c0063dfc>]
(do_exit+0x570/0x)
[<c0063dfc>] (do_exit+0x570/0x5ec) from [<c00704a8>] (sys_reboot+0x11c/0x1c4)
[<c00704a8>] (sys_reboot+0x11c/0x1c4) from [<c0036040>]
(ret_fast_syscall+0x0/0x3c)

--- [2] kernel/sys.c

SYSCALL_DEFINE4(reboot, int, magic1, int, magic2, unsigned int, cmd,
                void __user *, arg)
{
...
        mutex_lock(&reboot_mutex);
...
        case LINUX_REBOOT_CMD_POWER_OFF:
                kernel_power_off();
                do_exit(0);
                break;
...
        mutex_unlock(&reboot_mutex);
...
}
-- 
Daniel J Blueman

                 reply	other threads:[~2010-06-14 15:16 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=AANLkTimDcTnyEPmt2ZcCM1UWtn4AYKotiqyjobJApkO7@mail.gmail.com \
    --to=daniel.blueman@gmail.com \
    --cc=linux-kernel@vger.kernel.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.