Re: [PATCH] [resend] VFS locking errors on max offset edge cases

From: Frank Denis (Jedi/Sector One)
Date: Thu Dec 23 2004 - 20:09:25 EST


On Thu, Dec 23, 2004 at 03:01:20PM -0800, Bruce Allan wrote:
> Patch created against 2.6.10-rc3, tested on ppc64 with both
> _FILE_OFFSET_BITS set to 32 and 64.
> diff -Nurp -X dontdiff linux-2.6.10-rc3-vanilla/fs/compat.c linux-2.6.10-rc3/fs/compat.c
> + if ((cmd == F_GETLK) &&
> + ((f.l_start > COMPAT_OFF_T_MAX) ||
> + ((f.l_start + f.l_len - 1) > COMPAT_OFF_T_MAX))) {
> + ret = -EOVERFLOW;
> + break;
> + }
> + }

One extra },

> + if ((cmd == F_GETLK64) &&
> + ((f.l_start > COMPAT_LOFF_T_MAX) ||
> + ((f.l_start + f.l_len - 1) > COMPAT_LOFF_T_MAX))) {
> + ret = -EOVERFLOW;
> + break;
> + }
> + }

Another extra }.

How could have this patch been tested?


-
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/