active_mm

Pete Wyckoff <[email protected]>
Newsgroups gmane.network.myrinet.general
Message-ID <[email protected]>
With 2.4.0-test10 and 1.4pre43 I found I was getting an oops every time
a process which had /dev/gm* opened would exit.  Here's the fix:

Index: gm_arch.c
===================================================================
RCS file: /ufs/src/repositories/gm/drivers/linux/gm/gm_arch.c,v
retrieving revision 1.182
diff -u -r1.182 gm_arch.c
--- gm_arch.c   2000/12/20 23:42:08     1.182
+++ gm_arch.c   2000/12/21 20:21:50
@@ -623,7 +623,7 @@
 #warning **************************************************************
 #endif
        {
-               pgd = pgd_offset(gm_current->mm, addr);
+               pgd = pgd_offset(gm_current->active_mm, addr);
        }
        GM_PRINT (GM_DEBUG_KVIRT_TO_PHYS,
                          ("kvirt_to_phys pgd = 0x%lx\n", *pgd));


The problem is that an exiting process has already entered lazy mm state
before exit_files is called to close /dev/gm*, so access through current->mm
is invalid.  This is x86 smp no highmem, hopefully similar for other arches
and configs.

		-- Pete
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.