From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752573AbdLGAuj (ORCPT ); Wed, 6 Dec 2017 19:50:39 -0500 Received: from mail-wr0-f194.google.com ([209.85.128.194]:45402 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752235AbdLGAuh (ORCPT ); Wed, 6 Dec 2017 19:50:37 -0500 X-Google-Smtp-Source: AGs4zMbZngSCb84waKKditkaW/P4kRfpfPPKd9pqpgEyWTgmNpCmISffs2SdVLNgu5MgBDlOszmiyw== Date: Thu, 7 Dec 2017 01:50:33 +0100 From: Ingo Molnar To: Christoph Hellwig Cc: Ingo Molnar , Peter Zijlstra , Andrew Morton , Al Viro , Jason Baron , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] sched/wait: assert the wait_queue_head lock is held in __wake_up_common Message-ID: <20171207005033.5fpojl43xlfyqvth@gmail.com> References: <20171206235230.19425-1-hch@lst.de> <20171206235230.19425-3-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171206235230.19425-3-hch@lst.de> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Christoph Hellwig 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 > --- > 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 ... otherwise I can pick this up into the scheduler tree as well. Thanks, Ingo