Re: [PATCH] arch/frv/kernel/sys_frv.c: add missing fput

From: David Howells
Date: Thu Nov 27 2008 - 10:06:17 EST


Julia Lawall <julia@xxxxxxx> wrote:

> - if (pgoff & ((1<<(PAGE_SHIFT-12))-1))
> - return -EINVAL;
> + if (pgoff & ((1<<(PAGE_SHIFT-12))-1)) {
> + error = -EINVAL;
> + goto out_file;
> + }

There's a better way to fix this. The check on pgoff should be done before
fget() is called.

David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/