From: Waiman Long <waiman.long@hp.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Borislav Petkov <bp@alien8.de>, Ingo Molnar <mingo@kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
USB list <linux-usb@vger.kernel.org>,
"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>
Subject: Re: Linux 3.16-rc6
Date: Mon, 28 Jul 2014 12:37:14 -0400 [thread overview]
Message-ID: <53D67C3A.1060401@hp.com> (raw)
In-Reply-To: <20140725161002.GE6758@twins.programming.kicks-ass.net>
On 07/25/2014 12:10 PM, Peter Zijlstra wrote:
> On Thu, Jul 24, 2014 at 04:38:28PM -0400, Waiman Long wrote:
>> Yes, I think I may have a solution for that.
>>
>> Borislav, can you apply the following patch on top of the lockdep patch to
>> see if it can fix the problem?
>>
>> diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
>> index d24e433..507a8ce 100644
>> --- a/kernel/locking/lockdep.c
>> +++ b/kernel/locking/lockdep.c
>> @@ -3595,6 +3595,12 @@ void lock_acquire(struct lockdep_map *lock, unsigned int
>> raw_local_irq_save(flags);
>> check_flags(flags);
>>
>> + /*
>> + * An interrupt recursive read in interrupt context can be considered
>> + * to be the same as a recursive read from checking perspective.
>> + */
>> + if ((read == 3)&& in_interrupt())
>> + read = 2;
>> current->lockdep_recursion = 1;
>> trace_lock_acquire(lock, subclass, trylock, read, check, nest_lock, ip);
>> __lock_acquire(lock, subclass, trylock, read, check,
> Just had another look at the initial patch and it cannot be right, even
> with the above.
>
> The problem is you cannot use in_interrupt() in check_deadlock().
> Check_deadlock() must be context invariant, it should only test the
> chain state and not rely on where or when its called.
>
>
I am planning to take out the check in check_deadlock and only have the
test in lock_acquire which change a 3 to 2 when in interrupt context.
Now my question is whether to do it as a new patch on top of the
existing one in tip or a total replacement. I also intend to use
symbolic names for the read states for better readability as suggested
by John.
-Longman
next prev parent reply other threads:[~2014-07-28 16:37 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-21 4:22 Linux 3.16-rc6 Linus Torvalds
2014-07-23 9:53 ` Borislav Petkov
2014-07-24 0:37 ` Linus Torvalds
2014-07-24 1:53 ` David Rientjes
2014-07-24 6:43 ` Peter Zijlstra
2014-07-24 8:41 ` Borislav Petkov
2014-07-24 12:25 ` Borislav Petkov
2014-07-24 12:58 ` Peter Zijlstra
2014-07-24 16:34 ` Borislav Petkov
2014-07-24 18:18 ` Linus Torvalds
2014-07-24 18:36 ` Peter Zijlstra
2014-07-24 20:38 ` Waiman Long
2014-07-24 21:45 ` Borislav Petkov
2014-07-25 17:23 ` Waiman Long
2014-07-24 22:06 ` John Stoffel
2014-07-24 22:06 ` John Stoffel
2014-07-25 16:10 ` Peter Zijlstra
2014-07-28 16:37 ` Waiman Long [this message]
2014-07-28 16:42 ` Peter Zijlstra
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=53D67C3A.1060401@hp.com \
--to=waiman.long@hp.com \
--cc=bp@alien8.de \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=torvalds@linux-foundation.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.