From: Jean Delvare <khali@linux-fr.org>
To: Eric Paris <eparis@parisplace.org>
Cc: Amit Daniel Kachhap <amit.kachhap@linaro.org>,
linux-pm@lists.linux-foundation.org,
linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
lenb@kernel.org, linaro-dev@lists.linaro.org, patches@linaro.org
Subject: Re: [PATCH] thermal: Fix for setting the thermal zone mode to enable/disable
Date: Wed, 21 Mar 2012 16:18:51 +0100 [thread overview]
Message-ID: <20120321161851.2f072204@endymion.delvare> (raw)
In-Reply-To: <CACLa4pts46gZmx=cGWF9UuHh-VpeoG9e2MmJR=xTn7sFxiFyjw@mail.gmail.com>
Hi Eric,
On Wed, 21 Mar 2012 10:47:52 -0400, Eric Paris wrote:
> On Wed, Mar 21, 2012 at 10:13 AM, Jean Delvare <khali@linux-fr.org> wrote:
> > Note that a quick grep suggests that drivers/misc/ad525x_dpot.c,
> > security/selinux/hooks.c and arch/m68k/sun3/prom/console.c suffer from
> > the same issue, if you want to fix them too.
>
> I do see that we use sizeof() for strings in the selinux code, but I
> don't see a place that it is a bug. If you see a bug let me know and
> I'd be happy to fix it!
My suspect is in sb_finish_set_opts():
if (strncmp(sb->s_type->name, "sysfs", sizeof("sysfs")) == 0)
If sb->s_type->name is exactly "sysfs", it will work, but if it only
starts with "sysfs" it won't. And if only exact matches are expected,
then strncmp is overkill and strcmp should be used instead.
Note that I don't know anything about the code so I might as well be
totally wrong.
--
Jean Delvare
next prev parent reply other threads:[~2012-03-21 15:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-21 11:10 [PATCH] thermal: Fix for setting the thermal zone mode to enable/disable Amit Daniel Kachhap
2012-03-21 14:13 ` Jean Delvare
2012-03-21 14:47 ` Eric Paris
2012-03-21 15:18 ` Jean Delvare [this message]
2012-03-21 15:14 ` Geert Uytterhoeven
2012-03-21 15:27 ` Jean Delvare
2012-03-22 5:10 ` Amit Kachhap
2012-03-22 5:14 ` Len Brown
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=20120321161851.2f072204@endymion.delvare \
--to=khali@linux-fr.org \
--cc=amit.kachhap@linaro.org \
--cc=eparis@parisplace.org \
--cc=lenb@kernel.org \
--cc=linaro-dev@lists.linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=patches@linaro.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;
as well as URLs for NNTP newsgroup(s).