Re: INFO: possible recursive locking detected: get_partial_node()on 3.2-rc1

From: Christoph Lameter
Date: Fri Nov 11 2011 - 10:02:12 EST


On Fri, 11 Nov 2011, Shaohua Li wrote:

> Looks this could be a real dead lock. we hold a lock to free a object,
> but the free need allocate a new object. if the new object and the freed
> object are from the same slab, there is a deadlock.

unfreeze partials is never called when going through get_partial_node()
so there is no deadlock AFAICT.

> discard_slab() doesn't need hold the lock if the slab is already removed
> from partial list. how about below patch, only compile tested.

In general I think it is good to move the call to discard_slab() out from
under the list_lock in unfreeze_partials(). Could you fold
discard_page_list into unfreeze_partials()? __flush_cpu_slab still calls
discard_page_list with disabled interrupts even after your patch.



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