]> git.itanic.dy.fi Git - linux-stable/commit
FS-Cache: Add missing initialization of ret in cachefiles_write_page()
authorGeert Uytterhoeven <geert@linux-m68k.org>
Thu, 12 Nov 2015 11:46:23 +0000 (11:46 +0000)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 30 Dec 2015 02:25:56 +0000 (02:25 +0000)
commit9d7b6dfc16b08cce987e8ccc9720dca92a985622
tree357df7d3c0fa11bc7f5bbab783662dc00cc6a900
parentbb62cdf556744e4e98b2c51abf10c3a108b4c373
FS-Cache: Add missing initialization of ret in cachefiles_write_page()

commit cf89752645e47d86ba8a4157f4b121fcb33434c5 upstream.

fs/cachefiles/rdwr.c: In function ‘cachefiles_write_page’:
fs/cachefiles/rdwr.c:882: warning: ‘ret’ may be used uninitialized in
this function

If the jump to label "error" is taken, "ret" will indeed be
uninitialized, and random stack data may be printed by the debug code.

Fixes: 102f4d900c9c8f5e ("FS-Cache: Handle a write to the page immediately beyond the EOF marker")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
fs/cachefiles/rdwr.c