Re: [myrinet] active_mm
Bob Felderman <[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:
=> {
=> - pgd = pgd_offset(gm_current->mm, addr);
=> + pgd = pgd_offset(gm_current->active_mm, addr);
=> }
=> 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.
Thanks! We'll code it as the following to allow the code to
still compile under linux-2.2 and linux-2.0.
diff -u -r1.182 gm_arch.c
--- drivers/linux/gm/gm_arch.c 2000/12/20 23:42:08 1.182
+++ drivers/linux/gm/gm_arch.c 2000/12/21 22:38:15
@@ -623,7 +623,11 @@
#warning **************************************************************
#endif
{
- pgd = pgd_offset(gm_current->mm, addr);
+#if LINUX_XX >= 24
+ pgd = pgd_offset(gm_current->active_mm, addr);
+#else
+ pgd = pgd_offset(gm_current->mm, addr);
+#endif
}
GM_PRINT (GM_DEBUG_KVIRT_TO_PHYS,
("kvirt_to_phys pgd = 0x%lx\n", *pgd));