freebsd-nq/sys/kern
John Baldwin 593efaf9f7 Further refine the handling of stop signals in the NFS client. The
changes in r246417 were incomplete as they did not add explicit calls to
sigdeferstop() around all the places that previously passed SBDRY to
_sleep().  In addition, nfs_getcacheblk() could trigger a write RPC from
getblk() resulting in sigdeferstop() recursing.  Rather than manually
deferring stop signals in specific places, change the VFS_*() and VOP_*()
methods to defer stop signals for filesystems which request this behavior
via a new VFCF_SBDRY flag.  Note that this has to be a VFC flag rather than
a MNTK flag so that it works properly with VFS_MOUNT() when the mount is
not yet fully constructed.  For now, only the NFS clients are set this new
flag in VFS_SET().

A few other related changes:
- Add an assertion to ensure that TDF_SBDRY doesn't leak to userland.
- When a lookup request uses VOP_READLINK() to follow a symlink, mark
  the request as being on behalf of the thread performing the lookup
  (cnp_thread) rather than using a NULL thread pointer.  This causes
  NFS to properly handle signals during this VOP on an interruptible
  mount.

PR:		kern/176179
Reported by:	Russell Cattelan (sigdeferstop() recursion)
Reviewed by:	kib
MFC after:	1 month
2013-02-21 19:02:50 +00:00
..
bus_if.m
capabilities.conf
clock_if.m
cpufreq_if.m
device_if.m
dtio_kdtrace.c
genassym.sh
imgact_aout.c
imgact_elf32.c
imgact_elf64.c
imgact_elf.c Remove the ia64-specific code fragment, which effect is more cleanly 2013-02-10 20:08:33 +00:00
imgact_gzip.c
imgact_shell.c
inflate.c
init_main.c print compiler version in the kernel banner 2013-02-02 11:58:35 +00:00
init_sysent.c
kern_acct.c
kern_alq.c
kern_clock.c Mark 'ticks', 'time_second', and 'time_uptime' as volatile to prevent the 2013-01-28 19:38:13 +00:00
kern_clocksource.c Get time of next event from other cores only if SMP is already started. 2013-02-01 11:39:03 +00:00
kern_condvar.c
kern_conf.c
kern_cons.c
kern_context.c
kern_cpu.c
kern_cpuset.c
kern_ctf.c
kern_descrip.c Don't treat pointers as booleans. 2013-02-17 11:47:30 +00:00
kern_dtrace.c
kern_environment.c
kern_et.c
kern_event.c
kern_exec.c When vforked child is traced, the debugging events are not generated 2013-02-07 15:34:22 +00:00
kern_exit.c When vforked child is traced, the debugging events are not generated 2013-02-07 15:34:22 +00:00
kern_fail.c
kern_ffclock.c
kern_fork.c Remove redundant parenthesis. 2013-02-17 11:47:01 +00:00
kern_gzio.c
kern_hhook.c
kern_idle.c
kern_intr.c If an interrupt event's assign_cpu method fails, then restore the original 2013-02-07 06:48:47 +00:00
kern_jail.c
kern_khelp.c
kern_kthread.c
kern_ktr.c ktr: correctly handle possible wrap-around in the boot buffer 2013-02-08 07:29:07 +00:00
kern_ktrace.c
kern_linker.c
kern_lock.c lockmgr: unlock interlock (if requested) when dealing with upgrade/downgrade 2013-01-06 21:47:59 +00:00
kern_lockf.c
kern_lockstat.c
kern_loginclass.c
kern_malloc.c Try to improve r242655 take III: move these SYSCTLs describing the kernel 2013-02-04 09:35:48 +00:00
kern_mbuf.c Move the mbuf memory limit calculations from init_param2() to 2013-01-17 21:28:31 +00:00
kern_mib.c fix some fat-fingering in r246246 2013-02-02 14:19:50 +00:00
kern_module.c
kern_mtxpool.c
kern_mutex.c
kern_ntptime.c
kern_osd.c
kern_physio.c
kern_pmc.c
kern_poll.c
kern_priv.c
kern_proc.c
kern_prot.c
kern_racct.c
kern_rangelock.c
kern_rctl.c
kern_resource.c
kern_rmlock.c
kern_rwlock.c
kern_sdt.c
kern_sema.c
kern_sharedpage.c
kern_shutdown.c
kern_sig.c Further refine the handling of stop signals in the NFS client. The 2013-02-21 19:02:50 +00:00
kern_switch.c
kern_sx.c
kern_synch.c
kern_syscalls.c
kern_sysctl.c Update comments to reflect r246689. 2013-02-11 23:05:10 +00:00
kern_tc.c Add PPS_CANWAIT support for time_pps_fetch(). This adds support for all three 2013-02-15 18:30:32 +00:00
kern_thr.c
kern_thread.c Fix a few typos. 2013-02-19 16:35:27 +00:00
kern_time.c
kern_timeout.c
kern_umtx.c
kern_uuid.c
kern_xxx.c
ksched.c
link_elf_obj.c
link_elf.c
linker_if.m
Make.tags.inc
Makefile
makesyscalls.sh
md4c.c
md5c.c
p1003_1b.c
posix4_mib.c
sched_4bsd.c
sched_ule.c
serdev_if.m
stack_protector.c
subr_acl_nfs4.c
subr_acl_posix1e.c
subr_autoconf.c
subr_blist.c Remove reference to the rlist code from comments, and fix a typo visible 2013-02-05 20:08:33 +00:00
subr_bufring.c
subr_bus_dma.c Reform the busdma API so that new types may be added without modifying 2013-02-12 16:57:20 +00:00
subr_bus.c Fix a typo. 2013-01-23 14:37:05 +00:00
subr_busdma_bufalloc.c
subr_clock.c
subr_devstat.c
subr_disk.c
subr_dummy_vdso_tc.c
subr_eventhandler.c
subr_fattime.c
subr_firmware.c
subr_hash.c
subr_hints.c
subr_kdb.c
subr_kobj.c
subr_lock.c
subr_log.c
subr_mbpool.c
subr_mchain.c
subr_module.c
subr_msgbuf.c
subr_param.c Move the mbuf memory limit calculations from init_param2() to 2013-01-17 21:28:31 +00:00
subr_pcpu.c
subr_power.c
subr_prf.c
subr_prof.c
subr_rman.c
subr_rtc.c
subr_sbuf.c
subr_scanf.c
subr_sglist.c
subr_sleepqueue.c Rework the handling of stop signals in the NFS client. The changes in 2013-02-06 17:06:51 +00:00
subr_smp.c
subr_stack.c
subr_syscall.c
subr_taskqueue.c
subr_trap.c Further refine the handling of stop signals in the NFS client. The 2013-02-21 19:02:50 +00:00
subr_turnstile.c Update the comment: we do show the backtrace of misbehaving thread. 2013-02-17 21:37:32 +00:00
subr_uio.c Reform the busdma API so that new types may be added without modifying 2013-02-12 16:57:20 +00:00
subr_unit.c
subr_witness.c
sys_capability.c Remove redundant parenthesis. 2013-02-17 11:49:21 +00:00
sys_generic.c
sys_pipe.c Remove redundant space. 2013-02-17 11:48:16 +00:00
sys_procdesc.c
sys_process.c When vforked child is traced, the debugging events are not generated 2013-02-07 15:34:22 +00:00
sys_socket.c
syscalls.c
syscalls.master
systrace_args.c
sysv_ipc.c
sysv_msg.c
sysv_sem.c
sysv_shm.c
tty_compat.c
tty_info.c
tty_inq.c
tty_outq.c
tty_pts.c
tty_tty.c
tty_ttydisc.c
tty.c
uipc_accf.c
uipc_cow.c
uipc_debug.c
uipc_domain.c
uipc_mbuf2.c
uipc_mbuf.c - Move large functions m_getjcl() and m_get2() to kern/uipc_mbuf.c 2013-01-24 09:29:41 +00:00
uipc_mqueue.c
uipc_sem.c
uipc_shm.c
uipc_sockbuf.c
uipc_socket.c
uipc_syscalls.c Audit sockaddr argument for bind(2), connect(2), accept(2), sendto(2) and 2013-02-07 00:36:00 +00:00
uipc_usrreq.c Add support of passing SCM_BINTIME ancillary data object for PF_LOCAL 2013-02-15 13:00:20 +00:00
vfs_acl.c Prezero the acl structure which is to be copied to usermode, to avoid 2013-02-06 15:18:46 +00:00
vfs_aio.c
vfs_bio.c Add barrier write capability to the VFS buffer interface. A barrier 2013-02-16 14:51:30 +00:00
vfs_cache.c
vfs_cluster.c Add barrier write capability to the VFS buffer interface. A barrier 2013-02-16 14:51:30 +00:00
vfs_default.c
vfs_export.c Further refine the handling of stop signals in the NFS client. The 2013-02-21 19:02:50 +00:00
vfs_extattr.c
vfs_hash.c Add exported vfs_hash_index() function, which calculates the canonical 2013-01-14 05:41:40 +00:00
vfs_init.c Don't worry if a module is already loaded when looking for a fstype to mount 2013-02-21 02:41:37 +00:00
vfs_lookup.c Further refine the handling of stop signals in the NFS client. The 2013-02-21 19:02:50 +00:00
vfs_mount.c
vfs_mountroot.c
vfs_subr.c Add a trivial comment to record the proper commit log for r245407: 2013-01-14 05:52:23 +00:00
vfs_syscalls.c Style. 2013-02-17 11:56:36 +00:00
vfs_vnops.c vn_io_faults_cnt: 2013-02-15 14:22:05 +00:00
vnode_if.src