[OpenAFS-devel] [PATCH] fix openafs crashes on linux
2.6.10-2.6.12, and all RHEL4 kernels
Jeffrey Hutzelman
jhutz@cmu.edu
Tue, 08 May 2007 15:04:58 -0400
On Tuesday, May 08, 2007 12:23:40 PM -0400 Derrick J Brashear
<shadow@dementia.org> wrote:
> On Tue, 8 May 2007, chas williams - CONTRACTOR wrote:
>
>> In message
>> <Pine.GSO.4.61-042.0705081205540.1487@johnstown.andrew.cmu.edu>,Derr ick
>> J Brashear writes:
>>> allocate an extra amount of memory for each allocation, making it
>>> aligned, and put a tag saying how to free it in each allocation, then
>>> the alloc/free package and not the caller can decide how to allocate.
>>
>> this doesnt resolve the issue of 'is it safe for me to perform my
>> operation with the memory the allocator gave me?' for instance,
>> it might not be safe to performance certain operations under a
>> lock with pageable (from vmalloc) memory.
>
> set a flag when you get the memory to ask for what you need.
>
> of course, if you ask for non-pageable memory and you can't get it, then
> what?
Fortunately, we don't have this problem, because callers in AFS make no
distinction regarding what kind of memory they get. This is not a
general-purpose public interface; it's an interface for use within AFS, and
so it's entirely reasonable to make assumptions and then insure (in the
memory allocator) that those assumptions are true.
-- JEff