lkml.org 
[lkml]   [2007]   [Jun]   [12]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateMon, 11 Jun 2007 23:58:30 -0700
FromWilliam Lee Irwin III <>
SubjectRe: [shm][hugetlb] Fix get_policy for stacked shared memory files
On Tue, Jun 12, 2007 at 12:20:52AM -0600, Eric W. Biederman wrote:
> Does this perhaps need to be:
>> diff --git a/ipc/shm.c b/ipc/shm.c
>> index 4fefbad..8d2672d 100644
>> --- a/ipc/shm.c
>> +++ b/ipc/shm.c
>> @@ -254,8 +254,10 @@ struct mempolicy *shm_get_policy(struct vm_area_struct
>> *vma, unsigned long addr)
>> 
>> +	pol = NULL;
>> 
>>  	if (sfd->vm_ops->get_policy)
>>  		pol = sfd->vm_ops->get_policy(vma, addr);
>> -	else
>> +	else if (vma->vm_policy && vma->vm_policy->policy != MPOL_DEFAULT)
>>  		pol = vma->vm_policy;
>>  	return pol;

Those paths are above the level where shm_get_policy() is called.
It may be that shm_get_policy() doesn't need to recapitulate them 
if it's only ever called through such codepaths. It's not clear to
me whether that's intended as an invariant or is coincidental and
not guaranteed for future callsites.


-- wli
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-06-12 06:59    [from the cache]
©2003-2008