summaryrefslogtreecommitdiffstats
path: root/Kbuild
diff options
context:
space:
mode:
authorIvan Vecera <ivecera@redhat.com>2018-01-19 09:18:54 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-02-16 20:22:59 +0100
commit650d3d8512c6c542d7c11ece049b46d5f2337ce8 (patch)
tree3df33c5ce7fd40b83b168fcf446605e64e4e4f6a /Kbuild
parentf1e31607e73d5f4546ff8d1e40e1153230392188 (diff)
downloadlinux-stable-650d3d8512c6c542d7c11ece049b46d5f2337ce8.tar.gz
linux-stable-650d3d8512c6c542d7c11ece049b46d5f2337ce8.tar.bz2
linux-stable-650d3d8512c6c542d7c11ece049b46d5f2337ce8.zip
kernfs: fix regression in kernfs_fop_write caused by wrong type
commit ba87977a49913129962af8ac35b0e13e0fa4382d upstream. 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") Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Ivan Vecera <ivecera@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Kbuild')
0 files changed, 0 insertions, 0 deletions