mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Américo Wang" <xiyou.wangcong@gmail.com>
To: Oleg Nesterov <oleg@redhat.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	Ingo Molnar <mingo@elte.hu>,
	Peter Zijlstra <peterz@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: Re: check_usage_backwards() && forwards? (Was: [2.6.33-rc5] starting  emacs makes lockdep warning)
Date: Wed, 27 Jan 2010 10:58:54 +0800	[thread overview]
Message-ID: <2375c9f91001261858y7fee9388o55a8e6f11fcdc0bf@mail.gmail.com> (raw)
In-Reply-To: <20100126181641.GA10460@redhat.com>

On Wed, Jan 27, 2010 at 2:16 AM, Oleg Nesterov <oleg@redhat.com> wrote:
> (add  lockdep gurus)
>
> Lockdep has found the real bug, but the output doesn't look right to me
>
> On 01/26, KOSAKI Motohiro wrote:
>>
>> =========================================================
>> [ INFO: possible irq lock inversion dependency detected ]
>> 2.6.33-rc5 #77
>> ---------------------------------------------------------
>> emacs/1609 just changed the state of lock:
>>  (&(&tty->ctrl_lock)->rlock){+.....}, at: [<ffffffff8127c648>] tty_fasync+0xe8/0x190
>> but this lock took another, HARDIRQ-unsafe lock in the past:
>>  (&(&sighand->siglock)->rlock){-.....}
>
> "HARDIRQ-unsafe" and "this lock took another" looks wrong, afaics.
>
>>   ... key      at: [<ffffffff81c054a4>] __key.46539+0x0/0x8
>>   ... acquired at:
>>    [<ffffffff81089af6>] __lock_acquire+0x1056/0x15a0
>>    [<ffffffff8108a0df>] lock_acquire+0x9f/0x120
>>    [<ffffffff81423012>] _raw_spin_lock_irqsave+0x52/0x90
>>    [<ffffffff8127c1be>] __proc_set_tty+0x3e/0x150
>>    [<ffffffff8127e01d>] tty_open+0x51d/0x5e0
>
> The stack-trace shows that this lock (ctrl_lock) was taken under
> ->siglock (which is hopefully irq-safe).
>
> Typo in check_usage_backwards() ?
>
> Oleg.
>
> --- a/kernel/lockdep.c
> +++ b/kernel/lockdep.c
> @@ -2147,7 +2147,7 @@ check_usage_backwards(struct task_struct
>                return ret;
>
>        return print_irq_inversion_bug(curr, &root, target_entry,
> -                                       this, 1, irqclass);
> +                                       this, 0, irqclass);
>  }
>
>  void print_irqtrace_events(struct task_struct *curr)
>
>

Yes!! Almost definitely... You are so careful!
ACK, please submit it as a normal patch.

Thanks.

  parent reply	other threads:[~2010-01-27  2:58 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-26  3:20 [2.6.33-rc5] starting emacs makes lockdep warning KOSAKI Motohiro
2010-01-26  5:25 ` Américo Wang
2010-01-26  5:37   ` KOSAKI Motohiro
2010-01-26  5:49     ` KOSAKI Motohiro
2010-01-26  6:01       ` Américo Wang
2010-01-26  6:07         ` Al Viro
2010-01-26  6:24           ` Américo Wang
2010-01-26  6:54             ` Al Viro
2010-01-26  7:45           ` KOSAKI Motohiro
2010-01-26  8:45             ` Américo Wang
2010-01-26  9:14               ` Eric W. Biederman
2010-01-26  9:32                 ` Américo Wang
2010-01-26 12:33                   ` Eric W. Biederman
2010-01-26 15:58                     ` [Patch] fix the lockdep warning in tty_fasync() Américo Wang
2010-01-27  1:09                       ` KOSAKI Motohiro
2010-01-27  1:47                         ` Greg KH
2010-01-26  6:17       ` [2.6.33-rc5] starting emacs makes lockdep warning Eric W. Biederman
2010-01-26 18:16 ` check_usage_backwards() && forwards? (Was: [2.6.33-rc5] starting emacs makes lockdep warning) Oleg Nesterov
2010-01-26 18:47   ` Peter Zijlstra
2010-01-27  2:58   ` Américo Wang [this message]
2010-01-27 13:15   ` [tip:core/urgent] lockdep: Fix check_usage_backwards() error message tip-bot for Oleg Nesterov

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=2375c9f91001261858y7fee9388o55a8e6f11fcdc0bf@mail.gmail.com \
    --to=xiyou.wangcong@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=ebiederm@xmission.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.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

all inboxes | Powered by JetHome®