From: David Howells <dhowells@redhat.com> To: viro@ZenIV.linux.org.uk Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org, dhowells@redhat.com, linux-cachefs@redhat.com, Geert Uytterhoeven <geert@linux-m68k.org>, linux-fsdevel@vger.kernel.org Subject: [PATCH 1/2] FS-Cache: Add missing initialization of ret in cachefiles_write_page() Date: Thu, 12 Nov 2015 11:46:23 +0000 [thread overview] Message-ID: <20151112114623.22585.41976.stgit@warthog.procyon.org.uk> (raw) In-Reply-To: <20151112114614.22585.81355.stgit@warthog.procyon.org.uk> 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);
WARNING: multiple messages have this Message-ID (diff)
From: David Howells <dhowells@redhat.com> To: viro@ZenIV.linux.org.uk Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org, linux-cachefs@redhat.com, Geert Uytterhoeven <geert@linux-m68k.org>, linux-fsdevel@vger.kernel.org Subject: [PATCH 1/2] FS-Cache: Add missing initialization of ret in cachefiles_write_page() Date: Thu, 12 Nov 2015 11:46:23 +0000 [thread overview] Message-ID: <20151112114623.22585.41976.stgit@warthog.procyon.org.uk> (raw) In-Reply-To: <20151112114614.22585.81355.stgit@warthog.procyon.org.uk> 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); -- Linux-cachefs mailing list Linux-cachefs@redhat.com https://www.redhat.com/mailman/listinfo/linux-cachefs
next prev parent reply other threads:[~2015-11-12 11:46 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-11-12 11:46 [PATCH 0/2] FS-Cache: More miscellany David Howells 2015-11-12 11:46 ` David Howells [this message] 2015-11-12 11:46 ` [PATCH 1/2] FS-Cache: Add missing initialization of ret in cachefiles_write_page() David Howells 2015-11-12 11:46 ` [PATCH 2/2] MAINTAINERS: linux-cachefs@redhat.com is moderated for non-subscribers David Howells -- strict thread matches above, loose matches on Subject: below -- 2015-11-12 11:43 [PATCH 0/2] FS-Cache: More miscellany David Howells 2015-11-12 11:43 ` [PATCH 1/2] FS-Cache: Add missing initialization of ret in cachefiles_write_page() David Howells 2015-11-12 11:43 ` David Howells
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20151112114623.22585.41976.stgit@warthog.procyon.org.uk \ --to=dhowells@redhat.com \ --cc=geert@linux-m68k.org \ --cc=linux-cachefs@redhat.com \ --cc=linux-fsdevel@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-nfs@vger.kernel.org \ --cc=viro@ZenIV.linux.org.uk \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.