From: Jon Smirl <jonsmirl@gmail.com>
To: lkml <linux-kernel@vger.kernel.org>, Greg KH <greg@kroah.com>
Subject: Re: off by one in sysfs
Date: Sun, 12 Jun 2005 11:41:32 -0400 [thread overview]
Message-ID: <9e47339105061208417f7097b9@mail.gmail.com> (raw)
In-Reply-To: <9e47339105061120007061d7b1@mail.gmail.com>
Patch to fix the off by one.
signed-off-by: jonsmirl@gmail.com <Jon Smirl>
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
--- a/fs/sysfs/file.c
+++ b/fs/sysfs/file.c
@@ -182,7 +182,7 @@ fill_write_buffer(struct sysfs_buffer *
return -ENOMEM;
if (count >= PAGE_SIZE)
- count = PAGE_SIZE - 1;
+ count = PAGE_SIZE;
error = copy_from_user(buffer->page,buf,count);
buffer->needs_read_fill = 1;
return error ? -EFAULT : count;
next prev parent reply other threads:[~2005-06-12 15:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-12 3:00 off by one in sysfs Jon Smirl
2005-06-12 15:41 ` Jon Smirl [this message]
2005-06-14 21:06 ` Greg KH
2005-06-14 21:07 ` Greg KH
2005-06-14 21:21 ` Jon Smirl
2005-06-14 21:27 ` 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=9e47339105061208417f7097b9@mail.gmail.com \
--to=jonsmirl@gmail.com \
--cc=greg@kroah.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.