HomeFreeBSD

linuxkpi: `GFP_KERNEL` equals `M_NOWAIT` now

Description

linuxkpi: GFP_KERNEL equals M_NOWAIT now

... instead of M_WAITOK.

[Why]
The reason is that in some places in the DRM drivers (in particular, the
framebuffer management code), kmalloc() is called from a non-sleepable
context, such as after a call to mtx_lock(8) with an MTX_DEF mutex.

If GFP_KERNEL is defined as M_WAITOK, we hit an assertion from
witness(4).

[How]
The definition of GFP_KERNEL is changed to M_NOWAIT. This means that
callers should verify the return value of kmalloc(). Fortunately, this
is always the case in Linux.

Reviewed by: bz, emaste, manu
Approved by: manu
Differential Revision: https://reviews.freebsd.org/D42054