Re: IS_ERR Threshold Value

From: Erik Frederiksen
Date: Wed Jun 28 2006 - 19:12:02 EST


Hi Nathan,

On Wed, 2006-06-28 at 16:41, Nathan Scott wrote:
>
> Hmm, I'm not sure I understand the XFS side of your report here - on
> open, for quota to be coming into play we must be creating a new inode
> and those code paths inside XFS have no use of IS_ERR/ERR_PTR magic...
> did you mean there's generic problems here (I can see those macros are
> used in the generic VFS open() code) ... or am I missing your point?

Yes, that's right. The error is being returned from xfs_create when
quota has been exceeded. It ends up carrying back to the filp_open call
in do_sys_open, which returns it as a pointer to a filp structure.
Because the errno is so large, IS_ERR reports it as being a valid
pointer incorrectly.

XFS has acted correctly. The only reason I bring it up is this is how
the bug was brought to my attention.

If there won't be any strange side effects (I don't have the experience
to accurately comment on this), I think turning the threshold value up
to something we can get away with in IS_ERR_VALUE() would be
appropriate.

-erik

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