1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-22 11:17:19 +00:00
freebsd/sys/compat/linux
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
..
linux_file.c Add support for O_NOFOLLOW and O_DIRECT to Linux fcntl() F_GETFL/F_SETFL. 2005-04-13 04:31:43 +00:00
linux_getcwd.c Add Giant around linux_getcwd_common() in linux_getcwd(). 2005-07-09 12:34:49 +00:00
linux_ioctl.c Fix kernel build. 2005-08-28 13:11:08 +00:00
linux_ioctl.h
linux_ipc.c Move MODULE_DEPEND() statements for SYSVIPC dependencies to linux_ipc.c 2005-07-29 19:40:39 +00:00
linux_ipc.h
linux_mib.c Match the LINUX32's style with existing style 2005-01-14 04:44:56 +00:00
linux_mib.h
linux_misc.c Fix the computation of uptime for linux_sysinfo(). Before it was returning 2005-07-07 19:17:55 +00:00
linux_signal.c Unbreak the kernel build. Pointy hat to: sobomax. 2005-02-13 19:50:57 +00:00
linux_signal.h
linux_socket.c Add GIANT_REQUIRED and WITNESS sleep warnings to uprintf() and tprintf(), 2005-09-19 16:51:43 +00:00
linux_socket.h
linux_stats.c Actually only protect mount-point if security.jail.enforce_statfs is set to 2. 2005-06-23 22:13:29 +00:00
linux_sysctl.c Match the LINUX32's style with existing style 2005-01-14 04:44:56 +00:00
linux_sysproto.h Handle unimplemented syscall by instantly returning ENOSYS instead of sending 2005-03-07 00:18:06 +00:00
linux_uid16.c Match the LINUX32's style with existing style 2005-01-14 04:44:56 +00:00
linux_util.c Remove linux_emul_find() and the CHECKALT*() macros as they are no longer 2005-03-01 17:57:45 +00:00
linux_util.h Remove linux_emul_find() and the CHECKALT*() macros as they are no longer 2005-03-01 17:57:45 +00:00