[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151125152226.267e472a@gandalf.local.home>
Date: Wed, 25 Nov 2015 15:22:26 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: linux-kernel@...r.kernel.org
Cc: Ingo Molnar <mingo@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Rusty Russell <rusty@...tcorp.com.au>
Subject: Re: [for-next][PATCH 6/7] ring-buffer: Process commits whenever
moving to a new page.
> diff --git a/kernel/module.c b/kernel/module.c
> index 8f051a106676..c0ae7c18c2fa 100644
> --- a/kernel/module.c
> +++ b/kernel/module.c
> @@ -284,11 +284,25 @@ static void module_assert_mutex(void)
> static void module_assert_mutex_or_preempt(void)
> {
> #ifdef CONFIG_LOCKDEP
> + static int once;
> +
> if (unlikely(!debug_locks))
> return;
>
> - WARN_ON(!rcu_read_lock_sched_held() &&
> - !lockdep_is_held(&module_mutex));
> + /*
> + * Would be nice to use WARN_ON_ONCE(), but the warning
> + * that causes a stack trace may call __module_address()
> + * which may call here, and we trigger the warning again,
> + * before the WARN_ON_ONCE() updates its flag.
> + * To prevent the recursion, we need to open code the
> + * once logic.
> + */
> + if (!once &&
> + unlikely(!rcu_read_lock_sched_held() &&
> + !lockdep_is_held(&module_mutex))) {
> + once++;
> + WARN_ON(1);
> + }
> #endif
> }
>
>
Damn it. I added this via quilt to debug something (as this was causing
a crash), and forgot to pop it when doing my "git commit -a -s".
I'll have to nuke this part of the patch and rebase my tree :-(
-- Steve
--
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