Re: [PATCH] FS-Cache: Add missing initialization of ret in cachefiles_write_page()

2015-11-12 Thread Geert Uytterhoeven
On Thu, Nov 12, 2015 at 11:42 AM, David Howells wrote: > Geert Uytterhoeven wrote: > >> > This isn't quite the right solution. The uninitialised error path needs to >> > set -ENOBUFS. >> >> That's what your commit 102f4d900c9c8f5e ("FS-Cache: Handle a write to the >> page immediately beyond the

Re: [PATCH] FS-Cache: Add missing initialization of ret in cachefiles_write_page()

2015-11-12 Thread David Howells
Geert Uytterhoeven wrote: > > This isn't quite the right solution. The uninitialised error path needs to > > set -ENOBUFS. > > That's what your commit 102f4d900c9c8f5e ("FS-Cache: Handle a write to the > page immediately beyond the EOF marker") does, and is also in its commit > description: >

Re: [PATCH] FS-Cache: Add missing initialization of ret in cachefiles_write_page()

2015-11-12 Thread Geert Uytterhoeven
Hi David, On Thu, Nov 12, 2015 at 11:15 AM, David Howells wrote: > Geert Uytterhoeven wrote: > >> - int ret; >> + int ret = 0; > > This isn't quite the right solution. The uninitialised error path needs to > set -ENOBUFS. That's what your commit 102f4d900c9c8f5e ("FS-Cache: Handle a

Re: [PATCH] FS-Cache: Add missing initialization of ret in cachefiles_write_page()

2015-11-12 Thread David Howells
Geert Uytterhoeven wrote: > - int ret; > + int ret = 0; This isn't quite the right solution. The uninitialised error path needs to set -ENOBUFS. Unfortunately, my compiler doesn't show a warning:-/ David -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

Re: [PATCH] FS-Cache: Add missing initialization of ret in cachefiles_write_page()

2015-11-12 Thread Geert Uytterhoeven
On Thu, Nov 12, 2015 at 11:42 AM, David Howells wrote: > Geert Uytterhoeven wrote: > >> > This isn't quite the right solution. The uninitialised error path needs to >> > set -ENOBUFS. >> >> That's what your commit 102f4d900c9c8f5e ("FS-Cache: Handle a

Re: [PATCH] FS-Cache: Add missing initialization of ret in cachefiles_write_page()

2015-11-12 Thread David Howells
Geert Uytterhoeven wrote: > - int ret; > + int ret = 0; This isn't quite the right solution. The uninitialised error path needs to set -ENOBUFS. Unfortunately, my compiler doesn't show a warning:-/ David -- To unsubscribe from this list: send the line

Re: [PATCH] FS-Cache: Add missing initialization of ret in cachefiles_write_page()

2015-11-12 Thread Geert Uytterhoeven
Hi David, On Thu, Nov 12, 2015 at 11:15 AM, David Howells wrote: > Geert Uytterhoeven wrote: > >> - int ret; >> + int ret = 0; > > This isn't quite the right solution. The uninitialised error path needs to > set -ENOBUFS. That's what your

Re: [PATCH] FS-Cache: Add missing initialization of ret in cachefiles_write_page()

2015-11-12 Thread David Howells
Geert Uytterhoeven wrote: > > This isn't quite the right solution. The uninitialised error path needs to > > set -ENOBUFS. > > That's what your commit 102f4d900c9c8f5e ("FS-Cache: Handle a write to the > page immediately beyond the EOF marker") does, and is also in its

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

2015-11-11 Thread Geert Uytterhoeven
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:

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

2015-11-11 Thread Geert Uytterhoeven
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: