Messages in this thread Patch in this message | | | Subject | [PATCH] SYSFS: fix PAGE_SIZE check | Date | Mon, 20 Jun 2005 15:59:29 -0700 | From | Greg KH <> |
| |
[PATCH] SYSFS: fix PAGE_SIZE check
Without this change I can't set an attribute exactly PAGE_SIZE in length. There is no need for zero termination because the interface uses lengths.
From: Jon Smirl <jonsmirl@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- commit 9d9d27fb651a7c95a46f276bacb4329db47470a6 tree cf25134082cb61e860f65af73adc91674ec74258 parent 42b16c051c3f462095fb8c9bad1bc05b34518cb9 author Jon Smirl <jonsmirl@gmail.com> Tue, 14 Jun 2005 09:54:54 -0400 committer Greg Kroah-Hartman <gregkh@suse.de> Mon, 20 Jun 2005 15:15:38 -0700
fs/sysfs/file.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
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; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |