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

Pekka J Enberg
2007-05-05T21:23:18Z

On Sat, May 05, 2007 at 01:49:55AM -0700, Andrew Morton wrote:
> >
> > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.21/2.6.21-mm1/
> >
> 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

On Sat, 5 May 2007, Frederik Deweerdt wrote:
> 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.

Good catch. The patch is wrong, though. Wwe must restore the file
descriptors in case revoke fails; otherwise we'll leave non-revoked files
hanging. The proper fix is to move initialization before the
do_each_thread() bit. Care to make a new patch, Frederik?

Pekka