freebsd-nq/sys/compat/svr4
Robert Watson 84d2b7df26 Add GIANT_REQUIRED and WITNESS sleep warnings to uprintf() and tprintf(),
as they both interact with the tty code (!MPSAFE) and may sleep if the
tty buffer is full (per comment).

Modify all consumers of uprintf() and tprintf() to hold Giant around
calls into these functions.  In most cases, this means adding an
acquisition of Giant immediately around the function.  In some cases
(nfs_timer()), it means acquiring Giant higher up in the callout.

With these changes, UFS no longer panics on SMP when either blocks are
exhausted or inodes are exhausted under load due to races in the tty
code when running without Giant.

NB: Some reduction in calls to uprintf() in the svr4 code is probably
desirable.

NB: In the case of nfs_timer(), calling uprintf() while holding a mutex,
or even in a callout at all, is a bad idea, and will generate warnings
and potential upset.  This needs to be fixed, but was a problem before
this change.

NB: uprintf()/tprintf() sleeping is generally a bad ideas, as is having
non-MPSAFE tty code.

MFC after:	1 week
2005-09-19 16:51:43 +00:00
..
imgact_svr4.c - Change the vm_mmap() function to accept an objtype_t parameter specifying 2005-04-01 20:00:11 +00:00
Makefile
svr4_acl.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
svr4_dirent.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
svr4_errno.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
svr4_exec.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
svr4_fcntl.c Add GIANT_REQUIRED and WITNESS sleep warnings to uprintf() and tprintf(), 2005-09-19 16:51:43 +00:00
svr4_fcntl.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
svr4_filio.c Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
svr4_filio.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
svr4_fuser.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
svr4_hrt.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
svr4_ioctl.c Add GIANT_REQUIRED and WITNESS sleep warnings to uprintf() and tprintf(), 2005-09-19 16:51:43 +00:00
svr4_ioctl.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
svr4_ipc.c Add GIANT_REQUIRED and WITNESS sleep warnings to uprintf() and tprintf(), 2005-09-19 16:51:43 +00:00
svr4_ipc.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
svr4_misc.c Add GIANT_REQUIRED and WITNESS sleep warnings to uprintf() and tprintf(), 2005-09-19 16:51:43 +00:00
svr4_mman.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
svr4_proto.h Regen. 2005-07-13 20:35:09 +00:00
svr4_resource.c Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
svr4_resource.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
svr4_siginfo.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
svr4_signal.c Add GIANT_REQUIRED and WITNESS sleep warnings to uprintf() and tprintf(), 2005-09-19 16:51:43 +00:00
svr4_signal.h fixup signal mapping: 2005-02-25 19:34:10 +00:00
svr4_socket.c Lock Giant in svr4_add_socket() so that the various svr4_*stat() calls 2005-07-07 19:27:29 +00:00
svr4_socket.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
svr4_sockio.c Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
svr4_sockio.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
svr4_sockmod.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
svr4_stat.c Add GIANT_REQUIRED and WITNESS sleep warnings to uprintf() and tprintf(), 2005-09-19 16:51:43 +00:00
svr4_stat.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
svr4_statvfs.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
svr4_stream.c Add GIANT_REQUIRED and WITNESS sleep warnings to uprintf() and tprintf(), 2005-09-19 16:51:43 +00:00
svr4_stropts.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
svr4_syscall.h Regen. 2005-07-13 20:35:09 +00:00
svr4_syscallnames.c Regen. 2005-07-13 20:35:09 +00:00
svr4_sysconfig.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
svr4_sysent.c Regen. 2005-07-13 20:35:09 +00:00
svr4_systeminfo.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
svr4_sysvec.c fixup signal mapping: 2005-02-25 19:34:10 +00:00
svr4_termios.c Add GIANT_REQUIRED and WITNESS sleep warnings to uprintf() and tprintf(), 2005-09-19 16:51:43 +00:00
svr4_termios.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
svr4_time.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
svr4_timod.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
svr4_ttold.c Add GIANT_REQUIRED and WITNESS sleep warnings to uprintf() and tprintf(), 2005-09-19 16:51:43 +00:00
svr4_ttold.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
svr4_types.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
svr4_ucontext.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
svr4_ulimit.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
svr4_ustat.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
svr4_util.h Add GIANT_REQUIRED and WITNESS sleep warnings to uprintf() and tprintf(), 2005-09-19 16:51:43 +00:00
svr4_utsname.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
svr4_wait.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
svr4.h - Stop hardcoding #define's for options and use the appropriate 2005-07-13 15:14:33 +00:00
syscalls.conf GC unused 'syshide' override to /dev/null. This was here to disable 2003-12-24 00:32:07 +00:00
syscalls.master Make a pass through all the compat ABIs sychronizing the MP safe flags 2005-07-13 20:32:42 +00:00