From: Duncan Sands <baldrick@wanadoo.fr>
To: linux-kernel@vger.kernel.org
Cc: Andi Kleen <ak@suse.de>
Subject: Another use of sti in entry.S question
Date: Fri, 23 May 2003 00:05:14 +0200 [thread overview]
Message-ID: <200305230005.14394.baldrick@wanadoo.fr> (raw)
In-Reply-To: <200305220939.13619.baldrick@wanadoo.fr>
Here is another place where interrupts get turned on in a called
function:
work_resched disables interrupts and falls through to work_notifysig.
work_notifysig calls do_notify_resume.
do_notify_resume calls do_signal.
do_signal calls get_signal_to_deliver.
get_signal_to_deliver does an spin_unlock_irq before returning,
enabling interrupts.
Is this a bug?
work_resched:
sti
call schedule
cli # make sure we don't miss an interrupt
# setting need_resched or sigpending
# between sampling and the iret
movl TI_FLAGS(%ebp), %ecx
andl $_TIF_WORK_MASK, %ecx # is there any work to be done other
# than syscall tracing?
jz restore_all
testb $_TIF_NEED_RESCHED, %cl
jnz work_resched
work_notifysig: # deal with pending signals and
# notify-resume requests
testl $VM_MASK, EFLAGS(%esp)
movl %esp, %eax
jne work_notifysig_v86 # returning to kernel-space or
# vm86-space
xorl %edx, %edx
call do_notify_resume <== may enable interrupts
jmp restore_all
ALIGN
work_notifysig_v86:
pushl %ecx
call save_v86_state
popl %ecx
movl %eax, %esp
xorl %edx, %edx
call do_notify_resume <== may enable interrupts
jmp restore_all
prev parent reply other threads:[~2003-05-22 21:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-22 7:39 Use " Duncan Sands
2003-05-22 22:05 ` Duncan Sands [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200305230005.14394.baldrick@wanadoo.fr \
--to=baldrick@wanadoo.fr \
--cc=ak@suse.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®