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]
Date:	Wed, 13 Jan 2010 11:00:22 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Hitoshi Mitake <mitake@....info.waseda.ac.jp>,
	Greg KH <gregkh@...e.de>
Cc:	linux-kernel@...r.kernel.org,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Paul Mackerras <paulus@...ba.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Greg Kroah-Hartman <gregkh@...e.de>
Subject: Re: [PATCH 5/5] lockdep: Fix the way to initialize class_mutex for
 information of file and line


* Hitoshi Mitake <mitake@....info.waseda.ac.jp> wrote:

> This patch adds __FILE__ and __LINE__ to arguments passed for
> __mutex_init() called in __class_register().
> This affects to lockdep_map of class_mutex of struct class_private,
> and these will be used to make trace lock events more human friendly.
> 
> Signed-off-by: Hitoshi Mitake <mitake@....info.waseda.ac.jp>
> Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> Cc: Paul Mackerras <paulus@...ba.org>
> Cc: Frederic Weisbecker <fweisbec@...il.com>
> Cc: Greg Kroah-Hartman <gregkh@...e.de>
> ---
>  drivers/base/class.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/base/class.c b/drivers/base/class.c
> index 161746d..cc0630f 100644
> --- a/drivers/base/class.c
> +++ b/drivers/base/class.c
> @@ -162,7 +162,8 @@ int __class_register(struct class *cls, struct lock_class_key *key)
>  	klist_init(&cp->class_devices, klist_class_dev_get, klist_class_dev_put);
>  	INIT_LIST_HEAD(&cp->class_interfaces);
>  	kset_init(&cp->class_dirs);
> -	__mutex_init(&cp->class_mutex, "struct class mutex", key);
> +	__mutex_init(&cp->class_mutex, "struct class mutex", key,
> +		     __FILE__, __LINE__);
>  	error = kobject_set_name(&cp->class_subsys.kobj, "%s", cls->name);
>  	if (error) {
>  		kfree(cp);

Greg, any objection to this type of embellishment of lock data that comes from 
the driver core?

Thanks,

	Ingo
--
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