Messages in this thread | | | Date | Sun, 21 Nov 2004 19:56:41 +0100 | From | Manfred Spraul <> | Subject | Re: can kfree sleep? |
| |
Hi Peter,
>Just a question: can kfree sleep? > > > > No, it never sleeps. It's safe to call kfree from arbitrary context. The only exception is the NMI oopser and similar arch code.
>I believe so, but slab.c does not enlighten me immediately: > > Yes, the kfree code is quite long - it must check if freeing one object created a freeable page and return it to the page allocator. Together with lots of caching and debug checks.
-- Manfred
- 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/
| |