lkml.org 
[lkml]   [2004]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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/

\
 
 \ /
  Last update: 2005-03-22 14:02    [W:0.034 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site