Re: [patch 1/11] mm: Reimplementation of dynamic per-cpu allocator-- vmalloc_fixup

From: Andrew Morton
Date: Tue Sep 13 2005 - 14:26:23 EST


Ravikiran G Thirumalai <kiran@xxxxxxxxxxxx> wrote:
>
> Patch to add gfp_flags as args to __get_vm_area. alloc_percpu needs to use
> GFP flags as the dst_entry.refcount needs to be allocated with GFP_ATOMIC.
> Since alloc_percpu needs get_vm_area underneath, this patch changes
> __get_vmarea to accept gfp_flags as arg, so that alloc_percpu can use
> __get_vm_area. get_vm_area remains unchanged.

Is dst_alloc() ever called from IRQ or softirq contexts?

If so, __get_vm_area()'s write_lock(&vmlist_lock) is now deadlockable.

If not, then you've just added a restriction to dst_alloc()'s usage which
should be checked over by the net guys and which needs commenting in the code.

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