All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Tejun Heo <tj@kernel.org>
Cc: Ivan Vecera <ivecera@redhat.com>,
	linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org
Subject: Re: [PATCH driver-core] kernfs: fix regression in kernfs_fop_write caused by wrong type
Date: Fri, 19 Jan 2018 17:18:28 +0000	[thread overview]
Message-ID: <20180119171828.GJ13338@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20180119171636.GE3460072@devbig577.frc2.facebook.com>

On Fri, Jan 19, 2018 at 09:16:36AM -0800, Tejun Heo wrote:
> 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>

Applied.

      reply	other threads:[~2018-01-19 17:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-19  8:18 [PATCH driver-core] kernfs: fix regression in kernfs_fop_write caused by wrong type Ivan Vecera
2018-01-19 17:16 ` Tejun Heo
2018-01-19 17:18   ` Al Viro [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=20180119171828.GJ13338@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=gregkh@linuxfoundation.org \
    --cc=ivecera@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@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.