[-mm patch] do_revoke error handling (was Re: 2.6.21-mm1)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Frederik Deweerdt
Date: Saturday, May 5, 2007 - 2:13 pm

On Sat, May 05, 2007 at 01:49:55AM -0700, Andrew Morton wrote:
fs/revoke.c: In function 'do_revoke':
fs/revoke.c:563: warning: 'details.fset' may be used uninitialized in this function
fs/revoke.c:563: warning: 'details.restore_start' may be used uninitialized in this function

It seems that we should goto 'out_free_table' if an error happens in
the mainloop. Otherwise 'details' is passed to restore_files() without
being initialized.

Regards,
Frederik

Signed-off-by: Frederik Deweerdt <frederik.deweerdt@gmail.com>
diff --git a/fs/revoke.c b/fs/revoke.c
index 1f2e3ef..6ab5223 100644
--- a/fs/revoke.c
+++ b/fs/revoke.c
@@ -611,7 +611,7 @@ static int do_revoke(struct inode *inode, struct file *to_exclude)
 	read_unlock(&tasklist_lock);
 
 	if (err)
-		goto out_restore;
+		goto out_free_table;
 
 	/*
 	 * Take down shared memory mappings.
@@ -623,7 +623,7 @@ static int do_revoke(struct inode *inode, struct file *to_exclude)
  	 */
 	err = revoke_break_cow(fset, inode, to_exclude);
 	if (err)
-		goto out_restore;
+		goto out_free_table;
 
 	details.fset = fset;
 	details.restore_start = 0;
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
2.6.21-mm1, Andrew Morton, (Sat May 5, 1:49 am)
Re: 2.6.21-mm1, Pekka Enberg, (Sat May 5, 3:36 am)
Re: 2.6.21-mm1, Gabriel C, (Sat May 5, 3:54 am)
[-mm patch] mutex.h bogus __must_check (was Re: 2.6.21-mm1), Frederik Deweerdt, (Sat May 5, 5:14 am)
Re: 2.6.21-mm1, Maciej Rutecki, (Sat May 5, 8:48 am)
Re: 2.6.21-mm1, Gabriel C, (Sat May 5, 9:09 am)
[-mm patch] fix fs/nfs/nfsroot.c compile error, Adrian Bunk, (Sat May 5, 9:44 am)
[-mm patch] fix unionfs compilation, Adrian Bunk, (Sat May 5, 10:00 am)
Re: 2.6.21-mm1, Gabriel C, (Sat May 5, 10:18 am)
Re: [-mm patch] fix fs/nfs/nfsroot.c compile error, Trond Myklebust, (Sat May 5, 10:20 am)
Re: [-mm patch] fix fs/nfs/nfsroot.c compile error, Trond Myklebust, (Sat May 5, 10:27 am)
[-mm patch] the OLPC laptop is not available for $100, Adrian Bunk, (Sat May 5, 10:30 am)
Re: 2.6.21-mm1, Valdis.Kletnieks, (Sat May 5, 11:10 am)
Re: 2.6.21-mm1, Andrew Morton, (Sat May 5, 11:48 am)
Re: [-mm patch] fix unionfs compilation, Andrew Morton, (Sat May 5, 11:57 am)
Re: [-mm patch] fix unionfs compilation, Adrian Bunk, (Sat May 5, 12:09 pm)
Re: [-mm patch] fix unionfs compilation, Josef Sipek, (Sat May 5, 12:13 pm)
Re: [-mm patch] fix unionfs compilation, Pekka Enberg, (Sat May 5, 12:19 pm)
Re: [-mm patch] fix unionfs compilation, Andrew Morton, (Sat May 5, 12:22 pm)
Re: [-mm patch] fix unionfs compilation, Josef Sipek, (Sat May 5, 12:23 pm)
acpi_handle is intel only., Olaf Hering, (Sat May 5, 1:29 pm)
Re: [-mm patch] fix unionfs compilation, Josef Sipek, (Sat May 5, 1:31 pm)
[-mm patch] do_revoke error handling (was Re: 2.6.21-mm1), Frederik Deweerdt, (Sat May 5, 2:13 pm)
Re: [-mm patch] do_revoke error handling (was Re: 2.6.21-mm1), Frederik Deweerdt, (Sat May 5, 2:47 pm)
Re: 2.6.21-mm1, Michael Buesch, (Sat May 5, 2:48 pm)
Re: 2.6.21-mm1, John W. Linville, (Sat May 5, 3:25 pm)
Re: 2.6.21-mm1, Simon Arlott, (Sat May 5, 4:22 pm)
Re: 2.6.21-mm1, Valdis.Kletnieks, (Sat May 5, 11:49 pm)
Re: 2.6.21-mm1, Simon Arlott, (Sun May 6, 7:59 am)
2.6.21-mm1: DRM does kmalloc(0) sometimes?, Alexey Dobriyan, (Sun May 6, 12:00 pm)
Re: 2.6.21-mm1, Andrew Morton, (Sun May 6, 1:08 pm)
Re: 2.6.21-mm1, Sam Ravnborg, (Sun May 6, 1:23 pm)
Re: 2.6.21-mm1, Simon Arlott, (Sun May 6, 1:36 pm)
Re: 2.6.21-mm1, Andrew Morton, (Sun May 6, 1:54 pm)
Re: 2.6.21-mm1, Sam Ravnborg, (Sun May 6, 1:57 pm)
Re: 2.6.21-mm1, Satyam Sharma, (Sun May 6, 2:04 pm)
Re: [-mm patch] the OLPC laptop is not available for $100, Anton Vorontsov, (Sun May 6, 2:04 pm)
Re: 2.6.21-mm1, Simon Arlott, (Sun May 6, 2:07 pm)
Re: 2.6.21-mm1, Andrew Morton, (Sun May 6, 2:08 pm)
Re: 2.6.21-mm1, Simon Arlott, (Sun May 6, 2:13 pm)
Re: 2.6.21-mm1, Satyam Sharma, (Sun May 6, 2:13 pm)
Re: 2.6.21-mm1, Andrew Morton, (Sun May 6, 2:22 pm)
Re: 2.6.21-mm1, Sam Ravnborg, (Sun May 6, 2:27 pm)
Re: [-mm patch] get_unmapped_area: remove now unused ret v ..., Benjamin Herrenschmidt, (Sun May 6, 2:45 pm)
Re: [-mm patch] fix fs/nfs/nfsroot.c compile error , David Howells, (Mon May 7, 3:47 am)
Re: [-mm patch] fix fs/nfs/nfsroot.c compile error, Adrian Bunk, (Mon May 7, 3:56 am)
Re: 2.6.21-mm1, Cornelia Huck, (Mon May 7, 4:04 am)
Re: [-mm patch] fix fs/nfs/nfsroot.c compile error, Trond Myklebust, (Mon May 7, 6:12 am)
Re: [-mm patch] fix fs/nfs/nfsroot.c compile error , David Howells, (Mon May 7, 8:49 am)
Re: 2.6.21-mm1, J.A. , (Mon May 7, 9:06 am)
Re: sleeping function called from invalid context at block ..., Jeremy Fitzhardinge, (Mon May 7, 9:31 pm)
Re: sleeping function called from invalid context at block ..., William Lee Irwin III, (Mon May 7, 10:31 pm)
Re: sleeping function called from invalid context at block ..., Jeremy Fitzhardinge, (Mon May 7, 10:38 pm)
Re: sleeping function called from invalid context at block ..., William Lee Irwin III, (Mon May 7, 11:03 pm)
Re: acpi_handle is intel only., Zhang, Yanmin, (Mon May 7, 11:11 pm)
Re: 2.6.21-mm1 -- x86 verify_cpu.S compile failure, Andy Whitcroft, (Tue May 8, 2:46 am)
Re: sleeping function called from invalid context at block ..., William Lee Irwin III, (Tue May 8, 3:46 am)
Re: 2.6.21-mm1, Andy Whitcroft, (Tue May 8, 6:04 am)
Re: 2.6.21-mm1 -- x86 verify_cpu.S compile failure, Andi Kleen, (Tue May 8, 8:24 am)
Re: 2.6.21-mm1, Christoph Lameter, (Tue May 8, 9:07 am)
kmem_cache_init failure (was Re: 2.6.21-mm1), Frederik Deweerdt, (Tue May 8, 10:22 am)
Re: kmem_cache_init failure (was Re: 2.6.21-mm1), Andrew Morton, (Tue May 8, 12:35 pm)
Re: kmem_cache_init failure (was Re: 2.6.21-mm1), Andi Kleen, (Tue May 8, 3:12 pm)
2.6.21-mm1 and now 2.6.21-git: SLUB Crashes on boot, Kevin Winchester, (Tue May 8, 3:48 pm)
Re: 2.6.21-mm1 and now 2.6.21-git: SLUB Crashes on boot, Christoph Lameter, (Tue May 8, 4:04 pm)
Re: 2.6.21-mm1 and now 2.6.21-git: SLUB Crashes on boot, Christoph Lameter, (Tue May 8, 4:08 pm)
Re: 2.6.21-mm1 and now 2.6.21-git: SLUB Crashes on boot, Kevin Winchester, (Tue May 8, 4:33 pm)
Re: 2.6.21-mm1 and now 2.6.21-git: SLUB Crashes on boot, Christoph Lameter, (Tue May 8, 4:43 pm)
Re: kmem_cache_init failure (was Re: 2.6.21-mm1), Frederik Deweerdt, (Tue May 8, 4:47 pm)
Re: 2.6.21-mm1 and now 2.6.21-git: SLUB Crashes on boot, Christoph Lameter, (Tue May 8, 4:57 pm)
kmem_cache_init failure (was Re: 2.6.21-mm1), Jan Beulich, (Wed May 9, 12:40 am)
Re: 2.6.21-mm1 -- x86 verify_cpu.S compile failure, Andy Whitcroft, (Wed May 9, 1:49 am)
Re: kmem_cache_init failure (was Re: 2.6.21-mm1), Andi Kleen, (Wed May 9, 2:00 am)
Re: kmem_cache_init failure (was Re: 2.6.21-mm1), Frederik Deweerdt, (Wed May 9, 5:26 am)
Re: 2.6.21-mm1 -- x86 verify_cpu.S compile failure, Andy Whitcroft, (Wed May 9, 9:06 am)
Re: kmem_cache_init failure (was Re: 2.6.21-mm1), Frederik Deweerdt, (Wed May 9, 11:04 am)
Re: 2.6.21-mm1 -- x86 verify_cpu.S compile failure, Andy Whitcroft, (Thu May 10, 1:33 am)
Re: 2.6.21-mm1 and now 2.6.21-git: SLUB Crashes on boot - ..., Kevin Winchester, (Thu May 10, 4:10 am)
Re: 2.6.21-mm1 and now 2.6.21-git: SLUB Crashes on boot - ..., Luca Tettamanti, (Mon May 14, 10:38 am)
Re: 2.6.21-mm1 and now 2.6.21-git: SLUB Crashes on boot - ..., Luca Tettamanti, (Tue May 15, 11:52 am)
Re: 2.6.21-mm1 and now 2.6.21-git: SLUB Crashes on boot - ..., Luca Tettamanti, (Thu May 17, 10:46 am)
Re: 2.6.21-mm1 and now 2.6.21-git: SLUB Crashes on boot - ..., Luca Tettamanti, (Fri May 18, 12:16 pm)
mach64 breakage in 2.6.22 , Olaf Hering, (Thu Jun 14, 1:25 am)
Re: mach64 breakage in 2.6.22, Ville , (Thu Jun 14, 10:36 am)
Re: mach64 breakage in 2.6.22, Olaf Hering, (Mon Jun 18, 7:45 am)
Re: mach64 breakage in 2.6.22, Ville , (Thu Jun 21, 10:25 am)
Re: mach64 breakage in 2.6.22, Olaf Hering, (Fri Jun 22, 9:06 am)