From: Tejun Heo <tj@kernel.org>
To: Ivan Vecera <ivecera@redhat.com>
Cc: linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org,
viro@zeniv.linux.org.uk
Subject: Re: [PATCH driver-core] kernfs: fix regression in kernfs_fop_write caused by wrong type
Date: Fri, 19 Jan 2018 09:16:36 -0800 [thread overview]
Message-ID: <20180119171636.GE3460072@devbig577.frc2.facebook.com> (raw)
In-Reply-To: <20180119081854.13609-1-ivecera@redhat.com>
On Fri, Jan 19, 2018 at 09:18:54AM +0100, Ivan Vecera wrote:
> Commit b7ce40cff0b9 ("kernfs: cache atomic_write_len in
> kernfs_open_file") changes type of local variable 'len' from ssize_t
> to size_t. This change caused that the *ppos value is updated also
> when the previous write callback failed.
>
> Mentioned snippet:
> ...
> len = ops->write(...); <- return value can be negative
> ...
> if (len > 0) <- true here in this case
> *ppos += len;
> ...
>
> Fixes: b7ce40cff0b9 ("kernfs: cache atomic_write_len in kernfs_open_file")
> Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Oops.
Acked-by: Tejun Heo <tj@kernel.org>
Thanks.
--
tejun
next prev parent reply other threads:[~2018-01-19 17:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-19 8:18 Ivan Vecera
2018-01-19 17:16 ` Tejun Heo [this message]
2018-01-19 17:18 ` Al Viro
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=20180119171636.GE3460072@devbig577.frc2.facebook.com \
--to=tj@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=ivecera@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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