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:	Thu, 19 Apr 2007 08:14:16 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Jarek Poplawski <jarkao2@...pl>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH -mm] workqueue: debug possible lockups in flush_workqueue


* Jarek Poplawski <jarkao2@...pl> wrote:

> Here is my patch proposal for detecting possible lockups, when 
> flush_workqueue caller holds a lock (e.g. rtnl_lock) also used in work 
> functions.

looks good in principle - did you test it and it caught a bug that wasnt 
caught before?

> +#ifdef CONFIG_PROVE_LOCKING
> +/* Detect possible flush_workqueue() lockup with circular dependency check. */
> +static struct lockdep_map flush_dep_map = { .name = "flush_dep_map" };
> +#endif

> +#ifdef CONFIG_PROVE_LOCKING
> +		/* lockdep dependency: flush_dep_map (read) before any lock: */
> +		lock_acquire(&flush_dep_map, 0, 0, 1, 2, _THIS_IP_);
> +#endif

i think the #ifdef should only be needed for the .name initialization - 
both lock_acquire() and lock_release() maps to NOP if PROVE_LOCKING is 
off.

	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