]> git.baikalelectronics.ru Git - kernel.git/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)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 17 Nov 2015 01:38:43 +0000 (20:38 -0500)
commit1b2fe2eb56032e64893ca47b03db9d5e42a80891
tree98d2458686405879ec6206dba3e9f2c5c33b43e4
parent2715d332e6151136472842d51b2ec873c0652275
FS-Cache: Add missing initialization of ret in cachefiles_write_page()

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: 5d48261abfac8200 ("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>
fs/cachefiles/rdwr.c