M_NOWAIT can only be used in a driver where a failed memory allocation is
commitbf7a12d63ad60e432f7434290af57186e7734f4e
authorMatthew Dillon <dillon@dragonflybsd.org>
Sun, 3 Jun 2007 04:48:29 +0000 (3 04:48 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Sun, 3 Jun 2007 04:48:29 +0000 (3 04:48 +0000)
tree6101ea88d2219c3580e0b4602a43e438061fb9d1
parent164b02b025c22f17037b8952ce0164674ce2bd6b
M_NOWAIT can only be used in a driver where a failed memory allocation is
recoverable, such as in a network driver.  FreeBSD seems to have a looser
definition but in DragonFly M_NOWAIT really means M_NOWAIT ... any blocking
at all, including waiting on the BGL or getting the kernel_map lock,
will result in a failure NULL.

Change all M_NOWAIT's to either M_WAITOK or M_INTWAIT.
sys/dev/disk/nata/ata-chipset.c
sys/dev/disk/nata/ata-disk.c
sys/dev/disk/nata/ata-dma.c
sys/dev/disk/nata/atapi-cam.c
sys/dev/disk/nata/atapi-cd.c
sys/dev/disk/nata/atapi-fd.c
sys/dev/disk/nata/atapi-tape.c