lkml.org 
[lkml]   [2000]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: bug in scsi.c
On Thu, 7 Dec 2000, Alan Cox wrote:

> Andreas is looking at a slightly older kernel, and was right for that. Every
> caller to daemonize either then did the file stuff or needed to and forgot
> so I fixed daemonize

I think, there ist still a small bug.
(This time I even checked 2.4.0-test12-pre8)

In linux/arch/i386/kernel/process.c, function kernel_thread, line 453 the
flag CLONE_VM is always used.

In sched.c, function daemonize, line 1216 you call exit_mm.

Since the memory is cloned, you will take away the mem from your
user-space-application as well. So if insmod is already running at that
time, it has to segvault. If I am not wrong at this point CLONE_VM simply
has to be removed from kernel_thread. The kernel-thread will free his mem
in daemonize (calling exit_mm) and the user-space-application will free
the mem when exiting.

Bye,

-- Andreas Klein
asklein@cip.physik.uni-wuerzburg.de
root / webmaster @cip.physik.uni-wuerzburg.de
root / webmaster @www.physik.uni-wuerzburg.de
_____________________________________
| |
| Long live our gracious AMIGA! |
|___________________________________|



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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