From: "Aneesh Kumar K.V" Subject: Re: [PATCH -V3 3/8] hugetlb: add charge/uncharge calls for HugeTLB alloc/free Date: Wed, 14 Mar 2012 16:17:21 +0530 Message-ID: <87r4wv8nnq.fsf@linux.vnet.ibm.com> References: <1331622432-24683-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> <1331622432-24683-4-git-send-email-aneesh.kumar@linux.vnet.ibm.com> <20120313143654.5dd1243d.akpm@linux-foundation.org> Mime-Version: 1.0 Return-path: In-Reply-To: <20120313143654.5dd1243d.akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org> Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Andrew Morton Cc: linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, mgorman-l3A5Bk7waGM@public.gmane.org, kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org, dhillf-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, aarcange-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, mhocko-AlSwsSmVLrQ@public.gmane.org, hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On Tue, 13 Mar 2012 14:36:54 -0700, Andrew Morton wrote: > On Tue, 13 Mar 2012 12:37:07 +0530 > "Aneesh Kumar K.V" wrote: > > > + return ERR_PTR(-VM_FAULT_SIGBUS); > > whee, so we have (ab)used the err.h infrastructure to carry > VM_FAULT_foo codes, thus creating a secret requirement that the > VM_FAULT_foo values not exceed MAX_ERRNO. > > What a hack, whodidthat? e0dcd8a05be438b3d2e49ef61441ea3a463663f8. We only do that in hugetlb. I will add a cleanup patch that will return proper error and map them in the caller to return SIGBUS. -aneesh