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, 7 Dec 2017 01:50:33 +0100
From:   Ingo Molnar <mingo@...nel.org>
To:     Christoph Hellwig <hch@....de>
Cc:     Ingo Molnar <mingo@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Al Viro <viro@...iv.linux.org.uk>,
        Jason Baron <jbaron@...mai.com>, linux-fsdevel@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] sched/wait: assert the wait_queue_head lock is held
 in __wake_up_common


* Christoph Hellwig <hch@....de> wrote:

> Better ensure we actually hold the lock using lockdep than just commenting
> on it.  Due to the various exported _locked interfaces it is far too easy
> to get the locking wrong.
> 
> Signed-off-by: Christoph Hellwig <hch@....de>
> ---
>  kernel/sched/wait.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/kernel/sched/wait.c b/kernel/sched/wait.c
> index 98feab7933c7..347c06c8222e 100644
> --- a/kernel/sched/wait.c
> +++ b/kernel/sched/wait.c
> @@ -76,6 +76,8 @@ static int __wake_up_common(struct wait_queue_head *wq_head, unsigned int mode,
>  	wait_queue_entry_t *curr, *next;
>  	int cnt = 0;
>  
> +	lockdep_assert_held(&wq_head->lock);
> +
>  	if (bookmark && (bookmark->flags & WQ_FLAG_BOOKMARK)) {
>  		curr = list_next_entry(bookmark, entry);

Makes sense. Would you like to carry this patch together with the epoll patch, to 
be able to test them both? If yes then:

  Acked-by: Ingo Molnar <mingo@...nel.org>

... otherwise I can pick this up into the scheduler tree as well.

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ