Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1267849 > unrolled thread

[PATCH 0/2] FS-Cache: More miscellany

Started byDavid Howells <dhowells@redhat.com>
First post2015-11-12 12:50 +0100
Last post2015-11-12 12:50 +0100
Articles 2 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/2] FS-Cache: More miscellany David Howells <dhowells@redhat.com> - 2015-11-12 12:50 +0100
    [PATCH 1/2] FS-Cache: Add missing initialization of ret in  cachefiles_write_page() David Howells <dhowells@redhat.com> - 2015-11-12 12:50 +0100

#1267849 — [PATCH 0/2] FS-Cache: More miscellany

FromDavid Howells <dhowells@redhat.com>
Date2015-11-12 12:50 +0100
Subject[PATCH 0/2] FS-Cache: More miscellany
Message-ID<qtYy6-8le-3@gated-at.bofh.it>
Attached are another couple of miscellaneous bits in FS-Cache and
CacheFiles:

 (1) Fix an uninitialised error value.

 (2) In MAINTAINERS, mark the mailing list as being moderated for
     non-subscribers.

These can also be found here:

	http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=fscache-fixes

David
---
Geert Uytterhoeven (2):
      FS-Cache: Add missing initialization of ret in cachefiles_write_page()
      MAINTAINERS: linux-cachefs@redhat.com is moderated for non-subscribers


 MAINTAINERS          |    4 ++--
 fs/cachefiles/rdwr.c |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1267855 — [PATCH 1/2] FS-Cache: Add missing initialization of ret in cachefiles_write_page()

FromDavid Howells <dhowells@redhat.com>
Date2015-11-12 12:50 +0100
Subject[PATCH 1/2] FS-Cache: Add missing initialization of ret in cachefiles_write_page()
Message-ID<qtYy6-8le-17@gated-at.bofh.it>
In reply to#1267849
From: Geert Uytterhoeven <geert@linux-m68k.org>

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>
---

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

diff --git a/fs/cachefiles/rdwr.c b/fs/cachefiles/rdwr.c
index 7a6b02f72787..c0f3da3926a0 100644
--- a/fs/cachefiles/rdwr.c
+++ b/fs/cachefiles/rdwr.c
@@ -879,7 +879,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);

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web