linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Amit Sahrawat <amit.sahrawat83@gmail.com>
To: Kyungmin Park <kmpark@infradead.org>
Cc: Pavel Machek <pavel@ucw.cz>, "Rafael J. Wysocki" <rjw@sisk.pl>,
	Len Brown <len.brown@intel.com>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Tejun Heo <tj@kernel.org>
Subject: Re: BUG: sleeping function called from invalid context at include/linux/freezer.h:45
Date: Tue, 10 Jan 2012 11:22:29 +0530	[thread overview]
Message-ID: <CADDb1s2-Tsnns8qndpbS79cPAw2X_ORXqMsqWR=AuBoLCDneMg@mail.gmail.com> (raw)
In-Reply-To: <CAH9JG2XniMv5dVf1DixGNaQAJk-sZjnV9HfYeihEJP3JDyC4+Q@mail.gmail.com>

On Tue, Jan 10, 2012 at 9:57 AM, Kyungmin Park <kmpark@infradead.org> wrote:
> Dear all
>
> with the latest kernel. I got the below bug message.
> It calls the sleep function. Does it intended operation?
>
> static inline bool try_to_freeze(void)
> {
>        might_sleep();
>        if (likely(!freezing(current)))
>                return false;
>        return __refrigerator(false);
> }
this change is part of this GIT:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=a0acae0e886d44bd5ce6d2f173c1ace0fcf0d9f6

>
> # poweroff
> [    6.852523] BUG: sleeping function called from invalid context at
> include/linux/freezer.h:45
> [    6.859489] in_atomic(): 0, irqs_disabled(): 128, pid: 1, name: init
> [    6.865846] [<c0013508>] (unwind_backtrace+0x0/0xec) from
> [<c0010124>] (do_signal+0x88/0x588)
> [    6.874337] [<c0010124>] (do_signal+0x88/0x588) from [<c001063c>]
> (do_notify_resume+0x18/0x38)
> [    6.882928] [<c001063c>] (do_notify_resume+0x18/0x38) from
> [<c000dc18>] (work_pending+0x24/0x28)
is this the complete backtrace...?
The above backtrace shows that freezing was called from a context
wherein - IRQs are disabled - which resulted in this error.
How about checking ...
BUG_ON(irqs_disabled()); in try_to_freeze()...
not sure though... please check and update me also...
>
> commit e4e11180dfa545233e5145919b75b7fac88638df
> Merge: 37cfc3f adc0e91
> Author: Linus Torvalds <torvalds@linux-foundation.org>
> Date:   Mon Jan 9 17:37:37 2012 -0800
>
>    Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vi
>
> Thank you,
> Kyungmin Park
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

  reply	other threads:[~2012-01-10  5:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-10  4:27 BUG: sleeping function called from invalid context at include/linux/freezer.h:45 Kyungmin Park
2012-01-10  5:52 ` Amit Sahrawat [this message]
2012-01-10  5:59   ` Kyungmin Park
2012-01-10 13:04 ` Srivatsa S. Bhat
2012-01-11  0:57   ` Kyungmin Park

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='CADDb1s2-Tsnns8qndpbS79cPAw2X_ORXqMsqWR=AuBoLCDneMg@mail.gmail.com' \
    --to=amit.sahrawat83@gmail.com \
    --cc=kmpark@infradead.org \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=rjw@sisk.pl \
    --cc=tj@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 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).