> > > > - load_LDT(¤t->mm->context); /* This does lldt */
> > > > + load_LDT(¤t->active_mm->context); /* This does lldt */
> >
> > No one has still explained WHY kapmd's current->mm is NULL for some people,
> > while it obviously is non-NULL for many others.
>
> All kernel threads have current->mm = NULL, via daemonize()->exit_mm(). So
> the question becomes "why does this code get called by kernel threads for
> some people, and not for others"? Pavel?
I believe it depends on what process happens to be current at time of
suspend. That can be randomly kernel thread or user process.
Some people use APM, some people use ACPI, and sometimes APM suspend
is triggered because of BIOS, sometimes because user said apm -s...
> Also, is there any point in doing load_LDT(¤t->active_mm->context)
> for a kernel thread?
Yes, we want system to be similar state it was when we suspended, to
prevent heisenbugs.
Pavel
-- When do you have a heart between your knees? [Johanka's followup: and *two* hearts?] - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/