freebsd-dev/sys/compat
Ryan Stone 92a15f946b Add missing M_NOWAIT flag
The LinuxKPI linux_dma code calls PCTRIE_INSERT with a
mutex held, but does not set M_NOWAIT when allocating
nodes, leading to a potential panic.  All of this code
can handle an allocation failure here, so prefer an
allocation failure to sleeping on memory.

Also fix a related case where NOWAIT/WAITOK was not
specified.  In this case it's not clear whether sleeping
is allowed so be conservative and assume not.  There are
a lot of other paths in this code that can fail due to
a lack of memory anyway.

Differential Revision: https://reviews.freebsd.org/D22127
Reviewed by: imp
Sponsored by: Dell EMC Isilon
MFC After: 1 week
2019-10-23 17:20:20 +00:00
..
cloudabi [2/3] Add an initial seal argument to kern_shm_open() 2019-09-25 17:35:03 +00:00
cloudabi32 Regen after r347228 and r352693. 2019-09-30 21:00:19 +00:00
cloudabi64 Regen after r347228 and r352693. 2019-09-30 21:00:19 +00:00
freebsd32 sysent: regenerate after r352747. 2019-09-26 15:41:10 +00:00
ia32 Make randomized stack gap between strings and pointers to argv/envs. 2019-07-31 20:23:10 +00:00
lindebugfs LinuxKPI: Finalize move of lindebugfs from ports to base. 2019-05-19 15:44:21 +00:00
linprocfs Define macro VM_MAP_ENTRY_FOREACH for enumerating the entries in a vm_map. 2019-10-08 07:14:21 +00:00
linsysfs Create a "drm" subdirectory for drm devices in linsysfs. Recent versions of 2019-09-23 12:27:55 +00:00
linux linux: futex_mtx should follow futex_list 2019-10-18 12:25:33 +00:00
linuxkpi/common Add missing M_NOWAIT flag 2019-10-23 17:20:20 +00:00
ndis Fix compilation with 'option NDISAPI + device ndis' and 2019-01-30 11:40:12 +00:00
netbsd sys/compat: further adoption of SPDX licensing ID tags. 2017-11-27 15:13:23 +00:00
x86bios x86bios: use M_NOWAIT with mallocs 2018-09-13 07:04:00 +00:00