Re: Meaning of a kernel oops?

Bill Hawes (whawes@star.net)
Wed, 24 Sep 1997 14:39:20 -0400


This is a multi-part message in MIME format.
--------------E7A09DD0832FC10F716FCF14
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Anne wrote:
> Ok, re-compiled kernel w/o modules and the problem didn't go away.
> However, the stack trace still looks a bit sparse. I tried 2.0.30 again,
> with and without modules, and it still doesn't exhibit the problem.

Hi Anne,

I think I see what's causing your squake problem. It looks like a
possible race condition whereby a task has an mm struct but no page dir
yet.

Could you try the attached patch and see whether the error message
prints out? It may not fix the problem, but this will help confirm the
diagnosis.

Regards,
Bill
--------------E7A09DD0832FC10F716FCF14
Content-Type: text/plain; charset=us-ascii; name="vmalloc_31-patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="vmalloc_31-patch"

--- mm/vmalloc.c.old Mon Aug 5 03:13:55 1996
+++ mm/vmalloc.c Wed Sep 24 14:18:02 1997
@@ -30,11 +30,18 @@
static inline void set_pgdir(unsigned long address, pgd_t entry)
{
struct task_struct * p;
+ pgd_t * pgd;

for_each_task(p) {
if (!p->mm)
continue;
- *pgd_offset(p->mm,address) = entry;
+ pgd = pgd_offset(p->mm, address);
+ if (!pgd) {
+ printk("set_pgdir: no pgd! task=%p, pgd=%p\n",
+ p, p->mm->pgd);
+ continue;
+ }
+ *pgd = entry;
}
}

@@ -109,7 +116,8 @@
flush_tlb_all();
}

-static inline int alloc_area_pte(pte_t * pte, unsigned long address, unsigned long size)
+static int
+alloc_area_pte(pte_t * pte, unsigned long address, unsigned long size)
{
unsigned long end;

@@ -131,7 +139,8 @@
return 0;
}

-static inline int alloc_area_pmd(pmd_t * pmd, unsigned long address, unsigned long size)
+static int
+alloc_area_pmd(pmd_t * pmd, unsigned long address, unsigned long size)
{
unsigned long end;

--------------E7A09DD0832FC10F716FCF14--