lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a8e1da0907130108y18e56346paaa87e0779ddf743@mail.gmail.com>
Date:	Mon, 13 Jul 2009 16:08:16 +0800
From:	Dave Young <hidave.darkstar@...il.com>
To:	tom.leiming@...il.com
Cc:	a.p.zijlstra@...llo.nl, linux-kernel@...r.kernel.org,
	akpm@...ux-foundation.org, mingo@...e.hu
Subject: Re: [RESEND PATCH 04/11] kernel:lockdep:implement check_noncircular() 
	by BFS

On Mon, Jul 13, 2009 at 4:02 PM, Dave Young<hidave.darkstar@...il.com> wrote:
> On Sun, Jun 28, 2009 at 11:04:39PM +0800, tom.leiming@...il.com wrote:
>> From: Ming Lei <tom.leiming@...il.com>
>>
>> This patch uses BFS to implement check_noncircular() and
>> prints the generated shortest circle if exists.
>>
>> Signed-off-by: Ming Lei <tom.leiming@...il.com>
>> ---
>>  kernel/lockdep.c |   89 ++++++++++++++++++++++-------------------------------
>>  1 files changed, 37 insertions(+), 52 deletions(-)
>>
>> diff --git a/kernel/lockdep.c b/kernel/lockdep.c
>> index ce6d09e..f740088 100644
>> --- a/kernel/lockdep.c
>> +++ b/kernel/lockdep.c
>> @@ -985,12 +985,7 @@ static inline int __bfs_backward(struct lock_list *src_entry,
>>   * Recursive, forwards-direction lock-dependency checking, used for
>>   * both noncyclic checking and for hardirq-unsafe/softirq-unsafe
>>   * checking.
>> - *
>> - * (to keep the stackframe of the recursive functions small we
>> - *  use these global variables, and we also mark various helper
>> - *  functions as noinline.)
>>   */
>> -static struct held_lock *check_source, *check_target;
>>
>>  /*
>>   * Print a dependency chain entry (this is only done when a deadlock
>> @@ -1014,7 +1009,9 @@ print_circular_bug_entry(struct lock_list *target, unsigned int depth)
>>   * header first:
>>   */
>>  static noinline int
>> -print_circular_bug_header(struct lock_list *entry, unsigned int depth)
>> +print_circular_bug_header(struct lock_list *entry, unsigned int depth,
>> +                     struct held_lock *check_src,
>> +                     struct held_lock *check_tgt)
>>  {
>>       struct task_struct *curr = current;
>>
>> @@ -1027,9 +1024,9 @@ print_circular_bug_header(struct lock_list *entry, unsigned int depth)
>>       printk(  "-------------------------------------------------------\n");
>>       printk("%s/%d is trying to acquire lock:\n",
>>               curr->comm, task_pid_nr(curr));
>> -     print_lock(check_source);
>> +     print_lock(check_src);
>>       printk("\nbut task is already holding lock:\n");
>> -     print_lock(check_target);
>> +     print_lock(check_tgt);
>>       printk("\nwhich lock already depends on the new lock.\n\n");
>>       printk("\nthe existing dependency chain (in reverse order) is:\n");
>>
>> @@ -1043,36 +1040,24 @@ static inline int class_equal(struct lock_list *entry, void *data)
>>       return entry->class == data;
>>  }
>>
>> -static noinline int print_circular_bug(void)
>> +static noinline int print_circular_bug(struct lock_list *this,
>
> Shouldn't be 'static noinline int' here? Same question to following ones.
>

Sorry for pointing to wrong place. please grep to find them:

161:+static int noinline print_bfs_bug(int ret)
173: static int noinline print_infinite_recursion_bug(void)

-- 
Regards
dave
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ