From: Chris Wulff <crwulff@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] configfs: Implement binary attributes (v3)
Date: Sat, 13 Jun 2015 02:06:13 +0000 (UTC) [thread overview]
Message-ID: <loom.20150613T040202-820@post.gmane.org> (raw)
In-Reply-To: 1414528232-7707-1-git-send-email-pantelis.antoniou@konsulko.com
Pantelis Antoniou <pantelis.antoniou <at> konsulko.com> writes:
...
> +static ssize_t
> +configfs_write_bin_file(struct file *file, const char __user *buf,
> + size_t count, loff_t *ppos)
> +{
...
> + len = simple_write_to_buffer(buffer->bin_buffer,
> + buffer->bin_buffer_size, ppos, buf, count);
> + if (len > 0)
> + *ppos += len;
> +out:
> + mutex_unlock(&buffer->mutex);
> + return len;
> +}
> +
...
It appears there is a small bug in this code. If you write more than one page
worth of data it incorrectly skips ahead. This code should NOT increment ppos
as the simple_write_to_buffer call already does that for you.
-- Chris Wulff
prev parent reply other threads:[~2015-06-13 2:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-28 20:30 [PATCH] configfs: Implement binary attributes (v3) Pantelis Antoniou
2014-10-29 2:54 ` Greg Kroah-Hartman
2014-10-29 6:58 ` Pantelis Antoniou
2015-06-13 2:06 ` Chris Wulff [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=loom.20150613T040202-820@post.gmane.org \
--to=crwulff@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox