From: Peter Zijlstra <peterz@infradead.org>
To: Roel Kluin <roel.kluin@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>, linux-kernel@vger.kernel.org
Subject: Re: lockdep: testing '0' where '\0' intended?
Date: Sat, 12 Oct 2013 16:40:57 +0200 [thread overview]
Message-ID: <20131012144057.GA2675@laptop.programming.kicks-ass.net> (raw)
In-Reply-To: <alpine.DEB.2.02.1310120043280.11060@Z>
On Sat, Oct 12, 2013 at 01:06:03AM +0200, Roel Kluin wrote:
> Not entirely sure about the assembly part, but shouldn't it...
> --------
> Test for the nul character rather than the '0' (== 0x30), in the
> __get_user_unknown() case.
>
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> ---
> diff --git a/kernel/lockdep_proc.c b/kernel/lockdep_proc.c
> index b2c71c5..71b3aba 100644
> --- a/kernel/lockdep_proc.c
> +++ b/kernel/lockdep_proc.c
> @@ -632,7 +632,7 @@ static ssize_t lock_stat_write(struct file *file,
> const char __user *buf,
> if (get_user(c, buf))
> return -EFAULT;
>
> - if (c != '0')
> + if (c != '\0')
No we really meant '0'. Its so that:
echo 0 > /proc/lock_stat
resets the stats.
prev parent reply other threads:[~2013-10-12 14:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-11 23:06 Roel Kluin
2013-10-12 14:40 ` Peter Zijlstra [this message]
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=20131012144057.GA2675@laptop.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=roel.kluin@gmail.com \
/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
Powered by JetHome