diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2015-11-12 11:46:23 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-19 14:28:37 -0800 |
commit | 5f341b0ae40162d8bb5586fa62b4166cbbd6fdde (patch) | |
tree | 57121e878fba503cf6d8da9938f2ea397ae39e22 | |
parent | 0b8c6bb125172685d9cc27cf189604915e468145 (diff) | |
download | linux-stable-5f341b0ae40162d8bb5586fa62b4166cbbd6fdde.tar.gz linux-stable-5f341b0ae40162d8bb5586fa62b4166cbbd6fdde.tar.bz2 linux-stable-5f341b0ae40162d8bb5586fa62b4166cbbd6fdde.zip |
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | fs/cachefiles/rdwr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cachefiles/rdwr.c b/fs/cachefiles/rdwr.c index e62faaed63c0..3ce646792c7e 100644 --- a/fs/cachefiles/rdwr.c +++ b/fs/cachefiles/rdwr.c @@ -885,7 +885,7 @@ int cachefiles_write_page(struct fscache_storage *op, struct page *page) loff_t pos, eof; size_t len; void *data; - int ret; + int ret = -ENOBUFS; ASSERT(op != NULL); ASSERT(page != NULL); |