git: kernel - Major signal path adjustments to fix races, tsleep

看板DFBSD_commit作者時間14年前 (2011/11/16 07:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
commit 4643740aa6f3eac7d3dfab05967ec55b5d8ba984 Author: Matthew Dillon <dillon@apollo.backplane.com> Date: Tue Nov 15 15:23:41 2011 -0800 kernel - Major signal path adjustments to fix races, tsleep race fixes, +more * Refactor the signal code to properly hold the lp->lwp_token. In particular the ksignal() and lwp_signotify() paths. * The tsleep() path must also hold lp->lwp_token to properly handle lp->lwp_stat states and interlocks. * Refactor the timeout code in tsleep() to ensure that endtsleep() is only called from the proper context, and fix races between endtsleep() and lwkt_switch(). * Rename proc->p_flag to proc->p_flags * Rename lwp->lwp_flag to lwp->lwp_flags * Add lwp->lwp_mpflags and move flags which require atomic ops (are adjusted when not the current thread) to the new field. * Add td->td_mpflags and move flags which require atomic ops (are adjusted when not the current thread) to the new field. * Add some freeze testing code to the x86-64 trap code (default disabled). Summary of changes: lib/libkvm/kvm_proc.c | 4 +- sys/ddb/db_ps.c | 6 +- sys/dev/raid/vinum/.gdbinit.kernel | 12 +- sys/dev/raid/vinum/vinumdaemon.c | 2 +- sys/emulation/43bsd/43bsd_signal.c | 2 +- .../linux/i386/linprocfs/linprocfs_vnops.c | 2 +- sys/emulation/linux/i386/linux_ptrace.c | 6 +- sys/emulation/linux/i386/linux_sysvec.c | 6 +- sys/emulation/linux/linux_file.c | 2 +- sys/emulation/ndis/ntoskrnl_var.h | 2 +- sys/kern/init_main.c | 4 +- sys/kern/kern_acct.c | 2 +- sys/kern/kern_checkpoint.c | 2 +- sys/kern/kern_clock.c | 14 +- sys/kern/kern_descrip.c | 16 +- sys/kern/kern_exec.c | 18 +- sys/kern/kern_exit.c | 40 ++-- sys/kern/kern_fork.c | 18 +- sys/kern/kern_intr.c | 4 +- sys/kern/kern_jail.c | 2 +- sys/kern/kern_kinfo.c | 8 +- sys/kern/kern_kthread.c | 15 +- sys/kern/kern_ktrace.c | 2 +- sys/kern/kern_proc.c | 4 +- sys/kern/kern_prot.c | 6 +- sys/kern/kern_resource.c | 5 +- sys/kern/kern_sig.c | 230 +++++++++----------- sys/kern/kern_synch.c | 179 ++++++--------- sys/kern/kern_threads.c | 4 +- sys/kern/kern_time.c | 4 +- sys/kern/kern_timeout.c | 2 +- sys/kern/kern_upcall.c | 8 +- sys/kern/lwkt_thread.c | 18 +- sys/kern/subr_prf.c | 5 +- sys/kern/subr_prof.c | 2 +- sys/kern/subr_taskqueue.c | 4 +- sys/kern/sys_generic.c | 2 +- sys/kern/sys_process.c | 19 +- sys/kern/tty.c | 16 +- sys/kern/tty_pty.c | 3 +- sys/kern/tty_tty.c | 5 +- sys/kern/usched_bsd4.c | 35 ++-- sys/kern/usched_dummy.c | 16 +- sys/kern/vfs_journal.c | 4 +- sys/net/if.c | 2 +- sys/net/netisr.c | 2 +- sys/netproto/smb/smb_subr.c | 2 +- sys/platform/pc32/i386/db_trace.c | 2 +- sys/platform/pc32/i386/machdep.c | 2 +- sys/platform/pc32/i386/trap.c | 40 ++-- sys/platform/pc64/x86_64/machdep.c | 2 +- sys/platform/pc64/x86_64/trap.c | 62 ++++-- sys/platform/vkernel/i386/cpu_regs.c | 2 +- sys/platform/vkernel/i386/trap.c | 40 ++-- sys/platform/vkernel64/x86_64/cpu_regs.c | 2 +- sys/platform/vkernel64/x86_64/trap.c | 40 ++-- sys/sys/proc.h | 91 ++++---- sys/sys/signal2.h | 2 +- sys/sys/thread.h | 39 ++-- sys/sys/tty.h | 2 +- sys/vfs/procfs/procfs.h | 2 +- sys/vfs/procfs/procfs_ctl.c | 24 +- sys/vfs/procfs/procfs_dbregs.c | 4 +- sys/vfs/procfs/procfs_fpregs.c | 4 +- sys/vfs/procfs/procfs_map.c | 2 +- sys/vfs/procfs/procfs_mem.c | 4 +- sys/vfs/procfs/procfs_regs.c | 4 +- sys/vfs/procfs/procfs_status.c | 7 +- sys/vfs/procfs/procfs_type.c | 2 +- sys/vfs/procfs/procfs_vnops.c | 8 +- sys/vm/vm_fault.c | 11 +- sys/vm/vm_glue.c | 10 +- sys/vm/vm_meter.c | 10 +- sys/vm/vm_pageout.c | 6 +- 74 files changed, 586 insertions(+), 604 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/4643740aa6f3eac7d3dfab05967ec55b5d8ba984 -- DragonFly BSD source repository
文章代碼(AID): #1EmlPtYO (DFBSD_commit)