All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "FS-Cache: Add missing initialization of ret in cachefiles_write_page()" has been added to the 4.3-stable tree
@ 2016-02-14 22:18 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-02-14 22:18 UTC (permalink / raw)
  To: geert, dhowells, gregkh, viro; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    FS-Cache: Add missing initialization of ret in cachefiles_write_page()

to the 4.3-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     fs-cache-add-missing-initialization-of-ret-in-cachefiles_write_page.patch
and it can be found in the queue-4.3 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From cf89752645e47d86ba8a4157f4b121fcb33434c5 Mon Sep 17 00:00:00 2001
From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: Thu, 12 Nov 2015 11:46:23 +0000
Subject: FS-Cache: Add missing initialization of ret in cachefiles_write_page()
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

From: Geert Uytterhoeven <geert@linux-m68k.org>

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>

---
 fs/cachefiles/rdwr.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/cachefiles/rdwr.c
+++ b/fs/cachefiles/rdwr.c
@@ -885,7 +885,7 @@ int cachefiles_write_page(struct fscache
 	loff_t pos, eof;
 	size_t len;
 	void *data;
-	int ret;
+	int ret = -ENOBUFS;
 
 	ASSERT(op != NULL);
 	ASSERT(page != NULL);


Patches currently in stable-queue which might be from geert@linux-m68k.org are

queue-4.3/fs-cache-add-missing-initialization-of-ret-in-cachefiles_write_page.patch
queue-4.3/mm-slab-only-move-management-objects-off-slab-for-sizes-larger-than-kmalloc_min_size.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-02-14 22:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-14 22:18 Patch "FS-Cache: Add missing initialization of ret in cachefiles_write_page()" has been added to the 4.3-stable tree gregkh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.