[lkml]   [2000]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
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.


-- Andreas Klein
root / webmaster
root / webmaster
| |
| Long live our gracious AMIGA! |

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

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