From: Michael Ellerman <mpe@ellerman.id.au>
To: Andi Kleen <andi@firstfloor.org>, akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org, Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH] Support resetting WARN*_ONCE
Date: Fri, 03 Nov 2017 20:39:56 +1100 [thread overview]
Message-ID: <8760ar7lar.fsf@concordia.ellerman.id.au> (raw)
In-Reply-To: <20171017214017.22708-1-andi@firstfloor.org>
Andi Kleen <andi@firstfloor.org> writes:
> diff --git a/kernel/panic.c b/kernel/panic.c
> index bdd18afa19a4..b2d872fa16de 100644
> --- a/kernel/panic.c
> +++ b/kernel/panic.c
> @@ -587,6 +588,32 @@ void warn_slowpath_null(const char *file, int line)
> EXPORT_SYMBOL(warn_slowpath_null);
> #endif
>
> +#ifdef CONFIG_BUG
> +
> +/* Support resetting WARN*_ONCE state */
> +
> +static int clear_warn_once_set(void *data, u64 val)
> +{
> + memset(__start_once, 0, __end_once - __start_once);
> + return 0;
> +}
> +
> +DEFINE_SIMPLE_ATTRIBUTE(clear_warn_once_fops,
> + NULL,
> + clear_warn_once_set,
> + "%lld\n");
> +
> +static __init int register_warn_debugfs(void)
> +{
> + /* Don't care about failure */
> + debugfs_create_file("clear_warn_once", 0644, NULL,
^
Wouldn't 0200 be more appropriate if it's only writable?
Otherwise it appears readable, but cat'ing it gives you an error.
cheers
next prev parent reply other threads:[~2017-11-03 9:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-17 21:40 [PATCH] Support resetting WARN*_ONCE Andi Kleen
2017-10-17 21:54 ` Andrew Morton
2017-10-17 22:11 ` Andi Kleen
2017-10-18 5:35 ` Michael Ellerman
2017-10-19 20:47 ` Andi Kleen
2017-11-03 9:39 ` Michael Ellerman [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-08-02 20:40 Andi Kleen
2016-08-03 4:12 ` kbuild test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8760ar7lar.fsf@concordia.ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=ak@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox