[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-mm
Subject: Re: [PATCH -V7 02/14] hugetlbfs: don't use ERR_PTR with VM_FAULT* values
From: David Rientjes <rientjes () google ! com>
Date: 2012-05-31 6:50:18
Message-ID: alpine.DEB.2.00.1205302331380.25774 () chino ! kir ! corp ! google ! com
[Download RAW message or body]
On Thu, 31 May 2012, Aneesh Kumar K.V wrote:
> > Yeah, but is there a reason for using VM_FAULT_HWPOISON_LARGE_MASK since
> > that's the only VM_FAULT_* value that is greater than MAX_ERRNO? The rest
> > of your patch set doesn't require this, so I think this change should just
> > be dropped. (And PTR_ERR() still returns long, this wasn't fixed from my
> > original review.)
> >
>
> The changes was done as per Andrew's request so that we don't have such hidden
> dependencies on the values of VM_FAULT_*. Yes it can be a seperate patch from
> the patchset. I have changed int to long as per your review.
>
I think it confuscates the code, can't we just add something like
BUILD_BUG_ON() to ensure that PTR_ERR() never uses values that are outside
the bounds of MAX_ERRNO so we'll catch these at compile time if
mm/hugetlb.c or anything else is ever extended to use such values?
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic