From: David Howells Subject: [PATCH 1/2] FS-Cache: Add missing initialization of ret in cachefiles_write_page() Date: Thu, 12 Nov 2015 11:43:54 +0000 Message-ID: <20151112114354.22379.16214.stgit@warthog.procyon.org.uk> References: <20151112114344.22379.19320.stgit@warthog.procyon.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-cachefs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, Geert Uytterhoeven , linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: viro-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org Return-path: In-Reply-To: <20151112114344.22379.19320.stgit-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org> Sender: linux-nfs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-fsdevel.vger.kernel.org =46rom: Geert Uytterhoeven fs/cachefiles/rdwr.c: In function =E2=80=98cachefiles_write_page=E2=80=99= : fs/cachefiles/rdwr.c:882: warning: =E2=80=98ret=E2=80=99 may be used un= initialized 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. =46ixes: 102f4d900c9c8f5e ("FS-Cache: Handle a write to the page immedi= ately beyond the EOF marker") Signed-off-by: Geert Uytterhoeven Signed-off-by: David Howells --- 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 *o= p, struct page *page) loff_t pos, eof; size_t len; void *data; - int ret; + int ret =3D -ENOBUFS; =20 ASSERT(op !=3D NULL); ASSERT(page !=3D NULL); -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html