[PATCH] fix broken vm86 interrupt/signal handling
authorAleksey Gorelov <Aleksey_Gorelov@Phoenix.com>
Tue, 27 Jun 2006 09:53:48 +0000 (02:53 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 28 Jun 2006 00:32:38 +0000 (17:32 -0700)
commit4031ff388138b58e5cd472dccce38828bcb8c706
treef2c88fdcdef3ec9880d23ce271f14e95f7aa1cf5
parentc723e084606ca1c81e91b80b2c0c44bde7bbc4df
[PATCH] fix broken vm86 interrupt/signal handling

Commit c3ff8ec31c1249d268cd11390649768a12bec1b9 ("[PATCH] i386: Don't
miss pending signals returning to user mode after signal processing")
meant that vm86 interrupt/signal handling got broken for the case when
vm86 is called from kernel space.

In this scenario, if signal is pending because of vm86 interrupt,
do_notify_resume/do_signal exits immediately due to user_mode() check,
without processing any signals.  Thus, resume_userspace handler is spinning
in a tight loop with signal pending and TIF_SIGPENDING is set.  Previously
everything worked Ok.

No in-tree usage of vm86() from kernel space exists, but I've heard
about a number of projects out there which use vm86 calls from kernel,
one of them being this, for instance:

http://dev.gentoo.org/~spock/projects/vesafb-tng/

The following patch fixes the issue.

Signed-off-by: Aleksey Gorelov <aleksey_gorelov@phoenix.com>
Cc: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/i386/kernel/entry.S