From: Greg KH <greg@kroah.com>
To: Carlos Chinea <carlos.chinea@nokia.com>
Cc: linux-kernel@vger.kernel.org, linus.walleij@linaro.org,
artem.bityutskiy@linux.intel.com, shubhrajyoti@ti.com
Subject: Re: [PATCH 5/6] HSI: hsi_char: Remove max_data_size from sysfs
Date: Thu, 19 Apr 2012 08:15:56 -0700 [thread overview]
Message-ID: <20120419151556.GA31543@kroah.com> (raw)
In-Reply-To: <1334837127-12931-6-git-send-email-carlos.chinea@nokia.com>
On Thu, Apr 19, 2012 at 03:05:26PM +0300, Carlos Chinea wrote:
> Remove max_data_size sysfs entry. Otherwise is possible
> to have a buffer overrun if its value is increased after
> the device is open.
>
> Signed-off-by: Carlos Chinea <carlos.chinea@nokia.com>
> ---
> drivers/hsi/clients/hsi_char.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/hsi/clients/hsi_char.c b/drivers/hsi/clients/hsi_char.c
> index 88a050d..3ad91f6 100644
> --- a/drivers/hsi/clients/hsi_char.c
> +++ b/drivers/hsi/clients/hsi_char.c
> @@ -123,7 +123,7 @@ struct hsc_client_data {
> static unsigned int hsc_major;
> /* Maximum buffer size that hsi_char will accept from userspace */
> static unsigned int max_data_size = 0x1000;
> -module_param(max_data_size, uint, S_IRUSR | S_IWUSR);
> +module_param(max_data_size, uint, 0);
You can just change this to be read-only, that way userspace can see
what the value is, and it can't be changed.
But that's up to you, not an issue at all.
greg k-h
next prev parent reply other threads:[~2012-04-19 15:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-19 12:05 [PATCH 0/6] HSI fixes for 3.4 Carlos Chinea
2012-04-19 12:05 ` [PATCH 1/6] HSI: hsi: Rework hsi_controller release Carlos Chinea
2012-04-19 12:05 ` [PATCH 2/6] HSI: hsi: Fix error path cleanup on client registration Carlos Chinea
2012-04-19 12:05 ` [PATCH 3/6] HSI: hsi: Remove controllers and ports from the bus Carlos Chinea
2012-04-19 12:05 ` [PATCH 4/6] HSI: hsi: Rework hsi_event interface Carlos Chinea
2012-04-19 12:05 ` [PATCH 5/6] HSI: hsi_char: Remove max_data_size from sysfs Carlos Chinea
2012-04-19 15:15 ` Greg KH [this message]
2012-04-19 12:05 ` [PATCH 6/6] HSI: Add HSI ABI documentation Carlos Chinea
2012-04-19 15:17 ` Greg KH
2012-04-20 13:21 ` Carlos Chinea
2012-04-19 15:17 ` [PATCH 0/6] HSI fixes for 3.4 Greg KH
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=20120419151556.GA31543@kroah.com \
--to=greg@kroah.com \
--cc=artem.bityutskiy@linux.intel.com \
--cc=carlos.chinea@nokia.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shubhrajyoti@ti.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