All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Mandeep Singh Baines <msb@chromium.org>
Cc: linux-kernel@vger.kernel.org, Oleg Nesterov <oleg@redhat.com>,
	Tejun Heo <tj@kernel.org>, "Rafael J. Wysocki" <rjw@sisk.pl>
Subject: Re: [PATCH v4] lockdep: check that no locks held at freeze time
Date: Wed, 20 Feb 2013 16:20:15 -0800	[thread overview]
Message-ID: <20130220162015.545ebb6b.akpm@linux-foundation.org> (raw)
In-Reply-To: <CACBanvr+1VEM6UqfNVx+KiuehZejwqpGp6djPN5kTgYD-umP2g@mail.gmail.com>

On Wed, 20 Feb 2013 16:17:39 -0800
Mandeep Singh Baines <msb@chromium.org> wrote:

> On Wed, Feb 20, 2013 at 3:24 PM, Andrew Morton
> <akpm@linux-foundation.org> wrote:
> > On Wed, 20 Feb 2013 15:17:16 -0800
> > Mandeep Singh Baines <msb@chromium.org> wrote:
> >
> >> We shouldn't try_to_freeze if locks are held.
> >>
> >> ...
> >>
> >> @@ -43,6 +44,9 @@ extern void thaw_kernel_threads(void);
> >>
> >> +     if (!(current->flags & PF_NOFREEZE))
> >> +             debug_check_no_locks_held(current,
> >> +
> >>                                         "lock held while trying to freeze");
> >> ...
> >>
> >> +     debug_check_no_locks_held(tsk, "lock held at task exit time");
> >
> > There doesn't seem much point in adding the `msg' to
> > debug_check_no_locks_held() - the dump_stack() in
> > print_held_locks_bug() will tell us the same thing.  Maybe just change
> 
> dump_stack() can be confusing when there is inlining. On occasion I've
> looked at the wrong mutex_lock, for example, when there was another
> mutex_lock that was inlined. Of course, you can start objdump and
> verify the offsets. But that requires that you have the object file.
> You could have a try_to_freeze added to do_exit. I was thinking of
> adding another locks_held in the return from syscall path.

Backtraces aren't *that* bad.  We'll easily be able to tell which of
the two callsites triggered the trace.


  reply	other threads:[~2013-02-21  0:20 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-16  9:53 [PATCH 1/5] vfork: don't freezer_count() for in-kernel users of CLONE_VFORK Mandeep Singh Baines
2013-02-16  9:53 ` [PATCH 2/5] lockdep: check that no locks held at freeze time Mandeep Singh Baines
2013-02-16 17:06   ` Oleg Nesterov
2013-02-20  1:57     ` [PATCH v3] " Mandeep Singh Baines
2013-02-20 10:37       ` Ingo Molnar
2013-02-20 12:55         ` Rafael J. Wysocki
2013-02-20 13:52           ` Ingo Molnar
2013-02-20 22:30       ` Oleg Nesterov
2013-02-20 23:11         ` Mandeep Singh Baines
2013-02-20 23:17         ` [PATCH v4] " Mandeep Singh Baines
2013-02-20 23:24           ` Andrew Morton
2013-02-21  0:17             ` Mandeep Singh Baines
2013-02-21  0:20               ` Andrew Morton [this message]
2013-02-21  0:28                 ` Mandeep Singh Baines
2013-02-21  0:42                   ` Andrew Morton
2013-02-21  3:19                     ` Mandeep Singh Baines
2013-02-21  3:17             ` [PATCH v5] " Mandeep Singh Baines
2013-02-21 15:42               ` Rafael J. Wysocki
2013-02-21 16:24                 ` Mandeep Singh Baines
2013-02-21 16:51                 ` [PATCH v6] " Mandeep Singh Baines
2013-02-21 21:42                   ` Andrew Morton
2013-02-21 21:57                     ` Mandeep Singh Baines
2013-02-16  9:53 ` [PATCH 3/5] coredump: use a freezable_schedule for the coredump_finish wait Mandeep Singh Baines
2013-02-16 17:17   ` Oleg Nesterov
2013-02-16  9:53 ` [PATCH 4/5] freezer: clear fake signal on exit from __refrigerator Mandeep Singh Baines
2013-02-16 17:06   ` Oleg Nesterov
2013-02-16 17:12     ` Oleg Nesterov
2013-02-20 18:09       ` Mandeep Singh Baines
2013-02-23 19:41         ` Oleg Nesterov
2013-02-23 19:59           ` Oleg Nesterov
2013-02-16  9:53 ` [PATCH 5/5] coredump: ignore non-fatal signals when core dumping to a pipe Mandeep Singh Baines
2013-02-16 17:10   ` Oleg Nesterov
2013-02-16 19:46     ` Oleg Nesterov
2013-02-18 23:55       ` Mandeep Singh Baines
2013-02-19 14:18         ` Oleg Nesterov
2013-02-19  5:19       ` Mandeep Singh Baines
2013-02-19 14:27         ` Oleg Nesterov
2013-02-19 19:33           ` Mandeep Singh Baines
2013-02-19 19:45             ` Oleg Nesterov
2013-02-19 20:20               ` Mandeep Singh Baines
2013-02-20 23:30                 ` Mandeep Singh Baines
2013-02-23 19:21                   ` Oleg Nesterov
2013-02-16 17:05 ` [PATCH 1/5] vfork: don't freezer_count() for in-kernel users of CLONE_VFORK Oleg Nesterov
2013-02-20  0:07   ` Mandeep Singh Baines
2013-02-20  1:41     ` Mandeep Singh Baines

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=20130220162015.545ebb6b.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=msb@chromium.org \
    --cc=oleg@redhat.com \
    --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 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.