[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <105a9bce-5539-73f1-2683-e52dba870c04@virtuozzo.com>
Date: Wed, 21 Sep 2016 15:33:11 +0300
From: Vasily Averin <vvs@...tuozzo.com>
To: linux-kernel@...r.kernel.org, linux-nfs@...r.kernel.org
Cc: "J. Bruce Fields" <bfields@...ldses.org>,
Jeff Layton <jlayton@...chiereds.net>,
Scott Mayhew <smayhew@...hat.com>
Subject: [PATCH 2/2] notifiers: double register detection
WARN_ON should help to detect double register of the same notifiers
Signed-off-by: Vasily Averin <vvs@...tuozzo.com>
---
kernel/notifier.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/notifier.c b/kernel/notifier.c
index fd2c9ac..e02b2f0 100644
--- a/kernel/notifier.c
+++ b/kernel/notifier.c
@@ -22,6 +22,7 @@ static int notifier_chain_register(struct notifier_block **nl,
struct notifier_block *n)
{
while ((*nl) != NULL) {
+ WARN_ON((*nl) == n);
if (n->priority > (*nl)->priority)
break;
nl = &((*nl)->next);
--
1.9.1
Powered by blists - more mailing lists