* lowlatency patch question
@ 2004-01-11 3:31 shai
2004-01-11 9:48 ` Arjan van de Ven
0 siblings, 1 reply; 2+ messages in thread
From: shai @ 2004-01-11 3:31 UTC (permalink / raw)
To: linux-kernel
Hi,
I think the following is a bug that can affect kernels patched with
lowlatency, such as Audio
and RedHat AS2.1.
lowlatency patch added conditional_schedule() to be called from
close_files(
) at kernel/exit.c, which seems to raise a problem if the
process had LDT entries.
If it had LDT, at the stage of close_files(
) the tsk->mm already zeroed
(__exit_mm(
), which comes before __exit_files(
) in do_exit(
)). If
conditional_schedule() at close_files(
) will succeed, switching back into
this process (that now have zeroed tsk->mm) will fail since the kernel will
not use the right LDT (since tsk->mm was zeroed, so switch_mm(
) will not be
called to load the LDT at schedule()).
Switching back to a process that had a register that used the LDT will fail
since the register probably points to non-valid LDT entry (since we are
using the wrong LDT), which will lead to a segmentation fault.
--Shai
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: lowlatency patch question
2004-01-11 3:31 lowlatency patch question shai
@ 2004-01-11 9:48 ` Arjan van de Ven
0 siblings, 0 replies; 2+ messages in thread
From: Arjan van de Ven @ 2004-01-11 9:48 UTC (permalink / raw)
To: shai; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1137 bytes --]
> lowlatency patch added conditional_schedule() to be called from
> close_files() at kernel/exit.c, which seems to raise a problem if the
> process had LDT entries.
> If it had LDT, at the stage of close_files() the tsk->mm already zeroed
> (__exit_mm(), which comes before __exit_files() in do_exit()). If
> conditional_schedule() at close_files() will succeed, switching back into
> this process (that now have zeroed tsk->mm) will fail since the kernel will
> not use the right LDT (since tsk->mm was zeroed, so switch_mm() will not be
> called to load the LDT at schedule()).
since closing of files can sleep anyway I don't see how this schedule
point could introduce a bug.
> Switching back to a process that had a register that used the LDT will fail
> since the register probably points to non-valid LDT entry (since we are
> using the wrong LDT), which will lead to a segmentation fault.
Do you have an oops? Could you file that in RH bugzilla
(bugzilla.redhat.com) ? RH bugzilla is a far more appropriate place to
report bugs in the RH vendor kernels than lkml is.
Greetings,
Arjan van de Ven
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-01-11 9:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-11 3:31 lowlatency patch question shai
2004-01-11 9:48 ` Arjan van de Ven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox