aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/gcc-plugins/randomize_layout_plugin.c
diff options
context:
space:
mode:
authorIvan Vecera <[email protected]>2018-01-19 08:18:54 +0000
committerAl Viro <[email protected]>2018-01-19 17:19:13 +0000
commitba87977a49913129962af8ac35b0e13e0fa4382d (patch)
tree7d4fb7e45ea098b47afdfb57556d041fc91ed33f /scripts/gcc-plugins/randomize_layout_plugin.c
parentFix a leak in socket(2) when we fail to allocate a file descriptor. (diff)
downloadkernel-ba87977a49913129962af8ac35b0e13e0fa4382d.tar.gz
kernel-ba87977a49913129962af8ac35b0e13e0fa4382d.zip
kernfs: fix regression in kernfs_fop_write caused by wrong type
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 <[email protected]> Signed-off-by: Ivan Vecera <[email protected]> Signed-off-by: Al Viro <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/randomize_layout_plugin.c')
0 files changed, 0 insertions, 0 deletions