Messages in this thread | | | Date | Fri, 16 Apr 2004 09:22:43 -0700 | From | William Lee Irwin III <> | Subject | Re: vfree in timerfunciton causes kernel crash |
| |
On Fri, Apr 16, 2004 at 06:10:50PM +0200, Mikkel Christiansen wrote: > Idea: a module allocates memory (vmalloc) for userspace program which > then craches. > Due to lack of activity timer is expires and free's the unused memory > (vfree). > (see tc_core.c later in this mail for details) > Problem: when timer expires and vfree is called then kernel crashes - > or rather freezes silently. > Can anyone explain why this happens? a kernel bug? > Cheers > Mikkel > kernel 2.6.5
Use schedule_work() to do this from process context. It's a programming error (specifically a deadlock) to vfree() from interrupt context or with interrupts disabled.
-- 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/
| |