summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2003-01-21 08:56:16 +0000
committeralfred <alfred@FreeBSD.org>2003-01-21 08:56:16 +0000
commitbf8e8a6e8f0bd9165109f0a258730dd242299815 (patch)
treef16a2fb9fa7a7fbc4c19e981d278d5f6eb53234d /sys
parent2180deee00350fff613a1d1d1328eddc4c0ba9c8 (diff)
downloadFreeBSD-src-bf8e8a6e8f0bd9165109f0a258730dd242299815.zip
FreeBSD-src-bf8e8a6e8f0bd9165109f0a258730dd242299815.tar.gz
Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
Diffstat (limited to 'sys')
-rw-r--r--sys/alpha/alpha/busdma_machdep.c4
-rw-r--r--sys/alpha/osf1/imgact_osf1.c6
-rw-r--r--sys/alpha/osf1/osf1_misc.c10
-rw-r--r--sys/amd64/amd64/amd64_mem.c2
-rw-r--r--sys/amd64/amd64/bios.c2
-rw-r--r--sys/amd64/amd64/busdma_machdep.c4
-rw-r--r--sys/amd64/amd64/mem.c4
-rw-r--r--sys/amd64/amd64/mp_machdep.c8
-rw-r--r--sys/amd64/amd64/mptable.c8
-rw-r--r--sys/amd64/amd64/sys_machdep.c2
-rw-r--r--sys/amd64/ia32/ia32_misc.c10
-rw-r--r--sys/amd64/include/mptable.h8
-rw-r--r--sys/cam/cam_periph.c2
-rw-r--r--sys/cam/cam_sim.c2
-rw-r--r--sys/cam/cam_xpt.c4
-rw-r--r--sys/cam/scsi/scsi_cd.c44
-rw-r--r--sys/cam/scsi/scsi_ch.c6
-rw-r--r--sys/cam/scsi/scsi_da.c2
-rw-r--r--sys/cam/scsi/scsi_low.c2
-rw-r--r--sys/cam/scsi/scsi_sa.c8
-rw-r--r--sys/cam/scsi/scsi_target.c6
-rw-r--r--sys/coda/cnode.h2
-rw-r--r--sys/compat/freebsd32/freebsd32_misc.c10
-rw-r--r--sys/compat/linux/linux_file.c2
-rw-r--r--sys/compat/linux/linux_getcwd.c4
-rw-r--r--sys/compat/linux/linux_ioctl.c2
-rw-r--r--sys/compat/linux/linux_mib.c2
-rw-r--r--sys/compat/linux/linux_sysctl.c2
-rw-r--r--sys/compat/linux/linux_util.c2
-rw-r--r--sys/compat/pecoff/imgact_pecoff.c12
-rw-r--r--sys/compat/svr4/svr4_filio.c2
-rw-r--r--sys/compat/svr4/svr4_misc.c4
-rw-r--r--sys/compat/svr4/svr4_socket.c2
-rw-r--r--sys/compat/svr4/svr4_stream.c8
-rw-r--r--sys/compat/svr4/svr4_sysvec.c2
-rw-r--r--sys/contrib/dev/fla/fla.c2
-rw-r--r--sys/contrib/dev/oltr/if_oltr.c8
-rw-r--r--sys/contrib/ipfilter/netinet/fil.c6
-rw-r--r--sys/contrib/ipfilter/netinet/ip_fil.c18
-rw-r--r--sys/dev/agp/agp.c2
-rw-r--r--sys/dev/agp/agp_i810.c2
-rw-r--r--sys/dev/amr/amr.c4
-rw-r--r--sys/dev/an/if_an.c10
-rw-r--r--sys/dev/ar/if_ar.c6
-rw-r--r--sys/dev/asr/asr.c38
-rw-r--r--sys/dev/ata/atapi-cam.c2
-rw-r--r--sys/dev/awi/awi.c20
-rw-r--r--sys/dev/awi/awi_wep.c10
-rw-r--r--sys/dev/bge/if_bge.c6
-rw-r--r--sys/dev/cardbus/cardbus.c2
-rw-r--r--sys/dev/cardbus/cardbus_cis.c6
-rw-r--r--sys/dev/ccd/ccd.c20
-rw-r--r--sys/dev/ciss/ciss.c4
-rw-r--r--sys/dev/cm/smc90cx6.c4
-rw-r--r--sys/dev/cnw/if_cnw.c6
-rw-r--r--sys/dev/cs/if_cs.c4
-rw-r--r--sys/dev/dc/if_dc.c8
-rw-r--r--sys/dev/de/if_de.c16
-rw-r--r--sys/dev/digi/digi.c14
-rw-r--r--sys/dev/dpt/dpt_scsi.c4
-rw-r--r--sys/dev/drm/drm_drv.h2
-rw-r--r--sys/dev/drm/drm_memory.h2
-rw-r--r--sys/dev/ed/if_ed.c4
-rw-r--r--sys/dev/em/if_em.c4
-rw-r--r--sys/dev/en/midway.c14
-rw-r--r--sys/dev/ep/if_ep.c8
-rw-r--r--sys/dev/ex/if_ex.c6
-rw-r--r--sys/dev/fb/fb.c6
-rw-r--r--sys/dev/fb/vga.c4
-rw-r--r--sys/dev/fe/if_fe.c4
-rw-r--r--sys/dev/firewire/if_fwe.c4
-rw-r--r--sys/dev/firewire/sbp.c6
-rw-r--r--sys/dev/fxp/if_fxp.c6
-rw-r--r--sys/dev/gem/if_gem.c2
-rw-r--r--sys/dev/gx/if_gx.c4
-rw-r--r--sys/dev/hifn/hifn7751.c12
-rw-r--r--sys/dev/hme/if_hme.c2
-rw-r--r--sys/dev/idt/idt.c8
-rw-r--r--sys/dev/ie/if_ie.c6
-rw-r--r--sys/dev/iicbus/if_ic.c4
-rw-r--r--sys/dev/isp/isp_pci.c6
-rw-r--r--sys/dev/isp/isp_sbus.c4
-rw-r--r--sys/dev/kbd/kbd.c2
-rw-r--r--sys/dev/lge/if_lge.c2
-rw-r--r--sys/dev/lmc/if_lmc.c14
-rw-r--r--sys/dev/lnc/if_lnc.c14
-rw-r--r--sys/dev/md/md.c4
-rw-r--r--sys/dev/mlx/mlx.c2
-rw-r--r--sys/dev/mly/mly.c2
-rw-r--r--sys/dev/mpt/mpt_pci.c4
-rw-r--r--sys/dev/musycc/musycc.c20
-rw-r--r--sys/dev/my/if_my.c8
-rw-r--r--sys/dev/nge/if_nge.c2
-rw-r--r--sys/dev/nmdm/nmdm.c2
-rw-r--r--sys/dev/null/null.c2
-rw-r--r--sys/dev/ofw/openfirm.c4
-rw-r--r--sys/dev/ofw/openfirmio.c4
-rw-r--r--sys/dev/pccard/pccard.c2
-rw-r--r--sys/dev/pci/pci.c2
-rw-r--r--sys/dev/pci/pci_user.c2
-rw-r--r--sys/dev/pdq/pdq_freebsd.h4
-rw-r--r--sys/dev/pdq/pdq_ifsubr.c4
-rw-r--r--sys/dev/pdq/pdqvar.h4
-rw-r--r--sys/dev/ppbus/if_plip.c2
-rw-r--r--sys/dev/ppbus/lpt.c4
-rw-r--r--sys/dev/ppbus/vpo.c2
-rw-r--r--sys/dev/puc/puc.c2
-rw-r--r--sys/dev/raidframe/rf_freebsdkintf.c14
-rw-r--r--sys/dev/raidframe/rf_shutdown.c2
-rw-r--r--sys/dev/random/randomdev.c4
-rw-r--r--sys/dev/ray/if_ray.c6
-rw-r--r--sys/dev/sbni/if_sbni.c4
-rw-r--r--sys/dev/sf/if_sf.c8
-rw-r--r--sys/dev/sk/if_sk.c2
-rw-r--r--sys/dev/sn/if_sn.c4
-rw-r--r--sys/dev/snc/dp83932.c6
-rw-r--r--sys/dev/snp/snp.c8
-rw-r--r--sys/dev/sound/midi/midi.c6
-rw-r--r--sys/dev/sound/midi/midibuf.c2
-rw-r--r--sys/dev/sound/midi/sequencer.c6
-rw-r--r--sys/dev/sound/midi/timer.c4
-rw-r--r--sys/dev/sound/pci/ds1.c2
-rw-r--r--sys/dev/sound/pci/emu10k1.c2
-rw-r--r--sys/dev/sound/pcm/ac97.c2
-rw-r--r--sys/dev/sound/pcm/buffer.c2
-rw-r--r--sys/dev/sound/pcm/fake.c4
-rw-r--r--sys/dev/sound/pcm/feeder.c4
-rw-r--r--sys/dev/sound/pcm/mixer.c2
-rw-r--r--sys/dev/sound/pcm/sndstat.c2
-rw-r--r--sys/dev/sound/pcm/sound.c8
-rw-r--r--sys/dev/sound/pcm/vchan.c4
-rw-r--r--sys/dev/speaker/spkr.c2
-rw-r--r--sys/dev/sr/if_sr.c6
-rw-r--r--sys/dev/streams/streams.c2
-rw-r--r--sys/dev/syscons/daemon/daemon_saver.c2
-rw-r--r--sys/dev/syscons/schistory.c2
-rw-r--r--sys/dev/syscons/scmouse.c2
-rw-r--r--sys/dev/syscons/scvtb.c2
-rw-r--r--sys/dev/syscons/snake/snake_saver.c4
-rw-r--r--sys/dev/syscons/syscons.c12
-rw-r--r--sys/dev/ti/if_ti.c16
-rw-r--r--sys/dev/trm/trm.c4
-rw-r--r--sys/dev/twe/twe.c4
-rw-r--r--sys/dev/tx/if_tx.c8
-rw-r--r--sys/dev/tx/if_txvar.h4
-rw-r--r--sys/dev/txp/if_txp.c12
-rw-r--r--sys/dev/ubsec/ubsec.c12
-rw-r--r--sys/dev/usb/hid.c4
-rw-r--r--sys/dev/usb/if_aue.c4
-rw-r--r--sys/dev/usb/if_cue.c4
-rw-r--r--sys/dev/usb/if_kue.c4
-rw-r--r--sys/dev/usb/ubsa.c4
-rw-r--r--sys/dev/usb/udbp.c4
-rw-r--r--sys/dev/usb/uftdi.c2
-rw-r--r--sys/dev/usb/ugen.c10
-rw-r--r--sys/dev/usb/uhci.c4
-rw-r--r--sys/dev/usb/uhid.c4
-rw-r--r--sys/dev/usb/umass.c2
-rw-r--r--sys/dev/usb/umodem.c2
-rw-r--r--sys/dev/usb/uplcom.c4
-rw-r--r--sys/dev/usb/urio.c2
-rw-r--r--sys/dev/usb/usb.c4
-rw-r--r--sys/dev/usb/uscanner.c4
-rw-r--r--sys/dev/usb/uvisor.c2
-rw-r--r--sys/dev/usb/uvscom.c4
-rw-r--r--sys/dev/vinum/vinumext.h2
-rw-r--r--sys/dev/vinum/vinummemory.c2
-rw-r--r--sys/dev/vr/if_vr.c8
-rw-r--r--sys/dev/vx/if_vx.c8
-rw-r--r--sys/dev/wi/if_wi.c12
-rw-r--r--sys/dev/wl/if_wl.c2
-rw-r--r--sys/dev/xe/if_xe.c4
-rw-r--r--sys/fs/cd9660/cd9660_vfsops.c4
-rw-r--r--sys/fs/cd9660/cd9660_vnops.c8
-rw-r--r--sys/fs/coda/cnode.h2
-rw-r--r--sys/fs/devfs/devfs_devs.c10
-rw-r--r--sys/fs/devfs/devfs_rule.c6
-rw-r--r--sys/fs/devfs/devfs_vfsops.c4
-rw-r--r--sys/fs/devfs/devfs_vnops.c4
-rw-r--r--sys/fs/fdescfs/fdesc_vfsops.c2
-rw-r--r--sys/fs/fdescfs/fdesc_vnops.c2
-rw-r--r--sys/fs/fifofs/fifo_vnops.c2
-rw-r--r--sys/fs/hpfs/hpfs_subr.c6
-rw-r--r--sys/fs/hpfs/hpfs_vfsops.c4
-rw-r--r--sys/fs/hpfs/hpfs_vnops.c2
-rw-r--r--sys/fs/msdosfs/msdosfs_denode.c2
-rw-r--r--sys/fs/msdosfs/msdosfs_vfsops.c4
-rw-r--r--sys/fs/msdosfs/msdosfs_vnops.c2
-rw-r--r--sys/fs/ntfs/ntfs_subr.c38
-rw-r--r--sys/fs/ntfs/ntfs_vfsops.c6
-rw-r--r--sys/fs/ntfs/ntfs_vnops.c2
-rw-r--r--sys/fs/nullfs/null_subr.c2
-rw-r--r--sys/fs/nullfs/null_vfsops.c2
-rw-r--r--sys/fs/nwfs/nwfs_node.c2
-rw-r--r--sys/fs/nwfs/nwfs_vfsops.c2
-rw-r--r--sys/fs/portalfs/portal_vfsops.c4
-rw-r--r--sys/fs/portalfs/portal_vnops.c4
-rw-r--r--sys/fs/pseudofs/pseudofs.c10
-rw-r--r--sys/fs/pseudofs/pseudofs_fileno.c4
-rw-r--r--sys/fs/pseudofs/pseudofs_vncache.c2
-rw-r--r--sys/fs/smbfs/smbfs_node.c6
-rw-r--r--sys/fs/smbfs/smbfs_smb.c6
-rw-r--r--sys/fs/udf/udf_vfsops.c2
-rw-r--r--sys/fs/udf/udf_vnops.c10
-rw-r--r--sys/fs/umapfs/umap_subr.c2
-rw-r--r--sys/fs/umapfs/umap_vfsops.c2
-rw-r--r--sys/fs/unionfs/union_subr.c14
-rw-r--r--sys/fs/unionfs/union_vfsops.c2
-rw-r--r--sys/geom/bde/g_bde.c2
-rw-r--r--sys/geom/geom_aes.c6
-rw-r--r--sys/geom/geom_ccd.c20
-rw-r--r--sys/geom/geom_ctl.c2
-rw-r--r--sys/geom/geom_dev.c2
-rw-r--r--sys/geom/geom_disk.c2
-rw-r--r--sys/geom/geom_event.c2
-rw-r--r--sys/geom/geom_gpt.c2
-rw-r--r--sys/geom/geom_io.c2
-rw-r--r--sys/geom/geom_mirror.c2
-rw-r--r--sys/geom/geom_slice.c8
-rw-r--r--sys/geom/geom_subr.c14
-rw-r--r--sys/gnu/ext2fs/ext2_inode.c2
-rw-r--r--sys/gnu/ext2fs/ext2_lookup.c4
-rw-r--r--sys/gnu/ext2fs/ext2_vfsops.c12
-rw-r--r--sys/gnu/fs/ext2fs/ext2_inode.c2
-rw-r--r--sys/gnu/fs/ext2fs/ext2_lookup.c4
-rw-r--r--sys/gnu/fs/ext2fs/ext2_vfsops.c12
-rw-r--r--sys/i386/i386/bios.c2
-rw-r--r--sys/i386/i386/busdma_machdep.c4
-rw-r--r--sys/i386/i386/elan-mmcr.c2
-rw-r--r--sys/i386/i386/i686_mem.c2
-rw-r--r--sys/i386/i386/mem.c4
-rw-r--r--sys/i386/i386/mp_machdep.c8
-rw-r--r--sys/i386/i386/mptable.c8
-rw-r--r--sys/i386/i386/sys_machdep.c2
-rw-r--r--sys/i386/i386/vm86.c2
-rw-r--r--sys/i386/ibcs2/ibcs2_misc.c4
-rw-r--r--sys/i386/ibcs2/ibcs2_util.c2
-rw-r--r--sys/i386/ibcs2/imgact_coff.c2
-rw-r--r--sys/i386/include/mptable.h8
-rw-r--r--sys/i386/isa/ctx.c2
-rw-r--r--sys/i386/isa/gpib.c2
-rw-r--r--sys/i386/isa/if_cx.c8
-rw-r--r--sys/i386/isa/if_el.c6
-rw-r--r--sys/i386/isa/if_le.c6
-rw-r--r--sys/i386/isa/if_rdp.c4
-rw-r--r--sys/i386/isa/loran.c2
-rw-r--r--sys/i386/isa/pcvt/pcvt_kbd.c2
-rw-r--r--sys/i386/isa/pcvt/pcvt_out.c2
-rw-r--r--sys/i386/isa/pcvt/pcvt_sup.c2
-rw-r--r--sys/i386/isa/spkr.c2
-rw-r--r--sys/i386/isa/vesa.c6
-rw-r--r--sys/i386/isa/wt.c2
-rw-r--r--sys/i386/linux/linux_sysvec.c2
-rw-r--r--sys/i4b/driver/i4b_ipr.c2
-rw-r--r--sys/i4b/layer1/ihfc/i4b_ihfc_l1if.c2
-rw-r--r--sys/i4b/layer2/i4b_mbuf.c8
-rw-r--r--sys/i4b/layer4/i4b_i4bdrv.c10
-rw-r--r--sys/ia64/ia32/ia32_misc.c10
-rw-r--r--sys/ia64/ia64/busdma_machdep.c4
-rw-r--r--sys/ia64/ia64/mca.c4
-rw-r--r--sys/ia64/ia64/mp_machdep.c2
-rw-r--r--sys/ia64/ia64/pmap.c4
-rw-r--r--sys/ia64/ia64/sscdisk.c2
-rw-r--r--sys/isofs/cd9660/cd9660_vfsops.c4
-rw-r--r--sys/isofs/cd9660/cd9660_vnops.c8
-rw-r--r--sys/kern/imgact_aout.c2
-rw-r--r--sys/kern/imgact_elf.c10
-rw-r--r--sys/kern/inflate.c4
-rw-r--r--sys/kern/kern_alq.c6
-rw-r--r--sys/kern/kern_descrip.c12
-rw-r--r--sys/kern/kern_environment.c12
-rw-r--r--sys/kern/kern_event.c8
-rw-r--r--sys/kern/kern_exec.c6
-rw-r--r--sys/kern/kern_exit.c2
-rw-r--r--sys/kern/kern_fork.c6
-rw-r--r--sys/kern/kern_intr.c4
-rw-r--r--sys/kern/kern_jail.c2
-rw-r--r--sys/kern/kern_kse.c6
-rw-r--r--sys/kern/kern_ktrace.c12
-rw-r--r--sys/kern/kern_linker.c22
-rw-r--r--sys/kern/kern_lockf.c4
-rw-r--r--sys/kern/kern_mac.c68
-rw-r--r--sys/kern/kern_malloc.c8
-rw-r--r--sys/kern/kern_module.c2
-rw-r--r--sys/kern/kern_proc.c2
-rw-r--r--sys/kern/kern_prot.c8
-rw-r--r--sys/kern/kern_resource.c4
-rw-r--r--sys/kern/kern_subr.c4
-rw-r--r--sys/kern/kern_sysctl.c16
-rw-r--r--sys/kern/kern_thread.c6
-rw-r--r--sys/kern/link_elf.c14
-rw-r--r--sys/kern/link_elf_obj.c14
-rw-r--r--sys/kern/subr_blist.c4
-rw-r--r--sys/kern/subr_clist.c4
-rw-r--r--sys/kern/subr_disk.c2
-rw-r--r--sys/kern/subr_diskslice.c10
-rw-r--r--sys/kern/subr_mbuf.c44
-rw-r--r--sys/kern/subr_mchain.c10
-rw-r--r--sys/kern/subr_prf.c4
-rw-r--r--sys/kern/subr_prof.c4
-rw-r--r--sys/kern/subr_sbuf.c2
-rw-r--r--sys/kern/sys_generic.c14
-rw-r--r--sys/kern/sys_pipe.c4
-rw-r--r--sys/kern/sysv_msg.c8
-rw-r--r--sys/kern/sysv_sem.c14
-rw-r--r--sys/kern/sysv_shm.c10
-rw-r--r--sys/kern/tty.c2
-rw-r--r--sys/kern/tty_cons.c2
-rw-r--r--sys/kern/tty_pty.c2
-rw-r--r--sys/kern/tty_subr.c4
-rw-r--r--sys/kern/uipc_accf.c2
-rw-r--r--sys/kern/uipc_mbuf.c14
-rw-r--r--sys/kern/uipc_mbuf2.c6
-rw-r--r--sys/kern/uipc_sem.c6
-rw-r--r--sys/kern/uipc_sockbuf.c10
-rw-r--r--sys/kern/uipc_socket.c32
-rw-r--r--sys/kern/uipc_socket2.c10
-rw-r--r--sys/kern/uipc_syscalls.c22
-rw-r--r--sys/kern/uipc_usrreq.c12
-rw-r--r--sys/kern/vfs_aio.c16
-rw-r--r--sys/kern/vfs_bio.c2
-rw-r--r--sys/kern/vfs_cache.c6
-rw-r--r--sys/kern/vfs_cluster.c2
-rw-r--r--sys/kern/vfs_export.c6
-rw-r--r--sys/kern/vfs_extattr.c4
-rw-r--r--sys/kern/vfs_init.c16
-rw-r--r--sys/kern/vfs_lookup.c4
-rw-r--r--sys/kern/vfs_mount.c34
-rw-r--r--sys/kern/vfs_subr.c8
-rw-r--r--sys/kern/vfs_syscalls.c4
-rw-r--r--sys/libkern/iconv.c4
-rw-r--r--sys/libkern/iconv_xlat.c2
-rw-r--r--sys/net/bpf.c12
-rw-r--r--sys/net/bpf_compat.h2
-rw-r--r--sys/net/bridge.c12
-rw-r--r--sys/net/bsd_comp.c16
-rw-r--r--sys/net/if.c14
-rw-r--r--sys/net/if_arcsubr.c10
-rw-r--r--sys/net/if_atmsubr.c2
-rw-r--r--sys/net/if_disc.c2
-rw-r--r--sys/net/if_ef.c10
-rw-r--r--sys/net/if_ethersubr.c16
-rw-r--r--sys/net/if_faith.c2
-rw-r--r--sys/net/if_fddisubr.c10
-rw-r--r--sys/net/if_gif.c6
-rw-r--r--sys/net/if_gre.c6
-rw-r--r--sys/net/if_ieee80211subr.c36
-rw-r--r--sys/net/if_iso88025subr.c6
-rw-r--r--sys/net/if_loop.c6
-rw-r--r--sys/net/if_ppp.c12
-rw-r--r--sys/net/if_sl.c10
-rw-r--r--sys/net/if_spppsubr.c12
-rw-r--r--sys/net/if_stf.c4
-rw-r--r--sys/net/if_tap.c6
-rw-r--r--sys/net/if_tun.c10
-rw-r--r--sys/net/if_vlan.c8
-rw-r--r--sys/net/if_vlan_var.h2
-rw-r--r--sys/net/pfil.c4
-rw-r--r--sys/net/ppp_deflate.c16
-rw-r--r--sys/net/ppp_tty.c8
-rw-r--r--sys/net/raw_cb.c2
-rw-r--r--sys/net/route.c2
-rw-r--r--sys/net/rtsock.c6
-rw-r--r--sys/netatalk/aarp.c10
-rw-r--r--sys/netatalk/at_control.c2
-rw-r--r--sys/netatalk/ddp_output.c4
-rw-r--r--sys/netatalk/ddp_pcb.c2
-rw-r--r--sys/netatalk/ddp_usrreq.c2
-rw-r--r--sys/netatm/atm_cm.c14
-rw-r--r--sys/netatm/atm_device.c2
-rw-r--r--sys/netatm/atm_if.c2
-rw-r--r--sys/netatm/atm_socket.c4
-rw-r--r--sys/netatm/ipatm/ipatm_if.c2
-rw-r--r--sys/netatm/ipatm/ipatm_vcm.c6
-rw-r--r--sys/netatm/port.h4
-rw-r--r--sys/netatm/sigpvc/sigpvc_subr.c2
-rw-r--r--sys/netatm/spans/spans_arp.c6
-rw-r--r--sys/netatm/spans/spans_cls.c2
-rw-r--r--sys/netatm/spans/spans_msg.c26
-rw-r--r--sys/netatm/spans/spans_proto.c2
-rw-r--r--sys/netatm/spans/spans_subr.c2
-rw-r--r--sys/netatm/uni/sscf_uni.c2
-rw-r--r--sys/netatm/uni/sscop.c2
-rw-r--r--sys/netatm/uni/uniarp.c2
-rw-r--r--sys/netatm/uni/uniarp_cache.c2
-rw-r--r--sys/netatm/uni/uniarp_vcm.c6
-rw-r--r--sys/netatm/uni/uniip.c2
-rw-r--r--sys/netatm/uni/unisig_decode.c2
-rw-r--r--sys/netatm/uni/unisig_msg.c24
-rw-r--r--sys/netatm/uni/unisig_subr.c26
-rw-r--r--sys/netatm/uni/unisig_vc_state.c24
-rw-r--r--sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c4
-rw-r--r--sys/netgraph/bluetooth/drivers/h4/ng_h4.c4
-rw-r--r--sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c6
-rw-r--r--sys/netgraph/bluetooth/hci/ng_hci_cmds.c2
-rw-r--r--sys/netgraph/bluetooth/hci/ng_hci_evnt.c2
-rw-r--r--sys/netgraph/bluetooth/hci/ng_hci_misc.c2
-rw-r--r--sys/netgraph/bluetooth/hci/ng_hci_ulpi.c12
-rw-r--r--sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h22
-rw-r--r--sys/netgraph/bluetooth/l2cap/ng_l2cap_evnt.c2
-rw-r--r--sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c2
-rw-r--r--sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.c2
-rw-r--r--sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c16
-rw-r--r--sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c4
-rw-r--r--sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c16
-rw-r--r--sys/netgraph/ng_UI.c2
-rw-r--r--sys/netgraph/ng_bridge.c2
-rw-r--r--sys/netgraph/ng_cisco.c4
-rw-r--r--sys/netgraph/ng_eiface.c2
-rw-r--r--sys/netgraph/ng_frame_relay.c2
-rw-r--r--sys/netgraph/ng_gif.c2
-rw-r--r--sys/netgraph/ng_gif_demux.c2
-rw-r--r--sys/netgraph/ng_l2tp.c14
-rw-r--r--sys/netgraph/ng_lmi.c2
-rw-r--r--sys/netgraph/ng_one2many.c2
-rw-r--r--sys/netgraph/ng_ppp.c4
-rw-r--r--sys/netgraph/ng_pppoe.c18
-rw-r--r--sys/netgraph/ng_pptpgre.c4
-rw-r--r--sys/netgraph/ng_rfc1490.c4
-rw-r--r--sys/netgraph/ng_socket.c10
-rw-r--r--sys/netgraph/ng_source.c2
-rw-r--r--sys/netgraph/ng_tee.c2
-rw-r--r--sys/netgraph/ng_tty.c4
-rw-r--r--sys/netgraph/ng_vjc.c4
-rw-r--r--sys/netinet/if_ether.c2
-rw-r--r--sys/netinet/igmp.c4
-rw-r--r--sys/netinet/in.c4
-rw-r--r--sys/netinet/in_gif.c2
-rw-r--r--sys/netinet/in_pcb.c2
-rw-r--r--sys/netinet/ip_divert.c2
-rw-r--r--sys/netinet/ip_encap.c2
-rw-r--r--sys/netinet/ip_fw.c4
-rw-r--r--sys/netinet/ip_fw2.c4
-rw-r--r--sys/netinet/ip_icmp.c4
-rw-r--r--sys/netinet/ip_input.c10
-rw-r--r--sys/netinet/ip_mroute.c2
-rw-r--r--sys/netinet/ip_output.c10
-rw-r--r--sys/netinet/raw_ip.c4
-rw-r--r--sys/netinet/tcp_output.c6
-rw-r--r--sys/netinet/tcp_subr.c8
-rw-r--r--sys/netinet/tcp_syncache.c4
-rw-r--r--sys/netinet/tcp_timewait.c8
-rw-r--r--sys/netinet/udp_usrreq.c4
-rw-r--r--sys/netinet6/ah_core.c16
-rw-r--r--sys/netinet6/ah_input.c4
-rw-r--r--sys/netinet6/ah_output.c6
-rw-r--r--sys/netinet6/esp_core.c8
-rw-r--r--sys/netinet6/esp_input.c6
-rw-r--r--sys/netinet6/esp_output.c6
-rw-r--r--sys/netinet6/frag6.c6
-rw-r--r--sys/netinet6/icmp6.c36
-rw-r--r--sys/netinet6/in6.c4
-rw-r--r--sys/netinet6/in6_gif.c2
-rw-r--r--sys/netinet6/in6_ifattach.c8
-rw-r--r--sys/netinet6/in6_pcb.c4
-rw-r--r--sys/netinet6/ip6_fw.c8
-rw-r--r--sys/netinet6/ip6_input.c10
-rw-r--r--sys/netinet6/ip6_mroute.c2
-rw-r--r--sys/netinet6/ip6_output.c40
-rw-r--r--sys/netinet6/ipcomp_core.c4
-rw-r--r--sys/netinet6/ipcomp_output.c6
-rw-r--r--sys/netinet6/ipsec.c18
-rw-r--r--sys/netinet6/mld6.c4
-rw-r--r--sys/netinet6/nd6.c2
-rw-r--r--sys/netinet6/nd6_nbr.c8
-rw-r--r--sys/netinet6/raw_ip6.c2
-rw-r--r--sys/netinet6/scope6.c2
-rw-r--r--sys/netinet6/udp6_output.c2
-rw-r--r--sys/netipsec/ipsec_mbuf.c14
-rw-r--r--sys/netipsec/ipsec_output.c4
-rw-r--r--sys/netipsec/key.c44
-rw-r--r--sys/netipsec/keysock.c10
-rw-r--r--sys/netipsec/xform_esp.c2
-rw-r--r--sys/netipsec/xform_ipip.c4
-rw-r--r--sys/netipx/ipx.c2
-rw-r--r--sys/netipx/ipx_input.c2
-rw-r--r--sys/netipx/ipx_ip.c6
-rw-r--r--sys/netipx/ipx_outputfl.c2
-rw-r--r--sys/netipx/ipx_usrreq.c4
-rw-r--r--sys/netipx/spx_usrreq.c12
-rw-r--r--sys/netkey/key.c44
-rw-r--r--sys/netkey/keysock.c10
-rw-r--r--sys/netnatm/natm.c8
-rw-r--r--sys/netnatm/natm_pcb.c2
-rw-r--r--sys/netncp/ncp_conn.c4
-rw-r--r--sys/netncp/ncp_rq.c2
-rw-r--r--sys/netncp/ncp_sock.c2
-rw-r--r--sys/netncp/ncp_subr.c2
-rw-r--r--sys/netns/idp_usrreq.c6
-rw-r--r--sys/netns/ns.c2
-rw-r--r--sys/netns/ns_error.c2
-rw-r--r--sys/netns/ns_input.c2
-rw-r--r--sys/netns/ns_ip.c6
-rw-r--r--sys/netns/ns_pcb.c2
-rw-r--r--sys/netns/spp_usrreq.c18
-rw-r--r--sys/netsmb/smb_conn.c4
-rw-r--r--sys/netsmb/smb_crypt.c8
-rw-r--r--sys/netsmb/smb_dev.c2
-rw-r--r--sys/netsmb/smb_iod.c6
-rw-r--r--sys/netsmb/smb_rq.c6
-rw-r--r--sys/netsmb/smb_smb.c12
-rw-r--r--sys/netsmb/smb_subr.c8
-rw-r--r--sys/netsmb/smb_trantcp.c4
-rw-r--r--sys/nfs/nfs_common.c4
-rw-r--r--sys/nfsclient/bootp_subr.c6
-rw-r--r--sys/nfsclient/krpc_subr.c10
-rw-r--r--sys/nfsclient/nfs_lock.c2
-rw-r--r--sys/nfsclient/nfs_node.c4
-rw-r--r--sys/nfsclient/nfs_socket.c14
-rw-r--r--sys/nfsclient/nfs_subs.c22
-rw-r--r--sys/nfsclient/nfs_vfsops.c2
-rw-r--r--sys/nfsclient/nfs_vnops.c6
-rw-r--r--sys/nfsserver/nfs_serv.c20
-rw-r--r--sys/nfsserver/nfs_srvcache.c6
-rw-r--r--sys/nfsserver/nfs_srvsock.c18
-rw-r--r--sys/nfsserver/nfs_srvsubs.c10
-rw-r--r--sys/nfsserver/nfs_syscalls.c12
-rw-r--r--sys/opencrypto/cryptodev.c12
-rw-r--r--sys/pc98/cbus/scvtb.c2
-rw-r--r--sys/pc98/pc98/scvtbpc98.c2
-rw-r--r--sys/pc98/pc98/spkr.c2
-rw-r--r--sys/pc98/pc98/syscons.c12
-rw-r--r--sys/pccard/pccard.c2
-rw-r--r--sys/pci/agp.c2
-rw-r--r--sys/pci/agp_i810.c2
-rw-r--r--sys/pci/if_dc.c8
-rw-r--r--sys/pci/if_de.c16
-rw-r--r--sys/pci/if_mn.c18
-rw-r--r--sys/pci/if_pcn.c4
-rw-r--r--sys/pci/if_rl.c4
-rw-r--r--sys/pci/if_sf.c8
-rw-r--r--sys/pci/if_sis.c2
-rw-r--r--sys/pci/if_sk.c2
-rw-r--r--sys/pci/if_ste.c8
-rw-r--r--sys/pci/if_ti.c16
-rw-r--r--sys/pci/if_tl.c8
-rw-r--r--sys/pci/if_vr.c8
-rw-r--r--sys/pci/if_wb.c6
-rw-r--r--sys/pci/if_xl.c10
-rw-r--r--sys/pci/ncr.c4
-rw-r--r--sys/pci/simos.c2
-rw-r--r--sys/pci/xrpu.c2
-rw-r--r--sys/posix4/posix4.h2
-rw-r--r--sys/powerpc/aim/nexus.c2
-rw-r--r--sys/powerpc/powermac/macio.c2
-rw-r--r--sys/powerpc/powerpc/busdma_machdep.c4
-rw-r--r--sys/powerpc/powerpc/extintr.c2
-rw-r--r--sys/powerpc/powerpc/nexus.c2
-rw-r--r--sys/powerpc/psim/iobus.c2
-rw-r--r--sys/security/mac/mac_framework.c68
-rw-r--r--sys/security/mac/mac_internal.h68
-rw-r--r--sys/security/mac/mac_net.c68
-rw-r--r--sys/security/mac/mac_pipe.c68
-rw-r--r--sys/security/mac/mac_process.c68
-rw-r--r--sys/security/mac/mac_syscalls.c68
-rw-r--r--sys/security/mac/mac_system.c68
-rw-r--r--sys/security/mac/mac_vfs.c68
-rw-r--r--sys/security/mac_biba/mac_biba.c2
-rw-r--r--sys/security/mac_bsdextended/mac_bsdextended.c2
-rw-r--r--sys/security/mac_lomac/mac_lomac.c4
-rw-r--r--sys/security/mac_mls/mac_mls.c2
-rw-r--r--sys/sparc64/ebus/ebus.c2
-rw-r--r--sys/sparc64/pci/ofw_pci.c4
-rw-r--r--sys/sparc64/pci/psycho.c2
-rw-r--r--sys/sparc64/sbus/sbus.c2
-rw-r--r--sys/sparc64/sparc64/bus_machdep.c4
-rw-r--r--sys/sparc64/sparc64/counter.c4
-rw-r--r--sys/sparc64/sparc64/iommu.c2
-rw-r--r--sys/sparc64/sparc64/mem.c2
-rw-r--r--sys/sparc64/sparc64/nexus.c2
-rw-r--r--sys/sparc64/sparc64/ofw_bus.c6
-rw-r--r--sys/sparc64/sparc64/sys_machdep.c2
-rw-r--r--sys/sys/malloc.h3
-rw-r--r--sys/sys/mbuf.h12
-rw-r--r--sys/sys/posix4.h2
-rw-r--r--sys/sys/socketvar.h2
-rw-r--r--sys/ufs/ffs/ffs_inode.c2
-rw-r--r--sys/ufs/ffs/ffs_snapshot.c16
-rw-r--r--sys/ufs/ffs/ffs_softdep.c2
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c12
-rw-r--r--sys/ufs/ffs/ffs_vnops.c4
-rw-r--r--sys/ufs/ufs/ufs_dirhash.c2
-rw-r--r--sys/ufs/ufs/ufs_extattr.c6
-rw-r--r--sys/ufs/ufs/ufs_quota.c2
-rw-r--r--sys/ufs/ufs/ufs_vnops.c12
-rw-r--r--sys/vm/device_pager.c2
-rw-r--r--sys/vm/swap_pager.c2
-rw-r--r--sys/vm/uma.h2
-rw-r--r--sys/vm/uma_core.c12
-rw-r--r--sys/vm/vm_map.c6
-rw-r--r--sys/vm/vm_object.c2
591 files changed, 2123 insertions, 2122 deletions
diff --git a/sys/alpha/alpha/busdma_machdep.c b/sys/alpha/alpha/busdma_machdep.c
index 22b39a4..9de3342 100644
--- a/sys/alpha/alpha/busdma_machdep.c
+++ b/sys/alpha/alpha/busdma_machdep.c
@@ -358,7 +358,7 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags,
if ((dmat->maxsize <= PAGE_SIZE) && dmat->lowaddr >= ptoa(Maxmem)) {
*vaddr = malloc(dmat->maxsize, M_DEVBUF,
- (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK);
+ (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : 0);
} else {
/*
* XXX Use Contigmalloc until it is merged into this facility
@@ -366,7 +366,7 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags,
* multi-seg allocations yet though.
*/
*vaddr = contigmalloc(dmat->maxsize, M_DEVBUF,
- (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK,
+ (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : 0,
0ul, dmat->lowaddr, dmat->alignment? dmat->alignment : 1ul,
dmat->boundary);
}
diff --git a/sys/alpha/osf1/imgact_osf1.c b/sys/alpha/osf1/imgact_osf1.c
index d633182..5db50d0 100644
--- a/sys/alpha/osf1/imgact_osf1.c
+++ b/sys/alpha/osf1/imgact_osf1.c
@@ -112,7 +112,7 @@ exec_osf1_imgact(struct image_params *imgp)
printf("unknown ecoff magic %x\n", eap->magic);
return ENOEXEC;
}
- osf_auxargs = malloc(sizeof(Osf_Auxargs), M_TEMP, M_WAITOK | M_ZERO);
+ osf_auxargs = malloc(sizeof(Osf_Auxargs), M_TEMP, M_ZERO);
imgp->auxargs = osf_auxargs;
osf_auxargs->executable = osf_auxargs->exec_path;
path_not_saved = copyinstr(imgp->fname, osf_auxargs->executable,
@@ -135,7 +135,7 @@ exec_osf1_imgact(struct image_params *imgp)
* page of the loader.
*/
ndp = (struct nameidata *)malloc(sizeof(struct nameidata),
- M_TEMP, M_WAITOK);
+ M_TEMP, 0);
NDINIT(ndp, LOOKUP, LOCKLEAF | FOLLOW | SAVENAME, UIO_SYSSPACE,
"/compat/osf1/sbin/loader",
FIRST_THREAD_IN_PROC(imgp->proc));
@@ -218,7 +218,7 @@ exec_osf1_imgact(struct image_params *imgp)
raw_dend = (eap->data_start + eap->dsize);
if (dend > raw_dend) {
caddr_t zeros;
- zeros = malloc(dend-raw_dend,M_TEMP,M_WAITOK|M_ZERO);
+ zeros = malloc(dend-raw_dend, M_TEMP, M_ZERO);
if ((error = copyout(zeros, (caddr_t)raw_dend,
dend-raw_dend))) {
uprintf("Can't zero start of bss, error %d\n",error);
diff --git a/sys/alpha/osf1/osf1_misc.c b/sys/alpha/osf1/osf1_misc.c
index dc75d55..686d220 100644
--- a/sys/alpha/osf1/osf1_misc.c
+++ b/sys/alpha/osf1/osf1_misc.c
@@ -121,7 +121,7 @@ osf1_emul_find(td, sgp, prefix, path, pbuf, cflag)
struct vattr vat;
struct vattr vatroot;
- buf = (char *) malloc(MAXPATHLEN, M_TEMP, M_WAITOK);
+ buf = (char *) malloc(MAXPATHLEN, M_TEMP, 0);
*pbuf = path;
for (ptr = buf; (*ptr = *prefix) != '\0'; ptr++, prefix++)
@@ -1181,8 +1181,8 @@ osf1_readv(td, uap)
osize = uap->iovcnt * sizeof (struct osf1_iovec);
nsize = uap->iovcnt * sizeof (struct iovec);
- oio = malloc(osize, M_TEMP, M_WAITOK);
- nio = malloc(nsize, M_TEMP, M_WAITOK);
+ oio = malloc(osize, M_TEMP, 0);
+ nio = malloc(nsize, M_TEMP, 0);
error = 0;
if ((error = copyin(uap->iovp, oio, osize)))
@@ -1230,8 +1230,8 @@ osf1_writev(td, uap)
osize = uap->iovcnt * sizeof (struct osf1_iovec);
nsize = uap->iovcnt * sizeof (struct iovec);
- oio = malloc(osize, M_TEMP, M_WAITOK);
- nio = malloc(nsize, M_TEMP, M_WAITOK);
+ oio = malloc(osize, M_TEMP, 0);
+ nio = malloc(nsize, M_TEMP, 0);
error = 0;
if ((error = copyin(uap->iovp, oio, osize)))
diff --git a/sys/amd64/amd64/amd64_mem.c b/sys/amd64/amd64/amd64_mem.c
index 589fc64..f3fc4e8 100644
--- a/sys/amd64/amd64/amd64_mem.c
+++ b/sys/amd64/amd64/amd64_mem.c
@@ -557,7 +557,7 @@ i686_mrinit(struct mem_range_softc *sc)
sc->mr_desc =
(struct mem_range_desc *)malloc(nmdesc * sizeof(struct mem_range_desc),
- M_MEMDESC, M_WAITOK | M_ZERO);
+ M_MEMDESC, M_ZERO);
sc->mr_ndesc = nmdesc;
mrd = sc->mr_desc;
diff --git a/sys/amd64/amd64/bios.c b/sys/amd64/amd64/bios.c
index 747a3a1..ae14099 100644
--- a/sys/amd64/amd64/bios.c
+++ b/sys/amd64/amd64/bios.c
@@ -388,7 +388,7 @@ bios16(struct bios_args *args, char *fmt, ...)
/*
* no page table, so create one and install it.
*/
- pte = (pt_entry_t *)malloc(PAGE_SIZE, M_TEMP, M_WAITOK);
+ pte = (pt_entry_t *)malloc(PAGE_SIZE, M_TEMP, 0);
ptd = (pd_entry_t *)((u_int)ptd + KERNBASE);
*ptd = vtophys(pte) | PG_RW | PG_V;
} else {
diff --git a/sys/amd64/amd64/busdma_machdep.c b/sys/amd64/amd64/busdma_machdep.c
index 3158726..eb6cc9d 100644
--- a/sys/amd64/amd64/busdma_machdep.c
+++ b/sys/amd64/amd64/busdma_machdep.c
@@ -339,7 +339,7 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags,
if ((dmat->maxsize <= PAGE_SIZE) && dmat->lowaddr >= ptoa(Maxmem)) {
*vaddr = malloc(dmat->maxsize, M_DEVBUF,
- (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK);
+ (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : 0);
} else {
/*
* XXX Use Contigmalloc until it is merged into this facility
@@ -347,7 +347,7 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags,
* multi-seg allocations yet though.
*/
*vaddr = contigmalloc(dmat->maxsize, M_DEVBUF,
- (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK,
+ (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : 0,
0ul, dmat->lowaddr, dmat->alignment? dmat->alignment : 1ul,
dmat->boundary);
}
diff --git a/sys/amd64/amd64/mem.c b/sys/amd64/amd64/mem.c
index 41fa636..4905d3c 100644
--- a/sys/amd64/amd64/mem.c
+++ b/sys/amd64/amd64/mem.c
@@ -265,7 +265,7 @@ mmioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct thread *td)
if (nd > 0) {
md = (struct mem_range_desc *)
malloc(nd * sizeof(struct mem_range_desc),
- M_MEMDESC, M_WAITOK);
+ M_MEMDESC, 0);
error = mem_range_attr_get(md, &nd);
if (!error)
error = copyout(md, mo->mo_desc,
@@ -279,7 +279,7 @@ mmioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct thread *td)
case MEMRANGE_SET:
md = (struct mem_range_desc *)malloc(sizeof(struct mem_range_desc),
- M_MEMDESC, M_WAITOK);
+ M_MEMDESC, 0);
error = copyin(mo->mo_desc, md, sizeof(struct mem_range_desc));
/* clamp description string */
md->mr_owner[sizeof(md->mr_owner) - 1] = 0;
diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c
index 00da6fa..9b24c6f 100644
--- a/sys/amd64/amd64/mp_machdep.c
+++ b/sys/amd64/amd64/mp_machdep.c
@@ -919,13 +919,13 @@ mptable_pass2(void)
pgeflag = 0; /* XXX - Not used under SMP yet. */
MALLOC(io_apic_versions, u_int32_t *, sizeof(u_int32_t) * mp_napics,
- M_DEVBUF, M_WAITOK);
+ M_DEVBUF, 0);
MALLOC(ioapic, volatile ioapic_t **, sizeof(ioapic_t *) * mp_napics,
- M_DEVBUF, M_WAITOK);
+ M_DEVBUF, 0);
MALLOC(io_apic_ints, io_int *, sizeof(io_int) * (nintrs + 1),
- M_DEVBUF, M_WAITOK);
+ M_DEVBUF, 0);
MALLOC(bus_data, bus_datum *, sizeof(bus_datum) * mp_nbusses,
- M_DEVBUF, M_WAITOK);
+ M_DEVBUF, 0);
bzero(ioapic, sizeof(ioapic_t *) * mp_napics);
diff --git a/sys/amd64/amd64/mptable.c b/sys/amd64/amd64/mptable.c
index 00da6fa..9b24c6f 100644
--- a/sys/amd64/amd64/mptable.c
+++ b/sys/amd64/amd64/mptable.c
@@ -919,13 +919,13 @@ mptable_pass2(void)
pgeflag = 0; /* XXX - Not used under SMP yet. */
MALLOC(io_apic_versions, u_int32_t *, sizeof(u_int32_t) * mp_napics,
- M_DEVBUF, M_WAITOK);
+ M_DEVBUF, 0);
MALLOC(ioapic, volatile ioapic_t **, sizeof(ioapic_t *) * mp_napics,
- M_DEVBUF, M_WAITOK);
+ M_DEVBUF, 0);
MALLOC(io_apic_ints, io_int *, sizeof(io_int) * (nintrs + 1),
- M_DEVBUF, M_WAITOK);
+ M_DEVBUF, 0);
MALLOC(bus_data, bus_datum *, sizeof(bus_datum) * mp_nbusses,
- M_DEVBUF, M_WAITOK);
+ M_DEVBUF, 0);
bzero(ioapic, sizeof(ioapic_t *) * mp_napics);
diff --git a/sys/amd64/amd64/sys_machdep.c b/sys/amd64/amd64/sys_machdep.c
index e1347da..4d98979 100644
--- a/sys/amd64/amd64/sys_machdep.c
+++ b/sys/amd64/amd64/sys_machdep.c
@@ -298,7 +298,7 @@ user_ldt_alloc(struct mdproc *mdp, int len)
mtx_unlock_spin(&sched_lock);
mtx_assert(&sched_lock, MA_NOTOWNED);
MALLOC(new_ldt, struct proc_ldt *, sizeof(struct proc_ldt),
- M_SUBPROC, M_WAITOK);
+ M_SUBPROC, 0);
new_ldt->ldt_len = len = NEW_MAX_LD(len);
new_ldt->ldt_base = (caddr_t)kmem_alloc(kernel_map,
diff --git a/sys/amd64/ia32/ia32_misc.c b/sys/amd64/ia32/ia32_misc.c
index 10eb642..8b707b4 100644
--- a/sys/amd64/ia32/ia32_misc.c
+++ b/sys/amd64/ia32/ia32_misc.c
@@ -106,7 +106,7 @@ ia32_emul_find(td, sgp, prefix, path, pbuf, cflag)
struct vattr vat;
struct vattr vatroot;
- buf = (char *) malloc(MAXPATHLEN, M_TEMP, M_WAITOK);
+ buf = (char *) malloc(MAXPATHLEN, M_TEMP, 0);
*pbuf = path;
for (ptr = buf; (*ptr = *prefix) != '\0'; ptr++, prefix++)
@@ -769,8 +769,8 @@ ia32_readv(struct thread *td, struct ia32_readv_args *uap)
osize = uap->iovcnt * sizeof (struct iovec32);
nsize = uap->iovcnt * sizeof (struct iovec);
- oio = malloc(osize, M_TEMP, M_WAITOK);
- nio = malloc(nsize, M_TEMP, M_WAITOK);
+ oio = malloc(osize, M_TEMP, 0);
+ nio = malloc(nsize, M_TEMP, 0);
error = 0;
if ((error = copyin(uap->iovp, oio, osize)))
@@ -815,8 +815,8 @@ ia32_writev(struct thread *td, struct ia32_writev_args *uap)
osize = uap->iovcnt * sizeof (struct iovec32);
nsize = uap->iovcnt * sizeof (struct iovec);
- oio = malloc(osize, M_TEMP, M_WAITOK);
- nio = malloc(nsize, M_TEMP, M_WAITOK);
+ oio = malloc(osize, M_TEMP, 0);
+ nio = malloc(nsize, M_TEMP, 0);
error = 0;
if ((error = copyin(uap->iovp, oio, osize)))
diff --git a/sys/amd64/include/mptable.h b/sys/amd64/include/mptable.h
index 00da6fa..9b24c6f 100644
--- a/sys/amd64/include/mptable.h
+++ b/sys/amd64/include/mptable.h
@@ -919,13 +919,13 @@ mptable_pass2(void)
pgeflag = 0; /* XXX - Not used under SMP yet. */
MALLOC(io_apic_versions, u_int32_t *, sizeof(u_int32_t) * mp_napics,
- M_DEVBUF, M_WAITOK);
+ M_DEVBUF, 0);
MALLOC(ioapic, volatile ioapic_t **, sizeof(ioapic_t *) * mp_napics,
- M_DEVBUF, M_WAITOK);
+ M_DEVBUF, 0);
MALLOC(io_apic_ints, io_int *, sizeof(io_int) * (nintrs + 1),
- M_DEVBUF, M_WAITOK);
+ M_DEVBUF, 0);
MALLOC(bus_data, bus_datum *, sizeof(bus_datum) * mp_nbusses,
- M_DEVBUF, M_WAITOK);
+ M_DEVBUF, 0);
bzero(ioapic, sizeof(ioapic_t *) * mp_napics);
diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c
index 247ebb8..591d765 100644
--- a/sys/cam/cam_periph.c
+++ b/sys/cam/cam_periph.c
@@ -89,7 +89,7 @@ periphdriver_register(void *data)
int ndrivers;
ndrivers = nperiph_drivers + 2;
- newdrivers = malloc(sizeof(*newdrivers) * ndrivers, M_TEMP, M_WAITOK);
+ newdrivers = malloc(sizeof(*newdrivers) * ndrivers, M_TEMP, 0);
if (periph_drivers)
bcopy(periph_drivers, newdrivers,
sizeof(*newdrivers) * nperiph_drivers);
diff --git a/sys/cam/cam_sim.c b/sys/cam/cam_sim.c
index b7e0ec5..35b18f7 100644
--- a/sys/cam/cam_sim.c
+++ b/sys/cam/cam_sim.c
@@ -67,7 +67,7 @@ cam_sim_alloc(sim_action_func sim_action, sim_poll_func sim_poll,
*/
if (strcmp(sim_name, "xpt") == 0)
sim = (struct cam_sim *)malloc(sizeof(struct cam_sim),
- M_DEVBUF, M_WAITOK);
+ M_DEVBUF, 0);
else
sim = (struct cam_sim *)malloc(sizeof(struct cam_sim),
M_DEVBUF, M_NOWAIT);
diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c
index e22357b..96af6d7 100644
--- a/sys/cam/cam_xpt.c
+++ b/sys/cam/cam_xpt.c
@@ -4804,7 +4804,7 @@ xpt_alloc_ccb()
{
union ccb *new_ccb;
- new_ccb = malloc(sizeof(*new_ccb), M_DEVBUF, M_WAITOK);
+ new_ccb = malloc(sizeof(*new_ccb), M_DEVBUF, 0);
return (new_ccb);
}
@@ -5169,7 +5169,7 @@ xpt_scan_bus(struct cam_periph *periph, union ccb *request_ccb)
/* Save some state for use while we probe for devices */
scan_info = (xpt_scan_bus_info *)
- malloc(sizeof(xpt_scan_bus_info), M_TEMP, M_WAITOK);
+ malloc(sizeof(xpt_scan_bus_info), M_TEMP, 0);
scan_info->request_ccb = request_ccb;
scan_info->cpi = &work_ccb->cpi;
diff --git a/sys/cam/scsi/scsi_cd.c b/sys/cam/scsi/scsi_cd.c
index c5be698..a187c79 100644
--- a/sys/cam/scsi/scsi_cd.c
+++ b/sys/cam/scsi/scsi_cd.c
@@ -1788,7 +1788,7 @@ cdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
struct cd_mode_data *data;
data = malloc(sizeof(struct cd_mode_data), M_TEMP,
- M_WAITOK);
+ 0);
CAM_DEBUG(periph->path, CAM_DEBUG_SUBTRACE,
("trying to do CDIOCPLAYTRACKS\n"));
@@ -1822,7 +1822,7 @@ cdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
struct cd_mode_data *data;
data = malloc(sizeof(struct cd_mode_data), M_TEMP,
- M_WAITOK);
+ 0);
CAM_DEBUG(periph->path, CAM_DEBUG_SUBTRACE,
("trying to do CDIOCPLAYMSF\n"));
@@ -1857,7 +1857,7 @@ cdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
("trying to do CDIOCPLAYBLOCKS\n"));
data = malloc(sizeof(struct cd_mode_data), M_TEMP,
- M_WAITOK);
+ 0);
error = cdgetmode(periph, data, AUDIO_PAGE);
if (error) {
@@ -1884,7 +1884,7 @@ cdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
("trying to do CDIOCREADSUBCHANNEL\n"));
data = malloc(sizeof(struct cd_sub_channel_info),
- M_TEMP, M_WAITOK);
+ M_TEMP, 0);
if ((len > sizeof(struct cd_sub_channel_info)) ||
(len < sizeof(struct cd_sub_channel_header))) {
@@ -1928,7 +1928,7 @@ cdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
("trying to do CDIOREADTOCHEADER\n"));
th = malloc(sizeof(struct ioc_toc_header), M_TEMP,
- M_WAITOK);
+ 0);
error = cdreadtoc(periph, 0, 0,
(struct cd_toc_entry *)th,
sizeof (*th));
@@ -1971,8 +1971,8 @@ cdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
CAM_DEBUG(periph->path, CAM_DEBUG_SUBTRACE,
("trying to do CDIOREADTOCENTRYS\n"));
- data = malloc(sizeof(data_t), M_TEMP, M_WAITOK);
- lead = malloc(sizeof(lead_t), M_TEMP, M_WAITOK);
+ data = malloc(sizeof(data_t), M_TEMP, 0);
+ lead = malloc(sizeof(lead_t), M_TEMP, 0);
if (te->data_len < sizeof(struct cd_toc_entry)
|| (te->data_len % sizeof(struct cd_toc_entry)) != 0
@@ -2098,7 +2098,7 @@ cdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
CAM_DEBUG(periph->path, CAM_DEBUG_SUBTRACE,
("trying to do CDIOREADTOCENTRY\n"));
- data = malloc(sizeof(data_t), M_TEMP, M_WAITOK);
+ data = malloc(sizeof(data_t), M_TEMP, 0);
if (te->address_format != CD_MSF_FORMAT
&& te->address_format != CD_LBA_FORMAT) {
@@ -2164,7 +2164,7 @@ cdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
("trying to do CDIOCSETPATCH\n"));
data = malloc(sizeof(struct cd_mode_data), M_TEMP,
- M_WAITOK);
+ 0);
error = cdgetmode(periph, data, AUDIO_PAGE);
if (error) {
free(data, M_TEMP);
@@ -2189,7 +2189,7 @@ cdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
("trying to do CDIOCGETVOL\n"));
data = malloc(sizeof(struct cd_mode_data), M_TEMP,
- M_WAITOK);
+ 0);
error = cdgetmode(periph, data, AUDIO_PAGE);
if (error) {
free(data, M_TEMP);
@@ -2213,7 +2213,7 @@ cdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
("trying to do CDIOCSETVOL\n"));
data = malloc(sizeof(struct cd_mode_data), M_TEMP,
- M_WAITOK);
+ 0);
error = cdgetmode(periph, data, AUDIO_PAGE);
if (error) {
free(data, M_TEMP);
@@ -2239,7 +2239,7 @@ cdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
("trying to do CDIOCSETMONO\n"));
data = malloc(sizeof(struct cd_mode_data),
- M_TEMP, M_WAITOK);
+ M_TEMP, 0);
error = cdgetmode(periph, data, AUDIO_PAGE);
if (error) {
free(data, M_TEMP);
@@ -2263,7 +2263,7 @@ cdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
("trying to do CDIOCSETSTEREO\n"));
data = malloc(sizeof(struct cd_mode_data), M_TEMP,
- M_WAITOK);
+ 0);
error = cdgetmode(periph, data, AUDIO_PAGE);
if (error) {
free(data, M_TEMP);
@@ -2287,7 +2287,7 @@ cdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
("trying to do CDIOCSETMUTE\n"));
data = malloc(sizeof(struct cd_mode_data), M_TEMP,
- M_WAITOK);
+ 0);
error = cdgetmode(periph, data, AUDIO_PAGE);
if (error) {
free(data, M_TEMP);
@@ -2309,7 +2309,7 @@ cdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
("trying to do CDIOCSETLEFT\n"));
data = malloc(sizeof(struct cd_mode_data), M_TEMP,
- M_WAITOK);
+ 0);
error = cdgetmode(periph, data, AUDIO_PAGE);
if (error) {
free(data, M_TEMP);
@@ -2333,7 +2333,7 @@ cdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
("trying to do CDIOCSETRIGHT\n"));
data = malloc(sizeof(struct cd_mode_data), M_TEMP,
- M_WAITOK);
+ 0);
error = cdgetmode(periph, data, AUDIO_PAGE);
if (error) {
free(data, M_TEMP);
@@ -2485,7 +2485,7 @@ cdsize(dev_t dev, u_int32_t *size)
ccb = cdgetccb(periph, /* priority */ 1);
rcap_buf = malloc(sizeof(struct scsi_read_capacity_data),
- M_TEMP, M_WAITOK);
+ M_TEMP, 0);
scsi_read_capacity(&ccb->csio,
/*retries*/ 1,
@@ -3054,7 +3054,7 @@ cdreportkey(struct cam_periph *periph, struct dvd_authinfo *authinfo)
}
if (length != 0) {
- databuf = malloc(length, M_DEVBUF, M_WAITOK | M_ZERO);
+ databuf = malloc(length, M_DEVBUF, M_ZERO);
} else
databuf = NULL;
@@ -3187,7 +3187,7 @@ cdsendkey(struct cam_periph *periph, struct dvd_authinfo *authinfo)
length = sizeof(*challenge_data);
- challenge_data = malloc(length, M_DEVBUF, M_WAITOK | M_ZERO);
+ challenge_data = malloc(length, M_DEVBUF, M_ZERO);
databuf = (u_int8_t *)challenge_data;
@@ -3204,7 +3204,7 @@ cdsendkey(struct cam_periph *periph, struct dvd_authinfo *authinfo)
length = sizeof(*key2_data);
- key2_data = malloc(length, M_DEVBUF, M_WAITOK | M_ZERO);
+ key2_data = malloc(length, M_DEVBUF, M_ZERO);
databuf = (u_int8_t *)key2_data;
@@ -3221,7 +3221,7 @@ cdsendkey(struct cam_periph *periph, struct dvd_authinfo *authinfo)
length = sizeof(*rpc_data);
- rpc_data = malloc(length, M_DEVBUF, M_WAITOK | M_ZERO);
+ rpc_data = malloc(length, M_DEVBUF, M_ZERO);
databuf = (u_int8_t *)rpc_data;
@@ -3363,7 +3363,7 @@ cdreaddvdstructure(struct cam_periph *periph, struct dvd_struct *dvdstruct)
}
if (length != 0) {
- databuf = malloc(length, M_DEVBUF, M_WAITOK | M_ZERO);
+ databuf = malloc(length, M_DEVBUF, M_ZERO);
} else
databuf = NULL;
diff --git a/sys/cam/scsi/scsi_ch.c b/sys/cam/scsi/scsi_ch.c
index fcbb53b..51f6946 100644
--- a/sys/cam/scsi/scsi_ch.c
+++ b/sys/cam/scsi/scsi_ch.c
@@ -1100,7 +1100,7 @@ chgetelemstatus(struct cam_periph *periph,
* we can allocate enough storage for all of them. We assume
* that the first one can fit into 1k.
*/
- data = (caddr_t)malloc(1024, M_DEVBUF, M_WAITOK);
+ data = (caddr_t)malloc(1024, M_DEVBUF, 0);
ccb = cam_periph_getccb(periph, /*priority*/ 1);
@@ -1137,7 +1137,7 @@ chgetelemstatus(struct cam_periph *periph,
* device.
*/
free(data, M_DEVBUF);
- data = (caddr_t)malloc(size, M_DEVBUF, M_WAITOK);
+ data = (caddr_t)malloc(size, M_DEVBUF, 0);
scsi_read_element_status(&ccb->csio,
/* retries */ 1,
@@ -1172,7 +1172,7 @@ chgetelemstatus(struct cam_periph *periph,
user_data = (struct changer_element_status *)
malloc(avail * sizeof(struct changer_element_status),
- M_DEVBUF, M_WAITOK | M_ZERO);
+ M_DEVBUF, M_ZERO);
desc = (struct read_element_status_descriptor *)((uintptr_t)data +
sizeof(struct read_element_status_header) +
diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c
index 950d2b8..df68134 100644
--- a/sys/cam/scsi/scsi_da.c
+++ b/sys/cam/scsi/scsi_da.c
@@ -575,7 +575,7 @@ daopen(dev_t dev, int flags __unused, int fmt __unused, struct thread *td __unus
/* Do a read capacity */
rcap = (struct scsi_read_capacity_data *)malloc(sizeof(*rcap),
M_TEMP,
- M_WAITOK);
+ 0);
ccb = cam_periph_getccb(periph, /*priority*/1);
scsi_read_capacity(&ccb->csio,
diff --git a/sys/cam/scsi/scsi_low.c b/sys/cam/scsi/scsi_low.c
index afda113..753560a 100644
--- a/sys/cam/scsi/scsi_low.c
+++ b/sys/cam/scsi/scsi_low.c
@@ -961,7 +961,7 @@ scsi_low_rescan_bus_cam(slp)
struct scsi_low_softc *slp;
{
struct cam_path *path;
- union ccb *ccb = malloc(sizeof(union ccb), M_DEVBUF, M_WAITOK);
+ union ccb *ccb = malloc(sizeof(union ccb), M_DEVBUF, 0);
cam_status status;
bzero(ccb, sizeof(union ccb));
diff --git a/sys/cam/scsi/scsi_sa.c b/sys/cam/scsi/scsi_sa.c
index ce077c5..b920b00 100644
--- a/sys/cam/scsi/scsi_sa.c
+++ b/sys/cam/scsi/scsi_sa.c
@@ -1895,7 +1895,7 @@ samount(struct cam_periph *periph, int oflags, dev_t dev)
* read a full record.
*/
rblim = (struct scsi_read_block_limits_data *)
- malloc(8192, M_TEMP, M_WAITOK);
+ malloc(8192, M_TEMP, 0);
if (rblim == NULL) {
xpt_print_path(ccb->ccb_h.path);
printf("no memory for test read\n");
@@ -2520,7 +2520,7 @@ retry:
mode_buffer_len += sizeof (sa_comp_t);
}
- mode_buffer = malloc(mode_buffer_len, M_TEMP, M_WAITOK | M_ZERO);
+ mode_buffer = malloc(mode_buffer_len, M_TEMP, M_ZERO);
mode_hdr = (struct scsi_mode_header_6 *)mode_buffer;
mode_blk = (struct scsi_mode_blk_desc *)&mode_hdr[1];
@@ -2700,7 +2700,7 @@ sasetparams(struct cam_periph *periph, sa_params params_to_set,
softc = (struct sa_softc *)periph->softc;
- ccomp = malloc(sizeof (sa_comp_t), M_TEMP, M_WAITOK);
+ ccomp = malloc(sizeof (sa_comp_t), M_TEMP, 0);
/*
* Since it doesn't make sense to set the number of blocks, or
@@ -2723,7 +2723,7 @@ sasetparams(struct cam_periph *periph, sa_params params_to_set,
if (params_to_set & SA_PARAM_COMPRESSION)
mode_buffer_len += sizeof (sa_comp_t);
- mode_buffer = malloc(mode_buffer_len, M_TEMP, M_WAITOK | M_ZERO);
+ mode_buffer = malloc(mode_buffer_len, M_TEMP, M_ZERO);
mode_hdr = (struct scsi_mode_header_6 *)mode_buffer;
mode_blk = (struct scsi_mode_blk_desc *)&mode_hdr[1];
diff --git a/sys/cam/scsi/scsi_target.c b/sys/cam/scsi/scsi_target.c
index 9db2604..25001ef 100644
--- a/sys/cam/scsi/scsi_target.c
+++ b/sys/cam/scsi/scsi_target.c
@@ -189,7 +189,7 @@ targopen(dev_t dev, int flags, int fmt, struct thread *td)
"targ%d", dev2unit(dev));
}
MALLOC(softc, struct targ_softc *, sizeof(*softc), M_TARG,
- M_WAITOK | M_ZERO);
+ M_ZERO);
dev->si_drv1 = softc;
softc->state = TARG_STATE_OPENED;
softc->periph = NULL;
@@ -977,7 +977,7 @@ targgetccb(struct targ_softc *softc, xpt_opcode type, int priority)
int ccb_len;
ccb_len = targccblen(type);
- MALLOC(ccb, union ccb *, ccb_len, M_TARG, M_WAITOK);
+ MALLOC(ccb, union ccb *, ccb_len, M_TARG, 0);
CAM_DEBUG(softc->path, CAM_DEBUG_PERIPH, ("getccb %p\n", ccb));
xpt_setup_ccb(&ccb->ccb_h, softc->path, priority);
@@ -1021,7 +1021,7 @@ targgetdescr(struct targ_softc *softc)
struct targ_cmd_descr *descr;
MALLOC(descr, struct targ_cmd_descr *, sizeof(*descr), M_TARG,
- M_WAITOK);
+ 0);
descr->mapinfo.num_bufs_used = 0;
return (descr);
}
diff --git a/sys/coda/cnode.h b/sys/coda/cnode.h
index 962d329..8d0cebe 100644
--- a/sys/coda/cnode.h
+++ b/sys/coda/cnode.h
@@ -66,7 +66,7 @@ MALLOC_DECLARE(M_CODA);
#define CODA_ALLOC(ptr, cast, size) \
do { \
- ptr = (cast)malloc((unsigned long) size, M_CODA, M_WAITOK); \
+ ptr = (cast)malloc((unsigned long) size, M_CODA, 0); \
if (ptr == 0) { \
panic("kernel malloc returns 0 at %s:%d\n", __FILE__, __LINE__); \
} \
diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c
index 10eb642..8b707b4 100644
--- a/sys/compat/freebsd32/freebsd32_misc.c
+++ b/sys/compat/freebsd32/freebsd32_misc.c
@@ -106,7 +106,7 @@ ia32_emul_find(td, sgp, prefix, path, pbuf, cflag)
struct vattr vat;
struct vattr vatroot;
- buf = (char *) malloc(MAXPATHLEN, M_TEMP, M_WAITOK);
+ buf = (char *) malloc(MAXPATHLEN, M_TEMP, 0);
*pbuf = path;
for (ptr = buf; (*ptr = *prefix) != '\0'; ptr++, prefix++)
@@ -769,8 +769,8 @@ ia32_readv(struct thread *td, struct ia32_readv_args *uap)
osize = uap->iovcnt * sizeof (struct iovec32);
nsize = uap->iovcnt * sizeof (struct iovec);
- oio = malloc(osize, M_TEMP, M_WAITOK);
- nio = malloc(nsize, M_TEMP, M_WAITOK);
+ oio = malloc(osize, M_TEMP, 0);
+ nio = malloc(nsize, M_TEMP, 0);
error = 0;
if ((error = copyin(uap->iovp, oio, osize)))
@@ -815,8 +815,8 @@ ia32_writev(struct thread *td, struct ia32_writev_args *uap)
osize = uap->iovcnt * sizeof (struct iovec32);
nsize = uap->iovcnt * sizeof (struct iovec);
- oio = malloc(osize, M_TEMP, M_WAITOK);
- nio = malloc(nsize, M_TEMP, M_WAITOK);
+ oio = malloc(osize, M_TEMP, 0);
+ nio = malloc(nsize, M_TEMP, 0);
error = 0;
if ((error = copyin(uap->iovp, oio, osize)))
diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c
index 2b37dcd..160b2a9 100644
--- a/sys/compat/linux/linux_file.c
+++ b/sys/compat/linux/linux_file.c
@@ -297,7 +297,7 @@ getdents_common(struct thread *td, struct linux_getdents64_args *args,
buflen = max(LINUX_DIRBLKSIZ, nbytes);
buflen = min(buflen, MAXBSIZE);
- buf = malloc(buflen, M_TEMP, M_WAITOK);
+ buf = malloc(buflen, M_TEMP, 0);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td);
again:
diff --git a/sys/compat/linux/linux_getcwd.c b/sys/compat/linux/linux_getcwd.c
index bb1c28f..81e84a3 100644
--- a/sys/compat/linux/linux_getcwd.c
+++ b/sys/compat/linux/linux_getcwd.c
@@ -181,7 +181,7 @@ linux_getcwd_scandir(lvpp, uvpp, bpp, bufp, td)
dirbuflen = DIRBLKSIZ;
if (dirbuflen < va.va_blocksize)
dirbuflen = va.va_blocksize;
- dirbuf = (char *)malloc(dirbuflen, M_TEMP, M_WAITOK);
+ dirbuf = (char *)malloc(dirbuflen, M_TEMP, 0);
#if 0
unionread:
@@ -429,7 +429,7 @@ linux_getcwd(struct thread *td, struct linux_getcwd_args *args)
else if (len < 2)
return ERANGE;
- path = (char *)malloc(len, M_TEMP, M_WAITOK);
+ path = (char *)malloc(len, M_TEMP, 0);
error = kern___getcwd(td, path, UIO_SYSSPACE, len);
if (!error) {
diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c
index 9f10ba5..eb1b974 100644
--- a/sys/compat/linux/linux_ioctl.c
+++ b/sys/compat/linux/linux_ioctl.c
@@ -2420,7 +2420,7 @@ linux_ioctl_register_handler(struct linux_ioctl_handler *h)
}
if (he == NULL) {
MALLOC(he, struct handler_element *, sizeof(*he),
- M_LINUX, M_WAITOK);
+ M_LINUX, 0);
he->func = h->func;
} else
TAILQ_REMOVE(&handlers, he, list);
diff --git a/sys/compat/linux/linux_mib.c b/sys/compat/linux/linux_mib.c
index d9cdd07..4f7f199 100644
--- a/sys/compat/linux/linux_mib.c
+++ b/sys/compat/linux/linux_mib.c
@@ -139,7 +139,7 @@ linux_get_prison(struct proc *p)
if (pr->pr_linux == NULL) {
mtx_unlock(&pr->pr_mtx);
MALLOC(lpr, struct linux_prison *, sizeof *lpr,
- M_PRISON, M_WAITOK|M_ZERO);
+ M_PRISON, M_ZERO);
mtx_lock(&pr->pr_mtx);
if (pr->pr_linux == NULL) {
pr->pr_linux = lpr;
diff --git a/sys/compat/linux/linux_sysctl.c b/sys/compat/linux/linux_sysctl.c
index 699b5d6..d737f55 100644
--- a/sys/compat/linux/linux_sysctl.c
+++ b/sys/compat/linux/linux_sysctl.c
@@ -92,7 +92,7 @@ linux_sysctl(struct thread *td, struct linux_sysctl_args *args)
if (la.nlen <= 0 || la.nlen > LINUX_CTL_MAXNAME)
return (ENOTDIR);
- mib = malloc(la.nlen * sizeof(l_int), M_TEMP, M_WAITOK);
+ mib = malloc(la.nlen * sizeof(l_int), M_TEMP, 0);
error = copyin(la.name, mib, la.nlen * sizeof(l_int));
if (error) {
free(mib, M_TEMP);
diff --git a/sys/compat/linux/linux_util.c b/sys/compat/linux/linux_util.c
index 5bd8c15..bd2c81d 100644
--- a/sys/compat/linux/linux_util.c
+++ b/sys/compat/linux/linux_util.c
@@ -101,7 +101,7 @@ linux_emul_convpath(td, path, pathseg, pbuf, cflag)
char *ptr, *buf, *cp;
size_t len, sz;
- buf = (char *) malloc(MAXPATHLEN, M_TEMP, M_WAITOK);
+ buf = (char *) malloc(MAXPATHLEN, M_TEMP, 0);
*pbuf = buf;
prefix = linux_emul_path;
diff --git a/sys/compat/pecoff/imgact_pecoff.c b/sys/compat/pecoff/imgact_pecoff.c
index fd9ab26..b15e5c6 100644
--- a/sys/compat/pecoff/imgact_pecoff.c
+++ b/sys/compat/pecoff/imgact_pecoff.c
@@ -184,7 +184,7 @@ pecoff_coredump(register struct thread * td, register struct vnode * vp,
limit)
return (EFAULT);
tempuser = malloc(ctob(uarea_pages + kstack_pages), M_TEMP,
- M_WAITOK | M_ZERO);
+ M_ZERO);
if (tempuser == NULL)
return (ENOMEM);
PROC_LOCK(p);
@@ -393,7 +393,7 @@ pecoff_load_file(struct thread * td, const char *file, u_long * addr, u_long * e
goto fail;
if ((error = pecoff_signature(td, imgp->vp, &dh) != 0))
goto fail;
- fp = malloc(PECOFF_HDR_SIZE, M_TEMP, M_WAITOK);
+ fp = malloc(PECOFF_HDR_SIZE, M_TEMP, 0);
peofs = dh.d_peofs + sizeof(signature) - 1;
if ((error = pecoff_read_from(td, imgp->vp, peofs, (caddr_t) fp, PECOFF_HDR_SIZE) != 0))
goto fail;
@@ -405,7 +405,7 @@ pecoff_load_file(struct thread * td, const char *file, u_long * addr, u_long * e
wp = (void *) ((char *) ap + sizeof(struct coff_aouthdr));
/* read section header */
scnsiz = sizeof(struct coff_scnhdr) * fp->f_nscns;
- sh = malloc(scnsiz, M_TEMP, M_WAITOK);
+ sh = malloc(scnsiz, M_TEMP, 0);
if ((error = pecoff_read_from(td, imgp->vp, peofs + PECOFF_HDR_SIZE,
(caddr_t) sh, scnsiz)) != 0)
goto fail;
@@ -481,7 +481,7 @@ exec_pecoff_coff_prep_zmagic(struct image_params * imgp,
struct vmspace *vmspace;
struct pecoff_args *argp = NULL;
- sh = malloc(scnsiz, M_TEMP, M_WAITOK);
+ sh = malloc(scnsiz, M_TEMP, 0);
wp = (void *) ((char *) ap + sizeof(struct coff_aouthdr));
error = pecoff_read_from(FIRST_THREAD_IN_PROC(imgp->proc), imgp->vp,
@@ -529,7 +529,7 @@ exec_pecoff_coff_prep_zmagic(struct image_params * imgp,
vmspace->vm_taddr = (caddr_t) (uintptr_t) text_addr;
vmspace->vm_dsize = data_size >> PAGE_SHIFT;
vmspace->vm_daddr = (caddr_t) (uintptr_t) data_addr;
- argp = malloc(sizeof(struct pecoff_args), M_TEMP, M_WAITOK);
+ argp = malloc(sizeof(struct pecoff_args), M_TEMP, 0);
if (argp == NULL) {
error = ENOMEM;
goto fail;
@@ -659,7 +659,7 @@ imgact_pecoff(struct image_params * imgp)
VOP_UNLOCK(imgp->vp, 0, td);
peofs = dp->d_peofs + sizeof(signature) - 1;
- fp = malloc(PECOFF_HDR_SIZE, M_TEMP, M_WAITOK);
+ fp = malloc(PECOFF_HDR_SIZE, M_TEMP, 0);
error = pecoff_read_from(FIRST_THREAD_IN_PROC(imgp->proc),
imgp->vp, peofs, (caddr_t) fp, PECOFF_HDR_SIZE);
if (error)
diff --git a/sys/compat/svr4/svr4_filio.c b/sys/compat/svr4/svr4_filio.c
index ca1b8db..ab98dce 100644
--- a/sys/compat/svr4/svr4_filio.c
+++ b/sys/compat/svr4/svr4_filio.c
@@ -68,7 +68,7 @@ svr4_sys_poll(td, uap)
pa.timeout = uap->timeout;
siz = uap->nfds * sizeof(struct pollfd);
- pfd = (struct pollfd *)malloc(siz, M_TEMP, M_WAITOK);
+ pfd = (struct pollfd *)malloc(siz, M_TEMP, 0);
error = poll(td, (struct poll_args *)uap);
diff --git a/sys/compat/svr4/svr4_misc.c b/sys/compat/svr4/svr4_misc.c
index 2db3c96..5938993 100644
--- a/sys/compat/svr4/svr4_misc.c
+++ b/sys/compat/svr4/svr4_misc.c
@@ -296,7 +296,7 @@ svr4_sys_getdents64(td, uap)
#define DIRBLKSIZ 512 /* XXX we used to use ufs's DIRBLKSIZ */
buflen = max(DIRBLKSIZ, nbytes);
buflen = min(buflen, MAXBSIZE);
- buf = malloc(buflen, M_TEMP, M_WAITOK);
+ buf = malloc(buflen, M_TEMP, 0);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td);
again:
aiov.iov_base = buf;
@@ -459,7 +459,7 @@ svr4_sys_getdents(td, uap)
}
buflen = min(MAXBSIZE, uap->nbytes);
- buf = malloc(buflen, M_TEMP, M_WAITOK);
+ buf = malloc(buflen, M_TEMP, 0);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td);
off = fp->f_offset;
again:
diff --git a/sys/compat/svr4/svr4_socket.c b/sys/compat/svr4/svr4_socket.c
index b5da396..54274f9 100644
--- a/sys/compat/svr4/svr4_socket.c
+++ b/sys/compat/svr4/svr4_socket.c
@@ -138,7 +138,7 @@ svr4_add_socket(td, path, st)
atomic_store_rel_int(&svr4_str_initialized, 2);
}
- e = malloc(sizeof(*e), M_TEMP, M_WAITOK);
+ e = malloc(sizeof(*e), M_TEMP, 0);
e->cookie = NULL;
e->dev = st->st_dev;
e->ino = st->st_ino;
diff --git a/sys/compat/svr4/svr4_stream.c b/sys/compat/svr4/svr4_stream.c
index 9a5c465..6742009 100644
--- a/sys/compat/svr4/svr4_stream.c
+++ b/sys/compat/svr4/svr4_stream.c
@@ -212,7 +212,7 @@ svr4_sendit(td, s, mp, flags)
if (KTRPOINT(td, KTR_GENIO)) {
int iovlen = auio.uio_iovcnt * sizeof (struct iovec);
- MALLOC(ktriov, struct iovec *, iovlen, M_TEMP, M_WAITOK);
+ MALLOC(ktriov, struct iovec *, iovlen, M_TEMP, 0);
bcopy((caddr_t)auio.uio_iov, (caddr_t)ktriov, iovlen);
ktruio = auio;
}
@@ -297,7 +297,7 @@ svr4_recvit(td, s, mp, namelenp)
if (KTRPOINT(td, KTR_GENIO)) {
int iovlen = auio.uio_iovcnt * sizeof (struct iovec);
- MALLOC(ktriov, struct iovec *, iovlen, M_TEMP, M_WAITOK);
+ MALLOC(ktriov, struct iovec *, iovlen, M_TEMP, 0);
bcopy((caddr_t)auio.uio_iov, (caddr_t)ktriov, iovlen);
ktruio = auio;
}
@@ -408,7 +408,7 @@ show_ioc(str, ioc)
const char *str;
struct svr4_strioctl *ioc;
{
- u_char *ptr = (u_char *) malloc(ioc->len, M_TEMP, M_WAITOK);
+ u_char *ptr = (u_char *) malloc(ioc->len, M_TEMP, 0);
int error;
uprintf("%s cmd = %ld, timeout = %d, len = %d, buf = %p { ",
@@ -444,7 +444,7 @@ show_strbuf(str)
len = maxlen;
if (len > 0) {
- ptr = (u_char *) malloc(len, M_TEMP, M_WAITOK);
+ ptr = (u_char *) malloc(len, M_TEMP, 0);
if ((error = copyin(str->buf, ptr, len)) != 0) {
free((char *) ptr, M_TEMP);
diff --git a/sys/compat/svr4/svr4_sysvec.c b/sys/compat/svr4/svr4_sysvec.c
index 1d4ad6e..508e9dc 100644
--- a/sys/compat/svr4/svr4_sysvec.c
+++ b/sys/compat/svr4/svr4_sysvec.c
@@ -267,7 +267,7 @@ svr4_emul_find(td, sgp, prefix, path, pbuf, cflag)
char *ptr, *buf, *cp;
size_t sz, len;
- buf = (char *) malloc(MAXPATHLEN, M_TEMP, M_WAITOK);
+ buf = (char *) malloc(MAXPATHLEN, M_TEMP, 0);
*pbuf = path;
for (ptr = buf; (*ptr = *prefix) != '\0'; ptr++, prefix++)
diff --git a/sys/contrib/dev/fla/fla.c b/sys/contrib/dev/fla/fla.c
index ac2a8ab..3ed9f71 100644
--- a/sys/contrib/dev/fla/fla.c
+++ b/sys/contrib/dev/fla/fla.c
@@ -65,7 +65,7 @@ static struct cdevsw fladisk_cdevsw;
void *
doc2k_malloc(int bytes)
{
- return malloc(bytes, M_FLA, M_WAITOK);
+ return malloc(bytes, M_FLA, 0);
}
void
diff --git a/sys/contrib/dev/oltr/if_oltr.c b/sys/contrib/dev/oltr/if_oltr.c
index a4b1a82..ea4dcc3 100644
--- a/sys/contrib/dev/oltr/if_oltr.c
+++ b/sys/contrib/dev/oltr/if_oltr.c
@@ -1405,14 +1405,14 @@ DriverReceiveFrameCompleted(void *DriverHandle, int ByteCount, int FragmentCount
if (sc->state > OL_CLOSED) {
if (ReceiveStatus == TRLLD_RCV_OK) {
- MGETHDR(m0, M_DONTWAIT, MT_DATA);
+ MGETHDR(m0, M_NOWAIT, MT_DATA);
mbuf_size = MHLEN - 2;
if (!m0) {
ifp->if_ierrors++;
goto dropped;
}
if (ByteCount + 2 > MHLEN) {
- MCLGET(m0, M_DONTWAIT);
+ MCLGET(m0, M_NOWAIT);
mbuf_size = MCLBYTES - 2;
if (!(m0->m_flags & M_EXT)) {
m_freem(m0);
@@ -1447,7 +1447,7 @@ DriverReceiveFrameCompleted(void *DriverHandle, int ByteCount, int FragmentCount
frag_offset = 0;
}
if ((mbuf_offset == mbuf_size) && (frame_len > 0)) {
- MGET(m1, M_DONTWAIT, MT_DATA);
+ MGET(m1, M_NOWAIT, MT_DATA);
mbuf_size = MHLEN;
if (!m1) {
ifp->if_ierrors++;
@@ -1455,7 +1455,7 @@ DriverReceiveFrameCompleted(void *DriverHandle, int ByteCount, int FragmentCount
goto dropped;
}
if (frame_len > MHLEN) {
- MCLGET(m1, M_DONTWAIT);
+ MCLGET(m1, M_NOWAIT);
mbuf_size = MCLBYTES;
if (!(m1->m_flags & M_EXT)) {
m_freem(m0);
diff --git a/sys/contrib/ipfilter/netinet/fil.c b/sys/contrib/ipfilter/netinet/fil.c
index 434e9e6..96432a1 100644
--- a/sys/contrib/ipfilter/netinet/fil.c
+++ b/sys/contrib/ipfilter/netinet/fil.c
@@ -1188,7 +1188,7 @@ logit:
mc = dupmsg(m);
# else
# if defined(__OpenBSD__) && (OpenBSD >= 199905)
- mc = m_copym2(m, 0, M_COPYALL, M_DONTWAIT);
+ mc = m_copym2(m, 0, M_COPYALL, M_NOWAIT);
# else
mc = m_copy(m, 0, M_COPYALL);
# endif
@@ -1587,7 +1587,7 @@ m_copyback(m0, off, len, cp)
off -= mlen;
totlen += mlen;
if (m->m_next == 0) {
- n = m_getclr(M_DONTWAIT, m->m_type);
+ n = m_getclr(M_NOWAIT, m->m_type);
if (n == 0)
goto out;
n->m_len = min(MLEN, len + off);
@@ -1606,7 +1606,7 @@ m_copyback(m0, off, len, cp)
if (len == 0)
break;
if (m->m_next == 0) {
- n = m_get(M_DONTWAIT, m->m_type);
+ n = m_get(M_NOWAIT, m->m_type);
if (n == 0)
break;
n->m_len = min(MLEN, len);
diff --git a/sys/contrib/ipfilter/netinet/ip_fil.c b/sys/contrib/ipfilter/netinet/ip_fil.c
index f7f6352..da64a49 100644
--- a/sys/contrib/ipfilter/netinet/ip_fil.c
+++ b/sys/contrib/ipfilter/netinet/ip_fil.c
@@ -1160,9 +1160,9 @@ fr_info_t *fin;
if (tcp->th_flags & TH_RST)
return -1; /* feedback loop */
# if (BSD < 199306) || defined(__sgi)
- m = m_get(M_DONTWAIT, MT_HEADER);
+ m = m_get(M_NOWAIT, MT_HEADER);
# else
- m = m_gethdr(M_DONTWAIT, MT_HEADER);
+ m = m_gethdr(M_NOWAIT, MT_HEADER);
# endif
if (m == NULL)
return ENOBUFS;
@@ -1337,10 +1337,10 @@ int dst;
# if (BSD < 199306) || defined(__sgi)
avail = MLEN;
- m = m_get(M_DONTWAIT, MT_HEADER);
+ m = m_get(M_NOWAIT, MT_HEADER);
# else
avail = MHLEN;
- m = m_gethdr(M_DONTWAIT, MT_HEADER);
+ m = m_gethdr(M_NOWAIT, MT_HEADER);
# endif
if (m == NULL)
return ENOBUFS;
@@ -1364,11 +1364,11 @@ int dst;
if (type == ICMP6_DST_UNREACH)
code = icmptoicmp6unreach[code];
- MGETHDR(m, M_DONTWAIT, MT_HEADER);
+ MGETHDR(m, M_NOWAIT, MT_HEADER);
if (!m)
return ENOBUFS;
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
m_freem(m);
return ENOBUFS;
@@ -1564,7 +1564,7 @@ frdest_t *fdp;
* problem.
*/
if (M_WRITABLE(m) == 0) {
- if ((m0 = m_dup(m, M_DONTWAIT)) != NULL) {
+ if ((m0 = m_dup(m, M_NOWAIT)) != NULL) {
m_freem(*mpp);
*mpp = m0;
m = m0;
@@ -1747,9 +1747,9 @@ frdest_t *fdp;
mhlen = sizeof (struct ip);
for (off = hlen + len; off < ip->ip_len; off += len) {
# ifdef MGETHDR
- MGETHDR(m, M_DONTWAIT, MT_HEADER);
+ MGETHDR(m, M_NOWAIT, MT_HEADER);
# else
- MGET(m, M_DONTWAIT, MT_HEADER);
+ MGET(m, M_NOWAIT, MT_HEADER);
# endif
if (m == 0) {
error = ENOBUFS;
diff --git a/sys/dev/agp/agp.c b/sys/dev/agp/agp.c
index 2281334..ddd29b9 100644
--- a/sys/dev/agp/agp.c
+++ b/sys/dev/agp/agp.c
@@ -351,7 +351,7 @@ agp_generic_alloc_memory(device_t dev, int type, vm_size_t size)
return 0;
}
- mem = malloc(sizeof *mem, M_AGP, M_WAITOK);
+ mem = malloc(sizeof *mem, M_AGP, 0);
mem->am_id = sc->as_nextid++;
mem->am_size = size;
mem->am_type = 0;
diff --git a/sys/dev/agp/agp_i810.c b/sys/dev/agp/agp_i810.c
index dba76a9..d7c42f4 100644
--- a/sys/dev/agp/agp_i810.c
+++ b/sys/dev/agp/agp_i810.c
@@ -500,7 +500,7 @@ agp_i810_alloc_memory(device_t dev, int type, vm_size_t size)
return 0;
}
- mem = malloc(sizeof *mem, M_AGP, M_WAITOK);
+ mem = malloc(sizeof *mem, M_AGP, 0);
mem->am_id = sc->agp.as_nextid++;
mem->am_size = size;
mem->am_type = type;
diff --git a/sys/dev/amr/amr.c b/sys/dev/amr/amr.c
index e75c2af..e763c6c 100644
--- a/sys/dev/amr/amr.c
+++ b/sys/dev/amr/amr.c
@@ -433,7 +433,7 @@ amr_ioctl(dev_t dev, u_long cmd, caddr_t addr, int32_t flag, d_thread_t *td)
debug(1, "AMR_IO_COMMAND 0x%x", au->au_cmd[0]);
/* handle inbound data buffer */
if (au->au_length != 0) {
- if ((dp = malloc(au->au_length, M_DEVBUF, M_WAITOK)) == NULL) {
+ if ((dp = malloc(au->au_length, M_DEVBUF, 0)) == NULL) {
error = ENOMEM;
break;
}
@@ -449,7 +449,7 @@ amr_ioctl(dev_t dev, u_long cmd, caddr_t addr, int32_t flag, d_thread_t *td)
/* handle SCSI passthrough command */
if (au->au_cmd[0] == AMR_CMD_PASS) {
- if ((ap = malloc(sizeof(*ap), M_DEVBUF, M_WAITOK | M_ZERO)) == NULL) {
+ if ((ap = malloc(sizeof(*ap), M_DEVBUF, M_ZERO)) == NULL) {
error = ENOMEM;
break;
}
diff --git a/sys/dev/an/if_an.c b/sys/dev/an/if_an.c
index 0a87b3c..70fb414 100644
--- a/sys/dev/an/if_an.c
+++ b/sys/dev/an/if_an.c
@@ -922,12 +922,12 @@ an_rxeof(sc)
/* dump raw 802.11 packet to bpf and skip ip stack */
BPF_TAP(ifp, bpf_buf, len);
} else {
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
ifp->if_ierrors++;
return;
}
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if (!(m->m_flags & M_EXT)) {
m_freem(m);
ifp->if_ierrors++;
@@ -1007,12 +1007,12 @@ an_rxeof(sc)
if (an_rx_desc.an_done && !an_rx_desc.an_valid) {
buf = sc->an_rx_buffer[count].an_dma_vaddr;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
ifp->if_ierrors++;
return;
}
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if (!(m->m_flags & M_EXT)) {
m_freem(m);
ifp->if_ierrors++;
@@ -3580,7 +3580,7 @@ flashcard(ifp, l_ioctl)
free(sc->an_flash_buffer, M_DEVBUF);
sc->an_flash_buffer = NULL;
}
- sc->an_flash_buffer = malloc(FLASH_SIZE, M_DEVBUF, M_WAITOK);
+ sc->an_flash_buffer = malloc(FLASH_SIZE, M_DEVBUF, 0);
if (sc->an_flash_buffer)
return setflashmode(ifp);
else
diff --git a/sys/dev/ar/if_ar.c b/sys/dev/ar/if_ar.c
index 0c09885..14561f7 100644
--- a/sys/dev/ar/if_ar.c
+++ b/sys/dev/ar/if_ar.c
@@ -1078,7 +1078,7 @@ arc_init(struct ar_hardc *hc)
u_char isr, mar;
MALLOC(sc, struct ar_softc *, hc->numports * sizeof(struct ar_softc),
- M_DEVBUF, M_WAITOK | M_ZERO);
+ M_DEVBUF, M_ZERO);
if (sc == NULL)
return;
hc->sc = sc;
@@ -1678,7 +1678,7 @@ ar_get_packets(struct ar_softc *sc)
while(ar_packet_avail(sc, &len, &rxstat)) {
TRC(printf("apa: len %d, rxstat %x\n", len, rxstat));
if(((rxstat & SCA_DESC_ERRORS) == 0) && (len < MCLBYTES)) {
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if(m == NULL) {
/* eat packet if get mbuf fail!! */
ar_eat_packet(sc, 1);
@@ -1693,7 +1693,7 @@ ar_get_packets(struct ar_softc *sc)
#endif /* NETGRAPH */
m->m_pkthdr.len = m->m_len = len;
if(len > MHLEN) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if((m->m_flags & M_EXT) == 0) {
m_freem(m);
ar_eat_packet(sc, 1);
diff --git a/sys/dev/asr/asr.c b/sys/dev/asr/asr.c
index 4e1c284..c377c9d 100644
--- a/sys/dev/asr/asr.c
+++ b/sys/dev/asr/asr.c
@@ -911,7 +911,7 @@ asr_alloc_ccb (
OUT union asr_ccb * new_ccb;
if ((new_ccb = (union asr_ccb *)malloc(sizeof(*new_ccb),
- M_DEVBUF, M_WAITOK | M_ZERO)) != (union asr_ccb *)NULL) {
+ M_DEVBUF, M_ZERO)) != (union asr_ccb *)NULL) {
new_ccb->ccb_h.pinfo.priority = 1;
new_ccb->ccb_h.pinfo.index = CAM_UNQUEUED_INDEX;
new_ccb->ccb_h.spriv_ptr0 = sc;
@@ -1205,7 +1205,7 @@ ASR_getTidAddress(
if ((new_entry == FALSE)
|| ((sc->ha_targets[bus] = bus_ptr = (target2lun_t *)malloc (
sizeof(*bus_ptr) + (sizeof(bus_ptr->LUN) * new_size),
- M_TEMP, M_WAITOK | M_ZERO))
+ M_TEMP, M_ZERO))
== (target2lun_t *)NULL)) {
debug_asr_printf("failed to allocate bus list\n");
return ((tid_t *)NULL);
@@ -1222,7 +1222,7 @@ ASR_getTidAddress(
if ((new_entry == FALSE)
|| ((new_bus_ptr = (target2lun_t *)malloc (
sizeof(*bus_ptr) + (sizeof(bus_ptr->LUN) * new_size),
- M_TEMP, M_WAITOK | M_ZERO))
+ M_TEMP, M_ZERO))
== (target2lun_t *)NULL)) {
debug_asr_printf("failed to reallocate bus list\n");
return ((tid_t *)NULL);
@@ -1258,7 +1258,7 @@ ASR_getTidAddress(
if ((new_entry == FALSE)
|| ((bus_ptr->LUN[target] = target_ptr = (lun2tid_t *)malloc (
sizeof(*target_ptr) + (sizeof(target_ptr->TID) * new_size),
- M_TEMP, M_WAITOK | M_ZERO))
+ M_TEMP, M_ZERO))
== (lun2tid_t *)NULL)) {
debug_asr_printf("failed to allocate target list\n");
return ((tid_t *)NULL);
@@ -1275,7 +1275,7 @@ ASR_getTidAddress(
if ((new_entry == FALSE)
|| ((new_target_ptr = (lun2tid_t *)malloc (
sizeof(*target_ptr) + (sizeof(target_ptr->TID) * new_size),
- M_TEMP, M_WAITOK | M_ZERO))
+ M_TEMP, M_ZERO))
== (lun2tid_t *)NULL)) {
debug_asr_printf("failed to reallocate target list\n");
return ((tid_t *)NULL);
@@ -1808,7 +1808,7 @@ ASR_acquireLct (
MessageSizeInBytes = sizeof(I2O_EXEC_LCT_NOTIFY_MESSAGE)
- sizeof(I2O_SG_ELEMENT) + sizeof(I2O_SGE_SIMPLE_ELEMENT);
if ((Message_Ptr = (PI2O_EXEC_LCT_NOTIFY_MESSAGE)malloc (
- MessageSizeInBytes, M_TEMP, M_WAITOK))
+ MessageSizeInBytes, M_TEMP, 0))
== (PI2O_EXEC_LCT_NOTIFY_MESSAGE)NULL) {
return (ENOMEM);
}
@@ -1852,7 +1852,7 @@ ASR_acquireLct (
free (Message_Ptr, M_TEMP);
return (EINVAL);
}
- if ((sc->ha_LCT = (PI2O_LCT)malloc (len, M_TEMP, M_WAITOK))
+ if ((sc->ha_LCT = (PI2O_LCT)malloc (len, M_TEMP, 0))
== (PI2O_LCT)NULL) {
free (Message_Ptr, M_TEMP);
return (ENOMEM);
@@ -1921,7 +1921,7 @@ ASR_acquireLct (
PI2O_EXEC_LCT_NOTIFY_MESSAGE NewMessage_Ptr;
if ((NewMessage_Ptr = (PI2O_EXEC_LCT_NOTIFY_MESSAGE)
- malloc (MessageSizeInBytes, M_TEMP, M_WAITOK))
+ malloc (MessageSizeInBytes, M_TEMP, 0))
== (PI2O_EXEC_LCT_NOTIFY_MESSAGE)NULL) {
free (sc->ha_LCT, M_TEMP);
sc->ha_LCT = (PI2O_LCT)NULL;
@@ -2262,7 +2262,7 @@ ASR_initOutBound (
* initialization time.
*/
if ((sc->ha_Msgs = (PI2O_SCSI_ERROR_REPLY_MESSAGE_FRAME)
- contigmalloc (size, M_DEVBUF, M_WAITOK, 0ul,
+ contigmalloc (size, M_DEVBUF, 0, 0ul,
0xFFFFFFFFul, (u_long)sizeof(U32), 0ul))
!= (PI2O_SCSI_ERROR_REPLY_MESSAGE_FRAME)NULL) {
(void)bzero ((char *)sc->ha_Msgs, size);
@@ -2296,7 +2296,7 @@ ASR_setSysTab(
int retVal;
if ((SystemTable = (PI2O_SET_SYSTAB_HEADER)malloc (
- sizeof(I2O_SET_SYSTAB_HEADER), M_TEMP, M_WAITOK | M_ZERO))
+ sizeof(I2O_SET_SYSTAB_HEADER), M_TEMP, M_ZERO))
== (PI2O_SET_SYSTAB_HEADER)NULL) {
return (ENOMEM);
}
@@ -2306,7 +2306,7 @@ ASR_setSysTab(
if ((Message_Ptr = (PI2O_EXEC_SYS_TAB_SET_MESSAGE)malloc (
sizeof(I2O_EXEC_SYS_TAB_SET_MESSAGE) - sizeof(I2O_SG_ELEMENT)
+ ((3+SystemTable->NumberEntries) * sizeof(I2O_SGE_SIMPLE_ELEMENT)),
- M_TEMP, M_WAITOK)) == (PI2O_EXEC_SYS_TAB_SET_MESSAGE)NULL) {
+ M_TEMP, 0)) == (PI2O_EXEC_SYS_TAB_SET_MESSAGE)NULL) {
free (SystemTable, M_TEMP);
return (ENOMEM);
}
@@ -2918,7 +2918,7 @@ asr_attach (ATTACH_ARGS)
/* Check if the device is there? */
if ((ASR_resetIOP(sc->ha_Virt, sc->ha_Fvirt) == 0)
|| ((status = (PI2O_EXEC_STATUS_GET_REPLY)malloc (
- sizeof(I2O_EXEC_STATUS_GET_REPLY), M_TEMP, M_WAITOK))
+ sizeof(I2O_EXEC_STATUS_GET_REPLY), M_TEMP, 0))
== (PI2O_EXEC_STATUS_GET_REPLY)NULL)
|| (ASR_getStatus(sc->ha_Virt, sc->ha_Fvirt, status) == NULL)) {
printf ("asr%d: could not initialize hardware\n", unit);
@@ -3037,7 +3037,7 @@ asr_attach (ATTACH_ARGS)
printf ("asr%d:", unit);
if ((iq = (struct scsi_inquiry_data *)malloc (
- sizeof(struct scsi_inquiry_data), M_TEMP, M_WAITOK | M_ZERO))
+ sizeof(struct scsi_inquiry_data), M_TEMP, M_ZERO))
!= (struct scsi_inquiry_data *)NULL) {
defAlignLong(PRIVATE_SCSI_SCB_EXECUTE_MESSAGE,Message);
PPRIVATE_SCSI_SCB_EXECUTE_MESSAGE Message_Ptr;
@@ -3947,7 +3947,7 @@ ASR_queue_i(
}
/* Copy in the message into a local allocation */
if ((Message_Ptr = (PI2O_MESSAGE_FRAME)malloc (
- sizeof(I2O_MESSAGE_FRAME), M_TEMP, M_WAITOK))
+ sizeof(I2O_MESSAGE_FRAME), M_TEMP, 0))
== (PI2O_MESSAGE_FRAME)NULL) {
debug_usr_cmd_printf (
"Failed to acquire I2O_MESSAGE_FRAME memory\n");
@@ -4014,7 +4014,7 @@ ASR_queue_i(
}
if ((Message_Ptr = (PI2O_MESSAGE_FRAME)malloc (MessageSizeInBytes,
- M_TEMP, M_WAITOK)) == (PI2O_MESSAGE_FRAME)NULL) {
+ M_TEMP, 0)) == (PI2O_MESSAGE_FRAME)NULL) {
debug_usr_cmd_printf ("Failed to acquire frame[%d] memory\n",
MessageSizeInBytes);
return (ENOMEM);
@@ -4030,7 +4030,7 @@ ASR_queue_i(
/* Check the size of the reply frame, and start constructing */
if ((Reply_Ptr = (PI2O_SCSI_ERROR_REPLY_MESSAGE_FRAME)malloc (
- sizeof(I2O_MESSAGE_FRAME), M_TEMP, M_WAITOK))
+ sizeof(I2O_MESSAGE_FRAME), M_TEMP, 0))
== (PI2O_SCSI_ERROR_REPLY_MESSAGE_FRAME)NULL) {
free (Message_Ptr, M_TEMP);
debug_usr_cmd_printf (
@@ -4061,7 +4061,7 @@ ASR_queue_i(
((ReplySizeInBytes > sizeof(I2O_SCSI_ERROR_REPLY_MESSAGE_FRAME))
? ReplySizeInBytes
: sizeof(I2O_SCSI_ERROR_REPLY_MESSAGE_FRAME)),
- M_TEMP, M_WAITOK)) == (PI2O_SCSI_ERROR_REPLY_MESSAGE_FRAME)NULL) {
+ M_TEMP, 0)) == (PI2O_SCSI_ERROR_REPLY_MESSAGE_FRAME)NULL) {
free (Message_Ptr, M_TEMP);
debug_usr_cmd_printf ("Failed to acquire frame[%d] memory\n",
ReplySizeInBytes);
@@ -4130,7 +4130,7 @@ ASR_queue_i(
if ((elm = (struct ioctlSgList_S *)malloc (
sizeof(*elm) - sizeof(elm->KernelSpace) + len,
- M_TEMP, M_WAITOK))
+ M_TEMP, 0))
== (struct ioctlSgList_S *)NULL) {
debug_usr_cmd_printf (
"Failed to allocate SG[%d]\n", len);
@@ -4219,7 +4219,7 @@ ASR_queue_i(
if ((NewMessage_Ptr
= (PI2O_MESSAGE_FRAME)
malloc (MessageSizeInBytes,
- M_TEMP, M_WAITOK))
+ M_TEMP, 0))
== (PI2O_MESSAGE_FRAME)NULL) {
debug_usr_cmd_printf (
"Failed to acquire frame[%d] memory\n",
diff --git a/sys/dev/ata/atapi-cam.c b/sys/dev/ata/atapi-cam.c
index 02e234b..b6329a6 100644
--- a/sys/dev/ata/atapi-cam.c
+++ b/sys/dev/ata/atapi-cam.c
@@ -624,7 +624,7 @@ static void
cam_rescan(struct cam_sim *sim)
{
struct cam_path *path;
- union ccb *ccb = malloc(sizeof(union ccb), M_ATACAM, M_WAITOK | M_ZERO);
+ union ccb *ccb = malloc(sizeof(union ccb), M_ATACAM, M_ZERO);
if (xpt_create_path(&path, xpt_periph, cam_sim_path(sim),
CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD) != CAM_REQ_CMP)
diff --git a/sys/dev/awi/awi.c b/sys/dev/awi/awi.c
index e77fae6..1eeaf78 100644
--- a/sys/dev/awi/awi.c
+++ b/sys/dev/awi/awi.c
@@ -1243,7 +1243,7 @@ awi_fix_txhdr(sc, m0)
llc->llc_snap.org_code[2] = 0;
llc->llc_snap.ether_type = eh.ether_type;
}
- M_PREPEND(m0, sizeof(struct ieee80211_frame), M_DONTWAIT);
+ M_PREPEND(m0, sizeof(struct ieee80211_frame), M_NOWAIT);
if (m0 == NULL)
return NULL;
wh = mtod(m0, struct ieee80211_frame *);
@@ -1321,7 +1321,7 @@ awi_fix_rxhdr(sc, m0)
off = 0;
while (m0->m_pkthdr.len > off) {
if (n0 == NULL) {
- MGETHDR(n, M_DONTWAIT, MT_DATA);
+ MGETHDR(n, M_NOWAIT, MT_DATA);
if (n == NULL) {
m_freem(m0);
return NULL;
@@ -1329,7 +1329,7 @@ awi_fix_rxhdr(sc, m0)
M_MOVE_PKTHDR(n, m0);
n->m_len = MHLEN;
} else {
- MGET(n, M_DONTWAIT, MT_DATA);
+ MGET(n, M_NOWAIT, MT_DATA);
if (n == NULL) {
m_freem(m0);
m_freem(n0);
@@ -1338,7 +1338,7 @@ awi_fix_rxhdr(sc, m0)
n->m_len = MLEN;
}
if (m0->m_pkthdr.len - off >= MINCLSIZE) {
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if (n->m_flags & M_EXT)
n->m_len = n->m_ext.ext_size;
}
@@ -1549,14 +1549,14 @@ awi_devget(sc, off, len)
while (len > 0) {
if (top == NULL) {
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return NULL;
m->m_pkthdr.rcvif = sc->sc_ifp;
m->m_pkthdr.len = len;
m->m_len = MHLEN;
} else {
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
m_freem(top);
return NULL;
@@ -1564,7 +1564,7 @@ awi_devget(sc, off, len)
m->m_len = MLEN;
}
if (len >= MINCLSIZE) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if (m->m_flags & M_EXT)
m->m_len = m->m_ext.ext_size;
}
@@ -2232,7 +2232,7 @@ awi_send_deauth(sc)
struct ieee80211_frame *wh;
u_int8_t *deauth;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return;
if (ifp->if_flags & IFF_DEBUG)
@@ -2269,7 +2269,7 @@ awi_send_auth(sc, seq)
struct ieee80211_frame *wh;
u_int8_t *auth;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return;
sc->sc_status = AWI_ST_AUTH;
@@ -2370,7 +2370,7 @@ awi_send_asreq(sc, reassoc)
u_int16_t capinfo, lintval;
u_int8_t *asreq;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return;
sc->sc_status = AWI_ST_ASSOC;
diff --git a/sys/dev/awi/awi_wep.c b/sys/dev/awi/awi_wep.c
index ecaf548..1eec023 100644
--- a/sys/dev/awi/awi_wep.c
+++ b/sys/dev/awi/awi_wep.c
@@ -319,7 +319,7 @@ awi_wep_encrypt(sc, m0, txflag)
ctx = sc->sc_wep_ctx;
m = m0;
left = m->m_pkthdr.len;
- MGET(n, M_DONTWAIT, m->m_type);
+ MGET(n, M_NOWAIT, m->m_type);
n0 = n;
if (n == NULL)
goto fail;
@@ -333,7 +333,7 @@ awi_wep_encrypt(sc, m0, txflag)
}
n->m_len = MHLEN;
if (n->m_pkthdr.len >= MINCLSIZE) {
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if (n->m_flags & M_EXT)
n->m_len = n->m_ext.ext_size;
}
@@ -382,13 +382,13 @@ awi_wep_encrypt(sc, m0, txflag)
if (len > n->m_len - noff) {
len = n->m_len - noff;
if (len == 0) {
- MGET(n->m_next, M_DONTWAIT, n->m_type);
+ MGET(n->m_next, M_NOWAIT, n->m_type);
if (n->m_next == NULL)
goto fail;
n = n->m_next;
n->m_len = MLEN;
if (left >= MINCLSIZE) {
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if (n->m_flags & M_EXT)
n->m_len = n->m_ext.ext_size;
}
@@ -418,7 +418,7 @@ awi_wep_encrypt(sc, m0, txflag)
n->m_len = noff + sizeof(crcbuf);
else {
n->m_len = noff;
- MGET(n->m_next, M_DONTWAIT, n->m_type);
+ MGET(n->m_next, M_NOWAIT, n->m_type);
if (n->m_next == NULL)
goto fail;
n = n->m_next;
diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c
index 99523c3..da701fc 100644
--- a/sys/dev/bge/if_bge.c
+++ b/sys/dev/bge/if_bge.c
@@ -719,12 +719,12 @@ bge_newbuf_std(sc, i, m)
struct bge_rx_bd *r;
if (m == NULL) {
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL) {
return(ENOBUFS);
}
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (!(m_new->m_flags & M_EXT)) {
m_freem(m_new);
return(ENOBUFS);
@@ -765,7 +765,7 @@ bge_newbuf_jumbo(sc, i, m)
caddr_t *buf = NULL;
/* Allocate the mbuf. */
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL) {
return(ENOBUFS);
}
diff --git a/sys/dev/cardbus/cardbus.c b/sys/dev/cardbus/cardbus.c
index ff162dd..b87e7a8 100644
--- a/sys/dev/cardbus/cardbus.c
+++ b/sys/dev/cardbus/cardbus.c
@@ -424,7 +424,7 @@ cardbus_read_device(device_t brdev, int b, int s, int f)
if (REG(PCIR_DEVVENDOR, 4) != 0xffffffff) {
devlist_entry = malloc(sizeof(struct cardbus_devinfo),
- M_DEVBUF, M_WAITOK | M_ZERO);
+ M_DEVBUF, M_ZERO);
if (devlist_entry == NULL)
return (NULL);
diff --git a/sys/dev/cardbus/cardbus_cis.c b/sys/dev/cardbus/cardbus_cis.c
index 7c7712a..9bee096 100644
--- a/sys/dev/cardbus/cardbus_cis.c
+++ b/sys/dev/cardbus/cardbus_cis.c
@@ -168,7 +168,7 @@ DECODE_PROTOTYPE(copy)
struct cis_tupleinfo *tmpbuf;
tmpbuf = malloc(sizeof(struct cis_tupleinfo) * (ncisread_buf+1),
- M_DEVBUF, M_WAITOK);
+ M_DEVBUF, 0);
if (ncisread_buf > 0) {
memcpy(tmpbuf, cisread_buf,
sizeof(struct cis_tupleinfo) * ncisread_buf);
@@ -178,7 +178,7 @@ DECODE_PROTOTYPE(copy)
cisread_buf[ncisread_buf].id = id;
cisread_buf[ncisread_buf].len = len;
- cisread_buf[ncisread_buf].data = malloc(len, M_DEVBUF, M_WAITOK);
+ cisread_buf[ncisread_buf].data = malloc(len, M_DEVBUF, 0);
memcpy(cisread_buf[ncisread_buf].data, tupledata, len);
ncisread_buf++;
return (0);
@@ -705,7 +705,7 @@ cardbus_alloc_resources(device_t cbdev, device_t child)
if (count == 0)
return (0);
barlist = malloc(sizeof(struct resource_list_entry*) * count, M_DEVBUF,
- M_WAITOK);
+ 0);
count = 0;
SLIST_FOREACH(rle, &dinfo->pci.resources, link) {
barlist[count] = rle;
diff --git a/sys/dev/ccd/ccd.c b/sys/dev/ccd/ccd.c
index 103a54b..7569420 100644
--- a/sys/dev/ccd/ccd.c
+++ b/sys/dev/ccd/ccd.c
@@ -206,7 +206,7 @@ ccdnew(int unit)
if (IS_ALLOCATED(unit) || unit > 32)
return (NULL);
- MALLOC(sc, struct ccd_s *, sizeof(*sc), M_CCD, M_WAITOK | M_ZERO);
+ MALLOC(sc, struct ccd_s *, sizeof(*sc), M_CCD, M_ZERO);
sc->sc_unit = unit;
LIST_INSERT_HEAD(&ccd_softc_list, sc, list);
/* XXX: UNLOCK(unique unit numbers) */
@@ -283,7 +283,7 @@ ccdinit(struct ccd_s *cs, char **cpaths, struct thread *td)
/* Allocate space for the component info. */
cs->sc_cinfo = malloc(cs->sc_nccdisks * sizeof(struct ccdcinfo),
- M_CCD, M_WAITOK);
+ M_CCD, 0);
/*
* Verify that each component piece exists and record
@@ -291,7 +291,7 @@ ccdinit(struct ccd_s *cs, char **cpaths, struct thread *td)
*/
maxsecsize = 0;
minsize = 0;
- tmppath = malloc(MAXPATHLEN, M_CCD, M_WAITOK);
+ tmppath = malloc(MAXPATHLEN, M_CCD, 0);
for (ix = 0; ix < cs->sc_nccdisks; ix++) {
vp = cs->sc_vpp[ix];
ci = &cs->sc_cinfo[ix];
@@ -304,7 +304,7 @@ ccdinit(struct ccd_s *cs, char **cpaths, struct thread *td)
MAXPATHLEN, &ci->ci_pathlen)) != 0) {
goto fail;
}
- ci->ci_path = malloc(ci->ci_pathlen, M_CCD, M_WAITOK);
+ ci->ci_path = malloc(ci->ci_pathlen, M_CCD, 0);
bcopy(tmppath, ci->ci_path, ci->ci_pathlen);
ci->ci_dev = vn_todev(vp);
@@ -459,7 +459,7 @@ ccdinterleave(struct ccd_s *cs, int unit)
*/
size = (cs->sc_nccdisks + 1) * sizeof(struct ccdiinfo);
cs->sc_itable = (struct ccdiinfo *)malloc(size, M_CCD,
- M_WAITOK | M_ZERO);
+ M_ZERO);
/*
* Trivial case: no interleave (actually interleave of disk size).
@@ -473,7 +473,7 @@ ccdinterleave(struct ccd_s *cs, int unit)
for (ix = 0; ix < cs->sc_nccdisks; ix++) {
/* Allocate space for ii_index. */
- ii->ii_index = malloc(sizeof(int), M_CCD, M_WAITOK);
+ ii->ii_index = malloc(sizeof(int), M_CCD, 0);
ii->ii_ndisk = 1;
ii->ii_startblk = bn;
ii->ii_startoff = 0;
@@ -496,7 +496,7 @@ ccdinterleave(struct ccd_s *cs, int unit)
* we use.
*/
ii->ii_index = malloc((sizeof(int) * cs->sc_nccdisks),
- M_CCD, M_WAITOK);
+ M_CCD, 0);
/*
* Locate the smallest of the remaining components
@@ -1107,9 +1107,9 @@ ccdioctltoo(int unit, u_long cmd, caddr_t data, int flag, struct thread *td)
* componet pathnames and device numbers.
*/
cpp = malloc(ccio->ccio_ndisks * sizeof(char *),
- M_CCD, M_WAITOK);
+ M_CCD, 0);
vpp = malloc(ccio->ccio_ndisks * sizeof(struct vnode *),
- M_CCD, M_WAITOK);
+ M_CCD, 0);
error = copyin((caddr_t)ccio->ccio_disks, (caddr_t)cpp,
ccio->ccio_ndisks * sizeof(char **));
@@ -1164,7 +1164,7 @@ ccdioctltoo(int unit, u_long cmd, caddr_t data, int flag, struct thread *td)
*/
ccio->ccio_unit = unit;
ccio->ccio_size = cs->sc_size;
- cs->sc_disk = malloc(sizeof(struct disk), M_CCD, M_WAITOK);
+ cs->sc_disk = malloc(sizeof(struct disk), M_CCD, 0);
cs->sc_dev = disk_create(unit, cs->sc_disk, 0,
&ccd_cdevsw, &ccddisk_cdevsw);
cs->sc_dev->si_drv1 = cs;
diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c
index 6479929..dbf025b 100644
--- a/sys/dev/ciss/ciss.c
+++ b/sys/dev/ciss/ciss.c
@@ -1859,7 +1859,7 @@ ciss_user_command(struct ciss_softc *sc, IOCTL_Command_struct *ioc)
*/
cr->cr_length = ioc->buf_size;
if (ioc->buf_size > 0) {
- if ((cr->cr_data = malloc(ioc->buf_size, CISS_MALLOC_CLASS, M_WAITOK)) == NULL) {
+ if ((cr->cr_data = malloc(ioc->buf_size, CISS_MALLOC_CLASS, 0)) == NULL) {
error = ENOMEM;
goto out;
}
@@ -2038,7 +2038,7 @@ ciss_cam_rescan_target(struct ciss_softc *sc, int target)
debug_called(1);
- if ((ccb = malloc(sizeof(union ccb), M_TEMP, M_WAITOK | M_ZERO)) == NULL) {
+ if ((ccb = malloc(sizeof(union ccb), M_TEMP, M_ZERO)) == NULL) {
ciss_printf(sc, "rescan failed (can't allocate CCB)\n");
return;
}
diff --git a/sys/dev/cm/smc90cx6.c b/sys/dev/cm/smc90cx6.c
index 73f0523..56f10b2 100644
--- a/sys/dev/cm/smc90cx6.c
+++ b/sys/dev/cm/smc90cx6.c
@@ -644,7 +644,7 @@ cm_srint(vsc)
splx(s);
/* Allocate header mbuf */
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == 0) {
/*
@@ -681,7 +681,7 @@ cm_srint(vsc)
*/
if ((len + 2 + 2) > MHLEN) {
/* attach an mbuf cluster */
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
/* Insist on getting a cluster */
if ((m->m_flags & M_EXT) == 0) {
diff --git a/sys/dev/cnw/if_cnw.c b/sys/dev/cnw/if_cnw.c
index 84bdced..7043fff 100644
--- a/sys/dev/cnw/if_cnw.c
+++ b/sys/dev/cnw/if_cnw.c
@@ -941,7 +941,7 @@ cnw_read(sc)
bufbytes = 0;
bufptr = 0; /* XXX make gcc happy */
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == 0)
return (0);
#if !defined(__FreeBSD__)
@@ -956,7 +956,7 @@ cnw_read(sc)
while (totbytes > 0) {
if (top) {
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (m == 0) {
m_freem(top);
return (0);
@@ -964,7 +964,7 @@ cnw_read(sc)
mbytes = MLEN;
}
if (totbytes >= MINCLSIZE) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
m_free(m);
m_freem(top);
diff --git a/sys/dev/cs/if_cs.c b/sys/dev/cs/if_cs.c
index bffccf9..94643f0 100644
--- a/sys/dev/cs/if_cs.c
+++ b/sys/dev/cs/if_cs.c
@@ -780,12 +780,12 @@ cs_get_packet(struct cs_softc *sc)
return -1;
}
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m==NULL)
return -1;
if (length > MHLEN) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if (!(m->m_flags & M_EXT)) {
m_freem(m);
return -1;
diff --git a/sys/dev/dc/if_dc.c b/sys/dev/dc/if_dc.c
index a9e599e..2aa4e33 100644
--- a/sys/dev/dc/if_dc.c
+++ b/sys/dev/dc/if_dc.c
@@ -2423,11 +2423,11 @@ dc_newbuf(sc, i, m)
c = &sc->dc_ldata->dc_rx_list[i];
if (m == NULL) {
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL)
return(ENOBUFS);
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (!(m_new->m_flags & M_EXT)) {
m_freem(m_new);
return(ENOBUFS);
@@ -3186,11 +3186,11 @@ dc_coal(sc, m_head)
struct mbuf *m_new, *m;
m = *m_head;
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL)
return(ENOBUFS);
if (m->m_pkthdr.len > MHLEN) {
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (!(m_new->m_flags & M_EXT)) {
m_freem(m_new);
return(ENOBUFS);
diff --git a/sys/dev/de/if_de.c b/sys/dev/de/if_de.c
index d186586..9e1e319 100644
--- a/sys/dev/de/if_de.c
+++ b/sys/dev/de/if_de.c
@@ -195,7 +195,7 @@ tulip_txprobe(
* either is connected so the transmit is the only way
* to verify the connectivity.
*/
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return 0;
/*
@@ -3545,12 +3545,12 @@ tulip_rx_intr(
*/
if (accept || ms == NULL) {
struct mbuf *m0;
- MGETHDR(m0, M_DONTWAIT, MT_DATA);
+ MGETHDR(m0, M_NOWAIT, MT_DATA);
if (m0 != NULL) {
#if defined(TULIP_COPY_RXDATA)
if (!accept || total_len >= (MHLEN - 2)) {
#endif
- MCLGET(m0, M_DONTWAIT);
+ MCLGET(m0, M_NOWAIT);
if ((m0->m_flags & M_EXT) == 0) {
m_freem(m0);
m0 = NULL;
@@ -4061,10 +4061,10 @@ tulip_mbuf_compress(
{
struct mbuf *m0;
#if MCLBYTES >= ETHERMTU + 18 && !defined(BIG_PACKET)
- MGETHDR(m0, M_DONTWAIT, MT_DATA);
+ MGETHDR(m0, M_NOWAIT, MT_DATA);
if (m0 != NULL) {
if (m->m_pkthdr.len > MHLEN) {
- MCLGET(m0, M_DONTWAIT);
+ MCLGET(m0, M_NOWAIT);
if ((m0->m_flags & M_EXT) == 0) {
m_freem(m);
m_freem(m0);
@@ -4081,9 +4081,9 @@ tulip_mbuf_compress(
while (len > 0) {
if (mlen == MHLEN) {
- MGETHDR(*mp, M_DONTWAIT, MT_DATA);
+ MGETHDR(*mp, M_NOWAIT, MT_DATA);
} else {
- MGET(*mp, M_DONTWAIT, MT_DATA);
+ MGET(*mp, M_NOWAIT, MT_DATA);
}
if (*mp == NULL) {
m_freem(m0);
@@ -4091,7 +4091,7 @@ tulip_mbuf_compress(
break;
}
if (len > MLEN) {
- MCLGET(*mp, M_DONTWAIT);
+ MCLGET(*mp, M_NOWAIT);
if (((*mp)->m_flags & M_EXT) == 0) {
m_freem(m0);
m0 = NULL;
diff --git a/sys/dev/digi/digi.c b/sys/dev/digi/digi.c
index 57f6022..cde3b98 100644
--- a/sys/dev/digi/digi.c
+++ b/sys/dev/digi/digi.c
@@ -546,12 +546,12 @@ digi_init(struct digi_softc *sc)
if (sc->ports)
free(sc->ports, M_TTYS);
sc->ports = malloc(sizeof(struct digi_p) * sc->numports,
- M_TTYS, M_WAITOK | M_ZERO);
+ M_TTYS, M_ZERO);
if (sc->ttys)
free(sc->ttys, M_TTYS);
sc->ttys = malloc(sizeof(struct tty) * sc->numports,
- M_TTYS, M_WAITOK | M_ZERO);
+ M_TTYS, M_ZERO);
/*
* XXX Should read port 0xc90 for an array of 2byte values, 1 per
@@ -1035,7 +1035,7 @@ digi_loadmoduledata(struct digi_softc *sc)
KASSERT(sc->module != NULL, ("Uninitialised module name"));
modlen = strlen(sc->module);
- modfile = malloc(modlen + 6, M_TEMP, M_WAITOK);
+ modfile = malloc(modlen + 6, M_TEMP, 0);
snprintf(modfile, modlen + 6, "digi_%s", sc->module);
if ((res = linker_reference_module(modfile, NULL, &lf)) != 0) {
if (res == ENOENT && rootdev == NODEV)
@@ -1049,7 +1049,7 @@ digi_loadmoduledata(struct digi_softc *sc)
if (res != 0)
return (res);
- sym = malloc(modlen + 10, M_TEMP, M_WAITOK);
+ sym = malloc(modlen + 10, M_TEMP, 0);
snprintf(sym, modlen + 10, "digi_mod_%s", sc->module);
if ((symptr = linker_file_lookup_symbol(lf, sym, 0)) == NULL)
printf("digi_%s.ko: Symbol `%s' not found\n", sc->module, sym);
@@ -1065,19 +1065,19 @@ digi_loadmoduledata(struct digi_softc *sc)
sc->bios.size = digi_mod->dm_bios.size;
if (sc->bios.size != 0 && digi_mod->dm_bios.data != NULL) {
- sc->bios.data = malloc(sc->bios.size, M_TTYS, M_WAITOK);
+ sc->bios.data = malloc(sc->bios.size, M_TTYS, 0);
bcopy(digi_mod->dm_bios.data, sc->bios.data, sc->bios.size);
}
sc->fep.size = digi_mod->dm_fep.size;
if (sc->fep.size != 0 && digi_mod->dm_fep.data != NULL) {
- sc->fep.data = malloc(sc->fep.size, M_TTYS, M_WAITOK);
+ sc->fep.data = malloc(sc->fep.size, M_TTYS, 0);
bcopy(digi_mod->dm_fep.data, sc->fep.data, sc->fep.size);
}
sc->link.size = digi_mod->dm_link.size;
if (sc->link.size != 0 && digi_mod->dm_link.data != NULL) {
- sc->link.data = malloc(sc->link.size, M_TTYS, M_WAITOK);
+ sc->link.data = malloc(sc->link.size, M_TTYS, 0);
bcopy(digi_mod->dm_link.data, sc->link.data, sc->link.size);
}
diff --git a/sys/dev/dpt/dpt_scsi.c b/sys/dev/dpt/dpt_scsi.c
index f035a8c..9186c96 100644
--- a/sys/dev/dpt/dpt_scsi.c
+++ b/sys/dev/dpt/dpt_scsi.c
@@ -2321,12 +2321,12 @@ dpt_user_cmd(dpt_softc_t * dpt, eata_pt_t * user_cmd,
/* Data I/O is involved in this command. Alocate buffer */
if (ccb->eata_ccb.cp_datalen > PAGE_SIZE) {
data = contigmalloc(ccb->eata_ccb.cp_datalen,
- M_TEMP, M_WAITOK, 0, ~0,
+ M_TEMP, 0, 0, ~0,
ccb->eata_ccb.cp_datalen,
0x10000);
} else {
data = malloc(ccb->eata_ccb.cp_datalen, M_TEMP,
- M_WAITOK);
+ 0);
}
if (data == NULL) {
diff --git a/sys/dev/drm/drm_drv.h b/sys/dev/drm/drm_drv.h
index 729b2f9..1425859 100644
--- a/sys/dev/drm/drm_drv.h
+++ b/sys/dev/drm/drm_drv.h
@@ -1451,7 +1451,7 @@ DRM(linux_ioctl)(DRM_OS_STRUCTPROC *p, struct linux_ioctl_args* args)
if ( size > STK_PARAMS ) {
if ( size > IOCPARM_MAX )
return EINVAL;
- memp = malloc( (u_long)size, DRM(M_DRM), M_WAITOK );
+ memp = malloc( (u_long)size, DRM(M_DRM), 0 );
data = memp;
} else {
data = ubuf.stkbuf;
diff --git a/sys/dev/drm/drm_memory.h b/sys/dev/drm/drm_memory.h
index 81fa561..c6f319c 100644
--- a/sys/dev/drm/drm_memory.h
+++ b/sys/dev/drm/drm_memory.h
@@ -288,7 +288,7 @@ unsigned long DRM(alloc_pages)(int order, int area)
address = __get_free_pages(GFP_KERNEL, order);
#endif /* __linux__ */
#ifdef __FreeBSD__
- address = (vm_offset_t) contigmalloc(bytes, DRM(M_DRM), M_WAITOK, 0, ~0, 1, 0);
+ address = (vm_offset_t) contigmalloc(bytes, DRM(M_DRM), 0, 0, ~0, 1, 0);
#endif /* __FreeBSD__ */
if (!address) {
DRM_OS_SPINLOCK(&DRM(mem_lock));
diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c
index 8d1c849..e5040a5 100644
--- a/sys/dev/ed/if_ed.c
+++ b/sys/dev/ed/if_ed.c
@@ -2679,7 +2679,7 @@ ed_get_packet(sc, buf, len)
struct mbuf *m;
/* Allocate a header mbuf */
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return;
m->m_pkthdr.rcvif = ifp;
@@ -2693,7 +2693,7 @@ ed_get_packet(sc, buf, len)
*/
if ((len + 2) > MHLEN) {
/* Attach an mbuf cluster */
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
/* Insist on getting a cluster */
if ((m->m_flags & M_EXT) == 0) {
diff --git a/sys/dev/em/if_em.c b/sys/dev/em/if_em.c
index 1503ea2..9f8b609 100644
--- a/sys/dev/em/if_em.c
+++ b/sys/dev/em/if_em.c
@@ -1802,12 +1802,12 @@ em_get_buf(int i, struct adapter *adapter,
ifp = &adapter->interface_data.ac_if;
if (mp == NULL) {
- MGETHDR(mp, M_DONTWAIT, MT_DATA);
+ MGETHDR(mp, M_NOWAIT, MT_DATA);
if (mp == NULL) {
adapter->mbuf_alloc_failed++;
return(ENOBUFS);
}
- MCLGET(mp, M_DONTWAIT);
+ MCLGET(mp, M_NOWAIT);
if ((mp->m_flags & M_EXT) == 0) {
m_freem(mp);
adapter->mbuf_cluster_failed++;
diff --git a/sys/dev/en/midway.c b/sys/dev/en/midway.c
index ffcc6c9..3e5d3f3 100644
--- a/sys/dev/en/midway.c
+++ b/sys/dev/en/midway.c
@@ -601,7 +601,7 @@ u_int totlen, *drqneed;
struct mbuf *top, **mp;
*drqneed = 0;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return(NULL);
m->m_pkthdr.rcvif = &sc->enif;
@@ -613,7 +613,7 @@ u_int totlen, *drqneed;
/* if (top != NULL) then we've already got 1 mbuf on the chain */
while (totlen > 0) {
if (top) {
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (!m) {
m_freem(top);
return(NULL); /* out of mbufs */
@@ -621,7 +621,7 @@ u_int totlen, *drqneed;
m->m_len = MLEN;
}
if (totlen >= MINCLSIZE) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
m_free(m);
m_freem(top);
@@ -1770,12 +1770,12 @@ struct mbuf **mm, *prev;
m->m_data = (caddr_t)d;
} else {
/* can't write to an M_EXT mbuf since it may be shared */
- MGET(new, M_DONTWAIT, MT_DATA);
+ MGET(new, M_NOWAIT, MT_DATA);
if (!new) {
EN_COUNT(sc->mfixfail);
return(0);
}
- MCLGET(new, M_DONTWAIT);
+ MCLGET(new, M_NOWAIT);
if ((new->m_flags & M_EXT) == 0) {
m_free(new);
EN_COUNT(sc->mfixfail);
@@ -1837,14 +1837,14 @@ STATIC int en_makeexclusive(sc, mm, prev)
if (MEXT_IS_REF(m)) {
/* make a real copy of the M_EXT mbuf since it is shared */
- MGET(new, M_DONTWAIT, MT_DATA);
+ MGET(new, M_NOWAIT, MT_DATA);
if (!new) {
EN_COUNT(sc->mfixfail);
return(0);
}
if (m->m_flags & M_PKTHDR)
M_MOVE_PKTHDR(new, m);
- MCLGET(new, M_DONTWAIT);
+ MCLGET(new, M_NOWAIT);
if ((new->m_flags & M_EXT) == 0) {
m_free(new);
EN_COUNT(sc->mfixfail);
diff --git a/sys/dev/ep/if_ep.c b/sys/dev/ep/if_ep.c
index 749fa58..5e0dc5d 100644
--- a/sys/dev/ep/if_ep.c
+++ b/sys/dev/ep/if_ep.c
@@ -686,11 +686,11 @@ read_again:
rx_fifo = rx_fifo2 = status & RX_BYTES_MASK;
if (EP_FTST(sc, F_RX_FIRST)) {
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (!m)
goto out;
if (rx_fifo >= MINCLSIZE)
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
sc->top = sc->mcur = top = m;
#define EROUND ((sizeof(struct ether_header) + 3) & ~3)
#define EOFF (EROUND - sizeof(struct ether_header))
@@ -714,11 +714,11 @@ read_again:
lenthisone = min(rx_fifo, M_TRAILINGSPACE(m));
if (lenthisone == 0) { /* no room in this one */
mcur = m;
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (!m)
goto out;
if (rx_fifo >= MINCLSIZE)
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
m->m_len = 0;
mcur->m_next = m;
lenthisone = min(rx_fifo, M_TRAILINGSPACE(m));
diff --git a/sys/dev/ex/if_ex.c b/sys/dev/ex/if_ex.c
index f7458af..d948af2 100644
--- a/sys/dev/ex/if_ex.c
+++ b/sys/dev/ex/if_ex.c
@@ -695,7 +695,7 @@ ex_rx_intr(struct ex_softc *sc)
QQQ = pkt_len = inw(iobase + IO_PORT_REG);
if (rx_status & RCV_OK_bit) {
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
ipkt = m;
if (ipkt == NULL) {
ifp->if_iqdrops++;
@@ -706,7 +706,7 @@ ex_rx_intr(struct ex_softc *sc)
while (pkt_len > 0) {
if (pkt_len > MINCLSIZE) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if (m->m_flags & M_EXT) {
m->m_len = MCLBYTES;
} else {
@@ -731,7 +731,7 @@ ex_rx_intr(struct ex_softc *sc)
pkt_len -= m->m_len;
if (pkt_len > 0) {
- MGET(m->m_next, M_DONTWAIT, MT_DATA);
+ MGET(m->m_next, M_NOWAIT, MT_DATA);
if (m->m_next == NULL) {
m_freem(ipkt);
ifp->if_iqdrops++;
diff --git a/sys/dev/fb/fb.c b/sys/dev/fb/fb.c
index 0dbb73b..edfc64e 100644
--- a/sys/dev/fb/fb.c
+++ b/sys/dev/fb/fb.c
@@ -86,12 +86,12 @@ vid_realloc_array(void)
s = spltty();
newsize = ((adapters + ARRAY_DELTA)/ARRAY_DELTA)*ARRAY_DELTA;
- new_adp = malloc(sizeof(*new_adp)*newsize, M_DEVBUF, M_WAITOK | M_ZERO);
+ new_adp = malloc(sizeof(*new_adp)*newsize, M_DEVBUF, M_ZERO);
new_vidsw = malloc(sizeof(*new_vidsw)*newsize, M_DEVBUF,
- M_WAITOK | M_ZERO);
+ M_ZERO);
#ifdef FB_INSTALL_CDEV
new_cdevsw = malloc(sizeof(*new_cdevsw)*newsize, M_DEVBUF,
- M_WAITOK | M_ZERO);
+ M_ZERO);
#endif
bcopy(adapter, new_adp, sizeof(*adapter)*adapters);
bcopy(vidsw, new_vidsw, sizeof(*vidsw)*adapters);
diff --git a/sys/dev/fb/vga.c b/sys/dev/fb/vga.c
index 56e015b..0f3cda1 100644
--- a/sys/dev/fb/vga.c
+++ b/sys/dev/fb/vga.c
@@ -2848,7 +2848,7 @@ get_palette(video_adapter_t *adp, int base, int count,
if ((base < 0) || (base >= 256) || (base + count > 256))
return EINVAL;
- r = malloc(count*3, M_DEVBUF, M_WAITOK);
+ r = malloc(count*3, M_DEVBUF, 0);
g = r + count;
b = g + count;
if (vga_save_palette2(adp, base, count, r, g, b)) {
@@ -2879,7 +2879,7 @@ set_palette(video_adapter_t *adp, int base, int count,
if ((base < 0) || (base >= 256) || (base + count > 256))
return EINVAL;
- r = malloc(count*3, M_DEVBUF, M_WAITOK);
+ r = malloc(count*3, M_DEVBUF, 0);
g = r + count;
b = g + count;
copyin(red, r, count);
diff --git a/sys/dev/fe/if_fe.c b/sys/dev/fe/if_fe.c
index b6ad14c..81e4865 100644
--- a/sys/dev/fe/if_fe.c
+++ b/sys/dev/fe/if_fe.c
@@ -1847,13 +1847,13 @@ fe_get_packet (struct fe_softc * sc, u_short len)
*/
/* Allocate an mbuf with packet header info. */
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return -1;
/* Attach a cluster if this packet doesn't fit in a normal mbuf. */
if (len > MHLEN - NFS_MAGIC_OFFSET) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if (!(m->m_flags & M_EXT)) {
m_freem(m);
return -1;
diff --git a/sys/dev/firewire/if_fwe.c b/sys/dev/firewire/if_fwe.c
index 49722fe..5c77705 100644
--- a/sys/dev/firewire/if_fwe.c
+++ b/sys/dev/firewire/if_fwe.c
@@ -466,7 +466,7 @@ fwe_as_output(struct fwe_softc *fwe, struct ifnet *ifp)
xfer->act.hand = fwe_output_callback;
/* keep ip packet alignment for alpha */
- M_PREPEND(m, ALIGN_PAD, M_DONTWAIT);
+ M_PREPEND(m, ALIGN_PAD, M_NOWAIT);
fp = (struct fw_pkt *)&xfer->dst; /* XXX */
xfer->dst = *((int32_t *)&fwe->pkt_hdr);
fp->mode.stream.len = htons(m->m_pkthdr.len);
@@ -544,7 +544,7 @@ fwe_as_input(struct fw_xferq *xferq)
while ((xfer = STAILQ_FIRST(&xferq->q)) != NULL) {
STAILQ_REMOVE_HEAD(&xferq->q, link);
xferq->queued --;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
printf("MGETHDR failed\n");
fw_xfer_free(xfer);
diff --git a/sys/dev/firewire/sbp.c b/sys/dev/firewire/sbp.c
index a8ed494..43da1cd 100644
--- a/sys/dev/firewire/sbp.c
+++ b/sys/dev/firewire/sbp.c
@@ -763,7 +763,7 @@ END_DEBUG
static void
sbp_cam_scan_lun(struct sbp_dev *sdev)
{
- union ccb *ccb = malloc(sizeof(union ccb), M_SBP, M_WAITOK | M_ZERO);
+ union ccb *ccb = malloc(sizeof(union ccb), M_SBP, M_ZERO);
SBP_DEBUG(0)
sbp_show_sdev_info(sdev, 2);
@@ -822,9 +822,9 @@ sbp_ping_unit(struct sbp_dev *sdev)
union ccb *ccb;
struct scsi_inquiry_data *inq_buf;
- ccb = malloc(sizeof(union ccb), M_SBP, M_WAITOK | M_ZERO);
+ ccb = malloc(sizeof(union ccb), M_SBP, M_ZERO);
inq_buf = (struct scsi_inquiry_data *)
- malloc(sizeof(*inq_buf), M_SBP, M_WAITOK);
+ malloc(sizeof(*inq_buf), M_SBP, 0);
SBP_DEBUG(1)
sbp_show_sdev_info(sdev, 2);
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c
index 5b7e249..34f1e98 100644
--- a/sys/dev/fxp/if_fxp.c
+++ b/sys/dev/fxp/if_fxp.c
@@ -1068,13 +1068,13 @@ tbdinit:
* mbuf chain first. Bail out if we can't get the
* new buffers.
*/
- MGETHDR(mn, M_DONTWAIT, MT_DATA);
+ MGETHDR(mn, M_NOWAIT, MT_DATA);
if (mn == NULL) {
m_freem(mb_head);
break;
}
if (mb_head->m_pkthdr.len > MHLEN) {
- MCLGET(mn, M_DONTWAIT);
+ MCLGET(mn, M_NOWAIT);
if ((mn->m_flags & M_EXT) == 0) {
m_freem(mn);
m_freem(mb_head);
@@ -1872,7 +1872,7 @@ fxp_add_rfabuf(struct fxp_softc *sc, struct mbuf *oldm)
struct mbuf *m;
struct fxp_rfa *rfa, *p_rfa;
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL) { /* try to recycle the old mbuf instead */
if (oldm == NULL)
return 1;
diff --git a/sys/dev/gem/if_gem.c b/sys/dev/gem/if_gem.c
index 635bd27..b6fc4a7 100644
--- a/sys/dev/gem/if_gem.c
+++ b/sys/dev/gem/if_gem.c
@@ -1425,7 +1425,7 @@ gem_add_rxbuf(sc, idx)
struct mbuf *m;
int error;
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL)
return (ENOBUFS);
m->m_len = m->m_pkthdr.len = m->m_ext.ext_size;
diff --git a/sys/dev/gx/if_gx.c b/sys/dev/gx/if_gx.c
index 8d59cd6..8dec6b2 100644
--- a/sys/dev/gx/if_gx.c
+++ b/sys/dev/gx/if_gx.c
@@ -1068,13 +1068,13 @@ gx_newbuf(struct gx_softc *gx, int idx, struct mbuf *m)
struct gx_rx_desc *r;
if (m == NULL) {
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL) {
device_printf(gx->gx_dev,
"mbuf allocation failed -- packet dropped\n");
return (ENOBUFS);
}
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if ((m_new->m_flags & M_EXT) == 0) {
device_printf(gx->gx_dev,
"cluster allocation failed -- packet dropped\n");
diff --git a/sys/dev/hifn/hifn7751.c b/sys/dev/hifn/hifn7751.c
index 723f19f..81762a8 100644
--- a/sys/dev/hifn/hifn7751.c
+++ b/sys/dev/hifn/hifn7751.c
@@ -1669,14 +1669,14 @@ hifn_crypto(
totlen = cmd->src_mapsize;
if (cmd->src_m->m_flags & M_PKTHDR) {
len = MHLEN;
- MGETHDR(m0, M_DONTWAIT, MT_DATA);
- if (m0 && !m_dup_pkthdr(m0, cmd->src_m, M_DONTWAIT)) {
+ MGETHDR(m0, M_NOWAIT, MT_DATA);
+ if (m0 && !m_dup_pkthdr(m0, cmd->src_m, M_NOWAIT)) {
m_free(m0);
m0 = NULL;
}
} else {
len = MLEN;
- MGET(m0, M_DONTWAIT, MT_DATA);
+ MGET(m0, M_NOWAIT, MT_DATA);
}
if (m0 == NULL) {
hifnstats.hst_nomem_mbuf++;
@@ -1684,7 +1684,7 @@ hifn_crypto(
goto err_srcmap;
}
if (totlen >= MINCLSIZE) {
- MCLGET(m0, M_DONTWAIT);
+ MCLGET(m0, M_NOWAIT);
if ((m0->m_flags & M_EXT) == 0) {
hifnstats.hst_nomem_mcl++;
err = dma->cmdu ? ERESTART : ENOMEM;
@@ -1698,7 +1698,7 @@ hifn_crypto(
mlast = m0;
while (totlen > 0) {
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
hifnstats.hst_nomem_mbuf++;
err = dma->cmdu ? ERESTART : ENOMEM;
@@ -1707,7 +1707,7 @@ hifn_crypto(
}
len = MLEN;
if (totlen >= MINCLSIZE) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
hifnstats.hst_nomem_mcl++;
err = dma->cmdu ? ERESTART : ENOMEM;
diff --git a/sys/dev/hme/if_hme.c b/sys/dev/hme/if_hme.c
index 779141b6..9db0856 100644
--- a/sys/dev/hme/if_hme.c
+++ b/sys/dev/hme/if_hme.c
@@ -493,7 +493,7 @@ hme_add_rxbuf(struct hme_softc *sc, unsigned int ri, int keepold)
hme_discard_rxbuf(sc, ri, 0);
return (0);
}
- if ((m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR)) == NULL)
+ if ((m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR)) == NULL)
return (ENOBUFS);
m->m_len = m->m_pkthdr.len = m->m_ext.ext_size;
b = mtod(m, uintptr_t);
diff --git a/sys/dev/idt/idt.c b/sys/dev/idt/idt.c
index dd08b75..3971e08 100644
--- a/sys/dev/idt/idt.c
+++ b/sys/dev/idt/idt.c
@@ -1171,10 +1171,10 @@ nicstar_ld_rcv_buf(IDT * idt)
idt_sysctl_buflarge = 10;
while (card_small < idt_sysctl_bufsmall) { /* 05/25/2001 from fixed */
- MGETHDR(m1, M_DONTWAIT, MT_DATA);
+ MGETHDR(m1, M_NOWAIT, MT_DATA);
if (m1 == NULL)
break;
- MGETHDR(m2, M_DONTWAIT, MT_DATA);
+ MGETHDR(m2, M_NOWAIT, MT_DATA);
if (m2 == NULL) {
m_free(m1);
break;
@@ -2006,11 +2006,11 @@ idt_mbufcl_get(void)
{
struct mbuf *m;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return (NULL);
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if (m->m_flags & M_EXT)
return (m);
diff --git a/sys/dev/ie/if_ie.c b/sys/dev/ie/if_ie.c
index b3e844c6..088f122 100644
--- a/sys/dev/ie/if_ie.c
+++ b/sys/dev/ie/if_ie.c
@@ -1133,7 +1133,7 @@ ieget(int unit, struct ie_softc *ie, struct mbuf **mp)
if (totlen <= 0)
return (-1);
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (!m) {
ie_drop_packet_buffer(unit, ie);
/* XXXX if_ierrors++; */
@@ -1188,7 +1188,7 @@ ieget(int unit, struct ie_softc *ie, struct mbuf **mp)
* single mbuf which may or may not be big enough. Got that?
*/
if (top) {
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (!m) {
m_freem(top);
ie_drop_packet_buffer(unit, ie);
@@ -1197,7 +1197,7 @@ ieget(int unit, struct ie_softc *ie, struct mbuf **mp)
m->m_len = MLEN;
}
if (resid >= MINCLSIZE) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if (m->m_flags & M_EXT)
m->m_len = min(resid, MCLBYTES);
} else {
diff --git a/sys/dev/iicbus/if_ic.c b/sys/dev/iicbus/if_ic.c
index a6660b7..84d7b2f 100644
--- a/sys/dev/iicbus/if_ic.c
+++ b/sys/dev/iicbus/if_ic.c
@@ -192,14 +192,14 @@ icioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
return (error);
sc->ic_obuf = malloc(sc->ic_if.if_mtu + ICHDRLEN,
- M_DEVBUF, M_WAITOK);
+ M_DEVBUF, 0);
if (!sc->ic_obuf) {
iicbus_release_bus(parent, icdev);
return ENOBUFS;
}
sc->ic_ifbuf = malloc(sc->ic_if.if_mtu + ICHDRLEN,
- M_DEVBUF, M_WAITOK);
+ M_DEVBUF, 0);
if (!sc->ic_ifbuf) {
iicbus_release_bus(parent, icdev);
return ENOBUFS;
diff --git a/sys/dev/isp/isp_pci.c b/sys/dev/isp/isp_pci.c
index 9636a7f..449fa14 100644
--- a/sys/dev/isp/isp_pci.c
+++ b/sys/dev/isp/isp_pci.c
@@ -624,7 +624,7 @@ isp_pci_attach(device_t dev)
}
if (amt) {
FCPARAM(isp)->isp_dump_data =
- malloc(amt, M_DEVBUF, M_WAITOK | M_ZERO);
+ malloc(amt, M_DEVBUF, M_ZERO);
} else {
device_printf(dev,
"f/w crash dumps not supported for this model\n");
@@ -1105,14 +1105,14 @@ isp_pci_mbxdma(struct ispsoftc *isp)
len = sizeof (XS_T **) * isp->isp_maxcmds;
- isp->isp_xflist = (XS_T **) malloc(len, M_DEVBUF, M_WAITOK | M_ZERO);
+ isp->isp_xflist = (XS_T **) malloc(len, M_DEVBUF, M_ZERO);
if (isp->isp_xflist == NULL) {
isp_prt(isp, ISP_LOGERR, "cannot alloc xflist array");
ISP_LOCK(isp);
return (1);
}
len = sizeof (bus_dmamap_t) * isp->isp_maxcmds;
- pcs->dmaps = (bus_dmamap_t *) malloc(len, M_DEVBUF, M_WAITOK);
+ pcs->dmaps = (bus_dmamap_t *) malloc(len, M_DEVBUF, 0);
if (pcs->dmaps == NULL) {
isp_prt(isp, ISP_LOGERR, "can't alloc dma map storage");
free(isp->isp_xflist, M_DEVBUF);
diff --git a/sys/dev/isp/isp_sbus.c b/sys/dev/isp/isp_sbus.c
index d2af1a5..829ee8e 100644
--- a/sys/dev/isp/isp_sbus.c
+++ b/sys/dev/isp/isp_sbus.c
@@ -498,14 +498,14 @@ isp_sbus_mbxdma(struct ispsoftc *isp)
}
len = sizeof (XS_T **) * isp->isp_maxcmds;
- isp->isp_xflist = (XS_T **) malloc(len, M_DEVBUF, M_WAITOK | M_ZERO);
+ isp->isp_xflist = (XS_T **) malloc(len, M_DEVBUF, M_ZERO);
if (isp->isp_xflist == NULL) {
isp_prt(isp, ISP_LOGERR, "cannot alloc xflist array");
ISP_LOCK(isp);
return (1);
}
len = sizeof (bus_dmamap_t) * isp->isp_maxcmds;
- sbs->dmaps = (bus_dmamap_t *) malloc(len, M_DEVBUF, M_WAITOK);
+ sbs->dmaps = (bus_dmamap_t *) malloc(len, M_DEVBUF, 0);
if (sbs->dmaps == NULL) {
isp_prt(isp, ISP_LOGERR, "can't alloc dma map storage");
free(isp->isp_xflist, M_DEVBUF);
diff --git a/sys/dev/kbd/kbd.c b/sys/dev/kbd/kbd.c
index 6eef728..035813a 100644
--- a/sys/dev/kbd/kbd.c
+++ b/sys/dev/kbd/kbd.c
@@ -454,7 +454,7 @@ kbd_attach(keyboard_t *kbd)
"kbd%r", kbd->kb_index);
if (dev->si_drv1 == NULL)
dev->si_drv1 = malloc(sizeof(genkbd_softc_t), M_DEVBUF,
- M_WAITOK);
+ 0);
bzero(dev->si_drv1, sizeof(genkbd_softc_t));
printf("kbd%d at %s%d\n", kbd->kb_index, kbd->kb_name, kbd->kb_unit);
diff --git a/sys/dev/lge/if_lge.c b/sys/dev/lge/if_lge.c
index 9efa94da..81d1041 100644
--- a/sys/dev/lge/if_lge.c
+++ b/sys/dev/lge/if_lge.c
@@ -784,7 +784,7 @@ lge_newbuf(sc, c, m)
caddr_t *buf = NULL;
if (m == NULL) {
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL) {
printf("lge%d: no memory for rx list "
"-- packet dropped!\n", sc->lge_unit);
diff --git a/sys/dev/lmc/if_lmc.c b/sys/dev/lmc/if_lmc.c
index 83250cf..68fce90 100644
--- a/sys/dev/lmc/if_lmc.c
+++ b/sys/dev/lmc/if_lmc.c
@@ -621,9 +621,9 @@ lmc_rx_intr(lmc_softc_t * const sc)
*/
if (accept || ms == NULL) {
struct mbuf *m0;
- MGETHDR(m0, M_DONTWAIT, MT_DATA);
+ MGETHDR(m0, M_NOWAIT, MT_DATA);
if (m0 != NULL) {
- MCLGET(m0, M_DONTWAIT);
+ MCLGET(m0, M_NOWAIT);
if ((m0->m_flags & M_EXT) == 0) {
m_freem(m0);
m0 = NULL;
@@ -830,10 +830,10 @@ lmc_mbuf_compress(struct mbuf *m)
{
struct mbuf *m0;
#if MCLBYTES >= LMC_MTU + PPP_HEADER_LEN && !defined(BIG_PACKET)
- MGETHDR(m0, M_DONTWAIT, MT_DATA);
+ MGETHDR(m0, M_NOWAIT, MT_DATA);
if (m0 != NULL) {
if (m->m_pkthdr.len > MHLEN) {
- MCLGET(m0, M_DONTWAIT);
+ MCLGET(m0, M_NOWAIT);
if ((m0->m_flags & M_EXT) == 0) {
m_freem(m);
m_freem(m0);
@@ -850,9 +850,9 @@ lmc_mbuf_compress(struct mbuf *m)
while (len > 0) {
if (mlen == MHLEN) {
- MGETHDR(*mp, M_DONTWAIT, MT_DATA);
+ MGETHDR(*mp, M_NOWAIT, MT_DATA);
} else {
- MGET(*mp, M_DONTWAIT, MT_DATA);
+ MGET(*mp, M_NOWAIT, MT_DATA);
}
if (*mp == NULL) {
m_freem(m0);
@@ -860,7 +860,7 @@ lmc_mbuf_compress(struct mbuf *m)
break;
}
if (len > MLEN) {
- MCLGET(*mp, M_DONTWAIT);
+ MCLGET(*mp, M_NOWAIT);
if (((*mp)->m_flags & M_EXT) == 0) {
m_freem(m0);
m0 = NULL;
diff --git a/sys/dev/lnc/if_lnc.c b/sys/dev/lnc/if_lnc.c
index eeb678a..c1d63f1 100644
--- a/sys/dev/lnc/if_lnc.c
+++ b/sys/dev/lnc/if_lnc.c
@@ -314,10 +314,10 @@ alloc_mbuf_cluster(struct lnc_softc *sc, struct host_ring_entry *desc)
sc->mbufs = m->m_next;
/* XXX m->m_data = m->m_ext.ext_buf;*/
} else {
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (!m)
return(1);
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if (!m->m_ext.ext_buf) {
m_free(m);
return(1);
@@ -379,7 +379,7 @@ mbuf_packet(struct lnc_softc *sc, int start_of_packet, int pkt_len)
int amount;
/* Get a pkthdr mbuf for the start of packet */
- MGETHDR(head, M_DONTWAIT, MT_DATA);
+ MGETHDR(head, M_NOWAIT, MT_DATA);
if (!head) {
LNCSTATS(drop_packet)
return(0);
@@ -409,13 +409,13 @@ mbuf_packet(struct lnc_softc *sc, int start_of_packet, int pkt_len)
if (amount == 0) {
/* mbuf must be empty */
m_prev = m;
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (!m) {
m_freem(head);
return(0);
}
if (pkt_len >= MINCLSIZE)
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
m->m_len = 0;
m_prev->m_next = m;
amount = min(blen, M_TRAILINGSPACE(m));
@@ -1218,9 +1218,9 @@ chain_to_cluster(struct mbuf *m)
{
struct mbuf *new;
- MGET(new, M_DONTWAIT, MT_DATA);
+ MGET(new, M_NOWAIT, MT_DATA);
if (new) {
- MCLGET(new, M_DONTWAIT);
+ MCLGET(new, M_NOWAIT);
if (new->m_ext.ext_buf) {
new->m_len = mbuf_to_buffer(m, new->m_data);
m_freem(m);
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c
index b9f3c52..4befee3 100644
--- a/sys/dev/md/md.c
+++ b/sys/dev/md/md.c
@@ -759,7 +759,7 @@ mdnew(int unit)
unit = max + 1;
if (unit > 255)
return (NULL);
- sc = (struct md_s *)malloc(sizeof *sc, M_MD, M_WAITOK | M_ZERO);
+ sc = (struct md_s *)malloc(sizeof *sc, M_MD, M_ZERO);
sc->unit = unit;
bioq_init(&sc->bio_queue);
mtx_init(&sc->queue_mtx, "md bio queue", NULL, MTX_DEF);
@@ -918,7 +918,7 @@ mdsetcred(struct md_s *sc, struct ucred *cred)
struct uio auio;
struct iovec aiov;
- tmpbuf = malloc(sc->secsize, M_TEMP, M_WAITOK);
+ tmpbuf = malloc(sc->secsize, M_TEMP, 0);
bzero(&auio, sizeof(auio));
aiov.iov_base = tmpbuf;
diff --git a/sys/dev/mlx/mlx.c b/sys/dev/mlx/mlx.c
index aecd9dc..61e1c8b 100644
--- a/sys/dev/mlx/mlx.c
+++ b/sys/dev/mlx/mlx.c
@@ -1880,7 +1880,7 @@ mlx_user_command(struct mlx_softc *sc, struct mlx_usercommand *mu)
if (mu->mu_datasize > 0) {
if (mu->mu_datasize > MAXPHYS)
return (EINVAL);
- if (((kbuf = malloc(mu->mu_datasize, M_DEVBUF, M_WAITOK)) == NULL) ||
+ if (((kbuf = malloc(mu->mu_datasize, M_DEVBUF, 0)) == NULL) ||
(error = copyin(mu->mu_buf, kbuf, mu->mu_datasize)))
goto out;
debug(0, "got kernel buffer");
diff --git a/sys/dev/mly/mly.c b/sys/dev/mly/mly.c
index 65f1a5d..50b81ac 100644
--- a/sys/dev/mly/mly.c
+++ b/sys/dev/mly/mly.c
@@ -2008,7 +2008,7 @@ mly_cam_rescan_btl(struct mly_softc *sc, int bus, int target)
debug_called(1);
- if ((ccb = malloc(sizeof(union ccb), M_TEMP, M_WAITOK | M_ZERO)) == NULL) {
+ if ((ccb = malloc(sizeof(union ccb), M_TEMP, M_ZERO)) == NULL) {
mly_printf(sc, "rescan failed (can't allocate CCB)\n");
return;
}
diff --git a/sys/dev/mpt/mpt_pci.c b/sys/dev/mpt/mpt_pci.c
index 9a0a5ba..7f9a145 100644
--- a/sys/dev/mpt/mpt_pci.c
+++ b/sys/dev/mpt/mpt_pci.c
@@ -478,7 +478,7 @@ mpt_dma_mem_alloc(mpt_softc_t *mpt)
len = sizeof (request_t *) * MPT_REQ_MEM_SIZE(mpt);
#ifdef RELENG_4
- mpt->request_pool = (request_t *) malloc(len, M_DEVBUF, M_WAITOK);
+ mpt->request_pool = (request_t *) malloc(len, M_DEVBUF, 0);
if (mpt->request_pool == NULL) {
device_printf(dev, "cannot allocate request pool\n");
return (1);
@@ -486,7 +486,7 @@ mpt_dma_mem_alloc(mpt_softc_t *mpt)
bzero(mpt->request_pool, len);
#else
mpt->request_pool = (request_t *)
- malloc(len, M_DEVBUF, M_WAITOK | M_ZERO);
+ malloc(len, M_DEVBUF, M_ZERO);
if (mpt->request_pool == NULL) {
device_printf(dev, "cannot allocate request pool\n");
return (1);
diff --git a/sys/dev/musycc/musycc.c b/sys/dev/musycc/musycc.c
index 3fb7834..48504db 100644
--- a/sys/dev/musycc/musycc.c
+++ b/sys/dev/musycc/musycc.c
@@ -696,9 +696,9 @@ musycc_intr0_rx_eom(struct softc *sc, int ch)
m->m_len = m->m_pkthdr.len = status & 0x3fff;
error = (status >> 16) & 0xf;
if (error == 0) {
- MGETHDR(m2, M_DONTWAIT, MT_DATA);
+ MGETHDR(m2, M_NOWAIT, MT_DATA);
if (m2 != NULL) {
- MCLGET(m2, M_DONTWAIT);
+ MCLGET(m2, M_NOWAIT);
if((m2->m_flags & M_EXT) != 0) {
/* Substitute the mbuf+cluster. */
md->m = m2;
@@ -1069,7 +1069,7 @@ musycc_newhook(node_p node, hook_p hook, const char *name)
return (EINVAL);
if (sc->chan[chan] == NULL) {
- MALLOC(sch, struct schan *, sizeof(*sch), M_MUSYCC, M_WAITOK | M_ZERO);
+ MALLOC(sch, struct schan *, sizeof(*sch), M_MUSYCC, M_ZERO);
sch->sc = sc;
sch->state = DOWN;
sch->chan = chan;
@@ -1268,9 +1268,9 @@ musycc_connect(hook_p hook)
sch->nmd = nmd = 200 + nts * 4;
sch->rx_last_md = 0;
MALLOC(sc->mdt[ch], struct mdesc *,
- sizeof(struct mdesc) * nmd, M_MUSYCC, M_WAITOK);
+ sizeof(struct mdesc) * nmd, M_MUSYCC, 0);
MALLOC(sc->mdr[ch], struct mdesc *,
- sizeof(struct mdesc) * nmd, M_MUSYCC, M_WAITOK);
+ sizeof(struct mdesc) * nmd, M_MUSYCC, 0);
for (i = 0; i < nmd; i++) {
if (i == nmd - 1) {
sc->mdt[ch][i].snext = &sc->mdt[ch][0];
@@ -1287,13 +1287,13 @@ musycc_connect(hook_p hook)
sc->mdt[ch][i].m = NULL;
sc->mdt[ch][i].data = 0;
- MGETHDR(m, M_TRYWAIT, MT_DATA);
+ MGETHDR(m, 0, MT_DATA);
if (m == NULL)
goto errfree;
- MCLGET(m, M_TRYWAIT);
+ MCLGET(m, 0);
if ((m->m_flags & M_EXT) == 0) {
/* We've waited mbuf_wait and still got nothing.
- We're calling with M_TRYWAIT anyway - a little
+ We're calling with 0 anyway - a little
defensive programming costs us very little - if
anything at all in the case of error. */
m_free(m);
@@ -1455,7 +1455,7 @@ musycc_attach(device_t self)
f = pci_get_function(self);
/* For function zero allocate a csoftc */
if (f == 0) {
- MALLOC(csc, struct csoftc *, sizeof(*csc), M_MUSYCC, M_WAITOK | M_ZERO);
+ MALLOC(csc, struct csoftc *, sizeof(*csc), M_MUSYCC, M_ZERO);
csc->bus = pci_get_bus(self);
csc->slot = pci_get_slot(self);
LIST_INSERT_HEAD(&sc_list, csc, list);
@@ -1529,7 +1529,7 @@ musycc_attach(device_t self)
sc->reg = (struct globalr *)
(csc->virbase[0] + i * 0x800);
MALLOC(sc->mycg, struct mycg *,
- sizeof(struct mycg), M_MUSYCC, M_WAITOK | M_ZERO);
+ sizeof(struct mycg), M_MUSYCC, M_ZERO);
sc->ram = &sc->mycg->cg;
error = ng_make_node_common(&ngtypestruct, &sc->node);
diff --git a/sys/dev/my/if_my.c b/sys/dev/my/if_my.c
index 9f7a930..70ac950 100644
--- a/sys/dev/my/if_my.c
+++ b/sys/dev/my/if_my.c
@@ -1179,14 +1179,14 @@ my_newbuf(struct my_softc * sc, struct my_chain_onefrag * c)
struct mbuf *m_new = NULL;
MY_LOCK(sc);
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL) {
printf("my%d: no memory for rx list -- packet dropped!\n",
sc->my_unit);
MY_UNLOCK(sc);
return (ENOBUFS);
}
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (!(m_new->m_flags & M_EXT)) {
printf("my%d: no memory for rx list -- packet dropped!\n",
sc->my_unit);
@@ -1451,14 +1451,14 @@ my_encap(struct my_softc * sc, struct my_chain * c, struct mbuf * m_head)
* chain.
*/
m = m_head;
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL) {
printf("my%d: no memory for tx list", sc->my_unit);
MY_UNLOCK(sc);
return (1);
}
if (m_head->m_pkthdr.len > MHLEN) {
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (!(m_new->m_flags & M_EXT)) {
m_freem(m_new);
printf("my%d: no memory for tx list", sc->my_unit);
diff --git a/sys/dev/nge/if_nge.c b/sys/dev/nge/if_nge.c
index d498ebb..e591ea7 100644
--- a/sys/dev/nge/if_nge.c
+++ b/sys/dev/nge/if_nge.c
@@ -1162,7 +1162,7 @@ nge_newbuf(sc, c, m)
caddr_t *buf = NULL;
if (m == NULL) {
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL) {
printf("nge%d: no memory for rx list "
"-- packet dropped!\n", sc->nge_unit);
diff --git a/sys/dev/nmdm/nmdm.c b/sys/dev/nmdm/nmdm.c
index 6037451..2c69998 100644
--- a/sys/dev/nmdm/nmdm.c
+++ b/sys/dev/nmdm/nmdm.c
@@ -133,7 +133,7 @@ nmdminit(n)
if (n & ~0xff)
return;
- pt = malloc(sizeof(*pt), M_NLMDM, M_WAITOK);
+ pt = malloc(sizeof(*pt), M_NLMDM, 0);
bzero(pt, sizeof(*pt));
pt->part1.dev = dev1 = make_dev(&nmdm_cdevsw, n+n,
0, 0, 0666, "nmdm%dA", n);
diff --git a/sys/dev/null/null.c b/sys/dev/null/null.c
index 908e533..7a3ae8b 100644
--- a/sys/dev/null/null.c
+++ b/sys/dev/null/null.c
@@ -127,7 +127,7 @@ null_modevent(module_t mod, int type, void *data)
case MOD_LOAD:
if (bootverbose)
printf("null: <null device, zero device>\n");
- zbuf = (void *)malloc(PAGE_SIZE, M_TEMP, M_WAITOK | M_ZERO);
+ zbuf = (void *)malloc(PAGE_SIZE, M_TEMP, M_ZERO);
zero_dev = make_dev(&zero_cdevsw, ZERO_MINOR, UID_ROOT,
GID_WHEEL, 0666, "zero");
null_dev = make_dev(&null_cdevsw, NULL_MINOR, UID_ROOT,
diff --git a/sys/dev/ofw/openfirm.c b/sys/dev/ofw/openfirm.c
index 7704109..9ea97d3 100644
--- a/sys/dev/ofw/openfirm.c
+++ b/sys/dev/ofw/openfirm.c
@@ -292,7 +292,7 @@ OF_getprop(phandle_t package, char *propname, void *buf, int buflen)
/*
* Store the value of a property of a package into newly allocated memory (using
- * the M_OFWPROP malloc pool and M_WAITOK). elsz is the size of a single element,
+ * the M_OFWPROP malloc pool and 0). elsz is the size of a single element,
* the number of elements is return in number.
*/
int
@@ -305,7 +305,7 @@ OF_getprop_alloc(phandle_t package, char *propname, int elsz, void **buf)
len % elsz != 0)
return (-1);
- *buf = malloc(len, M_OFWPROP, M_WAITOK);
+ *buf = malloc(len, M_OFWPROP, 0);
if (OF_getprop(package, propname, *buf, len) == -1) {
free(*buf, M_OFWPROP);
*buf = NULL;
diff --git a/sys/dev/ofw/openfirmio.c b/sys/dev/ofw/openfirmio.c
index 6f40619..8bd5c04 100644
--- a/sys/dev/ofw/openfirmio.c
+++ b/sys/dev/ofw/openfirmio.c
@@ -115,7 +115,7 @@ openfirm_getstr(int len, const char *user, char **cpp)
if ((u_int)len > OFW_NAME_MAX)
return (ENAMETOOLONG);
- *cpp = cp = malloc(len + 1, M_TEMP, M_WAITOK);
+ *cpp = cp = malloc(len + 1, M_TEMP, 0);
if (cp == NULL)
return (ENOMEM);
error = copyin(user, cp, len);
@@ -183,7 +183,7 @@ openfirm_ioctl(dev_t dev, u_long cmd, caddr_t data, int flags,
/* -1 means no entry; 0 means no value */
if (len <= 0)
break;
- value = malloc(len, M_TEMP, M_WAITOK);
+ value = malloc(len, M_TEMP, 0);
if (value == NULL) {
error = ENOMEM;
break;
diff --git a/sys/dev/pccard/pccard.c b/sys/dev/pccard/pccard.c
index 6c82632..2cf04a2 100644
--- a/sys/dev/pccard/pccard.c
+++ b/sys/dev/pccard/pccard.c
@@ -224,7 +224,7 @@ pccard_attach_card(device_t dev)
* can be on at a time.
*/
ivar = malloc(sizeof(struct pccard_ivar), M_DEVBUF,
- M_WAITOK | M_ZERO);
+ M_ZERO);
child = device_add_child(dev, NULL, -1);
device_set_ivars(child, ivar);
ivar->fcn = pf;
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index 2c5e7a4..ecdcba0 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -333,7 +333,7 @@ pci_read_device(device_t pcib, int b, int s, int f, size_t size)
devlist_entry = NULL;
if (PCIB_READ_CONFIG(pcib, b, s, f, PCIR_DEVVENDOR, 4) != -1) {
- devlist_entry = malloc(size, M_DEVBUF, M_WAITOK | M_ZERO);
+ devlist_entry = malloc(size, M_DEVBUF, M_ZERO);
if (devlist_entry == NULL)
return (NULL);
diff --git a/sys/dev/pci/pci_user.c b/sys/dev/pci/pci_user.c
index 83b63b3..d39b026 100644
--- a/sys/dev/pci/pci_user.c
+++ b/sys/dev/pci/pci_user.c
@@ -307,7 +307,7 @@ pci_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
* Allocate a buffer to hold the patterns.
*/
pattern_buf = malloc(cio->pat_buf_len, M_TEMP,
- M_WAITOK);
+ 0);
error = copyin(cio->patterns, pattern_buf,
cio->pat_buf_len);
if (error != 0)
diff --git a/sys/dev/pdq/pdq_freebsd.h b/sys/dev/pdq/pdq_freebsd.h
index bd94900..5db50c8 100644
--- a/sys/dev/pdq/pdq_freebsd.h
+++ b/sys/dev/pdq/pdq_freebsd.h
@@ -186,9 +186,9 @@ typedef struct _pdq_os_ctx_t {
#define PDQ_OS_DATABUF_ALLOC(pdq, b) do { \
PDQ_OS_DATABUF_T *x_m0; \
- MGETHDR(x_m0, M_DONTWAIT, MT_DATA); \
+ MGETHDR(x_m0, M_NOWAIT, MT_DATA); \
if (x_m0 != NULL) { \
- MCLGET(x_m0, M_DONTWAIT); \
+ MCLGET(x_m0, M_NOWAIT); \
if ((x_m0->m_flags & M_EXT) == 0) { \
m_free(x_m0); \
(b) = NULL; \
diff --git a/sys/dev/pdq/pdq_ifsubr.c b/sys/dev/pdq/pdq_ifsubr.c
index 064bb68..5af7884 100644
--- a/sys/dev/pdq/pdq_ifsubr.c
+++ b/sys/dev/pdq/pdq_ifsubr.c
@@ -703,12 +703,12 @@ pdq_os_databuf_alloc(
struct mbuf *m;
bus_dmamap_t map;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
printf("%s: can't alloc small buf\n", sc->sc_dev.dv_xname);
return NULL;
}
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
printf("%s: can't alloc cluster\n", sc->sc_dev.dv_xname);
m_free(m);
diff --git a/sys/dev/pdq/pdqvar.h b/sys/dev/pdq/pdqvar.h
index 09358d8..825a2b9 100644
--- a/sys/dev/pdq/pdqvar.h
+++ b/sys/dev/pdq/pdqvar.h
@@ -401,9 +401,9 @@ typedef struct mbuf PDQ_OS_DATABUF_T;
#ifndef PDQ_OS_DATABUF_ALLOC
#define PDQ_OS_DATABUF_ALLOC(pdq, b) do { \
PDQ_OS_DATABUF_T *x_m0; \
- MGETHDR(x_m0, M_DONTWAIT, MT_DATA); \
+ MGETHDR(x_m0, M_NOWAIT, MT_DATA); \
if (x_m0 != NULL) { \
- MCLGET(x_m0, M_DONTWAIT); \
+ MCLGET(x_m0, M_NOWAIT); \
if ((x_m0->m_flags & M_EXT) == 0) { \
m_free(x_m0); \
(b) = NULL; \
diff --git a/sys/dev/ppbus/if_plip.c b/sys/dev/ppbus/if_plip.c
index 5ba4dc3..24a18ec 100644
--- a/sys/dev/ppbus/if_plip.c
+++ b/sys/dev/ppbus/if_plip.c
@@ -343,7 +343,7 @@ lpioctl (struct ifnet *ifp, u_long cmd, caddr_t data)
}
sc->sc_ifbuf = malloc(sc->sc_if.if_mtu + MLPIPHDRLEN,
- M_DEVBUF, M_WAITOK);
+ M_DEVBUF, 0);
if (!sc->sc_ifbuf) {
ppb_release_bus(ppbus, dev);
return ENOBUFS;
diff --git a/sys/dev/ppbus/lpt.c b/sys/dev/ppbus/lpt.c
index 9364c50..abc9e95 100644
--- a/sys/dev/ppbus/lpt.c
+++ b/sys/dev/ppbus/lpt.c
@@ -548,8 +548,8 @@ lptopen(dev_t dev, int flags, int fmt, struct thread *td)
ppb_wctr(ppbus, sc->sc_control);
sc->sc_state = OPEN;
- sc->sc_inbuf = malloc(BUFSIZE, M_DEVBUF, M_WAITOK);
- sc->sc_statbuf = malloc(BUFSTATSIZE, M_DEVBUF, M_WAITOK);
+ sc->sc_inbuf = malloc(BUFSIZE, M_DEVBUF, 0);
+ sc->sc_statbuf = malloc(BUFSTATSIZE, M_DEVBUF, 0);
sc->sc_xfercnt = 0;
splx(s);
diff --git a/sys/dev/ppbus/vpo.c b/sys/dev/ppbus/vpo.c
index ad83e2f..09208b6 100644
--- a/sys/dev/ppbus/vpo.c
+++ b/sys/dev/ppbus/vpo.c
@@ -186,7 +186,7 @@ static void
vpo_cam_rescan(struct vpo_data *vpo)
{
struct cam_path *path;
- union ccb *ccb = malloc(sizeof(union ccb), M_TEMP, M_WAITOK | M_ZERO);
+ union ccb *ccb = malloc(sizeof(union ccb), M_TEMP, M_ZERO);
if (xpt_create_path(&path, xpt_periph, cam_sim_path(vpo->sim), 0, 0)
!= CAM_REQ_CMP) {
diff --git a/sys/dev/puc/puc.c b/sys/dev/puc/puc.c
index 18d2fba..4cba354 100644
--- a/sys/dev/puc/puc.c
+++ b/sys/dev/puc/puc.c
@@ -248,7 +248,7 @@ puc_attach(device_t dev, const struct puc_device_description *desc)
rle->res = sc->sc_bar_mappings[bidx].res;
} else {
rle->res = malloc(sizeof(struct resource), M_DEVBUF,
- M_WAITOK | M_ZERO);
+ M_ZERO);
if (rle->res == NULL) {
free(pdev, M_DEVBUF);
return (ENOMEM);
diff --git a/sys/dev/raidframe/rf_freebsdkintf.c b/sys/dev/raidframe/rf_freebsdkintf.c
index e2b2508..144cda6 100644
--- a/sys/dev/raidframe/rf_freebsdkintf.c
+++ b/sys/dev/raidframe/rf_freebsdkintf.c
@@ -917,7 +917,7 @@ raidioctl(dev, cmd, data, flag, td)
case RAIDFRAME_INIT_LABELS:
MALLOC(ci_label, RF_ComponentLabel_t *,
sizeof(RF_ComponentLabel_t), M_RAIDFRAME,
- M_WAITOK | M_ZERO);
+ M_ZERO);
clabel = (RF_ComponentLabel_t *) data;
/*
we only want the serial number from
@@ -984,7 +984,7 @@ raidioctl(dev, cmd, data, flag, td)
case RAIDFRAME_ADD_HOT_SPARE:
MALLOC(hot_spare, RF_SingleComponent_t *,
sizeof(RF_SingleComponent_t), M_RAIDFRAME,
- M_WAITOK | M_ZERO);
+ M_ZERO);
sparePtr = (RF_SingleComponent_t *) data;
memcpy( hot_spare, sparePtr, sizeof(RF_SingleComponent_t));
retcode = rf_add_hot_spare(raidPtr, hot_spare);
@@ -997,7 +997,7 @@ raidioctl(dev, cmd, data, flag, td)
case RAIDFRAME_DELETE_COMPONENT:
MALLOC(component, RF_SingleComponent_t *,
sizeof(RF_SingleComponent_t), M_RAIDFRAME,
- M_WAITOK | M_ZERO);
+ M_ZERO);
componentPtr = (RF_SingleComponent_t *)data;
memcpy( component, componentPtr,
sizeof(RF_SingleComponent_t));
@@ -1008,7 +1008,7 @@ raidioctl(dev, cmd, data, flag, td)
case RAIDFRAME_INCORPORATE_HOT_SPARE:
MALLOC(component, RF_SingleComponent_t *,
sizeof(RF_SingleComponent_t), M_RAIDFRAME,
- M_WAITOK | M_ZERO);
+ M_ZERO);
componentPtr = (RF_SingleComponent_t *)data;
memcpy( component, componentPtr,
sizeof(RF_SingleComponent_t));
@@ -1020,7 +1020,7 @@ raidioctl(dev, cmd, data, flag, td)
MALLOC(component, RF_SingleComponent_t *,
sizeof(RF_SingleComponent_t), M_RAIDFRAME,
- M_WAITOK | M_ZERO);
+ M_ZERO);
if (raidPtr->Layout.map->faultsTolerated == 0) {
/* Can't do this on a RAID 0!! */
FREE(component, M_RAIDFRAME);
@@ -2894,7 +2894,7 @@ rf_set_autoconfig(raidPtr, new_value)
int row, column;
MALLOC(clabel, RF_ComponentLabel_t *, sizeof(RF_ComponentLabel_t),
- M_RAIDFRAME, M_WAITOK | M_ZERO);
+ M_RAIDFRAME, M_ZERO);
raidPtr->autoconfigure = new_value;
for(row=0; row<raidPtr->numRow; row++) {
@@ -2924,7 +2924,7 @@ rf_set_rootpartition(raidPtr, new_value)
int row, column;
MALLOC(clabel, RF_ComponentLabel_t *, sizeof(RF_ComponentLabel_t),
- M_RAIDFRAME, M_WAITOK | M_ZERO);
+ M_RAIDFRAME, M_ZERO);
raidPtr->root_partition = new_value;
for(row=0; row<raidPtr->numRow; row++) {
diff --git a/sys/dev/raidframe/rf_shutdown.c b/sys/dev/raidframe/rf_shutdown.c
index 7db93e9..9dc6255 100644
--- a/sys/dev/raidframe/rf_shutdown.c
+++ b/sys/dev/raidframe/rf_shutdown.c
@@ -61,7 +61,7 @@ _rf_ShutdownCreate(
* and shutdown after RAIDframe internal allocation system.
*/
/* ent = (RF_ShutdownList_t *) malloc(sizeof(RF_ShutdownList_t),
- M_RAIDFRAME, M_WAITOK); */
+ M_RAIDFRAME, 0); */
ent = (RF_ShutdownList_t *) malloc(sizeof(RF_ShutdownList_t),
M_RAIDFRAME, M_NOWAIT);
if (ent == NULL)
diff --git a/sys/dev/random/randomdev.c b/sys/dev/random/randomdev.c
index d965cbc..6256ae2 100644
--- a/sys/dev/random/randomdev.c
+++ b/sys/dev/random/randomdev.c
@@ -187,7 +187,7 @@ random_read(dev_t dev __unused, struct uio *uio, int flag)
return error;
}
c = uio->uio_resid < PAGE_SIZE ? uio->uio_resid : PAGE_SIZE;
- random_buf = (void *)malloc((u_long)c, M_TEMP, M_WAITOK);
+ random_buf = (void *)malloc((u_long)c, M_TEMP, 0);
while (uio->uio_resid > 0 && error == 0) {
ret = read_random_real(random_buf, c);
error = uiomove(random_buf, ret, uio);
@@ -205,7 +205,7 @@ random_write(dev_t dev __unused, struct uio *uio, int flag __unused)
void *random_buf;
error = 0;
- random_buf = (void *)malloc(PAGE_SIZE, M_TEMP, M_WAITOK);
+ random_buf = (void *)malloc(PAGE_SIZE, M_TEMP, 0);
while (uio->uio_resid > 0) {
c = (int)(uio->uio_resid < PAGE_SIZE
? uio->uio_resid
diff --git a/sys/dev/ray/if_ray.c b/sys/dev/ray/if_ray.c
index 1c92d50..7cd9b87 100644
--- a/sys/dev/ray/if_ray.c
+++ b/sys/dev/ray/if_ray.c
@@ -1782,14 +1782,14 @@ ray_rx(struct ray_softc *sc, size_t rcs)
goto skip_read;
}
- MGETHDR(m0, M_DONTWAIT, MT_DATA);
+ MGETHDR(m0, M_NOWAIT, MT_DATA);
if (m0 == NULL) {
RAY_RECERR(sc, "MGETHDR failed");
ifp->if_ierrors++;
goto skip_read;
}
if (pktlen > MHLEN) {
- MCLGET(m0, M_DONTWAIT);
+ MCLGET(m0, M_NOWAIT);
if (!(m0->m_flags & M_EXT)) {
RAY_RECERR(sc, "MCLGET failed");
ifp->if_ierrors++;
@@ -3155,7 +3155,7 @@ ray_com_malloc(ray_comqfn_t function, int flags, char *mesg)
struct ray_comq_entry *com;
MALLOC(com, struct ray_comq_entry *,
- sizeof(struct ray_comq_entry), M_RAYCOM, M_WAITOK);
+ sizeof(struct ray_comq_entry), M_RAYCOM, 0);
return (ray_com_init(com, function, flags, mesg));
}
diff --git a/sys/dev/sbni/if_sbni.c b/sys/dev/sbni/if_sbni.c
index e5d5417..d99882f 100644
--- a/sys/dev/sbni/if_sbni.c
+++ b/sys/dev/sbni/if_sbni.c
@@ -814,7 +814,7 @@ get_rx_buf(struct sbni_softc *sc)
{
struct mbuf *m;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
if_printf(&sc->arpcom.ac_if, "cannot allocate header mbuf\n");
return (0);
@@ -828,7 +828,7 @@ get_rx_buf(struct sbni_softc *sc)
*/
if (ETHER_MAX_LEN + 2 > MHLEN) {
/* Attach an mbuf cluster */
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
m_freem(m);
return (0);
diff --git a/sys/dev/sf/if_sf.c b/sys/dev/sf/if_sf.c
index a148ba5..7b63a01 100644
--- a/sys/dev/sf/if_sf.c
+++ b/sys/dev/sf/if_sf.c
@@ -924,11 +924,11 @@ sf_newbuf(sc, c, m)
struct mbuf *m_new = NULL;
if (m == NULL) {
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL)
return(ENOBUFS);
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (!(m_new->m_flags & M_EXT)) {
m_freem(m_new);
return(ENOBUFS);
@@ -1304,14 +1304,14 @@ sf_encap(sc, c, m_head)
if (m != NULL) {
struct mbuf *m_new = NULL;
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL) {
printf("sf%d: no memory for tx list\n", sc->sf_unit);
return(1);
}
if (m_head->m_pkthdr.len > MHLEN) {
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (!(m_new->m_flags & M_EXT)) {
m_freem(m_new);
printf("sf%d: no memory for tx list\n",
diff --git a/sys/dev/sk/if_sk.c b/sys/dev/sk/if_sk.c
index e58d1c4..3aa40e7 100644
--- a/sys/dev/sk/if_sk.c
+++ b/sys/dev/sk/if_sk.c
@@ -688,7 +688,7 @@ sk_newbuf(sc_if, c, m)
if (m == NULL) {
caddr_t *buf = NULL;
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL)
return(ENOBUFS);
diff --git a/sys/dev/sn/if_sn.c b/sys/dev/sn/if_sn.c
index 46011cb..18ca1cc 100644
--- a/sys/dev/sn/if_sn.c
+++ b/sys/dev/sn/if_sn.c
@@ -1057,7 +1057,7 @@ read_another:
/*
* Allocate a header mbuf from the kernel.
*/
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
goto out;
@@ -1067,7 +1067,7 @@ read_another:
/*
* Attach an mbuf cluster
*/
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
/*
* Insist on getting a cluster
diff --git a/sys/dev/snc/dp83932.c b/sys/dev/snc/dp83932.c
index 991bb99..0721853 100644
--- a/sys/dev/snc/dp83932.c
+++ b/sys/dev/snc/dp83932.c
@@ -1121,7 +1121,7 @@ sonic_get(sc, pkt, datalen)
* Our sonic_read() and sonic_get() require it.
*/
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == 0)
return (0);
m->m_pkthdr.rcvif = &sc->sc_if;
@@ -1132,7 +1132,7 @@ sonic_get(sc, pkt, datalen)
while (datalen > 0) {
if (top) {
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (m == 0) {
m_freem(top);
return (0);
@@ -1140,7 +1140,7 @@ sonic_get(sc, pkt, datalen)
len = MLEN;
}
if (datalen >= MINCLSIZE) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
if (top) m_freem(top);
return (0);
diff --git a/sys/dev/snp/snp.c b/sys/dev/snp/snp.c
index 34e3e29..8158343 100644
--- a/sys/dev/snp/snp.c
+++ b/sys/dev/snp/snp.c
@@ -150,7 +150,7 @@ snplwrite(tp, uio, flag)
snp = tp->t_sc;
while (uio->uio_resid > 0) {
ilen = imin(512, uio->uio_resid);
- ibuf = malloc(ilen, M_SNP, M_WAITOK);
+ ibuf = malloc(ilen, M_SNP, 0);
error = uiomove(ibuf, ilen, uio);
if (error != 0)
break;
@@ -391,7 +391,7 @@ snpopen(dev, flag, mode, td)
make_dev(&snp_cdevsw, minor(dev), UID_ROOT, GID_WHEEL,
0600, "snp%d", dev2unit(dev));
dev->si_drv1 = snp = malloc(sizeof(*snp), M_SNP,
- M_WAITOK | M_ZERO);
+ M_ZERO);
snp->snp_unit = dev2unit(dev);
} else
return (EBUSY);
@@ -402,7 +402,7 @@ snpopen(dev, flag, mode, td)
*/
snp->snp_flags = SNOOP_OPEN;
- snp->snp_buf = malloc(SNOOP_MINLEN, M_SNP, M_WAITOK);
+ snp->snp_buf = malloc(SNOOP_MINLEN, M_SNP, 0);
snp->snp_blen = SNOOP_MINLEN;
snp->snp_base = 0;
snp->snp_len = 0;
@@ -480,7 +480,7 @@ snp_down(snp)
if (snp->snp_blen != SNOOP_MINLEN) {
free(snp->snp_buf, M_SNP);
- snp->snp_buf = malloc(SNOOP_MINLEN, M_SNP, M_WAITOK);
+ snp->snp_buf = malloc(SNOOP_MINLEN, M_SNP, 0);
snp->snp_blen = SNOOP_MINLEN;
}
snp->snp_flags |= SNOOP_DOWN;
diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c
index 07d2660..6e2de52 100644
--- a/sys/dev/sound/midi/midi.c
+++ b/sys/dev/sound/midi/midi.c
@@ -282,7 +282,7 @@ create_mididev_info_unit(int type, mididev_info *mdinf, synthdev_info *syninf)
}
/* As malloc(9) might block, allocate mididev_info now. */
- mdnew = malloc(sizeof(mididev_info), M_DEVBUF, M_WAITOK | M_ZERO);
+ mdnew = malloc(sizeof(mididev_info), M_DEVBUF, M_ZERO);
if (mdnew == NULL)
return NULL;
bcopy(mdinf, mdnew, sizeof(mididev_info));
@@ -607,7 +607,7 @@ midi_read(dev_t i_dev, struct uio * buf, int flag)
len = buf->uio_resid;
lenr = 0;
- uiobuf = (u_char *)malloc(len, M_DEVBUF, M_WAITOK | M_ZERO);
+ uiobuf = (u_char *)malloc(len, M_DEVBUF, M_ZERO);
if (uiobuf == NULL)
return (ENOMEM);
@@ -659,7 +659,7 @@ midi_write(dev_t i_dev, struct uio * buf, int flag)
len = buf->uio_resid;
lenw = 0;
- uiobuf = (u_char *)malloc(len, M_DEVBUF, M_WAITOK | M_ZERO);
+ uiobuf = (u_char *)malloc(len, M_DEVBUF, M_ZERO);
if (uiobuf == NULL)
return (ENOMEM);
diff --git a/sys/dev/sound/midi/midibuf.c b/sys/dev/sound/midi/midibuf.c
index 8b4eda7..41ea4dd 100644
--- a/sys/dev/sound/midi/midibuf.c
+++ b/sys/dev/sound/midi/midibuf.c
@@ -55,7 +55,7 @@ int
midibuf_init(midi_dbuf *dbuf)
{
if (dbuf->buf == NULL) {
- dbuf->buf = malloc(MIDI_BUFFSIZE, M_DEVBUF, M_WAITOK | M_ZERO);
+ dbuf->buf = malloc(MIDI_BUFFSIZE, M_DEVBUF, M_ZERO);
cv_init(&dbuf->cv_in, "midi queue in");
cv_init(&dbuf->cv_out, "midi queue out");
}
diff --git a/sys/dev/sound/midi/sequencer.c b/sys/dev/sound/midi/sequencer.c
index 5115cc9..7d0b6e2 100644
--- a/sys/dev/sound/midi/sequencer.c
+++ b/sys/dev/sound/midi/sequencer.c
@@ -322,7 +322,7 @@ seq_initunit(int unit)
dev_t seqdev, musicdev;
/* Allocate the softc. */
- scp = malloc(sizeof(*scp), M_DEVBUF, M_WAITOK | M_ZERO);
+ scp = malloc(sizeof(*scp), M_DEVBUF, M_ZERO);
if (scp == (sc_p)NULL) {
printf("seq_initunit: unit %d, softc allocation failed.\n", unit);
return (1);
@@ -544,7 +544,7 @@ seq_read(dev_t i_dev, struct uio *buf, int flag)
len = buf->uio_resid;
lenr = 0;
- uiobuf = (u_char *)malloc(len, M_DEVBUF, M_WAITOK | M_ZERO);
+ uiobuf = (u_char *)malloc(len, M_DEVBUF, M_ZERO);
if (uiobuf == NULL)
return (ENOMEM);
@@ -2364,7 +2364,7 @@ create_seqdev_info_unit(int unit, seqdev_info *seq)
seqdev_info *sd, *sdnew;
/* As malloc(9) might block, allocate seqdev_info now. */
- sdnew = malloc(sizeof(seqdev_info), M_DEVBUF, M_WAITOK | M_ZERO);
+ sdnew = malloc(sizeof(seqdev_info), M_DEVBUF, M_ZERO);
if (sdnew == NULL)
return NULL;
bcopy(seq, sdnew, sizeof(seqdev_info));
diff --git a/sys/dev/sound/midi/timer.c b/sys/dev/sound/midi/timer.c
index ba4bce0..b5c75cf 100644
--- a/sys/dev/sound/midi/timer.c
+++ b/sys/dev/sound/midi/timer.c
@@ -97,7 +97,7 @@ timerdev_install(void)
tmd = NULL;
scp = NULL;
- scp = malloc(sizeof(*scp), M_DEVBUF, M_WAITOK | M_ZERO);
+ scp = malloc(sizeof(*scp), M_DEVBUF, M_ZERO);
if (scp == NULL) {
ret = ENOMEM;
goto fail;
@@ -146,7 +146,7 @@ create_timerdev_info_unit(timerdev_info *tmdinf)
}
/* As malloc(9) might block, allocate timerdev_info now. */
- tmdnew = malloc(sizeof(timerdev_info), M_DEVBUF, M_WAITOK | M_ZERO);
+ tmdnew = malloc(sizeof(timerdev_info), M_DEVBUF, M_ZERO);
if (tmdnew == NULL)
return NULL;
bcopy(tmdinf, tmdnew, sizeof(timerdev_info));
diff --git a/sys/dev/sound/pci/ds1.c b/sys/dev/sound/pci/ds1.c
index 896a8af..dfffd8d 100644
--- a/sys/dev/sound/pci/ds1.c
+++ b/sys/dev/sound/pci/ds1.c
@@ -934,7 +934,7 @@ ds_pci_attach(device_t dev)
struct ac97_info *codec = NULL;
char status[SND_STATUSLEN];
- if ((sc = malloc(sizeof(*sc), M_DEVBUF, M_WAITOK | M_ZERO)) == NULL) {
+ if ((sc = malloc(sizeof(*sc), M_DEVBUF, M_ZERO)) == NULL) {
device_printf(dev, "cannot allocate softc\n");
return ENXIO;
}
diff --git a/sys/dev/sound/pci/emu10k1.c b/sys/dev/sound/pci/emu10k1.c
index e9c99cb..52e16bf 100644
--- a/sys/dev/sound/pci/emu10k1.c
+++ b/sys/dev/sound/pci/emu10k1.c
@@ -1455,7 +1455,7 @@ emu_pci_attach(device_t dev)
int i, gotmic;
char status[SND_STATUSLEN];
- if ((sc = malloc(sizeof(*sc), M_DEVBUF, M_WAITOK | M_ZERO)) == NULL) {
+ if ((sc = malloc(sizeof(*sc), M_DEVBUF, M_ZERO)) == NULL) {
device_printf(dev, "cannot allocate softc\n");
return ENXIO;
}
diff --git a/sys/dev/sound/pcm/ac97.c b/sys/dev/sound/pcm/ac97.c
index 0f3c905..c0f8884 100644
--- a/sys/dev/sound/pcm/ac97.c
+++ b/sys/dev/sound/pcm/ac97.c
@@ -540,7 +540,7 @@ ac97_create(device_t dev, void *devinfo, kobj_class_t cls)
snprintf(codec->name, AC97_NAMELEN, "%s:ac97", device_get_nameunit(dev));
codec->lock = snd_mtxcreate(codec->name, "ac97 codec");
- codec->methods = kobj_create(cls, M_AC97, M_WAITOK);
+ codec->methods = kobj_create(cls, M_AC97, 0);
if (codec->methods == NULL) {
snd_mtxlock(codec->lock);
snd_mtxfree(codec->lock);
diff --git a/sys/dev/sound/pcm/buffer.c b/sys/dev/sound/pcm/buffer.c
index d498591..9a49e28 100644
--- a/sys/dev/sound/pcm/buffer.c
+++ b/sys/dev/sound/pcm/buffer.c
@@ -58,7 +58,7 @@ sndbuf_create(device_t dev, char *drv, char *desc)
{
struct snd_dbuf *b;
- b = malloc(sizeof(*b), M_DEVBUF, M_WAITOK | M_ZERO);
+ b = malloc(sizeof(*b), M_DEVBUF, M_ZERO);
snprintf(b->name, SNDBUF_NAMELEN, "%s:%s", drv, desc);
b->dev = dev;
diff --git a/sys/dev/sound/pcm/fake.c b/sys/dev/sound/pcm/fake.c
index 8c4ba77..f1bd33c 100644
--- a/sys/dev/sound/pcm/fake.c
+++ b/sys/dev/sound/pcm/fake.c
@@ -117,8 +117,8 @@ fkchan_setup(device_t dev)
struct snddev_info *d = device_get_softc(dev);
struct pcm_channel *c;
- c = malloc(sizeof(*c), M_DEVBUF, M_WAITOK);
- c->methods = kobj_create(&fkchan_class, M_DEVBUF, M_WAITOK);
+ c = malloc(sizeof(*c), M_DEVBUF, 0);
+ c->methods = kobj_create(&fkchan_class, M_DEVBUF, 0);
c->parentsnddev = d;
snprintf(c->name, CHN_NAMELEN, "%s:fake", device_get_nameunit(dev));
diff --git a/sys/dev/sound/pcm/feeder.c b/sys/dev/sound/pcm/feeder.c
index 424da4d..0edb34f 100644
--- a/sys/dev/sound/pcm/feeder.c
+++ b/sys/dev/sound/pcm/feeder.c
@@ -59,7 +59,7 @@ feeder_register(void *p)
KASSERT(fc->desc == NULL, ("first feeder not root: %s", fc->name));
SLIST_INIT(&feedertab);
- fte = malloc(sizeof(*fte), M_FEEDER, M_WAITOK | M_ZERO);
+ fte = malloc(sizeof(*fte), M_FEEDER, M_ZERO);
if (fte == NULL) {
printf("can't allocate memory for root feeder: %s\n",
fc->name);
@@ -84,7 +84,7 @@ feeder_register(void *p)
i = 0;
while ((feedercnt < MAXFEEDERS) && (fc->desc[i].type > 0)) {
/* printf("adding feeder %s, %x -> %x\n", fc->name, fc->desc[i].in, fc->desc[i].out); */
- fte = malloc(sizeof(*fte), M_FEEDER, M_WAITOK | M_ZERO);
+ fte = malloc(sizeof(*fte), M_FEEDER, M_ZERO);
if (fte == NULL) {
printf("can't allocate memory for feeder '%s', %x -> %x\n", fc->name, fc->desc[i].in, fc->desc[i].out);
diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c
index 182d290..2c3c3f4 100644
--- a/sys/dev/sound/pcm/mixer.c
+++ b/sys/dev/sound/pcm/mixer.c
@@ -200,7 +200,7 @@ mixer_init(device_t dev, kobj_class_t cls, void *devinfo)
dev_t pdev;
int i, unit;
- m = (struct snd_mixer *)kobj_create(cls, M_MIXER, M_WAITOK | M_ZERO);
+ m = (struct snd_mixer *)kobj_create(cls, M_MIXER, M_ZERO);
snprintf(m->name, MIXER_NAMELEN, "%s:mixer", device_get_nameunit(dev));
m->lock = snd_mtxcreate(m->name, "pcm mixer");
m->type = cls->name;
diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c
index bdaff2b..6d2a27a 100644
--- a/sys/dev/sound/pcm/sndstat.c
+++ b/sys/dev/sound/pcm/sndstat.c
@@ -222,7 +222,7 @@ sndstat_register(device_t dev, char *str, sndstat_handler handler)
unit = -1;
}
- ent = malloc(sizeof *ent, M_DEVBUF, M_ZERO | M_WAITOK);
+ ent = malloc(sizeof *ent, M_DEVBUF, M_ZERO | 0);
if (!ent)
return ENOSPC;
diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c
index c184a69..f6d852f 100644
--- a/sys/dev/sound/pcm/sound.c
+++ b/sys/dev/sound/pcm/sound.c
@@ -91,7 +91,7 @@ snd_mtxcreate(const char *desc, const char *type)
#ifdef USING_MUTEX
struct mtx *m;
- m = malloc(sizeof(*m), M_DEVBUF, M_WAITOK | M_ZERO);
+ m = malloc(sizeof(*m), M_DEVBUF, M_ZERO);
if (m == NULL)
return NULL;
mtx_init(m, desc, type, MTX_RECURSE);
@@ -364,11 +364,11 @@ pcm_chn_create(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t c
return NULL;
}
- ch = malloc(sizeof(*ch), M_DEVBUF, M_WAITOK | M_ZERO);
+ ch = malloc(sizeof(*ch), M_DEVBUF, M_ZERO);
if (!ch)
return NULL;
- ch->methods = kobj_create(cls, M_DEVBUF, M_WAITOK);
+ ch->methods = kobj_create(cls, M_DEVBUF, 0);
if (!ch->methods) {
free(ch, M_DEVBUF);
@@ -426,7 +426,7 @@ pcm_chn_add(struct snddev_info *d, struct pcm_channel *ch, int mkdev)
int unit = device_get_unit(d->dev);
int x = -1;
- sce = malloc(sizeof(*sce), M_DEVBUF, M_WAITOK | M_ZERO);
+ sce = malloc(sizeof(*sce), M_DEVBUF, M_ZERO);
if (!sce) {
return ENOMEM;
}
diff --git a/sys/dev/sound/pcm/vchan.c b/sys/dev/sound/pcm/vchan.c
index 8da3c3e..ab04ac3b 100644
--- a/sys/dev/sound/pcm/vchan.c
+++ b/sys/dev/sound/pcm/vchan.c
@@ -124,7 +124,7 @@ vchan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel *c,
struct pcm_channel *parent = devinfo;
KASSERT(dir == PCMDIR_PLAY, ("vchan_init: bad direction"));
- ch = malloc(sizeof(*ch), M_DEVBUF, M_WAITOK | M_ZERO);
+ ch = malloc(sizeof(*ch), M_DEVBUF, M_ZERO);
ch->parent = parent;
ch->channel = c;
ch->fmt = AFMT_U8;
@@ -237,7 +237,7 @@ vchan_create(struct pcm_channel *parent)
struct pcm_channel *child;
int err, first;
- pce = malloc(sizeof(*pce), M_DEVBUF, M_WAITOK | M_ZERO);
+ pce = malloc(sizeof(*pce), M_DEVBUF, M_ZERO);
if (!pce) {
return ENOMEM;
}
diff --git a/sys/dev/speaker/spkr.c b/sys/dev/speaker/spkr.c
index de4c5ca..e6487c1 100644
--- a/sys/dev/speaker/spkr.c
+++ b/sys/dev/speaker/spkr.c
@@ -495,7 +495,7 @@ spkropen(dev, flags, fmt, td)
(void) printf("spkropen: about to perform play initialization\n");
#endif /* DEBUG */
playinit();
- spkr_inbuf = malloc(DEV_BSIZE, M_SPKR, M_WAITOK);
+ spkr_inbuf = malloc(DEV_BSIZE, M_SPKR, 0);
spkr_active = TRUE;
return(0);
}
diff --git a/sys/dev/sr/if_sr.c b/sys/dev/sr/if_sr.c
index 18b5511..dfde40e 100644
--- a/sys/dev/sr/if_sr.c
+++ b/sys/dev/sr/if_sr.c
@@ -311,7 +311,7 @@ sr_attach(device_t device)
hc = (struct sr_hardc *)device_get_softc(device);
MALLOC(sc, struct sr_softc *,
hc->numports * sizeof(struct sr_softc),
- M_DEVBUF, M_WAITOK | M_ZERO);
+ M_DEVBUF, M_ZERO);
if (sc == NULL)
goto errexit;
hc->sc = sc;
@@ -2088,7 +2088,7 @@ sr_get_packets(struct sr_softc *sc)
sc->unit, rxstat, len);
#endif
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
/*
* eat (flush) packet if get mbuf fail!!
@@ -2106,7 +2106,7 @@ sr_get_packets(struct sr_softc *sc)
#endif /* NETGRAPH */
m->m_pkthdr.len = m->m_len = len;
if (len > MHLEN) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
/*
* We couldn't get a big enough
diff --git a/sys/dev/streams/streams.c b/sys/dev/streams/streams.c
index 4347d99..4ee45a2 100644
--- a/sys/dev/streams/streams.c
+++ b/sys/dev/streams/streams.c
@@ -367,7 +367,7 @@ svr4_stream_get(fp)
}
/* Allocate a new one. */
- st = malloc(sizeof(struct svr4_strm), M_TEMP, M_WAITOK);
+ st = malloc(sizeof(struct svr4_strm), M_TEMP, 0);
st->s_family = so->so_proto->pr_domain->dom_family;
st->s_cmd = ~0;
st->s_afd = -1;
diff --git a/sys/dev/syscons/daemon/daemon_saver.c b/sys/dev/syscons/daemon/daemon_saver.c
index 3cd5830..aebeab2 100644
--- a/sys/dev/syscons/daemon/daemon_saver.c
+++ b/sys/dev/syscons/daemon/daemon_saver.c
@@ -383,7 +383,7 @@ daemon_init(video_adapter_t *adp)
{
messagelen = strlen(hostname) + 3 + strlen(ostype) + 1 +
strlen(osrelease);
- message = malloc(messagelen + 1, M_DEVBUF, M_WAITOK);
+ message = malloc(messagelen + 1, M_DEVBUF, 0);
sprintf(message, "%s - %s %s", hostname, ostype, osrelease);
blanked = 0;
return 0;
diff --git a/sys/dev/syscons/schistory.c b/sys/dev/syscons/schistory.c
index 30cbdfd..479add9 100644
--- a/sys/dev/syscons/schistory.c
+++ b/sys/dev/syscons/schistory.c
@@ -124,7 +124,7 @@ sc_alloc_history_buffer(scr_stat *scp, int lines, int prev_ysize, int wait)
/* allocate a new buffer */
history = (sc_vtb_t *)malloc(sizeof(*history),
M_DEVBUF,
- (wait) ? M_WAITOK : M_NOWAIT);
+ (wait) ? 0 : M_NOWAIT);
if (history != NULL) {
if (lines > min_lines)
extra_history_size -= lines - min_lines;
diff --git a/sys/dev/syscons/scmouse.c b/sys/dev/syscons/scmouse.c
index 0c4ba2c..6db469a 100644
--- a/sys/dev/syscons/scmouse.c
+++ b/sys/dev/syscons/scmouse.c
@@ -106,7 +106,7 @@ sc_alloc_cut_buffer(scr_stat *scp, int wait)
free(p, M_DEVBUF);
cut_buffer_size = scp->xsize * scp->ysize + 1;
p = (u_char *)malloc(cut_buffer_size,
- M_DEVBUF, (wait) ? M_WAITOK : M_NOWAIT);
+ M_DEVBUF, (wait) ? 0 : M_NOWAIT);
if (p != NULL)
p[0] = '\0';
cut_buffer = p;
diff --git a/sys/dev/syscons/scvtb.c b/sys/dev/syscons/scvtb.c
index 6712e9b..8a0a24f 100644
--- a/sys/dev/syscons/scvtb.c
+++ b/sys/dev/syscons/scvtb.c
@@ -61,7 +61,7 @@ sc_vtb_init(sc_vtb_t *vtb, int type, int cols, int rows, void *buf, int wait)
vtb->vtb_buffer =
(vm_offset_t)malloc(cols*rows*sizeof(u_int16_t),
M_DEVBUF,
- (wait) ? M_WAITOK : M_NOWAIT);
+ (wait) ? 0 : M_NOWAIT);
if (vtb->vtb_buffer != 0) {
bzero((void *)sc_vtb_pointer(vtb, 0),
cols*rows*sizeof(u_int16_t));
diff --git a/sys/dev/syscons/snake/snake_saver.c b/sys/dev/syscons/snake/snake_saver.c
index ea5651f..5741eea 100644
--- a/sys/dev/syscons/snake/snake_saver.c
+++ b/sys/dev/syscons/snake/snake_saver.c
@@ -131,9 +131,9 @@ static int
snake_init(video_adapter_t *adp)
{
messagelen = strlen(ostype) + 1 + strlen(osrelease);
- message = malloc(messagelen + 1, M_DEVBUF, M_WAITOK);
+ message = malloc(messagelen + 1, M_DEVBUF, 0);
sprintf(message, "%s %s", ostype, osrelease);
- messagep = malloc(messagelen * sizeof *messagep, M_DEVBUF, M_WAITOK);
+ messagep = malloc(messagelen * sizeof *messagep, M_DEVBUF, 0);
return 0;
}
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c
index 6a885c4..38465ab 100644
--- a/sys/dev/syscons/syscons.c
+++ b/sys/dev/syscons/syscons.c
@@ -318,7 +318,7 @@ sc_attach_unit(int unit, int flags)
/* assert(sc_console->ts != NULL); */
kernel_console_ts = sc_console->ts;
sc_console->ts = malloc(sc_console->tsw->te_size,
- M_DEVBUF, M_WAITOK);
+ M_DEVBUF, 0);
bcopy(kernel_console_ts, sc_console->ts, sc_console->tsw->te_size);
(*sc_console->tsw->te_default_attr)(sc_console,
user_default.std_color,
@@ -2674,9 +2674,9 @@ scinit(int unit, int flags)
sc->font_16 = font_16;
} else if (sc->font_8 == NULL) {
/* assert(sc_malloc) */
- sc->font_8 = malloc(sizeof(font_8), M_DEVBUF, M_WAITOK);
- sc->font_14 = malloc(sizeof(font_14), M_DEVBUF, M_WAITOK);
- sc->font_16 = malloc(sizeof(font_16), M_DEVBUF, M_WAITOK);
+ sc->font_8 = malloc(sizeof(font_8), M_DEVBUF, 0);
+ sc->font_14 = malloc(sizeof(font_14), M_DEVBUF, 0);
+ sc->font_16 = malloc(sizeof(font_16), M_DEVBUF, 0);
}
#endif
@@ -2703,7 +2703,7 @@ scinit(int unit, int flags)
kernel_default.rev_color);
} else {
/* assert(sc_malloc) */
- sc->dev = malloc(sizeof(dev_t)*sc->vtys, M_DEVBUF, M_WAITOK|M_ZERO);
+ sc->dev = malloc(sizeof(dev_t)*sc->vtys, M_DEVBUF, M_ZERO);
sc->dev[0] = makedev(CDEV_MAJOR, unit*MAXCONS);
sc->dev[0]->si_tty = ttymalloc(sc->dev[0]->si_tty);
scp = alloc_scp(sc, sc->first_vty);
@@ -2928,7 +2928,7 @@ static scr_stat
/* assert(sc_malloc) */
- scp = (scr_stat *)malloc(sizeof(scr_stat), M_DEVBUF, M_WAITOK);
+ scp = (scr_stat *)malloc(sizeof(scr_stat), M_DEVBUF, 0);
init_scp(sc, vty, scp);
sc_alloc_scr_buffer(scp, TRUE, TRUE);
diff --git a/sys/dev/ti/if_ti.c b/sys/dev/ti/if_ti.c
index a384322..894ac43 100644
--- a/sys/dev/ti/if_ti.c
+++ b/sys/dev/ti/if_ti.c
@@ -1130,11 +1130,11 @@ ti_newbuf_std(sc, i, m)
struct ti_rx_desc *r;
if (m == NULL) {
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL)
return(ENOBUFS);
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (!(m_new->m_flags & M_EXT)) {
m_freem(m_new);
return(ENOBUFS);
@@ -1174,7 +1174,7 @@ ti_newbuf_mini(sc, i, m)
struct ti_rx_desc *r;
if (m == NULL) {
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL) {
return(ENOBUFS);
}
@@ -1218,7 +1218,7 @@ ti_newbuf_jumbo(sc, i, m)
caddr_t *buf = NULL;
/* Allocate the mbuf. */
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL) {
return(ENOBUFS);
}
@@ -1300,19 +1300,19 @@ ti_newbuf_jumbo(sc, idx, m_old)
}
} else {
/* Allocate the mbufs. */
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL) {
printf("ti%d: mbuf allocation failed "
"-- packet dropped!\n", sc->ti_unit);
goto nobufs;
}
- MGET(m[NPAYLOAD], M_DONTWAIT, MT_DATA);
+ MGET(m[NPAYLOAD], M_NOWAIT, MT_DATA);
if (m[NPAYLOAD] == NULL) {
printf("ti%d: cluster mbuf allocation failed "
"-- packet dropped!\n", sc->ti_unit);
goto nobufs;
}
- MCLGET(m[NPAYLOAD], M_DONTWAIT);
+ MCLGET(m[NPAYLOAD], M_NOWAIT);
if ((m[NPAYLOAD]->m_flags & M_EXT) == 0) {
printf("ti%d: mbuf allocation failed "
"-- packet dropped!\n", sc->ti_unit);
@@ -1321,7 +1321,7 @@ ti_newbuf_jumbo(sc, idx, m_old)
m[NPAYLOAD]->m_len = MCLBYTES;
for (i = 0; i < NPAYLOAD; i++){
- MGET(m[i], M_DONTWAIT, MT_DATA);
+ MGET(m[i], M_NOWAIT, MT_DATA);
if (m[i] == NULL) {
printf("ti%d: mbuf allocation failed "
"-- packet dropped!\n", sc->ti_unit);
diff --git a/sys/dev/trm/trm.c b/sys/dev/trm/trm.c
index e157cb1..8391123 100644
--- a/sys/dev/trm/trm.c
+++ b/sys/dev/trm/trm.c
@@ -2887,7 +2887,7 @@ trm_initACB(PACB pACB, u_int16_t unit)
for (j = 0; j < (pACB->max_lun +1); j++) {
pACB->scan_devices[i][j] = 1;
pACB->pDCB[i][j]= (PDCB) malloc (
- sizeof (struct _DCB), M_DEVBUF, M_WAITOK);
+ sizeof (struct _DCB), M_DEVBUF, 0);
trm_initDCB(pACB,
pACB->pDCB[i][j], unit, i, j);
TRM_DPRINTF("pDCB= %8x \n",
@@ -3292,7 +3292,7 @@ trm_attach(device_t pci_config_id)
* of the multi-channel controller.
* trm_action : sim_action_func
* trm_poll : sim_poll_func
- * "trm" : sim_name ,if sim_name = "xpt" ..M_DEVBUF,M_WAITOK
+ * "trm" : sim_name ,if sim_name = "xpt" ..M_DEVBUF,0
* pACB : *softc if sim_name <> "xpt" ..M_DEVBUF,M_NOWAIT
* pACB->unit : unit
* 1 : max_dev_transactions
diff --git a/sys/dev/twe/twe.c b/sys/dev/twe/twe.c
index 43df8e9..4284942 100644
--- a/sys/dev/twe/twe.c
+++ b/sys/dev/twe/twe.c
@@ -476,7 +476,7 @@ twe_ioctl(struct twe_softc *sc, int cmd, void *addr)
/* if there's a data buffer, allocate and copy it in */
tr->tr_length = tu->tu_size;
if (tr->tr_length > 0) {
- if ((tr->tr_data = malloc(tr->tr_length, M_DEVBUF, M_WAITOK)) == NULL) {
+ if ((tr->tr_data = malloc(tr->tr_length, M_DEVBUF, 0)) == NULL) {
error = ENOMEM;
goto cmd_done;
}
@@ -559,7 +559,7 @@ twe_ioctl(struct twe_softc *sc, int cmd, void *addr)
break;
case TWEIO_SET_PARAM:
- if ((data = malloc(tp->tp_size, M_DEVBUF, M_WAITOK)) == NULL) {
+ if ((data = malloc(tp->tp_size, M_DEVBUF, 0)) == NULL) {
error = ENOMEM;
} else {
error = copyin(tp->tp_data, data, tp->tp_size);
diff --git a/sys/dev/tx/if_tx.c b/sys/dev/tx/if_tx.c
index 189a69e..5a68719 100644
--- a/sys/dev/tx/if_tx.c
+++ b/sys/dev/tx/if_tx.c
@@ -577,7 +577,7 @@ epic_ifstart(ifp)
/* If packet was more than EPIC_MAX_FRAGS parts, */
/* recopy packet to new allocated mbuf cluster */
if( NULL != m ){
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if( NULL == m ){
m_freem(m0);
ifp->if_oerrors++;
@@ -652,7 +652,7 @@ epic_rx_done(sc)
m = buf->mbuf;
/* Try to get mbuf cluster */
- buf->mbuf = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ buf->mbuf = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if( NULL == buf->mbuf ) {
buf->mbuf = m;
desc->status = 0x8000;
@@ -1415,7 +1415,7 @@ epic_queue_last_packet(sc)
if ((desc->status & 0x8000) || (buf->mbuf != NULL))
return (EBUSY);
- MGETHDR(m0, M_DONTWAIT, MT_DATA);
+ MGETHDR(m0, M_NOWAIT, MT_DATA);
if (NULL == m0)
return (ENOBUFS);
@@ -1556,7 +1556,7 @@ epic_init_rings(sc)
return EFAULT;
}
- buf->mbuf = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ buf->mbuf = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if( NULL == buf->mbuf ) {
epic_free_rings(sc);
return ENOBUFS;
diff --git a/sys/dev/tx/if_txvar.h b/sys/dev/tx/if_txvar.h
index 16dc36d..465727f 100644
--- a/sys/dev/tx/if_txvar.h
+++ b/sys/dev/tx/if_txvar.h
@@ -134,9 +134,9 @@ struct epic_type {
/* Macro to get either mbuf cluster or nothing */
#define EPIC_MGETCLUSTER(m) \
- { MGETHDR((m),M_DONTWAIT,MT_DATA); \
+ { MGETHDR((m),M_NOWAIT,MT_DATA); \
if (m) { \
- MCLGET((m),M_DONTWAIT); \
+ MCLGET((m),M_NOWAIT); \
if( 0 == ((m)->m_flags & M_EXT) ) { \
m_freem(m); \
(m) = NULL; \
diff --git a/sys/dev/txp/if_txp.c b/sys/dev/txp/if_txp.c
index 7c4d74d..385c91d 100644
--- a/sys/dev/txp/if_txp.c
+++ b/sys/dev/txp/if_txp.c
@@ -768,13 +768,13 @@ txp_rx_reclaim(sc, r)
*/
struct mbuf *mnew;
- MGETHDR(mnew, M_DONTWAIT, MT_DATA);
+ MGETHDR(mnew, M_NOWAIT, MT_DATA);
if (mnew == NULL) {
m_freem(m);
goto next;
}
if (m->m_len > (MHLEN - 2)) {
- MCLGET(mnew, M_DONTWAIT);
+ MCLGET(mnew, M_NOWAIT);
if (!(mnew->m_flags & M_EXT)) {
m_freem(mnew);
m_freem(m);
@@ -847,11 +847,11 @@ txp_rxbuf_reclaim(sc)
if (sd->sd_mbuf != NULL)
break;
- MGETHDR(sd->sd_mbuf, M_DONTWAIT, MT_DATA);
+ MGETHDR(sd->sd_mbuf, M_NOWAIT, MT_DATA);
if (sd->sd_mbuf == NULL)
goto err_sd;
- MCLGET(sd->sd_mbuf, M_DONTWAIT);
+ MCLGET(sd->sd_mbuf, M_NOWAIT);
if ((sd->sd_mbuf->m_flags & M_EXT) == 0)
goto err_mbuf;
sd->sd_mbuf->m_pkthdr.rcvif = ifp;
@@ -1142,11 +1142,11 @@ txp_rxring_fill(sc)
for (i = 0; i < RXBUF_ENTRIES; i++) {
sd = sc->sc_rxbufs[i].rb_sd;
- MGETHDR(sd->sd_mbuf, M_DONTWAIT, MT_DATA);
+ MGETHDR(sd->sd_mbuf, M_NOWAIT, MT_DATA);
if (sd->sd_mbuf == NULL)
return(ENOBUFS);
- MCLGET(sd->sd_mbuf, M_DONTWAIT);
+ MCLGET(sd->sd_mbuf, M_NOWAIT);
if ((sd->sd_mbuf->m_flags & M_EXT) == 0) {
m_freem(sd->sd_mbuf);
return(ENOBUFS);
diff --git a/sys/dev/ubsec/ubsec.c b/sys/dev/ubsec/ubsec.c
index 06600ed..b18acfd 100644
--- a/sys/dev/ubsec/ubsec.c
+++ b/sys/dev/ubsec/ubsec.c
@@ -1328,14 +1328,14 @@ ubsec_process(void *arg, struct cryptop *crp, int hint)
totlen = q->q_src_mapsize;
if (q->q_src_m->m_flags & M_PKTHDR) {
len = MHLEN;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
- if (m && !m_dup_pkthdr(m, q->q_src_m, M_DONTWAIT)) {
+ MGETHDR(m, M_NOWAIT, MT_DATA);
+ if (m && !m_dup_pkthdr(m, q->q_src_m, M_NOWAIT)) {
m_free(m);
m = NULL;
}
} else {
len = MLEN;
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
}
if (m == NULL) {
ubsecstats.hst_nombuf++;
@@ -1343,7 +1343,7 @@ ubsec_process(void *arg, struct cryptop *crp, int hint)
goto errout;
}
if (totlen >= MINCLSIZE) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
m_free(m);
ubsecstats.hst_nomcl++;
@@ -1358,7 +1358,7 @@ ubsec_process(void *arg, struct cryptop *crp, int hint)
while (totlen > 0) {
if (top) {
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
m_freem(top);
ubsecstats.hst_nombuf++;
@@ -1368,7 +1368,7 @@ ubsec_process(void *arg, struct cryptop *crp, int hint)
len = MLEN;
}
if (top && totlen >= MINCLSIZE) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
*mp = m;
m_freem(top);
diff --git a/sys/dev/usb/hid.c b/sys/dev/usb/hid.c
index b37a5d0..d5484a8 100644
--- a/sys/dev/usb/hid.c
+++ b/sys/dev/usb/hid.c
@@ -96,7 +96,7 @@ hid_start_parse(void *d, int len, int kindset)
{
struct hid_data *s;
- s = malloc(sizeof *s, M_TEMP, M_WAITOK|M_ZERO);
+ s = malloc(sizeof *s, M_TEMP, M_ZERO);
s->start = s->p = d;
s->end = (char *)d + len;
s->kindset = kindset;
@@ -288,7 +288,7 @@ hid_get_item(struct hid_data *s, struct hid_item *h)
c->loc.count = dval;
break;
case 10: /* Push */
- hi = malloc(sizeof *hi, M_TEMP, M_WAITOK);
+ hi = malloc(sizeof *hi, M_TEMP, 0);
*hi = s->cur;
c->next = hi;
break;
diff --git a/sys/dev/usb/if_aue.c b/sys/dev/usb/if_aue.c
index fa80dd6..94903c4 100644
--- a/sys/dev/usb/if_aue.c
+++ b/sys/dev/usb/if_aue.c
@@ -812,14 +812,14 @@ aue_newbuf(struct aue_softc *sc, struct aue_chain *c, struct mbuf *m)
struct mbuf *m_new = NULL;
if (m == NULL) {
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL) {
printf("aue%d: no memory for rx list "
"-- packet dropped!\n", sc->aue_unit);
return (ENOBUFS);
}
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (!(m_new->m_flags & M_EXT)) {
printf("aue%d: no memory for rx list "
"-- packet dropped!\n", sc->aue_unit);
diff --git a/sys/dev/usb/if_cue.c b/sys/dev/usb/if_cue.c
index 8748a83..a669e97 100644
--- a/sys/dev/usb/if_cue.c
+++ b/sys/dev/usb/if_cue.c
@@ -568,14 +568,14 @@ cue_newbuf(struct cue_softc *sc, struct cue_chain *c, struct mbuf *m)
struct mbuf *m_new = NULL;
if (m == NULL) {
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL) {
printf("cue%d: no memory for rx list "
"-- packet dropped!\n", sc->cue_unit);
return(ENOBUFS);
}
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (!(m_new->m_flags & M_EXT)) {
printf("cue%d: no memory for rx list "
"-- packet dropped!\n", sc->cue_unit);
diff --git a/sys/dev/usb/if_kue.c b/sys/dev/usb/if_kue.c
index 767d6fa..3f51b5a 100644
--- a/sys/dev/usb/if_kue.c
+++ b/sys/dev/usb/if_kue.c
@@ -542,14 +542,14 @@ kue_newbuf(struct kue_softc *sc, struct kue_chain *c, struct mbuf *m)
struct mbuf *m_new = NULL;
if (m == NULL) {
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL) {
printf("kue%d: no memory for rx list "
"-- packet dropped!\n", sc->kue_unit);
return(ENOBUFS);
}
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (!(m_new->m_flags & M_EXT)) {
printf("kue%d: no memory for rx list "
"-- packet dropped!\n", sc->kue_unit);
diff --git a/sys/dev/usb/ubsa.c b/sys/dev/usb/ubsa.c
index 60ebd4c..81915d3 100644
--- a/sys/dev/usb/ubsa.c
+++ b/sys/dev/usb/ubsa.c
@@ -278,7 +278,7 @@ USB_ATTACH(ubsa)
int i;
dev = uaa->device;
- devinfo = malloc(1024, M_USBDEV, M_WAITOK);
+ devinfo = malloc(1024, M_USBDEV, 0);
ucom = &sc->sc_ucom;
bzero(sc, sizeof (struct ubsa_softc));
@@ -643,7 +643,7 @@ ubsa_open(void *addr, int portno)
DPRINTF(("ubsa_open: sc = %p\n", sc));
if (sc->sc_intr_number != -1 && sc->sc_intr_pipe == NULL) {
- sc->sc_intr_buf = malloc(sc->sc_isize, M_USBDEV, M_WAITOK);
+ sc->sc_intr_buf = malloc(sc->sc_isize, M_USBDEV, 0);
err = usbd_open_pipe_intr(sc->sc_intr_iface,
sc->sc_intr_number,
USBD_SHORT_XFER_OK,
diff --git a/sys/dev/usb/udbp.c b/sys/dev/usb/udbp.c
index a0519da..77f4b1d 100644
--- a/sys/dev/usb/udbp.c
+++ b/sys/dev/usb/udbp.c
@@ -326,11 +326,11 @@ USB_ATTACH(udbp)
if (!sc->sc_bulkout_xfer) {
goto bad;
}
- sc->sc_bulkin_buffer = malloc(UDBP_BUFFERSIZE, M_USBDEV, M_WAITOK);
+ sc->sc_bulkin_buffer = malloc(UDBP_BUFFERSIZE, M_USBDEV, 0);
if (!sc->sc_bulkin_buffer) {
goto bad;
}
- sc->sc_bulkout_buffer = malloc(UDBP_BUFFERSIZE, M_USBDEV, M_WAITOK);
+ sc->sc_bulkout_buffer = malloc(UDBP_BUFFERSIZE, M_USBDEV, 0);
if (!sc->sc_bulkout_xfer || !sc->sc_bulkout_buffer) {
goto bad;
}
diff --git a/sys/dev/usb/uftdi.c b/sys/dev/usb/uftdi.c
index d400ff8..fb24459 100644
--- a/sys/dev/usb/uftdi.c
+++ b/sys/dev/usb/uftdi.c
@@ -171,7 +171,7 @@ USB_ATTACH(uftdi)
usbd_status err;
struct ucom_softc *ucom = &sc->sc_ucom;
DPRINTFN(10,("\nuftdi_attach: sc=%p\n", sc));
- devinfo = malloc(1024, M_USBDEV, M_WAITOK);
+ devinfo = malloc(1024, M_USBDEV, 0);
ucom->sc_dev = self;
ucom->sc_udev = dev;
diff --git a/sys/dev/usb/ugen.c b/sys/dev/usb/ugen.c
index fb2b46a..06bbadd 100644
--- a/sys/dev/usb/ugen.c
+++ b/sys/dev/usb/ugen.c
@@ -422,7 +422,7 @@ ugenopen(dev_t dev, int flag, int mode, usb_proc_ptr p)
isize = UGETW(edesc->wMaxPacketSize);
if (isize == 0) /* shouldn't happen */
return (EINVAL);
- sce->ibuf = malloc(isize, M_USBDEV, M_WAITOK);
+ sce->ibuf = malloc(isize, M_USBDEV, 0);
DPRINTFN(5, ("ugenopen: intr endpt=%d,isize=%d\n",
endpt, isize));
if (clalloc(&sce->q, UGEN_IBSIZE, 0) == -1)
@@ -452,7 +452,7 @@ ugenopen(dev_t dev, int flag, int mode, usb_proc_ptr p)
if (isize == 0) /* shouldn't happen */
return (EINVAL);
sce->ibuf = malloc(isize * UGEN_NISOFRAMES,
- M_USBDEV, M_WAITOK);
+ M_USBDEV, 0);
sce->cur = sce->fill = sce->ibuf;
sce->limit = sce->ibuf + isize * UGEN_NISOFRAMES;
DPRINTFN(5, ("ugenopen: isoc endpt=%d, isize=%d\n",
@@ -1042,7 +1042,7 @@ ugen_get_cdesc(struct ugen_softc *sc, int index, int *lenp)
len = UGETW(tdesc->wTotalLength);
if (lenp)
*lenp = len;
- cdesc = malloc(len, M_TEMP, M_WAITOK);
+ cdesc = malloc(len, M_TEMP, 0);
memcpy(cdesc, tdesc, len);
DPRINTFN(5,("ugen_get_cdesc: current, len=%d\n", len));
} else {
@@ -1053,7 +1053,7 @@ ugen_get_cdesc(struct ugen_softc *sc, int index, int *lenp)
DPRINTFN(5,("ugen_get_cdesc: index=%d, len=%d\n", index, len));
if (lenp)
*lenp = len;
- cdesc = malloc(len, M_TEMP, M_WAITOK);
+ cdesc = malloc(len, M_TEMP, 0);
err = usbd_get_config_desc_full(sc->sc_udev, index, cdesc, len);
if (err) {
free(cdesc, M_TEMP);
@@ -1307,7 +1307,7 @@ ugen_do_ioctl(struct ugen_softc *sc, int endpt, u_long cmd,
ur->ucr_request.bmRequestType & UT_READ ?
UIO_READ : UIO_WRITE;
uio.uio_procp = p;
- ptr = malloc(len, M_TEMP, M_WAITOK);
+ ptr = malloc(len, M_TEMP, 0);
if (uio.uio_rw == UIO_WRITE) {
error = uiomove(ptr, len, &uio);
if (error)
diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c
index 68a8070..228b352 100644
--- a/sys/dev/usb/uhci.c
+++ b/sys/dev/usb/uhci.c
@@ -2529,7 +2529,7 @@ uhci_setup_isoc(usbd_pipe_handle pipe)
iso = &upipe->u.iso;
iso->stds = malloc(UHCI_VFRAMELIST_COUNT * sizeof (uhci_soft_td_t *),
- M_USBHC, M_WAITOK);
+ M_USBHC, 0);
token = rd ? UHCI_TD_IN (0, endpt, addr, 0) :
UHCI_TD_OUT(0, endpt, addr, 0);
@@ -2775,7 +2775,7 @@ uhci_device_setintr(uhci_softc_t *sc, struct uhci_pipe *upipe, int ival)
upipe->u.intr.npoll = npoll;
upipe->u.intr.qhs =
- malloc(npoll * sizeof(uhci_soft_qh_t *), M_USBHC, M_WAITOK);
+ malloc(npoll * sizeof(uhci_soft_qh_t *), M_USBHC, 0);
/*
* Figure out which offset in the schedule that has most
diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c
index 2570aa1..ad8862e 100644
--- a/sys/dev/usb/uhid.c
+++ b/sys/dev/usb/uhid.c
@@ -418,8 +418,8 @@ uhidopen(dev_t dev, int flag, int mode, usb_proc_ptr p)
return (ENOMEM);
}
- sc->sc_ibuf = malloc(sc->sc_isize, M_USBDEV, M_WAITOK);
- sc->sc_obuf = malloc(sc->sc_osize, M_USBDEV, M_WAITOK);
+ sc->sc_ibuf = malloc(sc->sc_isize, M_USBDEV, 0);
+ sc->sc_obuf = malloc(sc->sc_osize, M_USBDEV, 0);
/* Set up interrupt pipe. */
err = usbd_open_pipe_intr(sc->sc_iface, sc->sc_ep_addr,
diff --git a/sys/dev/usb/umass.c b/sys/dev/usb/umass.c
index 4fce190..1e4d51b 100644
--- a/sys/dev/usb/umass.c
+++ b/sys/dev/usb/umass.c
@@ -2113,7 +2113,7 @@ umass_cam_rescan(void *addr)
struct umass_softc *sc = (struct umass_softc *) addr;
#endif
struct cam_path *path;
- union ccb *ccb = malloc(sizeof(union ccb), M_USBDEV, M_WAITOK);
+ union ccb *ccb = malloc(sizeof(union ccb), M_USBDEV, 0);
memset(ccb, 0, sizeof(union ccb));
diff --git a/sys/dev/usb/umodem.c b/sys/dev/usb/umodem.c
index 30e337d..d6bbfc5 100644
--- a/sys/dev/usb/umodem.c
+++ b/sys/dev/usb/umodem.c
@@ -247,7 +247,7 @@ USB_ATTACH(umodem)
int i;
struct ucom_softc *ucom;
- devinfo = malloc(1024, M_USBDEV, M_WAITOK);
+ devinfo = malloc(1024, M_USBDEV, 0);
usbd_devinfo(dev, 0, devinfo);
ucom = &sc->sc_ucom;
ucom->sc_dev = self;
diff --git a/sys/dev/usb/uplcom.c b/sys/dev/usb/uplcom.c
index cc017c8..e576f9c 100644
--- a/sys/dev/usb/uplcom.c
+++ b/sys/dev/usb/uplcom.c
@@ -260,7 +260,7 @@ USB_ATTACH(uplcom)
usbd_status err;
int i;
- devinfo = malloc(1024, M_USBDEV, M_WAITOK);
+ devinfo = malloc(1024, M_USBDEV, 0);
ucom = &sc->sc_ucom;
bzero(sc, sizeof (struct uplcom_softc));
@@ -685,7 +685,7 @@ uplcom_open(void *addr, int portno)
if (sc->sc_intr_number != -1 && sc->sc_intr_pipe == NULL) {
sc->sc_status = 0; /* clear status bit */
- sc->sc_intr_buf = malloc(sc->sc_isize, M_USBDEV, M_WAITOK);
+ sc->sc_intr_buf = malloc(sc->sc_isize, M_USBDEV, 0);
err = usbd_open_pipe_intr(sc->sc_intr_iface,
sc->sc_intr_number,
USBD_SHORT_XFER_OK,
diff --git a/sys/dev/usb/urio.c b/sys/dev/usb/urio.c
index ba9ca84..d0eb1fa 100644
--- a/sys/dev/usb/urio.c
+++ b/sys/dev/usb/urio.c
@@ -552,7 +552,7 @@ urioioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, usb_proc_ptr p)
req.bmRequestType & UT_READ ?
UIO_READ : UIO_WRITE;
uio.uio_procp = p;
- ptr = malloc(len, M_TEMP, M_WAITOK);
+ ptr = malloc(len, M_TEMP, 0);
if (uio.uio_rw == UIO_WRITE) {
error = uiomove(ptr, len, &uio);
if (error)
diff --git a/sys/dev/usb/usb.c b/sys/dev/usb/usb.c
index 21127d6..4e9483c 100644
--- a/sys/dev/usb/usb.c
+++ b/sys/dev/usb/usb.c
@@ -596,7 +596,7 @@ usbioctl(dev_t devt, u_long cmd, caddr_t data, int flag, usb_proc_ptr p)
ur->ucr_request.bmRequestType & UT_READ ?
UIO_READ : UIO_WRITE;
uio.uio_procp = p;
- ptr = malloc(len, M_TEMP, M_WAITOK);
+ ptr = malloc(len, M_TEMP, 0);
if (uio.uio_rw == UIO_WRITE) {
error = uiomove(ptr, len, &uio);
if (error)
@@ -774,7 +774,7 @@ usb_add_event(int type, struct usb_event *uep)
struct timeval thetime;
int s;
- ueq = malloc(sizeof *ueq, M_USBDEV, M_WAITOK);
+ ueq = malloc(sizeof *ueq, M_USBDEV, 0);
ueq->ue = *uep;
ueq->ue.ue_type = type;
microtime(&thetime);
diff --git a/sys/dev/usb/uscanner.c b/sys/dev/usb/uscanner.c
index 98e2177..545f673 100644
--- a/sys/dev/usb/uscanner.c
+++ b/sys/dev/usb/uscanner.c
@@ -383,8 +383,8 @@ uscanneropen(dev_t dev, int flag, int mode, usb_proc_ptr p)
sc->sc_state |= USCANNER_OPEN;
- sc->sc_bulkin_buffer = malloc(USCANNER_BUFFERSIZE, M_USBDEV, M_WAITOK);
- sc->sc_bulkout_buffer = malloc(USCANNER_BUFFERSIZE, M_USBDEV, M_WAITOK);
+ sc->sc_bulkin_buffer = malloc(USCANNER_BUFFERSIZE, M_USBDEV, 0);
+ sc->sc_bulkout_buffer = malloc(USCANNER_BUFFERSIZE, M_USBDEV, 0);
/* No need to check buffers for NULL since we have WAITOK */
sc->sc_bulkin_bufferlen = USCANNER_BUFFERSIZE;
diff --git a/sys/dev/usb/uvisor.c b/sys/dev/usb/uvisor.c
index 0cffd86..1ea97d9 100644
--- a/sys/dev/usb/uvisor.c
+++ b/sys/dev/usb/uvisor.c
@@ -233,7 +233,7 @@ USB_ATTACH(uvisor)
usbd_status err;
struct ucom_softc *ucom;
- devinfo = malloc(1024, M_USBDEV, M_WAITOK);
+ devinfo = malloc(1024, M_USBDEV, 0);
ucom = &sc->sc_ucom;
bzero(sc, sizeof (struct uvisor_softc));
diff --git a/sys/dev/usb/uvscom.c b/sys/dev/usb/uvscom.c
index 2db196a..0c0acd2 100644
--- a/sys/dev/usb/uvscom.c
+++ b/sys/dev/usb/uvscom.c
@@ -261,7 +261,7 @@ USB_ATTACH(uvscom)
usbd_status err;
int i;
- devinfo = malloc(1024, M_USBDEV, M_WAITOK);
+ devinfo = malloc(1024, M_USBDEV, 0);
ucom = &sc->sc_ucom;
bzero(sc, sizeof (struct uvscom_softc));
@@ -724,7 +724,7 @@ uvscom_open(void *addr, int portno)
return (ENXIO);
}
- sc->sc_intr_buf = malloc(sc->sc_isize, M_USBDEV, M_WAITOK);
+ sc->sc_intr_buf = malloc(sc->sc_isize, M_USBDEV, 0);
err = usbd_open_pipe_intr(sc->sc_ucom.sc_iface,
sc->sc_intr_number,
USBD_SHORT_XFER_OK,
diff --git a/sys/dev/vinum/vinumext.h b/sys/dev/vinum/vinumext.h
index 3c6bbad..a8af0cd 100644
--- a/sys/dev/vinum/vinumext.h
+++ b/sys/dev/vinum/vinumext.h
@@ -245,7 +245,7 @@ void FFree(void *mem, char *, int);
#define LOCKDRIVE(d) lockdrive (d, __FILE__, __LINE__)
#else
#define Malloc(x) malloc((x), M_DEVBUF, \
- curthread->td_proc->p_intr_nesting_level == 0? M_WAITOK: M_NOWAIT)
+ curthread->td_proc->p_intr_nesting_level == 0? 0: M_NOWAIT)
#define Free(x) free((x), M_DEVBUF)
#define LOCKDRIVE(d) lockdrive (d)
#endif
diff --git a/sys/dev/vinum/vinummemory.c b/sys/dev/vinum/vinummemory.c
index 6936e48..cedcbfb 100644
--- a/sys/dev/vinum/vinummemory.c
+++ b/sys/dev/vinum/vinummemory.c
@@ -152,7 +152,7 @@ MMalloc(int size, char *file, int line)
/* Wait for malloc if we can */
result = malloc(size,
M_DEVBUF,
- curthread->td_intr_nesting_level == 0 ? M_WAITOK : M_NOWAIT);
+ curthread->td_intr_nesting_level == 0 ? 0 : M_NOWAIT);
if (result == NULL)
log(LOG_ERR, "vinum: can't allocate %d bytes from %s:%d\n", size, file, line);
else {
diff --git a/sys/dev/vr/if_vr.c b/sys/dev/vr/if_vr.c
index 407abf1..01b1992 100644
--- a/sys/dev/vr/if_vr.c
+++ b/sys/dev/vr/if_vr.c
@@ -948,11 +948,11 @@ vr_newbuf(sc, c, m)
struct mbuf *m_new = NULL;
if (m == NULL) {
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL)
return(ENOBUFS);
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (!(m_new->m_flags & M_EXT)) {
m_freem(m_new);
return(ENOBUFS);
@@ -1292,13 +1292,13 @@ vr_encap(sc, c, m_head)
if (m != NULL) {
struct mbuf *m_new = NULL;
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL) {
printf("vr%d: no memory for tx list\n", sc->vr_unit);
return(1);
}
if (m_head->m_pkthdr.len > MHLEN) {
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (!(m_new->m_flags & M_EXT)) {
m_freem(m_new);
printf("vr%d: no memory for tx list\n",
diff --git a/sys/dev/vx/if_vx.c b/sys/dev/vx/if_vx.c
index 143a821..d86fab8 100644
--- a/sys/dev/vx/if_vx.c
+++ b/sys/dev/vx/if_vx.c
@@ -761,7 +761,7 @@ vxget(sc, totlen)
m = sc->mb[sc->next_mb];
sc->mb[sc->next_mb] = 0;
if (m == 0) {
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == 0)
return 0;
} else {
@@ -800,7 +800,7 @@ vxget(sc, totlen)
m = sc->mb[sc->next_mb];
sc->mb[sc->next_mb] = 0;
if (m == 0) {
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (m == 0) {
splx(sh);
m_freem(top);
@@ -812,7 +812,7 @@ vxget(sc, totlen)
len = MLEN;
}
if (totlen >= MINCLSIZE) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if (m->m_flags & M_EXT)
len = MCLBYTES;
}
@@ -993,7 +993,7 @@ vxmbuffill(sp)
i = sc->last_mb;
do {
if (sc->mb[i] == NULL)
- MGET(sc->mb[i], M_DONTWAIT, MT_DATA);
+ MGET(sc->mb[i], M_NOWAIT, MT_DATA);
if (sc->mb[i] == NULL)
break;
i = (i + 1) % MAX_MBS;
diff --git a/sys/dev/wi/if_wi.c b/sys/dev/wi/if_wi.c
index 5d469a1..fb2a214 100644
--- a/sys/dev/wi/if_wi.c
+++ b/sys/dev/wi/if_wi.c
@@ -915,9 +915,9 @@ wi_start(struct ifnet *ifp)
if (sc->sc_drvbpf) {
struct mbuf *mb;
- MGETHDR(mb, M_DONTWAIT, m0->m_type);
+ MGETHDR(mb, M_NOWAIT, m0->m_type);
if (mb != NULL) {
- (void) m_dup_pkthdr(mb, m0, M_DONTWAIT);
+ (void) m_dup_pkthdr(mb, m0, M_NOWAIT);
mb->m_next = m0;
mb->m_data = (caddr_t)&frmhdr;
mb->m_len = sizeof(frmhdr);
@@ -1344,7 +1344,7 @@ wi_rx_intr(struct wi_softc *sc)
len = le16toh(frmhdr.wi_dat_len);
off = ALIGN(sizeof(struct ieee80211_frame));
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
CSR_WRITE_2(sc, WI_EVENT_ACK, WI_EV_RX);
ifp->if_ierrors++;
@@ -1352,7 +1352,7 @@ wi_rx_intr(struct wi_softc *sc)
return;
}
if (off + len > MHLEN) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
CSR_WRITE_2(sc, WI_EVENT_ACK, WI_EV_RX);
m_freem(m);
@@ -1375,9 +1375,9 @@ wi_rx_intr(struct wi_softc *sc)
if (sc->sc_drvbpf) {
struct mbuf *mb;
- MGETHDR(mb, M_DONTWAIT, m->m_type);
+ MGETHDR(mb, M_NOWAIT, m->m_type);
if (mb != NULL) {
- (void) m_dup_pkthdr(mb, m, M_DONTWAIT);
+ (void) m_dup_pkthdr(mb, m, M_NOWAIT);
mb->m_next = m;
mb->m_data = (caddr_t)&frmhdr;
mb->m_len = sizeof(frmhdr);
diff --git a/sys/dev/wl/if_wl.c b/sys/dev/wl/if_wl.c
index dfaca89..4b44fa3 100644
--- a/sys/dev/wl/if_wl.c
+++ b/sys/dev/wl/if_wl.c
@@ -966,7 +966,7 @@ wlread(int unit, u_short fd_p)
/*
* Allocate a cluster'd mbuf to receive the packet.
*/
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL) {
if (wlhwrst(unit) != TRUE) {
sc->hacr &= ~HACR_INTRON;
diff --git a/sys/dev/xe/if_xe.c b/sys/dev/xe/if_xe.c
index 6ba4de4..8cd29d1 100644
--- a/sys/dev/xe/if_xe.c
+++ b/sys/dev/xe/if_xe.c
@@ -643,7 +643,7 @@ xe_intr(void *xscp)
if (len & 0x01)
len++;
- MGETHDR(mbp, M_DONTWAIT, MT_DATA); /* Allocate a header mbuf */
+ MGETHDR(mbp, M_NOWAIT, MT_DATA); /* Allocate a header mbuf */
if (mbp != NULL) {
mbp->m_pkthdr.rcvif = ifp;
mbp->m_pkthdr.len = mbp->m_len = len;
@@ -654,7 +654,7 @@ xe_intr(void *xscp)
* alignment hack below.
*/
if (len + 2 > MHLEN) {
- MCLGET(mbp, M_DONTWAIT);
+ MCLGET(mbp, M_NOWAIT);
if ((mbp->m_flags & M_EXT) == 0) {
m_freem(mbp);
mbp = NULL;
diff --git a/sys/fs/cd9660/cd9660_vfsops.c b/sys/fs/cd9660/cd9660_vfsops.c
index a44df4c..f916117 100644
--- a/sys/fs/cd9660/cd9660_vfsops.c
+++ b/sys/fs/cd9660/cd9660_vfsops.c
@@ -411,7 +411,7 @@ iso_mountfs(devvp, mp, td, argp)
pri_sierra->root_directory_record:
pri->root_directory_record);
- isomp = malloc(sizeof *isomp, M_ISOFSMNT, M_WAITOK | M_ZERO);
+ isomp = malloc(sizeof *isomp, M_ISOFSMNT, M_ZERO);
isomp->logical_block_size = logical_block_size;
isomp->volume_space_size =
isonum_733 (high_sierra?
@@ -712,7 +712,7 @@ cd9660_vget_internal(mp, ino, flags, vpp, relocated, isodir)
return (error);
}
MALLOC(ip, struct iso_node *, sizeof(struct iso_node), M_ISOFSNODE,
- M_WAITOK | M_ZERO);
+ M_ZERO);
vp->v_data = ip;
ip->i_vnode = vp;
ip->i_dev = dev;
diff --git a/sys/fs/cd9660/cd9660_vnops.c b/sys/fs/cd9660/cd9660_vnops.c
index 0b892e6..062c22a 100644
--- a/sys/fs/cd9660/cd9660_vnops.c
+++ b/sys/fs/cd9660/cd9660_vnops.c
@@ -194,7 +194,7 @@ cd9660_getattr(ap)
struct uio auio;
char *cp;
- MALLOC(cp, char *, MAXPATHLEN, M_TEMP, M_WAITOK);
+ MALLOC(cp, char *, MAXPATHLEN, M_TEMP, 0);
aiov.iov_base = cp;
aiov.iov_len = MAXPATHLEN;
auio.uio_iov = &aiov;
@@ -451,7 +451,7 @@ cd9660_readdir(ap)
imp = dp->i_mnt;
bmask = imp->im_bmask;
- MALLOC(idp, struct isoreaddir *, sizeof(*idp), M_TEMP, M_WAITOK);
+ MALLOC(idp, struct isoreaddir *, sizeof(*idp), M_TEMP, 0);
idp->saveent.d_namlen = idp->assocent.d_namlen = 0;
/*
* XXX
@@ -468,7 +468,7 @@ cd9660_readdir(ap)
*/
ncookies = uio->uio_resid / 16;
MALLOC(cookies, u_long *, ncookies * sizeof(u_int), M_TEMP,
- M_WAITOK);
+ 0);
idp->cookies = cookies;
idp->ncookies = ncookies;
}
@@ -671,7 +671,7 @@ cd9660_readlink(ap)
if (uio->uio_segflg == UIO_SYSSPACE)
symname = uio->uio_iov->iov_base;
else
- symname = uma_zalloc(namei_zone, M_WAITOK);
+ symname = uma_zalloc(namei_zone, 0);
/*
* Ok, we just gathering a symbolic name in SL record.
diff --git a/sys/fs/coda/cnode.h b/sys/fs/coda/cnode.h
index 962d329..8d0cebe 100644
--- a/sys/fs/coda/cnode.h
+++ b/sys/fs/coda/cnode.h
@@ -66,7 +66,7 @@ MALLOC_DECLARE(M_CODA);
#define CODA_ALLOC(ptr, cast, size) \
do { \
- ptr = (cast)malloc((unsigned long) size, M_CODA, M_WAITOK); \
+ ptr = (cast)malloc((unsigned long) size, M_CODA, 0); \
if (ptr == 0) { \
panic("kernel malloc returns 0 at %s:%d\n", __FILE__, __LINE__); \
} \
diff --git a/sys/fs/devfs/devfs_devs.c b/sys/fs/devfs/devfs_devs.c
index 3b9a1bb..dfd7120 100644
--- a/sys/fs/devfs/devfs_devs.c
+++ b/sys/fs/devfs/devfs_devs.c
@@ -153,11 +153,11 @@ devfs_attemptoverflow(int insist)
or = NULL;
n = devfs_noverflowwant;
nb = sizeof (dev_t *) * n;
- MALLOC(ot, dev_t **, nb, M_DEVFS, (insist ? M_WAITOK : M_NOWAIT) | M_ZERO);
+ MALLOC(ot, dev_t **, nb, M_DEVFS, (insist ? 0 : M_NOWAIT) | M_ZERO);
if (ot == NULL)
goto bail;
nb = sizeof (int) * n;
- MALLOC(or, int *, nb, M_DEVFS, (insist ? M_WAITOK : M_NOWAIT) | M_ZERO);
+ MALLOC(or, int *, nb, M_DEVFS, (insist ? 0 : M_NOWAIT) | M_ZERO);
if (or == NULL)
goto bail;
if (!atomic_cmpset_ptr(&devfs_overflow, NULL, ot))
@@ -200,7 +200,7 @@ devfs_newdirent(char *name, int namelen)
d.d_namlen = namelen;
i = sizeof (*de) + GENERIC_DIRSIZ(&d);
- MALLOC(de, struct devfs_dirent *, i, M_DEVFS, M_WAITOK | M_ZERO);
+ MALLOC(de, struct devfs_dirent *, i, M_DEVFS, M_ZERO);
de->de_dirent = (struct dirent *)(de + 1);
de->de_dirent->d_namlen = namelen;
de->de_dirent->d_reclen = GENERIC_DIRSIZ(&d);
@@ -295,7 +295,7 @@ devfs_populate(struct devfs_mount *dm)
if (devfs_noverflow && dm->dm_overflow == NULL) {
i = devfs_noverflow * sizeof (struct devfs_dirent *);
MALLOC(dm->dm_overflow, struct devfs_dirent **, i,
- M_DEVFS, M_WAITOK | M_ZERO);
+ M_DEVFS, M_ZERO);
}
while (dm->dm_generation != devfs_generation) {
dm->dm_generation = devfs_generation;
@@ -353,7 +353,7 @@ devfs_populate(struct devfs_mount *dm)
de->de_dirent->d_type = DT_LNK;
pdev = dev->si_parent;
j = strlen(pdev->si_name) + 1;
- MALLOC(de->de_symlink, char *, j, M_DEVFS, M_WAITOK);
+ MALLOC(de->de_symlink, char *, j, M_DEVFS, 0);
bcopy(pdev->si_name, de->de_symlink, j);
} else {
de->de_inode = i;
diff --git a/sys/fs/devfs/devfs_rule.c b/sys/fs/devfs/devfs_rule.c
index f9787d5..34dd327 100644
--- a/sys/fs/devfs/devfs_rule.c
+++ b/sys/fs/devfs/devfs_rule.c
@@ -223,7 +223,7 @@ devfs_rules_ioctl(struct mount *mp, u_long cmd, caddr_t data, struct thread *td)
error = ESRCH;
goto out;
}
- dk = malloc(sizeof(*dk), M_TEMP, M_WAITOK | M_ZERO);
+ dk = malloc(sizeof(*dk), M_TEMP, M_ZERO);
memcpy(&dk->dk_rule, dr, sizeof(*dr));
lockmgr(&dm->dm_lock, LK_UPGRADE, 0, td);
devfs_rule_applydm(dk, dm);
@@ -557,7 +557,7 @@ devfs_rule_insert(struct devfs_rule *dr)
return (error);
}
- dk = malloc(sizeof(*dk), M_DEVFS, M_WAITOK);
+ dk = malloc(sizeof(*dk), M_DEVFS, 0);
dk->dk_ruleset = ds;
if (dsi != NULL)
++dsi->ds_refcount;
@@ -750,7 +750,7 @@ devfs_ruleset_create(devfs_rsnum rsnum)
KASSERT(devfs_ruleset_bynum(rsnum) == NULL,
("creating already existent ruleset %d", rsnum));
- ds = malloc(sizeof(*ds), M_DEVFS, M_WAITOK | M_ZERO);
+ ds = malloc(sizeof(*ds), M_DEVFS, M_ZERO);
ds->ds_number = rsnum;
ds->ds_refcount = ds->ds_flags = 0;
SLIST_INIT(&ds->ds_rules);
diff --git a/sys/fs/devfs/devfs_vfsops.c b/sys/fs/devfs/devfs_vfsops.c
index e74b4e9..4c32ffa 100644
--- a/sys/fs/devfs/devfs_vfsops.c
+++ b/sys/fs/devfs/devfs_vfsops.c
@@ -78,10 +78,10 @@ devfs_nmount(mp, ndp, td)
return (EOPNOTSUPP);
MALLOC(fmp, struct devfs_mount *, sizeof(struct devfs_mount),
- M_DEVFS, M_WAITOK | M_ZERO);
+ M_DEVFS, M_ZERO);
MALLOC(fmp->dm_dirent, struct devfs_dirent **,
sizeof(struct devfs_dirent *) * NDEVFSINO,
- M_DEVFS, M_WAITOK | M_ZERO);
+ M_DEVFS, M_ZERO);
lockinit(&fmp->dm_lock, PVFS, "devfs", 0, LK_NOPAUSE);
mp->mnt_flag |= MNT_LOCAL;
diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c
index 6f466ad..16d40a3 100644
--- a/sys/fs/devfs/devfs_vnops.c
+++ b/sys/fs/devfs/devfs_vnops.c
@@ -608,7 +608,7 @@ devfs_readdir(ap)
}
if( !error && ap->a_ncookies != NULL && ap->a_cookies != NULL ) {
MALLOC(cookiebuf, u_long *, ncookies * sizeof(u_long),
- M_TEMP, M_WAITOK);
+ M_TEMP, 0);
cookiep = cookiebuf;
dps = (struct dirent *)((char *)uio->uio_iov->iov_base -
(uio->uio_offset - oldoff));
@@ -859,7 +859,7 @@ devfs_symlink(ap)
de->de_inode = dmp->dm_inode++;
de->de_dirent->d_type = DT_LNK;
i = strlen(ap->a_target) + 1;
- MALLOC(de->de_symlink, char *, i, M_DEVFS, M_WAITOK);
+ MALLOC(de->de_symlink, char *, i, M_DEVFS, 0);
bcopy(ap->a_target, de->de_symlink, i);
lockmgr(&dmp->dm_lock, LK_EXCLUSIVE, 0, curthread);
#ifdef MAC
diff --git a/sys/fs/fdescfs/fdesc_vfsops.c b/sys/fs/fdescfs/fdesc_vfsops.c
index a4741bc..18bff45 100644
--- a/sys/fs/fdescfs/fdesc_vfsops.c
+++ b/sys/fs/fdescfs/fdesc_vfsops.c
@@ -89,7 +89,7 @@ fdesc_mount(mp, ndp, td)
return (error);
MALLOC(fmp, struct fdescmount *, sizeof(struct fdescmount),
- M_FDESCMNT, M_WAITOK); /* XXX */
+ M_FDESCMNT, 0); /* XXX */
rvp->v_type = VDIR;
rvp->v_vflag |= VV_ROOT;
fmp->f_root = rvp;
diff --git a/sys/fs/fdescfs/fdesc_vnops.c b/sys/fs/fdescfs/fdesc_vnops.c
index 2225220..467066b 100644
--- a/sys/fs/fdescfs/fdesc_vnops.c
+++ b/sys/fs/fdescfs/fdesc_vnops.c
@@ -132,7 +132,7 @@ loop:
* might cause a bogus v_data pointer to get dereferenced
* elsewhere if MALLOC should block.
*/
- MALLOC(fd, struct fdescnode *, sizeof(struct fdescnode), M_TEMP, M_WAITOK);
+ MALLOC(fd, struct fdescnode *, sizeof(struct fdescnode), M_TEMP, 0);
error = getnewvnode("fdesc", mp, fdesc_vnodeop_p, vpp);
if (error) {
diff --git a/sys/fs/fifofs/fifo_vnops.c b/sys/fs/fifofs/fifo_vnops.c
index 64fee38..bb58afb 100644
--- a/sys/fs/fifofs/fifo_vnops.c
+++ b/sys/fs/fifofs/fifo_vnops.c
@@ -174,7 +174,7 @@ fifo_open(ap)
int error;
if ((fip = vp->v_fifoinfo) == NULL) {
- MALLOC(fip, struct fifoinfo *, sizeof(*fip), M_VNODE, M_WAITOK);
+ MALLOC(fip, struct fifoinfo *, sizeof(*fip), M_VNODE, 0);
vp->v_fifoinfo = fip;
error = socreate(AF_LOCAL, &rso, SOCK_STREAM, 0,
ap->a_td->td_ucred, ap->a_td);
diff --git a/sys/fs/hpfs/hpfs_subr.c b/sys/fs/hpfs/hpfs_subr.c
index b45ebbd..6d020cd 100644
--- a/sys/fs/hpfs/hpfs_subr.c
+++ b/sys/fs/hpfs/hpfs_subr.c
@@ -110,10 +110,10 @@ hpfs_bminit(
dprintf(("0x%lx data bands, ", hpmp->hpm_dbnum));
MALLOC(hpmp->hpm_bmind, lsn_t *, hpmp->hpm_dbnum * sizeof(lsn_t),
- M_HPFSMNT, M_WAITOK);
+ M_HPFSMNT, 0);
MALLOC(hpmp->hpm_bitmap, u_int8_t *, hpmp->hpm_dbnum * BMSIZE,
- M_HPFSMNT, M_WAITOK);
+ M_HPFSMNT, 0);
error = bread(hpmp->hpm_devvp, hpmp->hpm_su.su_bitmap.lsn1,
((hpmp->hpm_dbnum + 0x7F) & ~(0x7F)) << 2, NOCRED, &bp);
@@ -273,7 +273,7 @@ hpfs_cpinit (
cpicnt = hpmp->hpm_sp.sp_cpinum;
MALLOC(hpmp->hpm_cpdblk, struct cpdblk *,
- cpicnt * sizeof(struct cpdblk), M_HPFSMNT, M_WAITOK);
+ cpicnt * sizeof(struct cpdblk), M_HPFSMNT, 0);
cpdbp = hpmp->hpm_cpdblk;
lsn = hpmp->hpm_sp.sp_cpi;
diff --git a/sys/fs/hpfs/hpfs_vfsops.c b/sys/fs/hpfs/hpfs_vfsops.c
index 1242e84..7244936 100644
--- a/sys/fs/hpfs/hpfs_vfsops.c
+++ b/sys/fs/hpfs/hpfs_vfsops.c
@@ -252,7 +252,7 @@ hpfs_mountfs(devvp, mp, argsp, td)
/*
* Do actual mount
*/
- hpmp = malloc(sizeof(struct hpfsmount), M_HPFSMNT, M_WAITOK | M_ZERO);
+ hpmp = malloc(sizeof(struct hpfsmount), M_HPFSMNT, M_ZERO);
/* Read in SuperBlock */
error = bread(devvp, SUBLOCK, SUSIZE, NOCRED, &bp);
@@ -494,7 +494,7 @@ hpfs_vget(
* check for it).
*/
MALLOC(hp, struct hpfsnode *, sizeof(struct hpfsnode),
- M_HPFSNO, M_WAITOK);
+ M_HPFSNO, 0);
error = getnewvnode("hpfs", hpmp->hpm_mp, hpfs_vnodeop_p, &vp);
if (error) {
diff --git a/sys/fs/hpfs/hpfs_vnops.c b/sys/fs/hpfs/hpfs_vnops.c
index 7d10096..d207c52 100644
--- a/sys/fs/hpfs/hpfs_vnops.c
+++ b/sys/fs/hpfs/hpfs_vnops.c
@@ -1038,7 +1038,7 @@ readdone:
((caddr_t)uio->uio_iov->iov_base -
(uio->uio_offset - off));
MALLOC(cookies, u_long *, ncookies * sizeof(u_long),
- M_TEMP, M_WAITOK);
+ M_TEMP, 0);
for (dp = dpStart, cookiep = cookies, i=0;
i < ncookies;
dp = (struct dirent *)((caddr_t) dp + dp->d_reclen), i++) {
diff --git a/sys/fs/msdosfs/msdosfs_denode.c b/sys/fs/msdosfs/msdosfs_denode.c
index 735e7df..a0da2c7 100644
--- a/sys/fs/msdosfs/msdosfs_denode.c
+++ b/sys/fs/msdosfs/msdosfs_denode.c
@@ -246,7 +246,7 @@ deget(pmp, dirclust, diroffset, depp)
* might cause a bogus v_data pointer to get dereferenced
* elsewhere if MALLOC should block.
*/
- MALLOC(ldep, struct denode *, sizeof(struct denode), M_MSDOSFSNODE, M_WAITOK);
+ MALLOC(ldep, struct denode *, sizeof(struct denode), M_MSDOSFSNODE, 0);
/*
* Directory entry was not in cache, have to create a vnode and
diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c
index b6ea514..82b8043 100644
--- a/sys/fs/msdosfs/msdosfs_vfsops.c
+++ b/sys/fs/msdosfs/msdosfs_vfsops.c
@@ -349,7 +349,7 @@ mountmsdosfs(devvp, mp, td, argp)
}
#endif
- pmp = malloc(sizeof *pmp, M_MSDOSFSMNT, M_WAITOK | M_ZERO);
+ pmp = malloc(sizeof *pmp, M_MSDOSFSMNT, M_ZERO);
pmp->pm_mountp = mp;
/*
@@ -560,7 +560,7 @@ mountmsdosfs(devvp, mp, td, argp)
pmp->pm_inusemap = malloc(((pmp->pm_maxcluster + N_INUSEBITS - 1)
/ N_INUSEBITS)
* sizeof(*pmp->pm_inusemap),
- M_MSDOSFSFAT, M_WAITOK);
+ M_MSDOSFSFAT, 0);
/*
* fillinusemap() needs pm_devvp.
diff --git a/sys/fs/msdosfs/msdosfs_vnops.c b/sys/fs/msdosfs/msdosfs_vnops.c
index a326929..0137920 100644
--- a/sys/fs/msdosfs/msdosfs_vnops.c
+++ b/sys/fs/msdosfs/msdosfs_vnops.c
@@ -1534,7 +1534,7 @@ msdosfs_readdir(ap)
if (ap->a_ncookies) {
ncookies = uio->uio_resid / 16;
MALLOC(cookies, u_long *, ncookies * sizeof(u_long), M_TEMP,
- M_WAITOK);
+ 0);
*ap->a_cookies = cookies;
*ap->a_ncookies = ncookies;
}
diff --git a/sys/fs/ntfs/ntfs_subr.c b/sys/fs/ntfs/ntfs_subr.c
index 20b98a5..919fcff 100644
--- a/sys/fs/ntfs/ntfs_subr.c
+++ b/sys/fs/ntfs/ntfs_subr.c
@@ -187,7 +187,7 @@ ntfs_ntvattrget(
}
/* Scan $ATTRIBUTE_LIST for requested attribute */
len = lvap->va_datalen;
- MALLOC(alpool, caddr_t, len, M_TEMP, M_WAITOK);
+ MALLOC(alpool, caddr_t, len, M_TEMP, 0);
error = ntfs_readntvattr_plain(ntmp, ip, lvap, 0, len, alpool, &len,
NULL);
if (error)
@@ -266,7 +266,7 @@ ntfs_loadntnode(
dprintf(("ntfs_loadntnode: loading ino: %d\n",ip->i_number));
MALLOC(mfrp, struct filerec *, ntfs_bntob(ntmp->ntm_bpmftrec),
- M_TEMP, M_WAITOK);
+ M_TEMP, 0);
if (ip->i_number < NTFS_SYSNODESNUM) {
struct buf *bp;
@@ -390,7 +390,7 @@ ntfs_ntlookup(
NULL));
MALLOC(ip, struct ntnode *, sizeof(struct ntnode), M_NTFSNTNODE,
- M_WAITOK | M_ZERO);
+ M_ZERO);
ddprintf(("ntfs_ntlookup: allocating ntnode: %d: %p\n", ino, ip));
/* Generic initialization */
@@ -539,7 +539,7 @@ ntfs_attrtontvattr(
*rvapp = NULL;
MALLOC(vap, struct ntvattr *, sizeof(struct ntvattr),
- M_NTFSNTVATTR, M_WAITOK | M_ZERO);
+ M_NTFSNTVATTR, M_ZERO);
vap->va_ip = NULL;
vap->va_flag = rap->a_hdr.a_flag;
vap->va_type = rap->a_hdr.a_type;
@@ -576,7 +576,7 @@ ntfs_attrtontvattr(
vap->va_vcnstart = 0;
vap->va_vcnend = ntfs_btocn(vap->va_allocated);
MALLOC(vap->va_datap, caddr_t, vap->va_datalen,
- M_NTFSRDATA, M_WAITOK);
+ M_NTFSRDATA, 0);
memcpy(vap->va_datap, (caddr_t) rap + rap->a_r.a_dataoff,
rap->a_r.a_datalen);
}
@@ -617,8 +617,8 @@ ntfs_runtovrun(
off += (run[off] & 0xF) + ((run[off] >> 4) & 0xF) + 1;
cnt++;
}
- MALLOC(cn, cn_t *, cnt * sizeof(cn_t), M_NTFSRUN, M_WAITOK);
- MALLOC(cl, cn_t *, cnt * sizeof(cn_t), M_NTFSRUN, M_WAITOK);
+ MALLOC(cn, cn_t *, cnt * sizeof(cn_t), M_NTFSRUN, 0);
+ MALLOC(cl, cn_t *, cnt * sizeof(cn_t), M_NTFSRUN, 0);
off = 0;
cnt = 0;
@@ -738,13 +738,13 @@ ntfs_fget(
return (0);
MALLOC(fp, struct fnode *, sizeof(struct fnode), M_NTFSFNODE,
- M_WAITOK | M_ZERO);
+ M_ZERO);
dprintf(("ntfs_fget: allocating fnode: %p\n",fp));
fp->f_ip = ip;
if (attrname) {
fp->f_flag |= FN_AATTRNAME;
- MALLOC(fp->f_attrname, char *, strlen(attrname)+1, M_TEMP, M_WAITOK);
+ MALLOC(fp->f_attrname, char *, strlen(attrname)+1, M_TEMP, 0);
strcpy(fp->f_attrname, attrname);
} else
fp->f_attrname = NULL;
@@ -829,7 +829,7 @@ ntfs_ntlookupattr(
out:
if (namelen) {
- MALLOC((*attrname), char *, namelen, M_TEMP, M_WAITOK);
+ MALLOC((*attrname), char *, namelen, M_TEMP, 0);
memcpy((*attrname), name, namelen);
(*attrname)[namelen] = '\0';
}
@@ -894,7 +894,7 @@ ntfs_ntlookupfile(
dprintf(("ntfs_ntlookupfile: blksz: %d, rdsz: %d\n", blsize, rdsize));
- MALLOC(rdbuf, caddr_t, blsize, M_TEMP, M_WAITOK);
+ MALLOC(rdbuf, caddr_t, blsize, M_TEMP, 0);
error = ntfs_readattr(ntmp, ip, NTFS_A_INDXROOT, "$I30",
0, rdsize, rdbuf, NULL);
@@ -1112,7 +1112,7 @@ ntfs_ntreaddir(
if (fp->f_dirblbuf == NULL) {
fp->f_dirblsz = vap->va_a_iroot->ir_size;
MALLOC(fp->f_dirblbuf, caddr_t,
- max(vap->va_datalen,fp->f_dirblsz), M_NTFSDIR, M_WAITOK);
+ max(vap->va_datalen,fp->f_dirblsz), M_NTFSDIR, 0);
}
blsize = fp->f_dirblsz;
@@ -1127,7 +1127,7 @@ ntfs_ntreaddir(
error = ENOTDIR;
goto fail;
}
- MALLOC(bmp, u_char *, bmvap->va_datalen, M_TEMP, M_WAITOK);
+ MALLOC(bmp, u_char *, bmvap->va_datalen, M_TEMP, 0);
error = ntfs_readattr(ntmp, ip, NTFS_A_INDXBITMAP, "$I30", 0,
bmvap->va_datalen, bmp, NULL);
if (error)
@@ -1708,9 +1708,9 @@ ntfs_readattr(
vap->va_compressalg));
MALLOC(cup, u_int8_t *, ntfs_cntob(NTFS_COMPUNIT_CL),
- M_NTFSDECOMP, M_WAITOK);
+ M_NTFSDECOMP, 0);
MALLOC(uup, u_int8_t *, ntfs_cntob(NTFS_COMPUNIT_CL),
- M_NTFSDECOMP, M_WAITOK);
+ M_NTFSDECOMP, 0);
cn = (ntfs_btocn(roff)) & (~(NTFS_COMPUNIT_CL - 1));
off = roff - ntfs_cntob(cn);
@@ -1943,7 +1943,7 @@ ntfs_toupper_use(mp, ntmp)
* so don't bother reading more
*/
MALLOC(ntfs_toupper_tab, wchar *, 65536 * sizeof(wchar),
- M_NTFSRDATA, M_WAITOK);
+ M_NTFSRDATA, 0);
if ((error = VFS_VGET(mp, NTFS_UPCASEINO, LK_EXCLUSIVE, &vp)))
goto out;
@@ -1991,14 +1991,14 @@ ntfs_u28_init(
char ** u28;
int i, j, h, l;
- MALLOC(u28, char **, 256 * sizeof(char*), M_TEMP, M_WAITOK | M_ZERO);
+ MALLOC(u28, char **, 256 * sizeof(char*), M_TEMP, M_ZERO);
for (i=0; i<256; i++) {
h = (u2w[i] >> 8) & 0xFF;
l = (u2w[i]) &0xFF;
if (u28[h] == NULL) {
- MALLOC(u28[h], char *, 256 * sizeof(char), M_TEMP, M_WAITOK);
+ MALLOC(u28[h], char *, 256 * sizeof(char), M_TEMP, 0);
for (j=0; j<256; j++)
u28[h][j] = '_';
}
@@ -2039,7 +2039,7 @@ ntfs_82u_init(
wchar * _82u;
int i;
- MALLOC(_82u, wchar *, 256 * sizeof(wchar), M_TEMP, M_WAITOK);
+ MALLOC(_82u, wchar *, 256 * sizeof(wchar), M_TEMP, 0);
if (u2w == NULL) {
for (i=0; i<256; i++)
diff --git a/sys/fs/ntfs/ntfs_vfsops.c b/sys/fs/ntfs/ntfs_vfsops.c
index 1e267a9..7221e0b 100644
--- a/sys/fs/ntfs/ntfs_vfsops.c
+++ b/sys/fs/ntfs/ntfs_vfsops.c
@@ -309,7 +309,7 @@ ntfs_mountfs(devvp, mp, argsp, td)
error = bread(devvp, BBLOCK, BBSIZE, NOCRED, &bp);
if (error)
goto out;
- ntmp = malloc( sizeof *ntmp, M_NTFSMNT, M_WAITOK | M_ZERO);
+ ntmp = malloc( sizeof *ntmp, M_NTFSMNT, M_ZERO);
bcopy( bp->b_data, &ntmp->ntm_bootfile, sizeof(struct bootfile) );
brelse( bp );
bp = NULL;
@@ -415,7 +415,7 @@ ntfs_mountfs(devvp, mp, argsp, td)
/* Alloc memory for attribute definitions */
MALLOC(ntmp->ntm_ad, struct ntvattrdef *,
num * sizeof(struct ntvattrdef),
- M_NTFSMNT, M_WAITOK);
+ M_NTFSMNT, 0);
ntmp->ntm_adnum = num;
@@ -562,7 +562,7 @@ ntfs_calccfree(
bmsize = VTOF(vp)->f_size;
- MALLOC(tmp, u_int8_t *, bmsize, M_TEMP, M_WAITOK);
+ MALLOC(tmp, u_int8_t *, bmsize, M_TEMP, 0);
error = ntfs_readattr(ntmp, VTONT(vp), NTFS_A_DATA, NULL,
0, bmsize, tmp, NULL);
diff --git a/sys/fs/ntfs/ntfs_vnops.c b/sys/fs/ntfs/ntfs_vnops.c
index 90ca4f1..b39f0cb 100644
--- a/sys/fs/ntfs/ntfs_vnops.c
+++ b/sys/fs/ntfs/ntfs_vnops.c
@@ -590,7 +590,7 @@ ntfs_readdir(ap)
((caddr_t)uio->uio_iov->iov_base -
(uio->uio_offset - off));
MALLOC(cookies, u_long *, ncookies * sizeof(u_long),
- M_TEMP, M_WAITOK);
+ M_TEMP, 0);
for (dp = dpStart, cookiep = cookies, i=0;
i < ncookies;
dp = (struct dirent *)((caddr_t) dp + dp->d_reclen), i++) {
diff --git a/sys/fs/nullfs/null_subr.c b/sys/fs/nullfs/null_subr.c
index f2a43e0..0285add 100644
--- a/sys/fs/nullfs/null_subr.c
+++ b/sys/fs/nullfs/null_subr.c
@@ -212,7 +212,7 @@ null_nodeget(mp, lowervp, vpp)
* elsewhere if MALLOC should block.
*/
MALLOC(xp, struct null_node *, sizeof(struct null_node),
- M_NULLFSNODE, M_WAITOK);
+ M_NULLFSNODE, 0);
error = getnewvnode("null", mp, null_vnodeop_p, &vp);
if (error) {
diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c
index d6ca211..20b1877 100644
--- a/sys/fs/nullfs/null_vfsops.c
+++ b/sys/fs/nullfs/null_vfsops.c
@@ -158,7 +158,7 @@ nullfs_mount(mp, ndp, td)
}
xmp = (struct null_mount *) malloc(sizeof(struct null_mount),
- M_NULLFSMNT, M_WAITOK); /* XXX */
+ M_NULLFSMNT, 0); /* XXX */
/*
* Save reference to underlying FS
diff --git a/sys/fs/nwfs/nwfs_node.c b/sys/fs/nwfs/nwfs_node.c
index b92dd4c..d8bdbc4 100644
--- a/sys/fs/nwfs/nwfs_node.c
+++ b/sys/fs/nwfs/nwfs_node.c
@@ -169,7 +169,7 @@ rescan:
* might cause a bogus v_data pointer to get dereferenced
* elsewhere if MALLOC should block.
*/
- MALLOC(np, struct nwnode *, sizeof *np, M_NWNODE, M_WAITOK | M_ZERO);
+ MALLOC(np, struct nwnode *, sizeof *np, M_NWNODE, M_ZERO);
error = getnewvnode("nwfs", mp, nwfs_vnodeop_p, &vp);
if (error) {
*vpp = NULL;
diff --git a/sys/fs/nwfs/nwfs_vfsops.c b/sys/fs/nwfs/nwfs_vfsops.c
index f097b3e..c033b11 100644
--- a/sys/fs/nwfs/nwfs_vfsops.c
+++ b/sys/fs/nwfs/nwfs_vfsops.c
@@ -125,7 +125,7 @@ nwfs_initnls(struct nwmount *nmp) {
nmp->m.nls.u2n = ncp_defnls.u2n;
return 0;
}
- MALLOC(pe, char *, 256 * 4, M_NWFSDATA, M_WAITOK);
+ MALLOC(pe, char *, 256 * 4, M_NWFSDATA, 0);
pc = pe;
do {
COPY_TABLE(nmp->m.nls.to_lower, ncp_defnls.to_lower);
diff --git a/sys/fs/portalfs/portal_vfsops.c b/sys/fs/portalfs/portal_vfsops.c
index 66e516d..4c8c3f9 100644
--- a/sys/fs/portalfs/portal_vfsops.c
+++ b/sys/fs/portalfs/portal_vfsops.c
@@ -113,10 +113,10 @@ portal_mount(mp, path, data, ndp, td)
}
MALLOC(pn, struct portalnode *, sizeof(struct portalnode),
- M_TEMP, M_WAITOK);
+ M_TEMP, 0);
MALLOC(fmp, struct portalmount *, sizeof(struct portalmount),
- M_PORTALFSMNT, M_WAITOK); /* XXX */
+ M_PORTALFSMNT, 0); /* XXX */
error = getnewvnode("portal", mp, portal_vnodeop_p, &rvp); /* XXX */
if (error) {
diff --git a/sys/fs/portalfs/portal_vnops.c b/sys/fs/portalfs/portal_vnops.c
index 0d8c06d..f272e14 100644
--- a/sys/fs/portalfs/portal_vnops.c
+++ b/sys/fs/portalfs/portal_vnops.c
@@ -132,7 +132,7 @@ portal_lookup(ap)
* elsewhere if MALLOC should block.
*/
MALLOC(pt, struct portalnode *, sizeof(struct portalnode),
- M_TEMP, M_WAITOK);
+ M_TEMP, 0);
error = getnewvnode("portal", dvp->v_mount, portal_vnodeop_p, &fvp);
if (error) {
@@ -150,7 +150,7 @@ portal_lookup(ap)
size++;
cnp->cn_consume = size - cnp->cn_namelen;
- pt->pt_arg = malloc(size+1, M_TEMP, M_WAITOK);
+ pt->pt_arg = malloc(size+1, M_TEMP, 0);
pt->pt_size = size+1;
bcopy(pname, pt->pt_arg, pt->pt_size);
pt->pt_fileid = portal_fileid++;
diff --git a/sys/fs/pseudofs/pseudofs.c b/sys/fs/pseudofs/pseudofs.c
index 8297ef6..67b3fae 100644
--- a/sys/fs/pseudofs/pseudofs.c
+++ b/sys/fs/pseudofs/pseudofs.c
@@ -92,7 +92,7 @@ _pfs_fixup_dir(struct pfs_node *parent)
struct pfs_node *dir;
MALLOC(dir, struct pfs_node *, sizeof *dir,
- M_PFSNODES, M_WAITOK|M_ZERO);
+ M_PFSNODES, M_ZERO);
dir->pn_name[0] = '.';
dir->pn_type = pfstype_this;
@@ -102,7 +102,7 @@ _pfs_fixup_dir(struct pfs_node *parent)
}
MALLOC(dir, struct pfs_node *, sizeof *dir,
- M_PFSNODES, M_WAITOK|M_ZERO);
+ M_PFSNODES, M_ZERO);
dir->pn_name[0] = dir->pn_name[1] = '.';
dir->pn_type = pfstype_parent;
@@ -127,7 +127,7 @@ pfs_create_dir(struct pfs_node *parent, char *name,
("%s(): node name is too long", __func__));
MALLOC(dir, struct pfs_node *, sizeof *dir,
- M_PFSNODES, M_WAITOK|M_ZERO);
+ M_PFSNODES, M_ZERO);
strcpy(dir->pn_name, name);
dir->pn_type = (flags & PFS_PROCDEP) ? pfstype_procdir : pfstype_dir;
dir->pn_attr = attr;
@@ -160,7 +160,7 @@ pfs_create_file(struct pfs_node *parent, char *name, pfs_fill_t fill,
("%s(): node name is too long", __func__));
MALLOC(node, struct pfs_node *, sizeof *node,
- M_PFSNODES, M_WAITOK|M_ZERO);
+ M_PFSNODES, M_ZERO);
strcpy(node->pn_name, name);
node->pn_type = pfstype_file;
node->pn_func = fill;
@@ -320,7 +320,7 @@ pfs_init(struct pfs_info *pi, struct vfsconf *vfc)
/* set up the root diretory */
MALLOC(root, struct pfs_node *, sizeof *root,
- M_PFSNODES, M_WAITOK|M_ZERO);
+ M_PFSNODES, M_ZERO);
root->pn_type = pfstype_root;
root->pn_name[0] = '/';
root->pn_info = pi;
diff --git a/sys/fs/pseudofs/pseudofs_fileno.c b/sys/fs/pseudofs/pseudofs_fileno.c
index 4341e23..0ca1640 100644
--- a/sys/fs/pseudofs/pseudofs_fileno.c
+++ b/sys/fs/pseudofs/pseudofs_fileno.c
@@ -82,7 +82,7 @@ pfs_fileno_init(struct pfs_info *pi)
struct pfs_bitmap *pb;
MALLOC(pb, struct pfs_bitmap *, sizeof *pb,
- M_PFSFILENO, M_WAITOK|M_ZERO);
+ M_PFSFILENO, M_ZERO);
mtx_lock(&pi->pi_mutex);
@@ -144,7 +144,7 @@ pfs_get_fileno(struct pfs_info *pi)
if (pb == NULL) {
mtx_unlock(&pi->pi_mutex);
MALLOC(pb, struct pfs_bitmap *, sizeof *pb,
- M_PFSFILENO, M_WAITOK|M_ZERO);
+ M_PFSFILENO, M_ZERO);
mtx_lock(&pi->pi_mutex);
/* protect against possible race */
while (ppb->pb_next)
diff --git a/sys/fs/pseudofs/pseudofs_vncache.c b/sys/fs/pseudofs/pseudofs_vncache.c
index 76fdf3e..a1be1f1 100644
--- a/sys/fs/pseudofs/pseudofs_vncache.c
+++ b/sys/fs/pseudofs/pseudofs_vncache.c
@@ -132,7 +132,7 @@ pfs_vncache_alloc(struct mount *mp, struct vnode **vpp,
++pfs_vncache_misses;
/* nope, get a new one */
- MALLOC(pvd, struct pfs_vdata *, sizeof *pvd, M_PFSVNCACHE, M_WAITOK);
+ MALLOC(pvd, struct pfs_vdata *, sizeof *pvd, M_PFSVNCACHE, 0);
if (++pfs_vncache_entries > pfs_vncache_maxentries)
pfs_vncache_maxentries = pfs_vncache_entries;
error = getnewvnode("pseudofs", mp, pfs_vnodeop_p, vpp);
diff --git a/sys/fs/smbfs/smbfs_node.c b/sys/fs/smbfs/smbfs_node.c
index 093e7ca4..f4c3c03 100644
--- a/sys/fs/smbfs/smbfs_node.c
+++ b/sys/fs/smbfs/smbfs_node.c
@@ -114,7 +114,7 @@ smbfs_name_alloc(const u_char *name, int nmlen)
nmlen++;
#ifdef SMBFS_NAME_DEBUG
- cp = malloc(nmlen + 2 + sizeof(int), M_SMBNODENAME, M_WAITOK);
+ cp = malloc(nmlen + 2 + sizeof(int), M_SMBNODENAME, 0);
*(int*)cp = nmlen;
cp += sizeof(int);
cp[0] = 0xfc;
@@ -122,7 +122,7 @@ smbfs_name_alloc(const u_char *name, int nmlen)
bcopy(name, cp, nmlen - 1);
cp[nmlen] = 0xfe;
#else
- cp = malloc(nmlen, M_SMBNODENAME, M_WAITOK);
+ cp = malloc(nmlen, M_SMBNODENAME, 0);
bcopy(name, cp, nmlen - 1);
#endif
cp[nmlen - 1] = 0;
@@ -219,7 +219,7 @@ loop:
if (fap == NULL)
return ENOENT;
- MALLOC(np, struct smbnode *, sizeof *np, M_SMBNODE, M_WAITOK);
+ MALLOC(np, struct smbnode *, sizeof *np, M_SMBNODE, 0);
error = getnewvnode("smbfs", mp, smbfs_vnodeop_p, &vp);
if (error) {
FREE(np, M_SMBNODE);
diff --git a/sys/fs/smbfs/smbfs_smb.c b/sys/fs/smbfs/smbfs_smb.c
index 034fc77..59a5691 100644
--- a/sys/fs/smbfs/smbfs_smb.c
+++ b/sys/fs/smbfs/smbfs_smb.c
@@ -1264,7 +1264,7 @@ static int
smbfs_findopenLM2(struct smbfs_fctx *ctx, struct smbnode *dnp,
const char *wildcard, int wclen, int attr, struct smb_cred *scred)
{
- ctx->f_name = malloc(SMB_MAXFNAMELEN, M_SMBFSDATA, M_WAITOK);
+ ctx->f_name = malloc(SMB_MAXFNAMELEN, M_SMBFSDATA, 0);
if (ctx->f_name == NULL)
return ENOMEM;
ctx->f_infolevel = SMB_DIALECT(SSTOVC(ctx->f_ssp)) < SMB_DIALECT_NTLM0_12 ?
@@ -1371,7 +1371,7 @@ smbfs_findnextLM2(struct smbfs_fctx *ctx, int limit)
if (ctx->f_rnamelen <= nmlen) {
if (ctx->f_rname)
free(ctx->f_rname, M_SMBFSDATA);
- ctx->f_rname = malloc(nmlen + 1, M_SMBFSDATA, M_WAITOK);
+ ctx->f_rname = malloc(nmlen + 1, M_SMBFSDATA, 0);
ctx->f_rnamelen = nmlen;
}
bcopy(ctx->f_name, ctx->f_rname, nmlen);
@@ -1404,7 +1404,7 @@ smbfs_findopen(struct smbnode *dnp, const char *wildcard, int wclen, int attr,
struct smbfs_fctx *ctx;
int error;
- ctx = malloc(sizeof(*ctx), M_SMBFSDATA, M_WAITOK);
+ ctx = malloc(sizeof(*ctx), M_SMBFSDATA, 0);
if (ctx == NULL)
return ENOMEM;
bzero(ctx, sizeof(*ctx));
diff --git a/sys/fs/udf/udf_vfsops.c b/sys/fs/udf/udf_vfsops.c
index b41b86b..2e7df0a 100644
--- a/sys/fs/udf/udf_vfsops.c
+++ b/sys/fs/udf/udf_vfsops.c
@@ -562,7 +562,7 @@ udf_vget(struct mount *mp, ino_t ino, int flags, struct vnode **vpp)
* Allocate memory and check the tag id's before grabbing a new
* vnode, since it's hard to roll back if there is a problem.
*/
- unode = uma_zalloc(udf_zone_node, M_WAITOK);
+ unode = uma_zalloc(udf_zone_node, 0);
if (unode == NULL) {
printf("Cannot allocate udf node\n");
return (ENOMEM);
diff --git a/sys/fs/udf/udf_vnops.c b/sys/fs/udf/udf_vnops.c
index 8d9be57..f6d5fd2 100644
--- a/sys/fs/udf/udf_vnops.c
+++ b/sys/fs/udf/udf_vnops.c
@@ -449,7 +449,7 @@ udf_transname(char *cs0string, char *destname, int len)
int i, unilen = 0;
/* allocate a buffer big enough to hold an 8->16 bit expansion */
- transname = uma_zalloc(udf_zone_trans, M_WAITOK);
+ transname = uma_zalloc(udf_zone_trans, 0);
if ((unilen = udf_UncompressUnicode(len, cs0string, transname)) == -1) {
printf("udf: Unicode translation failed\n");
@@ -486,7 +486,7 @@ udf_cmpname(char *cs0string, char *cmpname, int cs0len, int cmplen)
int error = 0;
/* This is overkill, but not worth creating a new zone */
- transname = uma_zalloc(udf_zone_trans, M_WAITOK);
+ transname = uma_zalloc(udf_zone_trans, 0);
cs0len = udf_transname(cs0string, transname, cs0len);
@@ -532,7 +532,7 @@ udf_opendir(struct udf_node *node, int offset, int fsize, struct udf_mnt *udfmp)
{
struct udf_dirstream *ds;
- ds = uma_zalloc(udf_zone_ds, M_WAITOK | M_ZERO);
+ ds = uma_zalloc(udf_zone_ds, M_ZERO);
ds->node = node;
ds->offset = offset;
@@ -597,7 +597,7 @@ udf_getfid(struct udf_dirstream *ds)
* logical sector in size.
*/
MALLOC(ds->buf, uint8_t*, ds->udfmp->bsize, M_UDFFID,
- M_WAITOK | M_ZERO);
+ M_ZERO);
bcopy(fid, ds->buf, frag_size);
/* Reduce all of the casting magic */
@@ -697,7 +697,7 @@ udf_readdir(struct vop_readdir_args *a)
*/
ncookies = uio->uio_resid / 8;
MALLOC(cookies, u_long *, sizeof(u_long) * ncookies,
- M_TEMP, M_WAITOK);
+ M_TEMP, 0);
if (cookies == NULL)
return (ENOMEM);
uiodir.ncookies = ncookies;
diff --git a/sys/fs/umapfs/umap_subr.c b/sys/fs/umapfs/umap_subr.c
index d3fed34..e33adb6 100644
--- a/sys/fs/umapfs/umap_subr.c
+++ b/sys/fs/umapfs/umap_subr.c
@@ -210,7 +210,7 @@ umap_node_alloc(mp, lowervp, vpp)
* elsewhere if MALLOC should block.
*/
MALLOC(xp, struct umap_node *, sizeof(struct umap_node),
- M_TEMP, M_WAITOK);
+ M_TEMP, 0);
error = getnewvnode("umap", mp, umap_vnodeop_p, vpp);
if (error) {
diff --git a/sys/fs/umapfs/umap_vfsops.c b/sys/fs/umapfs/umap_vfsops.c
index c1ed751..b148c73 100644
--- a/sys/fs/umapfs/umap_vfsops.c
+++ b/sys/fs/umapfs/umap_vfsops.c
@@ -155,7 +155,7 @@ umapfs_mount(mp, path, data, ndp, td)
#endif
amp = (struct umap_mount *) malloc(sizeof(struct umap_mount),
- M_UMAPFSMNT, M_WAITOK); /* XXX */
+ M_UMAPFSMNT, 0); /* XXX */
/*
* Save reference to underlying FS
diff --git a/sys/fs/unionfs/union_subr.c b/sys/fs/unionfs/union_subr.c
index e08b70a..b645265 100644
--- a/sys/fs/unionfs/union_subr.c
+++ b/sys/fs/unionfs/union_subr.c
@@ -509,7 +509,7 @@ loop:
union_newlower(un, lowervp);
if (cnp && (lowervp != NULLVP)) {
un->un_path = malloc(cnp->cn_namelen+1,
- M_TEMP, M_WAITOK);
+ M_TEMP, 0);
bcopy(cnp->cn_nameptr, un->un_path,
cnp->cn_namelen);
un->un_path[cnp->cn_namelen] = '\0';
@@ -564,7 +564,7 @@ loop:
}
MALLOC((*vpp)->v_data, void *, sizeof(struct union_node),
- M_TEMP, M_WAITOK);
+ M_TEMP, 0);
ASSERT_VOP_LOCKED(*vpp, "union_allocvp");
(*vpp)->v_vflag |= vflag;
@@ -591,7 +591,7 @@ loop:
un->un_openl = 0;
if (cnp && (lowervp != NULLVP)) {
- un->un_path = malloc(cnp->cn_namelen+1, M_TEMP, M_WAITOK);
+ un->un_path = malloc(cnp->cn_namelen+1, M_TEMP, 0);
bcopy(cnp->cn_nameptr, un->un_path, cnp->cn_namelen);
un->un_path[cnp->cn_namelen] = '\0';
} else {
@@ -686,7 +686,7 @@ union_copyfile(fvp, tvp, cred, td)
VOP_LEASE(fvp, td, cred, LEASE_READ);
VOP_LEASE(tvp, td, cred, LEASE_WRITE);
- buf = malloc(MAXBSIZE, M_TEMP, M_WAITOK);
+ buf = malloc(MAXBSIZE, M_TEMP, 0);
/* ugly loop follows... */
do {
@@ -858,7 +858,7 @@ union_relookup(um, dvp, vpp, cnp, cn, path, pathlen)
* Conclusion: Horrible.
*/
cn->cn_namelen = pathlen;
- cn->cn_pnbuf = uma_zalloc(namei_zone, M_WAITOK);
+ cn->cn_pnbuf = uma_zalloc(namei_zone, 0);
bcopy(path, cn->cn_pnbuf, cn->cn_namelen);
cn->cn_pnbuf[cn->cn_namelen] = '\0';
@@ -1068,7 +1068,7 @@ union_vn_create(vpp, un, td)
* copied in the first place).
*/
cn.cn_namelen = strlen(un->un_path);
- cn.cn_pnbuf = uma_zalloc(namei_zone, M_WAITOK);
+ cn.cn_pnbuf = uma_zalloc(namei_zone, 0);
bcopy(un->un_path, cn.cn_pnbuf, cn.cn_namelen+1);
cn.cn_nameiop = CREATE;
cn.cn_flags = (LOCKPARENT|LOCKLEAF|HASBUF|SAVENAME|ISLASTCN);
@@ -1260,7 +1260,7 @@ union_dircache(vp, td)
union_dircache_r(vp, 0, &cnt);
cnt++;
dircache = malloc(cnt * sizeof(struct vnode *),
- M_TEMP, M_WAITOK);
+ M_TEMP, 0);
vpp = dircache;
union_dircache_r(vp, &vpp, &cnt);
*vpp = NULLVP;
diff --git a/sys/fs/unionfs/union_vfsops.c b/sys/fs/unionfs/union_vfsops.c
index 637b350..505c5da 100644
--- a/sys/fs/unionfs/union_vfsops.c
+++ b/sys/fs/unionfs/union_vfsops.c
@@ -194,7 +194,7 @@ union_mount(mp, ndp, td)
*/
um = (struct union_mount *) malloc(sizeof(struct union_mount),
- M_UNIONFSMNT, M_WAITOK | M_ZERO);
+ M_UNIONFSMNT, M_ZERO);
um->um_op = op;
diff --git a/sys/geom/bde/g_bde.c b/sys/geom/bde/g_bde.c
index a3ae631..b147a9c 100644
--- a/sys/geom/bde/g_bde.c
+++ b/sys/geom/bde/g_bde.c
@@ -212,7 +212,7 @@ g_bde_config(struct g_configargs *ga)
while (1) {
sectorsize = cp->provider->sectorsize;
mediasize = cp->provider->mediasize;
- sc = g_malloc(sizeof(struct g_bde_softc), M_WAITOK | M_ZERO);
+ sc = g_malloc(sizeof(struct g_bde_softc), M_ZERO);
gp->softc = sc;
sc->geom = gp;
sc->consumer = cp;
diff --git a/sys/geom/geom_aes.c b/sys/geom/geom_aes.c
index 72f0d3d..5471cbf 100644
--- a/sys/geom/geom_aes.c
+++ b/sys/geom/geom_aes.c
@@ -148,7 +148,7 @@ g_aes_read_done(struct bio *bp)
gp = bp->bio_from->geom;
sc = gp->softc;
- sb = g_malloc(sc->sectorsize, M_WAITOK);
+ sb = g_malloc(sc->sectorsize, 0);
b = bp->bio_data;
e = bp->bio_data;
e += bp->bio_length;
@@ -211,7 +211,7 @@ g_aes_start(struct bio *bp)
}
bp2->bio_done = g_aes_write_done;
bp2->bio_offset += sc->sectorsize;
- bp2->bio_data = g_malloc(bp->bio_length, M_WAITOK);
+ bp2->bio_data = g_malloc(bp->bio_length, 0);
b = bp->bio_data;
e = bp->bio_data;
e += bp->bio_length;
@@ -322,7 +322,7 @@ g_aes_taste(struct g_class *mp, struct g_provider *pp, int flags __unused)
if (buf == NULL || error != 0) {
break;
}
- sc = g_malloc(sizeof(struct g_aes_softc), M_WAITOK | M_ZERO);
+ sc = g_malloc(sizeof(struct g_aes_softc), M_ZERO);
if (!memcmp(buf, aes_magic, strlen(aes_magic))) {
sc->keying = KEY_ZERO;
} else if (!memcmp(buf, aes_magic_random,
diff --git a/sys/geom/geom_ccd.c b/sys/geom/geom_ccd.c
index 103a54b..7569420 100644
--- a/sys/geom/geom_ccd.c
+++ b/sys/geom/geom_ccd.c
@@ -206,7 +206,7 @@ ccdnew(int unit)
if (IS_ALLOCATED(unit) || unit > 32)
return (NULL);
- MALLOC(sc, struct ccd_s *, sizeof(*sc), M_CCD, M_WAITOK | M_ZERO);
+ MALLOC(sc, struct ccd_s *, sizeof(*sc), M_CCD, M_ZERO);
sc->sc_unit = unit;
LIST_INSERT_HEAD(&ccd_softc_list, sc, list);
/* XXX: UNLOCK(unique unit numbers) */
@@ -283,7 +283,7 @@ ccdinit(struct ccd_s *cs, char **cpaths, struct thread *td)
/* Allocate space for the component info. */
cs->sc_cinfo = malloc(cs->sc_nccdisks * sizeof(struct ccdcinfo),
- M_CCD, M_WAITOK);
+ M_CCD, 0);
/*
* Verify that each component piece exists and record
@@ -291,7 +291,7 @@ ccdinit(struct ccd_s *cs, char **cpaths, struct thread *td)
*/
maxsecsize = 0;
minsize = 0;
- tmppath = malloc(MAXPATHLEN, M_CCD, M_WAITOK);
+ tmppath = malloc(MAXPATHLEN, M_CCD, 0);
for (ix = 0; ix < cs->sc_nccdisks; ix++) {
vp = cs->sc_vpp[ix];
ci = &cs->sc_cinfo[ix];
@@ -304,7 +304,7 @@ ccdinit(struct ccd_s *cs, char **cpaths, struct thread *td)
MAXPATHLEN, &ci->ci_pathlen)) != 0) {
goto fail;
}
- ci->ci_path = malloc(ci->ci_pathlen, M_CCD, M_WAITOK);
+ ci->ci_path = malloc(ci->ci_pathlen, M_CCD, 0);
bcopy(tmppath, ci->ci_path, ci->ci_pathlen);
ci->ci_dev = vn_todev(vp);
@@ -459,7 +459,7 @@ ccdinterleave(struct ccd_s *cs, int unit)
*/
size = (cs->sc_nccdisks + 1) * sizeof(struct ccdiinfo);
cs->sc_itable = (struct ccdiinfo *)malloc(size, M_CCD,
- M_WAITOK | M_ZERO);
+ M_ZERO);
/*
* Trivial case: no interleave (actually interleave of disk size).
@@ -473,7 +473,7 @@ ccdinterleave(struct ccd_s *cs, int unit)
for (ix = 0; ix < cs->sc_nccdisks; ix++) {
/* Allocate space for ii_index. */
- ii->ii_index = malloc(sizeof(int), M_CCD, M_WAITOK);
+ ii->ii_index = malloc(sizeof(int), M_CCD, 0);
ii->ii_ndisk = 1;
ii->ii_startblk = bn;
ii->ii_startoff = 0;
@@ -496,7 +496,7 @@ ccdinterleave(struct ccd_s *cs, int unit)
* we use.
*/
ii->ii_index = malloc((sizeof(int) * cs->sc_nccdisks),
- M_CCD, M_WAITOK);
+ M_CCD, 0);
/*
* Locate the smallest of the remaining components
@@ -1107,9 +1107,9 @@ ccdioctltoo(int unit, u_long cmd, caddr_t data, int flag, struct thread *td)
* componet pathnames and device numbers.
*/
cpp = malloc(ccio->ccio_ndisks * sizeof(char *),
- M_CCD, M_WAITOK);
+ M_CCD, 0);
vpp = malloc(ccio->ccio_ndisks * sizeof(struct vnode *),
- M_CCD, M_WAITOK);
+ M_CCD, 0);
error = copyin((caddr_t)ccio->ccio_disks, (caddr_t)cpp,
ccio->ccio_ndisks * sizeof(char **));
@@ -1164,7 +1164,7 @@ ccdioctltoo(int unit, u_long cmd, caddr_t data, int flag, struct thread *td)
*/
ccio->ccio_unit = unit;
ccio->ccio_size = cs->sc_size;
- cs->sc_disk = malloc(sizeof(struct disk), M_CCD, M_WAITOK);
+ cs->sc_disk = malloc(sizeof(struct disk), M_CCD, 0);
cs->sc_dev = disk_create(unit, cs->sc_disk, 0,
&ccd_cdevsw, &ccddisk_cdevsw);
cs->sc_dev->si_drv1 = cs;
diff --git a/sys/geom/geom_ctl.c b/sys/geom/geom_ctl.c
index 48bac22..b3cd331 100644
--- a/sys/geom/geom_ctl.c
+++ b/sys/geom/geom_ctl.c
@@ -174,7 +174,7 @@ g_ctl_ioctl_configgeom(dev_t dev, u_long cmd, caddr_t data, int fflag, struct th
else if (gcp->len == 0) {
ga.ptr = NULL;
} else {
- ga.ptr = g_malloc(gcp->len, M_WAITOK);
+ ga.ptr = g_malloc(gcp->len, 0);
error = copyin(gcp->ptr, ga.ptr, gcp->len);
if (error) {
g_free(ga.ptr);
diff --git a/sys/geom/geom_dev.c b/sys/geom/geom_dev.c
index fd2b44d..36634e2 100644
--- a/sys/geom/geom_dev.c
+++ b/sys/geom/geom_dev.c
@@ -302,7 +302,7 @@ g_dev_ioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct thread *td)
break;
default:
- gio = g_malloc(sizeof *gio, M_WAITOK | M_ZERO);
+ gio = g_malloc(sizeof *gio, M_ZERO);
gio->cmd = cmd;
gio->data = data;
gio->fflag = fflag;
diff --git a/sys/geom/geom_disk.c b/sys/geom/geom_disk.c
index 4c219a1..05a052f 100644
--- a/sys/geom/geom_disk.c
+++ b/sys/geom/geom_disk.c
@@ -250,7 +250,7 @@ disk_create(int unit, struct disk *dp, int flags, struct cdevsw *cdevsw, struct
{
dev_t dev;
- dev = g_malloc(sizeof *dev, M_WAITOK | M_ZERO);
+ dev = g_malloc(sizeof *dev, M_ZERO);
dp->d_dev = dev;
dp->d_devsw = cdevsw;
dev->si_devsw = cdevsw;
diff --git a/sys/geom/geom_event.c b/sys/geom/geom_event.c
index 1b657e9..228bc06 100644
--- a/sys/geom/geom_event.c
+++ b/sys/geom/geom_event.c
@@ -266,7 +266,7 @@ g_post_event(enum g_events ev, struct g_class *mp, struct g_geom *gp, struct g_p
g_trace(G_T_TOPOLOGY, "g_post_event(%d, %p, %p, %p, %p)",
ev, mp, gp, pp, cp);
g_topology_assert();
- ep = g_malloc(sizeof *ep, M_WAITOK | M_ZERO);
+ ep = g_malloc(sizeof *ep, M_ZERO);
ep->event = ev;
if (mp != NULL) {
ep->class = mp;
diff --git a/sys/geom/geom_gpt.c b/sys/geom/geom_gpt.c
index 6b046c4..a54d9a2 100644
--- a/sys/geom/geom_gpt.c
+++ b/sys/geom/geom_gpt.c
@@ -220,7 +220,7 @@ g_gpt_taste(struct g_class *mp, struct g_provider *pp, int insist)
ent = (void*)(buf + i * hdr->hdr_entsz);
if (!memcmp(&ent->ent_type, &unused, sizeof(unused)))
continue;
- gs->part[i] = g_malloc(hdr->hdr_entsz, M_WAITOK);
+ gs->part[i] = g_malloc(hdr->hdr_entsz, 0);
if (gs->part[i] == NULL)
break;
bcopy(ent, gs->part[i], hdr->hdr_entsz);
diff --git a/sys/geom/geom_io.c b/sys/geom/geom_io.c
index dfc490c..8309a24 100644
--- a/sys/geom/geom_io.c
+++ b/sys/geom/geom_io.c
@@ -390,7 +390,7 @@ g_read_data(struct g_consumer *cp, off_t offset, off_t length, int *error)
bp->bio_done = NULL;
bp->bio_offset = offset;
bp->bio_length = length;
- ptr = g_malloc(length, M_WAITOK);
+ ptr = g_malloc(length, 0);
bp->bio_data = ptr;
g_io_request(bp, cp);
errorc = biowait(bp, "gread");
diff --git a/sys/geom/geom_mirror.c b/sys/geom/geom_mirror.c
index 23e2f52..db426cd 100644
--- a/sys/geom/geom_mirror.c
+++ b/sys/geom/geom_mirror.c
@@ -214,7 +214,7 @@ g_mirror_taste(struct g_class *mp, struct g_provider *pp, int flags __unused)
g_topology_unlock();
break;
}
- gp->softc = g_malloc(sizeof(struct g_mirror_softc), M_WAITOK);
+ gp->softc = g_malloc(sizeof(struct g_mirror_softc), 0);
sc = gp->softc;
memcpy(sc->magic, buf + 16, sizeof sc->magic);
g_topology_lock();
diff --git a/sys/geom/geom_slice.c b/sys/geom/geom_slice.c
index c097e7f..e5aaf0f 100644
--- a/sys/geom/geom_slice.c
+++ b/sys/geom/geom_slice.c
@@ -71,10 +71,10 @@ g_slice_init(unsigned nslice, unsigned scsize)
{
struct g_slicer *gsp;
- gsp = g_malloc(sizeof *gsp, M_WAITOK | M_ZERO);
- gsp->softc = g_malloc(scsize, M_WAITOK | M_ZERO);
+ gsp = g_malloc(sizeof *gsp, M_ZERO);
+ gsp->softc = g_malloc(scsize, M_ZERO);
gsp->slices = g_malloc(nslice * sizeof(struct g_slice),
- M_WAITOK | M_ZERO);
+ M_ZERO);
gsp->nslice = nslice;
return (gsp);
}
@@ -371,7 +371,7 @@ g_slice_conf_hot(struct g_geom *gp, u_int idx, off_t offset, off_t length)
gsp = gp->softc;
gsl = gsp->hot;
if(idx >= gsp->nhot) {
- gsl2 = g_malloc((idx + 1) * sizeof *gsl2, M_WAITOK | M_ZERO);
+ gsl2 = g_malloc((idx + 1) * sizeof *gsl2, M_ZERO);
if (gsp->hot != NULL)
bcopy(gsp->hot, gsl2, gsp->nhot * sizeof *gsl2);
gsp->hot = gsl2;
diff --git a/sys/geom/geom_subr.c b/sys/geom/geom_subr.c
index 954c616..7c1c4c1 100644
--- a/sys/geom/geom_subr.c
+++ b/sys/geom/geom_subr.c
@@ -99,9 +99,9 @@ g_new_geomf(struct g_class *mp, const char *fmt, ...)
sb = sbuf_new(NULL, NULL, 0, SBUF_AUTOEXTEND);
sbuf_vprintf(sb, fmt, ap);
sbuf_finish(sb);
- gp = g_malloc(sizeof *gp, M_WAITOK | M_ZERO);
+ gp = g_malloc(sizeof *gp, M_ZERO);
gp->protect = 0x020016601;
- gp->name = g_malloc(sbuf_len(sb) + 1, M_WAITOK | M_ZERO);
+ gp->name = g_malloc(sbuf_len(sb) + 1, M_ZERO);
gp->class = mp;
gp->rank = 1;
LIST_INIT(&gp->consumer);
@@ -142,7 +142,7 @@ g_new_consumer(struct g_geom *gp)
("g_new_consumer on geom(%s) (class %s) without orphan",
gp->name, gp->class->name));
- cp = g_malloc(sizeof *cp, M_WAITOK | M_ZERO);
+ cp = g_malloc(sizeof *cp, M_ZERO);
cp->protect = 0x020016602;
cp->geom = gp;
LIST_INSERT_HEAD(&gp->consumer, cp, consumer);
@@ -176,7 +176,7 @@ g_new_providerf(struct g_geom *gp, const char *fmt, ...)
sb = sbuf_new(NULL, NULL, 0, SBUF_AUTOEXTEND);
sbuf_vprintf(sb, fmt, ap);
sbuf_finish(sb);
- pp = g_malloc(sizeof *pp + sbuf_len(sb) + 1, M_WAITOK | M_ZERO);
+ pp = g_malloc(sizeof *pp + sbuf_len(sb) + 1, M_ZERO);
pp->protect = 0x020016603;
pp->name = (char *)(pp + 1);
strcpy(pp->name, sbuf_data(sb));
@@ -675,7 +675,7 @@ g_idclass(struct geomidorname *p)
return (mp);
return (NULL);
}
- n = g_malloc(p->len + 1, M_WAITOK);
+ n = g_malloc(p->len + 1, 0);
if (copyin(p->u.name, n, p->len) == 0) {
n[p->len] = '\0';
LIST_FOREACH(mp, &g_classes, class)
@@ -702,7 +702,7 @@ g_idgeom(struct geomidorname *p)
return (gp);
return (NULL);
}
- n = g_malloc(p->len + 1, M_WAITOK);
+ n = g_malloc(p->len + 1, 0);
if (copyin(p->u.name, n, p->len) == 0) {
n[p->len] = '\0';
LIST_FOREACH(mp, &g_classes, class)
@@ -732,7 +732,7 @@ g_idprovider(struct geomidorname *p)
return (pp);
return (NULL);
}
- n = g_malloc(p->len + 1, M_WAITOK);
+ n = g_malloc(p->len + 1, 0);
if (copyin(p->u.name, n, p->len) == 0) {
n[p->len] = '\0';
LIST_FOREACH(mp, &g_classes, class)
diff --git a/sys/gnu/ext2fs/ext2_inode.c b/sys/gnu/ext2fs/ext2_inode.c
index fc14dba..6673761 100644
--- a/sys/gnu/ext2fs/ext2_inode.c
+++ b/sys/gnu/ext2fs/ext2_inode.c
@@ -414,7 +414,7 @@ ext2_indirtrunc(ip, lbn, dbn, lastbn, level, countp)
}
bap = (int32_t *)bp->b_data;
- MALLOC(copy, int32_t *, fs->s_blocksize, M_TEMP, M_WAITOK);
+ MALLOC(copy, int32_t *, fs->s_blocksize, M_TEMP, 0);
bcopy((caddr_t)bap, (caddr_t)copy, (u_int)fs->s_blocksize);
bzero((caddr_t)&bap[last + 1],
(u_int)(NINDIR(fs) - (last + 1)) * sizeof (int32_t));
diff --git a/sys/gnu/ext2fs/ext2_lookup.c b/sys/gnu/ext2fs/ext2_lookup.c
index 49caccf..c11aa5a 100644
--- a/sys/gnu/ext2fs/ext2_lookup.c
+++ b/sys/gnu/ext2fs/ext2_lookup.c
@@ -181,7 +181,7 @@ ext2_readdir(ap)
auio.uio_resid = count;
auio.uio_segflg = UIO_SYSSPACE;
aiov.iov_len = count;
- MALLOC(dirbuf, caddr_t, count, M_TEMP, M_WAITOK);
+ MALLOC(dirbuf, caddr_t, count, M_TEMP, 0);
aiov.iov_base = dirbuf;
error = VOP_READ(ap->a_vp, &auio, 0, ap->a_cred);
if (error == 0) {
@@ -243,7 +243,7 @@ ext2_readdir(ap)
if (uio->uio_segflg != UIO_SYSSPACE || uio->uio_iovcnt != 1)
panic("ext2fs_readdir: unexpected uio from NFS server");
MALLOC(cookies, u_long *, ncookies * sizeof(u_long), M_TEMP,
- M_WAITOK);
+ 0);
off = startoffset;
for (dp = (struct ext2_dir_entry_2 *)dirbuf,
cookiep = cookies, ecookies = cookies + ncookies;
diff --git a/sys/gnu/ext2fs/ext2_vfsops.c b/sys/gnu/ext2fs/ext2_vfsops.c
index d91a92e..d281ddb 100644
--- a/sys/gnu/ext2fs/ext2_vfsops.c
+++ b/sys/gnu/ext2fs/ext2_vfsops.c
@@ -135,7 +135,7 @@ ext2_mountroot()
printf("ext2_mountroot: can't find rootvp\n");
return (error);
}
- mp = bsd_malloc((u_long)sizeof(struct mount), M_MOUNT, M_WAITOK);
+ mp = bsd_malloc((u_long)sizeof(struct mount), M_MOUNT, 0);
bzero((char *)mp, (u_long)sizeof(struct mount));
TAILQ_INIT(&mp->mnt_nvnodelist);
TAILQ_INIT(&mp->mnt_reservedvnlist);
@@ -473,7 +473,7 @@ static int compute_sb_data(devvp, es, fs)
V(s_db_per_group)
fs->s_group_desc = bsd_malloc(db_count * sizeof (struct buf *),
- M_EXT2MNT, M_WAITOK);
+ M_EXT2MNT, 0);
/* adjust logic_sb_block */
if(fs->s_blocksize > SBSIZE)
@@ -683,16 +683,16 @@ ext2_mountfs(devvp, mp, td)
goto out;
}
}
- ump = bsd_malloc(sizeof *ump, M_EXT2MNT, M_WAITOK);
+ ump = bsd_malloc(sizeof *ump, M_EXT2MNT, 0);
bzero((caddr_t)ump, sizeof *ump);
/* I don't know whether this is the right strategy. Note that
we dynamically allocate both an ext2_sb_info and an ext2_super_block
while Linux keeps the super block in a locked buffer
*/
ump->um_e2fs = bsd_malloc(sizeof(struct ext2_sb_info),
- M_EXT2MNT, M_WAITOK);
+ M_EXT2MNT, 0);
ump->um_e2fs->s_es = bsd_malloc(sizeof(struct ext2_super_block),
- M_EXT2MNT, M_WAITOK);
+ M_EXT2MNT, 0);
bcopy(es, ump->um_e2fs->s_es, (u_int)sizeof(struct ext2_super_block));
if ((error = compute_sb_data(devvp, ump->um_e2fs->s_es, ump->um_e2fs)))
goto out;
@@ -1005,7 +1005,7 @@ restart:
* which will cause a panic because ext2_sync() blindly
* dereferences vp->v_data (as well it should).
*/
- MALLOC(ip, struct inode *, sizeof(struct inode), M_EXT2NODE, M_WAITOK);
+ MALLOC(ip, struct inode *, sizeof(struct inode), M_EXT2NODE, 0);
/* Allocate a new vnode/inode. */
if ((error = getnewvnode("ext2fs", mp, ext2_vnodeop_p, &vp)) != 0) {
diff --git a/sys/gnu/fs/ext2fs/ext2_inode.c b/sys/gnu/fs/ext2fs/ext2_inode.c
index fc14dba..6673761 100644
--- a/sys/gnu/fs/ext2fs/ext2_inode.c
+++ b/sys/gnu/fs/ext2fs/ext2_inode.c
@@ -414,7 +414,7 @@ ext2_indirtrunc(ip, lbn, dbn, lastbn, level, countp)
}
bap = (int32_t *)bp->b_data;
- MALLOC(copy, int32_t *, fs->s_blocksize, M_TEMP, M_WAITOK);
+ MALLOC(copy, int32_t *, fs->s_blocksize, M_TEMP, 0);
bcopy((caddr_t)bap, (caddr_t)copy, (u_int)fs->s_blocksize);
bzero((caddr_t)&bap[last + 1],
(u_int)(NINDIR(fs) - (last + 1)) * sizeof (int32_t));
diff --git a/sys/gnu/fs/ext2fs/ext2_lookup.c b/sys/gnu/fs/ext2fs/ext2_lookup.c
index 49caccf..c11aa5a 100644
--- a/sys/gnu/fs/ext2fs/ext2_lookup.c
+++ b/sys/gnu/fs/ext2fs/ext2_lookup.c
@@ -181,7 +181,7 @@ ext2_readdir(ap)
auio.uio_resid = count;
auio.uio_segflg = UIO_SYSSPACE;
aiov.iov_len = count;
- MALLOC(dirbuf, caddr_t, count, M_TEMP, M_WAITOK);
+ MALLOC(dirbuf, caddr_t, count, M_TEMP, 0);
aiov.iov_base = dirbuf;
error = VOP_READ(ap->a_vp, &auio, 0, ap->a_cred);
if (error == 0) {
@@ -243,7 +243,7 @@ ext2_readdir(ap)
if (uio->uio_segflg != UIO_SYSSPACE || uio->uio_iovcnt != 1)
panic("ext2fs_readdir: unexpected uio from NFS server");
MALLOC(cookies, u_long *, ncookies * sizeof(u_long), M_TEMP,
- M_WAITOK);
+ 0);
off = startoffset;
for (dp = (struct ext2_dir_entry_2 *)dirbuf,
cookiep = cookies, ecookies = cookies + ncookies;
diff --git a/sys/gnu/fs/ext2fs/ext2_vfsops.c b/sys/gnu/fs/ext2fs/ext2_vfsops.c
index d91a92e..d281ddb 100644
--- a/sys/gnu/fs/ext2fs/ext2_vfsops.c
+++ b/sys/gnu/fs/ext2fs/ext2_vfsops.c
@@ -135,7 +135,7 @@ ext2_mountroot()
printf("ext2_mountroot: can't find rootvp\n");
return (error);
}
- mp = bsd_malloc((u_long)sizeof(struct mount), M_MOUNT, M_WAITOK);
+ mp = bsd_malloc((u_long)sizeof(struct mount), M_MOUNT, 0);
bzero((char *)mp, (u_long)sizeof(struct mount));
TAILQ_INIT(&mp->mnt_nvnodelist);
TAILQ_INIT(&mp->mnt_reservedvnlist);
@@ -473,7 +473,7 @@ static int compute_sb_data(devvp, es, fs)
V(s_db_per_group)
fs->s_group_desc = bsd_malloc(db_count * sizeof (struct buf *),
- M_EXT2MNT, M_WAITOK);
+ M_EXT2MNT, 0);
/* adjust logic_sb_block */
if(fs->s_blocksize > SBSIZE)
@@ -683,16 +683,16 @@ ext2_mountfs(devvp, mp, td)
goto out;
}
}
- ump = bsd_malloc(sizeof *ump, M_EXT2MNT, M_WAITOK);
+ ump = bsd_malloc(sizeof *ump, M_EXT2MNT, 0);
bzero((caddr_t)ump, sizeof *ump);
/* I don't know whether this is the right strategy. Note that
we dynamically allocate both an ext2_sb_info and an ext2_super_block
while Linux keeps the super block in a locked buffer
*/
ump->um_e2fs = bsd_malloc(sizeof(struct ext2_sb_info),
- M_EXT2MNT, M_WAITOK);
+ M_EXT2MNT, 0);
ump->um_e2fs->s_es = bsd_malloc(sizeof(struct ext2_super_block),
- M_EXT2MNT, M_WAITOK);
+ M_EXT2MNT, 0);
bcopy(es, ump->um_e2fs->s_es, (u_int)sizeof(struct ext2_super_block));
if ((error = compute_sb_data(devvp, ump->um_e2fs->s_es, ump->um_e2fs)))
goto out;
@@ -1005,7 +1005,7 @@ restart:
* which will cause a panic because ext2_sync() blindly
* dereferences vp->v_data (as well it should).
*/
- MALLOC(ip, struct inode *, sizeof(struct inode), M_EXT2NODE, M_WAITOK);
+ MALLOC(ip, struct inode *, sizeof(struct inode), M_EXT2NODE, 0);
/* Allocate a new vnode/inode. */
if ((error = getnewvnode("ext2fs", mp, ext2_vnodeop_p, &vp)) != 0) {
diff --git a/sys/i386/i386/bios.c b/sys/i386/i386/bios.c
index 747a3a1..ae14099 100644
--- a/sys/i386/i386/bios.c
+++ b/sys/i386/i386/bios.c
@@ -388,7 +388,7 @@ bios16(struct bios_args *args, char *fmt, ...)
/*
* no page table, so create one and install it.
*/
- pte = (pt_entry_t *)malloc(PAGE_SIZE, M_TEMP, M_WAITOK);
+ pte = (pt_entry_t *)malloc(PAGE_SIZE, M_TEMP, 0);
ptd = (pd_entry_t *)((u_int)ptd + KERNBASE);
*ptd = vtophys(pte) | PG_RW | PG_V;
} else {
diff --git a/sys/i386/i386/busdma_machdep.c b/sys/i386/i386/busdma_machdep.c
index 3158726..eb6cc9d 100644
--- a/sys/i386/i386/busdma_machdep.c
+++ b/sys/i386/i386/busdma_machdep.c
@@ -339,7 +339,7 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags,
if ((dmat->maxsize <= PAGE_SIZE) && dmat->lowaddr >= ptoa(Maxmem)) {
*vaddr = malloc(dmat->maxsize, M_DEVBUF,
- (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK);
+ (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : 0);
} else {
/*
* XXX Use Contigmalloc until it is merged into this facility
@@ -347,7 +347,7 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags,
* multi-seg allocations yet though.
*/
*vaddr = contigmalloc(dmat->maxsize, M_DEVBUF,
- (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK,
+ (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : 0,
0ul, dmat->lowaddr, dmat->alignment? dmat->alignment : 1ul,
dmat->boundary);
}
diff --git a/sys/i386/i386/elan-mmcr.c b/sys/i386/i386/elan-mmcr.c
index 7ddd90c..ca64768 100644
--- a/sys/i386/i386/elan-mmcr.c
+++ b/sys/i386/i386/elan-mmcr.c
@@ -286,7 +286,7 @@ elan_write(dev_t dev, struct uio *uio, int ioflag)
if (uio->uio_resid > 512)
return (EINVAL);
- s = malloc(uio->uio_resid + 1, M_DEVBUF, M_WAITOK);
+ s = malloc(uio->uio_resid + 1, M_DEVBUF, 0);
if (s == NULL)
return (ENOMEM);
untimeout(timeout_errled, NULL, errled_h);
diff --git a/sys/i386/i386/i686_mem.c b/sys/i386/i386/i686_mem.c
index 589fc64..f3fc4e8 100644
--- a/sys/i386/i386/i686_mem.c
+++ b/sys/i386/i386/i686_mem.c
@@ -557,7 +557,7 @@ i686_mrinit(struct mem_range_softc *sc)
sc->mr_desc =
(struct mem_range_desc *)malloc(nmdesc * sizeof(struct mem_range_desc),
- M_MEMDESC, M_WAITOK | M_ZERO);
+ M_MEMDESC, M_ZERO);
sc->mr_ndesc = nmdesc;
mrd = sc->mr_desc;
diff --git a/sys/i386/i386/mem.c b/sys/i386/i386/mem.c
index 41fa636..4905d3c 100644
--- a/sys/i386/i386/mem.c
+++ b/sys/i386/i386/mem.c
@@ -265,7 +265,7 @@ mmioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct thread *td)
if (nd > 0) {
md = (struct mem_range_desc *)
malloc(nd * sizeof(struct mem_range_desc),
- M_MEMDESC, M_WAITOK);
+ M_MEMDESC, 0);
error = mem_range_attr_get(md, &nd);
if (!error)
error = copyout(md, mo->mo_desc,
@@ -279,7 +279,7 @@ mmioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct thread *td)
case MEMRANGE_SET:
md = (struct mem_range_desc *)malloc(sizeof(struct mem_range_desc),
- M_MEMDESC, M_WAITOK);
+ M_MEMDESC, 0);
error = copyin(mo->mo_desc, md, sizeof(struct mem_range_desc));
/* clamp description string */
md->mr_owner[sizeof(md->mr_owner) - 1] = 0;
diff --git a/sys/i386/i386/mp_machdep.c b/sys/i386/i386/mp_machdep.c
index 00da6fa..9b24c6f 100644
--- a/sys/i386/i386/mp_machdep.c
+++ b/sys/i386/i386/mp_machdep.c
@@ -919,13 +919,13 @@ mptable_pass2(void)
pgeflag = 0; /* XXX - Not used under SMP yet. */
MALLOC(io_apic_versions, u_int32_t *, sizeof(u_int32_t) * mp_napics,
- M_DEVBUF, M_WAITOK);
+ M_DEVBUF, 0);
MALLOC(ioapic, volatile ioapic_t **, sizeof(ioapic_t *) * mp_napics,
- M_DEVBUF, M_WAITOK);
+ M_DEVBUF, 0);
MALLOC(io_apic_ints, io_int *, sizeof(io_int) * (nintrs + 1),
- M_DEVBUF, M_WAITOK);
+ M_DEVBUF, 0);
MALLOC(bus_data, bus_datum *, sizeof(bus_datum) * mp_nbusses,
- M_DEVBUF, M_WAITOK);
+ M_DEVBUF, 0);
bzero(ioapic, sizeof(ioapic_t *) * mp_napics);
diff --git a/sys/i386/i386/mptable.c b/sys/i386/i386/mptable.c
index 00da6fa..9b24c6f 100644
--- a/sys/i386/i386/mptable.c
+++ b/sys/i386/i386/mptable.c
@@ -919,13 +919,13 @@ mptable_pass2(void)
pgeflag = 0; /* XXX - Not used under SMP yet. */
MALLOC(io_apic_versions, u_int32_t *, sizeof(u_int32_t) * mp_napics,
- M_DEVBUF, M_WAITOK);
+ M_DEVBUF, 0);
MALLOC(ioapic, volatile ioapic_t **, sizeof(ioapic_t *) * mp_napics,
- M_DEVBUF, M_WAITOK);
+ M_DEVBUF, 0);
MALLOC(io_apic_ints, io_int *, sizeof(io_int) * (nintrs + 1),
- M_DEVBUF, M_WAITOK);
+ M_DEVBUF, 0);
MALLOC(bus_data, bus_datum *, sizeof(bus_datum) * mp_nbusses,
- M_DEVBUF, M_WAITOK);
+ M_DEVBUF, 0);
bzero(ioapic, sizeof(ioapic_t *) * mp_napics);
diff --git a/sys/i386/i386/sys_machdep.c b/sys/i386/i386/sys_machdep.c
index e1347da..4d98979 100644
--- a/sys/i386/i386/sys_machdep.c
+++ b/sys/i386/i386/sys_machdep.c
@@ -298,7 +298,7 @@ user_ldt_alloc(struct mdproc *mdp, int len)
mtx_unlock_spin(&sched_lock);
mtx_assert(&sched_lock, MA_NOTOWNED);
MALLOC(new_ldt, struct proc_ldt *, sizeof(struct proc_ldt),
- M_SUBPROC, M_WAITOK);
+ M_SUBPROC, 0);
new_ldt->ldt_len = len = NEW_MAX_LD(len);
new_ldt->ldt_base = (caddr_t)kmem_alloc(kernel_map,
diff --git a/sys/i386/i386/vm86.c b/sys/i386/i386/vm86.c
index dd7624f..6126dda 100644
--- a/sys/i386/i386/vm86.c
+++ b/sys/i386/i386/vm86.c
@@ -490,7 +490,7 @@ vm86_addpage(struct vm86context *vmc, int pagenum, vm_offset_t kva)
goto full; /* XXX grow map? */
if (kva == 0) {
- kva = (vm_offset_t)malloc(PAGE_SIZE, M_TEMP, M_WAITOK);
+ kva = (vm_offset_t)malloc(PAGE_SIZE, M_TEMP, 0);
flags = VMAP_MALLOC;
}
diff --git a/sys/i386/ibcs2/ibcs2_misc.c b/sys/i386/ibcs2/ibcs2_misc.c
index 295be86..abebf2a 100644
--- a/sys/i386/ibcs2/ibcs2_misc.c
+++ b/sys/i386/ibcs2/ibcs2_misc.c
@@ -333,7 +333,7 @@ ibcs2_getdents(td, uap)
#define DIRBLKSIZ 512 /* XXX we used to use ufs's DIRBLKSIZ */
buflen = max(DIRBLKSIZ, uap->nbytes);
buflen = min(buflen, MAXBSIZE);
- buf = malloc(buflen, M_TEMP, M_WAITOK);
+ buf = malloc(buflen, M_TEMP, 0);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td);
again:
aiov.iov_base = buf;
@@ -494,7 +494,7 @@ ibcs2_read(td, uap)
buflen = max(DIRBLKSIZ, uap->nbytes);
buflen = min(buflen, MAXBSIZE);
- buf = malloc(buflen, M_TEMP, M_WAITOK);
+ buf = malloc(buflen, M_TEMP, 0);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td);
again:
aiov.iov_base = buf;
diff --git a/sys/i386/ibcs2/ibcs2_util.c b/sys/i386/ibcs2/ibcs2_util.c
index 2172433..55ff6ab 100644
--- a/sys/i386/ibcs2/ibcs2_util.c
+++ b/sys/i386/ibcs2/ibcs2_util.c
@@ -66,7 +66,7 @@ ibcs2_emul_find(td, sgp, prefix, path, pbuf, cflag)
char *ptr, *buf, *cp;
size_t sz, len;
- buf = (char *) malloc(MAXPATHLEN, M_TEMP, M_WAITOK);
+ buf = (char *) malloc(MAXPATHLEN, M_TEMP, 0);
*pbuf = path;
for (ptr = buf; (*ptr = *prefix) != '\0'; ptr++, prefix++)
diff --git a/sys/i386/ibcs2/imgact_coff.c b/sys/i386/ibcs2/imgact_coff.c
index fb5f537..b19cb56 100644
--- a/sys/i386/ibcs2/imgact_coff.c
+++ b/sys/i386/ibcs2/imgact_coff.c
@@ -386,7 +386,7 @@ exec_coff_imgact(imgp)
int emul_path_len = strlen(ibcs2_emul_path);
libbuf = malloc(MAXPATHLEN + emul_path_len,
- M_TEMP, M_WAITOK);
+ M_TEMP, 0);
strcpy(libbuf, ibcs2_emul_path);
for (j = off; j < scns[i].s_size + off;) {
diff --git a/sys/i386/include/mptable.h b/sys/i386/include/mptable.h
index 00da6fa..9b24c6f 100644
--- a/sys/i386/include/mptable.h
+++ b/sys/i386/include/mptable.h
@@ -919,13 +919,13 @@ mptable_pass2(void)
pgeflag = 0; /* XXX - Not used under SMP yet. */
MALLOC(io_apic_versions, u_int32_t *, sizeof(u_int32_t) * mp_napics,
- M_DEVBUF, M_WAITOK);
+ M_DEVBUF, 0);
MALLOC(ioapic, volatile ioapic_t **, sizeof(ioapic_t *) * mp_napics,
- M_DEVBUF, M_WAITOK);
+ M_DEVBUF, 0);
MALLOC(io_apic_ints, io_int *, sizeof(io_int) * (nintrs + 1),
- M_DEVBUF, M_WAITOK);
+ M_DEVBUF, 0);
MALLOC(bus_data, bus_datum *, sizeof(bus_datum) * mp_nbusses,
- M_DEVBUF, M_WAITOK);
+ M_DEVBUF, 0);
bzero(ioapic, sizeof(ioapic_t *) * mp_napics);
diff --git a/sys/i386/isa/ctx.c b/sys/i386/isa/ctx.c
index e70c40e..6b5a2ca 100644
--- a/sys/i386/isa/ctx.c
+++ b/sys/i386/isa/ctx.c
@@ -234,7 +234,7 @@ ctxopen(dev_t dev, int flags, int fmt, struct thread *td)
/* get space for the LUT buffer */
- sr->lutp = malloc(LUTSIZE, M_DEVBUF, M_WAITOK);
+ sr->lutp = malloc(LUTSIZE, M_DEVBUF, 0);
if (sr->lutp == NULL)
return (ENOMEM);
diff --git a/sys/i386/isa/gpib.c b/sys/i386/isa/gpib.c
index 0bd0fce..184c506 100644
--- a/sys/i386/isa/gpib.c
+++ b/sys/i386/isa/gpib.c
@@ -186,7 +186,7 @@ gpopen(dev, flags, fmt, td)
return (EBUSY);
/* Have memory for buffer? */
- sc->sc_inbuf = malloc(BUFSIZE, M_DEVBUF, M_WAITOK);
+ sc->sc_inbuf = malloc(BUFSIZE, M_DEVBUF, 0);
if (sc->sc_inbuf == 0)
return (ENOMEM);
diff --git a/sys/i386/isa/if_cx.c b/sys/i386/isa/if_cx.c
index b64f978..a96d5fa 100644
--- a/sys/i386/isa/if_cx.c
+++ b/sys/i386/isa/if_cx.c
@@ -136,11 +136,11 @@ static struct mbuf *makembuf (void *buf, unsigned len)
{
struct mbuf *m, *o, *p;
- MGETHDR (m, M_DONTWAIT, MT_DATA);
+ MGETHDR (m, M_NOWAIT, MT_DATA);
if (! m)
return (0);
if (len >= MINCLSIZE)
- MCLGET (m, M_DONTWAIT);
+ MCLGET (m, M_NOWAIT);
m->m_pkthdr.len = len;
m->m_len = 0;
@@ -153,13 +153,13 @@ static struct mbuf *makembuf (void *buf, unsigned len)
if (! n) {
/* Allocate new mbuf. */
o = p;
- MGET (p, M_DONTWAIT, MT_DATA);
+ MGET (p, M_NOWAIT, MT_DATA);
if (! p) {
m_freem (m);
return (0);
}
if (len >= MINCLSIZE)
- MCLGET (p, M_DONTWAIT);
+ MCLGET (p, M_NOWAIT);
p->m_len = 0;
o->m_next = p;
diff --git a/sys/i386/isa/if_el.c b/sys/i386/isa/if_el.c
index dd62365..60abe60 100644
--- a/sys/i386/isa/if_el.c
+++ b/sys/i386/isa/if_el.c
@@ -671,7 +671,7 @@ elget(buf, totlen, ifp)
cp = buf;
epkt = cp + totlen;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == 0)
return (0);
m->m_pkthdr.rcvif = ifp;
@@ -681,7 +681,7 @@ elget(buf, totlen, ifp)
mp = &top;
while (totlen > 0) {
if (top) {
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (m == 0) {
m_freem(top);
return (0);
@@ -690,7 +690,7 @@ elget(buf, totlen, ifp)
}
len = min(totlen, epkt - cp);
if (len >= MINCLSIZE) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if (m->m_flags & M_EXT)
m->m_len = len = min(len, MCLBYTES);
else
diff --git a/sys/i386/isa/if_le.c b/sys/i386/isa/if_le.c
index 3ed6a96..d3dd2f1 100644
--- a/sys/i386/isa/if_le.c
+++ b/sys/i386/isa/if_le.c
@@ -386,7 +386,7 @@ le_input(
struct ifnet *ifp = &sc->le_if;
struct mbuf *m;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
ifp->if_ierrors++;
return;
@@ -394,14 +394,14 @@ le_input(
m->m_pkthdr.len = total_len;
m->m_pkthdr.rcvif = ifp;
if (total_len + LE_XTRA > MHLEN /* >= MINCLSIZE */) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
m_free(m);
ifp->if_ierrors++;
return;
}
} else if (total_len + LE_XTRA > MHLEN && MINCLSIZE == (MHLEN+MLEN)) {
- MGET(m->m_next, M_DONTWAIT, MT_DATA);
+ MGET(m->m_next, M_NOWAIT, MT_DATA);
if (m->m_next == NULL) {
m_free(m);
ifp->if_ierrors++;
diff --git a/sys/i386/isa/if_rdp.c b/sys/i386/isa/if_rdp.c
index 574d3e7..84cd174 100644
--- a/sys/i386/isa/if_rdp.c
+++ b/sys/i386/isa/if_rdp.c
@@ -1095,7 +1095,7 @@ rdp_get_packet(struct rdp_softc *sc, unsigned len)
size_t s;
/* Allocate a header mbuf */
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return;
m->m_pkthdr.rcvif = ifp;
@@ -1109,7 +1109,7 @@ rdp_get_packet(struct rdp_softc *sc, unsigned len)
*/
if ((len + ETHER_ALIGN) > MHLEN) {
/* Attach an mbuf cluster */
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
/* Insist on getting a cluster */
if ((m->m_flags & M_EXT) == 0) {
diff --git a/sys/i386/isa/loran.c b/sys/i386/isa/loran.c
index 59c4b6e..9e32538 100644
--- a/sys/i386/isa/loran.c
+++ b/sys/i386/isa/loran.c
@@ -402,7 +402,7 @@ loranwrite(dev_t dev, struct uio * uio, int ioflag)
idx = minor(dev);
- MALLOC(this, struct datapoint *, sizeof *this, M_LORAN, M_WAITOK);
+ MALLOC(this, struct datapoint *, sizeof *this, M_LORAN, 0);
c = imin(uio->uio_resid, (int)sizeof *this);
err = uiomove((caddr_t)this, c, uio);
if (err) {
diff --git a/sys/i386/isa/pcvt/pcvt_kbd.c b/sys/i386/isa/pcvt/pcvt_kbd.c
index d104196..d3362e3 100644
--- a/sys/i386/isa/pcvt/pcvt_kbd.c
+++ b/sys/i386/isa/pcvt/pcvt_kbd.c
@@ -330,7 +330,7 @@ void ovlinit(int force)
{
if(ovlinitflag == 0 &&
(ovltbl = (Ovl_tbl *)malloc(sizeof(Ovl_tbl) * OVLTBL_SIZE,
- M_DEVBUF, M_WAITOK)) == NULL)
+ M_DEVBUF, 0)) == NULL)
panic("pcvt_kbd: malloc of Ovl_tbl failed");
for(i=0; i<OVLTBL_SIZE; i++)
diff --git a/sys/i386/isa/pcvt/pcvt_out.c b/sys/i386/isa/pcvt/pcvt_out.c
index 8c77933..d908c7b 100644
--- a/sys/i386/isa/pcvt/pcvt_out.c
+++ b/sys/i386/isa/pcvt/pcvt_out.c
@@ -1305,7 +1305,7 @@ vt_coldmalloc(void)
for(nscr = 0; nscr < PCVT_NSCREENS; nscr++)
{
if((vs[nscr].Memory = (u_short *)malloc(screen_max_size * 2,
- M_DEVBUF, M_WAITOK)) == NULL)
+ M_DEVBUF, 0)) == NULL)
{
printf("pcvt: screen memory malloc failed, "
"NSCREEN=%d, nscr=%d\n",
diff --git a/sys/i386/isa/pcvt/pcvt_sup.c b/sys/i386/isa/pcvt/pcvt_sup.c
index 4df2971..5f08f40 100644
--- a/sys/i386/isa/pcvt/pcvt_sup.c
+++ b/sys/i386/isa/pcvt/pcvt_sup.c
@@ -1409,7 +1409,7 @@ loadchar(int fontset, int character, int char_scanlines, u_char *char_table)
if(saved_charsets[fontset] == 0)
saved_charsets[fontset] =
- (u_char *)malloc(32 * 256, M_DEVBUF, M_WAITOK);
+ (u_char *)malloc(32 * 256, M_DEVBUF, 0);
if((bak = saved_charsets[fontset]))
{
diff --git a/sys/i386/isa/spkr.c b/sys/i386/isa/spkr.c
index de4c5ca..e6487c1 100644
--- a/sys/i386/isa/spkr.c
+++ b/sys/i386/isa/spkr.c
@@ -495,7 +495,7 @@ spkropen(dev, flags, fmt, td)
(void) printf("spkropen: about to perform play initialization\n");
#endif /* DEBUG */
playinit();
- spkr_inbuf = malloc(DEV_BSIZE, M_SPKR, M_WAITOK);
+ spkr_inbuf = malloc(DEV_BSIZE, M_SPKR, 0);
spkr_active = TRUE;
return(0);
}
diff --git a/sys/i386/isa/vesa.c b/sys/i386/isa/vesa.c
index 5284cec..c368e4d 100644
--- a/sys/i386/isa/vesa.c
+++ b/sys/i386/isa/vesa.c
@@ -694,7 +694,7 @@ vesa_bios_init(void)
if (modes >= vesa_vmode_max) {
vesa_vmode_max += MODE_TABLE_DELTA;
p = malloc(sizeof(*vesa_vmode)*(vesa_vmode_max + 1),
- M_DEVBUF, M_WAITOK);
+ M_DEVBUF, 0);
#if VESA_DEBUG > 1
printf("vesa_bios_init(): modes:%d, vesa_mode_max:%d\n",
modes, vesa_vmode_max);
@@ -1341,7 +1341,7 @@ get_palette(video_adapter_t *adp, int base, int count,
if (bits <= 6)
return 1;
- r = malloc(count*3, M_DEVBUF, M_WAITOK);
+ r = malloc(count*3, M_DEVBUF, 0);
g = r + count;
b = g + count;
error = vesa_bios_save_palette2(base, count, r, g, b, bits);
@@ -1378,7 +1378,7 @@ set_palette(video_adapter_t *adp, int base, int count,
|| ((bits = vesa_bios_set_dac(8)) <= 6))
return 1;
- r = malloc(count*3, M_DEVBUF, M_WAITOK);
+ r = malloc(count*3, M_DEVBUF, 0);
g = r + count;
b = g + count;
copyin(red, r, count);
diff --git a/sys/i386/isa/wt.c b/sys/i386/isa/wt.c
index ab5d4c3..37627d2 100644
--- a/sys/i386/isa/wt.c
+++ b/sys/i386/isa/wt.c
@@ -343,7 +343,7 @@ wtopen (dev_t dev, int flag, int fmt, struct thread *td)
return (ENXIO);
t->bsize = (minor (dev) & WT_BSIZE) ? 1024 : 512;
- t->buf = malloc (t->bsize, M_TEMP, M_WAITOK);
+ t->buf = malloc (t->bsize, M_TEMP, 0);
if (! t->buf)
return (EAGAIN);
diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c
index 63ff5d7..70fe108 100644
--- a/sys/i386/linux/linux_sysvec.c
+++ b/sys/i386/linux/linux_sysvec.c
@@ -731,7 +731,7 @@ linux_aout_coredump(struct thread *td, struct vnode *vp, off_t limit)
vm->vm_dsize + vm->vm_ssize) >= limit)
return (EFAULT);
tempuser = malloc(ctob(uarea_pages + kstack_pages), M_TEMP,
- M_WAITOK | M_ZERO);
+ M_ZERO);
if (tempuser == NULL)
return (ENOMEM);
PROC_LOCK(p);
diff --git a/sys/i4b/driver/i4b_ipr.c b/sys/i4b/driver/i4b_ipr.c
index 33033d2..e35b4e5 100644
--- a/sys/i4b/driver/i4b_ipr.c
+++ b/sys/i4b/driver/i4b_ipr.c
@@ -255,7 +255,7 @@ i4biprattach(void *dummy)
#ifdef IPR_VJ_USEBUFFER
if(!((sc->sc_cbuf =
- (u_char *)malloc(I4BIPRMAXMTU+128, M_DEVBUF, M_WAITOK))))
+ (u_char *)malloc(I4BIPRMAXMTU+128, M_DEVBUF, 0))))
{
panic("if_ipr.c, ipr_attach: VJ malloc failed");
}
diff --git a/sys/i4b/layer1/ihfc/i4b_ihfc_l1if.c b/sys/i4b/layer1/ihfc/i4b_ihfc_l1if.c
index c5c3d47..ee698c7 100644
--- a/sys/i4b/layer1/ihfc/i4b_ihfc_l1if.c
+++ b/sys/i4b/layer1/ihfc/i4b_ihfc_l1if.c
@@ -121,7 +121,7 @@ ihfc_ph_data_req(int unit, struct mbuf *m, int freeflag)
/* "Allow" I-frames (-hp) */
- if (freeflag == MBUF_DONTFREE) m = m_copypacket(m, M_DONTWAIT);
+ if (freeflag == MBUF_DONTFREE) m = m_copypacket(m, M_NOWAIT);
if (!_IF_QFULL(&S_IFQUEUE) && m)
{
diff --git a/sys/i4b/layer2/i4b_mbuf.c b/sys/i4b/layer2/i4b_mbuf.c
index 95f234c..c12a9ae 100644
--- a/sys/i4b/layer2/i4b_mbuf.c
+++ b/sys/i4b/layer2/i4b_mbuf.c
@@ -78,7 +78,7 @@ i4b_Dgetmbuf(int len)
return(NULL);
}
- MGETHDR(m, M_DONTWAIT, MT_I4B_D); /* get mbuf with pkthdr */
+ MGETHDR(m, M_NOWAIT, MT_I4B_D); /* get mbuf with pkthdr */
/* did we actually get the mbuf ? */
@@ -94,7 +94,7 @@ i4b_Dgetmbuf(int len)
if(len >= MHLEN)
{
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if(!(m->m_flags & M_EXT))
{
@@ -155,7 +155,7 @@ i4b_Bgetmbuf(int len)
return(NULL);
}
- MGETHDR(m, M_DONTWAIT, MT_I4B_B); /* get mbuf with pkthdr */
+ MGETHDR(m, M_NOWAIT, MT_I4B_B); /* get mbuf with pkthdr */
/* did we actually get the mbuf ? */
@@ -171,7 +171,7 @@ i4b_Bgetmbuf(int len)
if(len >= MHLEN)
{
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if(!(m->m_flags & M_EXT))
{
diff --git a/sys/i4b/layer4/i4b_i4bdrv.c b/sys/i4b/layer4/i4b_i4bdrv.c
index 1dffc0f..95afcc9 100644
--- a/sys/i4b/layer4/i4b_i4bdrv.c
+++ b/sys/i4b/layer4/i4b_i4bdrv.c
@@ -646,10 +646,10 @@ i4bioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
}
prots = malloc(r->numprotos * sizeof(struct isdn_dr_prot),
- M_DEVBUF, M_WAITOK);
+ M_DEVBUF, 0);
prots2 = malloc(r->numprotos * sizeof(struct isdn_dr_prot),
- M_DEVBUF, M_WAITOK);
+ M_DEVBUF, 0);
if(!prots || !prots2)
{
@@ -661,7 +661,7 @@ i4bioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
for(i = 0; i < r->numprotos; i++)
{
- prots2[i].microcode = malloc(prots[i].bytecount, M_DEVBUF, M_WAITOK);
+ prots2[i].microcode = malloc(prots[i].bytecount, M_DEVBUF, 0);
copyin(prots[i].microcode, prots2[i].microcode, prots[i].bytecount);
prots2[i].bytecount = prots[i].bytecount;
}
@@ -721,7 +721,7 @@ download_done:
goto diag_done;
}
- req.in_param = malloc(r->in_param_len, M_DEVBUF, M_WAITOK);
+ req.in_param = malloc(r->in_param_len, M_DEVBUF, 0);
if(!req.in_param)
{
@@ -735,7 +735,7 @@ download_done:
if(req.out_param_len)
{
- req.out_param = malloc(r->out_param_len, M_DEVBUF, M_WAITOK);
+ req.out_param = malloc(r->out_param_len, M_DEVBUF, 0);
if(!req.out_param)
{
diff --git a/sys/ia64/ia32/ia32_misc.c b/sys/ia64/ia32/ia32_misc.c
index 10eb642..8b707b4 100644
--- a/sys/ia64/ia32/ia32_misc.c
+++ b/sys/ia64/ia32/ia32_misc.c
@@ -106,7 +106,7 @@ ia32_emul_find(td, sgp, prefix, path, pbuf, cflag)
struct vattr vat;
struct vattr vatroot;
- buf = (char *) malloc(MAXPATHLEN, M_TEMP, M_WAITOK);
+ buf = (char *) malloc(MAXPATHLEN, M_TEMP, 0);
*pbuf = path;
for (ptr = buf; (*ptr = *prefix) != '\0'; ptr++, prefix++)
@@ -769,8 +769,8 @@ ia32_readv(struct thread *td, struct ia32_readv_args *uap)
osize = uap->iovcnt * sizeof (struct iovec32);
nsize = uap->iovcnt * sizeof (struct iovec);
- oio = malloc(osize, M_TEMP, M_WAITOK);
- nio = malloc(nsize, M_TEMP, M_WAITOK);
+ oio = malloc(osize, M_TEMP, 0);
+ nio = malloc(nsize, M_TEMP, 0);
error = 0;
if ((error = copyin(uap->iovp, oio, osize)))
@@ -815,8 +815,8 @@ ia32_writev(struct thread *td, struct ia32_writev_args *uap)
osize = uap->iovcnt * sizeof (struct iovec32);
nsize = uap->iovcnt * sizeof (struct iovec);
- oio = malloc(osize, M_TEMP, M_WAITOK);
- nio = malloc(nsize, M_TEMP, M_WAITOK);
+ oio = malloc(osize, M_TEMP, 0);
+ nio = malloc(nsize, M_TEMP, 0);
error = 0;
if ((error = copyin(uap->iovp, oio, osize)))
diff --git a/sys/ia64/ia64/busdma_machdep.c b/sys/ia64/ia64/busdma_machdep.c
index 6496c9b..4bf52d5 100644
--- a/sys/ia64/ia64/busdma_machdep.c
+++ b/sys/ia64/ia64/busdma_machdep.c
@@ -349,7 +349,7 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags,
if ((dmat->maxsize <= PAGE_SIZE) && dmat->lowaddr >= ptoa(Maxmem)) {
*vaddr = malloc(dmat->maxsize, M_DEVBUF,
- (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK);
+ (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : 0);
} else {
/*
* XXX Use Contigmalloc until it is merged into this facility
@@ -357,7 +357,7 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags,
* multi-seg allocations yet though.
*/
*vaddr = contigmalloc(dmat->maxsize, M_DEVBUF,
- (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK,
+ (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : 0,
0ul, dmat->lowaddr, dmat->alignment? dmat->alignment : 1ul,
dmat->boundary);
}
diff --git a/sys/ia64/ia64/mca.c b/sys/ia64/ia64/mca.c
index 064e6f5..ca24cab 100644
--- a/sys/ia64/ia64/mca.c
+++ b/sys/ia64/ia64/mca.c
@@ -109,7 +109,7 @@ ia64_mca_save_state(int type)
mtx_unlock_spin(&mca_info_block_lock);
totsz = sizeof(struct sysctl_oid) + recsz + 32;
- oidp = malloc(totsz, M_MCA, M_WAITOK|M_ZERO);
+ oidp = malloc(totsz, M_MCA, M_ZERO);
state = (char*)(oidp + 1);
name = state + recsz;
sprintf(name, "%lld", (long long)seqnr);
@@ -198,7 +198,7 @@ ia64_mca_init(void)
}
max_size = round_page(max_size);
- p = contigmalloc(max_size, M_TEMP, M_WAITOK, 0ul, 256*1024*1024 - 1,
+ p = contigmalloc(max_size, M_TEMP, 0, 0ul, 256*1024*1024 - 1,
PAGE_SIZE, 256*1024*1024);
mca_info_block = IA64_PHYS_TO_RR7(ia64_tpa((u_int64_t)p));
diff --git a/sys/ia64/ia64/mp_machdep.c b/sys/ia64/ia64/mp_machdep.c
index 4ef629b..2a7ff9f 100644
--- a/sys/ia64/ia64/mp_machdep.c
+++ b/sys/ia64/ia64/mp_machdep.c
@@ -222,7 +222,7 @@ cpu_mp_start()
* recording a trapframe.
*/
ks = contigmalloc(KSTACK_PAGES * PAGE_SIZE, M_TEMP,
- M_WAITOK,
+ 0,
0ul,
256*1024*1024 - 1,
PAGE_SIZE,
diff --git a/sys/ia64/ia64/pmap.c b/sys/ia64/ia64/pmap.c
index 13a42b6..cc522ba4 100644
--- a/sys/ia64/ia64/pmap.c
+++ b/sys/ia64/ia64/pmap.c
@@ -756,7 +756,7 @@ pmap_new_thread(struct thread *td, int pages)
* 7 address for it which makes it impossible to accidentally
* lose when recording a trapframe.
*/
- ks = contigmalloc(pages * PAGE_SIZE, M_PMAP, M_WAITOK, 0ul,
+ ks = contigmalloc(pages * PAGE_SIZE, M_PMAP, 0, 0ul,
256*1024*1024 - 1, PAGE_SIZE, 256*1024*1024);
if (ks == NULL)
panic("pmap_new_thread: could not contigmalloc %d pages\n",
@@ -1215,7 +1215,7 @@ pmap_find_pte(vm_offset_t va)
pte = pmap_find_vhpt(va);
if (!pte) {
- pte = uma_zalloc(ptezone, M_WAITOK);
+ pte = uma_zalloc(ptezone, 0);
pte->pte_p = 0;
}
return pte;
diff --git a/sys/ia64/ia64/sscdisk.c b/sys/ia64/ia64/sscdisk.c
index 1755300..74f10f6 100644
--- a/sys/ia64/ia64/sscdisk.c
+++ b/sys/ia64/ia64/sscdisk.c
@@ -247,7 +247,7 @@ ssccreate(int unit)
if (sc->unit == unit)
return (NULL);
}
- MALLOC(sc, struct ssc_s *,sizeof(*sc), M_SSC, M_WAITOK | M_ZERO);
+ MALLOC(sc, struct ssc_s *,sizeof(*sc), M_SSC, M_ZERO);
LIST_INSERT_HEAD(&ssc_softc_list, sc, list);
sc->unit = unit;
bioq_init(&sc->bio_queue);
diff --git a/sys/isofs/cd9660/cd9660_vfsops.c b/sys/isofs/cd9660/cd9660_vfsops.c
index a44df4c..f916117 100644
--- a/sys/isofs/cd9660/cd9660_vfsops.c
+++ b/sys/isofs/cd9660/cd9660_vfsops.c
@@ -411,7 +411,7 @@ iso_mountfs(devvp, mp, td, argp)
pri_sierra->root_directory_record:
pri->root_directory_record);
- isomp = malloc(sizeof *isomp, M_ISOFSMNT, M_WAITOK | M_ZERO);
+ isomp = malloc(sizeof *isomp, M_ISOFSMNT, M_ZERO);
isomp->logical_block_size = logical_block_size;
isomp->volume_space_size =
isonum_733 (high_sierra?
@@ -712,7 +712,7 @@ cd9660_vget_internal(mp, ino, flags, vpp, relocated, isodir)
return (error);
}
MALLOC(ip, struct iso_node *, sizeof(struct iso_node), M_ISOFSNODE,
- M_WAITOK | M_ZERO);
+ M_ZERO);
vp->v_data = ip;
ip->i_vnode = vp;
ip->i_dev = dev;
diff --git a/sys/isofs/cd9660/cd9660_vnops.c b/sys/isofs/cd9660/cd9660_vnops.c
index 0b892e6..062c22a 100644
--- a/sys/isofs/cd9660/cd9660_vnops.c
+++ b/sys/isofs/cd9660/cd9660_vnops.c
@@ -194,7 +194,7 @@ cd9660_getattr(ap)
struct uio auio;
char *cp;
- MALLOC(cp, char *, MAXPATHLEN, M_TEMP, M_WAITOK);
+ MALLOC(cp, char *, MAXPATHLEN, M_TEMP, 0);
aiov.iov_base = cp;
aiov.iov_len = MAXPATHLEN;
auio.uio_iov = &aiov;
@@ -451,7 +451,7 @@ cd9660_readdir(ap)
imp = dp->i_mnt;
bmask = imp->im_bmask;
- MALLOC(idp, struct isoreaddir *, sizeof(*idp), M_TEMP, M_WAITOK);
+ MALLOC(idp, struct isoreaddir *, sizeof(*idp), M_TEMP, 0);
idp->saveent.d_namlen = idp->assocent.d_namlen = 0;
/*
* XXX
@@ -468,7 +468,7 @@ cd9660_readdir(ap)
*/
ncookies = uio->uio_resid / 16;
MALLOC(cookies, u_long *, ncookies * sizeof(u_int), M_TEMP,
- M_WAITOK);
+ 0);
idp->cookies = cookies;
idp->ncookies = ncookies;
}
@@ -671,7 +671,7 @@ cd9660_readlink(ap)
if (uio->uio_segflg == UIO_SYSSPACE)
symname = uio->uio_iov->iov_base;
else
- symname = uma_zalloc(namei_zone, M_WAITOK);
+ symname = uma_zalloc(namei_zone, 0);
/*
* Ok, we just gathering a symbolic name in SL record.
diff --git a/sys/kern/imgact_aout.c b/sys/kern/imgact_aout.c
index e96054a..a11c17d 100644
--- a/sys/kern/imgact_aout.c
+++ b/sys/kern/imgact_aout.c
@@ -276,7 +276,7 @@ aout_coredump(td, vp, limit)
+ vm->vm_dsize + vm->vm_ssize) >= limit)
return (EFAULT);
tempuser = malloc(ctob(uarea_pages + kstack_pages), M_TEMP,
- M_WAITOK | M_ZERO);
+ M_ZERO);
if (tempuser == NULL)
return (ENOMEM);
PROC_LOCK(p);
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
index f6b0cb2..e0d49d4 100644
--- a/sys/kern/imgact_elf.c
+++ b/sys/kern/imgact_elf.c
@@ -516,7 +516,7 @@ __elfN(load_file)(struct proc *p, const char *file, u_long *addr,
if (curthread->td_proc != p)
panic("elf_load_file - thread"); /* XXXKSE DIAGNOSTIC */
- tempdata = malloc(sizeof(*tempdata), M_TEMP, M_WAITOK);
+ tempdata = malloc(sizeof(*tempdata), M_TEMP, 0);
nd = &tempdata->nd;
attr = &tempdata->attr;
imgp = &tempdata->image_params;
@@ -812,7 +812,7 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp)
imgp->proc->p_sysent = sv;
if (interp != NULL) {
- path = malloc(MAXPATHLEN, M_TEMP, M_WAITOK);
+ path = malloc(MAXPATHLEN, M_TEMP, 0);
snprintf(path, MAXPATHLEN, "%s%s", brand_info->emul_path,
interp);
if ((error = __elfN(load_file)(imgp->proc, path, &addr,
@@ -831,7 +831,7 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp)
/*
* Construct auxargs table (used by the fixup routine)
*/
- elf_auxargs = malloc(sizeof(Elf_Auxargs), M_TEMP, M_WAITOK);
+ elf_auxargs = malloc(sizeof(Elf_Auxargs), M_TEMP, 0);
elf_auxargs->execfd = -1;
elf_auxargs->phdr = proghdr;
elf_auxargs->phent = hdr->e_phentsize;
@@ -951,7 +951,7 @@ __elfN(coredump)(td, vp, limit)
* Allocate memory for building the header, fill it up,
* and write it out.
*/
- hdr = malloc(hdrsize, M_TEMP, M_WAITOK);
+ hdr = malloc(hdrsize, M_TEMP, 0);
if (hdr == NULL) {
return (EINVAL);
}
@@ -1113,7 +1113,7 @@ __elfN(corehdr)(td, vp, cred, numsegs, hdr, hdrsize)
prfpregset_t *fpregset;
prpsinfo_t *psinfo;
- tempdata = malloc(sizeof(*tempdata), M_TEMP, M_ZERO | M_WAITOK);
+ tempdata = malloc(sizeof(*tempdata), M_TEMP, M_ZERO | 0);
status = &tempdata->status;
fpregset = &tempdata->fpregset;
psinfo = &tempdata->psinfo;
diff --git a/sys/kern/inflate.c b/sys/kern/inflate.c
index 2a16ba2..e814294 100644
--- a/sys/kern/inflate.c
+++ b/sys/kern/inflate.c
@@ -551,7 +551,7 @@ huft_build(glbl, b, n, s, d, e, t, m)
l[h] = j; /* set table size in stack */
/* allocate and link in new table */
- if ((q = (struct huft *) malloc((z + 1) * sizeof(struct huft), M_GZIP, M_WAITOK)) ==
+ if ((q = (struct huft *) malloc((z + 1) * sizeof(struct huft), M_GZIP, 0)) ==
(struct huft *) NULL) {
if (h)
huft_free(glbl, u[0]);
@@ -1049,7 +1049,7 @@ inflate(glbl)
u_char *p = NULL;
if (!glbl->gz_slide)
- p = glbl->gz_slide = malloc(GZ_WSIZE, M_GZIP, M_WAITOK);
+ p = glbl->gz_slide = malloc(GZ_WSIZE, M_GZIP, 0);
#endif
if (!glbl->gz_slide)
#ifdef _KERNEL
diff --git a/sys/kern/kern_alq.c b/sys/kern/kern_alq.c
index 7ddacc8..7e86b55 100644
--- a/sys/kern/kern_alq.c
+++ b/sys/kern/kern_alq.c
@@ -352,9 +352,9 @@ alq_open(struct alq **alqp, const char *file, int size, int count)
/* We just unlock so we hold a reference */
VOP_UNLOCK(nd.ni_vp, 0, td);
- alq = malloc(sizeof(*alq), M_ALD, M_WAITOK|M_ZERO);
- alq->aq_entbuf = malloc(count * size, M_ALD, M_WAITOK|M_ZERO);
- alq->aq_first = malloc(sizeof(*ale) * count, M_ALD, M_WAITOK|M_ZERO);
+ alq = malloc(sizeof(*alq), M_ALD, M_ZERO);
+ alq->aq_entbuf = malloc(count * size, M_ALD, M_ZERO);
+ alq->aq_first = malloc(sizeof(*ale) * count, M_ALD, M_ZERO);
alq->aq_vp = nd.ni_vp;
alq->aq_cred = crhold(td->td_ucred);
alq->aq_entmax = count;
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index 835ec39..a05eb25 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -667,7 +667,7 @@ fsetown(pgid, sigiop)
ret = 0;
/* Allocate and fill in the new sigio out of locks. */
- MALLOC(sigio, struct sigio *, sizeof(struct sigio), M_SIGIO, M_WAITOK);
+ MALLOC(sigio, struct sigio *, sizeof(struct sigio), M_SIGIO, 0);
sigio->sio_pgid = pgid;
sigio->sio_ucred = crhold(curthread->td_ucred);
sigio->sio_myref = sigiop;
@@ -1052,7 +1052,7 @@ fdalloc(td, want, result)
* than KMEM_ZMAX bytes. uma_large_malloc() requires Giant.
*/
mtx_lock(&Giant);
- newofile = malloc(nfiles * OFILESIZE, M_FILEDESC, M_WAITOK);
+ newofile = malloc(nfiles * OFILESIZE, M_FILEDESC, 0);
mtx_unlock(&Giant);
/*
@@ -1143,7 +1143,7 @@ falloc(td, resultfp, resultfd)
struct file *fp, *fq;
int error, i;
- fp = uma_zalloc(file_zone, M_WAITOK | M_ZERO);
+ fp = uma_zalloc(file_zone, M_ZERO);
sx_xlock(&filelist_lock);
if (nfiles >= maxfiles) {
sx_xunlock(&filelist_lock);
@@ -1213,7 +1213,7 @@ fdinit(fdp)
struct filedesc0 *newfdp;
MALLOC(newfdp, struct filedesc0 *, sizeof(struct filedesc0),
- M_FILEDESC, M_WAITOK | M_ZERO);
+ M_FILEDESC, M_ZERO);
mtx_init(&newfdp->fd_fd.fd_mtx, FILEDESC_LOCK_DESC, NULL, MTX_DEF);
newfdp->fd_fd.fd_cdir = fdp->fd_cdir;
if (newfdp->fd_fd.fd_cdir)
@@ -1269,7 +1269,7 @@ fdcopy(fdp)
FILEDESC_UNLOCK(fdp);
MALLOC(newfdp, struct filedesc *, sizeof(struct filedesc0),
- M_FILEDESC, M_WAITOK);
+ M_FILEDESC, 0);
FILEDESC_LOCK(fdp);
bcopy(fdp, newfdp, sizeof(struct filedesc));
FILEDESC_UNLOCK(fdp);
@@ -1309,7 +1309,7 @@ retry:
i /= 2;
FILEDESC_UNLOCK(fdp);
MALLOC(newfdp->fd_ofiles, struct file **, i * OFILESIZE,
- M_FILEDESC, M_WAITOK);
+ M_FILEDESC, 0);
FILEDESC_LOCK(fdp);
newfdp->fd_lastfile = fdp->fd_lastfile;
newfdp->fd_nfiles = fdp->fd_nfiles;
diff --git a/sys/kern/kern_environment.c b/sys/kern/kern_environment.c
index 98f5fc6..70ba635 100644
--- a/sys/kern/kern_environment.c
+++ b/sys/kern/kern_environment.c
@@ -131,7 +131,7 @@ kenv(td, uap)
return (error);
}
- name = malloc(KENV_MNAMELEN, M_TEMP, M_WAITOK);
+ name = malloc(KENV_MNAMELEN, M_TEMP, 0);
error = copyinstr(uap->name, name, KENV_MNAMELEN, NULL);
if (error)
@@ -166,7 +166,7 @@ kenv(td, uap)
}
if (len > KENV_MVALLEN)
len = KENV_MVALLEN;
- value = malloc(len, M_TEMP, M_WAITOK);
+ value = malloc(len, M_TEMP, 0);
error = copyinstr(uap->value, value, len, NULL);
if (error) {
free(value, M_TEMP);
@@ -207,11 +207,11 @@ init_dynamic_kenv(void *data __unused)
char *cp;
int len, i;
- kenvp = malloc(KENV_SIZE * sizeof(char *), M_KENV, M_WAITOK | M_ZERO);
+ kenvp = malloc(KENV_SIZE * sizeof(char *), M_KENV, M_ZERO);
i = 0;
for (cp = kern_envp; cp != NULL; cp = kernenv_next(cp)) {
len = strlen(cp) + 1;
- kenvp[i] = malloc(len, M_KENV, M_WAITOK);
+ kenvp[i] = malloc(len, M_KENV, 0);
strcpy(kenvp[i++], cp);
}
kenvp[i] = NULL;
@@ -290,7 +290,7 @@ getenv(const char *name)
strcpy(buf, cp);
sx_sunlock(&kenv_lock);
len = strlen(buf) + 1;
- ret = malloc(len, M_KENV, M_WAITOK);
+ ret = malloc(len, M_KENV, 0);
strcpy(ret, buf);
} else {
sx_sunlock(&kenv_lock);
@@ -337,7 +337,7 @@ setenv(const char *name, const char *value)
vallen = strlen(value) + 1;
if (vallen > KENV_MVALLEN)
return (-1);
- buf = malloc(namelen + vallen, M_KENV, M_WAITOK);
+ buf = malloc(namelen + vallen, M_KENV, 0);
sprintf(buf, "%s=%s", name, value);
sx_xlock(&kenv_lock);
diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c
index d360c5c..aecb9f9 100644
--- a/sys/kern/kern_event.c
+++ b/sys/kern/kern_event.c
@@ -329,7 +329,7 @@ filt_timerattach(struct knote *kn)
kn->kn_flags |= EV_CLEAR; /* automatically set */
MALLOC(calloutp, struct callout *, sizeof(*calloutp),
- M_KQUEUE, M_WAITOK);
+ M_KQUEUE, 0);
callout_init(calloutp, 0);
callout_reset(calloutp, tticks, filt_timerexpire, kn);
kn->kn_hook = calloutp;
@@ -371,7 +371,7 @@ kqueue(struct thread *td, struct kqueue_args *uap)
error = falloc(td, &fp, &fd);
if (error)
goto done2;
- kq = malloc(sizeof(struct kqueue), M_KQUEUE, M_WAITOK | M_ZERO);
+ kq = malloc(sizeof(struct kqueue), M_KQUEUE, M_ZERO);
TAILQ_INIT(&kq->kq_head);
FILE_LOCK(fp);
fp->f_flag = FREAD | FWRITE;
@@ -979,7 +979,7 @@ knote_attach(struct knote *kn, struct filedesc *fdp)
size += KQEXTENT;
FILEDESC_UNLOCK(fdp);
MALLOC(list, struct klist *,
- size * sizeof(struct klist *), M_KQUEUE, M_WAITOK);
+ size * sizeof(struct klist *), M_KQUEUE, 0);
FILEDESC_LOCK(fdp);
if (fdp->fd_knlistsize > kn->kn_id) {
FREE(list, M_KQUEUE);
@@ -1073,7 +1073,7 @@ SYSINIT(knote, SI_SUB_PSEUDO, SI_ORDER_ANY, knote_init, NULL)
static struct knote *
knote_alloc(void)
{
- return ((struct knote *)uma_zalloc(knote_zone, M_WAITOK));
+ return ((struct knote *)uma_zalloc(knote_zone, 0));
}
static void
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index 17e18b2..33a0764 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -428,7 +428,7 @@ interpret:
oldprocsig = p->p_procsig;
PROC_UNLOCK(p);
MALLOC(newprocsig, struct procsig *, sizeof(struct procsig),
- M_SUBPROC, M_WAITOK);
+ M_SUBPROC, 0);
bcopy(oldprocsig, newprocsig, sizeof(*newprocsig));
newprocsig->ps_refcnt = 1;
oldprocsig->ps_refcnt--;
@@ -1174,7 +1174,7 @@ exec_register(execsw_arg)
if (execsw)
for (es = execsw; *es; es++)
count++;
- newexecsw = malloc(count * sizeof(*es), M_TEMP, M_WAITOK);
+ newexecsw = malloc(count * sizeof(*es), M_TEMP, 0);
if (newexecsw == NULL)
return (ENOMEM);
xs = newexecsw;
@@ -1208,7 +1208,7 @@ exec_unregister(execsw_arg)
for (es = execsw; *es; es++)
if (*es != execsw_arg)
count++;
- newexecsw = malloc(count * sizeof(*es), M_TEMP, M_WAITOK);
+ newexecsw = malloc(count * sizeof(*es), M_TEMP, 0);
if (newexecsw == NULL)
return (ENOMEM);
xs = newexecsw;
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index c34f26f..0b2c2e8 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -241,7 +241,7 @@ exit1(td, rv)
stopprofclock(p);
MALLOC(p->p_ru, struct rusage *, sizeof(struct rusage),
- M_ZOMBIE, M_WAITOK);
+ M_ZOMBIE, 0);
/*
* If parent is waiting for us to exit or exec,
* P_PPWAIT is set; we will wakeup the parent below.
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
index 7361757..f84afa8 100644
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -306,7 +306,7 @@ fork1(td, flags, pages, procp)
}
/* Allocate new proc. */
- newproc = uma_zalloc(proc_zone, M_WAITOK);
+ newproc = uma_zalloc(proc_zone, 0);
#ifdef MAC
mac_init_proc(newproc);
#endif
@@ -431,12 +431,12 @@ again:
*/
if (flags & RFSIGSHARE) {
MALLOC(newsigacts, struct sigacts *,
- sizeof(struct sigacts), M_SUBPROC, M_WAITOK);
+ sizeof(struct sigacts), M_SUBPROC, 0);
newprocsig = NULL;
} else {
newsigacts = NULL;
MALLOC(newprocsig, struct procsig *, sizeof(struct procsig),
- M_SUBPROC, M_WAITOK);
+ M_SUBPROC, 0);
}
/*
diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c
index cf59169..75b0627 100644
--- a/sys/kern/kern_intr.c
+++ b/sys/kern/kern_intr.c
@@ -176,7 +176,7 @@ ithread_create(struct ithd **ithread, int vector, int flags,
if ((flags & ~IT_SOFT) != 0)
return (EINVAL);
- ithd = malloc(sizeof(struct ithd), M_ITHREAD, M_WAITOK | M_ZERO);
+ ithd = malloc(sizeof(struct ithd), M_ITHREAD, M_ZERO);
ithd->it_vector = vector;
ithd->it_disable = disable;
ithd->it_enable = enable;
@@ -248,7 +248,7 @@ ithread_add_handler(struct ithd* ithread, const char *name,
if ((flags & INTR_FAST) !=0)
flags |= INTR_EXCL;
- ih = malloc(sizeof(struct intrhand), M_ITHREAD, M_WAITOK | M_ZERO);
+ ih = malloc(sizeof(struct intrhand), M_ITHREAD, M_ZERO);
ih->ih_handler = handler;
ih->ih_argument = arg;
ih->ih_name = name;
diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c
index 15f4b36..f367d4f 100644
--- a/sys/kern/kern_jail.c
+++ b/sys/kern/kern_jail.c
@@ -72,7 +72,7 @@ jail(td, uap)
if (j.version != 0)
return (EINVAL);
- MALLOC(pr, struct prison *, sizeof *pr , M_PRISON, M_WAITOK | M_ZERO);
+ MALLOC(pr, struct prison *, sizeof *pr , M_PRISON, M_ZERO);
mtx_init(&pr->pr_mtx, "jail mutex", NULL, MTX_DEF);
pr->pr_securelevel = securelevel;
error = copyinstr(j.hostname, &pr->pr_host, sizeof pr->pr_host, 0);
diff --git a/sys/kern/kern_kse.c b/sys/kern/kern_kse.c
index 31ed03e..78bce30 100644
--- a/sys/kern/kern_kse.c
+++ b/sys/kern/kern_kse.c
@@ -729,7 +729,7 @@ thread_reap(void)
struct ksegrp *
ksegrp_alloc(void)
{
- return (uma_zalloc(ksegrp_zone, M_WAITOK));
+ return (uma_zalloc(ksegrp_zone, 0));
}
/*
@@ -738,7 +738,7 @@ ksegrp_alloc(void)
struct kse *
kse_alloc(void)
{
- return (uma_zalloc(kse_zone, M_WAITOK));
+ return (uma_zalloc(kse_zone, 0));
}
/*
@@ -748,7 +748,7 @@ struct thread *
thread_alloc(void)
{
thread_reap(); /* check if any zombies to get */
- return (uma_zalloc(thread_zone, M_WAITOK));
+ return (uma_zalloc(thread_zone, 0));
}
/*
diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c
index bb4642c..23f6f7b 100644
--- a/sys/kern/kern_ktrace.c
+++ b/sys/kern/kern_ktrace.c
@@ -131,7 +131,7 @@ ktrace_init(void *dummy)
STAILQ_INIT(&ktr_todo);
STAILQ_INIT(&ktr_free);
for (i = 0; i < ktr_requestpool; i++) {
- req = malloc(sizeof(struct ktr_request), M_KTRACE, M_WAITOK);
+ req = malloc(sizeof(struct ktr_request), M_KTRACE, 0);
STAILQ_INSERT_HEAD(&ktr_free, req, ktr_list);
}
kthread_create(ktr_loop, NULL, NULL, RFHIGHPID, 0, "ktrace");
@@ -199,7 +199,7 @@ ktrace_resize_pool(uint newsize)
while (ktr_requestpool < newsize) {
mtx_unlock(&ktrace_mtx);
req = malloc(sizeof(struct ktr_request), M_KTRACE,
- M_WAITOK);
+ 0);
mtx_lock(&ktrace_mtx);
STAILQ_INSERT_HEAD(&ktr_free, req, ktr_list);
ktr_requestpool++;
@@ -321,7 +321,7 @@ ktrsyscall(code, narg, args)
buflen = sizeof(register_t) * narg;
if (buflen > 0) {
- buf = malloc(buflen, M_KTRACE, M_WAITOK);
+ buf = malloc(buflen, M_KTRACE, 0);
bcopy(args, buf, buflen);
}
req = ktr_getrequest(KTR_SYSCALL);
@@ -371,7 +371,7 @@ ktrnamei(path)
namelen = strlen(path);
if (namelen > 0) {
- buf = malloc(namelen, M_KTRACE, M_WAITOK);
+ buf = malloc(namelen, M_KTRACE, 0);
bcopy(path, buf, namelen);
}
req = ktr_getrequest(KTR_NAMEI);
@@ -413,7 +413,7 @@ ktrgenio(fd, rw, uio, error)
uio->uio_offset = 0;
uio->uio_rw = UIO_WRITE;
datalen = imin(uio->uio_resid, ktr_geniosize);
- buf = malloc(datalen, M_KTRACE, M_WAITOK);
+ buf = malloc(datalen, M_KTRACE, 0);
if (uiomove(buf, datalen, uio)) {
free(buf, M_KTRACE);
return;
@@ -625,7 +625,7 @@ utrace(td, uap)
return (0);
if (uap->len > KTR_USER_MAXLEN)
return (EINVAL);
- cp = malloc(uap->len, M_KTRACE, M_WAITOK);
+ cp = malloc(uap->len, M_KTRACE, 0);
error = copyin(uap->addr, cp, uap->len);
if (error) {
free(cp, M_KTRACE);
diff --git a/sys/kern/kern_linker.c b/sys/kern/kern_linker.c
index 3c38bac..fcecdd9 100644
--- a/sys/kern/kern_linker.c
+++ b/sys/kern/kern_linker.c
@@ -110,7 +110,7 @@ linker_strdup(const char *str)
{
char *result;
- if ((result = malloc((strlen(str) + 1), M_LINKER, M_WAITOK)) != NULL)
+ if ((result = malloc((strlen(str) + 1), M_LINKER, 0)) != NULL)
strcpy(result, str);
return (result);
}
@@ -402,7 +402,7 @@ linker_find_file_by_name(const char *filename)
linker_file_t lf = 0;
char *koname;
- koname = malloc(strlen(filename) + 4, M_LINKER, M_WAITOK);
+ koname = malloc(strlen(filename) + 4, M_LINKER, 0);
if (koname == NULL)
goto out;
sprintf(koname, "%s.ko", filename);
@@ -444,7 +444,7 @@ linker_make_file(const char *pathname, linker_class_t lc)
filename = linker_basename(pathname);
KLD_DPF(FILE, ("linker_make_file: new file, filename=%s\n", filename));
- lf = (linker_file_t)kobj_create((kobj_class_t)lc, M_LINKER, M_WAITOK);
+ lf = (linker_file_t)kobj_create((kobj_class_t)lc, M_LINKER, 0);
if (lf == NULL)
goto out;
lf->refs = 1;
@@ -558,7 +558,7 @@ linker_file_add_dependency(linker_file_t file, linker_file_t dep)
linker_file_t *newdeps;
newdeps = malloc((file->ndeps + 1) * sizeof(linker_file_t *),
- M_LINKER, M_WAITOK | M_ZERO);
+ M_LINKER, M_ZERO);
if (newdeps == NULL)
return (ENOMEM);
@@ -644,7 +644,7 @@ linker_file_lookup_symbol(linker_file_t file, const char *name, int deps)
common_size = (common_size + sizeof(int) - 1) & -sizeof(int);
cp = malloc(sizeof(struct common_symbol)
+ common_size + strlen(name) + 1, M_LINKER,
- M_WAITOK | M_ZERO);
+ M_ZERO);
if (cp == NULL) {
KLD_DPF(SYM, ("linker_file_lookup_symbol: nomem\n"));
return (0);
@@ -753,7 +753,7 @@ kldload(struct thread *td, struct kldload_args *uap)
if ((error = suser(td)) != 0)
goto out;
- pathname = malloc(MAXPATHLEN, M_TEMP, M_WAITOK);
+ pathname = malloc(MAXPATHLEN, M_TEMP, 0);
if ((error = copyinstr(uap->file, pathname, MAXPATHLEN, NULL)) != 0)
goto out;
@@ -839,7 +839,7 @@ kldfind(struct thread *td, struct kldfind_args *uap)
mtx_lock(&Giant);
td->td_retval[0] = -1;
- pathname = malloc(MAXPATHLEN, M_TEMP, M_WAITOK);
+ pathname = malloc(MAXPATHLEN, M_TEMP, 0);
if ((error = copyinstr(uap->file, pathname, MAXPATHLEN, NULL)) != 0)
goto out;
@@ -1011,7 +1011,7 @@ kldsym(struct thread *td, struct kldsym_args *uap)
error = EINVAL;
goto out;
}
- symstr = malloc(MAXPATHLEN, M_TEMP, M_WAITOK);
+ symstr = malloc(MAXPATHLEN, M_TEMP, 0);
if ((error = copyinstr(lookup.symname, symstr, MAXPATHLEN, NULL)) != 0)
goto out;
if (uap->fileid != 0) {
@@ -1381,7 +1381,7 @@ linker_lookup_file(const char *path, int pathlen, const char *name,
sep = (path[pathlen - 1] != '/') ? "/" : "";
reclen = pathlen + strlen(sep) + namelen + extlen + 1;
- result = malloc(reclen, M_LINKER, M_WAITOK);
+ result = malloc(reclen, M_LINKER, 0);
for (cpp = linker_ext_list; *cpp; cpp++) {
snprintf(result, reclen, "%.*s%s%.*s%s", pathlen, path, sep,
namelen, name, *cpp);
@@ -1433,7 +1433,7 @@ linker_hints_lookup(const char *path, int pathlen, const char *modname,
sep = (path[pathlen - 1] != '/') ? "/" : "";
reclen = imax(modnamelen, strlen(linker_hintfile)) + pathlen +
strlen(sep) + 1;
- pathbuf = malloc(reclen, M_LINKER, M_WAITOK);
+ pathbuf = malloc(reclen, M_LINKER, 0);
snprintf(pathbuf, reclen, "%.*s%s%s", pathlen, path, sep,
linker_hintfile);
@@ -1456,7 +1456,7 @@ linker_hints_lookup(const char *path, int pathlen, const char *modname,
printf("hints file too large %ld\n", (long)vattr.va_size);
goto bad;
}
- hints = malloc(vattr.va_size, M_TEMP, M_WAITOK);
+ hints = malloc(vattr.va_size, M_TEMP, 0);
if (hints == NULL)
goto bad;
error = vn_rdwr(UIO_READ, nd.ni_vp, (caddr_t)hints, vattr.va_size, 0,
diff --git a/sys/kern/kern_lockf.c b/sys/kern/kern_lockf.c
index cb1fad4..b5d4204 100644
--- a/sys/kern/kern_lockf.c
+++ b/sys/kern/kern_lockf.c
@@ -160,7 +160,7 @@ lf_advlock(ap, head, size)
/*
* Create the lockf structure
*/
- MALLOC(lock, struct lockf *, sizeof *lock, M_LOCKF, M_WAITOK);
+ MALLOC(lock, struct lockf *, sizeof *lock, M_LOCKF, 0);
lock->lf_start = start;
lock->lf_end = end;
lock->lf_id = ap->a_id;
@@ -726,7 +726,7 @@ lf_split(lock1, lock2)
* Make a new lock consisting of the last part of
* the encompassing lock
*/
- MALLOC(splitlock, struct lockf *, sizeof *splitlock, M_LOCKF, M_WAITOK);
+ MALLOC(splitlock, struct lockf *, sizeof *splitlock, M_LOCKF, 0);
bcopy(lock1, splitlock, sizeof *splitlock);
splitlock->lf_start = lock2->lf_end + 1;
TAILQ_INIT(&splitlock->lf_blkhd);
diff --git a/sys/kern/kern_mac.c b/sys/kern/kern_mac.c
index e9d9eeb..b4df06f 100644
--- a/sys/kern/kern_mac.c
+++ b/sys/kern/kern_mac.c
@@ -758,7 +758,7 @@ mac_init_pipe(struct pipe *pipe)
{
struct label *label;
- label = malloc(sizeof(struct label), M_MACPIPELABEL, M_ZERO|M_WAITOK);
+ label = malloc(sizeof(struct label), M_MACPIPELABEL, M_ZERO);
pipe->pipe_label = label;
pipe->pipe_peer->pipe_label = label;
mac_init_pipe_label(label);
@@ -1323,7 +1323,7 @@ mac_execve_enter(struct image_params *imgp, struct mac *mac_p,
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -2727,16 +2727,16 @@ mac_ioctl_ifnet_get(struct ucred *cred, struct ifreq *ifr,
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_ifnet_label(&ifnet->if_label, elements,
- buffer, mac.m_buflen, M_WAITOK);
+ buffer, mac.m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac.m_string, strlen(buffer)+1);
@@ -2763,7 +2763,7 @@ mac_ioctl_ifnet_set(struct ucred *cred, struct ifreq *ifr,
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -2839,14 +2839,14 @@ mac_setsockopt_label_set(struct ucred *cred, struct socket *so,
if (error)
return (error);
- buffer = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac->m_buflen, M_MACTEMP, 0);
error = copyinstr(mac->m_string, buffer, mac->m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
return (error);
}
- mac_init_socket_label(&intlabel, M_WAITOK);
+ mac_init_socket_label(&intlabel, 0);
error = mac_internalize_socket_label(&intlabel, buffer);
free(buffer, M_MACTEMP);
if (error) {
@@ -2893,16 +2893,16 @@ mac_getsockopt_label_get(struct ucred *cred, struct socket *so,
if (error)
return (error);
- elements = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac->m_buflen, M_MACTEMP, 0);
error = copyinstr(mac->m_string, elements, mac->m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac->m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_socket_label(&so->so_label, elements,
- buffer, mac->m_buflen, M_WAITOK);
+ buffer, mac->m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac->m_string, strlen(buffer)+1);
@@ -2923,16 +2923,16 @@ mac_getsockopt_peerlabel_get(struct ucred *cred, struct socket *so,
if (error)
return (error);
- elements = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac->m_buflen, M_MACTEMP, 0);
error = copyinstr(mac->m_string, elements, mac->m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac->m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_socket_peer_label(&so->so_peerlabel,
- elements, buffer, mac->m_buflen, M_WAITOK);
+ elements, buffer, mac->m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac->m_string, strlen(buffer)+1);
@@ -3040,7 +3040,7 @@ __mac_get_pid(struct thread *td, struct __mac_get_pid_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
@@ -3048,9 +3048,9 @@ __mac_get_pid(struct thread *td, struct __mac_get_pid_args *uap)
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_cred_label(&tcred->cr_label, elements,
- buffer, mac.m_buflen, M_WAITOK);
+ buffer, mac.m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac.m_string, strlen(buffer)+1);
@@ -3078,16 +3078,16 @@ __mac_get_proc(struct thread *td, struct __mac_get_proc_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_cred_label(&td->td_ucred->cr_label,
- elements, buffer, mac.m_buflen, M_WAITOK);
+ elements, buffer, mac.m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac.m_string, strlen(buffer)+1);
@@ -3117,7 +3117,7 @@ __mac_set_proc(struct thread *td, struct __mac_set_proc_args *uap)
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -3194,14 +3194,14 @@ __mac_get_fd(struct thread *td, struct __mac_get_fd_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
mtx_lock(&Giant); /* VFS */
error = fget(td, uap->fd, &fp);
if (error)
@@ -3241,12 +3241,12 @@ __mac_get_fd(struct thread *td, struct __mac_get_fd_args *uap)
case DTYPE_VNODE:
if (error == 0)
error = mac_externalize_vnode_label(&intlabel,
- elements, buffer, mac.m_buflen, M_WAITOK);
+ elements, buffer, mac.m_buflen, 0);
mac_destroy_vnode_label(&intlabel);
break;
case DTYPE_PIPE:
error = mac_externalize_pipe_label(&intlabel, elements,
- buffer, mac.m_buflen, M_WAITOK);
+ buffer, mac.m_buflen, 0);
mac_destroy_pipe_label(&intlabel);
break;
default:
@@ -3284,14 +3284,14 @@ __mac_get_file(struct thread *td, struct __mac_get_file_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
mtx_lock(&Giant); /* VFS */
NDINIT(&nd, LOOKUP, LOCKLEAF | FOLLOW, UIO_USERSPACE, uap->path_p,
td);
@@ -3302,7 +3302,7 @@ __mac_get_file(struct thread *td, struct __mac_get_file_args *uap)
mac_init_vnode_label(&intlabel);
mac_copy_vnode_label(&nd.ni_vp->v_label, &intlabel);
error = mac_externalize_vnode_label(&intlabel, elements, buffer,
- mac.m_buflen, M_WAITOK);
+ mac.m_buflen, 0);
NDFREE(&nd, 0);
mac_destroy_vnode_label(&intlabel);
@@ -3339,14 +3339,14 @@ __mac_get_link(struct thread *td, struct __mac_get_link_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
mtx_lock(&Giant); /* VFS */
NDINIT(&nd, LOOKUP, LOCKLEAF | NOFOLLOW, UIO_USERSPACE, uap->path_p,
td);
@@ -3357,7 +3357,7 @@ __mac_get_link(struct thread *td, struct __mac_get_link_args *uap)
mac_init_vnode_label(&intlabel);
mac_copy_vnode_label(&nd.ni_vp->v_label, &intlabel);
error = mac_externalize_vnode_label(&intlabel, elements, buffer,
- mac.m_buflen, M_WAITOK);
+ mac.m_buflen, 0);
NDFREE(&nd, 0);
mac_destroy_vnode_label(&intlabel);
@@ -3396,7 +3396,7 @@ __mac_set_fd(struct thread *td, struct __mac_set_fd_args *uap)
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -3482,7 +3482,7 @@ __mac_set_file(struct thread *td, struct __mac_set_file_args *uap)
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -3538,7 +3538,7 @@ __mac_set_link(struct thread *td, struct __mac_set_link_args *uap)
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c
index 577b5da..6122a52 100644
--- a/sys/kern/kern_malloc.c
+++ b/sys/kern/kern_malloc.c
@@ -170,7 +170,7 @@ malloc(size, type, flags)
#endif
if (!(flags & M_NOWAIT))
KASSERT(curthread->td_intr_nesting_level == 0,
- ("malloc(M_WAITOK) in interrupt context"));
+ ("malloc() without M_NOWAIT in interrupt context"));
if (size <= KMEM_ZMAX) {
if (size & KMEM_ZMASK)
size = (size & ~KMEM_ZMASK) + KMEM_ZBASE;
@@ -203,7 +203,7 @@ out:
mtx_unlock(&ksp->ks_mtx);
if (!(flags & M_NOWAIT))
- KASSERT(va != NULL, ("malloc(M_WAITOK) returned NULL"));
+ KASSERT(va != NULL, ("malloc() without M_NOWAIT returned NULL"));
if (va == NULL) {
t_malloc_fail = time_uptime;
}
@@ -493,7 +493,7 @@ sysctl_kern_malloc(SYSCTL_HANDLER_ARGS)
mtx_unlock(&malloc_mtx);
bufsize = linesize * (cnt + 1);
- p = buf = (char *)malloc(bufsize, M_TEMP, M_WAITOK|M_ZERO);
+ p = buf = (char *)malloc(bufsize, M_TEMP, M_ZERO);
mtx_lock(&malloc_mtx);
len = snprintf(p, linesize,
@@ -573,7 +573,7 @@ sysctl_kern_mprof(SYSCTL_HANDLER_ARGS)
waste = 0;
mem = 0;
- p = buf = (char *)malloc(bufsize, M_TEMP, M_WAITOK|M_ZERO);
+ p = buf = (char *)malloc(bufsize, M_TEMP, M_ZERO);
len = snprintf(p, bufsize,
"\n Size Requests Real Size\n");
bufsize -= len;
diff --git a/sys/kern/kern_module.c b/sys/kern/kern_module.c
index 677d9f1..84ad1c6 100644
--- a/sys/kern/kern_module.c
+++ b/sys/kern/kern_module.c
@@ -132,7 +132,7 @@ module_register(const moduledata_t *data, linker_file_t container)
}
MOD_SUNLOCK;
namelen = strlen(data->name) + 1;
- newmod = malloc(sizeof(struct module) + namelen, M_MODULE, M_WAITOK);
+ newmod = malloc(sizeof(struct module) + namelen, M_MODULE, 0);
if (newmod == NULL)
return (ENOMEM);
MOD_XLOCK;
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c
index 00f6186..73062c2 100644
--- a/sys/kern/kern_proc.c
+++ b/sys/kern/kern_proc.c
@@ -975,7 +975,7 @@ pargs_alloc(int len)
struct pargs *pa;
MALLOC(pa, struct pargs *, sizeof(struct pargs) + len, M_PARGS,
- M_WAITOK);
+ 0);
pa->ar_ref = 1;
pa->ar_length = len;
return (pa);
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c
index 1e21b9e..0d8865a 100644
--- a/sys/kern/kern_prot.c
+++ b/sys/kern/kern_prot.c
@@ -345,8 +345,8 @@ setsid(register struct thread *td, struct setsid_args *uap)
error = 0;
pgrp = NULL;
- MALLOC(newpgrp, struct pgrp *, sizeof(struct pgrp), M_PGRP, M_WAITOK | M_ZERO);
- MALLOC(newsess, struct session *, sizeof(struct session), M_SESSION, M_WAITOK | M_ZERO);
+ MALLOC(newpgrp, struct pgrp *, sizeof(struct pgrp), M_PGRP, M_ZERO);
+ MALLOC(newsess, struct session *, sizeof(struct session), M_SESSION, M_ZERO);
sx_xlock(&proctree_lock);
@@ -408,7 +408,7 @@ setpgid(struct thread *td, register struct setpgid_args *uap)
error = 0;
- MALLOC(newpgrp, struct pgrp *, sizeof(struct pgrp), M_PGRP, M_WAITOK | M_ZERO);
+ MALLOC(newpgrp, struct pgrp *, sizeof(struct pgrp), M_PGRP, M_ZERO);
sx_xlock(&proctree_lock);
if (uap->pid != 0 && uap->pid != curp->p_pid) {
@@ -1687,7 +1687,7 @@ crget(void)
{
register struct ucred *cr;
- MALLOC(cr, struct ucred *, sizeof(*cr), M_CRED, M_WAITOK | M_ZERO);
+ MALLOC(cr, struct ucred *, sizeof(*cr), M_CRED, M_ZERO);
cr->cr_ref = 1;
cr->cr_mtxp = mtx_pool_find(cr);
#ifdef MAC
diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c
index a0f263d..4ade890 100644
--- a/sys/kern/kern_resource.c
+++ b/sys/kern/kern_resource.c
@@ -839,7 +839,7 @@ limcopy(lim)
register struct plimit *copy;
MALLOC(copy, struct plimit *, sizeof(struct plimit),
- M_SUBPROC, M_WAITOK);
+ M_SUBPROC, 0);
bcopy(lim->pl_rlimit, copy->pl_rlimit, sizeof(struct plimit));
copy->p_lflags = 0;
copy->p_refcnt = 1;
@@ -896,7 +896,7 @@ uifind(uid)
struct uidinfo *old_uip;
mtx_unlock(&uihashtbl_mtx);
- uip = malloc(sizeof(*uip), M_UIDINFO, M_WAITOK | M_ZERO);
+ uip = malloc(sizeof(*uip), M_UIDINFO, M_ZERO);
mtx_lock(&uihashtbl_mtx);
/*
* There's a chance someone created our uidinfo while we
diff --git a/sys/kern/kern_subr.c b/sys/kern/kern_subr.c
index 154b6e03..dca389f 100644
--- a/sys/kern/kern_subr.c
+++ b/sys/kern/kern_subr.c
@@ -490,7 +490,7 @@ hashinit(elements, type, hashmask)
for (hashsize = 1; hashsize <= elements; hashsize <<= 1)
continue;
hashsize >>= 1;
- hashtbl = malloc((u_long)hashsize * sizeof(*hashtbl), type, M_WAITOK);
+ hashtbl = malloc((u_long)hashsize * sizeof(*hashtbl), type, 0);
for (i = 0; i < hashsize; i++)
LIST_INIT(&hashtbl[i]);
*hashmask = hashsize - 1;
@@ -539,7 +539,7 @@ phashinit(elements, type, nentries)
hashsize = primes[i];
}
hashsize = primes[i - 1];
- hashtbl = malloc((u_long)hashsize * sizeof(*hashtbl), type, M_WAITOK);
+ hashtbl = malloc((u_long)hashsize * sizeof(*hashtbl), type, 0);
for (i = 0; i < hashsize; i++)
LIST_INIT(&hashtbl[i]);
*nentries = hashsize;
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c
index 08d1f80..0a0d94c 100644
--- a/sys/kern/kern_sysctl.c
+++ b/sys/kern/kern_sysctl.c
@@ -224,7 +224,7 @@ sysctl_ctx_entry_add(struct sysctl_ctx_list *clist, struct sysctl_oid *oidp)
if (clist == NULL || oidp == NULL)
return(NULL);
- e = malloc(sizeof(struct sysctl_ctx_entry), M_SYSCTLOID, M_WAITOK);
+ e = malloc(sizeof(struct sysctl_ctx_entry), M_SYSCTLOID, 0);
e->entry = oidp;
TAILQ_INSERT_HEAD(clist, e, link);
return (e);
@@ -354,13 +354,13 @@ sysctl_add_oid(struct sysctl_ctx_list *clist, struct sysctl_oid_list *parent,
return (NULL);
}
}
- oidp = malloc(sizeof(struct sysctl_oid), M_SYSCTLOID, M_WAITOK|M_ZERO);
+ oidp = malloc(sizeof(struct sysctl_oid), M_SYSCTLOID, M_ZERO);
oidp->oid_parent = parent;
SLIST_NEXT(oidp, oid_link) = NULL;
oidp->oid_number = number;
oidp->oid_refcnt = 1;
len = strlen(name);
- newname = malloc(len + 1, M_SYSCTLOID, M_WAITOK);
+ newname = malloc(len + 1, M_SYSCTLOID, 0);
bcopy(name, newname, len + 1);
newname[len] = '\0';
oidp->oid_name = newname;
@@ -369,7 +369,7 @@ sysctl_add_oid(struct sysctl_ctx_list *clist, struct sysctl_oid_list *parent,
if ((kind & CTLTYPE) == CTLTYPE_NODE) {
/* Allocate space for children */
SYSCTL_CHILDREN(oidp) = malloc(sizeof(struct sysctl_oid_list),
- M_SYSCTLOID, M_WAITOK);
+ M_SYSCTLOID, 0);
SLIST_INIT(SYSCTL_CHILDREN(oidp));
} else {
oidp->oid_arg1 = arg1;
@@ -378,7 +378,7 @@ sysctl_add_oid(struct sysctl_ctx_list *clist, struct sysctl_oid_list *parent,
oidp->oid_fmt = fmt;
if (descr) {
int len = strlen(descr) + 1;
- oidp->descr = malloc(len, M_SYSCTLOID, M_WAITOK);
+ oidp->descr = malloc(len, M_SYSCTLOID, 0);
if (oidp->descr)
strcpy((char *)(uintptr_t)(const void *)oidp->descr, descr);
}
@@ -679,7 +679,7 @@ sysctl_sysctl_name2oid(SYSCTL_HANDLER_ARGS)
if (req->newlen >= MAXPATHLEN) /* XXX arbitrary, undocumented */
return (ENAMETOOLONG);
- p = malloc(req->newlen+1, M_SYSCTL, M_WAITOK);
+ p = malloc(req->newlen+1, M_SYSCTL, 0);
error = SYSCTL_IN(req, p, req->newlen);
if (error) {
@@ -823,7 +823,7 @@ sysctl_handle_string(SYSCTL_HANDLER_ARGS)
*/
retry:
outlen = strlen((char *)arg1)+1;
- tmparg = malloc(outlen, M_SYSCTLTMP, M_WAITOK);
+ tmparg = malloc(outlen, M_SYSCTLTMP, 0);
if (strlcpy(tmparg, (char *)arg1, outlen) >= outlen) {
free(tmparg, M_SYSCTLTMP);
@@ -867,7 +867,7 @@ sysctl_handle_opaque(SYSCTL_HANDLER_ARGS)
sysctl_wire_old_buffer(req, arg2);
error = SYSCTL_OUT(req, arg1, arg2);
} else {
- tmparg = malloc(arg2, M_SYSCTLTMP, M_WAITOK);
+ tmparg = malloc(arg2, M_SYSCTLTMP, 0);
bcopy(arg1, tmparg, arg2);
error = SYSCTL_OUT(req, tmparg, arg2);
free(tmparg, M_SYSCTLTMP);
diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c
index 31ed03e..78bce30 100644
--- a/sys/kern/kern_thread.c
+++ b/sys/kern/kern_thread.c
@@ -729,7 +729,7 @@ thread_reap(void)
struct ksegrp *
ksegrp_alloc(void)
{
- return (uma_zalloc(ksegrp_zone, M_WAITOK));
+ return (uma_zalloc(ksegrp_zone, 0));
}
/*
@@ -738,7 +738,7 @@ ksegrp_alloc(void)
struct kse *
kse_alloc(void)
{
- return (uma_zalloc(kse_zone, M_WAITOK));
+ return (uma_zalloc(kse_zone, 0));
}
/*
@@ -748,7 +748,7 @@ struct thread *
thread_alloc(void)
{
thread_reap(); /* check if any zombies to get */
- return (uma_zalloc(thread_zone, M_WAITOK));
+ return (uma_zalloc(thread_zone, 0));
}
/*
diff --git a/sys/kern/link_elf.c b/sys/kern/link_elf.c
index f15803f..6c3e4d4 100644
--- a/sys/kern/link_elf.c
+++ b/sys/kern/link_elf.c
@@ -235,7 +235,7 @@ link_elf_link_common_finish(linker_file_t lf)
#ifdef DDB
GDB_STATE(RT_ADD);
ef->gdb.l_addr = lf->address;
- newfilename = malloc(strlen(lf->filename) + 1, M_LINKER, M_WAITOK);
+ newfilename = malloc(strlen(lf->filename) + 1, M_LINKER, 0);
strcpy(newfilename, lf->filename);
ef->gdb.l_name = newfilename;
ef->gdb.l_ld = ef->dynamic;
@@ -571,7 +571,7 @@ link_elf_load_file(linker_class_t cls, const char* filename,
/*
* Read the elf header from the file.
*/
- firstpage = malloc(PAGE_SIZE, M_LINKER, M_WAITOK);
+ firstpage = malloc(PAGE_SIZE, M_LINKER, 0);
if (firstpage == NULL) {
error = ENOMEM;
goto out;
@@ -702,7 +702,7 @@ link_elf_load_file(linker_class_t cls, const char* filename,
goto out;
}
#else
- ef->address = malloc(mapsize, M_LINKER, M_WAITOK);
+ ef->address = malloc(mapsize, M_LINKER, 0);
if (!ef->address) {
error = ENOMEM;
goto out;
@@ -773,7 +773,7 @@ link_elf_load_file(linker_class_t cls, const char* filename,
nbytes = hdr->e_shnum * hdr->e_shentsize;
if (nbytes == 0 || hdr->e_shoff == 0)
goto nosyms;
- shdr = malloc(nbytes, M_LINKER, M_WAITOK | M_ZERO);
+ shdr = malloc(nbytes, M_LINKER, M_ZERO);
if (shdr == NULL) {
error = ENOMEM;
goto out;
@@ -796,9 +796,9 @@ link_elf_load_file(linker_class_t cls, const char* filename,
goto nosyms;
symcnt = shdr[symtabindex].sh_size;
- ef->symbase = malloc(symcnt, M_LINKER, M_WAITOK);
+ ef->symbase = malloc(symcnt, M_LINKER, 0);
strcnt = shdr[symstrindex].sh_size;
- ef->strbase = malloc(strcnt, M_LINKER, M_WAITOK);
+ ef->strbase = malloc(strcnt, M_LINKER, 0);
if (ef->symbase == NULL || ef->strbase == NULL) {
error = ENOMEM;
@@ -1124,7 +1124,7 @@ link_elf_lookup_set(linker_file_t lf, const char *name,
int len, error = 0, count;
len = strlen(name) + sizeof("__start_set_"); /* sizeof includes \0 */
- setsym = malloc(len, M_LINKER, M_WAITOK);
+ setsym = malloc(len, M_LINKER, 0);
if (setsym == NULL)
return ENOMEM;
diff --git a/sys/kern/link_elf_obj.c b/sys/kern/link_elf_obj.c
index f15803f..6c3e4d4 100644
--- a/sys/kern/link_elf_obj.c
+++ b/sys/kern/link_elf_obj.c
@@ -235,7 +235,7 @@ link_elf_link_common_finish(linker_file_t lf)
#ifdef DDB
GDB_STATE(RT_ADD);
ef->gdb.l_addr = lf->address;
- newfilename = malloc(strlen(lf->filename) + 1, M_LINKER, M_WAITOK);
+ newfilename = malloc(strlen(lf->filename) + 1, M_LINKER, 0);
strcpy(newfilename, lf->filename);
ef->gdb.l_name = newfilename;
ef->gdb.l_ld = ef->dynamic;
@@ -571,7 +571,7 @@ link_elf_load_file(linker_class_t cls, const char* filename,
/*
* Read the elf header from the file.
*/
- firstpage = malloc(PAGE_SIZE, M_LINKER, M_WAITOK);
+ firstpage = malloc(PAGE_SIZE, M_LINKER, 0);
if (firstpage == NULL) {
error = ENOMEM;
goto out;
@@ -702,7 +702,7 @@ link_elf_load_file(linker_class_t cls, const char* filename,
goto out;
}
#else
- ef->address = malloc(mapsize, M_LINKER, M_WAITOK);
+ ef->address = malloc(mapsize, M_LINKER, 0);
if (!ef->address) {
error = ENOMEM;
goto out;
@@ -773,7 +773,7 @@ link_elf_load_file(linker_class_t cls, const char* filename,
nbytes = hdr->e_shnum * hdr->e_shentsize;
if (nbytes == 0 || hdr->e_shoff == 0)
goto nosyms;
- shdr = malloc(nbytes, M_LINKER, M_WAITOK | M_ZERO);
+ shdr = malloc(nbytes, M_LINKER, M_ZERO);
if (shdr == NULL) {
error = ENOMEM;
goto out;
@@ -796,9 +796,9 @@ link_elf_load_file(linker_class_t cls, const char* filename,
goto nosyms;
symcnt = shdr[symtabindex].sh_size;
- ef->symbase = malloc(symcnt, M_LINKER, M_WAITOK);
+ ef->symbase = malloc(symcnt, M_LINKER, 0);
strcnt = shdr[symstrindex].sh_size;
- ef->strbase = malloc(strcnt, M_LINKER, M_WAITOK);
+ ef->strbase = malloc(strcnt, M_LINKER, 0);
if (ef->symbase == NULL || ef->strbase == NULL) {
error = ENOMEM;
@@ -1124,7 +1124,7 @@ link_elf_lookup_set(linker_file_t lf, const char *name,
int len, error = 0, count;
len = strlen(name) + sizeof("__start_set_"); /* sizeof includes \0 */
- setsym = malloc(len, M_LINKER, M_WAITOK);
+ setsym = malloc(len, M_LINKER, 0);
if (setsym == NULL)
return ENOMEM;
diff --git a/sys/kern/subr_blist.c b/sys/kern/subr_blist.c
index a58e548..8acf5f5 100644
--- a/sys/kern/subr_blist.c
+++ b/sys/kern/subr_blist.c
@@ -157,14 +157,14 @@ blist_create(daddr_t blocks)
skip = (skip + 1) * BLIST_META_RADIX;
}
- bl = malloc(sizeof(struct blist), M_SWAP, M_WAITOK | M_ZERO);
+ bl = malloc(sizeof(struct blist), M_SWAP, M_ZERO);
bl->bl_blocks = blocks;
bl->bl_radix = radix;
bl->bl_skip = skip;
bl->bl_rootblks = 1 +
blst_radix_init(NULL, bl->bl_radix, bl->bl_skip, blocks);
- bl->bl_root = malloc(sizeof(blmeta_t) * bl->bl_rootblks, M_SWAP, M_WAITOK);
+ bl->bl_root = malloc(sizeof(blmeta_t) * bl->bl_rootblks, M_SWAP, 0);
#if defined(BLIST_DEBUG)
printf(
diff --git a/sys/kern/subr_clist.c b/sys/kern/subr_clist.c
index 165f628..e4da151 100644
--- a/sys/kern/subr_clist.c
+++ b/sys/kern/subr_clist.c
@@ -135,8 +135,8 @@ cblock_alloc_cblocks(number)
cbp = malloc(sizeof *cbp, M_TTYS, M_NOWAIT);
if (cbp == NULL) {
printf(
-"cblock_alloc_cblocks: M_NOWAIT malloc failed, trying M_WAITOK\n");
- cbp = malloc(sizeof *cbp, M_TTYS, M_WAITOK);
+"cblock_alloc_cblocks: M_NOWAIT malloc failed, trying blocking malloc\n");
+ cbp = malloc(sizeof *cbp, M_TTYS, 0);
}
/*
* Freed cblocks have zero quotes and garbage elsewhere.
diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c
index 4d2a02d..8eb6f1a 100644
--- a/sys/kern/subr_disk.c
+++ b/sys/kern/subr_disk.c
@@ -176,7 +176,7 @@ disk_create(int unit, struct disk *dp, int flags, struct cdevsw *cdevsw, struct
}
bzero(dp, sizeof(*dp));
- dp->d_label = malloc(sizeof *dp->d_label, M_DEVBUF, M_WAITOK|M_ZERO);
+ dp->d_label = malloc(sizeof *dp->d_label, M_DEVBUF, M_ZERO);
if (proto->d_open != diskopen) {
*proto = *cdevsw;
diff --git a/sys/kern/subr_diskslice.c b/sys/kern/subr_diskslice.c
index ee2f236..f674c37 100644
--- a/sys/kern/subr_diskslice.c
+++ b/sys/kern/subr_diskslice.c
@@ -97,7 +97,7 @@ clone_label(lp)
{
struct disklabel *lp1;
- lp1 = malloc(sizeof *lp1, M_DEVBUF, M_WAITOK);
+ lp1 = malloc(sizeof *lp1, M_DEVBUF, 0);
*lp1 = *lp;
lp = NULL;
if (lp1->d_typename[0] == '\0')
@@ -254,7 +254,7 @@ dscheck(bp, ssp)
&& sp->ds_offset != 0) {
struct iodone_chain *ic;
- ic = malloc(sizeof *ic , M_DEVBUF, M_WAITOK);
+ ic = malloc(sizeof *ic , M_DEVBUF, 0);
ic->ic_prev_flags = bp->bio_flags;
ic->ic_prev_iodone = bp->bio_done;
ic->ic_prev_iodone_chain = bp->bio_done_chain;
@@ -394,7 +394,7 @@ dsioctl(dev, cmd, data, flags, sspp)
return (ENODEV);
if (!(flags & FWRITE))
return (EBADF);
- lp = malloc(sizeof *lp, M_DEVBUF, M_WAITOK);
+ lp = malloc(sizeof *lp, M_DEVBUF, 0);
if (sp->ds_label == NULL)
bzero(lp, sizeof *lp);
else
@@ -450,7 +450,7 @@ dsioctl(dev, cmd, data, flags, sspp)
* complete, then lock out future accesses and opens.
*/
*sspp = NULL;
- lp = malloc(sizeof *lp, M_DEVBUF, M_WAITOK);
+ lp = malloc(sizeof *lp, M_DEVBUF, 0);
*lp = *ssp->dss_slices[WHOLE_DISK_SLICE].ds_label;
error = dsopen(dev, S_IFCHR, ssp->dss_oflags, sspp, lp);
if (error != 0) {
@@ -567,7 +567,7 @@ dsmakeslicestruct(nslices, lp)
struct diskslices *ssp;
ssp = malloc(offsetof(struct diskslices, dss_slices) +
- nslices * sizeof *sp, M_DEVBUF, M_WAITOK);
+ nslices * sizeof *sp, M_DEVBUF, 0);
ssp->dss_first_bsd_slice = COMPATIBILITY_SLICE;
ssp->dss_nslices = nslices;
ssp->dss_oflags = 0;
diff --git a/sys/kern/subr_mbuf.c b/sys/kern/subr_mbuf.c
index 21e1a40..7f3f960 100644
--- a/sys/kern/subr_mbuf.c
+++ b/sys/kern/subr_mbuf.c
@@ -478,7 +478,7 @@ mbuf_init(void *dummy)
pcpu_cnt = MB_GET_PCPU_LIST_NUM(&mb_list_mbuf, i);
MB_LOCK_CONT(pcpu_cnt);
for (j = 0; j < NMB_MBUF_INIT; j++) {
- if (mb_pop_cont(&mb_list_mbuf, M_DONTWAIT, pcpu_cnt)
+ if (mb_pop_cont(&mb_list_mbuf, M_NOWAIT, pcpu_cnt)
== NULL)
goto bad;
}
@@ -487,7 +487,7 @@ mbuf_init(void *dummy)
pcpu_cnt = MB_GET_PCPU_LIST_NUM(&mb_list_clust, i);
MB_LOCK_CONT(pcpu_cnt);
for (j = 0; j < NMB_CLUST_INIT; j++) {
- if (mb_pop_cont(&mb_list_clust, M_DONTWAIT, pcpu_cnt)
+ if (mb_pop_cont(&mb_list_clust, M_NOWAIT, pcpu_cnt)
== NULL)
goto bad;
}
@@ -528,15 +528,15 @@ mb_pop_cont(struct mb_lstmngr *mb_list, int how, struct mb_pcpu_list *cnt_lst)
bucket = malloc(sizeof(struct mb_bucket) +
PAGE_SIZE / mb_list->ml_objsize * sizeof(void *), M_MBUF,
- how == M_TRYWAIT ? M_WAITOK : M_NOWAIT);
+ how == 0 ? 0 : M_NOWAIT);
if (bucket == NULL)
return (NULL);
p = (caddr_t)kmem_malloc(mb_list->ml_map, PAGE_SIZE,
- how == M_TRYWAIT ? M_WAITOK : M_NOWAIT);
+ how == 0 ? 0 : M_NOWAIT);
if (p == NULL) {
free(bucket, M_MBUF);
- if (how == M_TRYWAIT)
+ if (how == 0)
mb_list->ml_mapfull = 1;
return (NULL);
}
@@ -563,7 +563,7 @@ mb_pop_cont(struct mb_lstmngr *mb_list, int how, struct mb_pcpu_list *cnt_lst)
* The general case is very easy. Complications only arise if our PCPU
* container is empty. Things get worse if the PCPU container is empty,
* the general container is empty, and we've run out of address space
- * in our map; then we try to block if we're willing to (M_TRYWAIT).
+ * in our map; then we try to block if we're willing to wait.
*/
static __inline
void *
@@ -667,7 +667,7 @@ mb_alloc(struct mb_lstmngr *mb_list, int how, short type, short persist,
else
*pers_list=cnt_lst->mb_cont.mc_numowner;
} else {
- if (how == M_TRYWAIT) {
+ if (how == 0) {
/*
* Absolute worst-case scenario.
* We block if we're willing to, but
@@ -701,7 +701,7 @@ mb_alloc(struct mb_lstmngr *mb_list, int how, short type, short persist,
/*
* This is the worst-case scenario called only if we're allocating with
- * M_TRYWAIT. We first drain all the protocols, then try to find an mbuf
+ * 0. We first drain all the protocols, then try to find an mbuf
* by looking in every PCPU container. If we're still unsuccesful, we
* try the general container one last time and possibly block on our
* starved cv.
@@ -1128,8 +1128,8 @@ _mgetm_internal(int how, short type, short persist, int cchnum)
* Allocate and return a single (normal) mbuf. NULL is returned on failure.
*
* Arguments:
- * - how: M_TRYWAIT to try to block for kern.ipc.mbuf_wait number of ticks
- * if really starved for memory. M_DONTWAIT to never block.
+ * - how: 0 to try to block for kern.ipc.mbuf_wait number of ticks
+ * if really starved for memory. M_NOWAIT to never block.
* - type: the type of the mbuf being allocated.
*/
struct mbuf *
@@ -1156,8 +1156,8 @@ m_get(int how, short type)
* - m: existing chain to which to append new chain (optional).
* - len: total length of data to append, either in mbufs or clusters
* (we allocate whatever combination yields the best fit).
- * - how: M_TRYWAIT to try to block for kern.ipc.mbuf_wait number of ticks
- * if really starved for memory. M_DONTWAIT to never block.
+ * - how: 0 to try to block for kern.ipc.mbuf_wait number of ticks
+ * if really starved for memory. M_NOWAIT to never block.
* - type: the type of the mbuf being allocated.
*/
struct mbuf *
@@ -1248,8 +1248,8 @@ failed:
* Allocate and return a single M_PKTHDR mbuf. NULL is returned on failure.
*
* Arguments:
- * - how: M_TRYWAIT to try to block for kern.ipc.mbuf_wait number of ticks
- * if really starved for memory. M_DONTWAIT to never block.
+ * - how: 0 to try to block for kern.ipc.mbuf_wait number of ticks
+ * if really starved for memory. M_NOWAIT to never block.
* - type: the type of the mbuf being allocated.
*/
struct mbuf *
@@ -1275,8 +1275,8 @@ m_gethdr(int how, short type)
* returned on failure.
*
* Arguments:
- * - how: M_TRYWAIT to try to block for kern.ipc.mbuf_wait number of ticks
- * if really starved for memory. M_DONTWAIT to never block.
+ * - how: 0 to try to block for kern.ipc.mbuf_wait number of ticks
+ * if really starved for memory. M_NOWAIT to never block.
* - type: the type of the mbuf being allocated.
*/
struct mbuf *
@@ -1297,8 +1297,8 @@ m_get_clrd(int how, short type)
* returned on failure.
*
* Arguments:
- * - how: M_TRYWAIT to try to block for kern.ipc.mbuf_wait number of ticks
- * if really starved for memory. M_DONTWAIT to never block.
+ * - how: 0 to try to block for kern.ipc.mbuf_wait number of ticks
+ * if really starved for memory. M_NOWAIT to never block.
* - type: the type of the mbuf being allocated.
*/
struct mbuf *
@@ -1421,8 +1421,8 @@ m_freem(struct mbuf *mb)
* NULL on failure.
*
* Arguments:
- * - how: M_TRYWAIT to try to block for kern.ipc.mbuf_wait number of ticks
- * if really starved for memory. M_DONTWAIT to never block.
+ * - how: 0 to try to block for kern.ipc.mbuf_wait number of ticks
+ * if really starved for memory. M_NOWAIT to never block.
* - type: the type of the mbuf being allocated.
* - flags: any flags to pass to the mbuf being allocated; if this includes
* the M_PKTHDR bit, then the mbuf is configured as a M_PKTHDR mbuf.
@@ -1473,8 +1473,8 @@ m_getcl(int how, short type, int flags)
*
* Arguments:
* - mb: the existing mbuf to which to attach the allocated cluster.
- * - how: M_TRYWAIT to try to block for kern.ipc.mbuf_wait number of ticks
- * if really starved for memory. M_DONTWAIT to never block.
+ * - how: 0 to try to block for kern.ipc.mbuf_wait number of ticks
+ * if really starved for memory. M_NOWAIT to never block.
*/
void
m_clget(struct mbuf *mb, int how)
diff --git a/sys/kern/subr_mchain.c b/sys/kern/subr_mchain.c
index b0aef5c..851bc7a 100644
--- a/sys/kern/subr_mchain.c
+++ b/sys/kern/subr_mchain.c
@@ -58,7 +58,7 @@ mb_init(struct mbchain *mbp)
{
struct mbuf *m;
- m = m_gethdr(M_TRYWAIT, MT_DATA);
+ m = m_gethdr(0, MT_DATA);
if (m == NULL)
return ENOBUFS;
m->m_len = 0;
@@ -115,7 +115,7 @@ mb_reserve(struct mbchain *mbp, int size)
panic("mb_reserve: size = %d\n", size);
m = mbp->mb_cur;
if (mbp->mb_mleft < size) {
- mn = m_get(M_TRYWAIT, MT_DATA);
+ mn = m_get(0, MT_DATA);
if (mn == NULL)
return NULL;
mbp->mb_cur = m->m_next = mn;
@@ -192,7 +192,7 @@ mb_put_mem(struct mbchain *mbp, c_caddr_t source, int size, int type)
while (size > 0) {
if (mleft == 0) {
if (m->m_next == NULL) {
- m = m_getm(m, size, M_TRYWAIT, MT_DATA);
+ m = m_getm(m, size, 0, MT_DATA);
if (m == NULL)
return ENOBUFS;
}
@@ -293,7 +293,7 @@ md_init(struct mdchain *mdp)
{
struct mbuf *m;
- m = m_gethdr(M_TRYWAIT, MT_DATA);
+ m = m_gethdr(0, MT_DATA);
if (m == NULL)
return ENOBUFS;
m->m_len = 0;
@@ -501,7 +501,7 @@ md_get_mbuf(struct mdchain *mdp, int size, struct mbuf **ret)
{
struct mbuf *m = mdp->md_cur, *rm;
- rm = m_copym(m, mdp->md_pos - mtod(m, u_char*), size, M_TRYWAIT);
+ rm = m_copym(m, mdp->md_pos - mtod(m, u_char*), size, 0);
if (rm == NULL)
return EBADRPC;
md_get_mem(mdp, NULL, size, MB_MZERO);
diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c
index 5f299f9..56f0c2e 100644
--- a/sys/kern/subr_prf.c
+++ b/sys/kern/subr_prf.c
@@ -260,8 +260,8 @@ log_console(struct uio *uio)
pri = LOG_INFO | LOG_CONSOLE;
muio = *uio;
iovlen = uio->uio_iovcnt * sizeof (struct iovec);
- MALLOC(miov, struct iovec *, iovlen, M_TEMP, M_WAITOK);
- MALLOC(consbuffer, char *, CONSCHUNK, M_TEMP, M_WAITOK);
+ MALLOC(miov, struct iovec *, iovlen, M_TEMP, 0);
+ MALLOC(consbuffer, char *, CONSCHUNK, M_TEMP, 0);
bcopy(muio.uio_iov, miov, iovlen);
muio.uio_iov = miov;
uio = &muio;
diff --git a/sys/kern/subr_prof.c b/sys/kern/subr_prof.c
index 4959595..2c22a92 100644
--- a/sys/kern/subr_prof.c
+++ b/sys/kern/subr_prof.c
@@ -107,7 +107,7 @@ kmupetext(uintfptr_t nhighpc)
np.tolimit = MAXARCS;
np.tossize = np.tolimit * sizeof(struct tostruct);
cp = malloc(np.kcountsize + np.fromssize + np.tossize,
- M_GPROF, M_WAITOK);
+ M_GPROF, 0);
/*
* Check for something else extending highpc while we slept.
*/
@@ -176,7 +176,7 @@ kmstartup(dummy)
p->tolimit = MAXARCS;
p->tossize = p->tolimit * sizeof(struct tostruct);
cp = (char *)malloc(p->kcountsize + p->fromssize + p->tossize,
- M_GPROF, M_WAITOK | M_ZERO);
+ M_GPROF, M_ZERO);
p->tos = (struct tostruct *)cp;
cp += p->tossize;
p->kcount = (HISTCOUNTER *)cp;
diff --git a/sys/kern/subr_sbuf.c b/sys/kern/subr_sbuf.c
index 9e63e8e..f4ec519 100644
--- a/sys/kern/subr_sbuf.c
+++ b/sys/kern/subr_sbuf.c
@@ -49,7 +49,7 @@
#ifdef _KERNEL
MALLOC_DEFINE(M_SBUF, "sbuf", "string buffers");
-#define SBMALLOC(size) malloc(size, M_SBUF, M_WAITOK)
+#define SBMALLOC(size) malloc(size, M_SBUF, 0)
#define SBFREE(buf) free(buf, M_SBUF)
#else /* _KERNEL */
#define KASSERT(e, m)
diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c
index c26cf47..9e3ccff 100644
--- a/sys/kern/sys_generic.c
+++ b/sys/kern/sys_generic.c
@@ -248,7 +248,7 @@ readv(td, uap)
error = EINVAL;
goto done;
}
- MALLOC(iov, struct iovec *, iovlen, M_IOV, M_WAITOK);
+ MALLOC(iov, struct iovec *, iovlen, M_IOV, 0);
needfree = iov;
} else
iov = aiov;
@@ -274,7 +274,7 @@ readv(td, uap)
* if tracing, save a copy of iovec
*/
if (KTRPOINT(td, KTR_GENIO)) {
- MALLOC(ktriov, struct iovec *, iovlen, M_TEMP, M_WAITOK);
+ MALLOC(ktriov, struct iovec *, iovlen, M_TEMP, 0);
bcopy(auio.uio_iov, ktriov, iovlen);
ktruio = auio;
}
@@ -480,7 +480,7 @@ writev(td, uap)
error = EINVAL;
goto done;
}
- MALLOC(iov, struct iovec *, iovlen, M_IOV, M_WAITOK);
+ MALLOC(iov, struct iovec *, iovlen, M_IOV, 0);
needfree = iov;
} else {
iov = aiov;
@@ -508,7 +508,7 @@ writev(td, uap)
* if tracing, save a copy of iovec and uio
*/
if (KTRPOINT(td, KTR_GENIO)) {
- MALLOC(ktriov, struct iovec *, iovlen, M_TEMP, M_WAITOK);
+ MALLOC(ktriov, struct iovec *, iovlen, M_TEMP, 0);
bcopy(auio.uio_iov, ktriov, iovlen);
ktruio = auio;
}
@@ -618,7 +618,7 @@ ioctl(td, uap)
memp = NULL;
if (size > sizeof (ubuf.stkbuf)) {
- memp = malloc((u_long)size, M_IOCTLOPS, M_WAITOK);
+ memp = malloc((u_long)size, M_IOCTLOPS, 0);
data = memp;
} else {
data = ubuf.stkbuf;
@@ -768,7 +768,7 @@ kern_select(struct thread *td, int nd, fd_set *fd_in, fd_set *fd_ou,
if (nbufbytes <= sizeof s_selbits)
selbits = &s_selbits[0];
else
- selbits = malloc(nbufbytes, M_SELECT, M_WAITOK);
+ selbits = malloc(nbufbytes, M_SELECT, 0);
/*
* Assign pointers into the bit buffers and fetch the input bits.
@@ -968,7 +968,7 @@ poll(td, uap)
}
ni = nfds * sizeof(struct pollfd);
if (ni > sizeof(smallbits))
- bits = malloc(ni, M_TEMP, M_WAITOK);
+ bits = malloc(ni, M_TEMP, 0);
else
bits = smallbits;
error = copyin(uap->fds, bits, ni);
diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c
index 915ee3e..937e909 100644
--- a/sys/kern/sys_pipe.c
+++ b/sys/kern/sys_pipe.c
@@ -206,7 +206,7 @@ pipe(td, uap)
KASSERT(pipe_zone != NULL, ("pipe_zone not initialized"));
- pmtx = malloc(sizeof(*pmtx), M_TEMP, M_WAITOK | M_ZERO);
+ pmtx = malloc(sizeof(*pmtx), M_TEMP, M_ZERO);
rpipe = wpipe = NULL;
if (pipe_create(&rpipe) || pipe_create(&wpipe)) {
@@ -346,7 +346,7 @@ pipe_create(cpipep)
struct pipe *cpipe;
int error;
- *cpipep = uma_zalloc(pipe_zone, M_WAITOK);
+ *cpipep = uma_zalloc(pipe_zone, 0);
if (*cpipep == NULL)
return (ENOMEM);
diff --git a/sys/kern/sysv_msg.c b/sys/kern/sysv_msg.c
index d85cf29..00d0fbb 100644
--- a/sys/kern/sysv_msg.c
+++ b/sys/kern/sysv_msg.c
@@ -141,16 +141,16 @@ msginit()
msginfo.msgmax = msginfo.msgseg * msginfo.msgssz;
TUNABLE_INT_FETCH("kern.ipc.msgmni", &msginfo.msgmni);
- msgpool = malloc(msginfo.msgmax, M_MSG, M_WAITOK);
+ msgpool = malloc(msginfo.msgmax, M_MSG, 0);
if (msgpool == NULL)
panic("msgpool is NULL");
- msgmaps = malloc(sizeof(struct msgmap) * msginfo.msgseg, M_MSG, M_WAITOK);
+ msgmaps = malloc(sizeof(struct msgmap) * msginfo.msgseg, M_MSG, 0);
if (msgmaps == NULL)
panic("msgmaps is NULL");
- msghdrs = malloc(sizeof(struct msg) * msginfo.msgtql, M_MSG, M_WAITOK);
+ msghdrs = malloc(sizeof(struct msg) * msginfo.msgtql, M_MSG, 0);
if (msghdrs == NULL)
panic("msghdrs is NULL");
- msqids = malloc(sizeof(struct msqid_ds) * msginfo.msgmni, M_MSG, M_WAITOK);
+ msqids = malloc(sizeof(struct msqid_ds) * msginfo.msgmni, M_MSG, 0);
if (msqids == NULL)
panic("msqids is NULL");
diff --git a/sys/kern/sysv_sem.c b/sys/kern/sysv_sem.c
index 737ddba..f27d167 100644
--- a/sys/kern/sysv_sem.c
+++ b/sys/kern/sysv_sem.c
@@ -185,12 +185,12 @@ seminit(void)
TUNABLE_INT_FETCH("kern.ipc.semvmx", &seminfo.semvmx);
TUNABLE_INT_FETCH("kern.ipc.semaem", &seminfo.semaem);
- sem = malloc(sizeof(struct sem) * seminfo.semmns, M_SEM, M_WAITOK);
+ sem = malloc(sizeof(struct sem) * seminfo.semmns, M_SEM, 0);
sema = malloc(sizeof(struct semid_ds) * seminfo.semmni, M_SEM,
- M_WAITOK);
+ 0);
sema_mtx = malloc(sizeof(struct mtx) * seminfo.semmni, M_SEM,
- M_WAITOK | M_ZERO);
- semu = malloc(seminfo.semmnu * seminfo.semusz, M_SEM, M_WAITOK);
+ M_ZERO);
+ semu = malloc(seminfo.semmnu * seminfo.semusz, M_SEM, 0);
for (i = 0; i < seminfo.semmni; i++) {
sema[i].sem_base = 0;
@@ -644,7 +644,7 @@ __semctl(td, uap)
if ((error = copyin(arg, &real_arg, sizeof(real_arg))) != 0)
goto done2;
array = malloc(sizeof(*array) * semaptr->sem_nsems, M_TEMP,
- M_WAITOK);
+ 0);
mtx_lock(sema_mtxp);
if ((error = semvalid(uap->semid, semaptr)) != 0)
goto done2;
@@ -702,7 +702,7 @@ raced:
mtx_unlock(sema_mtxp);
if ((error = copyin(arg, &real_arg, sizeof(real_arg))) != 0)
goto done2;
- array = malloc(sizeof(*array) * count, M_TEMP, M_WAITOK);
+ array = malloc(sizeof(*array) * count, M_TEMP, 0);
copyin(real_arg.array, array, count * sizeof(*array));
if (error)
break;
@@ -897,7 +897,7 @@ semop(td, uap)
nsops));
return (E2BIG);
}
- sops = malloc(nsops * sizeof(sops[0]), M_SEM, M_WAITOK);
+ sops = malloc(nsops * sizeof(sops[0]), M_SEM, 0);
if ((error = copyin(uap->sops, sops, nsops * sizeof(sops[0]))) != 0) {
DPRINTF(("error = %d from copyin(%08x, %08x, %d)\n", error,
uap->sops, sops, nsops * sizeof(sops[0])));
diff --git a/sys/kern/sysv_shm.c b/sys/kern/sysv_shm.c
index 04c9b2a..e045310 100644
--- a/sys/kern/sysv_shm.c
+++ b/sys/kern/sysv_shm.c
@@ -314,7 +314,7 @@ shmat(td, uap)
shmmap_s = p->p_vmspace->vm_shm;
if (shmmap_s == NULL) {
size = shminfo.shmseg * sizeof(struct shmmap_state);
- shmmap_s = malloc(size, M_SHM, M_WAITOK);
+ shmmap_s = malloc(size, M_SHM, 0);
for (i = 0; i < shminfo.shmseg; i++)
shmmap_s[i].shmid = -1;
p->p_vmspace->vm_shm = shmmap_s;
@@ -643,7 +643,7 @@ shmget_allocate_segment(td, uap, mode)
shmseg->shm_perm.key = uap->key;
shmseg->shm_perm.seq = (shmseg->shm_perm.seq + 1) & 0x7fff;
shm_handle = (struct shm_handle *)
- malloc(sizeof(struct shm_handle), M_SHM, M_WAITOK);
+ malloc(sizeof(struct shm_handle), M_SHM, 0);
shmid = IXSEQ_TO_IPCID(segnum, shmseg->shm_perm);
/*
@@ -756,7 +756,7 @@ shmfork_myhook(p1, p2)
int i;
size = shminfo.shmseg * sizeof(struct shmmap_state);
- shmmap_s = malloc(size, M_SHM, M_WAITOK);
+ shmmap_s = malloc(size, M_SHM, 0);
bcopy(p1->p_vmspace->vm_shm, shmmap_s, size);
p2->p_vmspace->vm_shm = shmmap_s;
for (i = 0; i < shminfo.shmseg; i++, shmmap_s++)
@@ -791,7 +791,7 @@ shmrealloc(void)
if (shmalloced >= shminfo.shmmni)
return;
- newsegs = malloc(shminfo.shmmni * sizeof(*newsegs), M_SHM, M_WAITOK);
+ newsegs = malloc(shminfo.shmmni * sizeof(*newsegs), M_SHM, 0);
if (newsegs == NULL)
return;
for (i = 0; i < shmalloced; i++)
@@ -818,7 +818,7 @@ shminit()
TUNABLE_INT_FETCH("kern.ipc.shm_use_phys", &shm_use_phys);
shmalloced = shminfo.shmmni;
- shmsegs = malloc(shmalloced * sizeof(shmsegs[0]), M_SHM, M_WAITOK);
+ shmsegs = malloc(shmalloced * sizeof(shmsegs[0]), M_SHM, 0);
if (shmsegs == NULL)
panic("cannot allocate initial memory for sysvshm");
for (i = 0; i < shmalloced; i++) {
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index e749020..4a223ff 100644
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -2594,7 +2594,7 @@ ttymalloc(struct tty *tp)
if (tp)
return(tp);
- tp = malloc(sizeof *tp, M_TTYS, M_WAITOK | M_ZERO);
+ tp = malloc(sizeof *tp, M_TTYS, M_ZERO);
ttyregister(tp);
return (tp);
}
diff --git a/sys/kern/tty_cons.c b/sys/kern/tty_cons.c
index 361a5dd..9d487b7 100644
--- a/sys/kern/tty_cons.c
+++ b/sys/kern/tty_cons.c
@@ -277,7 +277,7 @@ sysctl_kern_console(SYSCTL_HANDLER_ARGS)
STAILQ_FOREACH(cnd, &cn_devlist, cnd_next)
len += strlen(devtoname(cnd->cnd_cn->cn_dev)) + 1;
len = len > CNDEVPATHMAX ? len : CNDEVPATHMAX;
- MALLOC(name, char *, len, M_TEMP, M_WAITOK | M_ZERO);
+ MALLOC(name, char *, len, M_TEMP, M_ZERO);
p = name;
STAILQ_FOREACH(cnd, &cn_devlist, cnd_next)
p += sprintf(p, "%s,", devtoname(cnd->cnd_cn->cn_dev));
diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c
index 098108c..d954ac7 100644
--- a/sys/kern/tty_pty.c
+++ b/sys/kern/tty_pty.c
@@ -153,7 +153,7 @@ ptyinit(dev_t devc)
devc->si_flags &= ~SI_CHEAPCLONE;
- pt = malloc(sizeof(*pt), M_PTY, M_WAITOK | M_ZERO);
+ pt = malloc(sizeof(*pt), M_PTY, M_ZERO);
pt->devs = devs = make_dev(&pts_cdevsw, n,
UID_ROOT, GID_WHEEL, 0666, "tty%c%r", names[n / 32], n % 32);
pt->devc = devc;
diff --git a/sys/kern/tty_subr.c b/sys/kern/tty_subr.c
index 165f628..e4da151 100644
--- a/sys/kern/tty_subr.c
+++ b/sys/kern/tty_subr.c
@@ -135,8 +135,8 @@ cblock_alloc_cblocks(number)
cbp = malloc(sizeof *cbp, M_TTYS, M_NOWAIT);
if (cbp == NULL) {
printf(
-"cblock_alloc_cblocks: M_NOWAIT malloc failed, trying M_WAITOK\n");
- cbp = malloc(sizeof *cbp, M_TTYS, M_WAITOK);
+"cblock_alloc_cblocks: M_NOWAIT malloc failed, trying blocking malloc\n");
+ cbp = malloc(sizeof *cbp, M_TTYS, 0);
}
/*
* Freed cblocks have zero quotes and garbage elsewhere.
diff --git a/sys/kern/uipc_accf.c b/sys/kern/uipc_accf.c
index b31026a..6580e1d 100644
--- a/sys/kern/uipc_accf.c
+++ b/sys/kern/uipc_accf.c
@@ -115,7 +115,7 @@ accept_filt_generic_mod_event(module_t mod, int event, void *data)
switch (event) {
case MOD_LOAD:
- MALLOC(p, struct accept_filter *, sizeof(*p), M_ACCF, M_WAITOK);
+ MALLOC(p, struct accept_filter *, sizeof(*p), M_ACCF, 0);
bcopy(accfp, p, sizeof(*p));
s = splnet();
error = accept_filt_add(p);
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c
index bc6aa71..4ea316c 100644
--- a/sys/kern/uipc_mbuf.c
+++ b/sys/kern/uipc_mbuf.c
@@ -164,7 +164,7 @@ m_prepend(struct mbuf *m, int len, int how)
/*
* Make a copy of an mbuf chain starting "off0" bytes from the beginning,
* continuing for "len" bytes. If len is M_COPYALL, copy to end of mbuf.
- * The wait parameter is a choice of M_TRYWAIT/M_DONTWAIT from caller.
+ * The wait parameter is a choice of 0/M_NOWAIT from caller.
* Note that the copy is read-only, because clusters are not copied,
* only their reference counts are incremented.
*/
@@ -522,7 +522,7 @@ m_pullup(struct mbuf *n, int len)
} else {
if (len > MHLEN)
goto bad;
- MGET(m, M_DONTWAIT, n->m_type);
+ MGET(m, M_NOWAIT, n->m_type);
if (m == NULL)
goto bad;
m->m_len = 0;
@@ -639,7 +639,7 @@ m_devget(char *buf, int totlen, int off, struct ifnet *ifp,
if (off < 0 || off > MHLEN)
return (NULL);
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return (NULL);
m->m_pkthdr.rcvif = ifp;
@@ -648,7 +648,7 @@ m_devget(char *buf, int totlen, int off, struct ifnet *ifp,
while (totlen > 0) {
if (top) {
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
m_freem(top);
return (NULL);
@@ -656,7 +656,7 @@ m_devget(char *buf, int totlen, int off, struct ifnet *ifp,
len = MLEN;
}
if (totlen + off >= MINCLSIZE) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if (m->m_flags & M_EXT)
len = MCLBYTES;
} else {
@@ -704,7 +704,7 @@ m_copyback(struct mbuf *m0, int off, int len, caddr_t cp)
off -= mlen;
totlen += mlen;
if (m->m_next == NULL) {
- n = m_get_clrd(M_DONTWAIT, m->m_type);
+ n = m_get_clrd(M_NOWAIT, m->m_type);
if (n == NULL)
goto out;
n->m_len = min(MLEN, len + off);
@@ -723,7 +723,7 @@ m_copyback(struct mbuf *m0, int off, int len, caddr_t cp)
if (len == 0)
break;
if (m->m_next == NULL) {
- n = m_get(M_DONTWAIT, m->m_type);
+ n = m_get(M_NOWAIT, m->m_type);
if (n == NULL)
break;
n->m_len = min(MLEN, len);
diff --git a/sys/kern/uipc_mbuf2.c b/sys/kern/uipc_mbuf2.c
index 50b37f5..336ffa5 100644
--- a/sys/kern/uipc_mbuf2.c
+++ b/sys/kern/uipc_mbuf2.c
@@ -171,7 +171,7 @@ m_pulldown(struct mbuf *m, int off, int len, int *offp)
* chop the current mbuf into two pieces, set off to 0.
*/
if (len <= n->m_len - off) {
- o = m_dup1(n, off, n->m_len - off, M_DONTWAIT);
+ o = m_dup1(n, off, n->m_len - off, M_NOWAIT);
if (o == NULL) {
m_freem(m);
return NULL; /* ENOBUFS */
@@ -230,9 +230,9 @@ m_pulldown(struct mbuf *m, int off, int len, int *offp)
* now, we need to do the hard way. don't m_copy as there's no room
* on both end.
*/
- MGET(o, M_DONTWAIT, m->m_type);
+ MGET(o, M_NOWAIT, m->m_type);
if (o && len > MLEN) {
- MCLGET(o, M_DONTWAIT);
+ MCLGET(o, M_NOWAIT);
if ((o->m_flags & M_EXT) == 0) {
m_free(o);
o = NULL;
diff --git a/sys/kern/uipc_sem.c b/sys/kern/uipc_sem.c
index e3912e1..3d9d5b55 100644
--- a/sys/kern/uipc_sem.c
+++ b/sys/kern/uipc_sem.c
@@ -188,7 +188,7 @@ sem_create(td, name, ksret, mode, value)
uc = p->p_ucred;
if (value > SEM_VALUE_MAX)
return (EINVAL);
- ret = malloc(sizeof(*ret), M_SEM, M_WAITOK | M_ZERO);
+ ret = malloc(sizeof(*ret), M_SEM, M_ZERO);
if (name != NULL) {
len = strlen(name);
if (len > SEM_MAX_NAMELEN) {
@@ -200,7 +200,7 @@ sem_create(td, name, ksret, mode, value)
free(ret, M_SEM);
return (EINVAL);
}
- ret->ks_name = malloc(len + 1, M_SEM, M_WAITOK);
+ ret->ks_name = malloc(len + 1, M_SEM, 0);
strcpy(ret->ks_name, name);
} else {
ret->ks_name = NULL;
@@ -504,7 +504,7 @@ sem_enter(p, ks)
{
struct kuser *ku, *k;
- ku = malloc(sizeof(*ku), M_SEM, M_WAITOK);
+ ku = malloc(sizeof(*ku), M_SEM, 0);
ku->ku_pid = p->p_pid;
mtx_lock(&sem_lock);
k = sem_getuser(p, ks);
diff --git a/sys/kern/uipc_sockbuf.c b/sys/kern/uipc_sockbuf.c
index 3283b58..d2f1d51 100644
--- a/sys/kern/uipc_sockbuf.c
+++ b/sys/kern/uipc_sockbuf.c
@@ -315,7 +315,7 @@ sowakeup(so, sb)
if ((so->so_state & SS_ASYNC) && so->so_sigio != NULL)
pgsigio(&so->so_sigio, SIGIO, 0);
if (sb->sb_flags & SB_UPCALL)
- (*so->so_upcall)(so, so->so_upcallarg, M_DONTWAIT);
+ (*so->so_upcall)(so, so->so_upcallarg, M_NOWAIT);
if (sb->sb_flags & SB_AIO)
aio_swake(so, sb);
KNOTE(&sb->sb_sel.si_note, 0);
@@ -626,7 +626,7 @@ sbappendaddr(sb, asa, m0, control)
return (0);
if (asa->sa_len > MLEN)
return (0);
- MGET(m, M_DONTWAIT, MT_SONAME);
+ MGET(m, M_NOWAIT, MT_SONAME);
if (m == 0)
return (0);
m->m_len = asa->sa_len;
@@ -833,10 +833,10 @@ sbcreatecontrol(p, size, type, level)
if (CMSG_SPACE((u_int)size) > MCLBYTES)
return ((struct mbuf *) NULL);
- if ((m = m_get(M_DONTWAIT, MT_CONTROL)) == NULL)
+ if ((m = m_get(M_NOWAIT, MT_CONTROL)) == NULL)
return ((struct mbuf *) NULL);
if (CMSG_SPACE((u_int)size) > MLEN) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
m_free(m);
return ((struct mbuf *) NULL);
@@ -924,7 +924,7 @@ dup_sockaddr(sa, canwait)
struct sockaddr *sa2;
MALLOC(sa2, struct sockaddr *, sa->sa_len, M_SONAME,
- canwait ? M_WAITOK : M_NOWAIT);
+ canwait ? 0 : M_NOWAIT);
if (sa2)
bcopy(sa, sa2, sa->sa_len);
return sa2;
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c
index 4163f2e..1ab2885 100644
--- a/sys/kern/uipc_socket.c
+++ b/sys/kern/uipc_socket.c
@@ -137,7 +137,7 @@ soalloc(waitok)
int flag;
if (waitok == 1)
- flag = M_WAITOK;
+ flag = 0;
else
flag = M_NOWAIT;
flag |= M_ZERO;
@@ -482,7 +482,7 @@ bad:
return (error);
}
-#define SBLOCKWAIT(f) (((f) & MSG_DONTWAIT) ? M_NOWAIT : M_WAITOK)
+#define SBLOCKWAIT(f) (((f) & MSG_DONTWAIT) ? M_NOWAIT : 0)
/*
* Send on a socket.
* If send must go all at once and message is larger than
@@ -626,7 +626,7 @@ restart:
cow_send = 0;
#endif /* ZERO_COPY_SOCKETS */
if (top == 0) {
- MGETHDR(m, M_TRYWAIT, MT_DATA);
+ MGETHDR(m, 0, MT_DATA);
if (m == NULL) {
error = ENOBUFS;
goto release;
@@ -635,7 +635,7 @@ restart:
m->m_pkthdr.len = 0;
m->m_pkthdr.rcvif = (struct ifnet *)0;
} else {
- MGET(m, M_TRYWAIT, MT_DATA);
+ MGET(m, 0, MT_DATA);
if (m == NULL) {
error = ENOBUFS;
goto release;
@@ -657,7 +657,7 @@ restart:
}
if (!cow_send){
#endif /* ZERO_COPY_SOCKETS */
- MCLGET(m, M_TRYWAIT);
+ MCLGET(m, 0);
if ((m->m_flags & M_EXT) == 0)
goto nopages;
mlen = MCLBYTES;
@@ -788,7 +788,7 @@ soreceive(so, psa, uio, mp0, controlp, flagsp)
else
flags = 0;
if (flags & MSG_OOB) {
- m = m_get(M_TRYWAIT, MT_DATA);
+ m = m_get(0, MT_DATA);
if (m == NULL)
return (ENOBUFS);
error = (*pr->pr_usrreqs->pru_rcvoob)(so, m, flags & MSG_PEEK);
@@ -1025,7 +1025,7 @@ dontblock:
moff += len;
else {
if (mp)
- *mp = m_copym(m, 0, len, M_TRYWAIT);
+ *mp = m_copym(m, 0, len, 0);
m->m_data += len;
m->m_len -= len;
so->so_rcv.sb_cc -= len;
@@ -1128,7 +1128,7 @@ sorflush(so)
struct sockbuf asb;
sb->sb_flags |= SB_NOINTR;
- (void) sblock(sb, M_WAITOK);
+ (void) sblock(sb, 0);
s = splimp();
socantrcvmore(so);
sbunlock(sb);
@@ -1180,7 +1180,7 @@ do_setopt_accept_filter(so, sopt)
goto out;
}
/* don't put large objects on the kernel stack */
- MALLOC(afap, struct accept_filter_arg *, sizeof(*afap), M_TEMP, M_WAITOK);
+ MALLOC(afap, struct accept_filter_arg *, sizeof(*afap), M_TEMP, 0);
error = sooptcopyin(sopt, afap, sizeof *afap, sizeof *afap);
afap->af_name[sizeof(afap->af_name)-1] = '\0';
afap->af_arg[sizeof(afap->af_arg)-1] = '\0';
@@ -1191,12 +1191,12 @@ do_setopt_accept_filter(so, sopt)
error = ENOENT;
goto out;
}
- MALLOC(af, struct so_accf *, sizeof(*af), M_ACCF, M_WAITOK | M_ZERO);
+ MALLOC(af, struct so_accf *, sizeof(*af), M_ACCF, M_ZERO);
if (afp->accf_create != NULL) {
if (afap->af_name[0] != '\0') {
int len = strlen(afap->af_name) + 1;
- MALLOC(af->so_accept_filter_str, char *, len, M_ACCF, M_WAITOK);
+ MALLOC(af->so_accept_filter_str, char *, len, M_ACCF, 0);
strcpy(af->so_accept_filter_str, afap->af_name);
}
af->so_accept_filter_arg = afp->accf_create(so, afap->af_arg);
@@ -1478,7 +1478,7 @@ sogetopt(so, sopt)
if ((so->so_options & SO_ACCEPTCONN) == 0)
return (EINVAL);
MALLOC(afap, struct accept_filter_arg *, sizeof(*afap),
- M_TEMP, M_WAITOK | M_ZERO);
+ M_TEMP, M_ZERO);
if ((so->so_options & SO_ACCEPTFILTER) != 0) {
strcpy(afap->af_name, so->so_accf->so_accept_filter->accf_name);
if (so->so_accf->so_accept_filter_str != NULL)
@@ -1581,11 +1581,11 @@ soopt_getm(struct sockopt *sopt, struct mbuf **mp)
struct mbuf *m, *m_prev;
int sopt_size = sopt->sopt_valsize;
- MGET(m, sopt->sopt_td ? M_TRYWAIT : M_DONTWAIT, MT_DATA);
+ MGET(m, sopt->sopt_td ? 0 : M_NOWAIT, MT_DATA);
if (m == 0)
return ENOBUFS;
if (sopt_size > MLEN) {
- MCLGET(m, sopt->sopt_td ? M_TRYWAIT : M_DONTWAIT);
+ MCLGET(m, sopt->sopt_td ? 0 : M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
m_free(m);
return ENOBUFS;
@@ -1599,13 +1599,13 @@ soopt_getm(struct sockopt *sopt, struct mbuf **mp)
m_prev = m;
while (sopt_size) {
- MGET(m, sopt->sopt_td ? M_TRYWAIT : M_DONTWAIT, MT_DATA);
+ MGET(m, sopt->sopt_td ? 0 : M_NOWAIT, MT_DATA);
if (m == 0) {
m_freem(*mp);
return ENOBUFS;
}
if (sopt_size > MLEN) {
- MCLGET(m, sopt->sopt_td ? M_TRYWAIT : M_DONTWAIT);
+ MCLGET(m, sopt->sopt_td ? 0 : M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
m_freem(*mp);
return ENOBUFS;
diff --git a/sys/kern/uipc_socket2.c b/sys/kern/uipc_socket2.c
index 3283b58..d2f1d51 100644
--- a/sys/kern/uipc_socket2.c
+++ b/sys/kern/uipc_socket2.c
@@ -315,7 +315,7 @@ sowakeup(so, sb)
if ((so->so_state & SS_ASYNC) && so->so_sigio != NULL)
pgsigio(&so->so_sigio, SIGIO, 0);
if (sb->sb_flags & SB_UPCALL)
- (*so->so_upcall)(so, so->so_upcallarg, M_DONTWAIT);
+ (*so->so_upcall)(so, so->so_upcallarg, M_NOWAIT);
if (sb->sb_flags & SB_AIO)
aio_swake(so, sb);
KNOTE(&sb->sb_sel.si_note, 0);
@@ -626,7 +626,7 @@ sbappendaddr(sb, asa, m0, control)
return (0);
if (asa->sa_len > MLEN)
return (0);
- MGET(m, M_DONTWAIT, MT_SONAME);
+ MGET(m, M_NOWAIT, MT_SONAME);
if (m == 0)
return (0);
m->m_len = asa->sa_len;
@@ -833,10 +833,10 @@ sbcreatecontrol(p, size, type, level)
if (CMSG_SPACE((u_int)size) > MCLBYTES)
return ((struct mbuf *) NULL);
- if ((m = m_get(M_DONTWAIT, MT_CONTROL)) == NULL)
+ if ((m = m_get(M_NOWAIT, MT_CONTROL)) == NULL)
return ((struct mbuf *) NULL);
if (CMSG_SPACE((u_int)size) > MLEN) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
m_free(m);
return ((struct mbuf *) NULL);
@@ -924,7 +924,7 @@ dup_sockaddr(sa, canwait)
struct sockaddr *sa2;
MALLOC(sa2, struct sockaddr *, sa->sa_len, M_SONAME,
- canwait ? M_WAITOK : M_NOWAIT);
+ canwait ? 0 : M_NOWAIT);
if (sa2)
bcopy(sa, sa2, sa->sa_len);
return sa2;
diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c
index 2bd0c9f0..8fd69e7 100644
--- a/sys/kern/uipc_syscalls.c
+++ b/sys/kern/uipc_syscalls.c
@@ -648,7 +648,7 @@ sendit(td, s, mp, flags)
if (mp->msg_flags == MSG_COMPAT) {
register struct cmsghdr *cm;
- M_PREPEND(control, sizeof(*cm), M_TRYWAIT);
+ M_PREPEND(control, sizeof(*cm), 0);
if (control == 0) {
error = ENOBUFS;
goto bad;
@@ -666,7 +666,7 @@ sendit(td, s, mp, flags)
#ifdef KTRACE
if (KTRPOINT(td, KTR_GENIO)) {
iovlen = auio.uio_iovcnt * sizeof (struct iovec);
- MALLOC(ktriov, struct iovec *, iovlen, M_TEMP, M_WAITOK);
+ MALLOC(ktriov, struct iovec *, iovlen, M_TEMP, 0);
bcopy(auio.uio_iov, ktriov, iovlen);
ktruio = auio;
}
@@ -798,7 +798,7 @@ osendmsg(td, uap)
}
MALLOC(iov, struct iovec *,
sizeof(struct iovec) * (u_int)msg.msg_iovlen, M_IOV,
- M_WAITOK);
+ 0);
} else {
iov = aiov;
}
@@ -845,7 +845,7 @@ sendmsg(td, uap)
}
MALLOC(iov, struct iovec *,
sizeof(struct iovec) * (u_int)msg.msg_iovlen, M_IOV,
- M_WAITOK);
+ 0);
} else {
iov = aiov;
}
@@ -915,7 +915,7 @@ recvit(td, s, mp, namelenp)
#ifdef KTRACE
if (KTRPOINT(td, KTR_GENIO)) {
iovlen = auio.uio_iovcnt * sizeof (struct iovec);
- MALLOC(ktriov, struct iovec *, iovlen, M_TEMP, M_WAITOK);
+ MALLOC(ktriov, struct iovec *, iovlen, M_TEMP, 0);
bcopy(auio.uio_iov, ktriov, iovlen);
ktruio = auio;
}
@@ -1148,7 +1148,7 @@ orecvmsg(td, uap)
}
MALLOC(iov, struct iovec *,
sizeof(struct iovec) * (u_int)msg.msg_iovlen, M_IOV,
- M_WAITOK);
+ 0);
} else {
iov = aiov;
}
@@ -1199,7 +1199,7 @@ recvmsg(td, uap)
}
MALLOC(iov, struct iovec *,
sizeof(struct iovec) * (u_int)msg.msg_iovlen, M_IOV,
- M_WAITOK);
+ 0);
} else {
iov = aiov;
}
@@ -1535,7 +1535,7 @@ sockargs(mp, buf, buflen, type)
#endif
return (EINVAL);
}
- m = m_get(M_TRYWAIT, type);
+ m = m_get(0, type);
if (m == NULL)
return (ENOBUFS);
m->m_len = buflen;
@@ -1568,7 +1568,7 @@ getsockaddr(namp, uaddr, len)
if (len > SOCK_MAXADDRLEN)
return ENAMETOOLONG;
- MALLOC(sa, struct sockaddr *, len, M_SONAME, M_WAITOK);
+ MALLOC(sa, struct sockaddr *, len, M_SONAME, 0);
error = copyin(uaddr, sa, len);
if (error) {
FREE(sa, M_SONAME);
@@ -1782,7 +1782,7 @@ do_sendfile(struct thread *td, struct sendfile_args *uap, int compat)
/*
* Protect against multiple writers to the socket.
*/
- (void) sblock(&so->so_snd, M_WAITOK);
+ (void) sblock(&so->so_snd, 0);
/*
* Loop through the pages in the file, starting with the requested
@@ -1926,7 +1926,7 @@ retry_lookup:
/*
* Get an mbuf header and set it up as having external storage.
*/
- MGETHDR(m, M_TRYWAIT, MT_DATA);
+ MGETHDR(m, 0, MT_DATA);
if (m == NULL) {
error = ENOBUFS;
sf_buf_free((void *)sf->kva, NULL);
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c
index 04b4c6d..2907cf2 100644
--- a/sys/kern/uipc_usrreq.c
+++ b/sys/kern/uipc_usrreq.c
@@ -533,7 +533,7 @@ unp_attach(so)
if (error)
return (error);
}
- unp = uma_zalloc(unp_zone, M_WAITOK);
+ unp = uma_zalloc(unp_zone, 0);
if (unp == NULL)
return (ENOBUFS);
bzero(unp, sizeof *unp);
@@ -605,7 +605,7 @@ unp_bind(unp, nam, td)
if (namelen <= 0)
return EINVAL;
- buf = malloc(namelen + 1, M_TEMP, M_WAITOK);
+ buf = malloc(namelen + 1, M_TEMP, 0);
strlcpy(buf, soun->sun_path, namelen + 1);
restart:
@@ -848,7 +848,7 @@ unp_pcblist(SYSCTL_HANDLER_ARGS)
/*
* OK, now we're committed to doing something.
*/
- xug = malloc(sizeof(*xug), M_TEMP, M_WAITOK);
+ xug = malloc(sizeof(*xug), M_TEMP, 0);
gencnt = unp_gencnt;
n = unp_count;
@@ -862,7 +862,7 @@ unp_pcblist(SYSCTL_HANDLER_ARGS)
return error;
}
- unp_list = malloc(n * sizeof *unp_list, M_TEMP, M_WAITOK);
+ unp_list = malloc(n * sizeof *unp_list, M_TEMP, 0);
for (unp = LIST_FIRST(head), i = 0; unp && i < n;
unp = LIST_NEXT(unp, unp_link)) {
@@ -876,7 +876,7 @@ unp_pcblist(SYSCTL_HANDLER_ARGS)
n = i; /* in case we lost some during malloc */
error = 0;
- xu = malloc(sizeof(*xu), M_TEMP, M_WAITOK);
+ xu = malloc(sizeof(*xu), M_TEMP, 0);
for (i = 0; i < n; i++) {
unp = unp_list[i];
if (unp->unp_gencnt <= gencnt) {
@@ -1379,7 +1379,7 @@ unp_gc()
*
* 91/09/19, bsy@cs.cmu.edu
*/
- extra_ref = malloc(nfiles * sizeof(struct file *), M_TEMP, M_WAITOK);
+ extra_ref = malloc(nfiles * sizeof(struct file *), M_TEMP, 0);
sx_slock(&filelist_lock);
for (nunref = 0, fp = LIST_FIRST(&filehead), fpp = extra_ref; fp != 0;
fp = nextfp) {
diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c
index 9532ff2..5cee627 100644
--- a/sys/kern/vfs_aio.c
+++ b/sys/kern/vfs_aio.c
@@ -392,7 +392,7 @@ aio_init_aioinfo(struct proc *p)
struct kaioinfo *ki;
if (p->p_aioinfo == NULL) {
- ki = uma_zalloc(kaio_zone, M_WAITOK);
+ ki = uma_zalloc(kaio_zone, 0);
p->p_aioinfo = ki;
ki->kaio_flags = 0;
ki->kaio_maxactive_count = max_aio_per_proc;
@@ -777,7 +777,7 @@ aio_daemon(void *uproc)
* Allocate and ready the aio control info. There is one aiop structure
* per daemon.
*/
- aiop = uma_zalloc(aiop_zone, M_WAITOK);
+ aiop = uma_zalloc(aiop_zone, 0);
aiop->aiothread = td;
aiop->aiothreadflags |= AIOP_FREE;
@@ -801,9 +801,9 @@ aio_daemon(void *uproc)
mtx_unlock(&Giant);
/* The daemon resides in its own pgrp. */
MALLOC(newpgrp, struct pgrp *, sizeof(struct pgrp), M_PGRP,
- M_WAITOK | M_ZERO);
+ M_ZERO);
MALLOC(newsess, struct session *, sizeof(struct session), M_SESSION,
- M_WAITOK | M_ZERO);
+ M_ZERO);
sx_xlock(&proctree_lock);
enterpgrp(mycp, mycp->p_pid, newpgrp, newsess);
@@ -1301,7 +1301,7 @@ _aio_aqueue(struct thread *td, struct aiocb *job, struct aio_liojob *lj, int typ
struct kqueue *kq;
struct file *kq_fp;
- aiocbe = uma_zalloc(aiocb_zone, M_WAITOK);
+ aiocbe = uma_zalloc(aiocb_zone, 0);
aiocbe->inputcharge = 0;
aiocbe->outputcharge = 0;
callout_handle_init(&aiocbe->timeouthandle);
@@ -1647,8 +1647,8 @@ aio_suspend(struct thread *td, struct aio_suspend_args *uap)
return (EAGAIN);
njoblist = 0;
- ijoblist = uma_zalloc(aiol_zone, M_WAITOK);
- ujoblist = uma_zalloc(aiol_zone, M_WAITOK);
+ ijoblist = uma_zalloc(aiol_zone, 0);
+ ujoblist = uma_zalloc(aiol_zone, 0);
cbptr = uap->aiocbp;
for (i = 0; i < uap->nent; i++) {
@@ -1971,7 +1971,7 @@ lio_listio(struct thread *td, struct lio_listio_args *uap)
if ((nent + ki->kaio_queue_count) > ki->kaio_qallowed_count)
return (EAGAIN);
- lj = uma_zalloc(aiolio_zone, M_WAITOK);
+ lj = uma_zalloc(aiolio_zone, 0);
if (!lj)
return (EAGAIN);
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index 9de4fd1..0f8830a 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -2641,7 +2641,7 @@ allocbuf(struct buf *bp, int size)
(bp->b_bufsize == 0) &&
(mbsize <= PAGE_SIZE/2)) {
- bp->b_data = malloc(mbsize, M_BIOBUF, M_WAITOK);
+ bp->b_data = malloc(mbsize, M_BIOBUF, 0);
bp->b_bufsize = mbsize;
bp->b_bcount = size;
bp->b_flags |= B_MALLOC;
diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c
index 80ea2f0..c74f4ee 100644
--- a/sys/kern/vfs_cache.c
+++ b/sys/kern/vfs_cache.c
@@ -413,7 +413,7 @@ cache_enter(dvp, vp, cnp)
}
ncp = (struct namecache *)
- malloc(sizeof *ncp + cnp->cn_namelen, M_VFSCACHE, M_WAITOK);
+ malloc(sizeof *ncp + cnp->cn_namelen, M_VFSCACHE, 0);
bzero((char *)ncp, sizeof *ncp);
numcache++;
if (!vp) {
@@ -729,7 +729,7 @@ kern___getcwd(struct thread *td, u_char *buf, enum uio_seg bufseg, u_int buflen)
if (buflen > MAXPATHLEN)
buflen = MAXPATHLEN;
error = 0;
- tmpbuf = bp = malloc(buflen, M_TEMP, M_WAITOK);
+ tmpbuf = bp = malloc(buflen, M_TEMP, 0);
bp += buflen - 1;
*bp = '\0';
fdp = td->td_proc->p_fd;
@@ -840,7 +840,7 @@ vn_fullpath(struct thread *td, struct vnode *vn, char **retbuf, char **freebuf)
return (ENODEV);
if (vn == NULL)
return (EINVAL);
- buf = malloc(MAXPATHLEN, M_TEMP, M_WAITOK);
+ buf = malloc(MAXPATHLEN, M_TEMP, 0);
bp = buf + MAXPATHLEN - 1;
*bp = '\0';
fdp = td->td_proc->p_fd;
diff --git a/sys/kern/vfs_cluster.c b/sys/kern/vfs_cluster.c
index 7fd0402..da84419 100644
--- a/sys/kern/vfs_cluster.c
+++ b/sys/kern/vfs_cluster.c
@@ -1001,7 +1001,7 @@ cluster_collectbufs(vp, last_bp)
len = vp->v_lastw - vp->v_cstart + 1;
buflist = malloc(sizeof(struct buf *) * (len + 1) + sizeof(*buflist),
- M_SEGMENT, M_WAITOK);
+ M_SEGMENT, 0);
buflist->bs_nchildren = 0;
buflist->bs_children = (struct buf **) (buflist + 1);
for (lbn = vp->v_cstart, i = 0; i < len; lbn++, i++) {
diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c
index b909b83..80158a3 100644
--- a/sys/kern/vfs_export.c
+++ b/sys/kern/vfs_export.c
@@ -122,7 +122,7 @@ vfs_hang_addrlist(mp, nep, argp)
return (EINVAL);
i = sizeof(struct netcred) + argp->ex_addrlen + argp->ex_masklen;
- np = (struct netcred *) malloc(i, M_NETADDR, M_WAITOK | M_ZERO);
+ np = (struct netcred *) malloc(i, M_NETADDR, M_ZERO);
saddr = (struct sockaddr *) (np + 1);
if ((error = copyin(argp->ex_addr, saddr, argp->ex_addrlen)))
goto out;
@@ -236,7 +236,7 @@ vfs_export(mp, argp)
}
if (argp->ex_flags & MNT_EXPORTED) {
if (nep == NULL) {
- nep = malloc(sizeof(struct netexport), M_MOUNT, M_WAITOK | M_ZERO);
+ nep = malloc(sizeof(struct netexport), M_MOUNT, M_ZERO);
mp->mnt_export = nep;
}
if (argp->ex_flags & MNT_EXPUBLIC) {
@@ -306,7 +306,7 @@ vfs_setpublicfs(mp, nep, argp)
*/
if (argp->ex_indexfile != NULL) {
MALLOC(nfs_pub.np_index, char *, MAXNAMLEN + 1, M_TEMP,
- M_WAITOK);
+ 0);
error = copyinstr(argp->ex_indexfile, nfs_pub.np_index,
MAXNAMLEN, (size_t *)0);
if (!error) {
diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c
index 432ebed..2fbdcfe 100644
--- a/sys/kern/vfs_extattr.c
+++ b/sys/kern/vfs_extattr.c
@@ -1104,7 +1104,7 @@ kern_symlink(struct thread *td, char *path, char *link, enum uio_seg segflg)
if (segflg == UIO_SYSSPACE) {
syspath = path;
} else {
- syspath = uma_zalloc(namei_zone, M_WAITOK);
+ syspath = uma_zalloc(namei_zone, 0);
if ((error = copyinstr(path, syspath, MAXPATHLEN, NULL)) != 0)
goto out;
}
@@ -3110,7 +3110,7 @@ unionread:
kuio.uio_iov = &kiov;
kuio.uio_segflg = UIO_SYSSPACE;
kiov.iov_len = uap->count;
- MALLOC(dirbuf, caddr_t, uap->count, M_TEMP, M_WAITOK);
+ MALLOC(dirbuf, caddr_t, uap->count, M_TEMP, 0);
kiov.iov_base = dirbuf;
error = VOP_READDIR(vp, &kuio, fp->f_cred, &eofflag,
NULL, NULL);
diff --git a/sys/kern/vfs_init.c b/sys/kern/vfs_init.c
index b221cd3..24ae27a 100644
--- a/sys/kern/vfs_init.c
+++ b/sys/kern/vfs_init.c
@@ -133,7 +133,7 @@ vfs_opv_recalc(void)
* detectable.
*/
MALLOC(vfs_op_offsets, int *,
- num_op_descs * sizeof(int), M_TEMP, M_WAITOK);
+ num_op_descs * sizeof(int), M_TEMP, 0);
if (vfs_op_offsets == NULL)
panic("vfs_opv_recalc: no memory");
for (i = 0; i < num_op_descs; i++)
@@ -186,7 +186,7 @@ vfs_opv_recalc(void)
if (*opv_desc_vector_p == NULL)
MALLOC(*opv_desc_vector_p, vop_t **,
vfs_opv_numops * sizeof(vop_t *), M_VNODE,
- M_WAITOK | M_ZERO);
+ M_ZERO);
/* Fill in, with slot 0 being to return EOPNOTSUPP */
opv_desc_vector = *opv_desc_vector_p;
@@ -221,7 +221,7 @@ vfs_add_vnodeops(const void *data)
opv = (const struct vnodeopv_desc *)data;
MALLOC(newopv, const struct vnodeopv_desc **,
- (vnodeopv_num + 1) * sizeof(*newopv), M_VNODE, M_WAITOK);
+ (vnodeopv_num + 1) * sizeof(*newopv), M_VNODE, 0);
if (vnodeopv_descs) {
bcopy(vnodeopv_descs, newopv, vnodeopv_num * sizeof(*newopv));
FREE(vnodeopv_descs, M_VNODE);
@@ -244,11 +244,11 @@ vfs_add_vnodeops(const void *data)
/* not found, new entry */
MALLOC(newop, struct vnodeop_desc **,
(num_op_descs + 1) * sizeof(*newop),
- M_VNODE, M_WAITOK);
+ M_VNODE, 0);
/* new reference count (for unload) */
MALLOC(newref, int *,
(num_op_descs + 1) * sizeof(*newref),
- M_VNODE, M_WAITOK);
+ M_VNODE, 0);
if (vfs_op_descs) {
bcopy(vfs_op_descs, newop,
num_op_descs * sizeof(*newop));
@@ -306,11 +306,11 @@ vfs_rm_vnodeops(const void *data)
}
MALLOC(newop, struct vnodeop_desc **,
(num_op_descs - 1) * sizeof(*newop),
- M_VNODE, M_WAITOK);
+ M_VNODE, 0);
/* new reference count (for unload) */
MALLOC(newref, int *,
(num_op_descs - 1) * sizeof(*newref),
- M_VNODE, M_WAITOK);
+ M_VNODE, 0);
for (k = j; k < (num_op_descs - 1); k++) {
vfs_op_descs[k] = vfs_op_descs[k + 1];
vfs_op_desc_refs[k] = vfs_op_desc_refs[k + 1];
@@ -340,7 +340,7 @@ vfs_rm_vnodeops(const void *data)
if (opv_desc_vector != NULL)
FREE(opv_desc_vector, M_VNODE);
MALLOC(newopv, const struct vnodeopv_desc **,
- (vnodeopv_num - 1) * sizeof(*newopv), M_VNODE, M_WAITOK);
+ (vnodeopv_num - 1) * sizeof(*newopv), M_VNODE, 0);
bcopy(vnodeopv_descs, newopv, (vnodeopv_num - 1) * sizeof(*newopv));
FREE(vnodeopv_descs, M_VNODE);
vnodeopv_descs = newopv;
diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c
index f064b64..e33e2c6 100644
--- a/sys/kern/vfs_lookup.c
+++ b/sys/kern/vfs_lookup.c
@@ -120,7 +120,7 @@ namei(ndp)
* name into the buffer.
*/
if ((cnp->cn_flags & HASBUF) == 0)
- cnp->cn_pnbuf = uma_zalloc(namei_zone, M_WAITOK);
+ cnp->cn_pnbuf = uma_zalloc(namei_zone, 0);
if (ndp->ni_segflg == UIO_SYSSPACE)
error = copystr(ndp->ni_dirp, cnp->cn_pnbuf,
MAXPATHLEN, (size_t *)&ndp->ni_pathlen);
@@ -224,7 +224,7 @@ namei(ndp)
}
#endif
if (ndp->ni_pathlen > 1)
- cp = uma_zalloc(namei_zone, M_WAITOK);
+ cp = uma_zalloc(namei_zone, 0);
else
cp = cnp->cn_pnbuf;
aiov.iov_base = cp;
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c
index a5e5989..52937c9 100644
--- a/sys/kern/vfs_mount.c
+++ b/sys/kern/vfs_mount.c
@@ -224,13 +224,13 @@ vfs_buildopts(struct uio *auio, struct vfsoptlist **options)
int error, namelen, optlen;
iovcnt = auio->uio_iovcnt;
- opts = malloc(sizeof(struct vfsoptlist), M_MOUNT, M_WAITOK);
+ opts = malloc(sizeof(struct vfsoptlist), M_MOUNT, 0);
TAILQ_INIT(opts);
for (i = 0; i < iovcnt; i += 2) {
- opt = malloc(sizeof(struct vfsopt), M_MOUNT, M_WAITOK);
+ opt = malloc(sizeof(struct vfsopt), M_MOUNT, 0);
namelen = auio->uio_iov[i].iov_len;
optlen = auio->uio_iov[i + 1].iov_len;
- opt->name = malloc(namelen, M_MOUNT, M_WAITOK);
+ opt->name = malloc(namelen, M_MOUNT, 0);
opt->value = NULL;
if (auio->uio_segflg == UIO_SYSSPACE) {
bcopy(auio->uio_iov[i].iov_base, opt->name, namelen);
@@ -242,7 +242,7 @@ vfs_buildopts(struct uio *auio, struct vfsoptlist **options)
}
opt->len = optlen;
if (optlen != 0) {
- opt->value = malloc(optlen, M_MOUNT, M_WAITOK);
+ opt->value = malloc(optlen, M_MOUNT, 0);
if (auio->uio_segflg == UIO_SYSSPACE) {
bcopy(auio->uio_iov[i + 1].iov_base, opt->value,
optlen);
@@ -289,11 +289,11 @@ vfs_mergeopts(struct vfsoptlist *toopts, struct vfsoptlist *opts)
opt2 = TAILQ_NEXT(opt2, link);
}
/* We want this option, duplicate it. */
- new = malloc(sizeof(struct vfsopt), M_MOUNT, M_WAITOK);
- new->name = malloc(strlen(opt->name) + 1, M_MOUNT, M_WAITOK);
+ new = malloc(sizeof(struct vfsopt), M_MOUNT, 0);
+ new->name = malloc(strlen(opt->name) + 1, M_MOUNT, 0);
strcpy(new->name, opt->name);
if (opt->len != 0) {
- new->value = malloc(opt->len, M_MOUNT, M_WAITOK);
+ new->value = malloc(opt->len, M_MOUNT, 0);
bcopy(opt->value, new->value, opt->len);
} else {
new->value = NULL;
@@ -334,7 +334,7 @@ nmount(td, uap)
return (EINVAL);
if (iovcnt > UIO_SMALLIOV) {
- MALLOC(iov, struct iovec *, iovlen, M_IOV, M_WAITOK);
+ MALLOC(iov, struct iovec *, iovlen, M_IOV, 0);
needfree = iov;
} else {
iov = aiov;
@@ -406,8 +406,8 @@ kernel_vmount(int flags, ...)
return (EINVAL);
iovlen = iovcnt * sizeof (struct iovec);
- MALLOC(iovp, struct iovec *, iovlen, M_MOUNT, M_WAITOK);
- MALLOC(buf, char *, len, M_MOUNT, M_WAITOK);
+ MALLOC(iovp, struct iovec *, iovlen, M_MOUNT, 0);
+ MALLOC(buf, char *, len, M_MOUNT, 0);
pos = buf;
va_start(ap, flags);
for (i = 0; i < iovcnt; i++) {
@@ -634,7 +634,7 @@ vfs_nmount(td, fsflags, fsoptions)
/*
* Allocate and initialize the filesystem.
*/
- mp = malloc(sizeof(struct mount), M_MOUNT, M_WAITOK | M_ZERO);
+ mp = malloc(sizeof(struct mount), M_MOUNT, M_ZERO);
TAILQ_INIT(&mp->mnt_nvnodelist);
TAILQ_INIT(&mp->mnt_reservedvnlist);
lockinit(&mp->mnt_lock, PVFS, "vfslock", 0, LK_NOPAUSE);
@@ -805,8 +805,8 @@ mount(td, uap)
char *fspath;
int error;
- fstype = malloc(MFSNAMELEN, M_TEMP, M_WAITOK);
- fspath = malloc(MNAMELEN, M_TEMP, M_WAITOK);
+ fstype = malloc(MFSNAMELEN, M_TEMP, 0);
+ fspath = malloc(MNAMELEN, M_TEMP, 0);
/*
* vfs_mount() actually takes a kernel string for `type' and
@@ -998,7 +998,7 @@ vfs_mount(td, fstype, fspath, fsflags, fsdata)
/*
* Allocate and initialize the filesystem.
*/
- mp = malloc(sizeof(struct mount), M_MOUNT, M_WAITOK | M_ZERO);
+ mp = malloc(sizeof(struct mount), M_MOUNT, M_ZERO);
TAILQ_INIT(&mp->mnt_nvnodelist);
TAILQ_INIT(&mp->mnt_reservedvnlist);
lockinit(&mp->mnt_lock, PVFS, "vfslock", 0, LK_NOPAUSE);
@@ -1361,7 +1361,7 @@ vfs_rootmountalloc(fstypename, devname, mpp)
break;
if (vfsp == NULL)
return (ENODEV);
- mp = malloc((u_long)sizeof(struct mount), M_MOUNT, M_WAITOK | M_ZERO);
+ mp = malloc((u_long)sizeof(struct mount), M_MOUNT, M_ZERO);
lockinit(&mp->mnt_lock, PVFS, "vfslock", 0, LK_NOPAUSE);
(void)vfs_busy(mp, LK_NOWAIT, 0, td);
TAILQ_INIT(&mp->mnt_nvnodelist);
@@ -1494,8 +1494,8 @@ vfs_mountroot_try(char *mountfrom)
splx(s);
/* parse vfs name and path */
- vfsname = malloc(MFSNAMELEN, M_MOUNT, M_WAITOK);
- path = malloc(MNAMELEN, M_MOUNT, M_WAITOK);
+ vfsname = malloc(MFSNAMELEN, M_MOUNT, 0);
+ path = malloc(MNAMELEN, M_MOUNT, 0);
vfsname[0] = path[0] = 0;
sprintf(patt, "%%%d[a-z0-9]:%%%zds", MFSNAMELEN, MNAMELEN);
if (sscanf(mountfrom, patt, vfsname, path) < 1)
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 8e954eb..7f3af03 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -452,7 +452,7 @@ vop_lock_post(void *ap, int rc)
void
v_addpollinfo(struct vnode *vp)
{
- vp->v_pollinfo = uma_zalloc(vnodepoll_zone, M_WAITOK);
+ vp->v_pollinfo = uma_zalloc(vnodepoll_zone, 0);
mtx_init(&vp->v_pollinfo->vpi_lock, "vnode pollinfo", NULL, MTX_DEF);
}
@@ -996,7 +996,7 @@ getnewvnode(tag, mp, vops, vpp)
numvnodes++;
mtx_unlock(&vnode_free_list_mtx);
- vp = (struct vnode *) uma_zalloc(vnode_zone, M_WAITOK|M_ZERO);
+ vp = (struct vnode *) uma_zalloc(vnode_zone, M_ZERO);
mtx_init(&vp->v_interlock, "vnode interlock", NULL, MTX_DEF);
VI_LOCK(vp);
vp->v_dd = vp;
@@ -2938,7 +2938,7 @@ sysctl_vfs_conflist(SYSCTL_HANDLER_ARGS)
cnt = 0;
for (vfsp = vfsconf; vfsp != NULL; vfsp = vfsp->vfc_next)
cnt++;
- xvfsp = malloc(sizeof(struct xvfsconf) * cnt, M_TEMP, M_WAITOK);
+ xvfsp = malloc(sizeof(struct xvfsconf) * cnt, M_TEMP, 0);
/*
* Handle the race that we will have here when struct vfsconf
* will be locked down by using both cnt and checking vfc_next
@@ -3051,7 +3051,7 @@ sysctl_vnode(SYSCTL_HANDLER_ARGS)
return (SYSCTL_OUT(req, 0, len));
sysctl_wire_old_buffer(req, 0);
- xvn = malloc(len, M_TEMP, M_ZERO | M_WAITOK);
+ xvn = malloc(len, M_TEMP, M_ZERO | 0);
n = 0;
mtx_lock(&mountlist_mtx);
TAILQ_FOREACH(mp, &mountlist, mnt_list) {
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index 432ebed..2fbdcfe 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -1104,7 +1104,7 @@ kern_symlink(struct thread *td, char *path, char *link, enum uio_seg segflg)
if (segflg == UIO_SYSSPACE) {
syspath = path;
} else {
- syspath = uma_zalloc(namei_zone, M_WAITOK);
+ syspath = uma_zalloc(namei_zone, 0);
if ((error = copyinstr(path, syspath, MAXPATHLEN, NULL)) != 0)
goto out;
}
@@ -3110,7 +3110,7 @@ unionread:
kuio.uio_iov = &kiov;
kuio.uio_segflg = UIO_SYSSPACE;
kiov.iov_len = uap->count;
- MALLOC(dirbuf, caddr_t, uap->count, M_TEMP, M_WAITOK);
+ MALLOC(dirbuf, caddr_t, uap->count, M_TEMP, 0);
kiov.iov_base = dirbuf;
error = VOP_READDIR(vp, &kuio, fp->f_cred, &eofflag,
NULL, NULL);
diff --git a/sys/libkern/iconv.c b/sys/libkern/iconv.c
index 8bc03c1..8352fcd 100644
--- a/sys/libkern/iconv.c
+++ b/sys/libkern/iconv.c
@@ -186,7 +186,7 @@ iconv_register_cspair(const char *to, const char *from,
ucsfrom = strcmp(from, iconv_unicode_string) == 0;
if (!ucsfrom)
csize += strlen(from) + 1;
- csp = malloc(csize, M_ICONV, M_WAITOK);
+ csp = malloc(csize, M_ICONV, 0);
bzero(csp, csize);
csp->cp_id = iconv_csid++;
csp->cp_dcp = dcp;
@@ -360,7 +360,7 @@ iconv_sysctl_add(SYSCTL_HANDLER_ARGS)
if (error)
return error;
if (din.ia_datalen) {
- csp->cp_data = malloc(din.ia_datalen, M_ICONVDATA, M_WAITOK);
+ csp->cp_data = malloc(din.ia_datalen, M_ICONVDATA, 0);
error = copyin(din.ia_data, csp->cp_data, din.ia_datalen);
if (error)
goto bad;
diff --git a/sys/libkern/iconv_xlat.c b/sys/libkern/iconv_xlat.c
index 6dd2800..e355c6b 100644
--- a/sys/libkern/iconv_xlat.c
+++ b/sys/libkern/iconv_xlat.c
@@ -62,7 +62,7 @@ iconv_xlat_open(struct iconv_converter_class *dcp,
{
struct iconv_xlat *dp;
- dp = (struct iconv_xlat *)kobj_create((struct kobj_class*)dcp, M_ICONV, M_WAITOK);
+ dp = (struct iconv_xlat *)kobj_create((struct kobj_class*)dcp, M_ICONV, 0);
dp->d_table = csp->cp_data;
dp->d_csp = csp;
csp->cp_refcount++;
diff --git a/sys/net/bpf.c b/sys/net/bpf.c
index df210e2..e5a567d 100644
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -207,9 +207,9 @@ bpf_movein(uio, linktype, mp, sockp, datlen)
return (EIO);
if (len > MHLEN) {
- m = m_getcl(M_TRYWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(0, MT_DATA, M_PKTHDR);
} else {
- MGETHDR(m, M_TRYWAIT, MT_DATA);
+ MGETHDR(m, 0, MT_DATA);
}
if (m == NULL)
return (ENOBUFS);
@@ -340,7 +340,7 @@ bpfopen(dev, flags, fmt, td)
if ((dev->si_flags & SI_NAMED) == 0)
make_dev(&bpf_cdevsw, minor(dev), UID_ROOT, GID_WHEEL, 0600,
"bpf%d", dev2unit(dev));
- MALLOC(d, struct bpf_d *, sizeof(*d), M_BPF, M_WAITOK | M_ZERO);
+ MALLOC(d, struct bpf_d *, sizeof(*d), M_BPF, M_ZERO);
dev->si_drv1 = d;
d->bd_bufsize = bpf_bufsize;
d->bd_sig = SIGIO;
@@ -947,7 +947,7 @@ bpf_setf(d, fp)
return (EINVAL);
size = flen * sizeof(*fp->bf_insns);
- fcode = (struct bpf_insn *)malloc(size, M_BPF, M_WAITOK);
+ fcode = (struct bpf_insn *)malloc(size, M_BPF, 0);
if (copyin((caddr_t)fp->bf_insns, (caddr_t)fcode, size) == 0 &&
bpf_validate(fcode, (int)flen)) {
BPFD_LOCK(d);
@@ -1247,11 +1247,11 @@ static int
bpf_allocbufs(d)
register struct bpf_d *d;
{
- d->bd_fbuf = (caddr_t)malloc(d->bd_bufsize, M_BPF, M_WAITOK);
+ d->bd_fbuf = (caddr_t)malloc(d->bd_bufsize, M_BPF, 0);
if (d->bd_fbuf == 0)
return (ENOBUFS);
- d->bd_sbuf = (caddr_t)malloc(d->bd_bufsize, M_BPF, M_WAITOK);
+ d->bd_sbuf = (caddr_t)malloc(d->bd_bufsize, M_BPF, 0);
if (d->bd_sbuf == 0) {
free(d->bd_fbuf, M_BPF);
return (ENOBUFS);
diff --git a/sys/net/bpf_compat.h b/sys/net/bpf_compat.h
index 212ac5f..16fae34 100644
--- a/sys/net/bpf_compat.h
+++ b/sys/net/bpf_compat.h
@@ -45,7 +45,7 @@
* a fixed offset from the associated mbuf. Sorry for this kludge.
*/
#define malloc(size, type, canwait) \
-bpf_alloc(size, (canwait & M_NOWAIT) ? M_DONTWAIT : M_TRYWAIT)
+bpf_alloc(size, (canwait & M_NOWAIT) ? M_NOWAIT : 0)
#define free(cp, type) m_free(*(struct mbuf **)(cp - 8))
diff --git a/sys/net/bridge.c b/sys/net/bridge.c
index 16e338f..fef1b98 100644
--- a/sys/net/bridge.c
+++ b/sys/net/bridge.c
@@ -246,7 +246,7 @@ add_cluster(u_int16_t cluster_id, struct arpcom *ac)
}
c[n_clusters].ht = (struct hash_table *)
malloc(HASH_SIZE * sizeof(struct hash_table),
- M_IFADDR, M_WAITOK | M_ZERO);
+ M_IFADDR, M_ZERO);
if (c[n_clusters].ht == NULL) {
printf("-- bridge: cannot allocate hash table for new cluster\n");
free(c, M_IFADDR);
@@ -254,7 +254,7 @@ add_cluster(u_int16_t cluster_id, struct arpcom *ac)
}
c[n_clusters].my_macs = (struct bdg_addr *)
malloc(BDG_MAX_PORTS * sizeof(struct bdg_addr),
- M_IFADDR, M_WAITOK | M_ZERO);
+ M_IFADDR, M_ZERO);
if (c[n_clusters].my_macs == NULL) {
printf("-- bridge: cannot allocate mac addr table for new cluster\n");
free(c[n_clusters].ht, M_IFADDR);
@@ -799,7 +799,7 @@ static struct mbuf *
bdg_forward(struct mbuf *m0, struct ifnet *dst)
{
#define EH_RESTORE(_m) do { \
- M_PREPEND((_m), ETHER_HDR_LEN, M_DONTWAIT); \
+ M_PREPEND((_m), ETHER_HDR_LEN, M_NOWAIT); \
if ((_m) == NULL) { \
bdg_dropped++; \
return NULL; \
@@ -975,7 +975,7 @@ bdg_forward(struct mbuf *m0, struct ifnet *dst)
struct mbuf *m ;
if (shared) {
- m = m_copypacket(m0, M_DONTWAIT);
+ m = m_copypacket(m0, M_NOWAIT);
if (m == NULL) { /* copy failed, give up */
bdg_dropped++;
return NULL;
@@ -1041,7 +1041,7 @@ forward:
m = m0 ;
m0 = NULL ; /* original is gone */
} else {
- m = m_copypacket(m0, M_DONTWAIT);
+ m = m_copypacket(m0, M_NOWAIT);
if (m == NULL) {
IFNET_RUNLOCK();
printf("bdg_forward: sorry, m_copypacket failed!\n");
@@ -1090,7 +1090,7 @@ bdginit(void)
printf("BRIDGE 020214 loaded\n");
ifp2sc = malloc(BDG_MAX_PORTS * sizeof(struct bdg_softc),
- M_IFADDR, M_WAITOK | M_ZERO );
+ M_IFADDR, M_ZERO );
if (ifp2sc == NULL)
return ENOMEM ;
diff --git a/sys/net/bsd_comp.c b/sys/net/bsd_comp.c
index dd6ab56..89c5e29 100644
--- a/sys/net/bsd_comp.c
+++ b/sys/net/bsd_comp.c
@@ -496,12 +496,12 @@ bsd_compress(state, mret, mp, slen, maxolen)
*wptr++ = (v); \
if (wptr >= cp_end) { \
m->m_len = wptr - mtod(m, u_char *); \
- MGET(m->m_next, M_DONTWAIT, MT_DATA); \
+ MGET(m->m_next, M_NOWAIT, MT_DATA); \
m = m->m_next; \
if (m) { \
m->m_len = 0; \
if (maxolen - olen > MLEN) \
- MCLGET(m, M_DONTWAIT); \
+ MCLGET(m, M_NOWAIT); \
wptr = mtod(m, u_char *); \
cp_end = wptr + M_TRAILINGSPACE(m); \
} else \
@@ -538,12 +538,12 @@ bsd_compress(state, mret, mp, slen, maxolen)
maxolen = slen;
/* Allocate one mbuf to start with. */
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
*mret = m;
if (m != NULL) {
m->m_len = 0;
if (maxolen + db->hdrlen > MLEN)
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
m->m_data += db->hdrlen;
wptr = mtod(m, u_char *);
cp_end = wptr + M_TRAILINGSPACE(m);
@@ -872,13 +872,13 @@ bsd_decompress(state, cmp, dmpp)
/*
* Allocate one mbuf to start with.
*/
- MGETHDR(dmp, M_DONTWAIT, MT_DATA);
+ MGETHDR(dmp, M_NOWAIT, MT_DATA);
if (dmp == NULL)
return DECOMP_ERROR;
mret = dmp;
dmp->m_len = 0;
dmp->m_next = NULL;
- MCLGET(dmp, M_DONTWAIT);
+ MCLGET(dmp, M_NOWAIT);
dmp->m_data += db->hdrlen;
wptr = mtod(dmp, u_char *);
space = M_TRAILINGSPACE(dmp) - PPP_HDRLEN + 1;
@@ -987,7 +987,7 @@ bsd_decompress(state, cmp, dmpp)
*/
if ((space -= codelen + extra) < 0) {
dmp->m_len = wptr - mtod(dmp, u_char *);
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
m_freem(mret);
return DECOMP_ERROR;
@@ -995,7 +995,7 @@ bsd_decompress(state, cmp, dmpp)
m->m_len = 0;
m->m_next = NULL;
dmp->m_next = m;
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
space = M_TRAILINGSPACE(m) - (codelen + extra);
if (space < 0) {
/* now that's what I call *compression*. */
diff --git a/sys/net/if.c b/sys/net/if.c
index 1f58605..04f8f75 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -280,7 +280,7 @@ if_grow(void)
if_indexlim <<= 1;
n = if_indexlim * sizeof(*e);
- e = malloc(n, M_IFADDR, M_WAITOK | M_ZERO);
+ e = malloc(n, M_IFADDR, M_ZERO);
if (ifindex_table != NULL) {
memcpy((caddr_t)e, (caddr_t)ifindex_table, n/2);
free((caddr_t)ifindex_table, M_IFADDR);
@@ -429,7 +429,7 @@ if_attach(ifp)
socksize = sizeof(*sdl);
socksize = ROUNDUP(socksize);
ifasize = sizeof(*ifa) + 2 * socksize;
- ifa = (struct ifaddr *)malloc(ifasize, M_IFADDR, M_WAITOK | M_ZERO);
+ ifa = (struct ifaddr *)malloc(ifasize, M_IFADDR, M_ZERO);
if (ifa) {
IFA_LOCK_INIT(ifa);
sdl = (struct sockaddr_dl *)(ifa + 1);
@@ -775,7 +775,7 @@ if_clone_attach(ifc)
len = maxclone >> 3;
if ((len << 3) < maxclone)
len++;
- ifc->ifc_units = malloc(len, M_CLONE, M_WAITOK | M_ZERO);
+ ifc->ifc_units = malloc(len, M_CLONE, M_ZERO);
ifc->ifc_bmlen = len;
LIST_INSERT_HEAD(&if_cloners, ifc, ifc_list);
@@ -1797,8 +1797,8 @@ if_addmulti(ifp, sa, retifma)
llsa = 0;
}
- MALLOC(ifma, struct ifmultiaddr *, sizeof *ifma, M_IFMADDR, M_WAITOK);
- MALLOC(dupsa, struct sockaddr *, sa->sa_len, M_IFMADDR, M_WAITOK);
+ MALLOC(ifma, struct ifmultiaddr *, sizeof *ifma, M_IFMADDR, 0);
+ MALLOC(dupsa, struct sockaddr *, sa->sa_len, M_IFMADDR, 0);
bcopy(sa, dupsa, sa->sa_len);
ifma->ifma_addr = dupsa;
@@ -1827,9 +1827,9 @@ if_addmulti(ifp, sa, retifma)
ifma->ifma_refcount++;
} else {
MALLOC(ifma, struct ifmultiaddr *, sizeof *ifma,
- M_IFMADDR, M_WAITOK);
+ M_IFMADDR, 0);
MALLOC(dupsa, struct sockaddr *, llsa->sa_len,
- M_IFMADDR, M_WAITOK);
+ M_IFMADDR, 0);
bcopy(llsa, dupsa, llsa->sa_len);
ifma->ifma_addr = dupsa;
ifma->ifma_ifp = ifp;
diff --git a/sys/net/if_arcsubr.c b/sys/net/if_arcsubr.c
index df01b74..0fffe8d 100644
--- a/sys/net/if_arcsubr.c
+++ b/sys/net/if_arcsubr.c
@@ -203,7 +203,7 @@ arc_output(ifp, m, dst, rt0)
if (mcopy)
(void) if_simloop(ifp, mcopy, dst->sa_family, 0);
- M_PREPEND(m, ARC_HDRLEN, M_DONTWAIT);
+ M_PREPEND(m, ARC_HDRLEN, M_NOWAIT);
if (m == 0)
senderr(ENOBUFS);
ah = mtod(m, struct arc_header *);
@@ -292,13 +292,13 @@ arc_frag_next(ifp)
/* split out next fragment and return it */
if (ac->sflag < ac->fsflag) {
/* we CAN'T have short packets here */
- ac->curr_frag = m_split(m, 504, M_DONTWAIT);
+ ac->curr_frag = m_split(m, 504, M_NOWAIT);
if (ac->curr_frag == 0) {
m_freem(m);
return 0;
}
- M_PREPEND(m, ARC_HDRNEWLEN, M_DONTWAIT);
+ M_PREPEND(m, ARC_HDRNEWLEN, M_NOWAIT);
if (m == 0) {
m_freem(ac->curr_frag);
ac->curr_frag = 0;
@@ -317,7 +317,7 @@ arc_frag_next(ifp)
ARC_MAX_FORBID_LEN - ARC_HDRNEWLEN + 2)) {
ac->curr_frag = 0;
- M_PREPEND(m, ARC_HDRNEWLEN_EXC, M_DONTWAIT);
+ M_PREPEND(m, ARC_HDRNEWLEN_EXC, M_NOWAIT);
if (m == 0)
return 0;
@@ -330,7 +330,7 @@ arc_frag_next(ifp)
} else {
ac->curr_frag = 0;
- M_PREPEND(m, ARC_HDRNEWLEN, M_DONTWAIT);
+ M_PREPEND(m, ARC_HDRNEWLEN, M_NOWAIT);
if (m == 0)
return 0;
diff --git a/sys/net/if_atmsubr.c b/sys/net/if_atmsubr.c
index 3ec3894..21b9f07 100644
--- a/sys/net/if_atmsubr.c
+++ b/sys/net/if_atmsubr.c
@@ -189,7 +189,7 @@ atm_output(ifp, m0, dst, rt0)
sz = sizeof(atmdst);
atm_flags = ATM_PH_FLAGS(&atmdst);
if (atm_flags & ATM_PH_LLCSNAP) sz += 8; /* sizeof snap == 8 */
- M_PREPEND(m, sz, M_DONTWAIT);
+ M_PREPEND(m, sz, M_NOWAIT);
if (m == 0)
senderr(ENOBUFS);
ad = mtod(m, struct atm_pseudohdr *);
diff --git a/sys/net/if_disc.c b/sys/net/if_disc.c
index 79775f1..4bad637 100644
--- a/sys/net/if_disc.c
+++ b/sys/net/if_disc.c
@@ -87,7 +87,7 @@ disc_clone_create(struct if_clone *ifc, int unit)
struct ifnet *ifp;
struct disc_softc *sc;
- sc = malloc(sizeof(struct disc_softc), M_DISC, M_WAITOK);
+ sc = malloc(sizeof(struct disc_softc), M_DISC, 0);
bzero(sc, sizeof(struct disc_softc));
ifp = &sc->sc_if;
diff --git a/sys/net/if_ef.c b/sys/net/if_ef.c
index b064d38..e7362ae 100644
--- a/sys/net/if_ef.c
+++ b/sys/net/if_ef.c
@@ -430,7 +430,7 @@ ef_output(struct ifnet *ifp, struct mbuf **mp, struct sockaddr *dst, short *tp,
type = htons(m->m_pkthdr.len);
break;
case ETHER_FT_8022:
- M_PREPEND(m, ETHER_HDR_LEN + 3, M_TRYWAIT);
+ M_PREPEND(m, ETHER_HDR_LEN + 3, 0);
if (m == NULL) {
*mp = NULL;
return ENOBUFS;
@@ -453,7 +453,7 @@ ef_output(struct ifnet *ifp, struct mbuf **mp, struct sockaddr *dst, short *tp,
*hlen += 3;
break;
case ETHER_FT_SNAP:
- M_PREPEND(m, 8, M_TRYWAIT);
+ M_PREPEND(m, 8, 0);
if (m == NULL) {
*mp = NULL;
return ENOBUFS;
@@ -484,14 +484,14 @@ ef_clone(struct ef_link *efl, int ft)
int ifnlen;
efp = (struct efnet*)malloc(sizeof(struct efnet), M_IFADDR,
- M_WAITOK | M_ZERO);
+ M_ZERO);
if (efp == NULL)
return ENOMEM;
efp->ef_ifp = ifp;
eifp = &efp->ef_ac.ac_if;
ifnlen = 1 + snprintf(cbuf, sizeof(cbuf), "%s%df", ifp->if_name,
ifp->if_unit);
- ifname = (char*)malloc(ifnlen, M_IFADDR, M_WAITOK);
+ ifname = (char*)malloc(ifnlen, M_IFADDR, 0);
eifp->if_name = strcpy(ifname, cbuf);
eifp->if_unit = ft;
eifp->if_softc = efp;
@@ -514,7 +514,7 @@ ef_load(void)
if (ifp->if_type != IFT_ETHER) continue;
EFDEBUG("Found interface %s%d\n", ifp->if_name, ifp->if_unit);
efl = (struct ef_link*)malloc(sizeof(struct ef_link),
- M_IFADDR, M_WAITOK | M_ZERO);
+ M_IFADDR, M_ZERO);
if (efl == NULL) {
error = ENOMEM;
break;
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index c40c4d6..cb5a039 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -236,7 +236,7 @@ ether_output(ifp, m, dst, rt0)
if ( aa->aa_flags & AFA_PHASE2 ) {
struct llc llc;
- M_PREPEND(m, sizeof(struct llc), M_TRYWAIT);
+ M_PREPEND(m, sizeof(struct llc), 0);
llc.llc_dsap = llc.llc_ssap = LLC_SNAP_LSAP;
llc.llc_control = LLC_UI;
bcopy(at_org_code, llc.llc_snap_org_code, sizeof(at_org_code));
@@ -261,7 +261,7 @@ ether_output(ifp, m, dst, rt0)
type = htons( m->m_pkthdr.len);
break;
case 0xe0e0: /* Novell 802.2 and Token-Ring */
- M_PREPEND(m, 3, M_TRYWAIT);
+ M_PREPEND(m, 3, 0);
type = htons( m->m_pkthdr.len);
cp = mtod(m, u_char *);
*cp++ = 0xE0;
@@ -312,7 +312,7 @@ ether_output(ifp, m, dst, rt0)
* Add local net header. If no space in first mbuf,
* allocate another.
*/
- M_PREPEND(m, sizeof (struct ether_header), M_DONTWAIT);
+ M_PREPEND(m, sizeof (struct ether_header), M_NOWAIT);
if (m == 0)
senderr(ENOBUFS);
eh = mtod(m, struct ether_header *);
@@ -470,7 +470,7 @@ ether_ipfw_chk(struct mbuf **m0, struct ifnet *dst,
* Restore Ethernet header, as needed, in case the
* mbuf chain was replaced by ipfw.
*/
- M_PREPEND(m, ETHER_HDR_LEN, M_DONTWAIT);
+ M_PREPEND(m, ETHER_HDR_LEN, M_NOWAIT);
if (m == NULL) {
*m0 = m;
return 0;
@@ -494,7 +494,7 @@ ether_ipfw_chk(struct mbuf **m0, struct ifnet *dst,
* If shared, make a copy and keep the original.
*/
if (shared) {
- m = m_copypacket(m, M_DONTWAIT);
+ m = m_copypacket(m, M_NOWAIT);
if (m == NULL)
return 0;
} else {
@@ -894,7 +894,7 @@ discard:
* Put back the ethernet header so netgraph has a
* consistent view of inbound packets.
*/
- M_PREPEND(m, sizeof (struct ether_header), M_DONTWAIT);
+ M_PREPEND(m, sizeof (struct ether_header), M_NOWAIT);
(*ng_ether_input_orphan_p)(ifp, m);
return;
}
@@ -1113,7 +1113,7 @@ ether_resolvemulti(ifp, llsa, sa)
if (!IN_MULTICAST(ntohl(sin->sin_addr.s_addr)))
return EADDRNOTAVAIL;
MALLOC(sdl, struct sockaddr_dl *, sizeof *sdl, M_IFMADDR,
- M_WAITOK|M_ZERO);
+ M_ZERO);
sdl->sdl_len = sizeof *sdl;
sdl->sdl_family = AF_LINK;
sdl->sdl_index = ifp->if_index;
@@ -1140,7 +1140,7 @@ ether_resolvemulti(ifp, llsa, sa)
if (!IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr))
return EADDRNOTAVAIL;
MALLOC(sdl, struct sockaddr_dl *, sizeof *sdl, M_IFMADDR,
- M_WAITOK|M_ZERO);
+ M_ZERO);
sdl->sdl_len = sizeof *sdl;
sdl->sdl_family = AF_LINK;
sdl->sdl_index = ifp->if_index;
diff --git a/sys/net/if_faith.c b/sys/net/if_faith.c
index 280a041..08a5ca3 100644
--- a/sys/net/if_faith.c
+++ b/sys/net/if_faith.c
@@ -159,7 +159,7 @@ faith_clone_create(ifc, unit)
{
struct faith_softc *sc;
- sc = malloc(sizeof(struct faith_softc), M_FAITH, M_WAITOK);
+ sc = malloc(sizeof(struct faith_softc), M_FAITH, 0);
bzero(sc, sizeof(struct faith_softc));
sc->sc_if.if_softc = sc;
diff --git a/sys/net/if_fddisubr.c b/sys/net/if_fddisubr.c
index 49a5f21..05ff6ae 100644
--- a/sys/net/if_fddisubr.c
+++ b/sys/net/if_fddisubr.c
@@ -203,7 +203,7 @@ fddi_output(ifp, m, dst, rt0)
if (aa->aa_flags & AFA_PHASE2) {
struct llc llc;
- M_PREPEND(m, LLC_SNAPFRAMELEN, M_TRYWAIT);
+ M_PREPEND(m, LLC_SNAPFRAMELEN, 0);
if (m == 0)
senderr(ENOBUFS);
llc.llc_dsap = llc.llc_ssap = LLC_SNAP_LSAP;
@@ -290,7 +290,7 @@ fddi_output(ifp, m, dst, rt0)
*/
if (type != 0) {
struct llc *l;
- M_PREPEND(m, LLC_SNAPFRAMELEN, M_DONTWAIT);
+ M_PREPEND(m, LLC_SNAPFRAMELEN, M_NOWAIT);
if (m == 0)
senderr(ENOBUFS);
l = mtod(m, struct llc *);
@@ -305,7 +305,7 @@ fddi_output(ifp, m, dst, rt0)
* Add local net header. If no space in first mbuf,
* allocate another.
*/
- M_PREPEND(m, FDDI_HDR_LEN, M_DONTWAIT);
+ M_PREPEND(m, FDDI_HDR_LEN, M_NOWAIT);
if (m == 0)
senderr(ENOBUFS);
fh = mtod(m, struct fddi_header *);
@@ -706,7 +706,7 @@ fddi_resolvemulti(ifp, llsa, sa)
if (!IN_MULTICAST(ntohl(sin->sin_addr.s_addr)))
return (EADDRNOTAVAIL);
MALLOC(sdl, struct sockaddr_dl *, sizeof *sdl, M_IFMADDR,
- M_WAITOK);
+ 0);
sdl->sdl_len = sizeof *sdl;
sdl->sdl_family = AF_LINK;
sdl->sdl_index = ifp->if_index;
@@ -735,7 +735,7 @@ fddi_resolvemulti(ifp, llsa, sa)
if (!IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr))
return (EADDRNOTAVAIL);
MALLOC(sdl, struct sockaddr_dl *, sizeof *sdl, M_IFMADDR,
- M_WAITOK);
+ 0);
sdl->sdl_len = sizeof *sdl;
sdl->sdl_family = AF_LINK;
sdl->sdl_index = ifp->if_index;
diff --git a/sys/net/if_gif.c b/sys/net/if_gif.c
index 1cb4463..fce294d 100644
--- a/sys/net/if_gif.c
+++ b/sys/net/if_gif.c
@@ -137,7 +137,7 @@ gif_clone_create(ifc, unit)
{
struct gif_softc *sc;
- sc = malloc (sizeof(struct gif_softc), M_GIF, M_WAITOK);
+ sc = malloc (sizeof(struct gif_softc), M_GIF, 0);
bzero(sc, sizeof(struct gif_softc));
sc->gif_if.if_softc = sc;
@@ -777,12 +777,12 @@ gif_set_tunnel(ifp, src, dst)
}
osrc = sc->gif_psrc;
- sa = (struct sockaddr *)malloc(src->sa_len, M_IFADDR, M_WAITOK);
+ sa = (struct sockaddr *)malloc(src->sa_len, M_IFADDR, 0);
bcopy((caddr_t)src, (caddr_t)sa, src->sa_len);
sc->gif_psrc = sa;
odst = sc->gif_pdst;
- sa = (struct sockaddr *)malloc(dst->sa_len, M_IFADDR, M_WAITOK);
+ sa = (struct sockaddr *)malloc(dst->sa_len, M_IFADDR, 0);
bcopy((caddr_t)dst, (caddr_t)sa, dst->sa_len);
sc->gif_pdst = sa;
diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c
index 6585396..33a4eff 100644
--- a/sys/net/if_gre.c
+++ b/sys/net/if_gre.c
@@ -160,7 +160,7 @@ gre_clone_create(ifc, unit)
{
struct gre_softc *sc;
- sc = malloc(sizeof(struct gre_softc), M_GRE, M_WAITOK);
+ sc = malloc(sizeof(struct gre_softc), M_GRE, 0);
memset(sc, 0, sizeof(struct gre_softc));
sc->sc_if.if_name = GRENAME;
@@ -294,7 +294,7 @@ gre_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
if ((m->m_data - msiz) < m->m_pktdat) {
/* need new mbuf */
- MGETHDR(m0, M_DONTWAIT, MT_HEADER);
+ MGETHDR(m0, M_NOWAIT, MT_HEADER);
if (m0 == NULL) {
_IF_DROP(&ifp->if_snd);
m_freem(m);
@@ -348,7 +348,7 @@ gre_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
error = EAFNOSUPPORT;
goto end;
}
- M_PREPEND(m, sizeof(struct greip), M_DONTWAIT);
+ M_PREPEND(m, sizeof(struct greip), M_NOWAIT);
} else {
_IF_DROP(&ifp->if_snd);
m_freem(m);
diff --git a/sys/net/if_ieee80211subr.c b/sys/net/if_ieee80211subr.c
index b088e26..e672435 100644
--- a/sys/net/if_ieee80211subr.c
+++ b/sys/net/if_ieee80211subr.c
@@ -406,7 +406,7 @@ ieee80211_input(struct ifnet *ifp, struct mbuf *m, int rssi, u_int32_t rstamp)
if (ic->ic_opmode == IEEE80211_M_HOSTAP) {
eh = mtod(m, struct ether_header *);
if (ETHER_IS_MULTICAST(eh->ether_dhost)) {
- m1 = m_copym(m, 0, M_COPYALL, M_DONTWAIT);
+ m1 = m_copym(m, 0, M_COPYALL, M_NOWAIT);
if (m1 == NULL)
ifp->if_oerrors++;
else
@@ -517,7 +517,7 @@ ieee80211_mgmt_output(struct ifnet *ifp, struct ieee80211_node *ni,
if (ni == NULL)
ni = &ic->ic_bss;
ni->ni_inact = 0;
- M_PREPEND(m, sizeof(struct ieee80211_frame), M_DONTWAIT);
+ M_PREPEND(m, sizeof(struct ieee80211_frame), M_NOWAIT);
if (m == NULL)
return ENOMEM;
wh = mtod(m, struct ieee80211_frame *);
@@ -585,7 +585,7 @@ ieee80211_encap(struct ifnet *ifp, struct mbuf *m)
llc->llc_snap.org_code[1] = 0;
llc->llc_snap.org_code[2] = 0;
llc->llc_snap.ether_type = eh.ether_type;
- M_PREPEND(m, sizeof(struct ieee80211_frame), M_DONTWAIT);
+ M_PREPEND(m, sizeof(struct ieee80211_frame), M_NOWAIT);
if (m == NULL)
return NULL;
wh = mtod(m, struct ieee80211_frame *);
@@ -671,7 +671,7 @@ ieee80211_decap(struct ifnet *ifp, struct mbuf *m)
pktlen = m->m_pkthdr.len;
while (pktlen > off) {
if (n0 == NULL) {
- MGETHDR(n, M_DONTWAIT, MT_DATA);
+ MGETHDR(n, M_NOWAIT, MT_DATA);
if (n == NULL) {
m_freem(m);
return NULL;
@@ -679,7 +679,7 @@ ieee80211_decap(struct ifnet *ifp, struct mbuf *m)
M_MOVE_PKTHDR(n, m);
n->m_len = MHLEN;
} else {
- MGET(n, M_DONTWAIT, MT_DATA);
+ MGET(n, M_NOWAIT, MT_DATA);
if (n == NULL) {
m_freem(m);
m_freem(n0);
@@ -688,7 +688,7 @@ ieee80211_decap(struct ifnet *ifp, struct mbuf *m)
n->m_len = MLEN;
}
if (pktlen - off >= MINCLSIZE) {
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if (n->m_flags & M_EXT)
n->m_len = n->m_ext.ext_size;
}
@@ -1407,7 +1407,7 @@ ieee80211_send_prreq(struct ieee80211com *ic, struct ieee80211_node *ni,
* [tlv] ssid
* [tlv] supported rates
*/
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return ENOMEM;
m->m_data += sizeof(struct ieee80211_frame);
@@ -1450,7 +1450,7 @@ ieee80211_send_prresp(struct ieee80211com *ic, struct ieee80211_node *bs0,
* [tlv] supported rates
* [tlv] parameter set (IBSS)
*/
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return ENOMEM;
m->m_data += sizeof(struct ieee80211_frame);
@@ -1503,7 +1503,7 @@ ieee80211_send_auth(struct ieee80211com *ic, struct ieee80211_node *ni,
u_int16_t *frm;
int ret;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return ENOMEM;
MH_ALIGN(m, 2 * 3);
@@ -1529,7 +1529,7 @@ ieee80211_send_deauth(struct ieee80211com *ic, struct ieee80211_node *ni,
if (ifp->if_flags & IFF_DEBUG)
if_printf(ifp, "station %s deauthenticate (reason %d)\n",
ether_sprintf(ni->ni_macaddr), reason);
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return ENOMEM;
MH_ALIGN(m, 2);
@@ -1555,7 +1555,7 @@ ieee80211_send_asreq(struct ieee80211com *ic, struct ieee80211_node *ni,
* [tlv] ssid
* [tlv] supported rates
*/
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return ENOMEM;
m->m_data += sizeof(struct ieee80211_frame);
@@ -1613,7 +1613,7 @@ ieee80211_send_asresp(struct ieee80211com *ic, struct ieee80211_node *ni,
* [2] association ID
* [tlv] supported rates
*/
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return ENOMEM;
m->m_data += sizeof(struct ieee80211_frame);
@@ -1659,7 +1659,7 @@ ieee80211_send_disassoc(struct ieee80211com *ic, struct ieee80211_node *ni,
if (ifp->if_flags & IFF_DEBUG)
if_printf(ifp, "station %s disassociate (reason %d)\n",
ether_sprintf(ni->ni_macaddr), reason);
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return ENOMEM;
MH_ALIGN(m, 2);
@@ -2476,7 +2476,7 @@ ieee80211_wep_crypt(struct ifnet *ifp, struct mbuf *m0, int txflag)
}
m = m0;
left = m->m_pkthdr.len;
- MGET(n, M_DONTWAIT, m->m_type);
+ MGET(n, M_NOWAIT, m->m_type);
n0 = n;
if (n == NULL)
goto fail;
@@ -2490,7 +2490,7 @@ ieee80211_wep_crypt(struct ifnet *ifp, struct mbuf *m0, int txflag)
}
n->m_len = MHLEN;
if (n->m_pkthdr.len >= MINCLSIZE) {
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if (n->m_flags & M_EXT)
n->m_len = n->m_ext.ext_size;
}
@@ -2544,13 +2544,13 @@ ieee80211_wep_crypt(struct ifnet *ifp, struct mbuf *m0, int txflag)
if (len > n->m_len - noff) {
len = n->m_len - noff;
if (len == 0) {
- MGET(n->m_next, M_DONTWAIT, n->m_type);
+ MGET(n->m_next, M_NOWAIT, n->m_type);
if (n->m_next == NULL)
goto fail;
n = n->m_next;
n->m_len = MLEN;
if (left >= MINCLSIZE) {
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if (n->m_flags & M_EXT)
n->m_len = n->m_ext.ext_size;
}
@@ -2579,7 +2579,7 @@ ieee80211_wep_crypt(struct ifnet *ifp, struct mbuf *m0, int txflag)
n->m_len = noff + sizeof(crcbuf);
else {
n->m_len = noff;
- MGET(n->m_next, M_DONTWAIT, n->m_type);
+ MGET(n->m_next, M_NOWAIT, n->m_type);
if (n->m_next == NULL)
goto fail;
n = n->m_next;
diff --git a/sys/net/if_iso88025subr.c b/sys/net/if_iso88025subr.c
index acb1147..4fa3e36 100644
--- a/sys/net/if_iso88025subr.c
+++ b/sys/net/if_iso88025subr.c
@@ -299,7 +299,7 @@ iso88025_output(ifp, m, dst, rt0)
bcopy((caddr_t)&(satoipx_addr(dst).x_host), (caddr_t)edst,
sizeof (edst));
- M_PREPEND(m, 3, M_TRYWAIT);
+ M_PREPEND(m, 3, 0);
if (m == 0)
senderr(ENOBUFS);
m = m_pullup(m, 3);
@@ -342,7 +342,7 @@ iso88025_output(ifp, m, dst, rt0)
if (snap_type != 0) {
struct llc *l;
- M_PREPEND(m, sizeof (struct llc), M_DONTWAIT);
+ M_PREPEND(m, sizeof (struct llc), M_NOWAIT);
if (m == 0)
senderr(ENOBUFS);
l = mtod(m, struct llc *);
@@ -358,7 +358,7 @@ iso88025_output(ifp, m, dst, rt0)
* Add local net header. If no space in first mbuf,
* allocate another.
*/
- M_PREPEND(m, ISO88025_HDR_LEN + rif_len, M_DONTWAIT);
+ M_PREPEND(m, ISO88025_HDR_LEN + rif_len, M_NOWAIT);
if (m == 0)
senderr(ENOBUFS);
diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c
index c753fdc..deeecab 100644
--- a/sys/net/if_loop.c
+++ b/sys/net/if_loop.c
@@ -147,7 +147,7 @@ lo_clone_create(ifc, unit)
{
struct lo_softc *sc;
- MALLOC(sc, struct lo_softc *, sizeof(*sc), M_LO, M_WAITOK | M_ZERO);
+ MALLOC(sc, struct lo_softc *, sizeof(*sc), M_LO, M_ZERO);
sc->sc_if.if_name = LONAME;
sc->sc_if.if_unit = unit;
@@ -215,7 +215,7 @@ looutput(ifp, m, dst, rt)
struct mbuf *n;
/* XXX MT_HEADER should be m->m_type */
- MGETHDR(n, M_DONTWAIT, MT_HEADER);
+ MGETHDR(n, M_NOWAIT, MT_HEADER);
if (!n)
goto contiguousfail;
M_MOVE_PKTHDR(n, m);
@@ -227,7 +227,7 @@ looutput(ifp, m, dst, rt)
*/
m->m_pkthdr.label.l_flags &= ~MAC_FLAG_INITIALIZED;
#endif
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if (! (n->m_flags & M_EXT)) {
m_freem(n);
goto contiguousfail;
diff --git a/sys/net/if_ppp.c b/sys/net/if_ppp.c
index aab5377..82c5c1e 100644
--- a/sys/net/if_ppp.c
+++ b/sys/net/if_ppp.c
@@ -199,7 +199,7 @@ ppp_clone_create(struct if_clone *ifc, int unit)
{
struct ppp_softc *sc;
- sc = malloc(sizeof(struct ppp_softc), M_PPP, M_WAITOK | M_ZERO);
+ sc = malloc(sizeof(struct ppp_softc), M_PPP, M_ZERO);
sc->sc_if.if_softc = sc;
sc->sc_if.if_name = PPPNAME;
sc->sc_if.if_unit = unit;
@@ -572,7 +572,7 @@ pppioctl(sc, cmd, data, flag, td)
}
newcodelen = nbp->bf_len * sizeof(struct bpf_insn);
if (newcodelen != 0) {
- MALLOC(newcode, struct bpf_insn *, newcodelen, M_DEVBUF, M_WAITOK);
+ MALLOC(newcode, struct bpf_insn *, newcodelen, M_DEVBUF, 0);
if (newcode == 0) {
error = EINVAL; /* or sumpin */
break;
@@ -831,7 +831,7 @@ pppoutput(ifp, m0, dst, rtp)
* (This assumes M_LEADINGSPACE is always 0 for a cluster mbuf.)
*/
if (M_LEADINGSPACE(m0) < PPP_HDRLEN) {
- m0 = m_prepend(m0, PPP_HDRLEN, M_DONTWAIT);
+ m0 = m_prepend(m0, PPP_HDRLEN, M_NOWAIT);
if (m0 == 0) {
error = ENOBUFS;
goto bad;
@@ -1411,13 +1411,13 @@ ppp_inproc(sc, m)
}
/* Copy the PPP and IP headers into a new mbuf. */
- MGETHDR(mp, M_DONTWAIT, MT_DATA);
+ MGETHDR(mp, M_NOWAIT, MT_DATA);
if (mp == NULL)
goto bad;
mp->m_len = 0;
mp->m_next = NULL;
if (hlen + PPP_HDRLEN > MHLEN) {
- MCLGET(mp, M_DONTWAIT);
+ MCLGET(mp, M_NOWAIT);
if (M_TRAILINGSPACE(mp) < hlen + PPP_HDRLEN) {
m_freem(mp);
goto bad; /* lose if big headers and no clusters */
@@ -1475,7 +1475,7 @@ ppp_inproc(sc, m)
* whole cluster on it.
*/
if (ilen <= MHLEN && M_IS_CLUSTER(m)) {
- MGETHDR(mp, M_DONTWAIT, MT_DATA);
+ MGETHDR(mp, M_NOWAIT, MT_DATA);
if (mp != NULL) {
#ifdef MAC
mac_create_mbuf_from_mbuf(m, mp);
diff --git a/sys/net/if_sl.c b/sys/net/if_sl.c
index b57eb93..2c3a222 100644
--- a/sys/net/if_sl.c
+++ b/sys/net/if_sl.c
@@ -265,11 +265,11 @@ slcreate()
int unit;
struct mbuf *m;
- MALLOC(sc, struct sl_softc *, sizeof(*sc), M_SL, M_WAITOK | M_ZERO);
+ MALLOC(sc, struct sl_softc *, sizeof(*sc), M_SL, M_ZERO);
- m = m_gethdr(M_TRYWAIT, MT_DATA);
+ m = m_gethdr(0, MT_DATA);
if (m != NULL) {
- MCLGET(m, M_TRYWAIT);
+ MCLGET(m, 0);
if ((m->m_flags & M_EXT) == 0) {
m_free(m);
m = NULL;
@@ -792,7 +792,7 @@ sl_btom(sc, len)
{
struct mbuf *m, *newm;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return (NULL);
@@ -804,7 +804,7 @@ sl_btom(sc, len)
* guarantees that packet will fit in a cluster.
*/
if (len >= MHLEN) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
/*
* we couldn't get a cluster - if memory's this
diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c
index 61dbb6f..7014a89 100644
--- a/sys/net/if_spppsubr.c
+++ b/sys/net/if_spppsubr.c
@@ -618,7 +618,7 @@ sppp_input(struct ifnet *ifp, struct mbuf *m)
* enough leading space in the existing mbuf).
*/
m_adj(m, vjlen);
- M_PREPEND(m, hlen, M_DONTWAIT);
+ M_PREPEND(m, hlen, M_NOWAIT);
if (m == NULL)
goto drop2;
bcopy(iphdr, mtod(m, u_char *), hlen);
@@ -892,7 +892,7 @@ sppp_output(struct ifnet *ifp, struct mbuf *m,
/*
* Prepend general data packet PPP header. For now, IP only.
*/
- M_PREPEND (m, PPP_HEADER_LEN, M_DONTWAIT);
+ M_PREPEND (m, PPP_HEADER_LEN, M_NOWAIT);
if (! m) {
if (debug)
log(LOG_DEBUG, SPP_FMT "no memory for transmit header\n",
@@ -1034,7 +1034,7 @@ sppp_attach(struct ifnet *ifp)
#ifdef INET6
sp->confflags |= CONF_ENABLE_IPV6;
#endif
- sp->pp_comp = malloc(sizeof(struct slcompress), M_TEMP, M_WAIT);
+ sp->pp_comp = malloc(sizeof(struct slcompress), M_TEMP, 0);
sl_compress_init(sp->pp_comp, -1);
sppp_lcp_init(sp);
sppp_ipcp_init(sp);
@@ -1355,7 +1355,7 @@ sppp_cisco_send(struct sppp *sp, int type, long par1, long par2)
getmicrouptime(&tv);
#endif
- MGETHDR (m, M_DONTWAIT, MT_DATA);
+ MGETHDR (m, M_NOWAIT, MT_DATA);
if (! m)
return;
m->m_pkthdr.len = m->m_len = PPP_HEADER_LEN + CISCO_PACKET_LEN;
@@ -1408,7 +1408,7 @@ sppp_cp_send(struct sppp *sp, u_short proto, u_char type,
if (len > MHLEN - PPP_HEADER_LEN - LCP_HEADER_LEN)
len = MHLEN - PPP_HEADER_LEN - LCP_HEADER_LEN;
- MGETHDR (m, M_DONTWAIT, MT_DATA);
+ MGETHDR (m, M_NOWAIT, MT_DATA);
if (! m)
return;
m->m_pkthdr.len = m->m_len = PPP_HEADER_LEN + LCP_HEADER_LEN + len;
@@ -4614,7 +4614,7 @@ sppp_auth_send(const struct cp *cp, struct sppp *sp,
const char *msg;
va_list ap;
- MGETHDR (m, M_DONTWAIT, MT_DATA);
+ MGETHDR (m, M_NOWAIT, MT_DATA);
if (! m)
return;
m->m_pkthdr.rcvif = 0;
diff --git a/sys/net/if_stf.c b/sys/net/if_stf.c
index 1d84836..b96883c 100644
--- a/sys/net/if_stf.c
+++ b/sys/net/if_stf.c
@@ -179,7 +179,7 @@ stf_clone_create(ifc, unit)
{
struct stf_softc *sc;
- sc = malloc(sizeof(struct stf_softc), M_STF, M_WAITOK | M_ZERO);
+ sc = malloc(sizeof(struct stf_softc), M_STF, M_ZERO);
sc->sc_if.if_name = STFNAME;
sc->sc_if.if_unit = unit;
@@ -446,7 +446,7 @@ stf_output(ifp, m, dst, rt)
}
#endif /*NBPFILTER > 0*/
- M_PREPEND(m, sizeof(struct ip), M_DONTWAIT);
+ M_PREPEND(m, sizeof(struct ip), M_NOWAIT);
if (m && m->m_len < sizeof(struct ip))
m = m_pullup(m, sizeof(struct ip));
if (m == NULL) {
diff --git a/sys/net/if_tap.c b/sys/net/if_tap.c
index 0648200..385d6c7 100644
--- a/sys/net/if_tap.c
+++ b/sys/net/if_tap.c
@@ -334,7 +334,7 @@ tapcreate(dev)
char *name = NULL;
/* allocate driver storage and create device */
- MALLOC(tp, struct tap_softc *, sizeof(*tp), M_TAP, M_WAITOK | M_ZERO);
+ MALLOC(tp, struct tap_softc *, sizeof(*tp), M_TAP, M_ZERO);
SLIST_INSERT_HEAD(&taphead, tp, tap_next);
unit = dev2unit(dev) & TAPMAXUNIT;
@@ -849,7 +849,7 @@ tapwrite(dev, uio, flag)
tlen = uio->uio_resid;
/* get a header mbuf */
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return (ENOBUFS);
mlen = MHLEN;
@@ -862,7 +862,7 @@ tapwrite(dev, uio, flag)
*mp = m;
mp = &m->m_next;
if (uio->uio_resid > 0) {
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
error = ENOBUFS;
break;
diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c
index ce39d1f..3bb5a8c 100644
--- a/sys/net/if_tun.c
+++ b/sys/net/if_tun.c
@@ -240,7 +240,7 @@ tuncreate(dev_t dev)
dev = make_dev(&tun_cdevsw, minor(dev),
UID_UUCP, GID_DIALER, 0600, "tun%d", dev2unit(dev));
- MALLOC(sc, struct tun_softc *, sizeof(*sc), M_TUN, M_WAITOK | M_ZERO);
+ MALLOC(sc, struct tun_softc *, sizeof(*sc), M_TUN, M_ZERO);
sc->tun_flags = TUN_INITED;
sc->next = tunhead;
tunhead = sc;
@@ -494,7 +494,7 @@ tunoutput(
/* prepend sockaddr? this may abort if the mbuf allocation fails */
if (tp->tun_flags & TUN_LMODE) {
/* allocate space for sockaddr */
- M_PREPEND(m0, dst->sa_len, M_DONTWAIT);
+ M_PREPEND(m0, dst->sa_len, M_NOWAIT);
/* if allocation failed drop packet */
if (m0 == NULL) {
@@ -508,7 +508,7 @@ tunoutput(
if (tp->tun_flags & TUN_IFHEAD) {
/* Prepend the address family */
- M_PREPEND(m0, 4, M_DONTWAIT);
+ M_PREPEND(m0, 4, M_NOWAIT);
/* if allocation failed drop packet */
if (m0 == NULL) {
@@ -728,7 +728,7 @@ tunwrite(dev_t dev, struct uio *uio, int flag)
tlen = uio->uio_resid;
/* get a header mbuf */
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return (ENOBUFS);
mlen = MHLEN;
@@ -741,7 +741,7 @@ tunwrite(dev_t dev, struct uio *uio, int flag)
*mp = m;
mp = &m->m_next;
if (uio->uio_resid > 0) {
- MGET (m, M_DONTWAIT, MT_DATA);
+ MGET (m, M_NOWAIT, MT_DATA);
if (m == 0) {
error = ENOBUFS;
break;
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c
index 1850e8d..5671292 100644
--- a/sys/net/if_vlan.c
+++ b/sys/net/if_vlan.c
@@ -168,7 +168,7 @@ vlan_setmulti(struct ifnet *ifp)
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
if (ifma->ifma_addr->sa_family != AF_LINK)
continue;
- mc = malloc(sizeof(struct vlan_mc_entry), M_VLAN, M_WAITOK);
+ mc = malloc(sizeof(struct vlan_mc_entry), M_VLAN, 0);
bcopy(LLADDR((struct sockaddr_dl *)ifma->ifma_addr),
(char *)&mc->mc_addr, ETHER_ADDR_LEN);
SLIST_INSERT_HEAD(&sc->vlan_mc_listhead, mc, mc_entries);
@@ -232,7 +232,7 @@ vlan_clone_create(struct if_clone *ifc, int unit)
struct ifnet *ifp;
int s;
- ifv = malloc(sizeof(struct ifvlan), M_VLAN, M_WAITOK | M_ZERO);
+ ifv = malloc(sizeof(struct ifvlan), M_VLAN, M_ZERO);
ifp = &ifv->ifv_if;
SLIST_INIT(&ifv->vlan_mc_listhead);
@@ -323,7 +323,7 @@ vlan_start(struct ifnet *ifp)
struct m_tag *mtag = m_tag_alloc(MTAG_VLAN,
MTAG_VLAN_TAG,
sizeof (u_int),
- M_DONTWAIT);
+ M_NOWAIT);
if (mtag == NULL) {
ifp->if_oerrors++;
m_freem(m);
@@ -332,7 +332,7 @@ vlan_start(struct ifnet *ifp)
*(u_int*)(mtag+1) = ifv->ifv_tag;
m_tag_prepend(m, mtag);
} else {
- M_PREPEND(m, ifv->ifv_encaplen, M_DONTWAIT);
+ M_PREPEND(m, ifv->ifv_encaplen, M_NOWAIT);
if (m == NULL) {
if_printf(ifp, "unable to prepend VLAN header");
ifp->if_ierrors++;
diff --git a/sys/net/if_vlan_var.h b/sys/net/if_vlan_var.h
index 42f2dcc..ff656a6 100644
--- a/sys/net/if_vlan_var.h
+++ b/sys/net/if_vlan_var.h
@@ -98,7 +98,7 @@ struct vlanreq {
#define VLAN_INPUT_TAG(_ifp, _m, _t, _errcase) do { \
struct m_tag *mtag; \
mtag = m_tag_alloc(MTAG_VLAN, MTAG_VLAN_TAG, \
- sizeof (u_int), M_DONTWAIT); \
+ sizeof (u_int), M_NOWAIT); \
if (mtag == NULL) { \
(_ifp)->if_ierrors++; \
m_freem(_m); \
diff --git a/sys/net/pfil.c b/sys/net/pfil.c
index 2ed40b2..a53051b 100644
--- a/sys/net/pfil.c
+++ b/sys/net/pfil.c
@@ -61,7 +61,7 @@ pfil_init(ph)
* PFIL_IN call me on incoming packets
* PFIL_OUT call me on outgoing packets
* PFIL_ALL call me on all of the above
- * PFIL_WAITOK OK to call malloc with M_WAITOK.
+ * PFIL_WAITOK OK to call malloc with 0.
*/
int
pfil_add_hook(func, flags, ph)
@@ -97,7 +97,7 @@ pfil_list_add(list, func, flags)
struct packet_filter_hook *pfh;
pfh = (struct packet_filter_hook *)malloc(sizeof(*pfh), M_IFADDR,
- flags & PFIL_WAITOK ? M_WAITOK : M_NOWAIT);
+ flags & PFIL_WAITOK ? 0 : M_NOWAIT);
if (pfh == NULL)
return ENOMEM;
pfh->pfil_func = func;
diff --git a/sys/net/ppp_deflate.c b/sys/net/ppp_deflate.c
index 3c7884e..96fb810 100644
--- a/sys/net/ppp_deflate.c
+++ b/sys/net/ppp_deflate.c
@@ -248,12 +248,12 @@ z_compress(arg, mret, mp, orig_len, maxolen)
/* Allocate one mbuf initially. */
if (maxolen > orig_len)
maxolen = orig_len;
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
*mret = m;
if (m != NULL) {
m->m_len = 0;
if (maxolen + state->hdrlen > MLEN)
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
wspace = M_TRAILINGSPACE(m);
if (state->hdrlen + PPP_HDRLEN + 2 < wspace) {
m->m_data += state->hdrlen;
@@ -308,12 +308,12 @@ z_compress(arg, mret, mp, orig_len, maxolen)
if (m != NULL) {
m->m_len = wspace;
olen += wspace;
- MGET(m->m_next, M_DONTWAIT, MT_DATA);
+ MGET(m->m_next, M_NOWAIT, MT_DATA);
m = m->m_next;
if (m != NULL) {
m->m_len = 0;
if (maxolen - olen > MLEN)
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
state->strm.next_out = mtod(m, u_char *);
state->strm.avail_out = wspace = M_TRAILINGSPACE(m);
}
@@ -507,13 +507,13 @@ z_decompress(arg, mi, mop)
++state->seqno;
/* Allocate an output mbuf. */
- MGETHDR(mo, M_DONTWAIT, MT_DATA);
+ MGETHDR(mo, M_NOWAIT, MT_DATA);
if (mo == NULL)
return DECOMP_ERROR;
mo_head = mo;
mo->m_len = 0;
mo->m_next = NULL;
- MCLGET(mo, M_DONTWAIT);
+ MCLGET(mo, M_NOWAIT);
ospace = M_TRAILINGSPACE(mo);
if (state->hdrlen + PPP_HDRLEN < ospace) {
mo->m_data += state->hdrlen;
@@ -582,13 +582,13 @@ z_decompress(arg, mi, mop)
} else {
mo->m_len = ospace;
olen += ospace;
- MGET(mo->m_next, M_DONTWAIT, MT_DATA);
+ MGET(mo->m_next, M_NOWAIT, MT_DATA);
mo = mo->m_next;
if (mo == NULL) {
m_freem(mo_head);
return DECOMP_ERROR;
}
- MCLGET(mo, M_DONTWAIT);
+ MCLGET(mo, M_NOWAIT);
state->strm.next_out = mtod(mo, u_char *);
state->strm.avail_out = ospace = M_TRAILINGSPACE(mo);
}
diff --git a/sys/net/ppp_tty.c b/sys/net/ppp_tty.c
index ce05012..92215f1 100644
--- a/sys/net/ppp_tty.c
+++ b/sys/net/ppp_tty.c
@@ -397,7 +397,7 @@ pppwrite(tp, uio, flag)
s = spltty();
for (mp = &m0; uio->uio_resid; mp = &m->m_next) {
- MGET(m, M_TRYWAIT, MT_DATA);
+ MGET(m, 0, MT_DATA);
if ((*mp = m) == NULL) {
m_freem(m0);
splx(s);
@@ -405,7 +405,7 @@ pppwrite(tp, uio, flag)
}
m->m_len = 0;
if (uio->uio_resid >= MCLBYTES / 2)
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
len = M_TRAILINGSPACE(m);
if (len > uio->uio_resid)
len = uio->uio_resid;
@@ -809,11 +809,11 @@ pppgetm(sc)
mp = &sc->sc_m;
for (len = sc->sc_mru + PPP_HDRLEN + PPP_FCSLEN; len > 0; ){
if ((m = *mp) == NULL) {
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
break;
*mp = m;
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
}
len -= M_DATASIZE(m);
mp = &m->m_next;
diff --git a/sys/net/raw_cb.c b/sys/net/raw_cb.c
index 6f3f8b5..66abcd0 100644
--- a/sys/net/raw_cb.c
+++ b/sys/net/raw_cb.c
@@ -139,7 +139,7 @@ raw_bind(so, nam)
if (ifnet == 0)
return (EADDRNOTAVAIL);
rp = sotorawcb(so);
- nam = m_copym(nam, 0, M_COPYALL, M_TRYWAIT);
+ nam = m_copym(nam, 0, M_COPYALL, 0);
rp->rcb_laddr = mtod(nam, struct sockaddr *);
return (0);
}
diff --git a/sys/net/route.c b/sys/net/route.c
index 7847466..ee0b7d3 100644
--- a/sys/net/route.c
+++ b/sys/net/route.c
@@ -1071,7 +1071,7 @@ rtinit(ifa, cmd, flags)
* (Assuming we have a mask)
*/
if (netmask != NULL) {
- m = m_get(M_DONTWAIT, MT_SONAME);
+ m = m_get(M_NOWAIT, MT_SONAME);
if (m == NULL)
return(ENOBUFS);
deldst = mtod(m, struct sockaddr *);
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c
index 4780cc5..3b5457d 100644
--- a/sys/net/rtsock.c
+++ b/sys/net/rtsock.c
@@ -110,7 +110,7 @@ rts_attach(struct socket *so, int proto, struct thread *td)
if (sotorawcb(so) != 0)
return EISCONN; /* XXX panic? */
/* XXX */
- MALLOC(rp, struct rawcb *, sizeof *rp, M_PCB, M_WAITOK | M_ZERO);
+ MALLOC(rp, struct rawcb *, sizeof *rp, M_PCB, M_ZERO);
if (rp == 0)
return ENOBUFS;
@@ -608,9 +608,9 @@ rt_msg1(type, rtinfo)
}
if (len > MCLBYTES)
panic("rt_msg1");
- m = m_gethdr(M_DONTWAIT, MT_DATA);
+ m = m_gethdr(M_NOWAIT, MT_DATA);
if (m && len > MHLEN) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
m_free(m);
m = NULL;
diff --git a/sys/netatalk/aarp.c b/sys/netatalk/aarp.c
index a22488a..b89dfdc 100644
--- a/sys/netatalk/aarp.c
+++ b/sys/netatalk/aarp.c
@@ -127,7 +127,7 @@ aarpwhohas( struct arpcom *ac, struct sockaddr_at *sat )
struct llc *llc;
struct sockaddr sa;
- if (( m = m_gethdr( M_DONTWAIT, MT_DATA )) == NULL ) {
+ if (( m = m_gethdr( M_NOWAIT, MT_DATA )) == NULL ) {
return;
}
#ifdef MAC
@@ -166,7 +166,7 @@ aarpwhohas( struct arpcom *ac, struct sockaddr_at *sat )
bcopy((caddr_t)atmulticastaddr, (caddr_t)eh->ether_dhost,
sizeof( eh->ether_dhost ));
eh->ether_type = htons(sizeof(struct llc) + sizeof(struct ether_aarp));
- M_PREPEND( m, sizeof( struct llc ), M_TRYWAIT );
+ M_PREPEND( m, sizeof( struct llc ), 0 );
llc = mtod( m, struct llc *);
llc->llc_dsap = llc->llc_ssap = LLC_SNAP_LSAP;
llc->llc_control = LLC_UI;
@@ -440,7 +440,7 @@ at_aarpinput( struct arpcom *ac, struct mbuf *m)
if ( aa->aa_flags & AFA_PHASE2 ) {
eh->ether_type = htons( sizeof( struct llc ) +
sizeof( struct ether_aarp ));
- M_PREPEND( m, sizeof( struct llc ), M_DONTWAIT );
+ M_PREPEND( m, sizeof( struct llc ), M_NOWAIT );
if ( m == NULL ) {
return;
}
@@ -551,7 +551,7 @@ aarpprobe( void *arg )
aa->aa_ch = timeout( aarpprobe, (caddr_t)ac, hz / 5 );
}
- if (( m = m_gethdr( M_DONTWAIT, MT_DATA )) == NULL ) {
+ if (( m = m_gethdr( M_NOWAIT, MT_DATA )) == NULL ) {
return;
}
#ifdef MAC
@@ -579,7 +579,7 @@ aarpprobe( void *arg )
sizeof( eh->ether_dhost ));
eh->ether_type = htons( sizeof( struct llc ) +
sizeof( struct ether_aarp ));
- M_PREPEND( m, sizeof( struct llc ), M_TRYWAIT );
+ M_PREPEND( m, sizeof( struct llc ), 0 );
llc = mtod( m, struct llc *);
llc->llc_dsap = llc->llc_ssap = LLC_SNAP_LSAP;
llc->llc_control = LLC_UI;
diff --git a/sys/netatalk/at_control.c b/sys/netatalk/at_control.c
index d7e7586..8f90911 100644
--- a/sys/netatalk/at_control.c
+++ b/sys/netatalk/at_control.c
@@ -138,7 +138,7 @@ at_control(struct socket *so, u_long cmd, caddr_t data,
* allocate a fresh one.
*/
if ( aa == (struct at_ifaddr *) 0 ) {
- aa0 = malloc(sizeof(struct at_ifaddr), M_IFADDR, M_WAITOK | M_ZERO);
+ aa0 = malloc(sizeof(struct at_ifaddr), M_IFADDR, M_ZERO);
if (( aa = at_ifaddr ) != NULL ) {
/*
* Don't let the loopback be first, since the first
diff --git a/sys/netatalk/ddp_output.c b/sys/netatalk/ddp_output.c
index f15914b..e3fb384 100644
--- a/sys/netatalk/ddp_output.c
+++ b/sys/netatalk/ddp_output.c
@@ -55,7 +55,7 @@ ddp_output( struct mbuf *m, struct socket *so)
mac_create_mbuf_from_socket(so, m);
#endif
- M_PREPEND( m, sizeof( struct ddpehdr ), M_TRYWAIT );
+ M_PREPEND( m, sizeof( struct ddpehdr ), 0 );
deh = mtod( m, struct ddpehdr *);
deh->deh_pad = 0;
@@ -196,7 +196,7 @@ ddp_route( struct mbuf *m, struct route *ro)
* packets end up poorly aligned due to the three byte elap header.
*/
if ( !(aa->aa_flags & AFA_PHASE2) ) {
- MGET( m0, M_TRYWAIT, MT_HEADER );
+ MGET( m0, 0, MT_HEADER );
if ( m0 == 0 ) {
m_freem( m );
printf("ddp_route: no buffers\n");
diff --git a/sys/netatalk/ddp_pcb.c b/sys/netatalk/ddp_pcb.c
index fa79cec..0bd2e6d 100644
--- a/sys/netatalk/ddp_pcb.c
+++ b/sys/netatalk/ddp_pcb.c
@@ -420,7 +420,7 @@ at_pcballoc( struct socket *so )
{
struct ddpcb *ddp;
- MALLOC(ddp, struct ddpcb *, sizeof *ddp, M_PCB, M_WAITOK | M_ZERO);
+ MALLOC(ddp, struct ddpcb *, sizeof *ddp, M_PCB, M_ZERO);
ddp->ddp_lsat.sat_port = ATADDR_ANYPORT;
ddp->ddp_next = ddpcb;
diff --git a/sys/netatalk/ddp_usrreq.c b/sys/netatalk/ddp_usrreq.c
index fa79cec..0bd2e6d 100644
--- a/sys/netatalk/ddp_usrreq.c
+++ b/sys/netatalk/ddp_usrreq.c
@@ -420,7 +420,7 @@ at_pcballoc( struct socket *so )
{
struct ddpcb *ddp;
- MALLOC(ddp, struct ddpcb *, sizeof *ddp, M_PCB, M_WAITOK | M_ZERO);
+ MALLOC(ddp, struct ddpcb *, sizeof *ddp, M_PCB, M_ZERO);
ddp->ddp_lsat.sat_port = ATADDR_ANYPORT;
ddp->ddp_next = ddpcb;
diff --git a/sys/netatm/atm_cm.c b/sys/netatm/atm_cm.c
index b101abf..c5e3172 100644
--- a/sys/netatm/atm_cm.c
+++ b/sys/netatm/atm_cm.c
@@ -174,7 +174,7 @@ atm_cm_connect(epp, token, ap, copp)
/*
* Get a connection block
*/
- cop = uma_zalloc(atm_connection_zone, M_WAITOK);
+ cop = uma_zalloc(atm_connection_zone, 0);
if (cop == NULL)
return (ENOMEM);
@@ -405,7 +405,7 @@ atm_cm_connect(epp, token, ap, copp)
/*
* Get a connection VCC block
*/
- cvp = uma_zalloc(atm_connvc_zone, M_WAITOK);
+ cvp = uma_zalloc(atm_connvc_zone, 0);
if (cvp == NULL) {
err = ENOMEM;
goto donex;
@@ -551,7 +551,7 @@ atm_cm_listen(epp, token, ap, copp)
/*
* Get a connection block
*/
- cop = uma_zalloc(atm_connection_zone, M_WAITOK);
+ cop = uma_zalloc(atm_connection_zone, 0);
if (cop == NULL)
return (ENOMEM);
@@ -710,7 +710,7 @@ atm_cm_listen(epp, token, ap, copp)
/*
* Get an attribute block and save listening attributes
*/
- cop->co_lattr = uma_zalloc(atm_attributes_zone, M_WAITOK | M_ZERO);
+ cop->co_lattr = uma_zalloc(atm_attributes_zone, M_ZERO);
if (cop->co_lattr == NULL) {
err = ENOMEM;
goto done;
@@ -815,7 +815,7 @@ atm_cm_addllc(epp, token, llc, ecop, copp)
/*
* Get a connection block
*/
- cop = uma_zalloc(atm_connection_zone, M_WAITOK);
+ cop = uma_zalloc(atm_connection_zone, 0);
if (cop == NULL)
return (ENOMEM);
@@ -1266,7 +1266,7 @@ atm_cm_incoming(vcp, ap)
/*
* Get a connection VCC block
*/
- cvp = uma_zalloc(atm_connvc_zone, M_WAITOK);
+ cvp = uma_zalloc(atm_connvc_zone, 0);
if (cvp == NULL) {
err = ENOMEM;
goto fail;
@@ -1584,7 +1584,7 @@ atm_cm_incall(cvp)
/*
* Need a new connection block
*/
- cop = uma_zalloc(atm_connection_zone, M_WAITOK);
+ cop = uma_zalloc(atm_connection_zone, 0);
if (cop == NULL) {
cvp->cvc_attr.cause = atm_cause_tmpl;
cvp->cvc_attr.cause.v.cause_value =
diff --git a/sys/netatm/atm_device.c b/sys/netatm/atm_device.c
index c85303e..959c61c 100644
--- a/sys/netatm/atm_device.c
+++ b/sys/netatm/atm_device.c
@@ -170,7 +170,7 @@ atm_dev_inst(ssp, cvcp)
/*
* Allocate a VCC control block
*/
- cvp = uma_zalloc(cup->cu_vcc_zone, M_WAITOK);
+ cvp = uma_zalloc(cup->cu_vcc_zone, 0);
if (cvp == NULL)
return (ENOMEM);
diff --git a/sys/netatm/atm_if.c b/sys/netatm/atm_if.c
index 69c9082..a93d566 100644
--- a/sys/netatm/atm_if.c
+++ b/sys/netatm/atm_if.c
@@ -496,7 +496,7 @@ atm_physif_ioctl(code, data, arg)
*/
for ( count = 0; count < asr->asr_nif_cnt; count++ )
{
- nip = uma_zalloc(cup->cu_nif_zone, M_WAITOK | M_ZERO);
+ nip = uma_zalloc(cup->cu_nif_zone, M_ZERO);
if ( nip == NULL )
{
/*
diff --git a/sys/netatm/atm_socket.c b/sys/netatm/atm_socket.c
index 6ff6abc..3c0b806 100644
--- a/sys/netatm/atm_socket.c
+++ b/sys/netatm/atm_socket.c
@@ -596,7 +596,7 @@ atm_sock_sockaddr(so, addr)
/*
* Return local interface address, if known
*/
- satm = malloc(sizeof(*satm), M_SONAME, M_WAITOK | M_ZERO);
+ satm = malloc(sizeof(*satm), M_SONAME, M_ZERO);
if (satm == NULL)
return (ENOMEM);
@@ -654,7 +654,7 @@ atm_sock_peeraddr(so, addr)
/*
* Return remote address, if known
*/
- satm = malloc(sizeof(*satm), M_SONAME, M_WAITOK | M_ZERO);
+ satm = malloc(sizeof(*satm), M_SONAME, M_ZERO);
if (satm == NULL)
return (ENOMEM);
diff --git a/sys/netatm/ipatm/ipatm_if.c b/sys/netatm/ipatm/ipatm_if.c
index 49dbf48..5dca971 100644
--- a/sys/netatm/ipatm/ipatm_if.c
+++ b/sys/netatm/ipatm/ipatm_if.c
@@ -124,7 +124,7 @@ ipatm_nifstat(cmd, nip, arg)
/*
* Get a new interface block
*/
- inp = uma_zalloc(ipatm_nif_zone, M_WAITOK);
+ inp = uma_zalloc(ipatm_nif_zone, 0);
if (inp == NULL) {
err = ENOMEM;
break;
diff --git a/sys/netatm/ipatm/ipatm_vcm.c b/sys/netatm/ipatm/ipatm_vcm.c
index 14cf7cc..76c8a55 100644
--- a/sys/netatm/ipatm/ipatm_vcm.c
+++ b/sys/netatm/ipatm/ipatm_vcm.c
@@ -382,7 +382,7 @@ ipatm_openpvc(pvp, sivp)
/*
* Allocate IP VCC block
*/
- ivp = uma_zalloc(ipatm_vc_zone, M_WAITOK);
+ ivp = uma_zalloc(ipatm_vc_zone, 0);
if (ivp == NULL) {
err = ENOMEM;
goto done;
@@ -585,7 +585,7 @@ ipatm_createsvc(ifp, daf, dst, sivp)
/*
* Allocate IP VCC
*/
- ivp = uma_zalloc(ipatm_vc_zone, M_WAITOK);
+ ivp = uma_zalloc(ipatm_vc_zone, 0);
if (ivp == NULL) {
err = ENOMEM;
goto done;
@@ -937,7 +937,7 @@ ipatm_incoming(tok, cop, ap, tokp)
/*
* Allocate IP VCC
*/
- ivp = uma_zalloc(ipatm_vc_zone, M_WAITOK);
+ ivp = uma_zalloc(ipatm_vc_zone, 0);
if (ivp == NULL) {
err = ENOMEM;
cause = T_ATM_CAUSE_UNSPECIFIED_RESOURCE_UNAVAILABLE;
diff --git a/sys/netatm/port.h b/sys/netatm/port.h
index df599ad..d11bd40 100644
--- a/sys/netatm/port.h
+++ b/sys/netatm/port.h
@@ -126,8 +126,8 @@
#include <sys/mbuf.h>
typedef struct mbuf KBuffer;
-#define KB_F_WAIT M_TRYWAIT
-#define KB_F_NOWAIT M_DONTWAIT
+#define KB_F_WAIT 0
+#define KB_F_NOWAIT M_NOWAIT
#define KB_T_HEADER MT_HEADER
#define KB_T_DATA MT_DATA
diff --git a/sys/netatm/sigpvc/sigpvc_subr.c b/sys/netatm/sigpvc/sigpvc_subr.c
index 4c3196e..b0a4da5 100644
--- a/sys/netatm/sigpvc/sigpvc_subr.c
+++ b/sys/netatm/sigpvc/sigpvc_subr.c
@@ -122,7 +122,7 @@ sigpvc_create_pvc(pvp, cvp, errp)
/*
* Allocate control block for PVC
*/
- vcp = uma_zalloc(sigpvc_vc_zone, M_WAITOK | M_ZERO);
+ vcp = uma_zalloc(sigpvc_vc_zone, M_ZERO);
if (vcp == NULL) {
*errp = ENOMEM;
return (CALL_FAILED);
diff --git a/sys/netatm/spans/spans_arp.c b/sys/netatm/spans/spans_arp.c
index e0c83f9..7fb5a10 100644
--- a/sys/netatm/spans/spans_arp.c
+++ b/sys/netatm/spans/spans_arp.c
@@ -172,7 +172,7 @@ spansarp_svcout(ivp, dst)
/*
* Now get the new arp entry
*/
- sap = uma_zalloc(spansarp_zone, M_WAITOK);
+ sap = uma_zalloc(spansarp_zone, 0);
if (sap == NULL) {
(void) splx(s);
return (MAP_FAILED);
@@ -720,7 +720,7 @@ spansarp_input(clp, m)
/*
* Source unknown and we're the target - add new entry
*/
- sap = uma_zalloc(spansarp_zone, M_WAITOK);
+ sap = uma_zalloc(spansarp_zone, 0);
if (sap) {
sap->sa_dstip.s_addr = in_src.s_addr;
sap->sa_dstatm.address_format = T_ATM_SPANS_ADDR;
@@ -961,7 +961,7 @@ spansarp_ioctl(code, data, arg1)
/*
* No, get a new arp entry
*/
- sap = uma_zalloc(spansarp_zone, M_WAITOK);
+ sap = uma_zalloc(spansarp_zone, 0);
if (sap == NULL) {
err = ENOMEM;
break;
diff --git a/sys/netatm/spans/spans_cls.c b/sys/netatm/spans/spans_cls.c
index 5b93892..a719678 100644
--- a/sys/netatm/spans/spans_cls.c
+++ b/sys/netatm/spans/spans_cls.c
@@ -348,7 +348,7 @@ spanscls_attach(spp)
/*
* Get a new cls control block
*/
- clp = uma_zalloc(spanscls_zone, M_WAITOK);
+ clp = uma_zalloc(spanscls_zone, 0);
if (clp == NULL)
return (ENOMEM);
diff --git a/sys/netatm/spans/spans_msg.c b/sys/netatm/spans/spans_msg.c
index c597080..89185bd 100644
--- a/sys/netatm/spans/spans_msg.c
+++ b/sys/netatm/spans/spans_msg.c
@@ -232,7 +232,7 @@ spans_send_open_req(spp, svp)
/*
* Get memory for a request message
*/
- req = uma_zalloc(spans_msg_zone, M_WAITOK);
+ req = uma_zalloc(spans_msg_zone, 0);
if (req == NULL) {
err = ENOBUFS;
goto done;
@@ -290,7 +290,7 @@ spans_send_open_rsp(spp, svp, result)
/*
* Get memory for a response message
*/
- rsp = uma_zalloc(spans_msg_zone, M_WAITOK);
+ rsp = uma_zalloc(spans_msg_zone, 0);
if (rsp == NULL)
return(ENOBUFS);
@@ -340,7 +340,7 @@ spans_send_close_req(spp, svp)
/*
* Get memory for a close request
*/
- req = uma_zalloc(spans_msg_zone, M_WAITOK);
+ req = uma_zalloc(spans_msg_zone, 0);
if (req == NULL) {
err = ENOBUFS;
goto done;
@@ -468,7 +468,7 @@ spans_status_ind(spp, msg)
* Respond to the status request or indication with a
* status response
*/
- rsp_msg = uma_zalloc(spans_msg_zone, M_WAITOK);
+ rsp_msg = uma_zalloc(spans_msg_zone, 0);
if (rsp_msg == NULL)
return;
rsp_msg->sm_vers = SPANS_VERS_1_0;
@@ -658,7 +658,7 @@ spans_open_req(spp, msg)
/*
* Get a new VCCB for the connection
*/
- svp = uma_zalloc(spans_vc_zone, M_WAITOK);
+ svp = uma_zalloc(spans_vc_zone, 0);
if (svp == NULL) {
ATM_DEBUG0("spans_open_req: VCCB pool empty\n");
result = SPANS_NORSC;
@@ -808,7 +808,7 @@ response:
* Some problem was detected with the request. Send a SPANS
* message rejecting the connection.
*/
- rsp_msg = uma_zalloc(spans_msg_zone, M_WAITOK);
+ rsp_msg = uma_zalloc(spans_msg_zone, 0);
if (rsp_msg == NULL)
return;
@@ -1034,7 +1034,7 @@ response:
/*
* Respond to the SPANS_CLOSE_IND with a SPANS_CLOSE_RSP
*/
- rsp_msg = uma_zalloc(spans_msg_zone, M_WAITOK);
+ rsp_msg = uma_zalloc(spans_msg_zone, 0);
if (rsp_msg == NULL)
return;
rsp_msg->sm_vers = SPANS_VERS_1_0;
@@ -1169,7 +1169,7 @@ spans_multi_req(spp, msg)
/*
* Get memory for a SPANS_MULTI_RSP message.
*/
- rsp_msg = uma_zalloc(spans_msg_zone, M_WAITOK);
+ rsp_msg = uma_zalloc(spans_msg_zone, 0);
if (rsp_msg == NULL)
return;
@@ -1215,7 +1215,7 @@ spans_add_req(spp, msg)
/*
* Get memory for a SPANS_ADD_RSP message.
*/
- rsp_msg = uma_zalloc(spans_msg_zone, M_WAITOK);
+ rsp_msg = uma_zalloc(spans_msg_zone, 0);
if (rsp_msg == NULL)
return;
@@ -1262,7 +1262,7 @@ spans_join_req(spp, msg)
/*
* Get memory for a SPANS_JOIN_CNF message.
*/
- rsp_msg = uma_zalloc(spans_msg_zone, M_WAITOK);
+ rsp_msg = uma_zalloc(spans_msg_zone, 0);
if (rsp_msg == NULL)
return;
@@ -1307,7 +1307,7 @@ spans_leave_req(spp, msg)
/*
* Get memory for a SPANS_LEAVE_CNF message.
*/
- rsp_msg = uma_zalloc(spans_msg_zone, M_WAITOK);
+ rsp_msg = uma_zalloc(spans_msg_zone, 0);
if (rsp_msg == NULL)
return;
@@ -1401,7 +1401,7 @@ spans_query_req(spp, msg)
/*
* Get memory for a SPANS_QUERY_RSP message.
*/
- rsp_msg = uma_zalloc(spans_msg_zone, M_WAITOK);
+ rsp_msg = uma_zalloc(spans_msg_zone, 0);
if (rsp_msg == NULL)
return;
@@ -1489,7 +1489,7 @@ spans_rcv_msg(spp, m)
/*
* Get storage for the message
*/
- msg = uma_zalloc(spans_msg_zone, M_WAITOK);
+ msg = uma_zalloc(spans_msg_zone, 0);
if (msg == NULL)
return;
diff --git a/sys/netatm/spans/spans_proto.c b/sys/netatm/spans/spans_proto.c
index 7562820..8f96374 100644
--- a/sys/netatm/spans/spans_proto.c
+++ b/sys/netatm/spans/spans_proto.c
@@ -279,7 +279,7 @@ spans_timer(tip)
/*
* Send out SPANS_STAT_REQ message
*/
- msg = uma_zalloc(spans_msg_zone, M_WAITOK);
+ msg = uma_zalloc(spans_msg_zone, 0);
if (msg == NULL) {
/* XXX arr: This is bogus and will go away RSN */
/* Retry later if no memory */
diff --git a/sys/netatm/spans/spans_subr.c b/sys/netatm/spans/spans_subr.c
index 93ea6d4..24edec2 100644
--- a/sys/netatm/spans/spans_subr.c
+++ b/sys/netatm/spans/spans_subr.c
@@ -192,7 +192,7 @@ spans_open_vcc(spp, cvp)
/*
* Allocate control block for VCC
*/
- svp = uma_zalloc(spans_vc_zone, M_WAITOK);
+ svp = uma_zalloc(spans_vc_zone, 0);
if (svp == NULL) {
return(ENOMEM);
}
diff --git a/sys/netatm/uni/sscf_uni.c b/sys/netatm/uni/sscf_uni.c
index b5ff7d0..a0c3d67 100644
--- a/sys/netatm/uni/sscf_uni.c
+++ b/sys/netatm/uni/sscf_uni.c
@@ -213,7 +213,7 @@ sscf_uni_inst(ssp, cvp)
/*
* Allocate our control block
*/
- uvp = uma_zalloc(sscf_uni_zone, M_WAITOK);
+ uvp = uma_zalloc(sscf_uni_zone, 0);
if (uvp == NULL)
return (ENOMEM);
uvp->uv_ustate = UVU_INST;
diff --git a/sys/netatm/uni/sscop.c b/sys/netatm/uni/sscop.c
index 6374f30..e555307 100644
--- a/sys/netatm/uni/sscop.c
+++ b/sys/netatm/uni/sscop.c
@@ -258,7 +258,7 @@ sscop_inst(ssp, cvp)
/*
* Allocate our control block
*/
- sop = uma_zalloc(sscop_zone, M_WAITOK);
+ sop = uma_zalloc(sscop_zone, 0);
if (sop == NULL)
return (ENOMEM);
diff --git a/sys/netatm/uni/uniarp.c b/sys/netatm/uni/uniarp.c
index 0de56b8..e946937 100644
--- a/sys/netatm/uni/uniarp.c
+++ b/sys/netatm/uni/uniarp.c
@@ -713,7 +713,7 @@ uniarp_client_mode(uip, aap)
* Now, get an arp entry for the server connection
*/
uip->uip_arpstate = UIAS_CLIENT_POPEN;
- uap = uma_zalloc(uniarp_zone, M_WAITOK | M_ZERO);
+ uap = uma_zalloc(uniarp_zone, M_ZERO);
if (uap == NULL) {
UNIIP_ARP_TIMER(uip, 1 * ATM_HZ);
return;
diff --git a/sys/netatm/uni/uniarp_cache.c b/sys/netatm/uni/uniarp_cache.c
index dbfe402..10c780a 100644
--- a/sys/netatm/uni/uniarp_cache.c
+++ b/sys/netatm/uni/uniarp_cache.c
@@ -126,7 +126,7 @@ uniarp_cache_svc(uip, ip, atm, atmsub, origin)
* If there aren't any entries yet, create one
*/
if ((ipuap == NULL) && (nouap == NULL)) {
- ipuap = uma_zalloc(uniarp_zone, M_WAITOK);
+ ipuap = uma_zalloc(uniarp_zone, 0);
if (ipuap == NULL)
return (ENOMEM);
ipuap->ua_dstip.s_addr = ip->s_addr;
diff --git a/sys/netatm/uni/uniarp_vcm.c b/sys/netatm/uni/uniarp_vcm.c
index ac1c167..cfc081c 100644
--- a/sys/netatm/uni/uniarp_vcm.c
+++ b/sys/netatm/uni/uniarp_vcm.c
@@ -133,7 +133,7 @@ uniarp_pvcopen(ivp)
/*
* Get an arp map entry
*/
- uap = uma_zalloc(uniarp_zone, M_WAITOK | M_ZERO);
+ uap = uma_zalloc(uniarp_zone, M_ZERO);
if (uap == NULL)
return (MAP_FAILED);
@@ -279,7 +279,7 @@ uniarp_svcout(ivp, dst)
/*
* We're a client with an open VCC to the server, get a new arp entry
*/
- uap = uma_zalloc(uniarp_zone, M_WAITOK);
+ uap = uma_zalloc(uniarp_zone, 0);
if (uap == NULL) {
(void) splx(s);
return (MAP_FAILED);
@@ -440,7 +440,7 @@ uniarp_svcin(ivp, dst, dstsub)
/*
* No info in the cache - get a new arp entry
*/
- uap = uma_zalloc(uniarp_zone, M_WAITOK | M_ZERO);
+ uap = uma_zalloc(uniarp_zone, M_ZERO);
if (uap == NULL) {
(void) splx(s);
return (MAP_FAILED);
diff --git a/sys/netatm/uni/uniip.c b/sys/netatm/uni/uniip.c
index 3635523..7bdb100 100644
--- a/sys/netatm/uni/uniip.c
+++ b/sys/netatm/uni/uniip.c
@@ -188,7 +188,7 @@ uniip_ipact(inp)
/*
* Get a new interface control block
*/
- uip = uma_zalloc(uniip_zone, M_WAITOK | M_ZERO);
+ uip = uma_zalloc(uniip_zone, M_ZERO);
if (uip == NULL)
return (ENOMEM);
diff --git a/sys/netatm/uni/unisig_decode.c b/sys/netatm/uni/unisig_decode.c
index aa49fda..c15d02e 100644
--- a/sys/netatm/uni/unisig_decode.c
+++ b/sys/netatm/uni/unisig_decode.c
@@ -67,7 +67,7 @@ __RCSID("@(#) $FreeBSD$");
#endif
#define ALLOC_IE(ie) do { \
- (ie) = uma_zalloc(unisig_ie_zone, M_WAITOK | M_ZERO); \
+ (ie) = uma_zalloc(unisig_ie_zone, M_ZERO); \
if ((ie) == NULL) \
return (ENOMEM); \
} while (0)
diff --git a/sys/netatm/uni/unisig_msg.c b/sys/netatm/uni/unisig_msg.c
index a002426..a193d00 100644
--- a/sys/netatm/uni/unisig_msg.c
+++ b/sys/netatm/uni/unisig_msg.c
@@ -294,7 +294,7 @@ unisig_send_setup(usp, uvp)
/*
* Get memory for a SETUP message
*/
- setup = uma_zalloc(unisig_msg_zone, M_WAITOK | M_ZERO);
+ setup = uma_zalloc(unisig_msg_zone, M_ZERO);
if (setup == NULL) {
err = ENOMEM;
goto done;
@@ -320,7 +320,7 @@ unisig_send_setup(usp, uvp)
* specify one in the attribute block
*/
if (ap->calling.tag != T_ATM_PRESENT) {
- setup->msg_ie_cgad = uma_zalloc(unisig_ie_zone, M_WAITOK);
+ setup->msg_ie_cgad = uma_zalloc(unisig_ie_zone, 0);
if (setup->msg_ie_cgad == NULL) {
err = ENOMEM;
goto done;
@@ -379,11 +379,11 @@ unisig_send_release(usp, uvp, msg, cause)
/*
* Get memory for a RELEASE message
*/
- rls_msg = uma_zalloc(unisig_msg_zone, M_WAITOK | M_ZERO);
+ rls_msg = uma_zalloc(unisig_msg_zone, M_ZERO);
if (rls_msg == NULL) {
return(ENOMEM);
}
- cause_ie = uma_zalloc(unisig_ie_zone, M_WAITOK | M_ZERO);
+ cause_ie = uma_zalloc(unisig_ie_zone, M_ZERO);
if (cause_ie == NULL) {
uma_zfree(unisig_msg_zone, rls_msg);
return(ENOMEM);
@@ -455,11 +455,11 @@ unisig_send_release_complete(usp, uvp, msg, cause)
/*
* Get memory for a RELEASE COMPLETE message
*/
- rls_cmp = uma_zalloc(unisig_msg_zone, M_WAITOK | M_ZERO);
+ rls_cmp = uma_zalloc(unisig_msg_zone, M_ZERO);
if (rls_cmp == NULL) {
return(ENOMEM);
}
- cause_ie = uma_zalloc(unisig_ie_zone, M_WAITOK | M_ZERO);
+ cause_ie = uma_zalloc(unisig_ie_zone, M_ZERO);
if (cause_ie == NULL) {
uma_zfree(unisig_msg_zone, rls_cmp);
return(ENOMEM);
@@ -534,16 +534,16 @@ unisig_send_status(usp, uvp, msg, cause)
/*
* Get memory for a STATUS message
*/
- stat_msg = uma_zalloc(unisig_msg_zone, M_WAITOK | M_ZERO);
+ stat_msg = uma_zalloc(unisig_msg_zone, M_ZERO);
if (stat_msg == NULL) {
return(ENOMEM);
}
- cause_ie = uma_zalloc(unisig_ie_zone, M_WAITOK | M_ZERO);
+ cause_ie = uma_zalloc(unisig_ie_zone, M_ZERO);
if (cause_ie == NULL) {
uma_zfree(unisig_msg_zone, stat_msg);
return(ENOMEM);
}
- clst_ie = uma_zalloc(unisig_ie_zone, M_WAITOK | M_ZERO);
+ clst_ie = uma_zalloc(unisig_ie_zone, M_ZERO);
if (clst_ie == NULL) {
uma_zfree(unisig_msg_zone, stat_msg);
uma_zfree(unisig_ie_zone, cause_ie);
@@ -679,7 +679,7 @@ unisig_rcv_restart(usp, msg)
/*
* Get memory for a RESTART ACKNOWLEDGE message
*/
- rsta_msg = uma_zalloc(unisig_msg_zone, M_WAITOK);
+ rsta_msg = uma_zalloc(unisig_msg_zone, 0);
if (rsta_msg == NULL) {
return;
}
@@ -772,7 +772,7 @@ unisig_rcv_setup(usp, msg)
/*
* Get a new VCCB for the connection
*/
- uvp = uma_zalloc(unisig_vc_zone, M_WAITOK | M_ZERO);
+ uvp = uma_zalloc(unisig_vc_zone, M_ZERO);
if (uvp == NULL) {
return;
}
@@ -842,7 +842,7 @@ unisig_rcv_msg(usp, m)
/*
* Get storage for the message
*/
- msg = uma_zalloc(unisig_msg_zone, M_WAITOK | M_ZERO);
+ msg = uma_zalloc(unisig_msg_zone, M_ZERO);
if (msg == NULL) {
err = ENOMEM;
goto done;
diff --git a/sys/netatm/uni/unisig_subr.c b/sys/netatm/uni/unisig_subr.c
index 31cd1a4..8a91fb6 100644
--- a/sys/netatm/uni/unisig_subr.c
+++ b/sys/netatm/uni/unisig_subr.c
@@ -275,7 +275,7 @@ unisig_open_vcc(usp, cvp)
/*
* Allocate control block for VCC
*/
- uvp = uma_zalloc(unisig_vc_zone, M_WAITOK | M_ZERO);
+ uvp = uma_zalloc(unisig_vc_zone, M_ZERO);
if (uvp == NULL) {
return(ENOMEM);
}
@@ -897,7 +897,7 @@ unisig_set_attrs(usp, msg, ap)
if (ap->aal.tag == T_ATM_PRESENT) {
if (!msg->msg_ie_aalp) {
msg->msg_ie_aalp = uma_zalloc(unisig_ie_zone,
- M_WAITOK | M_ZERO);
+ M_ZERO);
if (msg->msg_ie_aalp == NULL) {
err = ENOMEM;
goto done;
@@ -955,7 +955,7 @@ unisig_set_attrs(usp, msg, ap)
if (ap->traffic.tag == T_ATM_PRESENT) {
if (!msg->msg_ie_clrt) {
msg->msg_ie_clrt = uma_zalloc(unisig_ie_zone,
- M_WAITOK | M_ZERO);
+ M_ZERO);
if (msg->msg_ie_clrt == NULL) {
err = ENOMEM;
goto done;
@@ -1012,7 +1012,7 @@ unisig_set_attrs(usp, msg, ap)
if (ap->bearer.tag == T_ATM_PRESENT) {
if (!msg->msg_ie_bbcp) {
msg->msg_ie_bbcp = uma_zalloc(unisig_ie_zone,
- M_WAITOK | M_ZERO);
+ M_ZERO);
if (msg->msg_ie_bbcp == NULL) {
err = ENOMEM;
goto done;
@@ -1040,7 +1040,7 @@ unisig_set_attrs(usp, msg, ap)
if (ap->bhli.tag == T_ATM_PRESENT) {
if (!msg->msg_ie_bhli) {
msg->msg_ie_bhli = uma_zalloc(unisig_ie_zone,
- M_WAITOK | M_ZERO);
+ M_ZERO);
if (msg->msg_ie_bhli == NULL) {
err = ENOMEM;
goto done;
@@ -1080,7 +1080,7 @@ unisig_set_attrs(usp, msg, ap)
ap->blli.tag_l3 == T_ATM_PRESENT) {
if (!msg->msg_ie_blli) {
msg->msg_ie_blli = uma_zalloc(unisig_ie_zone,
- M_WAITOK | M_ZERO);
+ M_ZERO);
if (msg->msg_ie_blli == NULL) {
err = ENOMEM;
goto done;
@@ -1165,7 +1165,7 @@ unisig_set_attrs(usp, msg, ap)
if (ap->called.tag == T_ATM_PRESENT) {
if (!msg->msg_ie_cdad) {
msg->msg_ie_cdad = uma_zalloc(unisig_ie_zone,
- M_WAITOK | M_ZERO);
+ M_ZERO);
if (msg->msg_ie_cdad == NULL) {
err = ENOMEM;
goto done;
@@ -1181,7 +1181,7 @@ unisig_set_attrs(usp, msg, ap)
if (ap->called.subaddr.address_format != T_ATM_ABSENT) {
if (!msg->msg_ie_cdsa) {
msg->msg_ie_cdsa = uma_zalloc(unisig_ie_zone,
- M_WAITOK | M_ZERO);
+ M_ZERO);
if (msg->msg_ie_cdsa == NULL) {
err = ENOMEM;
goto done;
@@ -1203,7 +1203,7 @@ unisig_set_attrs(usp, msg, ap)
if (ap->calling.tag == T_ATM_PRESENT) {
if (!msg->msg_ie_cgad) {
msg->msg_ie_cgad = uma_zalloc(unisig_ie_zone,
- M_WAITOK | M_ZERO);
+ M_ZERO);
if (msg->msg_ie_cgad == NULL) {
err = ENOMEM;
goto done;
@@ -1220,7 +1220,7 @@ unisig_set_attrs(usp, msg, ap)
T_ATM_ABSENT) {
if (!msg->msg_ie_cgsa) {
msg->msg_ie_cgsa = uma_zalloc(unisig_ie_zone,
- M_WAITOK | M_ZERO);
+ M_ZERO);
if (msg->msg_ie_cgsa == NULL) {
err = ENOMEM;
goto done;
@@ -1241,7 +1241,7 @@ unisig_set_attrs(usp, msg, ap)
if (ap->qos.tag == T_ATM_PRESENT) {
if (!msg->msg_ie_qosp) {
msg->msg_ie_qosp = uma_zalloc(unisig_ie_zone,
- M_WAITOK | M_ZERO);
+ M_ZERO);
if (msg->msg_ie_qosp == NULL) {
err = ENOMEM;
goto done;
@@ -1273,7 +1273,7 @@ unisig_set_attrs(usp, msg, ap)
ap->transit.v.length != 0) {
if (!msg->msg_ie_trnt) {
msg->msg_ie_trnt = uma_zalloc(unisig_ie_zone,
- M_WAITOK | M_ZERO);
+ M_ZERO);
if (msg->msg_ie_trnt == NULL) {
err = ENOMEM;
goto done;
@@ -1298,7 +1298,7 @@ unisig_set_attrs(usp, msg, ap)
if (ap->cause.tag == T_ATM_PRESENT) {
if (!msg->msg_ie_caus) {
msg->msg_ie_caus = uma_zalloc(unisig_ie_zone,
- M_WAITOK | M_ZERO);
+ M_ZERO);
if (msg->msg_ie_caus == NULL) {
err = ENOMEM;
goto done;
diff --git a/sys/netatm/uni/unisig_vc_state.c b/sys/netatm/uni/unisig_vc_state.c
index 3c88cba..6c5bc36 100644
--- a/sys/netatm/uni/unisig_vc_state.c
+++ b/sys/netatm/uni/unisig_vc_state.c
@@ -456,7 +456,7 @@ unisig_vc_act04(usp, uvp, msg)
vpi = msg->msg_ie_cnid->ie_cnid_vpci;
vci = msg->msg_ie_cnid->ie_cnid_vci;
} else {
- iep = uma_zalloc(unisig_ie_zone, M_WAITOK);
+ iep = uma_zalloc(unisig_ie_zone, 0);
if (iep == NULL)
return (ENOMEM);
iep->ie_ident = UNI_IE_CNID;
@@ -548,10 +548,10 @@ unisig_vc_act05(usp, uvp, msg)
/*
* Send a RELEASE message
*/
- rls_msg = uma_zalloc(unisig_msg_zone, M_WAITOK | M_ZERO);
+ rls_msg = uma_zalloc(unisig_msg_zone, M_ZERO);
if (rls_msg == NULL)
return(ENOMEM);
- cause_ie = uma_zalloc(unisig_ie_zone, M_WAITOK | M_ZERO);
+ cause_ie = uma_zalloc(unisig_ie_zone, M_ZERO);
if (cause_ie == NULL) {
uma_zfree(unisig_msg_zone, rls_msg);
return(ENOMEM);
@@ -668,7 +668,7 @@ unisig_vc_act06(usp, uvp, msg)
* No--VCI must have been specified earlier
*/
if (!uvp->uv_vci) {
- iep = uma_zalloc(unisig_ie_zone, M_WAITOK);
+ iep = uma_zalloc(unisig_ie_zone, 0);
if (iep == NULL)
return(ENOMEM);
iep->ie_ident = UNI_IE_CNID;
@@ -742,7 +742,7 @@ unisig_vc_act06(usp, uvp, msg)
/*
* Get memory for a CONNECT ACK message
*/
- cack_msg = uma_zalloc(unisig_msg_zone, M_WAITOK);
+ cack_msg = uma_zalloc(unisig_msg_zone, 0);
if (cack_msg == NULL)
return(ENOMEM);
@@ -1058,7 +1058,7 @@ unisig_vc_act09(usp, uvp, msg)
int rc;
struct unisig_msg *conn_msg;
- conn_msg = uma_zalloc(unisig_msg_zone, M_WAITOK);
+ conn_msg = uma_zalloc(unisig_msg_zone, 0);
if (conn_msg == NULL)
return(ENOMEM);
@@ -1389,7 +1389,7 @@ unisig_vc_act15(usp, uvp, msg)
}
}
if (cause == UNI_IE_CAUS_MISSING) {
- iep = uma_zalloc(unisig_ie_zone, M_WAITOK);
+ iep = uma_zalloc(unisig_ie_zone, 0);
if (iep == NULL)
return(ENOMEM);
iep->ie_ident = UNI_IE_CNID;
@@ -1611,7 +1611,7 @@ unisig_vc_act20(usp, uvp, msg)
/*
* Get memory for a STATUS ENQUIRY message
*/
- stat_msg = uma_zalloc(unisig_msg_zone, M_WAITOK);
+ stat_msg = uma_zalloc(unisig_msg_zone, 0);
if (stat_msg == NULL)
return(ENOMEM);
@@ -1757,15 +1757,15 @@ unisig_vc_act22(usp, uvp, msg)
/*
* Get memory for a STATUS message
*/
- status = uma_zalloc(unisig_msg_zone, M_WAITOK | M_ZERO);
+ status = uma_zalloc(unisig_msg_zone, M_ZERO);
if (status == NULL)
return(ENOMEM);
- callst_ie = uma_zalloc(unisig_ie_zone, M_WAITOK | M_ZERO);
+ callst_ie = uma_zalloc(unisig_ie_zone, M_ZERO);
if (callst_ie == NULL) {
uma_zfree(unisig_msg_zone, status);
return(ENOMEM);
}
- cause_ie = uma_zalloc(unisig_ie_zone, M_WAITOK | M_ZERO);
+ cause_ie = uma_zalloc(unisig_ie_zone, M_ZERO);
if (cause_ie == NULL) {
uma_zfree(unisig_msg_zone, status);
uma_zfree(unisig_ie_zone, callst_ie);
@@ -1859,7 +1859,7 @@ unisig_vc_act23(usp, uvp, msg)
/*
* Get memory for the ADD PARTY REJECT message
*/
- apr_msg = uma_zalloc(unisig_msg_zone, M_WAITOK | M_ZERO);
+ apr_msg = uma_zalloc(unisig_msg_zone, M_ZERO);
if (apr_msg == NULL)
return(ENOMEM);
diff --git a/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c b/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c
index 443c18a..2b008bf 100644
--- a/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c
+++ b/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c
@@ -832,7 +832,7 @@ bt3c_receive(bt3c_softc_p sc)
sc->state = NG_BT3C_W4_PKT_IND;
sc->want = 1;
- MGETHDR(sc->m, M_DONTWAIT, MT_DATA);
+ MGETHDR(sc->m, M_NOWAIT, MT_DATA);
if (sc->m == NULL) {
NG_BT3C_ERR(sc->dev, "Could not get mbuf\n");
NG_BT3C_STAT_IERROR(sc->stat);
@@ -996,7 +996,7 @@ bt3c_append(struct mbuf *m0, int c)
}
if (m->m_len >= len) {
- MGET(m->m_next, M_DONTWAIT, m0->m_type);
+ MGET(m->m_next, M_NOWAIT, m0->m_type);
if (m->m_next == NULL)
return (ENOBUFS);
diff --git a/sys/netgraph/bluetooth/drivers/h4/ng_h4.c b/sys/netgraph/bluetooth/drivers/h4/ng_h4.c
index 650c6f4..d793c04 100644
--- a/sys/netgraph/bluetooth/drivers/h4/ng_h4.c
+++ b/sys/netgraph/bluetooth/drivers/h4/ng_h4.c
@@ -170,7 +170,7 @@ ng_h4_open(dev_t dev, struct tty *tp)
}
/* Initialize private struct */
- MALLOC(sc, ng_h4_info_p, sizeof(*sc), M_NETGRAPH_H4, M_WAITOK | M_ZERO);
+ MALLOC(sc, ng_h4_info_p, sizeof(*sc), M_NETGRAPH_H4, M_ZERO);
if (sc == NULL) {
error = ENOMEM;
goto out;
@@ -516,7 +516,7 @@ ng_h4_input(int c, struct tty *tp)
if (sc->hook != NULL && NG_HOOK_IS_VALID(sc->hook)) {
struct mbuf *m = NULL;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m != NULL) {
m->m_pkthdr.len = 0;
diff --git a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c
index 603d722..71cb2df 100644
--- a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c
+++ b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c
@@ -1012,7 +1012,7 @@ ubt_intr_complete(usbd_xfer_handle h, usbd_private_handle p, usbd_status s)
/* Copy HCI event frame to mbuf */
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
NG_UBT_ALERT(
"%s: %s - Could not allocate mbuf\n", __func__, USBDEVNAME(sc->sc_dev));
@@ -1148,7 +1148,7 @@ ubt_bulk_in_complete(usbd_xfer_handle h, usbd_private_handle p, usbd_status s)
if (h->actlen < sizeof(*hdr))
goto done;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
NG_UBT_ALERT(
"%s: %s - Could not allocate mbuf\n", __func__, USBDEVNAME(sc->sc_dev));
@@ -1426,7 +1426,7 @@ ubt_isoc_in_complete(usbd_xfer_handle h, usbd_private_handle p, usbd_status s)
/* Copy SCO data frame to mbuf */
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
NG_UBT_ALERT(
"%s: %s - Could not allocate mbuf\n",
diff --git a/sys/netgraph/bluetooth/hci/ng_hci_cmds.c b/sys/netgraph/bluetooth/hci/ng_hci_cmds.c
index 5769ee5..3e3e501 100644
--- a/sys/netgraph/bluetooth/hci/ng_hci_cmds.c
+++ b/sys/netgraph/bluetooth/hci/ng_hci_cmds.c
@@ -116,7 +116,7 @@ ng_hci_send_command(ng_hci_unit_p unit)
ng_hci_mtap(unit, m0);
- m = m_dup(m0, M_DONTWAIT);
+ m = m_dup(m0, M_NOWAIT);
if (m != NULL)
NG_SEND_DATA_ONLY(error, unit->drv, m);
else
diff --git a/sys/netgraph/bluetooth/hci/ng_hci_evnt.c b/sys/netgraph/bluetooth/hci/ng_hci_evnt.c
index 9d81380..cd199db 100644
--- a/sys/netgraph/bluetooth/hci/ng_hci_evnt.c
+++ b/sys/netgraph/bluetooth/hci/ng_hci_evnt.c
@@ -504,7 +504,7 @@ con_compl(ng_hci_unit_p unit, struct mbuf *event)
} __attribute__ ((packed)) *lp;
struct mbuf *m;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m != NULL) {
m->m_pkthdr.len = m->m_len = sizeof(*lp);
lp = mtod(m, struct __link_policy *);
diff --git a/sys/netgraph/bluetooth/hci/ng_hci_misc.c b/sys/netgraph/bluetooth/hci/ng_hci_misc.c
index ba92f89..c4f1f85 100644
--- a/sys/netgraph/bluetooth/hci/ng_hci_misc.c
+++ b/sys/netgraph/bluetooth/hci/ng_hci_misc.c
@@ -67,7 +67,7 @@ ng_hci_mtap(ng_hci_unit_p unit, struct mbuf *m0)
int error = 0;
if (unit->raw != NULL && NG_HOOK_IS_VALID(unit->raw)) {
- m = m_dup(m0, M_DONTWAIT);
+ m = m_dup(m0, M_NOWAIT);
if (m != NULL)
NG_SEND_DATA_ONLY(error, unit->raw, m);
diff --git a/sys/netgraph/bluetooth/hci/ng_hci_ulpi.c b/sys/netgraph/bluetooth/hci/ng_hci_ulpi.c
index 97a0ea8..0a2c48b 100644
--- a/sys/netgraph/bluetooth/hci/ng_hci_ulpi.c
+++ b/sys/netgraph/bluetooth/hci/ng_hci_ulpi.c
@@ -232,7 +232,7 @@ ng_hci_lp_acl_con_req(ng_hci_unit_p unit, item_p item, hook_p hook)
* Create HCI command
*/
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
ng_hci_free_con(con);
error = ENOBUFS;
@@ -427,7 +427,7 @@ ng_hci_lp_sco_con_req(ng_hci_unit_p unit, item_p item, hook_p hook)
* Create HCI command
*/
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
ng_hci_free_con(sco_con);
error = ENOBUFS;
@@ -545,7 +545,7 @@ ng_hci_lp_discon_req(ng_hci_unit_p unit, item_p item, hook_p hook)
* Create HCI command
*/
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
error = ENOBUFS;
goto out;
@@ -794,7 +794,7 @@ ng_hci_lp_con_rsp(ng_hci_unit_p unit, item_p item, hook_p hook)
* Create HCI command
*/
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
error = ENOBUFS;
goto out;
@@ -1017,7 +1017,7 @@ ng_hci_lp_qos_req(ng_hci_unit_p unit, item_p item, hook_p hook)
* Create HCI command
*/
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
error = ENOBUFS;
goto out;
@@ -1247,7 +1247,7 @@ ng_hci_process_con_watchdog_timeout(node_p node, hook_p hook,
* Create HCI command
*/
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return; /* XXX this is bad */
diff --git a/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h b/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h
index d107ad6..42f53aa 100644
--- a/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h
+++ b/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h
@@ -54,7 +54,7 @@ do { \
ng_l2cap_cmd_rej_data_t data; \
} __attribute__ ((packed)) *c = NULL; \
\
- MGETHDR((_m), M_DONTWAIT, MT_DATA); \
+ MGETHDR((_m), M_NOWAIT, MT_DATA); \
if ((_m) == NULL) \
break; \
\
@@ -88,7 +88,7 @@ do { \
ng_l2cap_con_req_cp param; \
} __attribute__ ((packed)) *c = NULL; \
\
- MGETHDR((_m), M_DONTWAIT, MT_DATA); \
+ MGETHDR((_m), M_NOWAIT, MT_DATA); \
if ((_m) == NULL) \
break; \
\
@@ -111,7 +111,7 @@ do { \
ng_l2cap_con_rsp_cp param; \
} __attribute__ ((packed)) *c = NULL; \
\
- MGETHDR((_m), M_DONTWAIT, MT_DATA); \
+ MGETHDR((_m), M_NOWAIT, MT_DATA); \
if ((_m) == NULL) \
break; \
\
@@ -136,7 +136,7 @@ do { \
ng_l2cap_cfg_req_cp param; \
} __attribute__ ((packed)) *c = NULL; \
\
- MGETHDR((_m), M_DONTWAIT, MT_DATA); \
+ MGETHDR((_m), M_NOWAIT, MT_DATA); \
if ((_m) == NULL) { \
NG_FREE_M((_data)); \
break; \
@@ -168,7 +168,7 @@ do { \
ng_l2cap_cfg_rsp_cp param; \
} __attribute__ ((packed)) *c = NULL; \
\
- MGETHDR((_m), M_DONTWAIT, MT_DATA); \
+ MGETHDR((_m), M_NOWAIT, MT_DATA); \
if ((_m) == NULL) { \
NG_FREE_M((_data)); \
break; \
@@ -198,7 +198,7 @@ do { \
do { \
u_int8_t *p = NULL; \
\
- MGETHDR((_m), M_DONTWAIT, MT_DATA); \
+ MGETHDR((_m), M_NOWAIT, MT_DATA); \
if ((_m) == NULL) \
break; \
\
@@ -275,7 +275,7 @@ do { \
ng_l2cap_discon_req_cp param; \
} __attribute__ ((packed)) *c = NULL; \
\
- MGETHDR((_m), M_DONTWAIT, MT_DATA); \
+ MGETHDR((_m), M_NOWAIT, MT_DATA); \
if ((_m) == NULL) \
break; \
\
@@ -298,7 +298,7 @@ do { \
ng_l2cap_discon_rsp_cp param; \
} __attribute__ ((packed)) *c = NULL; \
\
- MGETHDR((_m), M_DONTWAIT, MT_DATA); \
+ MGETHDR((_m), M_NOWAIT, MT_DATA); \
if ((_m) == NULL) \
break; \
\
@@ -318,7 +318,7 @@ do { \
do { \
ng_l2cap_cmd_hdr_t *c = NULL; \
\
- MGETHDR((_m), M_DONTWAIT, MT_DATA); \
+ MGETHDR((_m), M_NOWAIT, MT_DATA); \
if ((_m) == NULL) \
break; \
\
@@ -345,7 +345,7 @@ do { \
ng_l2cap_info_req_cp param; \
} __attribute__ ((packed)) *c = NULL; \
\
- MGETHDR((_m), M_DONTWAIT, MT_DATA); \
+ MGETHDR((_m), M_NOWAIT, MT_DATA); \
if ((_m) == NULL) \
break; \
\
@@ -368,7 +368,7 @@ do { \
ng_l2cap_info_rsp_data_t data; \
} __attribute__ ((packed)) *c = NULL; \
\
- MGETHDR((_m), M_DONTWAIT, MT_DATA); \
+ MGETHDR((_m), M_NOWAIT, MT_DATA); \
if ((_m) == NULL) \
break; \
\
diff --git a/sys/netgraph/bluetooth/l2cap/ng_l2cap_evnt.c b/sys/netgraph/bluetooth/l2cap/ng_l2cap_evnt.c
index 3779b91..e4a644d 100644
--- a/sys/netgraph/bluetooth/l2cap/ng_l2cap_evnt.c
+++ b/sys/netgraph/bluetooth/l2cap/ng_l2cap_evnt.c
@@ -190,7 +190,7 @@ ng_l2cap_process_signal_cmd(ng_l2cap_con_p con)
/* Get the command, save the rest (if any) */
if (con->rx_pkt->m_pkthdr.len > hdr->length)
- m = m_split(con->rx_pkt, hdr->length, M_DONTWAIT);
+ m = m_split(con->rx_pkt, hdr->length, M_NOWAIT);
else
m = NULL;
diff --git a/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c b/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c
index f505158..39979be 100644
--- a/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c
+++ b/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c
@@ -502,7 +502,7 @@ ng_l2cap_lp_send(ng_l2cap_con_p con, u_int16_t dcid, struct mbuf *m0)
/* Check length of the packet against HCI MTU */
len = m0->m_pkthdr.len;
if (len > l2cap->pkt_size) {
- m = m_split(m0, l2cap->pkt_size, M_DONTWAIT);
+ m = m_split(m0, l2cap->pkt_size, M_NOWAIT);
if (m == NULL) {
NG_L2CAP_ALERT(
"%s: %s - m_split(%d) failed\n", __func__, NG_NODE_NAME(l2cap->node),
diff --git a/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.c b/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.c
index 9fcbc6e..affa98e 100644
--- a/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.c
+++ b/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.c
@@ -432,7 +432,7 @@ ng_l2cap_queue_command_timeout(void *context)
struct mbuf *
ng_l2cap_prepend(struct mbuf *m, int size)
{
- M_PREPEND(m, size, M_DONTWAIT);
+ M_PREPEND(m, size, M_NOWAIT);
if (m == NULL || (m->m_len < size && (m = m_pullup(m, size)) == NULL))
return (NULL);
diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c b/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c
index 8fa8a08..9bc2438 100644
--- a/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c
+++ b/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c
@@ -275,7 +275,7 @@ ng_btsocket_hci_raw_node_rcvdata(hook_p hook, item_p item)
struct mbuf *nam = NULL;
int error;
- MGET(nam, M_DONTWAIT, MT_SONAME);
+ MGET(nam, M_NOWAIT, MT_SONAME);
if (nam != NULL) {
struct sockaddr_hci *sa = mtod(nam, struct sockaddr_hci *);
@@ -348,7 +348,7 @@ ng_btsocket_raw_send_ngmsg(char *path, int cmd, void *arg, int arglen)
struct ng_mesg *msg = NULL;
int error = 0;
- NG_MKMESSAGE(msg, NGM_HCI_COOKIE, cmd, arglen, M_WAITOK);
+ NG_MKMESSAGE(msg, NGM_HCI_COOKIE, cmd, arglen, 0);
if (msg == NULL)
return (ENOMEM);
@@ -374,7 +374,7 @@ ng_btsocket_raw_send_sync_ngmsg(ng_btsocket_hci_raw_pcb_p pcb, char *path,
ng_btsocket_hci_raw_get_token(&pcb->token);
pcb->msg = NULL;
- NG_MKMESSAGE(msg, NGM_HCI_COOKIE, cmd, 0, M_WAITOK);
+ NG_MKMESSAGE(msg, NGM_HCI_COOKIE, cmd, 0, 0);
if (msg == NULL) {
pcb->token = 0;
return (ENOMEM);
@@ -504,7 +504,7 @@ ng_btsocket_hci_raw_data_input(struct mbuf *nam)
* will check if socket has enough buffer space.
*/
- m = m_dup(m0, M_DONTWAIT);
+ m = m_dup(m0, M_NOWAIT);
if (m != NULL) {
struct mbuf *ctl = NULL;
@@ -743,7 +743,7 @@ ng_btsocket_hci_raw_attach(struct socket *so, int proto, struct thread *td)
return (error);
MALLOC(pcb, ng_btsocket_hci_raw_pcb_p, sizeof(*pcb),
- M_NETGRAPH_BTSOCKET_HCI_RAW, M_WAITOK | M_ZERO);
+ M_NETGRAPH_BTSOCKET_HCI_RAW, M_ZERO);
if (pcb == NULL)
return (ENOMEM);
@@ -956,7 +956,7 @@ ng_btsocket_hci_raw_control(struct socket *so, u_long cmd, caddr_t data,
pcb->msg = NULL;
NG_MKMESSAGE(msg, NGM_HCI_COOKIE,
- NGM_HCI_NODE_GET_NEIGHBOR_CACHE, 0, M_WAITOK);
+ NGM_HCI_NODE_GET_NEIGHBOR_CACHE, 0, 0);
if (msg == NULL) {
pcb->token = 0;
error = ENOMEM;
@@ -1014,7 +1014,7 @@ ng_btsocket_hci_raw_control(struct socket *so, u_long cmd, caddr_t data,
pcb->msg = NULL;
NG_MKMESSAGE(msg, NGM_HCI_COOKIE, NGM_HCI_NODE_GET_CON_LIST,
- 0, M_WAITOK);
+ 0, 0);
if (msg == NULL) {
pcb->token = 0;
error = ENOMEM;
@@ -1271,7 +1271,7 @@ ng_btsocket_hci_raw_send(struct socket *so, int flags, struct mbuf *m,
sa = (struct sockaddr *) &pcb->addr;
}
- MGET(nam, M_TRYWAIT, MT_SONAME);
+ MGET(nam, 0, MT_SONAME);
if (nam == NULL) {
error = ENOBUFS;
goto drop;
diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c b/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c
index dec7a3c..8360038 100644
--- a/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c
+++ b/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c
@@ -1464,7 +1464,7 @@ ng_btsocket_l2cap_data_input(struct mbuf *m, hook_p hook)
* it is a broadcast traffic after all
*/
- copy = m_dup(m, M_DONTWAIT);
+ copy = m_dup(m, M_NOWAIT);
if (copy != NULL) {
sbappendrecord(&pcb->so->so_rcv, copy);
sorwakeup(pcb->so);
@@ -2384,7 +2384,7 @@ ng_btsocket_l2cap_send2(ng_btsocket_l2cap_pcb_p pcb)
if (pcb->so->so_snd.sb_cc == 0)
return (EINVAL); /* XXX */
- m = m_dup(pcb->so->so_snd.sb_mb, M_DONTWAIT);
+ m = m_dup(pcb->so->so_snd.sb_mb, M_NOWAIT);
if (m == NULL)
return (ENOBUFS);
diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c b/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c
index 3b24afd..44e3be1 100644
--- a/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c
+++ b/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c
@@ -571,7 +571,7 @@ ng_btsocket_l2cap_raw_attach(struct socket *so, int proto, struct thread *td)
/* Allocate the PCB */
MALLOC(pcb, ng_btsocket_l2cap_raw_pcb_p, sizeof(*pcb),
- M_NETGRAPH_BTSOCKET_L2CAP_RAW, M_WAITOK | M_ZERO);
+ M_NETGRAPH_BTSOCKET_L2CAP_RAW, M_ZERO);
if (pcb == NULL)
return (ENOMEM);
@@ -758,7 +758,7 @@ ng_btsocket_l2cap_raw_control(struct socket *so, u_long cmd, caddr_t data,
pcb->msg = NULL;
NG_MKMESSAGE(msg, NGM_L2CAP_COOKIE, NGM_L2CAP_NODE_GET_FLAGS,
- 0, M_WAITOK);
+ 0, 0);
if (msg == NULL) {
pcb->token = 0;
error = ENOMEM;
@@ -799,7 +799,7 @@ ng_btsocket_l2cap_raw_control(struct socket *so, u_long cmd, caddr_t data,
pcb->msg = NULL;
NG_MKMESSAGE(msg, NGM_L2CAP_COOKIE, NGM_L2CAP_NODE_GET_DEBUG,
- 0, M_WAITOK);
+ 0, 0);
if (msg == NULL) {
pcb->token = 0;
error = ENOMEM;
@@ -837,7 +837,7 @@ ng_btsocket_l2cap_raw_control(struct socket *so, u_long cmd, caddr_t data,
(struct ng_btsocket_l2cap_raw_node_debug *) data;
NG_MKMESSAGE(msg, NGM_L2CAP_COOKIE, NGM_L2CAP_NODE_SET_DEBUG,
- sizeof(ng_l2cap_node_debug_ep), M_WAITOK);
+ sizeof(ng_l2cap_node_debug_ep), 0);
if (msg == NULL) {
error = ENOMEM;
break;
@@ -865,7 +865,7 @@ ng_btsocket_l2cap_raw_control(struct socket *so, u_long cmd, caddr_t data,
pcb->msg = NULL;
NG_MKMESSAGE(msg, NGM_L2CAP_COOKIE, NGM_L2CAP_NODE_GET_CON_LIST,
- 0, M_WAITOK);
+ 0, 0);
if (msg == NULL) {
pcb->token = 0;
error = ENOMEM;
@@ -923,7 +923,7 @@ ng_btsocket_l2cap_raw_control(struct socket *so, u_long cmd, caddr_t data,
pcb->msg = NULL;
NG_MKMESSAGE(msg, NGM_L2CAP_COOKIE,
- NGM_L2CAP_NODE_GET_CHAN_LIST, 0, M_WAITOK);
+ NGM_L2CAP_NODE_GET_CHAN_LIST, 0, 0);
if (msg == NULL) {
pcb->token = 0;
error = ENOMEM;
@@ -987,7 +987,7 @@ ng_btsocket_l2cap_raw_control(struct socket *so, u_long cmd, caddr_t data,
NG_MKMESSAGE(msg, NGM_L2CAP_COOKIE,
NGM_L2CAP_L2CA_PING, sizeof(*ip) + p->echo_size,
- M_WAITOK);
+ 0);
if (msg == NULL) {
pcb->token = 0;
error = ENOMEM;
@@ -1056,7 +1056,7 @@ ng_btsocket_l2cap_raw_control(struct socket *so, u_long cmd, caddr_t data,
NG_MKMESSAGE(msg, NGM_L2CAP_COOKIE,
NGM_L2CAP_L2CA_GET_INFO, sizeof(*ip) + p->info_size,
- M_WAITOK);
+ 0);
if (msg == NULL) {
pcb->token = 0;
error = ENOMEM;
diff --git a/sys/netgraph/ng_UI.c b/sys/netgraph/ng_UI.c
index e0733bc..8751105 100644
--- a/sys/netgraph/ng_UI.c
+++ b/sys/netgraph/ng_UI.c
@@ -194,7 +194,7 @@ ng_UI_rcvdata(hook_p hook, item_p item)
m_adj(m, ptr - start);
NG_FWD_NEW_DATA(error, item, priv->uplink, m); /* m -> NULL */
} else if (hook == priv->uplink) {
- M_PREPEND(m, 1, M_DONTWAIT); /* Prepend IP NLPID */
+ M_PREPEND(m, 1, M_NOWAIT); /* Prepend IP NLPID */
if (!m)
ERROUT(ENOBUFS);
mtod(m, u_char *)[0] = HDLC_UI;
diff --git a/sys/netgraph/ng_bridge.c b/sys/netgraph/ng_bridge.c
index f552a50..1e1ff1c 100644
--- a/sys/netgraph/ng_bridge.c
+++ b/sys/netgraph/ng_bridge.c
@@ -713,7 +713,7 @@ ng_bridge_rcvdata(hook_p hook, item_p item)
* It's usable link but not the reserved (first) one.
* Copy mbuf and meta info for sending.
*/
- m2 = m_dup(m, M_DONTWAIT); /* XXX m_copypacket() */
+ m2 = m_dup(m, M_NOWAIT); /* XXX m_copypacket() */
if (m2 == NULL) {
link->stats.memoryFailures++;
NG_FREE_ITEM(item);
diff --git a/sys/netgraph/ng_cisco.c b/sys/netgraph/ng_cisco.c
index f263f35..70ef5d7 100644
--- a/sys/netgraph/ng_cisco.c
+++ b/sys/netgraph/ng_cisco.c
@@ -360,7 +360,7 @@ cisco_rcvdata(hook_p hook, item_p item)
/* OK so it came from a protocol, heading out. Prepend general data
packet header. For now, IP,IPX only */
m = NGI_M(item); /* still associated with item */
- M_PREPEND(m, CISCO_HEADER_LEN, M_DONTWAIT);
+ M_PREPEND(m, CISCO_HEADER_LEN, M_NOWAIT);
if (!m) {
error = ENOBUFS;
goto out;
@@ -606,7 +606,7 @@ cisco_send(sc_p sc, int type, long par1, long par2)
getmicrotime(&time);
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (!m)
return (ENOBUFS);
diff --git a/sys/netgraph/ng_eiface.c b/sys/netgraph/ng_eiface.c
index 7588c92..1bead1a 100644
--- a/sys/netgraph/ng_eiface.c
+++ b/sys/netgraph/ng_eiface.c
@@ -417,7 +417,7 @@ ng_eiface_constructor(node_p node)
int error = 0;
/* Allocate node and interface private structures */
- MALLOC(priv, priv_p, sizeof(*priv), M_NETGRAPH, M_WAITOK);
+ MALLOC(priv, priv_p, sizeof(*priv), M_NETGRAPH, 0);
if (priv == NULL) {
return (ENOMEM);
}
diff --git a/sys/netgraph/ng_frame_relay.c b/sys/netgraph/ng_frame_relay.c
index dc55592..e2dc299 100644
--- a/sys/netgraph/ng_frame_relay.c
+++ b/sys/netgraph/ng_frame_relay.c
@@ -366,7 +366,7 @@ ngfrm_rcvdata(hook_p hook, item_p item)
alen = sc->addrlen;
if (alen == 0)
alen = 2; /* default value for transmit */
- M_PREPEND(m, alen, M_DONTWAIT);
+ M_PREPEND(m, alen, M_NOWAIT);
if (m == NULL) {
error = ENOBUFS;
goto bad;
diff --git a/sys/netgraph/ng_gif.c b/sys/netgraph/ng_gif.c
index 2d99959..985cf31 100644
--- a/sys/netgraph/ng_gif.c
+++ b/sys/netgraph/ng_gif.c
@@ -309,7 +309,7 @@ ng_gif_glue_af(struct mbuf **mp, int af)
* hopefully everything after that will not
* need one. So let's just use M_PREPEND.
*/
- M_PREPEND(m, sizeof (tmp_af), M_DONTWAIT);
+ M_PREPEND(m, sizeof (tmp_af), M_NOWAIT);
if (m == NULL) {
error = ENOBUFS;
goto done;
diff --git a/sys/netgraph/ng_gif_demux.c b/sys/netgraph/ng_gif_demux.c
index 066bea6..9f6495a 100644
--- a/sys/netgraph/ng_gif_demux.c
+++ b/sys/netgraph/ng_gif_demux.c
@@ -346,7 +346,7 @@ ng_gif_demux_rcvdata(hook_p hook, item_p item)
* Add address family header and set the output hook.
*/
iffam = get_iffam_from_hook(priv, hook);
- M_PREPEND(m, sizeof (iffam->family), M_DONTWAIT);
+ M_PREPEND(m, sizeof (iffam->family), M_NOWAIT);
if (m == NULL) {
NG_FREE_M(m);
NG_FREE_ITEM(item);
diff --git a/sys/netgraph/ng_l2tp.c b/sys/netgraph/ng_l2tp.c
index ebc6a41..69a7cf9 100644
--- a/sys/netgraph/ng_l2tp.c
+++ b/sys/netgraph/ng_l2tp.c
@@ -851,7 +851,7 @@ ng_l2tp_recv_lower(node_p node, item_p item)
* later because of a memory error, because then the upper
* layer would never get the packet.
*/
- M_PREPEND(m, 2, M_DONTWAIT);
+ M_PREPEND(m, 2, M_NOWAIT);
if (m == NULL) {
priv->stats.memoryFailures++;
NG_FREE_ITEM(item);
@@ -955,7 +955,7 @@ ng_l2tp_recv_ctrl(node_p node, item_p item)
}
/* Copy packet */
- if ((m = L2TP_COPY_MBUF(seq->xwin[i], M_DONTWAIT)) == NULL) {
+ if ((m = L2TP_COPY_MBUF(seq->xwin[i], M_NOWAIT)) == NULL) {
priv->stats.memoryFailures++;
return (ENOBUFS);
}
@@ -991,7 +991,7 @@ ng_l2tp_recv_data(node_p node, item_p item, hookpriv_p hpriv)
M_PREPEND(m, 6
+ (2 * (hpriv->conf.include_length != 0))
+ (4 * (hpriv->conf.enable_dseq != 0)),
- M_DONTWAIT);
+ M_NOWAIT);
if (m == NULL) {
priv->stats.memoryFailures++;
NG_FREE_ITEM(item);
@@ -1219,7 +1219,7 @@ ng_l2tp_seq_recv_nr(priv_p priv, u_int16_t nr)
*/
while ((i = L2TP_SEQ_DIFF(seq->ns, seq->rack)) < seq->cwnd
&& seq->xwin[i] != NULL) {
- if ((m = L2TP_COPY_MBUF(seq->xwin[i], M_DONTWAIT)) == NULL)
+ if ((m = L2TP_COPY_MBUF(seq->xwin[i], M_NOWAIT)) == NULL)
priv->stats.memoryFailures++;
else
ng_l2tp_xmit_ctrl(priv, m, seq->ns);
@@ -1361,7 +1361,7 @@ ng_l2tp_seq_rack_timeout(void *arg)
seq->acks = 0;
/* Retransmit oldest unack'd packet */
- if ((m = L2TP_COPY_MBUF(seq->xwin[0], M_DONTWAIT)) == NULL)
+ if ((m = L2TP_COPY_MBUF(seq->xwin[0], M_NOWAIT)) == NULL)
priv->stats.memoryFailures++;
else
ng_l2tp_xmit_ctrl(priv, m, seq->rack);
@@ -1388,7 +1388,7 @@ ng_l2tp_xmit_ctrl(priv_p priv, struct mbuf *m, u_int16_t ns)
if (m == NULL) {
/* Create a new mbuf for ZLB packet */
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
priv->stats.memoryFailures++;
return (ENOBUFS);
@@ -1407,7 +1407,7 @@ ng_l2tp_xmit_ctrl(priv_p priv, struct mbuf *m, u_int16_t ns)
m_adj(m, 2);
/* Make room for L2TP header */
- M_PREPEND(m, 12, M_DONTWAIT);
+ M_PREPEND(m, 12, M_NOWAIT);
if (m == NULL) {
priv->stats.memoryFailures++;
return (ENOBUFS);
diff --git a/sys/netgraph/ng_lmi.c b/sys/netgraph/ng_lmi.c
index 87f3567..f098aa8 100644
--- a/sys/netgraph/ng_lmi.c
+++ b/sys/netgraph/ng_lmi.c
@@ -321,7 +321,7 @@ nglmi_inquire(sc_p sc, int full)
if (sc->lmi_channel == NULL)
return;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
log(LOG_ERR, "nglmi: unable to start up LMI processing\n");
return;
diff --git a/sys/netgraph/ng_one2many.c b/sys/netgraph/ng_one2many.c
index 927bb77..5332049 100644
--- a/sys/netgraph/ng_one2many.c
+++ b/sys/netgraph/ng_one2many.c
@@ -427,7 +427,7 @@ ng_one2many_rcvdata(hook_p hook, item_p item)
struct ng_one2many_link *mdst;
mdst = &priv->many[priv->activeMany[i]];
- m2 = m_dup(m, M_DONTWAIT); /* XXX m_copypacket() */
+ m2 = m_dup(m, M_NOWAIT); /* XXX m_copypacket() */
if (m2 == NULL) {
mdst->stats.memoryFailures++;
NG_FREE_ITEM(item);
diff --git a/sys/netgraph/ng_ppp.c b/sys/netgraph/ng_ppp.c
index 6ffb082..16373e3 100644
--- a/sys/netgraph/ng_ppp.c
+++ b/sys/netgraph/ng_ppp.c
@@ -1595,7 +1595,7 @@ deliver:
/* Split off next fragment as "m2" */
m2 = m;
if (!lastFragment) {
- struct mbuf *n = m_split(m, len, M_DONTWAIT);
+ struct mbuf *n = m_split(m, len, M_NOWAIT);
if (n == NULL) {
NG_FREE_M(m);
@@ -1916,7 +1916,7 @@ ng_ppp_addproto(struct mbuf *m, int proto, int compOK)
static struct mbuf *
ng_ppp_prepend(struct mbuf *m, const void *buf, int len)
{
- M_PREPEND(m, len, M_DONTWAIT);
+ M_PREPEND(m, len, M_NOWAIT);
if (m == NULL || (m->m_len < len && (m = m_pullup(m, len)) == NULL))
return (NULL);
bcopy(buf, mtod(m, u_char *), len);
diff --git a/sys/netgraph/ng_pppoe.c b/sys/netgraph/ng_pppoe.c
index 886747e..521d708 100644
--- a/sys/netgraph/ng_pppoe.c
+++ b/sys/netgraph/ng_pppoe.c
@@ -723,14 +723,14 @@ AAA
printf("pppoe: Session out of memory\n");
LEAVE(ENOMEM);
}
- MGETHDR(neg->m, M_DONTWAIT, MT_DATA);
+ MGETHDR(neg->m, M_NOWAIT, MT_DATA);
if(neg->m == NULL) {
printf("pppoe: Session out of mbufs\n");
FREE(neg, M_NETGRAPH_PPPOE);
LEAVE(ENOBUFS);
}
neg->m->m_pkthdr.rcvif = NULL;
- MCLGET(neg->m, M_DONTWAIT);
+ MCLGET(neg->m, M_NOWAIT);
if ((neg->m->m_flags & M_EXT) == 0) {
printf("pppoe: Session out of mcls\n");
m_freem(neg->m);
@@ -1008,7 +1008,7 @@ AAA
* Put it into a cluster.
*/
struct mbuf *n;
- n = m_dup(m, M_DONTWAIT);
+ n = m_dup(m, M_NOWAIT);
m_freem(m);
m = n;
if (m) {
@@ -1350,7 +1350,7 @@ AAA
* But first correct the length.
*/
sp->pkt_hdr.ph.length = htons((short)(m->m_pkthdr.len));
- M_PREPEND(m, sizeof(*wh), M_DONTWAIT);
+ M_PREPEND(m, sizeof(*wh), M_NOWAIT);
if (m == NULL) {
LEAVE(ENOBUFS);
}
@@ -1525,7 +1525,7 @@ AAA
wh->eh.ether_type = ETHERTYPE_PPPOE_DISC;
/* generate a packet of that type */
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if(m == NULL)
printf("pppoe: Session out of mbufs\n");
else {
@@ -1596,7 +1596,7 @@ AAA
case PPPOE_SINIT:
case PPPOE_SREQ:
/* timeouts on these produce resends */
- m0 = m_copypacket(sp->neg->m, M_DONTWAIT);
+ m0 = m_copypacket(sp->neg->m, M_NOWAIT);
NG_SEND_DATA_ONLY( error, privp->ethernet_hook, m0);
neg->timeout_handle = timeout(pppoe_ticker,
hook, neg->timeout * hz);
@@ -1642,7 +1642,7 @@ AAA
case PPPOE_NEWCONNECTED:
/* send the PADS without a timeout - we're now connected */
- m0 = m_copypacket(sp->neg->m, M_DONTWAIT);
+ m0 = m_copypacket(sp->neg->m, M_NOWAIT);
NG_SEND_DATA_ONLY( error, privp->ethernet_hook, m0);
break;
@@ -1657,7 +1657,7 @@ AAA
* send the offer but if they don't respond
* in PPPOE_OFFER_TIMEOUT seconds, forget about it.
*/
- m0 = m_copypacket(sp->neg->m, M_DONTWAIT);
+ m0 = m_copypacket(sp->neg->m, M_NOWAIT);
NG_SEND_DATA_ONLY( error, privp->ethernet_hook, m0);
neg->timeout_handle = timeout(pppoe_ticker,
hook, PPPOE_OFFER_TIMEOUT * hz);
@@ -1665,7 +1665,7 @@ AAA
case PPPOE_SINIT:
case PPPOE_SREQ:
- m0 = m_copypacket(sp->neg->m, M_DONTWAIT);
+ m0 = m_copypacket(sp->neg->m, M_NOWAIT);
NG_SEND_DATA_ONLY( error, privp->ethernet_hook, m0);
neg->timeout_handle = timeout(pppoe_ticker, hook,
(hz * PPPOE_INITIAL_TIMEOUT));
diff --git a/sys/netgraph/ng_pptpgre.c b/sys/netgraph/ng_pptpgre.c
index 50811da..4422b29 100644
--- a/sys/netgraph/ng_pptpgre.c
+++ b/sys/netgraph/ng_pptpgre.c
@@ -522,7 +522,7 @@ ng_pptpgre_xmit(node_p node, item_p item)
/* Prepend GRE header to outgoing frame */
grelen = sizeof(*gre) + sizeof(u_int32_t) * (gre->hasSeq + gre->hasAck);
if (m == NULL) {
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
priv->stats.memoryFailures++;
if (item)
@@ -532,7 +532,7 @@ ng_pptpgre_xmit(node_p node, item_p item)
m->m_len = m->m_pkthdr.len = grelen;
m->m_pkthdr.rcvif = NULL;
} else {
- M_PREPEND(m, grelen, M_DONTWAIT);
+ M_PREPEND(m, grelen, M_NOWAIT);
if (m == NULL || (m->m_len < grelen
&& (m = m_pullup(m, grelen)) == NULL)) {
priv->stats.memoryFailures++;
diff --git a/sys/netgraph/ng_rfc1490.c b/sys/netgraph/ng_rfc1490.c
index 778d07b..b6c75ea 100644
--- a/sys/netgraph/ng_rfc1490.c
+++ b/sys/netgraph/ng_rfc1490.c
@@ -278,14 +278,14 @@ ng_rfc1490_rcvdata(hook_p hook, item_p item)
break;
}
} else if (hook == priv->ppp) {
- M_PREPEND(m, 2, M_DONTWAIT); /* Prepend PPP NLPID */
+ M_PREPEND(m, 2, M_NOWAIT); /* Prepend PPP NLPID */
if (!m)
ERROUT(ENOBUFS);
mtod(m, u_char *)[0] = HDLC_UI;
mtod(m, u_char *)[1] = NLPID_PPP;
NG_FWD_NEW_DATA(error, item, priv->downlink, m);
} else if (hook == priv->inet) {
- M_PREPEND(m, 2, M_DONTWAIT); /* Prepend IP NLPID */
+ M_PREPEND(m, 2, M_NOWAIT); /* Prepend IP NLPID */
if (!m)
ERROUT(ENOBUFS);
mtod(m, u_char *)[0] = HDLC_UI;
diff --git a/sys/netgraph/ng_socket.c b/sys/netgraph/ng_socket.c
index f841a0e..f5a7643 100644
--- a/sys/netgraph/ng_socket.c
+++ b/sys/netgraph/ng_socket.c
@@ -224,7 +224,7 @@ ngc_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr,
/* Allocate an expendable buffer for the path, chop off
* the sockaddr header, and make sure it's NUL terminated */
len = sap->sg_len - 2;
- MALLOC(path, char *, len + 1, M_NETGRAPH_PATH, M_WAITOK);
+ MALLOC(path, char *, len + 1, M_NETGRAPH_PATH, 0);
if (path == NULL) {
error = ENOMEM;
goto release;
@@ -239,7 +239,7 @@ ngc_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr,
/* Move the data into a linear buffer as well. Messages are not
* delivered in mbufs. */
- MALLOC(msg, struct ng_mesg *, len + 1, M_NETGRAPH_MSG, M_WAITOK);
+ MALLOC(msg, struct ng_mesg *, len + 1, M_NETGRAPH_MSG, 0);
if (msg == NULL) {
error = ENOMEM;
goto release;
@@ -437,7 +437,7 @@ ng_setsockaddr(struct socket *so, struct sockaddr **addr)
if ( NG_NODE_HAS_NAME(pcbp->sockdata->node))
sg_len += namelen = strlen(NG_NODE_NAME(pcbp->sockdata->node));
- MALLOC(sg, struct sockaddr_ng *, sg_len, M_SONAME, M_WAITOK | M_ZERO);
+ MALLOC(sg, struct sockaddr_ng *, sg_len, M_SONAME, M_ZERO);
if (NG_NODE_HAS_NAME(pcbp->sockdata->node))
bcopy(NG_NODE_NAME(pcbp->sockdata->node), sg->sg_data, namelen);
@@ -470,7 +470,7 @@ ng_attach_cntl(struct socket *so)
/* Allocate node private info */
MALLOC(privdata, struct ngsock *,
- sizeof(*privdata), M_NETGRAPH_SOCK, M_WAITOK | M_ZERO);
+ sizeof(*privdata), M_NETGRAPH_SOCK, M_ZERO);
if (privdata == NULL) {
ng_detach_common(pcbp, NG_CONTROL);
return (ENOMEM);
@@ -513,7 +513,7 @@ ng_attach_common(struct socket *so, int type)
return (error);
/* Allocate the pcb */
- MALLOC(pcbp, struct ngpcb *, sizeof(*pcbp), M_PCB, M_WAITOK | M_ZERO);
+ MALLOC(pcbp, struct ngpcb *, sizeof(*pcbp), M_PCB, M_ZERO);
if (pcbp == NULL)
return (ENOMEM);
pcbp->type = type;
diff --git a/sys/netgraph/ng_source.c b/sys/netgraph/ng_source.c
index 78525e8..8ad0a70 100644
--- a/sys/netgraph/ng_source.c
+++ b/sys/netgraph/ng_source.c
@@ -640,7 +640,7 @@ ng_source_send (sc_p sc, int tosend, int *sent_p)
break;
/* duplicate the packet */
- m2 = m_copypacket(m, M_DONTWAIT);
+ m2 = m_copypacket(m, M_NOWAIT);
if (m2 == NULL) {
s = splnet();
IF_PREPEND(&sc->snd_queue, m);
diff --git a/sys/netgraph/ng_tee.c b/sys/netgraph/ng_tee.c
index fbe80ba..877ef16 100644
--- a/sys/netgraph/ng_tee.c
+++ b/sys/netgraph/ng_tee.c
@@ -334,7 +334,7 @@ ngt_rcvdata(hook_p hook, item_p item)
meta_p meta2;
/* Copy packet (failure will not stop the original)*/
- m2 = m_dup(m, M_DONTWAIT);
+ m2 = m_dup(m, M_NOWAIT);
if (m2) {
/* Copy meta info */
diff --git a/sys/netgraph/ng_tty.c b/sys/netgraph/ng_tty.c
index 9a0175e..a25ee9e 100644
--- a/sys/netgraph/ng_tty.c
+++ b/sys/netgraph/ng_tty.c
@@ -203,7 +203,7 @@ ngt_open(dev_t dev, struct tty *tp)
}
/* Initialize private struct */
- MALLOC(sc, sc_p, sizeof(*sc), M_NETGRAPH, M_WAITOK | M_ZERO);
+ MALLOC(sc, sc_p, sizeof(*sc), M_NETGRAPH, M_ZERO);
if (sc == NULL) {
error = ENOMEM;
goto done;
@@ -368,7 +368,7 @@ ngt_input(int c, struct tty *tp)
/* Get a new header mbuf if we need one */
if (!(m = sc->m)) {
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (!m) {
if (sc->flags & FLG_DEBUG)
log(LOG_ERR,
diff --git a/sys/netgraph/ng_vjc.c b/sys/netgraph/ng_vjc.c
index 90d7d4d..14673ba 100644
--- a/sys/netgraph/ng_vjc.c
+++ b/sys/netgraph/ng_vjc.c
@@ -476,7 +476,7 @@ ng_vjc_rcvdata(hook_p hook, item_p item)
m_adj(m, vjlen);
/* Copy the reconstructed TCP/IP headers into a new mbuf */
- MGETHDR(hm, M_DONTWAIT, MT_DATA);
+ MGETHDR(hm, M_NOWAIT, MT_DATA);
if (hm == NULL) {
priv->slc.sls_errorin++;
NG_FREE_M(m);
@@ -486,7 +486,7 @@ ng_vjc_rcvdata(hook_p hook, item_p item)
hm->m_len = 0;
hm->m_pkthdr.rcvif = NULL;
if (hlen > MHLEN) { /* unlikely, but can happen */
- MCLGET(hm, M_DONTWAIT);
+ MCLGET(hm, M_NOWAIT);
if ((hm->m_flags & M_EXT) == 0) {
m_freem(hm);
priv->slc.sls_errorin++;
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c
index 16780b1..6d9d158 100644
--- a/sys/netinet/if_ether.c
+++ b/sys/netinet/if_ether.c
@@ -317,7 +317,7 @@ arprequest(ifp, sip, tip, enaddr)
LLC_UI, 0x00, 0x00, 0x00, 0x08, 0x06 };
u_short ar_hrd;
- if ((m = m_gethdr(M_DONTWAIT, MT_DATA)) == NULL)
+ if ((m = m_gethdr(M_NOWAIT, MT_DATA)) == NULL)
return;
m->m_pkthdr.rcvif = (struct ifnet *)0;
#ifdef MAC
diff --git a/sys/netinet/igmp.c b/sys/netinet/igmp.c
index 929d456..bc5fe11 100644
--- a/sys/netinet/igmp.c
+++ b/sys/netinet/igmp.c
@@ -108,7 +108,7 @@ igmp_init()
/*
* Construct a Router Alert option to use in outgoing packets
*/
- MGET(router_alert, M_DONTWAIT, MT_DATA);
+ MGET(router_alert, M_NOWAIT, MT_DATA);
ra = mtod(router_alert, struct ipoption *);
ra->ipopt_dst.s_addr = 0;
ra->ipopt_list[0] = IPOPT_RA; /* Router Alert Option */
@@ -445,7 +445,7 @@ igmp_sendpkt(inm, type, addr)
struct ip *ip;
struct ip_moptions imo;
- MGETHDR(m, M_DONTWAIT, MT_HEADER);
+ MGETHDR(m, M_NOWAIT, MT_HEADER);
if (m == NULL)
return;
diff --git a/sys/netinet/in.c b/sys/netinet/in.c
index 89c4123..5610491 100644
--- a/sys/netinet/in.c
+++ b/sys/netinet/in.c
@@ -268,7 +268,7 @@ in_control(so, cmd, data, ifp, td)
return (EADDRNOTAVAIL);
if (ia == (struct in_ifaddr *)0) {
ia = (struct in_ifaddr *)
- malloc(sizeof *ia, M_IFADDR, M_WAITOK | M_ZERO);
+ malloc(sizeof *ia, M_IFADDR, M_ZERO);
if (ia == (struct in_ifaddr *)NULL)
return (ENOBUFS);
/*
@@ -837,7 +837,7 @@ in_addmulti(ap, ifp)
return ifma->ifma_protospec;
}
- /* XXX - if_addmulti uses M_WAITOK. Can this really be called
+ /* XXX - if_addmulti does not use N_NOWAIT. Can this really be called
at interrupt time? If so, need to fix if_addmulti. XXX */
inm = (struct in_multi *)malloc(sizeof(*inm), M_IPMADDR,
M_NOWAIT | M_ZERO);
diff --git a/sys/netinet/in_gif.c b/sys/netinet/in_gif.c
index cdf094a..3e996d7 100644
--- a/sys/netinet/in_gif.c
+++ b/sys/netinet/in_gif.c
@@ -167,7 +167,7 @@ in_gif_output(ifp, family, m)
ip_ecn_ingress(ECN_NOCARE, &iphdr.ip_tos, &tos);
/* prepend new IP header */
- M_PREPEND(m, sizeof(struct ip), M_DONTWAIT);
+ M_PREPEND(m, sizeof(struct ip), M_NOWAIT);
if (m && m->m_len < sizeof(struct ip))
m = m_pullup(m, sizeof(struct ip));
if (m == NULL) {
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
index b5a6722..eaf7d35 100644
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -663,7 +663,7 @@ in_sockaddr(port, addr_p)
struct sockaddr_in *sin;
MALLOC(sin, struct sockaddr_in *, sizeof *sin, M_SONAME,
- M_WAITOK | M_ZERO);
+ M_ZERO);
sin->sin_family = AF_INET;
sin->sin_len = sizeof(*sin);
sin->sin_addr = *addr_p;
diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c
index 9082733..f9bad2c 100644
--- a/sys/netinet/ip_divert.c
+++ b/sys/netinet/ip_divert.c
@@ -489,7 +489,7 @@ div_pcblist(SYSCTL_HANDLER_ARGS)
if (error)
return error;
- inp_list = malloc(n * sizeof *inp_list, M_TEMP, M_WAITOK);
+ inp_list = malloc(n * sizeof *inp_list, M_TEMP, 0);
if (inp_list == 0)
return ENOMEM;
diff --git a/sys/netinet/ip_encap.c b/sys/netinet/ip_encap.c
index 478cdfa..a547c66 100644
--- a/sys/netinet/ip_encap.c
+++ b/sys/netinet/ip_encap.c
@@ -487,7 +487,7 @@ encap_fillarg(m, ep)
{
struct m_tag *tag;
- tag = m_tag_get(PACKET_TAG_ENCAP, sizeof (void*), M_DONTWAIT);
+ tag = m_tag_get(PACKET_TAG_ENCAP, sizeof (void*), M_NOWAIT);
if (tag) {
*(void**)(tag+1) = ep->arg;
m_tag_prepend(m, tag);
diff --git a/sys/netinet/ip_fw.c b/sys/netinet/ip_fw.c
index 26f4a04..b532766 100644
--- a/sys/netinet/ip_fw.c
+++ b/sys/netinet/ip_fw.c
@@ -875,7 +875,7 @@ add_dyn_rule(struct ipfw_flow_id *id, u_int8_t dyn_type, struct ip_fw *rule)
if (ipfw_dyn_v != NULL)
free(ipfw_dyn_v, M_IPFW);
ipfw_dyn_v = malloc(curr_dyn_buckets * sizeof r,
- M_IPFW, M_DONTWAIT | M_ZERO);
+ M_IPFW, M_NOWAIT | M_ZERO);
if (ipfw_dyn_v == NULL)
return NULL; /* failed ! */
}
@@ -2036,7 +2036,7 @@ ip_fw_ctl(struct sockopt *sopt)
* bother filling up the buffer, just jump to the
* sooptcopyout.
*/
- buf = malloc(size, M_TEMP, M_WAITOK);
+ buf = malloc(size, M_TEMP, 0);
if (buf == 0) {
splx(s);
error = ENOBUFS;
diff --git a/sys/netinet/ip_fw2.c b/sys/netinet/ip_fw2.c
index 7a425ed..1f02a9c 100644
--- a/sys/netinet/ip_fw2.c
+++ b/sys/netinet/ip_fw2.c
@@ -1057,7 +1057,7 @@ send_pkt(struct ipfw_flow_id *id, u_int32_t seq, u_int32_t ack, int flags)
struct tcphdr *tcp;
struct route sro; /* fake route */
- MGETHDR(m, M_DONTWAIT, MT_HEADER);
+ MGETHDR(m, M_NOWAIT, MT_HEADER);
if (m == 0)
return;
m->m_pkthdr.rcvif = (struct ifnet *)0;
@@ -2498,7 +2498,7 @@ ipfw_ctl(struct sockopt *sopt)
* how much room is needed, do not bother filling up the
* buffer, just jump to the sooptcopyout.
*/
- buf = malloc(size, M_TEMP, M_WAITOK);
+ buf = malloc(size, M_TEMP, 0);
if (buf == 0) {
splx(s);
error = ENOBUFS;
diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c
index a15ece2..a83dcba 100644
--- a/sys/netinet/ip_icmp.c
+++ b/sys/netinet/ip_icmp.c
@@ -163,7 +163,7 @@ icmp_error(n, type, code, dest, destifp)
/*
* First, formulate icmp message
*/
- m = m_gethdr(M_DONTWAIT, MT_HEADER);
+ m = m_gethdr(M_NOWAIT, MT_HEADER);
if (m == NULL)
goto freeit;
#ifdef MAC
@@ -656,7 +656,7 @@ match:
*/
cp = (u_char *) (ip + 1);
if ((opts = ip_srcroute()) == 0 &&
- (opts = m_gethdr(M_DONTWAIT, MT_HEADER))) {
+ (opts = m_gethdr(M_NOWAIT, MT_HEADER))) {
opts->m_len = sizeof(struct in_addr);
mtod(opts, struct in_addr *)->s_addr = 0;
}
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index 51332a5..590e867 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -823,7 +823,7 @@ found:
/* Clone packet if we're doing a 'tee' */
if ((divert_info & IP_FW_PORT_TEE_FLAG) != 0)
- clone = m_dup(m, M_DONTWAIT);
+ clone = m_dup(m, M_NOWAIT);
/* Restore packet header fields to original values */
ip->ip_len += hlen;
@@ -983,7 +983,7 @@ ip_reass(struct mbuf *m, struct ipqhead *head, struct ipq *fp,
if ((ip_maxfragpackets >= 0) && (ip_nfragpackets >= ip_maxfragpackets))
goto dropfrag;
ip_nfragpackets++;
- if ((t = m_get(M_DONTWAIT, MT_FTABLE)) == NULL)
+ if ((t = m_get(M_NOWAIT, MT_FTABLE)) == NULL)
goto dropfrag;
fp = mtod(t, struct ipq *);
#ifdef MAC
@@ -1587,7 +1587,7 @@ ip_srcroute()
if (ip_nhops == 0)
return ((struct mbuf *)0);
- m = m_get(M_DONTWAIT, MT_HEADER);
+ m = m_get(M_NOWAIT, MT_HEADER);
if (m == 0)
return ((struct mbuf *)0);
@@ -1762,8 +1762,8 @@ ip_forward(struct mbuf *m, int srcrt, struct sockaddr_in *next_hop)
* assume exclusive access to the IP header in `m', so any
* data in a cluster may change before we reach icmp_error().
*/
- MGET(mcopy, M_DONTWAIT, m->m_type);
- if (mcopy != NULL && !m_dup_pkthdr(mcopy, m, M_DONTWAIT)) {
+ MGET(mcopy, M_NOWAIT, m->m_type);
+ if (mcopy != NULL && !m_dup_pkthdr(mcopy, m, M_NOWAIT)) {
/*
* It's probably ok if the pkthdr dup fails (because
* the deep copy of the tag chain failed), but for now
diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c
index 3caba6b..d48ae3e 100644
--- a/sys/netinet/ip_mroute.c
+++ b/sys/netinet/ip_mroute.c
@@ -1403,7 +1403,7 @@ encap_send(struct ip *ip, struct vif *vifp, struct mbuf *m)
* new mbuf so we can modify it. Try to fill the new
* mbuf since if we don't the ethernet driver will.
*/
- MGETHDR(mb_copy, M_DONTWAIT, MT_HEADER);
+ MGETHDR(mb_copy, M_NOWAIT, MT_HEADER);
if (mb_copy == NULL)
return;
#ifdef MAC
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index 3484905..8a85124 100644
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -793,7 +793,7 @@ spd_done:
/* Clone packet if we're doing a 'tee' */
if ((off & IP_FW_PORT_TEE_FLAG) != 0)
- clone = m_dup(m, M_DONTWAIT);
+ clone = m_dup(m, M_NOWAIT);
/*
* XXX
@@ -1099,7 +1099,7 @@ smart_frag_failure:
m0 = m;
mhlen = sizeof (struct ip);
for (; off < (u_short)ip->ip_len; off += len) {
- MGETHDR(m, M_DONTWAIT, MT_HEADER);
+ MGETHDR(m, M_NOWAIT, MT_HEADER);
if (m == 0) {
error = ENOBUFS;
ipstat.ips_odropped++;
@@ -1265,7 +1265,7 @@ ip_insertoptions(m, opt, phlen)
if (p->ipopt_dst.s_addr)
ip->ip_dst = p->ipopt_dst;
if (m->m_flags & M_EXT || m->m_data - optlen < m->m_pktdat) {
- MGETHDR(n, M_DONTWAIT, MT_HEADER);
+ MGETHDR(n, M_NOWAIT, MT_HEADER);
if (n == 0) {
*phlen = 0;
return (m);
@@ -1370,7 +1370,7 @@ ip_ctloutput(so, sopt)
error = EMSGSIZE;
break;
}
- MGET(m, sopt->sopt_td ? M_TRYWAIT : M_DONTWAIT, MT_HEADER);
+ MGET(m, sopt->sopt_td ? 0 : M_NOWAIT, MT_HEADER);
if (m == 0) {
error = ENOBUFS;
break;
@@ -1764,7 +1764,7 @@ ip_setmoptions(sopt, imop)
* allocate one and initialize to default values.
*/
imo = (struct ip_moptions*)malloc(sizeof(*imo), M_IPMOPTS,
- M_WAITOK);
+ 0);
if (imo == NULL)
return (ENOBUFS);
diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c
index 3c37fc4..2b475fa 100644
--- a/sys/netinet/raw_ip.c
+++ b/sys/netinet/raw_ip.c
@@ -287,7 +287,7 @@ rip_output(m, so, dst)
m_freem(m);
return(EMSGSIZE);
}
- M_PREPEND(m, sizeof(struct ip), M_TRYWAIT);
+ M_PREPEND(m, sizeof(struct ip), 0);
ip = mtod(m, struct ip *);
ip->ip_tos = inp->inp_ip_tos;
ip->ip_off = 0;
@@ -698,7 +698,7 @@ rip_pcblist(SYSCTL_HANDLER_ARGS)
if (error)
return error;
- inp_list = malloc(n * sizeof *inp_list, M_TEMP, M_WAITOK);
+ inp_list = malloc(n * sizeof *inp_list, M_TEMP, 0);
if (inp_list == 0)
return ENOMEM;
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c
index 34b0d84..2e926d1 100644
--- a/sys/netinet/tcp_output.c
+++ b/sys/netinet/tcp_output.c
@@ -603,14 +603,14 @@ send:
m->m_len += hdrlen;
m->m_data -= hdrlen;
#else
- MGETHDR(m, M_DONTWAIT, MT_HEADER);
+ MGETHDR(m, M_NOWAIT, MT_HEADER);
if (m == NULL) {
error = ENOBUFS;
goto out;
}
#ifdef INET6
if (MHLEN < hdrlen + max_linkhdr) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
m_freem(m);
error = ENOBUFS;
@@ -651,7 +651,7 @@ send:
else
tcpstat.tcps_sndwinup++;
- MGETHDR(m, M_DONTWAIT, MT_HEADER);
+ MGETHDR(m, M_NOWAIT, MT_HEADER);
if (m == NULL) {
error = ENOBUFS;
goto out;
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
index 46e32d9..cb9682d 100644
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -332,7 +332,7 @@ tcp_maketemplate(tp)
struct mbuf *m;
struct tcptemp *n;
- m = m_get(M_DONTWAIT, MT_HEADER);
+ m = m_get(M_NOWAIT, MT_HEADER);
if (m == NULL)
return (0);
m->m_len = sizeof(struct tcptemp);
@@ -412,7 +412,7 @@ tcp_respond(tp, ipgen, th, m, ack, seq, flags)
}
}
if (m == 0) {
- m = m_gethdr(M_DONTWAIT, MT_HEADER);
+ m = m_gethdr(M_NOWAIT, MT_HEADER);
if (m == NULL)
return;
tlen = 0;
@@ -901,7 +901,7 @@ tcp_pcblist(SYSCTL_HANDLER_ARGS)
if (error)
return error;
- inp_list = malloc(n * sizeof *inp_list, M_TEMP, M_WAITOK);
+ inp_list = malloc(n * sizeof *inp_list, M_TEMP, 0);
if (inp_list == 0)
return ENOMEM;
@@ -1496,7 +1496,7 @@ ipsec_hdrsiz_tcp(tp)
if ((tp == NULL) || ((inp = tp->t_inpcb) == NULL))
return 0;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (!m)
return 0;
diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c
index 05660ec..798c379 100644
--- a/sys/netinet/tcp_syncache.c
+++ b/sys/netinet/tcp_syncache.c
@@ -247,7 +247,7 @@ syncache_init(void)
/* Allocate the hash table. */
MALLOC(tcp_syncache.hashbase, struct syncache_head *,
tcp_syncache.hashsize * sizeof(struct syncache_head),
- M_SYNCACHE, M_WAITOK);
+ M_SYNCACHE, 0);
/* Initialize the hash buckets. */
for (i = 0; i < tcp_syncache.hashsize; i++) {
@@ -1099,7 +1099,7 @@ syncache_respond(sc, m)
if (m)
m_freem(m);
- m = m_gethdr(M_DONTWAIT, MT_HEADER);
+ m = m_gethdr(M_NOWAIT, MT_HEADER);
if (m == NULL)
return (ENOBUFS);
m->m_data += max_linkhdr;
diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c
index 46e32d9..cb9682d 100644
--- a/sys/netinet/tcp_timewait.c
+++ b/sys/netinet/tcp_timewait.c
@@ -332,7 +332,7 @@ tcp_maketemplate(tp)
struct mbuf *m;
struct tcptemp *n;
- m = m_get(M_DONTWAIT, MT_HEADER);
+ m = m_get(M_NOWAIT, MT_HEADER);
if (m == NULL)
return (0);
m->m_len = sizeof(struct tcptemp);
@@ -412,7 +412,7 @@ tcp_respond(tp, ipgen, th, m, ack, seq, flags)
}
}
if (m == 0) {
- m = m_gethdr(M_DONTWAIT, MT_HEADER);
+ m = m_gethdr(M_NOWAIT, MT_HEADER);
if (m == NULL)
return;
tlen = 0;
@@ -901,7 +901,7 @@ tcp_pcblist(SYSCTL_HANDLER_ARGS)
if (error)
return error;
- inp_list = malloc(n * sizeof *inp_list, M_TEMP, M_WAITOK);
+ inp_list = malloc(n * sizeof *inp_list, M_TEMP, 0);
if (inp_list == 0)
return ENOMEM;
@@ -1496,7 +1496,7 @@ ipsec_hdrsiz_tcp(tp)
if ((tp == NULL) || ((inp = tp->t_inpcb) == NULL))
return 0;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (!m)
return 0;
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
index 437ee4e..4331770 100644
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -583,7 +583,7 @@ udp_pcblist(SYSCTL_HANDLER_ARGS)
if (error)
return error;
- inp_list = malloc(n * sizeof *inp_list, M_TEMP, M_WAITOK);
+ inp_list = malloc(n * sizeof *inp_list, M_TEMP, 0);
if (inp_list == 0)
return ENOMEM;
@@ -801,7 +801,7 @@ udp_output(inp, m, addr, control, td)
* Calculate data length and get a mbuf
* for UDP and IP headers.
*/
- M_PREPEND(m, sizeof(struct udpiphdr), M_DONTWAIT);
+ M_PREPEND(m, sizeof(struct udpiphdr), M_NOWAIT);
if (m == 0) {
error = ENOBUFS;
goto release;
diff --git a/sys/netinet6/ah_core.c b/sys/netinet6/ah_core.c
index cbb6206..4b7da31 100644
--- a/sys/netinet6/ah_core.c
+++ b/sys/netinet6/ah_core.c
@@ -1244,9 +1244,9 @@ again:
error = EMSGSIZE;
goto fail;
}
- MGET(n, M_DONTWAIT, MT_DATA);
+ MGET(n, M_NOWAIT, MT_DATA);
if (n && hlen > MLEN) {
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if ((n->m_flags & M_EXT) == 0) {
m_free(n);
n = NULL;
@@ -1359,9 +1359,9 @@ again:
error = EMSGSIZE;
goto fail;
}
- MGET(n, M_DONTWAIT, MT_DATA);
+ MGET(n, M_NOWAIT, MT_DATA);
if (n && totlen > MLEN) {
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if ((n->m_flags & M_EXT) == 0) {
m_free(n);
n = NULL;
@@ -1510,9 +1510,9 @@ ah6_calccksum(m, ahdat, len, algo, sav)
error = EMSGSIZE;
goto fail;
}
- MGET(n, M_DONTWAIT, MT_DATA);
+ MGET(n, M_NOWAIT, MT_DATA);
if (n && newoff - off > MLEN) {
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if ((n->m_flags & M_EXT) == 0) {
m_free(n);
n = NULL;
@@ -1545,9 +1545,9 @@ ah6_calccksum(m, ahdat, len, algo, sav)
error = EMSGSIZE;
goto fail;
}
- MGET(n, M_DONTWAIT, MT_DATA);
+ MGET(n, M_NOWAIT, MT_DATA);
if (n && newoff - off > MLEN) {
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if ((n->m_flags & M_EXT) == 0) {
m_free(n);
n = NULL;
diff --git a/sys/netinet6/ah_input.c b/sys/netinet6/ah_input.c
index 0afdfed..94cd673 100644
--- a/sys/netinet6/ah_input.c
+++ b/sys/netinet6/ah_input.c
@@ -494,7 +494,7 @@ ah4_input(m, off)
*/
struct mbuf *n;
- n = m_split(m, off, M_DONTWAIT);
+ n = m_split(m, off, M_NOWAIT);
if (n == NULL) {
/* m is retained by m_split */
goto fail;
@@ -901,7 +901,7 @@ ah6_input(mp, offp, proto)
*/
struct mbuf *n;
- n = m_split(m, off, M_DONTWAIT);
+ n = m_split(m, off, M_NOWAIT);
if (n == NULL) {
/* m is retained by m_split */
goto fail;
diff --git a/sys/netinet6/ah_output.c b/sys/netinet6/ah_output.c
index e850752..00104ce 100644
--- a/sys/netinet6/ah_output.c
+++ b/sys/netinet6/ah_output.c
@@ -211,7 +211,7 @@ ah4_output(m, isr)
panic("ah4_output: assumption failed (first mbuf length)");
if (M_LEADINGSPACE(m->m_next) < ahlen) {
struct mbuf *n;
- MGET(n, M_DONTWAIT, MT_DATA);
+ MGET(n, M_NOWAIT, MT_DATA);
if (!n) {
ipseclog((LOG_DEBUG, "ENOBUFS in ah4_output %d\n",
__LINE__));
@@ -390,13 +390,13 @@ ah6_output(m, nexthdrp, md, isr)
return EINVAL;
}
- MGET(mah, M_DONTWAIT, MT_DATA);
+ MGET(mah, M_NOWAIT, MT_DATA);
if (!mah) {
m_freem(m);
return ENOBUFS;
}
if (ahlen > MLEN) {
- MCLGET(mah, M_DONTWAIT);
+ MCLGET(mah, M_NOWAIT);
if ((mah->m_flags & M_EXT) == 0) {
m_free(mah);
m_freem(m);
diff --git a/sys/netinet6/esp_core.c b/sys/netinet6/esp_core.c
index db09b94..fe7d27b 100644
--- a/sys/netinet6/esp_core.c
+++ b/sys/netinet6/esp_core.c
@@ -760,10 +760,10 @@ esp_cbc_decrypt(m, off, sav, algo, ivlen)
if (!d || dn + blocklen > d->m_len) {
if (d)
dp = d;
- MGET(d, M_DONTWAIT, MT_DATA);
+ MGET(d, M_NOWAIT, MT_DATA);
i = m->m_pkthdr.len - (soff + sn);
if (d && i > MLEN) {
- MCLGET(d, M_DONTWAIT);
+ MCLGET(d, M_NOWAIT);
if ((d->m_flags & M_EXT) == 0) {
m_free(d);
d = NULL;
@@ -970,10 +970,10 @@ esp_cbc_encrypt(m, off, plen, sav, algo, ivlen)
if (!d || dn + blocklen > d->m_len) {
if (d)
dp = d;
- MGET(d, M_DONTWAIT, MT_DATA);
+ MGET(d, M_NOWAIT, MT_DATA);
i = m->m_pkthdr.len - (soff + sn);
if (d && i > MLEN) {
- MCLGET(d, M_DONTWAIT);
+ MCLGET(d, M_NOWAIT);
if ((d->m_flags & M_EXT) == 0) {
m_free(d);
d = NULL;
diff --git a/sys/netinet6/esp_input.c b/sys/netinet6/esp_input.c
index d8de60c..1584aa4 100644
--- a/sys/netinet6/esp_input.c
+++ b/sys/netinet6/esp_input.c
@@ -788,7 +788,7 @@ noreplaycheck:
*/
struct mbuf *n;
- n = m_split(m, off, M_DONTWAIT);
+ n = m_split(m, off, M_NOWAIT);
if (n == NULL) {
/* m is retained by m_split */
goto bad;
@@ -810,12 +810,12 @@ noreplaycheck:
struct mbuf *n = NULL;
int maxlen;
- MGETHDR(n, M_DONTWAIT, MT_HEADER);
+ MGETHDR(n, M_NOWAIT, MT_HEADER);
maxlen = MHLEN;
if (n)
M_MOVE_PKTHDR(n, m);
if (n && n->m_pkthdr.len > maxlen) {
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
maxlen = MCLBYTES;
if ((n->m_flags & M_EXT) == 0) {
m_free(n);
diff --git a/sys/netinet6/esp_output.c b/sys/netinet6/esp_output.c
index 3e89c5d..5a4932a 100644
--- a/sys/netinet6/esp_output.c
+++ b/sys/netinet6/esp_output.c
@@ -340,7 +340,7 @@ esp_output(m, nexthdrp, md, isr, af)
* after: IP ... ESP IV payload
*/
if (M_LEADINGSPACE(md) < esphlen || (md->m_flags & M_EXT) != 0) {
- MGET(n, M_DONTWAIT, MT_DATA);
+ MGET(n, M_NOWAIT, MT_DATA);
if (!n) {
m_freem(m);
error = ENOBUFS;
@@ -495,7 +495,7 @@ esp_output(m, nexthdrp, md, isr, af)
} else {
struct mbuf *nn;
- MGET(nn, M_DONTWAIT, MT_DATA);
+ MGET(nn, M_NOWAIT, MT_DATA);
if (!nn) {
ipseclog((LOG_DEBUG, "esp%d_output: can't alloc mbuf",
afnumber));
@@ -624,7 +624,7 @@ esp_output(m, nexthdrp, md, isr, af)
} else {
struct mbuf *nn;
- MGET(nn, M_DONTWAIT, MT_DATA);
+ MGET(nn, M_NOWAIT, MT_DATA);
if (!nn) {
ipseclog((LOG_DEBUG, "can't alloc mbuf in esp%d_output",
afnumber));
diff --git a/sys/netinet6/frag6.c b/sys/netinet6/frag6.c
index 515a9fb..c57709a 100644
--- a/sys/netinet6/frag6.c
+++ b/sys/netinet6/frag6.c
@@ -233,7 +233,7 @@ frag6_input(mp, offp, proto)
goto dropfrag;
frag6_nfragpackets++;
q6 = (struct ip6q *)malloc(sizeof(struct ip6q), M_FTABLE,
- M_DONTWAIT);
+ M_NOWAIT);
if (q6 == NULL)
goto dropfrag;
bzero(q6, sizeof(*q6));
@@ -325,7 +325,7 @@ frag6_input(mp, offp, proto)
}
ip6af = (struct ip6asfrag *)malloc(sizeof(struct ip6asfrag), M_FTABLE,
- M_DONTWAIT);
+ M_NOWAIT);
if (ip6af == NULL)
goto dropfrag;
bzero(ip6af, sizeof(*ip6af));
@@ -489,7 +489,7 @@ insert:
m->m_len -= sizeof(struct ip6_frag);
} else {
/* this comes with no copy if the boundary is on cluster */
- if ((t = m_split(m, offset, M_DONTWAIT)) == NULL) {
+ if ((t = m_split(m, offset, M_NOWAIT)) == NULL) {
frag6_remque(q6);
free(q6, M_FTABLE);
frag6_nfragpackets--;
diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c
index b2781a4..6a5884e 100644
--- a/sys/netinet6/icmp6.c
+++ b/sys/netinet6/icmp6.c
@@ -346,7 +346,7 @@ icmp6_error(m, type, code, param)
m_adj(m, ICMPV6_PLD_MAXLEN - m->m_pkthdr.len);
preplen = sizeof(struct ip6_hdr) + sizeof(struct icmp6_hdr);
- M_PREPEND(m, preplen, M_DONTWAIT);
+ M_PREPEND(m, preplen, M_NOWAIT);
if (m && m->m_len < preplen)
m = m_pullup(m, preplen);
if (m == NULL) {
@@ -562,9 +562,9 @@ icmp6_input(mp, offp, proto)
m_freem(n0);
break;
}
- MGETHDR(n, M_DONTWAIT, n0->m_type);
+ MGETHDR(n, M_NOWAIT, n0->m_type);
if (n && maxlen >= MHLEN) {
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if ((n->m_flags & M_EXT) == 0) {
m_free(n);
n = NULL;
@@ -623,7 +623,7 @@ icmp6_input(mp, offp, proto)
icmp6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_mldquery);
else
icmp6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_mldreport);
- if ((n = m_copym(m, 0, M_COPYALL, M_DONTWAIT)) == NULL) {
+ if ((n = m_copym(m, 0, M_COPYALL, M_NOWAIT)) == NULL) {
/* give up local */
mld6_input(m, off);
m = NULL;
@@ -684,15 +684,15 @@ icmp6_input(mp, offp, proto)
/* Give up remote */
break;
}
- MGETHDR(n, M_DONTWAIT, m->m_type);
+ MGETHDR(n, M_NOWAIT, m->m_type);
if (n && maxlen > MHLEN) {
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if ((n->m_flags & M_EXT) == 0) {
m_free(n);
n = NULL;
}
}
- if (!m_dup_pkthdr(n, m, M_DONTWAIT)) {
+ if (!m_dup_pkthdr(n, m, M_NOWAIT)) {
/*
* Previous code did a blind M_COPY_PKTHDR
* and said "just for rcvif". If true, then
@@ -748,7 +748,7 @@ icmp6_input(mp, offp, proto)
goto badcode;
if (icmp6len < sizeof(struct nd_router_solicit))
goto badlen;
- if ((n = m_copym(m, 0, M_COPYALL, M_DONTWAIT)) == NULL) {
+ if ((n = m_copym(m, 0, M_COPYALL, M_NOWAIT)) == NULL) {
/* give up local */
nd6_rs_input(m, off, icmp6len);
m = NULL;
@@ -764,7 +764,7 @@ icmp6_input(mp, offp, proto)
goto badcode;
if (icmp6len < sizeof(struct nd_router_advert))
goto badlen;
- if ((n = m_copym(m, 0, M_COPYALL, M_DONTWAIT)) == NULL) {
+ if ((n = m_copym(m, 0, M_COPYALL, M_NOWAIT)) == NULL) {
/* give up local */
nd6_ra_input(m, off, icmp6len);
m = NULL;
@@ -780,7 +780,7 @@ icmp6_input(mp, offp, proto)
goto badcode;
if (icmp6len < sizeof(struct nd_neighbor_solicit))
goto badlen;
- if ((n = m_copym(m, 0, M_COPYALL, M_DONTWAIT)) == NULL) {
+ if ((n = m_copym(m, 0, M_COPYALL, M_NOWAIT)) == NULL) {
/* give up local */
nd6_ns_input(m, off, icmp6len);
m = NULL;
@@ -796,7 +796,7 @@ icmp6_input(mp, offp, proto)
goto badcode;
if (icmp6len < sizeof(struct nd_neighbor_advert))
goto badlen;
- if ((n = m_copym(m, 0, M_COPYALL, M_DONTWAIT)) == NULL) {
+ if ((n = m_copym(m, 0, M_COPYALL, M_NOWAIT)) == NULL) {
/* give up local */
nd6_na_input(m, off, icmp6len);
m = NULL;
@@ -812,7 +812,7 @@ icmp6_input(mp, offp, proto)
goto badcode;
if (icmp6len < sizeof(struct nd_redirect))
goto badlen;
- if ((n = m_copym(m, 0, M_COPYALL, M_DONTWAIT)) == NULL) {
+ if ((n = m_copym(m, 0, M_COPYALL, M_NOWAIT)) == NULL) {
/* give up local */
icmp6_redirect_input(m, off);
m = NULL;
@@ -1394,7 +1394,7 @@ ni6_input(m, off)
}
/* allocate an mbuf to reply. */
- MGETHDR(n, M_DONTWAIT, m->m_type);
+ MGETHDR(n, M_NOWAIT, m->m_type);
if (n == NULL) {
m_freem(m);
return(NULL);
@@ -1408,7 +1408,7 @@ ni6_input(m, off)
*/
goto bad;
}
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if ((n->m_flags & M_EXT) == 0) {
goto bad;
}
@@ -1507,9 +1507,9 @@ ni6_nametodns(name, namelen, old)
len = MCLBYTES;
/* because MAXHOSTNAMELEN is usually 256, we use cluster mbuf */
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (m && len > MLEN) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0)
goto fail;
}
@@ -2477,9 +2477,9 @@ icmp6_redirect_output(m0, rt)
#if IPV6_MMTU >= MCLBYTES
# error assumption failed about IPV6_MMTU and MCLBYTES
#endif
- MGETHDR(m, M_DONTWAIT, MT_HEADER);
+ MGETHDR(m, M_NOWAIT, MT_HEADER);
if (m && IPV6_MMTU >= MHLEN)
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if (!m)
goto fail;
m->m_pkthdr.rcvif = NULL;
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c
index 945ab65..8b43845 100644
--- a/sys/netinet6/in6.c
+++ b/sys/netinet6/in6.c
@@ -1676,7 +1676,7 @@ in6_addmulti(maddr6, ifp, errorp)
if (ifma->ifma_protospec != 0)
return ifma->ifma_protospec;
- /* XXX - if_addmulti uses M_WAITOK. Can this really be called
+ /* XXX - if_addmulti does not use M_NOWAIT. Can this really be called
at interrupt time? If so, need to fix if_addmulti. XXX */
in6m = (struct in6_multi *)malloc(sizeof(*in6m), M_IPMADDR, M_NOWAIT);
if (in6m == NULL) {
@@ -2447,7 +2447,7 @@ in6_sin_2_v4mapsin6_in_sock(struct sockaddr **nam)
struct sockaddr_in6 *sin6_p;
MALLOC(sin6_p, struct sockaddr_in6 *, sizeof *sin6_p, M_SONAME,
- M_WAITOK);
+ 0);
sin_p = (struct sockaddr_in *)*nam;
in6_sin_2_v4mapsin6(sin_p, sin6_p);
FREE(*nam, M_SONAME);
diff --git a/sys/netinet6/in6_gif.c b/sys/netinet6/in6_gif.c
index b560075..7376d85 100644
--- a/sys/netinet6/in6_gif.c
+++ b/sys/netinet6/in6_gif.c
@@ -145,7 +145,7 @@ in6_gif_output(ifp, family, m)
}
/* prepend new IP header */
- M_PREPEND(m, sizeof(struct ip6_hdr), M_DONTWAIT);
+ M_PREPEND(m, sizeof(struct ip6_hdr), M_NOWAIT);
if (m && m->m_len < sizeof(struct ip6_hdr))
m = m_pullup(m, sizeof(struct ip6_hdr));
if (m == NULL) {
diff --git a/sys/netinet6/in6_ifattach.c b/sys/netinet6/in6_ifattach.c
index 5abcca1..e92fa79 100644
--- a/sys/netinet6/in6_ifattach.c
+++ b/sys/netinet6/in6_ifattach.c
@@ -774,7 +774,7 @@ in6_ifattach(ifp, altifp)
/* grow in6_ifstat */
n = if_indexlim * sizeof(struct in6_ifstat *);
- q = (caddr_t)malloc(n, M_IFADDR, M_WAITOK);
+ q = (caddr_t)malloc(n, M_IFADDR, 0);
bzero(q, n);
if (in6_ifstat) {
bcopy((caddr_t)in6_ifstat, q,
@@ -786,7 +786,7 @@ in6_ifattach(ifp, altifp)
/* grow icmp6_ifstat */
n = if_indexlim * sizeof(struct icmp6_ifstat *);
- q = (caddr_t)malloc(n, M_IFADDR, M_WAITOK);
+ q = (caddr_t)malloc(n, M_IFADDR, 0);
bzero(q, n);
if (icmp6_ifstat) {
bcopy((caddr_t)icmp6_ifstat, q,
@@ -864,12 +864,12 @@ statinit:
if (in6_ifstat[ifp->if_index] == NULL) {
in6_ifstat[ifp->if_index] = (struct in6_ifstat *)
- malloc(sizeof(struct in6_ifstat), M_IFADDR, M_WAITOK);
+ malloc(sizeof(struct in6_ifstat), M_IFADDR, 0);
bzero(in6_ifstat[ifp->if_index], sizeof(struct in6_ifstat));
}
if (icmp6_ifstat[ifp->if_index] == NULL) {
icmp6_ifstat[ifp->if_index] = (struct icmp6_ifstat *)
- malloc(sizeof(struct icmp6_ifstat), M_IFADDR, M_WAITOK);
+ malloc(sizeof(struct icmp6_ifstat), M_IFADDR, 0);
bzero(icmp6_ifstat[ifp->if_index], sizeof(struct icmp6_ifstat));
}
diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c
index 963cd9a..4a5de69 100644
--- a/sys/netinet6/in6_pcb.c
+++ b/sys/netinet6/in6_pcb.c
@@ -640,7 +640,7 @@ in6_sockaddr(port, addr_p)
{
struct sockaddr_in6 *sin6;
- MALLOC(sin6, struct sockaddr_in6 *, sizeof *sin6, M_SONAME, M_WAITOK);
+ MALLOC(sin6, struct sockaddr_in6 *, sizeof *sin6, M_SONAME, 0);
bzero(sin6, sizeof *sin6);
sin6->sin6_family = AF_INET6;
sin6->sin6_len = sizeof(*sin6);
@@ -671,7 +671,7 @@ in6_v4mapsin6_sockaddr(port, addr_p)
sin.sin_addr = *addr_p;
MALLOC(sin6_p, struct sockaddr_in6 *, sizeof *sin6_p, M_SONAME,
- M_WAITOK);
+ 0);
in6_sin_2_v4mapsin6(&sin, sin6_p);
return (struct sockaddr *)sin6_p;
diff --git a/sys/netinet6/ip6_fw.c b/sys/netinet6/ip6_fw.c
index 0ef2c52..b1eb2ff 100644
--- a/sys/netinet6/ip6_fw.c
+++ b/sys/netinet6/ip6_fw.c
@@ -1109,11 +1109,11 @@ ip6_fw_ctl(int stage, struct mbuf **mm)
if (stage == IPV6_FW_GET) {
struct ip6_fw_chain *fcp = ip6_fw_chain.lh_first;
- *mm = m = m_get(M_TRYWAIT, MT_DATA); /* XXX */
+ *mm = m = m_get(0, MT_DATA); /* XXX */
if (!m)
return(ENOBUFS);
if (sizeof *(fcp->rule) > MLEN) {
- MCLGET(m, M_TRYWAIT);
+ MCLGET(m, 0);
if ((m->m_flags & M_EXT) == 0) {
m_free(m);
return(ENOBUFS);
@@ -1122,14 +1122,14 @@ ip6_fw_ctl(int stage, struct mbuf **mm)
for (; fcp; fcp = fcp->chain.le_next) {
bcopy(fcp->rule, m->m_data, sizeof *(fcp->rule));
m->m_len = sizeof *(fcp->rule);
- m->m_next = m_get(M_TRYWAIT, MT_DATA); /* XXX */
+ m->m_next = m_get(0, MT_DATA); /* XXX */
if (!m->m_next) {
m_freem(*mm);
return(ENOBUFS);
}
m = m->m_next;
if (sizeof *(fcp->rule) > MLEN) {
- MCLGET(m, M_TRYWAIT);
+ MCLGET(m, 0);
if ((m->m_flags & M_EXT) == 0) {
m_freem(*mm);
return(ENOBUFS);
diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c
index 1f37bae..01b9236 100644
--- a/sys/netinet6/ip6_input.c
+++ b/sys/netinet6/ip6_input.c
@@ -317,11 +317,11 @@ ip6_input(m)
if (m && m->m_next != NULL && m->m_pkthdr.len < MCLBYTES) {
struct mbuf *n;
- MGETHDR(n, M_DONTWAIT, MT_HEADER);
+ MGETHDR(n, M_NOWAIT, MT_HEADER);
if (n)
M_MOVE_PKTHDR(n, m);
if (n && n->m_pkthdr.len > MHLEN) {
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if ((n->m_flags & M_EXT) == 0) {
m_freem(n);
n = NULL;
@@ -1433,9 +1433,9 @@ ip6_pullexthdr(m, off, nxt)
else
elen = (ip6e.ip6e_len + 1) << 3;
- MGET(n, M_DONTWAIT, MT_DATA);
+ MGET(n, M_NOWAIT, MT_DATA);
if (n && elen >= MLEN) {
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if ((n->m_flags & M_EXT) == 0) {
m_free(n);
n = NULL;
@@ -1623,7 +1623,7 @@ ip6_addaux(m)
if (!tag) {
tag = m_tag_get(PACKET_TAG_IPV6_INPUT,
sizeof (struct ip6aux),
- M_DONTWAIT);
+ M_NOWAIT);
if (tag)
m_tag_prepend(m, tag);
}
diff --git a/sys/netinet6/ip6_mroute.c b/sys/netinet6/ip6_mroute.c
index f1257d3..2084065 100644
--- a/sys/netinet6/ip6_mroute.c
+++ b/sys/netinet6/ip6_mroute.c
@@ -1531,7 +1531,7 @@ register_send(ip6, mif, m)
++pim6stat.pim6s_snd_registers;
/* Make a copy of the packet to send to the user level process */
- MGETHDR(mm, M_DONTWAIT, MT_HEADER);
+ MGETHDR(mm, M_NOWAIT, MT_HEADER);
if (mm == NULL)
return ENOBUFS;
mm->m_pkthdr.rcvif = NULL;
diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c
index 64b11aa..b4f56a6 100644
--- a/sys/netinet6/ip6_output.c
+++ b/sys/netinet6/ip6_output.c
@@ -1040,7 +1040,7 @@ skip_ipsec2:;
*/
m0 = m;
for (off = hlen; off < tlen; off += len) {
- MGETHDR(m, M_DONTWAIT, MT_HEADER);
+ MGETHDR(m, M_NOWAIT, MT_HEADER);
if (!m) {
error = ENOBUFS;
ip6stat.ip6s_odropped++;
@@ -1153,12 +1153,12 @@ ip6_copyexthdr(mp, hdr, hlen)
if (hlen > MCLBYTES)
return(ENOBUFS); /* XXX */
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (!m)
return(ENOBUFS);
if (hlen > MLEN) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
m_free(m);
return(ENOBUFS);
@@ -1193,7 +1193,7 @@ ip6_insert_jumboopt(exthdrs, plen)
* Otherwise, use it to store the options.
*/
if (exthdrs->ip6e_hbh == 0) {
- MGET(mopt, M_DONTWAIT, MT_DATA);
+ MGET(mopt, M_NOWAIT, MT_DATA);
if (mopt == 0)
return(ENOBUFS);
mopt->m_len = JUMBOOPTLEN;
@@ -1225,9 +1225,9 @@ ip6_insert_jumboopt(exthdrs, plen)
* As a consequence, we must always prepare a cluster
* at this point.
*/
- MGET(n, M_DONTWAIT, MT_DATA);
+ MGET(n, M_NOWAIT, MT_DATA);
if (n) {
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if ((n->m_flags & M_EXT) == 0) {
m_freem(n);
n = NULL;
@@ -1282,7 +1282,7 @@ ip6_insertfraghdr(m0, m, hlen, frghdrp)
if (hlen > sizeof(struct ip6_hdr)) {
n = m_copym(m0, sizeof(struct ip6_hdr),
- hlen - sizeof(struct ip6_hdr), M_DONTWAIT);
+ hlen - sizeof(struct ip6_hdr), M_NOWAIT);
if (n == 0)
return(ENOBUFS);
m->m_next = n;
@@ -1304,7 +1304,7 @@ ip6_insertfraghdr(m0, m, hlen, frghdrp)
/* allocate a new mbuf for the fragment header */
struct mbuf *mfrg;
- MGET(mfrg, M_DONTWAIT, MT_DATA);
+ MGET(mfrg, M_NOWAIT, MT_DATA);
if (mfrg == 0)
return(ENOBUFS);
mfrg->m_len = sizeof(struct ip6_frag);
@@ -1496,7 +1496,7 @@ do { \
break;
}
/* XXX */
- MGET(m, sopt->sopt_td ? M_TRYWAIT : M_DONTWAIT, MT_HEADER);
+ MGET(m, sopt->sopt_td ? 0 : M_NOWAIT, MT_HEADER);
if (m == 0) {
error = ENOBUFS;
break;
@@ -1595,7 +1595,7 @@ do { \
if (in6p->in6p_options) {
struct mbuf *m;
m = m_copym(in6p->in6p_options,
- 0, M_COPYALL, M_TRYWAIT);
+ 0, M_COPYALL, 0);
error = soopt_mcopyout(sopt, m);
if (error == 0)
m_freem(m);
@@ -1776,7 +1776,7 @@ ip6_pcbopts(pktopt, m, so, sopt)
#endif
ip6_clearpktopts(opt, 1, -1);
} else
- opt = malloc(sizeof(*opt), M_IP6OPT, M_WAITOK);
+ opt = malloc(sizeof(*opt), M_IP6OPT, 0);
*pktopt = NULL;
if (!m || m->m_len == 0) {
@@ -1959,7 +1959,7 @@ ip6_setmoptions(optname, im6op, m)
* allocate one and initialize to default values.
*/
im6o = (struct ip6_moptions *)
- malloc(sizeof(*im6o), M_IPMOPTS, M_WAITOK);
+ malloc(sizeof(*im6o), M_IPMOPTS, 0);
if (im6o == NULL)
return(ENOBUFS);
@@ -2129,7 +2129,7 @@ ip6_setmoptions(optname, im6op, m)
* Everything looks good; add a new record to the multicast
* address list for the given interface.
*/
- imm = malloc(sizeof(*imm), M_IPMADDR, M_WAITOK);
+ imm = malloc(sizeof(*imm), M_IPMADDR, 0);
if (imm == NULL) {
error = ENOBUFS;
break;
@@ -2234,7 +2234,7 @@ ip6_getmoptions(optname, im6o, mp)
{
u_int *hlim, *loop, *ifindex;
- *mp = m_get(M_TRYWAIT, MT_HEADER); /* XXX */
+ *mp = m_get(0, MT_HEADER); /* XXX */
switch (optname) {
@@ -2333,7 +2333,7 @@ ip6_setpktoptions(control, opt, priv, needcopy)
/* XXX: Is it really WAITOK? */
opt->ip6po_pktinfo =
malloc(sizeof(struct in6_pktinfo),
- M_IP6OPT, M_WAITOK);
+ M_IP6OPT, 0);
bcopy(CMSG_DATA(cm), opt->ip6po_pktinfo,
sizeof(struct in6_pktinfo));
} else
@@ -2392,7 +2392,7 @@ ip6_setpktoptions(control, opt, priv, needcopy)
if (needcopy) {
opt->ip6po_nexthop =
malloc(*CMSG_DATA(cm),
- M_IP6OPT, M_WAITOK);
+ M_IP6OPT, 0);
bcopy(CMSG_DATA(cm),
opt->ip6po_nexthop,
*CMSG_DATA(cm));
@@ -2415,7 +2415,7 @@ ip6_setpktoptions(control, opt, priv, needcopy)
if (needcopy) {
opt->ip6po_hbh =
- malloc(hbhlen, M_IP6OPT, M_WAITOK);
+ malloc(hbhlen, M_IP6OPT, 0);
bcopy(hbh, opt->ip6po_hbh, hbhlen);
} else
opt->ip6po_hbh = hbh;
@@ -2453,7 +2453,7 @@ ip6_setpktoptions(control, opt, priv, needcopy)
newdest = &opt->ip6po_dest2;
if (needcopy) {
- *newdest = malloc(destlen, M_IP6OPT, M_WAITOK);
+ *newdest = malloc(destlen, M_IP6OPT, 0);
bcopy(dest, *newdest, destlen);
} else
*newdest = dest;
@@ -2490,7 +2490,7 @@ ip6_setpktoptions(control, opt, priv, needcopy)
if (needcopy) {
opt->ip6po_rthdr = malloc(rthlen, M_IP6OPT,
- M_WAITOK);
+ 0);
bcopy(rth, opt->ip6po_rthdr, rthlen);
} else
opt->ip6po_rthdr = rth;
@@ -2570,7 +2570,7 @@ ip6_splithdr(m, exthdrs)
ip6 = mtod(m, struct ip6_hdr *);
if (m->m_len > sizeof(*ip6)) {
- MGETHDR(mh, M_DONTWAIT, MT_HEADER);
+ MGETHDR(mh, M_NOWAIT, MT_HEADER);
if (mh == 0) {
m_freem(m);
return ENOBUFS;
diff --git a/sys/netinet6/ipcomp_core.c b/sys/netinet6/ipcomp_core.c
index a6cdea5..e47779a 100644
--- a/sys/netinet6/ipcomp_core.c
+++ b/sys/netinet6/ipcomp_core.c
@@ -146,9 +146,9 @@ do { \
} \
\
/* get a fresh reply buffer */ \
- MGET(n, M_DONTWAIT, MT_DATA); \
+ MGET(n, M_NOWAIT, MT_DATA); \
if (n) { \
- MCLGET(n, M_DONTWAIT); \
+ MCLGET(n, M_NOWAIT); \
} \
if (!n) { \
error = ENOBUFS; \
diff --git a/sys/netinet6/ipcomp_output.c b/sys/netinet6/ipcomp_output.c
index 71e5755..17da454 100644
--- a/sys/netinet6/ipcomp_output.c
+++ b/sys/netinet6/ipcomp_output.c
@@ -171,12 +171,12 @@ ipcomp_output(m, nexthdrp, md, isr, af)
* compromise two m_copym(). we will be going through every byte of
* the payload during compression process anyways.
*/
- mcopy = m_copym(m, 0, M_COPYALL, M_DONTWAIT);
+ mcopy = m_copym(m, 0, M_COPYALL, M_NOWAIT);
if (mcopy == NULL) {
error = ENOBUFS;
return 0;
}
- md0 = m_copym(md, 0, M_COPYALL, M_DONTWAIT);
+ md0 = m_copym(md, 0, M_COPYALL, M_NOWAIT);
if (md0 == NULL) {
m_freem(mcopy);
error = ENOBUFS;
@@ -279,7 +279,7 @@ ipcomp_output(m, nexthdrp, md, isr, af)
* after: IP ... ipcomp payload
*/
if (M_LEADINGSPACE(md) < complen) {
- MGET(n, M_DONTWAIT, MT_DATA);
+ MGET(n, M_NOWAIT, MT_DATA);
if (!n) {
m_freem(m);
error = ENOBUFS;
diff --git a/sys/netinet6/ipsec.c b/sys/netinet6/ipsec.c
index f898c0a..4f795fe 100644
--- a/sys/netinet6/ipsec.c
+++ b/sys/netinet6/ipsec.c
@@ -2006,7 +2006,7 @@ ipsec4_encapsulate(m, sav)
*/
if (M_LEADINGSPACE(m->m_next) < hlen) {
struct mbuf *n;
- MGET(n, M_DONTWAIT, MT_DATA);
+ MGET(n, M_NOWAIT, MT_DATA);
if (!n) {
m_freem(m);
return ENOBUFS;
@@ -2105,7 +2105,7 @@ ipsec6_encapsulate(m, sav)
panic("ipsec6_encapsulate: assumption failed (first mbuf length)");
if (M_LEADINGSPACE(m->m_next) < sizeof(struct ip6_hdr)) {
struct mbuf *n;
- MGET(n, M_DONTWAIT, MT_DATA);
+ MGET(n, M_NOWAIT, MT_DATA);
if (!n) {
m_freem(m);
return ENOBUFS;
@@ -3119,7 +3119,7 @@ ipsec4_splithdr(m)
hlen = ip->ip_hl << 2;
#endif
if (m->m_len > hlen) {
- MGETHDR(mh, M_DONTWAIT, MT_HEADER);
+ MGETHDR(mh, M_NOWAIT, MT_HEADER);
if (!mh) {
m_freem(m);
return NULL;
@@ -3155,7 +3155,7 @@ ipsec6_splithdr(m)
ip6 = mtod(m, struct ip6_hdr *);
hlen = sizeof(struct ip6_hdr);
if (m->m_len > hlen) {
- MGETHDR(mh, M_DONTWAIT, MT_HEADER);
+ MGETHDR(mh, M_NOWAIT, MT_HEADER);
if (!mh) {
m_freem(m);
return NULL;
@@ -3366,16 +3366,16 @@ ipsec_copypkt(m)
struct mbuf *mm;
if (n->m_flags & M_PKTHDR) {
- MGETHDR(mnew, M_DONTWAIT, MT_HEADER);
+ MGETHDR(mnew, M_NOWAIT, MT_HEADER);
if (mnew == NULL)
goto fail;
- if (!m_dup_pkthdr(mnew, n, M_DONTWAIT)) {
+ if (!m_dup_pkthdr(mnew, n, M_NOWAIT)) {
m_free(mnew);
goto fail;
}
}
else {
- MGET(mnew, M_DONTWAIT, MT_DATA);
+ MGET(mnew, M_NOWAIT, MT_DATA);
if (mnew == NULL)
goto fail;
}
@@ -3399,7 +3399,7 @@ ipsec_copypkt(m)
if (remain <= (mm->m_flags & M_PKTHDR ? MHLEN : MLEN))
len = remain;
else { /* allocate a cluster */
- MCLGET(mm, M_DONTWAIT);
+ MCLGET(mm, M_NOWAIT);
if (!(mm->m_flags & M_EXT)) {
m_free(mm);
goto fail;
@@ -3419,7 +3419,7 @@ ipsec_copypkt(m)
break;
/* need another mbuf */
- MGETHDR(mn, M_DONTWAIT, MT_HEADER);
+ MGETHDR(mn, M_NOWAIT, MT_HEADER);
if (mn == NULL)
goto fail;
mn->m_pkthdr.rcvif = NULL;
diff --git a/sys/netinet6/mld6.c b/sys/netinet6/mld6.c
index 61c0e0c..fce6e1b 100644
--- a/sys/netinet6/mld6.c
+++ b/sys/netinet6/mld6.c
@@ -400,10 +400,10 @@ mld6_sendpkt(in6m, type, dst)
* We allocate 2 mbufs and make chain in advance because
* it is more convenient when inserting the hop-by-hop option later.
*/
- MGETHDR(mh, M_DONTWAIT, MT_HEADER);
+ MGETHDR(mh, M_NOWAIT, MT_HEADER);
if (mh == NULL)
return;
- MGET(md, M_DONTWAIT, MT_DATA);
+ MGET(md, M_NOWAIT, MT_DATA);
if (md == NULL) {
m_free(mh);
return;
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c
index 33913d4..df3fdb9 100644
--- a/sys/netinet6/nd6.c
+++ b/sys/netinet6/nd6.c
@@ -164,7 +164,7 @@ nd6_ifattach(ifp)
/* grow nd_ifinfo */
n = nd_ifinfo_indexlim * sizeof(struct nd_ifinfo);
- q = (caddr_t)malloc(n, M_IP6NDP, M_WAITOK);
+ q = (caddr_t)malloc(n, M_IP6NDP, 0);
bzero(q, n);
if (nd_ifinfo) {
bcopy((caddr_t)nd_ifinfo, q, n/2);
diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c
index 16bfbb4..4bf1820 100644
--- a/sys/netinet6/nd6_nbr.c
+++ b/sys/netinet6/nd6_nbr.c
@@ -362,9 +362,9 @@ nd6_ns_output(ifp, daddr6, taddr6, ln, dad)
return;
}
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m && max_linkhdr + maxlen >= MHLEN) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
m_free(m);
m = NULL;
@@ -847,9 +847,9 @@ nd6_na_output(ifp, daddr6, taddr6, flags, tlladdr, sdl0)
return;
}
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m && max_linkhdr + maxlen >= MHLEN) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
m_free(m);
m = NULL;
diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c
index 540533b..abb7358 100644
--- a/sys/netinet6/raw_ip6.c
+++ b/sys/netinet6/raw_ip6.c
@@ -372,7 +372,7 @@ rip6_output(m, va_alist)
code = icmp6->icmp6_code;
}
- M_PREPEND(m, sizeof(*ip6), M_TRYWAIT);
+ M_PREPEND(m, sizeof(*ip6), 0);
ip6 = mtod(m, struct ip6_hdr *);
/*
diff --git a/sys/netinet6/scope6.c b/sys/netinet6/scope6.c
index 0c32da8..10637e3 100644
--- a/sys/netinet6/scope6.c
+++ b/sys/netinet6/scope6.c
@@ -75,7 +75,7 @@ scope6_ifattach(ifp)
/* grow scope index array */
n = if_indexlim * sizeof(struct scope6_id);
/* XXX: need new malloc type? */
- q = (caddr_t)malloc(n, M_IFADDR, M_WAITOK);
+ q = (caddr_t)malloc(n, M_IFADDR, 0);
bzero(q, n);
if (scope6_ids) {
bcopy((caddr_t)scope6_ids, q, n/2);
diff --git a/sys/netinet6/udp6_output.c b/sys/netinet6/udp6_output.c
index 1de45f0..659eb0d 100644
--- a/sys/netinet6/udp6_output.c
+++ b/sys/netinet6/udp6_output.c
@@ -248,7 +248,7 @@ udp6_output(in6p, m, addr6, control, td)
* Calculate data length and get a mbuf
* for UDP and IP6 headers.
*/
- M_PREPEND(m, hlen + sizeof(struct udphdr), M_DONTWAIT);
+ M_PREPEND(m, hlen + sizeof(struct udphdr), M_NOWAIT);
if (m == 0) {
error = ENOBUFS;
goto release;
diff --git a/sys/netipsec/ipsec_mbuf.c b/sys/netipsec/ipsec_mbuf.c
index 7fa291b..089a4b4 100644
--- a/sys/netipsec/ipsec_mbuf.c
+++ b/sys/netipsec/ipsec_mbuf.c
@@ -105,20 +105,20 @@ m_clone(struct mbuf *m0)
* because M_MOVE_PKTHDR will smash the data
* pointer and drop the M_EXT marker.
*/
- MGETHDR(n, M_DONTWAIT, m->m_type);
+ MGETHDR(n, M_NOWAIT, m->m_type);
if (n == NULL) {
m_freem(m0);
return (NULL);
}
M_MOVE_PKTHDR(n, m);
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if ((n->m_flags & M_EXT) == 0) {
m_free(n);
m_freem(m0);
return (NULL);
}
} else {
- n = m_getcl(M_DONTWAIT, m->m_type, m->m_flags);
+ n = m_getcl(M_NOWAIT, m->m_type, m->m_flags);
if (n == NULL) {
m_freem(m0);
return (NULL);
@@ -150,7 +150,7 @@ m_clone(struct mbuf *m0)
break;
off += cc;
- n = m_getcl(M_DONTWAIT, m->m_type, m->m_flags);
+ n = m_getcl(M_NOWAIT, m->m_type, m->m_flags);
if (n == NULL) {
m_freem(mfirst);
m_freem(m0);
@@ -210,7 +210,7 @@ m_makespace(struct mbuf *m0, int skip, int hlen, int *off)
*
* NB: this ignores mbuf types.
*/
- MGET(n, M_DONTWAIT, MT_DATA);
+ MGET(n, M_NOWAIT, MT_DATA);
if (n == NULL)
return (NULL);
n->m_next = m->m_next; /* splice new mbuf */
@@ -238,7 +238,7 @@ m_makespace(struct mbuf *m0, int skip, int hlen, int *off)
if (remain + hlen > M_TRAILINGSPACE(n)) {
struct mbuf *n2;
- MGET(n2, M_DONTWAIT, MT_DATA);
+ MGET(n2, M_NOWAIT, MT_DATA);
/* NB: new mbuf is on chain, let caller free */
if (n2 == NULL)
return (NULL);
@@ -328,7 +328,7 @@ KASSERT(m0->m_next != NULL, ("m_pad: m0 null, len %u m_len %u", len, m0->m_len))
if (pad > M_TRAILINGSPACE(m0)) {
/* Add an mbuf to the chain. */
- MGET(m1, M_DONTWAIT, MT_DATA);
+ MGET(m1, M_NOWAIT, MT_DATA);
if (m1 == 0) {
m_freem(m0);
DPRINTF(("m_pad: unable to get extra mbuf\n"));
diff --git a/sys/netipsec/ipsec_output.c b/sys/netipsec/ipsec_output.c
index 3748747..aa53f9c 100644
--- a/sys/netipsec/ipsec_output.c
+++ b/sys/netipsec/ipsec_output.c
@@ -469,7 +469,7 @@ ipsec6_splithdr(struct mbuf *m)
ip6 = mtod(m, struct ip6_hdr *);
hlen = sizeof(struct ip6_hdr);
if (m->m_len > hlen) {
- MGETHDR(mh, M_DONTWAIT, MT_HEADER);
+ MGETHDR(mh, M_NOWAIT, MT_HEADER);
if (!mh) {
m_freem(m);
return NULL;
@@ -580,7 +580,7 @@ ipsec6_encapsulate(struct mbuf *m, struct secasvar *sav)
plen = m->m_pkthdr.len;
if (M_LEADINGSPACE(m->m_next) < sizeof(struct ip6_hdr)) {
struct mbuf *n;
- MGET(n, M_DONTWAIT, MT_DATA);
+ MGET(n, M_NOWAIT, MT_DATA);
if (!n) {
m_freem(m);
return ENOBUFS;
diff --git a/sys/netipsec/key.c b/sys/netipsec/key.c
index ff6bae1..85e7f91 100644
--- a/sys/netipsec/key.c
+++ b/sys/netipsec/key.c
@@ -1627,7 +1627,7 @@ key_gather_mbuf(m, mhp, ndeep, nitem, va_alist)
if (len > MHLEN)
panic("assumption failed");
#endif
- MGETHDR(n, M_DONTWAIT, MT_DATA);
+ MGETHDR(n, M_NOWAIT, MT_DATA);
if (!n)
goto fail;
n->m_len = len;
@@ -1646,7 +1646,7 @@ key_gather_mbuf(m, mhp, ndeep, nitem, va_alist)
mtod(n, caddr_t));
} else {
n = m_copym(m, mhp->extoff[idx], mhp->extlen[idx],
- M_DONTWAIT);
+ M_NOWAIT);
}
if (n == NULL)
goto fail;
@@ -2079,9 +2079,9 @@ key_spddelete2(so, m, mhp)
if (len > MCLBYTES)
return key_senderror(so, m, ENOBUFS);
- MGETHDR(n, M_DONTWAIT, MT_DATA);
+ MGETHDR(n, M_NOWAIT, MT_DATA);
if (n && len > MHLEN) {
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if ((n->m_flags & M_EXT) == 0) {
m_freem(n);
n = NULL;
@@ -2103,7 +2103,7 @@ key_spddelete2(so, m, mhp)
#endif
n->m_next = m_copym(m, mhp->extoff[SADB_X_EXT_POLICY],
- mhp->extlen[SADB_X_EXT_POLICY], M_DONTWAIT);
+ mhp->extlen[SADB_X_EXT_POLICY], M_NOWAIT);
if (!n->m_next) {
m_freem(n);
return key_senderror(so, m, ENOBUFS);
@@ -3329,7 +3329,7 @@ key_setdumpsa(sav, type, satype, seq, pid)
if ((!m && !p) || (m && p))
goto fail;
if (p && tres) {
- M_PREPEND(tres, l, M_DONTWAIT);
+ M_PREPEND(tres, l, M_NOWAIT);
if (!tres)
goto fail;
bcopy(p, mtod(tres, caddr_t), l);
@@ -3388,9 +3388,9 @@ key_setsadbmsg(type, tlen, satype, seq, pid, reserved)
len = PFKEY_ALIGN8(sizeof(struct sadb_msg));
if (len > MCLBYTES)
return NULL;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m && len > MHLEN) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
m_freem(m);
m = NULL;
@@ -4499,9 +4499,9 @@ key_getspi(so, m, mhp)
if (len > MCLBYTES)
return key_senderror(so, m, ENOBUFS);
- MGETHDR(n, M_DONTWAIT, MT_DATA);
+ MGETHDR(n, M_NOWAIT, MT_DATA);
if (len > MHLEN) {
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if ((n->m_flags & M_EXT) == 0) {
m_freem(n);
n = NULL;
@@ -5388,7 +5388,7 @@ key_getcomb_esp()
KASSERT(l <= MLEN,
("key_getcomb_esp: l=%u > MLEN=%lu",
l, (u_long) MLEN));
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (m) {
M_ALIGN(m, l);
m->m_len = l;
@@ -5490,14 +5490,14 @@ key_getcomb_ah()
KASSERT(l <= MLEN,
("key_getcomb_ah: l=%u > MLEN=%lu",
l, (u_long) MLEN));
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (m) {
M_ALIGN(m, l);
m->m_len = l;
m->m_next = NULL;
}
} else
- M_PREPEND(m, l, M_DONTWAIT);
+ M_PREPEND(m, l, M_NOWAIT);
if (!m)
return NULL;
@@ -5535,14 +5535,14 @@ key_getcomb_ipcomp()
KASSERT(l <= MLEN,
("key_getcomb_ipcomp: l=%u > MLEN=%lu",
l, (u_long) MLEN));
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (m) {
M_ALIGN(m, l);
m->m_len = l;
m->m_next = NULL;
}
} else
- M_PREPEND(m, l, M_DONTWAIT);
+ M_PREPEND(m, l, M_NOWAIT);
if (!m)
return NULL;
@@ -5586,7 +5586,7 @@ key_getprop(saidx)
if (!m)
return NULL;
- M_PREPEND(m, l, M_DONTWAIT);
+ M_PREPEND(m, l, M_NOWAIT);
if (!m)
return NULL;
@@ -6091,9 +6091,9 @@ key_register(so, m, mhp)
if (len > MCLBYTES)
return key_senderror(so, m, ENOBUFS);
- MGETHDR(n, M_DONTWAIT, MT_DATA);
+ MGETHDR(n, M_NOWAIT, MT_DATA);
if (len > MHLEN) {
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if ((n->m_flags & M_EXT) == 0) {
m_freem(n);
n = NULL;
@@ -6657,9 +6657,9 @@ key_parse(m, so)
if (m->m_next) {
struct mbuf *n;
- MGETHDR(n, M_DONTWAIT, MT_DATA);
+ MGETHDR(n, M_NOWAIT, MT_DATA);
if (n && m->m_pkthdr.len > MHLEN) {
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if ((n->m_flags & M_EXT) == 0) {
m_free(n);
n = NULL;
@@ -7257,9 +7257,9 @@ key_alloc_mbuf(l)
len = l;
while (len > 0) {
- MGET(n, M_DONTWAIT, MT_DATA);
+ MGET(n, M_NOWAIT, MT_DATA);
if (n && len > MLEN)
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if (!n) {
m_freem(m);
return NULL;
diff --git a/sys/netipsec/keysock.c b/sys/netipsec/keysock.c
index d61c15b..7ae835a 100644
--- a/sys/netipsec/keysock.c
+++ b/sys/netipsec/keysock.c
@@ -152,7 +152,7 @@ key_sendup0(rp, m, promisc)
if (promisc) {
struct sadb_msg *pmsg;
- M_PREPEND(m, sizeof(struct sadb_msg), M_DONTWAIT);
+ M_PREPEND(m, sizeof(struct sadb_msg), M_NOWAIT);
if (m && m->m_len < sizeof(struct sadb_msg))
m = m_pullup(m, sizeof(struct sadb_msg));
if (!m) {
@@ -223,10 +223,10 @@ key_sendup(so, msg, len, target)
m = mprev = NULL;
while (tlen > 0) {
if (tlen == len) {
- MGETHDR(n, M_DONTWAIT, MT_DATA);
+ MGETHDR(n, M_NOWAIT, MT_DATA);
n->m_len = MHLEN;
} else {
- MGET(n, M_DONTWAIT, MT_DATA);
+ MGET(n, M_NOWAIT, MT_DATA);
n->m_len = MLEN;
}
if (!n) {
@@ -234,7 +234,7 @@ key_sendup(so, msg, len, target)
return ENOBUFS;
}
if (tlen >= MCLBYTES) { /*XXX better threshold? */
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if ((n->m_flags & M_EXT) == 0) {
m_free(n);
m_freem(m);
@@ -402,7 +402,7 @@ key_attach(struct socket *so, int proto, struct thread *td)
if (sotorawcb(so) != 0)
return EISCONN; /* XXX panic? */
- kp = (struct keycb *)malloc(sizeof *kp, M_PCB, M_WAITOK|M_ZERO); /* XXX */
+ kp = (struct keycb *)malloc(sizeof *kp, M_PCB, M_ZERO); /* XXX */
if (kp == 0)
return ENOBUFS;
diff --git a/sys/netipsec/xform_esp.c b/sys/netipsec/xform_esp.c
index f91d3cf..ece649d 100644
--- a/sys/netipsec/xform_esp.c
+++ b/sys/netipsec/xform_esp.c
@@ -190,7 +190,7 @@ esp_init(struct secasvar *sav, struct xformsw *xsp)
* compromise is to force it to zero here.
*/
sav->ivlen = (txform == &enc_xform_null ? 0 : txform->blocksize);
- sav->iv = (caddr_t) malloc(sav->ivlen, M_XDATA, M_WAITOK);
+ sav->iv = (caddr_t) malloc(sav->ivlen, M_XDATA, 0);
if (sav->iv == NULL) {
DPRINTF(("esp_init: no memory for IV\n"));
return EINVAL;
diff --git a/sys/netipsec/xform_ipip.c b/sys/netipsec/xform_ipip.c
index 9d49a3e..6672b62 100644
--- a/sys/netipsec/xform_ipip.c
+++ b/sys/netipsec/xform_ipip.c
@@ -441,7 +441,7 @@ ipip_output(
goto bad;
}
- M_PREPEND(m, sizeof(struct ip), M_DONTWAIT);
+ M_PREPEND(m, sizeof(struct ip), M_NOWAIT);
if (m == 0) {
DPRINTF(("ipip_output: M_PREPEND failed\n"));
ipipstat.ipips_hdrops++;
@@ -529,7 +529,7 @@ ipip_output(
if (IN6_IS_SCOPE_LINKLOCAL(&ip6->ip6_dst))
ip6->ip6_dst.s6_addr16[1] = 0;
- M_PREPEND(m, sizeof(struct ip6_hdr), M_DONTWAIT);
+ M_PREPEND(m, sizeof(struct ip6_hdr), M_NOWAIT);
if (m == 0) {
DPRINTF(("ipip_output: M_PREPEND failed\n"));
ipipstat.ipips_hdrops++;
diff --git a/sys/netipx/ipx.c b/sys/netipx/ipx.c
index 35aa27d..6d2be1a 100644
--- a/sys/netipx/ipx.c
+++ b/sys/netipx/ipx.c
@@ -130,7 +130,7 @@ ipx_control(so, cmd, data, ifp, td)
if (ia == NULL) {
oia = (struct ipx_ifaddr *)
malloc(sizeof(*ia), M_IFADDR,
- M_WAITOK | M_ZERO);
+ M_ZERO);
if (oia == NULL)
return (ENOBUFS);
if ((ia = ipx_ifaddr) != NULL) {
diff --git a/sys/netipx/ipx_input.c b/sys/netipx/ipx_input.c
index 3410a41..b3d95d2 100644
--- a/sys/netipx/ipx_input.c
+++ b/sys/netipx/ipx_input.c
@@ -483,7 +483,7 @@ struct ifnet *ifp;
if (m0 != NULL) {
register struct ipx *ipx;
- M_PREPEND(m0, sizeof(*ipx), M_DONTWAIT);
+ M_PREPEND(m0, sizeof(*ipx), M_NOWAIT);
if (m0 == NULL)
continue;
ipx = mtod(m0, struct ipx *);
diff --git a/sys/netipx/ipx_ip.c b/sys/netipx/ipx_ip.c
index 6f5d74c..59e769b 100644
--- a/sys/netipx/ipx_ip.c
+++ b/sys/netipx/ipx_ip.c
@@ -175,7 +175,7 @@ ipxip_input(m, hlen)
if (ipxip_lastin != NULL) {
m_freem(ipxip_lastin);
}
- ipxip_lastin = m_copym(m, 0, (int)M_COPYALL, M_DONTWAIT);
+ ipxip_lastin = m_copym(m, 0, (int)M_COPYALL, M_NOWAIT);
}
/*
* Get IP and IPX header together in first mbuf.
@@ -256,7 +256,7 @@ ipxipoutput(ifp, m, dst, rt)
/* following clause not necessary on vax */
if (3 & (intptr_t)m->m_data) {
/* force longword alignment of ip hdr */
- struct mbuf *m0 = m_gethdr(MT_HEADER, M_DONTWAIT);
+ struct mbuf *m0 = m_gethdr(MT_HEADER, M_NOWAIT);
if (m0 == NULL) {
m_freem(m);
return (ENOBUFS);
@@ -269,7 +269,7 @@ ipxipoutput(ifp, m, dst, rt)
m->m_flags &= ~M_PKTHDR;
m = m0;
} else {
- M_PREPEND(m, sizeof(struct ip), M_DONTWAIT);
+ M_PREPEND(m, sizeof(struct ip), M_NOWAIT);
if (m == NULL)
return (ENOBUFS);
}
diff --git a/sys/netipx/ipx_outputfl.c b/sys/netipx/ipx_outputfl.c
index 9f608dd..0436847 100644
--- a/sys/netipx/ipx_outputfl.c
+++ b/sys/netipx/ipx_outputfl.c
@@ -244,7 +244,7 @@ ipx_output_type20(m)
if(ipx->ipx_sum != 0xffff)
ipx->ipx_sum = ipx_cksum(m, ntohs(ipx->ipx_len));
- m1 = m_copym(m, 0, M_COPYALL, M_DONTWAIT);
+ m1 = m_copym(m, 0, M_COPYALL, M_NOWAIT);
if(m1) {
error = (*ifp->if_output)(ifp, m1,
(struct sockaddr *)&dst, NULL);
diff --git a/sys/netipx/ipx_usrreq.c b/sys/netipx/ipx_usrreq.c
index f0c803a..bf05808 100644
--- a/sys/netipx/ipx_usrreq.c
+++ b/sys/netipx/ipx_usrreq.c
@@ -218,7 +218,7 @@ ipx_output(ipxp, m0)
(m->m_len + m->m_data < &m->m_dat[MLEN])) {
mtod(m, char*)[m->m_len++] = 0;
} else {
- struct mbuf *m1 = m_get(M_DONTWAIT, MT_DATA);
+ struct mbuf *m1 = m_get(M_NOWAIT, MT_DATA);
if (m1 == NULL) {
m_freem(m0);
@@ -239,7 +239,7 @@ ipx_output(ipxp, m0)
if (ipxp->ipxp_flags & IPXP_RAWOUT) {
ipx = mtod(m, struct ipx *);
} else {
- M_PREPEND(m, sizeof(struct ipx), M_DONTWAIT);
+ M_PREPEND(m, sizeof(struct ipx), M_NOWAIT);
if (m == NULL)
return (ENOBUFS);
ipx = mtod(m, struct ipx *);
diff --git a/sys/netipx/spx_usrreq.c b/sys/netipx/spx_usrreq.c
index 189d741..92402c8 100644
--- a/sys/netipx/spx_usrreq.c
+++ b/sys/netipx/spx_usrreq.c
@@ -579,7 +579,7 @@ present:
spx_newchecks[4]++;
if (dt != cb->s_rhdr.spx_dt) {
struct mbuf *mm =
- m_getclr(M_DONTWAIT, MT_CONTROL);
+ m_getclr(M_NOWAIT, MT_CONTROL);
spx_newchecks[0]++;
if (mm != NULL) {
u_short *s =
@@ -755,7 +755,7 @@ spx_output(cb, m0)
* from usrreq(), so it is OK to
* block.
*/
- m = m_copym(m0, 0, mtu, M_TRYWAIT);
+ m = m_copym(m0, 0, mtu, 0);
if (cb->s_flags & SF_NEWCALL) {
struct mbuf *mm = m;
spx_newchecks[7]++;
@@ -785,7 +785,7 @@ spx_output(cb, m0)
if (M_TRAILINGSPACE(m) >= 1)
m->m_len++;
else {
- struct mbuf *m1 = m_get(M_DONTWAIT, MT_DATA);
+ struct mbuf *m1 = m_get(M_NOWAIT, MT_DATA);
if (m1 == NULL) {
m_freem(m0);
@@ -796,7 +796,7 @@ spx_output(cb, m0)
m->m_next = m1;
}
}
- m = m_gethdr(M_DONTWAIT, MT_HEADER);
+ m = m_gethdr(M_NOWAIT, MT_HEADER);
if (m == NULL) {
m_freem(m0);
return (ENOBUFS);
@@ -1009,7 +1009,7 @@ send:
spxstat.spxs_sndprobe++;
if (cb->s_flags & SF_ACKNOW)
spxstat.spxs_sndacks++;
- m = m_gethdr(M_DONTWAIT, MT_HEADER);
+ m = m_gethdr(M_NOWAIT, MT_HEADER);
if (m == NULL)
return (ENOBUFS);
/*
@@ -1342,7 +1342,7 @@ spx_attach(so, proto, td)
}
sb = &so->so_snd;
- mm = m_getclr(M_DONTWAIT, MT_HEADER);
+ mm = m_getclr(M_NOWAIT, MT_HEADER);
if (mm == NULL) {
FREE(cb, M_PCB);
error = ENOBUFS;
diff --git a/sys/netkey/key.c b/sys/netkey/key.c
index dbc0a2a..cfa735f 100644
--- a/sys/netkey/key.c
+++ b/sys/netkey/key.c
@@ -1662,7 +1662,7 @@ key_gather_mbuf(m, mhp, ndeep, nitem, va_alist)
if (len > MHLEN)
panic("assumption failed");
#endif
- MGETHDR(n, M_DONTWAIT, MT_DATA);
+ MGETHDR(n, M_NOWAIT, MT_DATA);
if (!n)
goto fail;
n->m_len = len;
@@ -1681,7 +1681,7 @@ key_gather_mbuf(m, mhp, ndeep, nitem, va_alist)
mtod(n, caddr_t));
} else {
n = m_copym(m, mhp->extoff[idx], mhp->extlen[idx],
- M_DONTWAIT);
+ M_NOWAIT);
}
if (n == NULL)
goto fail;
@@ -2117,9 +2117,9 @@ key_spddelete2(so, m, mhp)
if (len > MCLBYTES)
return key_senderror(so, m, ENOBUFS);
- MGETHDR(n, M_DONTWAIT, MT_DATA);
+ MGETHDR(n, M_NOWAIT, MT_DATA);
if (n && len > MHLEN) {
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if ((n->m_flags & M_EXT) == 0) {
m_freem(n);
n = NULL;
@@ -2141,7 +2141,7 @@ key_spddelete2(so, m, mhp)
#endif
n->m_next = m_copym(m, mhp->extoff[SADB_X_EXT_POLICY],
- mhp->extlen[SADB_X_EXT_POLICY], M_DONTWAIT);
+ mhp->extlen[SADB_X_EXT_POLICY], M_NOWAIT);
if (!n->m_next) {
m_freem(n);
return key_senderror(so, m, ENOBUFS);
@@ -3488,7 +3488,7 @@ key_setdumpsa(sav, type, satype, seq, pid)
if ((!m && !p) || (m && p))
goto fail;
if (p && tres) {
- M_PREPEND(tres, l, M_DONTWAIT);
+ M_PREPEND(tres, l, M_NOWAIT);
if (!tres)
goto fail;
bcopy(p, mtod(tres, caddr_t), l);
@@ -3547,9 +3547,9 @@ key_setsadbmsg(type, tlen, satype, seq, pid, reserved)
len = PFKEY_ALIGN8(sizeof(struct sadb_msg));
if (len > MCLBYTES)
return NULL;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m && len > MHLEN) {
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if ((m->m_flags & M_EXT) == 0) {
m_freem(m);
m = NULL;
@@ -4681,9 +4681,9 @@ key_getspi(so, m, mhp)
if (len > MCLBYTES)
return key_senderror(so, m, ENOBUFS);
- MGETHDR(n, M_DONTWAIT, MT_DATA);
+ MGETHDR(n, M_NOWAIT, MT_DATA);
if (len > MHLEN) {
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if ((n->m_flags & M_EXT) == 0) {
m_freem(n);
n = NULL;
@@ -5572,7 +5572,7 @@ key_getcomb_esp()
if (l > MLEN)
panic("assumption failed in key_getcomb_esp");
#endif
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (m) {
M_ALIGN(m, l);
m->m_len = l;
@@ -5656,14 +5656,14 @@ key_getcomb_ah()
if (l > MLEN)
panic("assumption failed in key_getcomb_ah");
#endif
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (m) {
M_ALIGN(m, l);
m->m_len = l;
m->m_next = NULL;
}
} else
- M_PREPEND(m, l, M_DONTWAIT);
+ M_PREPEND(m, l, M_NOWAIT);
if (!m)
return NULL;
@@ -5702,14 +5702,14 @@ key_getcomb_ipcomp()
if (l > MLEN)
panic("assumption failed in key_getcomb_ipcomp");
#endif
- MGET(m, M_DONTWAIT, MT_DATA);
+ MGET(m, M_NOWAIT, MT_DATA);
if (m) {
M_ALIGN(m, l);
m->m_len = l;
m->m_next = NULL;
}
} else
- M_PREPEND(m, l, M_DONTWAIT);
+ M_PREPEND(m, l, M_NOWAIT);
if (!m)
return NULL;
@@ -5755,7 +5755,7 @@ key_getprop(saidx)
if (!m)
return NULL;
- M_PREPEND(m, l, M_DONTWAIT);
+ M_PREPEND(m, l, M_NOWAIT);
if (!m)
return NULL;
@@ -6272,9 +6272,9 @@ key_register(so, m, mhp)
if (len > MCLBYTES)
return key_senderror(so, m, ENOBUFS);
- MGETHDR(n, M_DONTWAIT, MT_DATA);
+ MGETHDR(n, M_NOWAIT, MT_DATA);
if (len > MHLEN) {
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if ((n->m_flags & M_EXT) == 0) {
m_freem(n);
n = NULL;
@@ -6846,9 +6846,9 @@ key_parse(m, so)
if (m->m_next) {
struct mbuf *n;
- MGETHDR(n, M_DONTWAIT, MT_DATA);
+ MGETHDR(n, M_NOWAIT, MT_DATA);
if (n && m->m_pkthdr.len > MHLEN) {
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if ((n->m_flags & M_EXT) == 0) {
m_free(n);
n = NULL;
@@ -7473,9 +7473,9 @@ key_alloc_mbuf(l)
len = l;
while (len > 0) {
- MGET(n, M_DONTWAIT, MT_DATA);
+ MGET(n, M_NOWAIT, MT_DATA);
if (n && len > MLEN)
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if (!n) {
m_freem(m);
return NULL;
diff --git a/sys/netkey/keysock.c b/sys/netkey/keysock.c
index dbc48a8..13394ac 100644
--- a/sys/netkey/keysock.c
+++ b/sys/netkey/keysock.c
@@ -148,7 +148,7 @@ key_sendup0(rp, m, promisc)
if (promisc) {
struct sadb_msg *pmsg;
- M_PREPEND(m, sizeof(struct sadb_msg), M_DONTWAIT);
+ M_PREPEND(m, sizeof(struct sadb_msg), M_NOWAIT);
if (m && m->m_len < sizeof(struct sadb_msg))
m = m_pullup(m, sizeof(struct sadb_msg));
if (!m) {
@@ -219,10 +219,10 @@ key_sendup(so, msg, len, target)
m = mprev = NULL;
while (tlen > 0) {
if (tlen == len) {
- MGETHDR(n, M_DONTWAIT, MT_DATA);
+ MGETHDR(n, M_NOWAIT, MT_DATA);
n->m_len = MHLEN;
} else {
- MGET(n, M_DONTWAIT, MT_DATA);
+ MGET(n, M_NOWAIT, MT_DATA);
n->m_len = MLEN;
}
if (!n) {
@@ -230,7 +230,7 @@ key_sendup(so, msg, len, target)
return ENOBUFS;
}
if (tlen >= MCLBYTES) { /*XXX better threshold? */
- MCLGET(n, M_DONTWAIT);
+ MCLGET(n, M_NOWAIT);
if ((n->m_flags & M_EXT) == 0) {
m_free(n);
m_freem(m);
@@ -398,7 +398,7 @@ key_attach(struct socket *so, int proto, struct thread *td)
if (sotorawcb(so) != 0)
return EISCONN; /* XXX panic? */
- kp = (struct keycb *)malloc(sizeof *kp, M_PCB, M_WAITOK); /* XXX */
+ kp = (struct keycb *)malloc(sizeof *kp, M_PCB, 0); /* XXX */
if (kp == 0)
return ENOBUFS;
bzero(kp, sizeof *kp);
diff --git a/sys/netnatm/natm.c b/sys/netnatm/natm.c
index e0535b6..24b65ed 100644
--- a/sys/netnatm/natm.c
+++ b/sys/netnatm/natm.c
@@ -109,7 +109,7 @@ natm_usr_attach(struct socket *so, int proto, d_thread_t *p)
goto out;
}
- so->so_pcb = (caddr_t) (npcb = npcb_alloc(M_WAITOK));
+ so->so_pcb = (caddr_t) (npcb = npcb_alloc(0));
npcb->npcb_socket = so;
out:
splx(s);
@@ -300,7 +300,7 @@ natm_usr_send(struct socket *so, int flags, struct mbuf *m,
* send the data. we must put an atm_pseudohdr on first
*/
- M_PREPEND(m, sizeof(*aph), M_TRYWAIT);
+ M_PREPEND(m, sizeof(*aph), 0);
if (m == NULL) {
error = ENOBUFS;
goto out;
@@ -469,7 +469,7 @@ struct proc *p;
break;
}
- so->so_pcb = (caddr_t) (npcb = npcb_alloc(M_WAITOK));
+ so->so_pcb = (caddr_t) (npcb = npcb_alloc(0));
npcb->npcb_socket = so;
break;
@@ -599,7 +599,7 @@ struct proc *p;
* send the data. we must put an atm_pseudohdr on first
*/
- M_PREPEND(m, sizeof(*aph), M_TRYWAIT);
+ M_PREPEND(m, sizeof(*aph), 0);
if (m == NULL) {
error = ENOBUFS;
break;
diff --git a/sys/netnatm/natm_pcb.c b/sys/netnatm/natm_pcb.c
index 7016e33..9fee1b0 100644
--- a/sys/netnatm/natm_pcb.c
+++ b/sys/netnatm/natm_pcb.c
@@ -66,7 +66,7 @@ int wait;
MALLOC(npcb, struct natmpcb *, sizeof(*npcb), M_PCB, wait | M_ZERO);
#ifdef DIAGNOSTIC
- if (wait == M_WAITOK && npcb == NULL) panic("npcb_alloc: malloc didn't wait");
+ if (wait == 0 && npcb == NULL) panic("npcb_alloc: malloc didn't wait");
#endif
if (npcb)
diff --git a/sys/netncp/ncp_conn.c b/sys/netncp/ncp_conn.c
index 14b8d7b..a3dbec3 100644
--- a/sys/netncp/ncp_conn.c
+++ b/sys/netncp/ncp_conn.c
@@ -233,7 +233,7 @@ ncp_conn_alloc(struct ncp_conn_args *cap, struct proc *p, struct ucred *cred,
} else
owner = crhold(cred);
MALLOC(ncp, struct ncp_conn *, sizeof(struct ncp_conn),
- M_NCPDATA, M_WAITOK | M_ZERO);
+ M_NCPDATA, M_ZERO);
error = 0;
lockinit(&ncp->nc_lock, PZERO, "ncplck", 0, 0);
ncp_conn_cnt++;
@@ -522,7 +522,7 @@ ncp_conn_gethandle(struct ncp_conn *conn, struct proc *p, struct ncp_handle **ha
return 0;
}
MALLOC(refp,struct ncp_handle *,sizeof(struct ncp_handle),M_NCPDATA,
- M_WAITOK | M_ZERO);
+ M_ZERO);
SLIST_INSERT_HEAD(&lhlist,refp,nh_next);
refp->nh_ref++;
refp->nh_proc = p;
diff --git a/sys/netncp/ncp_rq.c b/sys/netncp/ncp_rq.c
index ea70731..80d2fd0 100644
--- a/sys/netncp/ncp_rq.c
+++ b/sys/netncp/ncp_rq.c
@@ -63,7 +63,7 @@ ncp_rq_alloc_any(u_int32_t ptype, u_int8_t fn, struct ncp_conn *ncp,
struct ncp_rq *rqp;
int error;
- MALLOC(rqp, struct ncp_rq *, sizeof(*rqp), M_NCPRQ, M_WAITOK);
+ MALLOC(rqp, struct ncp_rq *, sizeof(*rqp), M_NCPRQ, 0);
error = ncp_rq_init_any(rqp, ptype, fn, ncp, p, cred);
rqp->nr_flags |= NCPR_ALLOCED;
if (error) {
diff --git a/sys/netncp/ncp_sock.c b/sys/netncp/ncp_sock.c
index 4a03565..d9351e5 100644
--- a/sys/netncp/ncp_sock.c
+++ b/sys/netncp/ncp_sock.c
@@ -163,7 +163,7 @@ ncp_sock_send(struct socket *so, struct mbuf *top, struct ncp_rq *rqp)
int sendwait;
for(;;) {
- m = m_copym(top, 0, M_COPYALL, M_TRYWAIT);
+ m = m_copym(top, 0, M_COPYALL, 0);
/* NCPDDEBUG(m);*/
error = so->so_proto->pr_usrreqs->pru_sosend(so, to, 0, m, 0, flags, p);
if (error == 0 || error == EINTR || error == ENETDOWN)
diff --git a/sys/netncp/ncp_subr.c b/sys/netncp/ncp_subr.c
index a55e535..4f7e5f0 100644
--- a/sys/netncp/ncp_subr.c
+++ b/sys/netncp/ncp_subr.c
@@ -69,7 +69,7 @@ ncp_str_dup(char *s) {
len++;
if (bt == 0) break;
}
- MALLOC(p, char*, len, M_NCPDATA, M_WAITOK);
+ MALLOC(p, char*, len, M_NCPDATA, 0);
copyin(s, p, len);
return p;
}
diff --git a/sys/netns/idp_usrreq.c b/sys/netns/idp_usrreq.c
index 2642d1a..be9dd5c 100644
--- a/sys/netns/idp_usrreq.c
+++ b/sys/netns/idp_usrreq.c
@@ -160,7 +160,7 @@ idp_output(nsp, m0)
(m->m_len + m->m_data < &m->m_dat[MLEN])) {
m->m_len++;
} else {
- struct mbuf *m1 = m_get(M_DONTWAIT, MT_DATA);
+ struct mbuf *m1 = m_get(M_NOWAIT, MT_DATA);
if (m1 == 0) {
m_freem(m0);
@@ -181,7 +181,7 @@ idp_output(nsp, m0)
if (nsp->nsp_flags & NSP_RAWOUT) {
idp = mtod(m, struct idp *);
} else {
- M_PREPEND(m, sizeof (struct idp), M_DONTWAIT);
+ M_PREPEND(m, sizeof (struct idp), M_NOWAIT);
if (m == 0)
return (ENOBUFS);
idp = mtod(m, struct idp *);
@@ -273,7 +273,7 @@ idp_ctloutput(req, so, level, name, value)
case PRCO_GETOPT:
if (value==NULL)
return (EINVAL);
- m = m_get(M_DONTWAIT, MT_DATA);
+ m = m_get(M_NOWAIT, MT_DATA);
if (m==NULL)
return (ENOBUFS);
switch (name) {
diff --git a/sys/netns/ns.c b/sys/netns/ns.c
index 7af5acf..40a8b0c 100644
--- a/sys/netns/ns.c
+++ b/sys/netns/ns.c
@@ -128,7 +128,7 @@ ns_control(so, cmd, data, ifp)
case SIOCSIFDSTADDR:
if (ia == (struct ns_ifaddr *)0) {
oia = (struct ns_ifaddr *)
- malloc(sizeof *ia, M_IFADDR, M_WAITOK);
+ malloc(sizeof *ia, M_IFADDR, 0);
if (oia == (struct ns_ifaddr *)NULL)
return (ENOBUFS);
bzero((caddr_t)oia, sizeof(*oia));
diff --git a/sys/netns/ns_error.c b/sys/netns/ns_error.c
index fc4db94..769edf8 100644
--- a/sys/netns/ns_error.c
+++ b/sys/netns/ns_error.c
@@ -135,7 +135,7 @@ ns_error(om, type, param)
/*
* First, formulate ns_err message
*/
- m = m_gethdr(M_DONTWAIT, MT_HEADER);
+ m = m_gethdr(M_NOWAIT, MT_HEADER);
if (m == NULL)
goto freeit;
m->m_len = sizeof(*ep);
diff --git a/sys/netns/ns_input.c b/sys/netns/ns_input.c
index 22abe02..033eae6 100644
--- a/sys/netns/ns_input.c
+++ b/sys/netns/ns_input.c
@@ -470,7 +470,7 @@ struct ifnet *ifp;
if (m0) {
register struct idp *idp;
- M_PREPEND(m0, sizeof (*idp), M_DONTWAIT);
+ M_PREPEND(m0, sizeof (*idp), M_NOWAIT);
if (m0 == NULL)
continue;
idp = mtod(m0, struct idp *);
diff --git a/sys/netns/ns_ip.c b/sys/netns/ns_ip.c
index 55d1a9f..b566196 100644
--- a/sys/netns/ns_ip.c
+++ b/sys/netns/ns_ip.c
@@ -168,7 +168,7 @@ idpip_input(m, ifp)
if (nsip_lastin) {
m_freem(nsip_lastin);
}
- nsip_lastin = m_copym(m, 0, (int)M_COPYALL, M_DONTWAIT);
+ nsip_lastin = m_copym(m, 0, (int)M_COPYALL, M_NOWAIT);
}
/*
* Get IP and IDP header together in first mbuf.
@@ -251,7 +251,7 @@ nsipoutput(ifn, m, dst)
/* following clause not necessary on vax */
if (3 & (int)m->m_data) {
/* force longword alignment of ip hdr */
- struct mbuf *m0 = m_gethdr(MT_HEADER, M_DONTWAIT);
+ struct mbuf *m0 = m_gethdr(MT_HEADER, M_NOWAIT);
if (m0 == 0) {
m_freem(m);
return (ENOBUFS);
@@ -263,7 +263,7 @@ nsipoutput(ifn, m, dst)
m0->m_pkthdr.len = m0->m_len + m->m_len;
m->m_flags &= ~M_PKTHDR;
} else {
- M_PREPEND(m, sizeof (struct ip), M_DONTWAIT);
+ M_PREPEND(m, sizeof (struct ip), M_NOWAIT);
if (m == 0)
return (ENOBUFS);
}
diff --git a/sys/netns/ns_pcb.c b/sys/netns/ns_pcb.c
index 01301c0..bcccc3a 100644
--- a/sys/netns/ns_pcb.c
+++ b/sys/netns/ns_pcb.c
@@ -58,7 +58,7 @@ ns_pcballoc(so, head)
struct mbuf *m;
register struct nspcb *nsp;
- m = m_getclr(M_DONTWAIT, MT_PCB);
+ m = m_getclr(M_NOWAIT, MT_PCB);
if (m == NULL)
return (ENOBUFS);
nsp = mtod(m, struct nspcb *);
diff --git a/sys/netns/spp_usrreq.c b/sys/netns/spp_usrreq.c
index c942884..2191d1a 100644
--- a/sys/netns/spp_usrreq.c
+++ b/sys/netns/spp_usrreq.c
@@ -161,7 +161,7 @@ spp_input(m, nsp)
spp_istat.gonawy++;
goto dropwithreset;
}
- am = m_get(M_DONTWAIT, MT_SONAME);
+ am = m_get(M_NOWAIT, MT_SONAME);
if (am == NULL)
goto drop;
am->m_len = sizeof (struct sockaddr_ns);
@@ -528,7 +528,7 @@ present:
spp_newchecks[4]++;
if (dt != cb->s_rhdr.sp_dt) {
struct mbuf *mm =
- m_getclr(M_DONTWAIT, MT_CONTROL);
+ m_getclr(M_NOWAIT, MT_CONTROL);
spp_newchecks[0]++;
if (mm != NULL) {
u_short *s =
@@ -742,7 +742,7 @@ spp_output(cb, m0)
* from usrreq(), so it is OK to
* block.
*/
- m = m_copym(m0, 0, mtu, M_TRYWAIT);
+ m = m_copym(m0, 0, mtu, 0);
if (cb->s_flags & SF_NEWCALL) {
struct mbuf *mm = m;
spp_newchecks[7]++;
@@ -772,7 +772,7 @@ spp_output(cb, m0)
if (M_TRAILINGSPACE(m) >= 1)
m->m_len++;
else {
- struct mbuf *m1 = m_get(M_DONTWAIT, MT_DATA);
+ struct mbuf *m1 = m_get(M_NOWAIT, MT_DATA);
if (m1 == 0) {
m_freem(m0);
@@ -783,7 +783,7 @@ spp_output(cb, m0)
m->m_next = m1;
}
}
- m = m_gethdr(M_DONTWAIT, MT_HEADER);
+ m = m_gethdr(M_NOWAIT, MT_HEADER);
if (m == 0) {
m_freem(m0);
return (ENOBUFS);
@@ -996,7 +996,7 @@ send:
sppstat.spps_sndprobe++;
if (cb->s_flags & SF_ACKNOW)
sppstat.spps_sndacks++;
- m = m_gethdr(M_DONTWAIT, MT_HEADER);
+ m = m_gethdr(M_NOWAIT, MT_HEADER);
if (m == 0)
return (ENOBUFS);
/*
@@ -1156,7 +1156,7 @@ spp_ctloutput(req, so, level, name, value)
case PRCO_GETOPT:
if (value == NULL)
return (EINVAL);
- m = m_get(M_DONTWAIT, MT_DATA);
+ m = m_get(M_NOWAIT, MT_DATA);
if (m == NULL)
return (ENOBUFS);
switch (name) {
@@ -1296,7 +1296,7 @@ spp_usrreq(so, req, m, nam, controlp)
}
nsp = sotonspcb(so);
- mm = m_getclr(M_DONTWAIT, MT_PCB);
+ mm = m_getclr(M_NOWAIT, MT_PCB);
sb = &so->so_snd;
if (mm == NULL) {
@@ -1304,7 +1304,7 @@ spp_usrreq(so, req, m, nam, controlp)
break;
}
cb = mtod(mm, struct sppcb *);
- mm = m_getclr(M_DONTWAIT, MT_HEADER);
+ mm = m_getclr(M_NOWAIT, MT_HEADER);
if (mm == NULL) {
(void) m_free(dtom(m));
error = ENOBUFS;
diff --git a/sys/netsmb/smb_conn.c b/sys/netsmb/smb_conn.c
index 9c52571..2a1e913 100644
--- a/sys/netsmb/smb_conn.c
+++ b/sys/netsmb/smb_conn.c
@@ -393,7 +393,7 @@ smb_vc_create(struct smb_vcspec *vcspec,
if (gid != SMBM_ANY_GROUP && !groupmember(gid, cred) && !isroot)
return EPERM;
- vcp = smb_zmalloc(sizeof(*vcp), M_SMBCONN, M_WAITOK);
+ vcp = smb_zmalloc(sizeof(*vcp), M_SMBCONN, 0);
smb_co_init(VCTOCP(vcp), SMBL_VC, "smb_vc", td);
vcp->obj.co_free = smb_vc_free;
vcp->obj.co_gone = smb_vc_gone;
@@ -690,7 +690,7 @@ smb_share_create(struct smb_vc *vcp, struct smb_sharespec *shspec,
uid = realuid;
if (gid == SMBM_ANY_GROUP)
gid = cred->cr_groups[0];
- ssp = smb_zmalloc(sizeof(*ssp), M_SMBCONN, M_WAITOK);
+ ssp = smb_zmalloc(sizeof(*ssp), M_SMBCONN, 0);
smb_co_init(SSTOCP(ssp), SMBL_SHARE, "smbss", td);
ssp->obj.co_free = smb_share_free;
ssp->obj.co_gone = smb_share_gone;
diff --git a/sys/netsmb/smb_crypt.c b/sys/netsmb/smb_crypt.c
index 8e35207..a636932 100644
--- a/sys/netsmb/smb_crypt.c
+++ b/sys/netsmb/smb_crypt.c
@@ -73,7 +73,7 @@ smb_E(const u_char *key, u_char *data, u_char *dest)
kk[5] = key[4] << 3 | (key[5] >> 5 & 0xfe);
kk[6] = key[5] << 2 | (key[6] >> 6 & 0xfe);
kk[7] = key[6] << 1;
- ksp = malloc(sizeof(des_key_schedule), M_SMBTEMP, M_WAITOK);
+ ksp = malloc(sizeof(des_key_schedule), M_SMBTEMP, 0);
des_set_key((des_cblock *)kk, *ksp);
des_ecb_encrypt((des_cblock *)data, (des_cblock *)dest, *ksp, 1);
free(ksp, M_SMBTEMP);
@@ -87,7 +87,7 @@ smb_encrypt(const u_char *apwd, u_char *C8, u_char *RN)
#ifdef NETSMBCRYPTO
u_char *p, *P14, *S21;
- p = malloc(14 + 21, M_SMBTEMP, M_WAITOK);
+ p = malloc(14 + 21, M_SMBTEMP, 0);
bzero(p, 14 + 21);
P14 = p;
S21 = p + 14;
@@ -120,12 +120,12 @@ smb_ntencrypt(const u_char *apwd, u_char *C8, u_char *RN)
int len;
len = strlen(apwd);
- unipwd = malloc((len + 1) * sizeof(u_int16_t), M_SMBTEMP, M_WAITOK);
+ unipwd = malloc((len + 1) * sizeof(u_int16_t), M_SMBTEMP, 0);
/*
* S21 = concat(MD4(U(apwd)), zeros(5));
*/
smb_strtouni(unipwd, apwd);
- ctxp = malloc(sizeof(MD4_CTX), M_SMBTEMP, M_WAITOK);
+ ctxp = malloc(sizeof(MD4_CTX), M_SMBTEMP, 0);
MD4Init(ctxp);
MD4Update(ctxp, (u_char*)unipwd, len * sizeof(u_int16_t));
free(unipwd, M_SMBTEMP);
diff --git a/sys/netsmb/smb_dev.c b/sys/netsmb/smb_dev.c
index 3f22b16..12abf0a 100644
--- a/sys/netsmb/smb_dev.c
+++ b/sys/netsmb/smb_dev.c
@@ -131,7 +131,7 @@ nsmb_dev_open(dev_t dev, int oflags, int devtype, struct thread *td)
if (sdp && (sdp->sd_flags & NSMBFL_OPEN))
return EBUSY;
if (sdp == NULL) {
- sdp = malloc(sizeof(*sdp), M_NSMBDEV, M_WAITOK);
+ sdp = malloc(sizeof(*sdp), M_NSMBDEV, 0);
dev->si_drv1 = (void*)sdp;
}
/*
diff --git a/sys/netsmb/smb_iod.c b/sys/netsmb/smb_iod.c
index 5ae5f14..12c9000 100644
--- a/sys/netsmb/smb_iod.c
+++ b/sys/netsmb/smb_iod.c
@@ -248,7 +248,7 @@ smb_iod_sendrq(struct smbiod *iod, struct smb_rq *rqp)
}
SMBSDEBUG("M:%04x, P:%04x, U:%04x, T:%04x\n", rqp->sr_mid, 0, 0, 0);
m_dumpm(rqp->sr_rq.mb_top);
- m = m_copym(rqp->sr_rq.mb_top, 0, M_COPYALL, M_TRYWAIT);
+ m = m_copym(rqp->sr_rq.mb_top, 0, M_COPYALL, 0);
error = rqp->sr_lerror = m ? SMB_TRAN_SEND(vcp, m, td) : ENOBUFS;
if (error == 0) {
getnanotime(&rqp->sr_timesent);
@@ -371,7 +371,7 @@ smb_iod_request(struct smbiod *iod, int event, void *ident)
int error;
SMBIODEBUG("\n");
- evp = smb_zmalloc(sizeof(*evp), M_SMBIOD, M_WAITOK);
+ evp = smb_zmalloc(sizeof(*evp), M_SMBIOD, 0);
evp->ev_type = event;
evp->ev_ident = ident;
SMB_IOD_EVLOCK(iod);
@@ -663,7 +663,7 @@ smb_iod_create(struct smb_vc *vcp)
struct smbiod *iod;
int error;
- iod = smb_zmalloc(sizeof(*iod), M_SMBIOD, M_WAITOK);
+ iod = smb_zmalloc(sizeof(*iod), M_SMBIOD, 0);
iod->iod_id = smb_iod_next++;
iod->iod_state = SMBIOD_ST_NOTCONN;
iod->iod_vc = vcp;
diff --git a/sys/netsmb/smb_rq.c b/sys/netsmb/smb_rq.c
index 5e0c7a8..9fd14a6 100644
--- a/sys/netsmb/smb_rq.c
+++ b/sys/netsmb/smb_rq.c
@@ -67,7 +67,7 @@ smb_rq_alloc(struct smb_connobj *layer, u_char cmd, struct smb_cred *scred,
struct smb_rq *rqp;
int error;
- MALLOC(rqp, struct smb_rq *, sizeof(*rqp), M_SMBRQ, M_WAITOK);
+ MALLOC(rqp, struct smb_rq *, sizeof(*rqp), M_SMBRQ, 0);
if (rqp == NULL)
return ENOMEM;
error = smb_rq_init(rqp, layer, cmd, scred);
@@ -368,7 +368,7 @@ smb_t2_alloc(struct smb_connobj *layer, u_short setup, struct smb_cred *scred,
struct smb_t2rq *t2p;
int error;
- MALLOC(t2p, struct smb_t2rq *, sizeof(*t2p), M_SMBRQ, M_WAITOK);
+ MALLOC(t2p, struct smb_t2rq *, sizeof(*t2p), M_SMBRQ, 0);
if (t2p == NULL)
return ENOMEM;
error = smb_t2_init(t2p, layer, setup, scred);
@@ -418,7 +418,7 @@ smb_t2_placedata(struct mbuf *mtop, u_int16_t offset, u_int16_t count,
struct mbuf *m, *m0;
int len;
- m0 = m_split(mtop, offset, M_TRYWAIT);
+ m0 = m_split(mtop, offset, 0);
if (m0 == NULL)
return EBADRPC;
len = m_length(m0, &m);
diff --git a/sys/netsmb/smb_smb.c b/sys/netsmb/smb_smb.c
index b5e7c22..6a24de6 100644
--- a/sys/netsmb/smb_smb.c
+++ b/sys/netsmb/smb_smb.c
@@ -280,8 +280,8 @@ again:
error = smb_rq_alloc(VCTOCP(vcp), SMB_COM_SESSION_SETUP_ANDX, scred, &rqp);
if (error)
return error;
- pbuf = malloc(SMB_MAXPASSWORDLEN + 1, M_SMBTEMP, M_WAITOK);
- encpass = malloc(24, M_SMBTEMP, M_WAITOK);
+ pbuf = malloc(SMB_MAXPASSWORDLEN + 1, M_SMBTEMP, 0);
+ encpass = malloc(24, M_SMBTEMP, 0);
if (vcp->vc_sopt.sv_sm & SMB_SM_USER) {
/*
* We try w/o uppercasing first so Samba mixed case
@@ -302,7 +302,7 @@ again:
if (vcp->vc_sopt.sv_sm & SMB_SM_ENCRYPT) {
uniplen = plen = 24;
smb_encrypt(pbuf, vcp->vc_ch, encpass);
- ntencpass = malloc(uniplen, M_SMBTEMP, M_WAITOK);
+ ntencpass = malloc(uniplen, M_SMBTEMP, 0);
if (SMB_UNICODE_STRINGS(vcp)) {
strncpy(pbuf, smb_vc_getpass(vcp),
SMB_MAXPASSWORDLEN);
@@ -318,7 +318,7 @@ again:
plen = strlen(pbuf) + 1;
pp = pbuf;
uniplen = plen * 2;
- ntencpass = malloc(uniplen, M_SMBTEMP, M_WAITOK);
+ ntencpass = malloc(uniplen, M_SMBTEMP, 0);
smb_strtouni(ntencpass, smb_vc_getpass(vcp));
plen--;
@@ -500,8 +500,8 @@ again:
pbuf = NULL;
encpass = NULL;
} else {
- pbuf = malloc(SMB_MAXPASSWORDLEN + 1, M_SMBTEMP, M_WAITOK);
- encpass = malloc(24, M_SMBTEMP, M_WAITOK);
+ pbuf = malloc(SMB_MAXPASSWORDLEN + 1, M_SMBTEMP, 0);
+ encpass = malloc(24, M_SMBTEMP, 0);
/*
* We try w/o uppercasing first so Samba mixed case
* passwords work. If that fails we come back and try
diff --git a/sys/netsmb/smb_subr.c b/sys/netsmb/smb_subr.c
index fe10a5c..3ecfd8f 100644
--- a/sys/netsmb/smb_subr.c
+++ b/sys/netsmb/smb_subr.c
@@ -90,7 +90,7 @@ smb_strdup(const char *s)
int len;
len = s ? strlen(s) + 1 : 1;
- p = malloc(len, M_SMBSTR, M_WAITOK);
+ p = malloc(len, M_SMBSTR, 0);
if (s)
bcopy(s, p, len);
else
@@ -116,7 +116,7 @@ smb_strdupin(char *s, int maxlen)
if (bt == 0)
break;
}
- p = malloc(len, M_SMBSTR, M_WAITOK);
+ p = malloc(len, M_SMBSTR, 0);
copyin(s, p, len);
return p;
}
@@ -131,7 +131,7 @@ smb_memdupin(void *umem, int len)
if (len > 8 * 1024)
return NULL;
- p = malloc(len, M_SMBSTR, M_WAITOK);
+ p = malloc(len, M_SMBSTR, 0);
if (copyin(umem, p, len) == 0)
return p;
free(p, M_SMBSTR);
@@ -148,7 +148,7 @@ smb_memdup(const void *umem, int len)
if (len > 8 * 1024)
return NULL;
- p = malloc(len, M_SMBSTR, M_WAITOK);
+ p = malloc(len, M_SMBSTR, 0);
if (p == NULL)
return NULL;
bcopy(umem, p, len);
diff --git a/sys/netsmb/smb_trantcp.c b/sys/netsmb/smb_trantcp.c
index cf0adcb..b631a52 100644
--- a/sys/netsmb/smb_trantcp.c
+++ b/sys/netsmb/smb_trantcp.c
@@ -514,7 +514,7 @@ smb_nbst_create(struct smb_vc *vcp, struct thread *td)
{
struct nbpcb *nbp;
- MALLOC(nbp, struct nbpcb *, sizeof *nbp, M_NBDATA, M_WAITOK);
+ MALLOC(nbp, struct nbpcb *, sizeof *nbp, M_NBDATA, 0);
bzero(nbp, sizeof *nbp);
nbp->nbp_timo.tv_sec = 15; /* XXX: sysctl ? */
nbp->nbp_state = NBST_CLOSED;
@@ -648,7 +648,7 @@ smb_nbst_send(struct smb_vc *vcp, struct mbuf *m0, struct thread *td)
error = ENOTCONN;
goto abort;
}
- M_PREPEND(m0, 4, M_TRYWAIT);
+ M_PREPEND(m0, 4, 0);
if (m0 == NULL)
return ENOBUFS;
nb_sethdr(m0, NB_SSN_MESSAGE, m_fixhdr(m0) - 4);
diff --git a/sys/nfs/nfs_common.c b/sys/nfs/nfs_common.c
index b99c3b0..f2a26d9 100644
--- a/sys/nfs/nfs_common.c
+++ b/sys/nfs/nfs_common.c
@@ -191,7 +191,7 @@ nfsm_disct(struct mbuf **mdp, caddr_t *dposp, int siz, int left)
} else if (siz > MHLEN) {
panic("nfs S too big");
} else {
- MGET(mp2, M_TRYWAIT, MT_DATA);
+ MGET(mp2, 0, MT_DATA);
mp2->m_next = mp->m_next;
mp->m_next = mp2;
mp->m_len -= left;
@@ -254,7 +254,7 @@ nfsm_build_xx(int s, struct mbuf **mb, caddr_t *bpos)
void *ret;
if (s > M_TRAILINGSPACE(*mb)) {
- MGET(mb2, M_TRYWAIT, MT_DATA);
+ MGET(mb2, 0, MT_DATA);
if (s > MLEN)
panic("build > MLEN");
(*mb)->m_next = mb2;
diff --git a/sys/nfsclient/bootp_subr.c b/sys/nfsclient/bootp_subr.c
index bfa419e..8bd86b2 100644
--- a/sys/nfsclient/bootp_subr.c
+++ b/sys/nfsclient/bootp_subr.c
@@ -433,7 +433,7 @@ allocifctx(struct bootpc_globalcontext *gctx)
{
struct bootpc_ifcontext *ifctx;
ifctx = (struct bootpc_ifcontext *) malloc(sizeof(*ifctx),
- M_TEMP, M_WAITOK);
+ M_TEMP, 0);
if (ifctx == NULL)
panic("Failed to allocate bootp interface context structure");
@@ -1675,7 +1675,7 @@ bootpc_init(void)
if (nfs_diskless_valid != 0)
return;
- gctx = malloc(sizeof(*gctx), M_TEMP, M_WAITOK);
+ gctx = malloc(sizeof(*gctx), M_TEMP, 0);
if (gctx == NULL)
panic("Failed to allocate bootp global context structure");
@@ -1942,7 +1942,7 @@ md_lookup_swap(struct sockaddr_in *mdsin, char *path, u_char *fhp, int *fhsizep,
u_int32_t v3[21];
} fattribs;
- m = m_get(M_TRYWAIT, MT_DATA);
+ m = m_get(0, MT_DATA);
if (m == NULL)
return ENOBUFS;
diff --git a/sys/nfsclient/krpc_subr.c b/sys/nfsclient/krpc_subr.c
index 4690104..e470aeb 100644
--- a/sys/nfsclient/krpc_subr.c
+++ b/sys/nfsclient/krpc_subr.c
@@ -149,7 +149,7 @@ krpc_portmap(struct sockaddr_in *sin, u_int prog, u_int vers, u_int16_t *portp,
return 0;
}
- m = m_get(M_TRYWAIT, MT_DATA);
+ m = m_get(0, MT_DATA);
if (m == NULL)
return ENOBUFS;
sdata = mtod(m, struct sdata *);
@@ -271,7 +271,7 @@ krpc_call(struct sockaddr_in *sa, u_int prog, u_int vers, u_int func,
/*
* Prepend RPC message header.
*/
- mhead = m_gethdr(M_TRYWAIT, MT_DATA);
+ mhead = m_gethdr(0, MT_DATA);
mhead->m_next = *data;
call = mtod(mhead, struct rpc_call *);
mhead->m_len = sizeof(*call);
@@ -311,7 +311,7 @@ krpc_call(struct sockaddr_in *sa, u_int prog, u_int vers, u_int func,
timo = 0;
for (;;) {
/* Send RPC request (or re-send). */
- m = m_copym(mhead, 0, M_COPYALL, M_TRYWAIT);
+ m = m_copym(mhead, 0, M_COPYALL, 0);
if (m == NULL) {
error = ENOBUFS;
goto out;
@@ -465,9 +465,9 @@ xdr_string_encode(char *str, int len)
if (mlen > MCLBYTES) /* If too big, we just can't do it. */
return (NULL);
- m = m_get(M_TRYWAIT, MT_DATA);
+ m = m_get(0, MT_DATA);
if (mlen > MLEN) {
- MCLGET(m, M_TRYWAIT);
+ MCLGET(m, 0);
if ((m->m_flags & M_EXT) == 0) {
(void) m_free(m); /* There can be only one. */
return (NULL);
diff --git a/sys/nfsclient/nfs_lock.c b/sys/nfsclient/nfs_lock.c
index 67f049a..1e098db 100644
--- a/sys/nfsclient/nfs_lock.c
+++ b/sys/nfsclient/nfs_lock.c
@@ -114,7 +114,7 @@ nfs_dolock(struct vop_advlock_args *ap)
*/
if (p->p_nlminfo == NULL) {
MALLOC(p->p_nlminfo, struct nlminfo *,
- sizeof(struct nlminfo), M_LOCKF, M_WAITOK | M_ZERO);
+ sizeof(struct nlminfo), M_LOCKF, M_ZERO);
p->p_nlminfo->pid_start = p->p_stats->p_start;
}
msg.lm_msg_ident.pid_start = p->p_nlminfo->pid_start;
diff --git a/sys/nfsclient/nfs_node.c b/sys/nfsclient/nfs_node.c
index 30f4aff..b5ee0bd 100644
--- a/sys/nfsclient/nfs_node.c
+++ b/sys/nfsclient/nfs_node.c
@@ -224,7 +224,7 @@ loop:
* might cause a bogus v_data pointer to get dereferenced
* elsewhere if zalloc should block.
*/
- np = uma_zalloc(nfsnode_zone, M_WAITOK);
+ np = uma_zalloc(nfsnode_zone, 0);
error = getnewvnode("nfs", mntp, nfsv2_vnodeop_p, &nvp);
if (error) {
@@ -255,7 +255,7 @@ loop:
}
LIST_INSERT_HEAD(nhpp, np, n_hash);
if (fhsize > NFS_SMALLFH) {
- MALLOC(np->n_fhp, nfsfh_t *, fhsize, M_NFSBIGFH, M_WAITOK);
+ MALLOC(np->n_fhp, nfsfh_t *, fhsize, M_NFSBIGFH, 0);
} else
np->n_fhp = &np->n_fh;
bcopy((caddr_t)fhp, (caddr_t)np->n_fhp, fhsize);
diff --git a/sys/nfsclient/nfs_socket.c b/sys/nfsclient/nfs_socket.c
index 15cf946..cdf7cf1 100644
--- a/sys/nfsclient/nfs_socket.c
+++ b/sys/nfsclient/nfs_socket.c
@@ -525,7 +525,7 @@ tryagain:
goto tryagain;
}
while (rep->r_flags & R_MUSTRESEND) {
- m = m_copym(rep->r_mreq, 0, M_COPYALL, M_TRYWAIT);
+ m = m_copym(rep->r_mreq, 0, M_COPYALL, 0);
nfsstats.rpcretries++;
error = nfs_send(so, rep->r_nmp->nm_nam, m, rep);
if (error) {
@@ -864,7 +864,7 @@ nfs_request(struct vnode *vp, struct mbuf *mrest, int procnum,
return (ESTALE);
}
nmp = VFSTONFS(vp->v_mount);
- MALLOC(rep, struct nfsreq *, sizeof(struct nfsreq), M_NFSREQ, M_WAITOK);
+ MALLOC(rep, struct nfsreq *, sizeof(struct nfsreq), M_NFSREQ, 0);
rep->r_nmp = nmp;
rep->r_vp = vp;
rep->r_td = td;
@@ -887,7 +887,7 @@ nfs_request(struct vnode *vp, struct mbuf *mrest, int procnum,
* For stream protocols, insert a Sun RPC Record Mark.
*/
if (nmp->nm_sotype == SOCK_STREAM) {
- M_PREPEND(m, NFSX_UNSIGNED, M_TRYWAIT);
+ M_PREPEND(m, NFSX_UNSIGNED, 0);
*mtod(m, u_int32_t *) = htonl(0x80000000 |
(m->m_pkthdr.len - NFSX_UNSIGNED));
}
@@ -928,7 +928,7 @@ tryagain:
if (nmp->nm_soflags & PR_CONNREQUIRED)
error = nfs_sndlock(rep);
if (!error) {
- m2 = m_copym(m, 0, M_COPYALL, M_TRYWAIT);
+ m2 = m_copym(m, 0, M_COPYALL, 0);
error = nfs_send(nmp->nm_so, nmp->nm_nam, m2, rep);
if (nmp->nm_soflags & PR_CONNREQUIRED)
nfs_sndunlock(rep);
@@ -1130,7 +1130,7 @@ nfs_timer(void *arg)
((nmp->nm_flag & NFSMNT_DUMBTIMR) ||
(rep->r_flags & R_SENT) ||
nmp->nm_sent < nmp->nm_cwnd) &&
- (m = m_copym(rep->r_mreq, 0, M_COPYALL, M_DONTWAIT))){
+ (m = m_copym(rep->r_mreq, 0, M_COPYALL, M_NOWAIT))){
if ((nmp->nm_flag & NFSMNT_NOCONN) == 0)
error = (*so->so_proto->pr_usrreqs->pru_send)
(so, 0, m, NULL, NULL, td);
@@ -1377,9 +1377,9 @@ nfs_realign(struct mbuf **pm, int hsiz)
++nfs_realign_test;
while ((m = *pm) != NULL) {
if ((m->m_len & 0x3) || (mtod(m, intptr_t) & 0x3)) {
- MGET(n, M_TRYWAIT, MT_DATA);
+ MGET(n, 0, MT_DATA);
if (m->m_len >= MINCLSIZE) {
- MCLGET(n, M_TRYWAIT);
+ MCLGET(n, 0);
}
n->m_len = 0;
break;
diff --git a/sys/nfsclient/nfs_subs.c b/sys/nfsclient/nfs_subs.c
index 2318a04..178cbbb 100644
--- a/sys/nfsclient/nfs_subs.c
+++ b/sys/nfsclient/nfs_subs.c
@@ -142,9 +142,9 @@ nfsm_reqhead(struct vnode *vp, u_long procid, int hsiz)
{
struct mbuf *mb;
- MGET(mb, M_TRYWAIT, MT_DATA);
+ MGET(mb, 0, MT_DATA);
if (hsiz >= MINCLSIZE)
- MCLGET(mb, M_TRYWAIT);
+ MCLGET(mb, 0);
mb->m_len = 0;
return (mb);
}
@@ -168,9 +168,9 @@ nfsm_rpchead(struct ucred *cr, int nmflag, int procid, int auth_type,
int grpsiz, authsiz;
authsiz = nfsm_rndup(auth_len);
- MGETHDR(mb, M_TRYWAIT, MT_DATA);
+ MGETHDR(mb, 0, MT_DATA);
if ((authsiz + 10 * NFSX_UNSIGNED) >= MINCLSIZE) {
- MCLGET(mb, M_TRYWAIT);
+ MCLGET(mb, 0);
} else if ((authsiz + 10 * NFSX_UNSIGNED) < MHLEN) {
MH_ALIGN(mb, authsiz + 10 * NFSX_UNSIGNED);
} else {
@@ -271,9 +271,9 @@ nfsm_uiotombuf(struct uio *uiop, struct mbuf **mq, int siz, caddr_t *bpos)
while (left > 0) {
mlen = M_TRAILINGSPACE(mp);
if (mlen == 0) {
- MGET(mp, M_TRYWAIT, MT_DATA);
+ MGET(mp, 0, MT_DATA);
if (clflg)
- MCLGET(mp, M_TRYWAIT);
+ MCLGET(mp, 0);
mp->m_len = 0;
mp2->m_next = mp;
mp2 = mp;
@@ -304,7 +304,7 @@ nfsm_uiotombuf(struct uio *uiop, struct mbuf **mq, int siz, caddr_t *bpos)
}
if (rem > 0) {
if (rem > M_TRAILINGSPACE(mp)) {
- MGET(mp, M_TRYWAIT, MT_DATA);
+ MGET(mp, 0, MT_DATA);
mp->m_len = 0;
mp2->m_next = mp;
}
@@ -349,9 +349,9 @@ nfsm_strtmbuf(struct mbuf **mb, char **bpos, const char *cp, long siz)
}
/* Loop around adding mbufs */
while (siz > 0) {
- MGET(m1, M_TRYWAIT, MT_DATA);
+ MGET(m1, 0, MT_DATA);
if (siz > MLEN)
- MCLGET(m1, M_TRYWAIT);
+ MCLGET(m1, 0);
m1->m_len = NFSMSIZ(m1);
m2->m_next = m1;
m2 = m1;
@@ -716,7 +716,7 @@ nfs_getcookie(struct nfsnode *np, off_t off, int add)
if (!dp) {
if (add) {
MALLOC(dp, struct nfsdmap *, sizeof (struct nfsdmap),
- M_NFSDIROFF, M_WAITOK);
+ M_NFSDIROFF, 0);
dp->ndm_eocookie = 0;
LIST_INSERT_HEAD(&np->n_cookies, dp, ndm_list);
} else
@@ -731,7 +731,7 @@ nfs_getcookie(struct nfsnode *np, off_t off, int add)
dp = LIST_NEXT(dp, ndm_list);
} else if (add) {
MALLOC(dp2, struct nfsdmap *, sizeof (struct nfsdmap),
- M_NFSDIROFF, M_WAITOK);
+ M_NFSDIROFF, 0);
dp2->ndm_eocookie = 0;
LIST_INSERT_AFTER(dp, dp2, ndm_list);
dp = dp2;
diff --git a/sys/nfsclient/nfs_vfsops.c b/sys/nfsclient/nfs_vfsops.c
index 51f6330..037dfc6 100644
--- a/sys/nfsclient/nfs_vfsops.c
+++ b/sys/nfsclient/nfs_vfsops.c
@@ -808,7 +808,7 @@ mountnfs(struct nfs_args *argp, struct mount *mp, struct sockaddr *nam,
FREE(nam, M_SONAME);
return (0);
} else {
- nmp = uma_zalloc(nfsmount_zone, M_WAITOK);
+ nmp = uma_zalloc(nfsmount_zone, 0);
bzero((caddr_t)nmp, sizeof (struct nfsmount));
TAILQ_INIT(&nmp->nm_bufq);
mp->mnt_data = (qaddr_t)nmp;
diff --git a/sys/nfsclient/nfs_vnops.c b/sys/nfsclient/nfs_vnops.c
index 919f2a3..f47d9da 100644
--- a/sys/nfsclient/nfs_vnops.c
+++ b/sys/nfsclient/nfs_vnops.c
@@ -404,7 +404,7 @@ nfs_access(struct vop_access_args *ap)
error = nfs_readrpc(vp, &auio, ap->a_cred);
else if (vp->v_type == VDIR) {
char* bp;
- bp = malloc(NFS_DIRBLKSIZ, M_TEMP, M_WAITOK);
+ bp = malloc(NFS_DIRBLKSIZ, M_TEMP, 0);
aiov.iov_base = bp;
aiov.iov_len = auio.uio_resid = NFS_DIRBLKSIZ;
error = nfs_readdirrpc(vp, &auio, ap->a_cred);
@@ -2370,7 +2370,7 @@ nfs_sillyrename(struct vnode *dvp, struct vnode *vp, struct componentname *cnp)
panic("nfs: sillyrename dir");
#endif
MALLOC(sp, struct sillyrename *, sizeof (struct sillyrename),
- M_NFSREQ, M_WAITOK);
+ M_NFSREQ, 0);
sp->s_cred = crhold(cnp->cn_cred);
sp->s_dvp = dvp;
VREF(dvp);
@@ -2438,7 +2438,7 @@ nfs_lookitup(struct vnode *dvp, const char *name, int len, struct ucred *cred,
free((caddr_t)np->n_fhp, M_NFSBIGFH);
np->n_fhp = &np->n_fh;
} else if (np->n_fhsize <= NFS_SMALLFH && fhlen>NFS_SMALLFH)
- np->n_fhp =(nfsfh_t *)malloc(fhlen, M_NFSBIGFH, M_WAITOK);
+ np->n_fhp =(nfsfh_t *)malloc(fhlen, M_NFSBIGFH, 0);
bcopy((caddr_t)nfhp, (caddr_t)np->n_fhp, fhlen);
np->n_fhsize = fhlen;
newvp = NFSTOV(np);
diff --git a/sys/nfsserver/nfs_serv.c b/sys/nfsserver/nfs_serv.c
index 1d953cd..322b1d4 100644
--- a/sys/nfsserver/nfs_serv.c
+++ b/sys/nfsserver/nfs_serv.c
@@ -656,8 +656,8 @@ nfsrv_readlink(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
len = 0;
i = 0;
while (len < NFS_MAXPATHLEN) {
- MGET(nmp, M_TRYWAIT, MT_DATA);
- MCLGET(nmp, M_TRYWAIT);
+ MGET(nmp, 0, MT_DATA);
+ MCLGET(nmp, 0);
nmp->m_len = NFSMSIZ(nmp);
if (len == 0)
mp3 = mp = nmp;
@@ -899,15 +899,15 @@ nfsrv_read(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
i++;
}
if (left > 0) {
- MGET(m, M_TRYWAIT, MT_DATA);
- MCLGET(m, M_TRYWAIT);
+ MGET(m, 0, MT_DATA);
+ MCLGET(m, 0);
m->m_len = 0;
m2->m_next = m;
m2 = m;
}
}
MALLOC(iv, struct iovec *, i * sizeof (struct iovec),
- M_TEMP, M_WAITOK);
+ M_TEMP, 0);
uiop->uio_iov = iv2 = iv;
m = mb;
left = len;
@@ -1107,7 +1107,7 @@ nfsrv_write(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
if (len > 0) {
MALLOC(ivp, struct iovec *, cnt * sizeof (struct iovec), M_TEMP,
- M_WAITOK);
+ 0);
uiop->uio_iov = iv = ivp;
uiop->uio_iovcnt = cnt;
mp = mrep;
@@ -1404,7 +1404,7 @@ loop1:
}
uiop->uio_iovcnt = i;
MALLOC(iov, struct iovec *, i * sizeof (struct iovec),
- M_TEMP, M_WAITOK);
+ M_TEMP, 0);
uiop->uio_iov = ivp = iov;
mp = mrep;
while (mp) {
@@ -2551,7 +2551,7 @@ nfsrv_symlink(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
if (v3)
nfsm_srvsattr(vap);
nfsm_srvpathsiz(len2);
- MALLOC(pathcp, caddr_t, len2 + 1, M_TEMP, M_WAITOK);
+ MALLOC(pathcp, caddr_t, len2 + 1, M_TEMP, 0);
iv.iov_base = pathcp;
iv.iov_len = len2;
io.uio_resid = len2;
@@ -3059,7 +3059,7 @@ nfsrv_readdir(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
/*
* end section. Allocate rbuf and continue
*/
- MALLOC(rbuf, caddr_t, siz, M_TEMP, M_WAITOK);
+ MALLOC(rbuf, caddr_t, siz, M_TEMP, 0);
again:
iv.iov_base = rbuf;
iv.iov_len = fullsiz;
@@ -3337,7 +3337,7 @@ nfsrv_readdirplus(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
goto nfsmout;
}
VOP_UNLOCK(vp, 0, td);
- MALLOC(rbuf, caddr_t, siz, M_TEMP, M_WAITOK);
+ MALLOC(rbuf, caddr_t, siz, M_TEMP, 0);
again:
iv.iov_base = rbuf;
iv.iov_len = fullsiz;
diff --git a/sys/nfsserver/nfs_srvcache.c b/sys/nfsserver/nfs_srvcache.c
index 1986c0b..a9e84e9 100644
--- a/sys/nfsserver/nfs_srvcache.c
+++ b/sys/nfsserver/nfs_srvcache.c
@@ -193,7 +193,7 @@ loop:
} else if (rp->rc_flag & RC_REPMBUF) {
nfsrvstats.srvcache_nonidemdonehits++;
*repp = m_copym(rp->rc_reply, 0, M_COPYALL,
- M_TRYWAIT);
+ 0);
ret = RC_REPLY;
} else {
nfsrvstats.srvcache_idemdonehits++;
@@ -212,7 +212,7 @@ loop:
NFS_DPF(RC, ("M%03x", nd->nd_retxid & 0xfff));
if (numnfsrvcache < desirednfsrvcache) {
rp = (struct nfsrvcache *)malloc((u_long)sizeof *rp,
- M_NFSD, M_WAITOK | M_ZERO);
+ M_NFSD, M_ZERO);
numnfsrvcache++;
rp->rc_flag = RC_LOCKED;
} else {
@@ -303,7 +303,7 @@ loop:
rp->rc_flag |= RC_REPSTATUS;
} else {
rp->rc_reply = m_copym(repmbuf,
- 0, M_COPYALL, M_TRYWAIT);
+ 0, M_COPYALL, 0);
rp->rc_flag |= RC_REPMBUF;
}
}
diff --git a/sys/nfsserver/nfs_srvsock.c b/sys/nfsserver/nfs_srvsock.c
index bf4e985..e17e023 100644
--- a/sys/nfsserver/nfs_srvsock.c
+++ b/sys/nfsserver/nfs_srvsock.c
@@ -148,7 +148,7 @@ nfs_rephead(int siz, struct nfsrv_descript *nd, int err,
nd->nd_repstat = err;
if (err && (nd->nd_flag & ND_NFSV3) == 0) /* XXX recheck */
siz = 0;
- MGETHDR(mreq, M_TRYWAIT, MT_DATA);
+ MGETHDR(mreq, 0, MT_DATA);
mb = mreq;
/*
* If this is a big reply, use a cluster else
@@ -157,7 +157,7 @@ nfs_rephead(int siz, struct nfsrv_descript *nd, int err,
mreq->m_len = 6 * NFSX_UNSIGNED;
siz += RPC_REPLYSIZ;
if ((max_hdr + siz) >= MINCLSIZE) {
- MCLGET(mreq, M_TRYWAIT);
+ MCLGET(mreq, 0);
} else
mreq->m_data += min(max_hdr, M_TRAILINGSPACE(mreq));
tl = mtod(mreq, u_int32_t *);
@@ -244,9 +244,9 @@ nfs_realign(struct mbuf **pm, int hsiz) /* XXX COMMON */
++nfs_realign_test;
while ((m = *pm) != NULL) {
if ((m->m_len & 0x3) || (mtod(m, intptr_t) & 0x3)) {
- MGET(n, M_TRYWAIT, MT_DATA);
+ MGET(n, 0, MT_DATA);
if (m->m_len >= MINCLSIZE) {
- MCLGET(n, M_TRYWAIT);
+ MCLGET(n, 0);
}
n->m_len = 0;
break;
@@ -403,7 +403,7 @@ nfsmout:
* Socket upcall routine for the nfsd sockets.
* The caddr_t arg is a pointer to the "struct nfssvc_sock".
* Essentially do as much as possible non-blocking, else punt and it will
- * be called with M_TRYWAIT from an nfsd.
+ * be called without M_NOWAIT from an nfsd.
*/
void
nfsrv_rcv(struct socket *so, void *arg, int waitflag)
@@ -421,7 +421,7 @@ nfsrv_rcv(struct socket *so, void *arg, int waitflag)
/*
* Define this to test for nfsds handling this under heavy load.
*/
- if (waitflag == M_DONTWAIT) {
+ if (waitflag == M_NOWAIT) {
slp->ns_flag |= SLP_NEEDQ;
goto dorecs;
}
@@ -433,7 +433,7 @@ nfsrv_rcv(struct socket *so, void *arg, int waitflag)
* to an nfsd so that there is feedback to the TCP layer that
* the nfs servers are heavily loaded.
*/
- if (STAILQ_FIRST(&slp->ns_rec) && waitflag == M_DONTWAIT) {
+ if (STAILQ_FIRST(&slp->ns_rec) && waitflag == M_NOWAIT) {
slp->ns_flag |= SLP_NEEDQ;
goto dorecs;
}
@@ -509,7 +509,7 @@ nfsrv_rcv(struct socket *so, void *arg, int waitflag)
* Now try and process the request records, non-blocking.
*/
dorecs:
- if (waitflag == M_DONTWAIT &&
+ if (waitflag == M_NOWAIT &&
(STAILQ_FIRST(&slp->ns_rec)
|| (slp->ns_flag & (SLP_NEEDQ | SLP_DISCONN))))
nfsrv_wakenfsd(slp);
@@ -667,7 +667,7 @@ nfsrv_dorec(struct nfssvc_sock *slp, struct nfsd *nfsd,
m = rec->nr_packet;
free(rec, M_NFSRVDESC);
MALLOC(nd, struct nfsrv_descript *, sizeof (struct nfsrv_descript),
- M_NFSRVDESC, M_WAITOK);
+ M_NFSRVDESC, 0);
nd->nd_md = nd->nd_mrep = m;
nd->nd_nam2 = nam;
nd->nd_dpos = mtod(m, caddr_t);
diff --git a/sys/nfsserver/nfs_srvsubs.c b/sys/nfsserver/nfs_srvsubs.c
index 5ac51ad..9ad6af1 100644
--- a/sys/nfsserver/nfs_srvsubs.c
+++ b/sys/nfsserver/nfs_srvsubs.c
@@ -605,7 +605,7 @@ nfs_namei(struct nameidata *ndp, fhandle_t *fhp, int len,
*retdirp = NULL;
cnp->cn_flags |= NOMACCHECK;
- cnp->cn_pnbuf = uma_zalloc(namei_zone, M_WAITOK);
+ cnp->cn_pnbuf = uma_zalloc(namei_zone, 0);
/*
* Copy the name from the mbuf list to ndp->ni_pnbuf
@@ -670,7 +670,7 @@ nfs_namei(struct nameidata *ndp, fhandle_t *fhp, int len,
* Oh joy. For WebNFS, handle those pesky '%' escapes,
* and the 'native path' indicator.
*/
- cp = uma_zalloc(namei_zone, M_WAITOK);
+ cp = uma_zalloc(namei_zone, 0);
fromcp = cnp->cn_pnbuf;
tocp = cp;
if ((unsigned char)*fromcp >= WEBNFS_SPECCHAR_START) {
@@ -779,7 +779,7 @@ nfs_namei(struct nameidata *ndp, fhandle_t *fhp, int len,
goto badlink2;
}
if (ndp->ni_pathlen > 1)
- cp = uma_zalloc(namei_zone, M_WAITOK);
+ cp = uma_zalloc(namei_zone, 0);
else
cp = cnp->cn_pnbuf;
aiov.iov_base = cp;
@@ -1287,8 +1287,8 @@ nfsm_clget_xx(u_int32_t **tl, struct mbuf *mb, struct mbuf **mp,
if (*bp >= *be) {
if (*mp == mb)
(*mp)->m_len += *bp - bpos;
- MGET(nmp, M_TRYWAIT, MT_DATA);
- MCLGET(nmp, M_TRYWAIT);
+ MGET(nmp, 0, MT_DATA);
+ MCLGET(nmp, 0);
nmp->m_len = NFSMSIZ(nmp);
(*mp)->m_next = nmp;
*mp = nmp;
diff --git a/sys/nfsserver/nfs_syscalls.c b/sys/nfsserver/nfs_syscalls.c
index cf9bf90..b41a5f7 100644
--- a/sys/nfsserver/nfs_syscalls.c
+++ b/sys/nfsserver/nfs_syscalls.c
@@ -262,7 +262,7 @@ nfssvc_addsock(struct file *fp, struct sockaddr *mynam, struct thread *td)
slp = (struct nfssvc_sock *)
malloc(sizeof (struct nfssvc_sock), M_NFSSVC,
- M_WAITOK | M_ZERO);
+ M_ZERO);
STAILQ_INIT(&slp->ns_rec);
TAILQ_INSERT_TAIL(&nfssvc_sockhead, slp, ns_chain);
@@ -301,7 +301,7 @@ nfssvc_nfsd(struct thread *td)
writes_todo = 0;
#endif
nfsd = (struct nfsd *)
- malloc(sizeof (struct nfsd), M_NFSD, M_WAITOK | M_ZERO);
+ malloc(sizeof (struct nfsd), M_NFSD, M_ZERO);
s = splnet();
nfsd->nfsd_td = td;
TAILQ_INSERT_TAIL(&nfsd_head, nfsd, nfsd_chain);
@@ -345,7 +345,7 @@ nfssvc_nfsd(struct thread *td)
slp->ns_flag &= ~SLP_NEEDQ;
(void) nfs_slplock(slp, 1);
nfsrv_rcv(slp->ns_so, (caddr_t)slp,
- M_TRYWAIT);
+ 0);
nfs_slpunlock(slp);
}
error = nfsrv_dorec(slp, nfsd, &nd);
@@ -471,7 +471,7 @@ nfssvc_nfsd(struct thread *td)
* Record Mark.
*/
if (sotype == SOCK_STREAM) {
- M_PREPEND(m, NFSX_UNSIGNED, M_TRYWAIT);
+ M_PREPEND(m, NFSX_UNSIGNED, 0);
*mtod(m, u_int32_t *) = htonl(0x80000000 | siz);
}
if (slp->ns_so->so_proto->pr_flags & PR_CONNREQUIRED)
@@ -671,12 +671,12 @@ nfsrv_init(int terminating)
#if 0
nfs_udpsock = (struct nfssvc_sock *)
- malloc(sizeof (struct nfssvc_sock), M_NFSSVC, M_WAITOK | M_ZERO);
+ malloc(sizeof (struct nfssvc_sock), M_NFSSVC, M_ZERO);
STAILQ_INIT(&nfs_udpsock->ns_rec);
TAILQ_INSERT_HEAD(&nfssvc_sockhead, nfs_udpsock, ns_chain);
nfs_cltpsock = (struct nfssvc_sock *)
- malloc(sizeof (struct nfssvc_sock), M_NFSSVC, M_WAITOK | M_ZERO);
+ malloc(sizeof (struct nfssvc_sock), M_NFSSVC, M_ZERO);
STAILQ_INIT(&nfs_cltpsock->ns_rec);
TAILQ_INSERT_TAIL(&nfssvc_sockhead, nfs_cltpsock, ns_chain);
#endif
diff --git a/sys/opencrypto/cryptodev.c b/sys/opencrypto/cryptodev.c
index 8b51d69..1b8a338 100644
--- a/sys/opencrypto/cryptodev.c
+++ b/sys/opencrypto/cryptodev.c
@@ -228,7 +228,7 @@ cryptof_ioctl(
}
MALLOC(crie.cri_key, u_int8_t *,
- crie.cri_klen / 8, M_XDATA, M_WAITOK);
+ crie.cri_klen / 8, M_XDATA, 0);
if ((error = copyin(sop->key, crie.cri_key,
crie.cri_klen / 8)))
goto bail;
@@ -246,7 +246,7 @@ cryptof_ioctl(
if (cria.cri_klen) {
MALLOC(cria.cri_key, u_int8_t *,
- cria.cri_klen / 8, M_XDATA, M_WAITOK);
+ cria.cri_klen / 8, M_XDATA, 0);
if ((error = copyin(sop->mackey, cria.cri_key,
cria.cri_klen / 8)))
goto bail;
@@ -332,7 +332,7 @@ cryptodev_op(
cse->uio.uio_iov = cse->iovec;
bzero(&cse->iovec, sizeof(cse->iovec));
cse->uio.uio_iov[0].iov_len = cop->len;
- cse->uio.uio_iov[0].iov_base = malloc(cop->len, M_XDATA, M_WAITOK);
+ cse->uio.uio_iov[0].iov_base = malloc(cop->len, M_XDATA, 0);
for (i = 0; i < cse->uio.uio_iovcnt; i++)
cse->uio.uio_resid += cse->uio.uio_iov[0].iov_len;
@@ -512,7 +512,7 @@ cryptodev_key(struct crypt_kop *kop)
return (EINVAL);
}
- krp = (struct cryptkop *)malloc(sizeof *krp, M_XDATA, M_WAITOK);
+ krp = (struct cryptkop *)malloc(sizeof *krp, M_XDATA, 0);
if (!krp)
return (ENOMEM);
bzero(krp, sizeof *krp);
@@ -529,7 +529,7 @@ cryptodev_key(struct crypt_kop *kop)
size = (krp->krp_param[i].crp_nbits + 7) / 8;
if (size == 0)
continue;
- MALLOC(krp->krp_param[i].crp_p, caddr_t, size, M_XDATA, M_WAITOK);
+ MALLOC(krp->krp_param[i].crp_p, caddr_t, size, M_XDATA, 0);
if (i >= krp->krp_iparams)
continue;
error = copyin(kop->crk_param[i].crp_p, krp->krp_param[i].crp_p, size);
@@ -719,7 +719,7 @@ cryptoioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
switch (cmd) {
case CRIOGET:
MALLOC(fcr, struct fcrypt *,
- sizeof(struct fcrypt), M_XDATA, M_WAITOK);
+ sizeof(struct fcrypt), M_XDATA, 0);
TAILQ_INIT(&fcr->csessions);
fcr->sesn = 0;
diff --git a/sys/pc98/cbus/scvtb.c b/sys/pc98/cbus/scvtb.c
index 2d0ea3f..05d5e5e 100644
--- a/sys/pc98/cbus/scvtb.c
+++ b/sys/pc98/cbus/scvtb.c
@@ -103,7 +103,7 @@ sc_vtb_init(sc_vtb_t *vtb, int type, int cols, int rows, void *buf, int wait)
vtb->vtb_buffer =
(vm_offset_t)malloc(cols*rows*sizeof(u_int16_t)*2,
M_DEVBUF,
- ((wait) ? M_WAITOK : M_NOWAIT) | M_ZERO);
+ ((wait) ? 0 : M_NOWAIT) | M_ZERO);
if (vtb->vtb_buffer != 0) {
vtb->vtb_flags |= VTB_ALLOCED;
}
diff --git a/sys/pc98/pc98/scvtbpc98.c b/sys/pc98/pc98/scvtbpc98.c
index 2d0ea3f..05d5e5e 100644
--- a/sys/pc98/pc98/scvtbpc98.c
+++ b/sys/pc98/pc98/scvtbpc98.c
@@ -103,7 +103,7 @@ sc_vtb_init(sc_vtb_t *vtb, int type, int cols, int rows, void *buf, int wait)
vtb->vtb_buffer =
(vm_offset_t)malloc(cols*rows*sizeof(u_int16_t)*2,
M_DEVBUF,
- ((wait) ? M_WAITOK : M_NOWAIT) | M_ZERO);
+ ((wait) ? 0 : M_NOWAIT) | M_ZERO);
if (vtb->vtb_buffer != 0) {
vtb->vtb_flags |= VTB_ALLOCED;
}
diff --git a/sys/pc98/pc98/spkr.c b/sys/pc98/pc98/spkr.c
index 3e3f437..db60e82 100644
--- a/sys/pc98/pc98/spkr.c
+++ b/sys/pc98/pc98/spkr.c
@@ -503,7 +503,7 @@ spkropen(dev, flags, fmt, td)
(void) printf("spkropen: about to perform play initialization\n");
#endif /* DEBUG */
playinit();
- spkr_inbuf = malloc(DEV_BSIZE, M_SPKR, M_WAITOK);
+ spkr_inbuf = malloc(DEV_BSIZE, M_SPKR, 0);
spkr_active = TRUE;
return(0);
}
diff --git a/sys/pc98/pc98/syscons.c b/sys/pc98/pc98/syscons.c
index 55ce644..847ec74 100644
--- a/sys/pc98/pc98/syscons.c
+++ b/sys/pc98/pc98/syscons.c
@@ -315,7 +315,7 @@ sc_attach_unit(int unit, int flags)
/* assert(sc_console->ts != NULL); */
kernel_console_ts = sc_console->ts;
sc_console->ts = malloc(sc_console->tsw->te_size,
- M_DEVBUF, M_WAITOK);
+ M_DEVBUF, 0);
bcopy(kernel_console_ts, sc_console->ts, sc_console->tsw->te_size);
(*sc_console->tsw->te_default_attr)(sc_console,
user_default.std_color,
@@ -2696,9 +2696,9 @@ scinit(int unit, int flags)
sc->font_16 = font_16;
} else if (sc->font_8 == NULL) {
/* assert(sc_malloc) */
- sc->font_8 = malloc(sizeof(font_8), M_DEVBUF, M_WAITOK);
- sc->font_14 = malloc(sizeof(font_14), M_DEVBUF, M_WAITOK);
- sc->font_16 = malloc(sizeof(font_16), M_DEVBUF, M_WAITOK);
+ sc->font_8 = malloc(sizeof(font_8), M_DEVBUF, 0);
+ sc->font_14 = malloc(sizeof(font_14), M_DEVBUF, 0);
+ sc->font_16 = malloc(sizeof(font_16), M_DEVBUF, 0);
}
#endif
@@ -2725,7 +2725,7 @@ scinit(int unit, int flags)
kernel_default.rev_color);
} else {
/* assert(sc_malloc) */
- sc->dev = malloc(sizeof(dev_t)*sc->vtys, M_DEVBUF, M_WAITOK|M_ZERO);
+ sc->dev = malloc(sizeof(dev_t)*sc->vtys, M_DEVBUF, M_ZERO);
sc->dev[0] = makedev(CDEV_MAJOR, unit*MAXCONS);
sc->dev[0]->si_tty = ttymalloc(sc->dev[0]->si_tty);
scp = alloc_scp(sc, sc->first_vty);
@@ -2945,7 +2945,7 @@ static scr_stat
/* assert(sc_malloc) */
- scp = (scr_stat *)malloc(sizeof(scr_stat), M_DEVBUF, M_WAITOK);
+ scp = (scr_stat *)malloc(sizeof(scr_stat), M_DEVBUF, 0);
init_scp(sc, vty, scp);
sc_alloc_scr_buffer(scp, TRUE, TRUE);
diff --git a/sys/pccard/pccard.c b/sys/pccard/pccard.c
index 6115271..bf426fb 100644
--- a/sys/pccard/pccard.c
+++ b/sys/pccard/pccard.c
@@ -216,7 +216,7 @@ allocate_driver(struct slot *slt, struct dev_desc *desc)
}
irq = ffs(desc->irqmask) - 1;
MALLOC(devi, struct pccard_devinfo *, sizeof(*devi), M_DEVBUF,
- M_WAITOK | M_ZERO);
+ M_ZERO);
strcpy(devi->name, desc->name);
/*
* Create an entry for the device under this slot.
diff --git a/sys/pci/agp.c b/sys/pci/agp.c
index 2281334..ddd29b9 100644
--- a/sys/pci/agp.c
+++ b/sys/pci/agp.c
@@ -351,7 +351,7 @@ agp_generic_alloc_memory(device_t dev, int type, vm_size_t size)
return 0;
}
- mem = malloc(sizeof *mem, M_AGP, M_WAITOK);
+ mem = malloc(sizeof *mem, M_AGP, 0);
mem->am_id = sc->as_nextid++;
mem->am_size = size;
mem->am_type = 0;
diff --git a/sys/pci/agp_i810.c b/sys/pci/agp_i810.c
index dba76a9..d7c42f4 100644
--- a/sys/pci/agp_i810.c
+++ b/sys/pci/agp_i810.c
@@ -500,7 +500,7 @@ agp_i810_alloc_memory(device_t dev, int type, vm_size_t size)
return 0;
}
- mem = malloc(sizeof *mem, M_AGP, M_WAITOK);
+ mem = malloc(sizeof *mem, M_AGP, 0);
mem->am_id = sc->agp.as_nextid++;
mem->am_size = size;
mem->am_type = type;
diff --git a/sys/pci/if_dc.c b/sys/pci/if_dc.c
index a9e599e..2aa4e33 100644
--- a/sys/pci/if_dc.c
+++ b/sys/pci/if_dc.c
@@ -2423,11 +2423,11 @@ dc_newbuf(sc, i, m)
c = &sc->dc_ldata->dc_rx_list[i];
if (m == NULL) {
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL)
return(ENOBUFS);
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (!(m_new->m_flags & M_EXT)) {
m_freem(m_new);
return(ENOBUFS);
@@ -3186,11 +3186,11 @@ dc_coal(sc, m_head)
struct mbuf *m_new, *m;
m = *m_head;
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL)
return(ENOBUFS);
if (m->m_pkthdr.len > MHLEN) {
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (!(m_new->m_flags & M_EXT)) {
m_freem(m_new);
return(ENOBUFS);
diff --git a/sys/pci/if_de.c b/sys/pci/if_de.c
index d186586..9e1e319 100644
--- a/sys/pci/if_de.c
+++ b/sys/pci/if_de.c
@@ -195,7 +195,7 @@ tulip_txprobe(
* either is connected so the transmit is the only way
* to verify the connectivity.
*/
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return 0;
/*
@@ -3545,12 +3545,12 @@ tulip_rx_intr(
*/
if (accept || ms == NULL) {
struct mbuf *m0;
- MGETHDR(m0, M_DONTWAIT, MT_DATA);
+ MGETHDR(m0, M_NOWAIT, MT_DATA);
if (m0 != NULL) {
#if defined(TULIP_COPY_RXDATA)
if (!accept || total_len >= (MHLEN - 2)) {
#endif
- MCLGET(m0, M_DONTWAIT);
+ MCLGET(m0, M_NOWAIT);
if ((m0->m_flags & M_EXT) == 0) {
m_freem(m0);
m0 = NULL;
@@ -4061,10 +4061,10 @@ tulip_mbuf_compress(
{
struct mbuf *m0;
#if MCLBYTES >= ETHERMTU + 18 && !defined(BIG_PACKET)
- MGETHDR(m0, M_DONTWAIT, MT_DATA);
+ MGETHDR(m0, M_NOWAIT, MT_DATA);
if (m0 != NULL) {
if (m->m_pkthdr.len > MHLEN) {
- MCLGET(m0, M_DONTWAIT);
+ MCLGET(m0, M_NOWAIT);
if ((m0->m_flags & M_EXT) == 0) {
m_freem(m);
m_freem(m0);
@@ -4081,9 +4081,9 @@ tulip_mbuf_compress(
while (len > 0) {
if (mlen == MHLEN) {
- MGETHDR(*mp, M_DONTWAIT, MT_DATA);
+ MGETHDR(*mp, M_NOWAIT, MT_DATA);
} else {
- MGET(*mp, M_DONTWAIT, MT_DATA);
+ MGET(*mp, M_NOWAIT, MT_DATA);
}
if (*mp == NULL) {
m_freem(m0);
@@ -4091,7 +4091,7 @@ tulip_mbuf_compress(
break;
}
if (len > MLEN) {
- MCLGET(*mp, M_DONTWAIT);
+ MCLGET(*mp, M_NOWAIT);
if (((*mp)->m_flags & M_EXT) == 0) {
m_freem(m0);
m0 = NULL;
diff --git a/sys/pci/if_mn.c b/sys/pci/if_mn.c
index b809d6b..7ed07d1 100644
--- a/sys/pci/if_mn.c
+++ b/sys/pci/if_mn.c
@@ -695,7 +695,7 @@ ngmn_connect(hook_p hook)
/* Setup a transmit chain with one descriptor */
/* XXX: we actually send a 1 byte packet */
dp = mn_alloc_desc();
- MGETHDR(m, M_TRYWAIT, MT_DATA);
+ MGETHDR(m, 0, MT_DATA);
if (m == NULL)
return ENOBUFS;
m->m_pkthdr.len = 0;
@@ -712,12 +712,12 @@ ngmn_connect(hook_p hook)
dp = mn_alloc_desc();
m = NULL;
- MGETHDR(m, M_TRYWAIT, MT_DATA);
+ MGETHDR(m, 0, MT_DATA);
if (m == NULL) {
mn_free_desc(dp);
return (ENOBUFS);
}
- MCLGET(m, M_TRYWAIT);
+ MCLGET(m, 0);
if ((m->m_flags & M_EXT) == 0) {
mn_free_desc(dp);
m_freem(m);
@@ -735,13 +735,13 @@ ngmn_connect(hook_p hook)
dp2 = dp;
dp = mn_alloc_desc();
m = NULL;
- MGETHDR(m, M_TRYWAIT, MT_DATA);
+ MGETHDR(m, 0, MT_DATA);
if (m == NULL) {
mn_free_desc(dp);
m_freem(m);
return (ENOBUFS);
}
- MCLGET(m, M_TRYWAIT);
+ MCLGET(m, 0);
if ((m->m_flags & M_EXT) == 0) {
mn_free_desc(dp);
m_freem(m);
@@ -839,7 +839,7 @@ mn_create_channel(struct mn_softc *sc, int chan)
struct schan *sch;
sch = sc->ch[chan] = (struct schan *)malloc(sizeof *sc->ch[chan],
- M_MN, M_WAITOK | M_ZERO);
+ M_MN, M_ZERO);
sch->sc = sc;
sch->state = DOWN;
sch->chan = chan;
@@ -1183,12 +1183,12 @@ mn_rx_intr(struct mn_softc *sc, u_int32_t vector)
/* Replenish desc + mbuf supplies */
if (!m) {
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
mn_free_desc(dp);
return; /* ENOBUFS */
}
- MCLGET(m, M_DONTWAIT);
+ MCLGET(m, M_NOWAIT);
if((m->m_flags & M_EXT) == 0) {
mn_free_desc(dp);
m_freem(m);
@@ -1340,7 +1340,7 @@ mn_attach (device_t self)
once++;
}
- sc = (struct mn_softc *)malloc(sizeof *sc, M_MN, M_WAITOK | M_ZERO);
+ sc = (struct mn_softc *)malloc(sizeof *sc, M_MN, M_ZERO);
device_set_softc(self, sc);
sc->dev = self;
diff --git a/sys/pci/if_pcn.c b/sys/pci/if_pcn.c
index 14abc27..009fe46 100644
--- a/sys/pci/if_pcn.c
+++ b/sys/pci/if_pcn.c
@@ -776,11 +776,11 @@ pcn_newbuf(sc, idx, m)
c = &sc->pcn_ldata->pcn_rx_list[idx];
if (m == NULL) {
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL)
return(ENOBUFS);
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (!(m_new->m_flags & M_EXT)) {
m_freem(m_new);
return(ENOBUFS);
diff --git a/sys/pci/if_rl.c b/sys/pci/if_rl.c
index e05cbcd..e1713bb 100644
--- a/sys/pci/if_rl.c
+++ b/sys/pci/if_rl.c
@@ -1500,11 +1500,11 @@ rl_encap(sc, m_head)
* per packet. We have to copy pretty much all the time.
*/
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL)
return(1);
if (m_head->m_pkthdr.len > MHLEN) {
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (!(m_new->m_flags & M_EXT)) {
m_freem(m_new);
return(1);
diff --git a/sys/pci/if_sf.c b/sys/pci/if_sf.c
index a148ba5..7b63a01 100644
--- a/sys/pci/if_sf.c
+++ b/sys/pci/if_sf.c
@@ -924,11 +924,11 @@ sf_newbuf(sc, c, m)
struct mbuf *m_new = NULL;
if (m == NULL) {
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL)
return(ENOBUFS);
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (!(m_new->m_flags & M_EXT)) {
m_freem(m_new);
return(ENOBUFS);
@@ -1304,14 +1304,14 @@ sf_encap(sc, c, m_head)
if (m != NULL) {
struct mbuf *m_new = NULL;
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL) {
printf("sf%d: no memory for tx list\n", sc->sf_unit);
return(1);
}
if (m_head->m_pkthdr.len > MHLEN) {
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (!(m_new->m_flags & M_EXT)) {
m_freem(m_new);
printf("sf%d: no memory for tx list\n",
diff --git a/sys/pci/if_sis.c b/sys/pci/if_sis.c
index 0f8e392..4f4cce0 100644
--- a/sys/pci/if_sis.c
+++ b/sys/pci/if_sis.c
@@ -1481,7 +1481,7 @@ sis_newbuf(sc, c, m)
return(EINVAL);
if (m == NULL) {
- m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL)
return(ENOBUFS);
} else
diff --git a/sys/pci/if_sk.c b/sys/pci/if_sk.c
index e58d1c4..3aa40e7 100644
--- a/sys/pci/if_sk.c
+++ b/sys/pci/if_sk.c
@@ -688,7 +688,7 @@ sk_newbuf(sc_if, c, m)
if (m == NULL) {
caddr_t *buf = NULL;
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL)
return(ENOBUFS);
diff --git a/sys/pci/if_ste.c b/sys/pci/if_ste.c
index 370b0f5..4e5e9b7 100644
--- a/sys/pci/if_ste.c
+++ b/sys/pci/if_ste.c
@@ -1142,10 +1142,10 @@ ste_newbuf(sc, c, m)
struct mbuf *m_new = NULL;
if (m == NULL) {
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL)
return(ENOBUFS);
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (!(m_new->m_flags & M_EXT)) {
m_freem(m_new);
return(ENOBUFS);
@@ -1519,13 +1519,13 @@ encap_retry:
* mbuf chain first. Bail out if we can't get the
* new buffers. Code borrowed from if_fxp.c
*/
- MGETHDR(mn, M_DONTWAIT, MT_DATA);
+ MGETHDR(mn, M_NOWAIT, MT_DATA);
if (mn == NULL) {
m_freem(m_head);
return ENOMEM;
}
if (m_head->m_pkthdr.len > MHLEN) {
- MCLGET(mn, M_DONTWAIT);
+ MCLGET(mn, M_NOWAIT);
if ((mn->m_flags & M_EXT) == 0) {
m_freem(mn);
m_freem(m_head);
diff --git a/sys/pci/if_ti.c b/sys/pci/if_ti.c
index a384322..894ac43 100644
--- a/sys/pci/if_ti.c
+++ b/sys/pci/if_ti.c
@@ -1130,11 +1130,11 @@ ti_newbuf_std(sc, i, m)
struct ti_rx_desc *r;
if (m == NULL) {
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL)
return(ENOBUFS);
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (!(m_new->m_flags & M_EXT)) {
m_freem(m_new);
return(ENOBUFS);
@@ -1174,7 +1174,7 @@ ti_newbuf_mini(sc, i, m)
struct ti_rx_desc *r;
if (m == NULL) {
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL) {
return(ENOBUFS);
}
@@ -1218,7 +1218,7 @@ ti_newbuf_jumbo(sc, i, m)
caddr_t *buf = NULL;
/* Allocate the mbuf. */
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL) {
return(ENOBUFS);
}
@@ -1300,19 +1300,19 @@ ti_newbuf_jumbo(sc, idx, m_old)
}
} else {
/* Allocate the mbufs. */
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL) {
printf("ti%d: mbuf allocation failed "
"-- packet dropped!\n", sc->ti_unit);
goto nobufs;
}
- MGET(m[NPAYLOAD], M_DONTWAIT, MT_DATA);
+ MGET(m[NPAYLOAD], M_NOWAIT, MT_DATA);
if (m[NPAYLOAD] == NULL) {
printf("ti%d: cluster mbuf allocation failed "
"-- packet dropped!\n", sc->ti_unit);
goto nobufs;
}
- MCLGET(m[NPAYLOAD], M_DONTWAIT);
+ MCLGET(m[NPAYLOAD], M_NOWAIT);
if ((m[NPAYLOAD]->m_flags & M_EXT) == 0) {
printf("ti%d: mbuf allocation failed "
"-- packet dropped!\n", sc->ti_unit);
@@ -1321,7 +1321,7 @@ ti_newbuf_jumbo(sc, idx, m_old)
m[NPAYLOAD]->m_len = MCLBYTES;
for (i = 0; i < NPAYLOAD; i++){
- MGET(m[i], M_DONTWAIT, MT_DATA);
+ MGET(m[i], M_NOWAIT, MT_DATA);
if (m[i] == NULL) {
printf("ti%d: mbuf allocation failed "
"-- packet dropped!\n", sc->ti_unit);
diff --git a/sys/pci/if_tl.c b/sys/pci/if_tl.c
index 0fc990a..682bbef 100644
--- a/sys/pci/if_tl.c
+++ b/sys/pci/if_tl.c
@@ -1459,11 +1459,11 @@ tl_newbuf(sc, c)
{
struct mbuf *m_new = NULL;
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL)
return(ENOBUFS);
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (!(m_new->m_flags & M_EXT)) {
m_freem(m_new);
return(ENOBUFS);
@@ -1909,13 +1909,13 @@ tl_encap(sc, c, m_head)
if (m != NULL) {
struct mbuf *m_new = NULL;
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL) {
if_printf(ifp, "no memory for tx list\n");
return(1);
}
if (m_head->m_pkthdr.len > MHLEN) {
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (!(m_new->m_flags & M_EXT)) {
m_freem(m_new);
if_printf(ifp, "no memory for tx list\n");
diff --git a/sys/pci/if_vr.c b/sys/pci/if_vr.c
index 407abf1..01b1992 100644
--- a/sys/pci/if_vr.c
+++ b/sys/pci/if_vr.c
@@ -948,11 +948,11 @@ vr_newbuf(sc, c, m)
struct mbuf *m_new = NULL;
if (m == NULL) {
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL)
return(ENOBUFS);
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (!(m_new->m_flags & M_EXT)) {
m_freem(m_new);
return(ENOBUFS);
@@ -1292,13 +1292,13 @@ vr_encap(sc, c, m_head)
if (m != NULL) {
struct mbuf *m_new = NULL;
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL) {
printf("vr%d: no memory for tx list\n", sc->vr_unit);
return(1);
}
if (m_head->m_pkthdr.len > MHLEN) {
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (!(m_new->m_flags & M_EXT)) {
m_freem(m_new);
printf("vr%d: no memory for tx list\n",
diff --git a/sys/pci/if_wb.c b/sys/pci/if_wb.c
index 30618af..0ceaecb 100644
--- a/sys/pci/if_wb.c
+++ b/sys/pci/if_wb.c
@@ -1112,7 +1112,7 @@ wb_newbuf(sc, c, m)
struct mbuf *m_new = NULL;
if (m == NULL) {
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL)
return(ENOBUFS);
m_new->m_data = c->wb_buf;
@@ -1467,11 +1467,11 @@ wb_encap(sc, c, m_head)
if (m != NULL) {
struct mbuf *m_new = NULL;
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL)
return(1);
if (m_head->m_pkthdr.len > MHLEN) {
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (!(m_new->m_flags & M_EXT)) {
m_freem(m_new);
return(1);
diff --git a/sys/pci/if_xl.c b/sys/pci/if_xl.c
index 85011d2..203f9ba 100644
--- a/sys/pci/if_xl.c
+++ b/sys/pci/if_xl.c
@@ -931,7 +931,7 @@ xl_testpacket(sc)
ifp = &sc->arpcom.ac_if;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL)
return;
@@ -1931,11 +1931,11 @@ xl_newbuf(sc, c)
int error;
u_int32_t baddr;
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL)
return(ENOBUFS);
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (!(m_new->m_flags & M_EXT)) {
m_freem(m_new);
return(ENOBUFS);
@@ -2432,14 +2432,14 @@ xl_encap(sc, c, m_head)
if (error) {
struct mbuf *m_new = NULL;
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL) {
m_freem(m_head);
printf("xl%d: no memory for tx list\n", sc->xl_unit);
return(1);
}
if (m_head->m_pkthdr.len > MHLEN) {
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (!(m_new->m_flags & M_EXT)) {
m_freem(m_new);
m_freem(m_head);
diff --git a/sys/pci/ncr.c b/sys/pci/ncr.c
index bd7b5c3..e91a392 100644
--- a/sys/pci/ncr.c
+++ b/sys/pci/ncr.c
@@ -3602,7 +3602,7 @@ ncr_attach (device_t dev)
0, 0xffffffff, PAGE_SIZE);
} else {
np->script = (struct script *)
- malloc (sizeof (struct script), M_DEVBUF, M_WAITOK);
+ malloc (sizeof (struct script), M_DEVBUF, 0);
}
/* XXX JGibbs - Use contigmalloc */
@@ -3613,7 +3613,7 @@ ncr_attach (device_t dev)
} else
{
np->scripth = (struct scripth *)
- malloc (sizeof (struct scripth), M_DEVBUF, M_WAITOK);
+ malloc (sizeof (struct scripth), M_DEVBUF, 0);
}
#ifdef SCSI_NCR_PCI_CONFIG_FIXUP
diff --git a/sys/pci/simos.c b/sys/pci/simos.c
index 040e042..6b865dd 100644
--- a/sys/pci/simos.c
+++ b/sys/pci/simos.c
@@ -111,7 +111,7 @@ simos_attach(pcici_t config_id, int unit)
struct simos_softc* sc;
struct cam_devq *devq;
- sc = malloc(sizeof(struct simos_softc), M_DEVBUF, M_WAITOK | M_ZERO);
+ sc = malloc(sizeof(struct simos_softc), M_DEVBUF, M_ZERO);
simosp[unit] = sc;
sc->sc_unit = unit;
diff --git a/sys/pci/xrpu.c b/sys/pci/xrpu.c
index dc21896..7afa22c 100644
--- a/sys/pci/xrpu.c
+++ b/sys/pci/xrpu.c
@@ -164,7 +164,7 @@ xrpu_ioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct thread *tdr)
/* Name SHALL be zero terminated */
xt->xt_name[sizeof xt->xt_name - 1] = '\0';
i = strlen(xt->xt_name);
- sc->tc.tc_name = (char *)malloc(i + 1, M_XRPU, M_WAITOK);
+ sc->tc.tc_name = (char *)malloc(i + 1, M_XRPU, 0);
strcpy(sc->tc.tc_name, xt->xt_name);
sc->tc.tc_frequency = xt->xt_frequency;
sc->tc.tc_get_timecount = xrpu_get_timecount;
diff --git a/sys/posix4/posix4.h b/sys/posix4/posix4.h
index b17e927..033c1ec 100644
--- a/sys/posix4/posix4.h
+++ b/sys/posix4/posix4.h
@@ -56,7 +56,7 @@ int SC (struct thread *td, struct SC##_args *uap) \
MALLOC_DECLARE(M_P31B);
-#define p31b_malloc(SIZE) malloc((SIZE), M_P31B, M_WAITOK)
+#define p31b_malloc(SIZE) malloc((SIZE), M_P31B, 0)
#define p31b_free(P) free((P), M_P31B)
int p31b_proc(struct proc *, pid_t, struct proc **);
diff --git a/sys/powerpc/aim/nexus.c b/sys/powerpc/aim/nexus.c
index 7472bbe..7172962 100644
--- a/sys/powerpc/aim/nexus.c
+++ b/sys/powerpc/aim/nexus.c
@@ -392,7 +392,7 @@ create_device_from_node(device_t parent, phandle_t node)
OF_getprop_alloc(node, "compatible", 1, (void **)&compatible);
cdev = device_add_child(parent, NULL, -1);
if (cdev != NULL) {
- dinfo = malloc(sizeof(*dinfo), M_NEXUS, M_WAITOK);
+ dinfo = malloc(sizeof(*dinfo), M_NEXUS, 0);
dinfo->ndi_node = node;
dinfo->ndi_name = name;
dinfo->ndi_device_type = type;
diff --git a/sys/powerpc/powermac/macio.c b/sys/powerpc/powermac/macio.c
index a924dd47..6445602 100644
--- a/sys/powerpc/powermac/macio.c
+++ b/sys/powerpc/powermac/macio.c
@@ -287,7 +287,7 @@ macio_attach(device_t dev)
cdev = device_add_child(dev, NULL, -1);
if (cdev != NULL) {
- dinfo = malloc(sizeof(*dinfo), M_MACIO, M_WAITOK);
+ dinfo = malloc(sizeof(*dinfo), M_MACIO, 0);
memset(dinfo, 0, sizeof(*dinfo));
resource_list_init(&dinfo->mdi_resources);
dinfo->mdi_node = child;
diff --git a/sys/powerpc/powerpc/busdma_machdep.c b/sys/powerpc/powerpc/busdma_machdep.c
index 1ad7e09..007137a 100644
--- a/sys/powerpc/powerpc/busdma_machdep.c
+++ b/sys/powerpc/powerpc/busdma_machdep.c
@@ -209,7 +209,7 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags,
if (dmat->maxsize <= PAGE_SIZE) {
*vaddr = malloc(dmat->maxsize, M_DEVBUF,
- (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK);
+ (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : 0);
} else {
/*
* XXX Use Contigmalloc until it is merged into this facility
@@ -217,7 +217,7 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags,
* multi-seg allocations yet though.
*/
*vaddr = contigmalloc(dmat->maxsize, M_DEVBUF,
- (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK,
+ (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : 0,
0ul, dmat->lowaddr, dmat->alignment? dmat->alignment : 1ul,
dmat->boundary);
}
diff --git a/sys/powerpc/powerpc/extintr.c b/sys/powerpc/powerpc/extintr.c
index 48e893d..345c593 100644
--- a/sys/powerpc/powerpc/extintr.c
+++ b/sys/powerpc/powerpc/extintr.c
@@ -452,7 +452,7 @@ intr_establish(int irq, int type, int level, int (*ih_fun)(void *),
irq = mapirq(irq);
/* no point in sleeping unless someone can free memory. */
- ih = malloc(sizeof *ih, M_DEVBUF, cold ? M_NOWAIT : M_WAITOK);
+ ih = malloc(sizeof *ih, M_DEVBUF, cold ? M_NOWAIT : 0);
if (ih == NULL)
panic("intr_establish: can't malloc handler info");
diff --git a/sys/powerpc/powerpc/nexus.c b/sys/powerpc/powerpc/nexus.c
index 7472bbe..7172962 100644
--- a/sys/powerpc/powerpc/nexus.c
+++ b/sys/powerpc/powerpc/nexus.c
@@ -392,7 +392,7 @@ create_device_from_node(device_t parent, phandle_t node)
OF_getprop_alloc(node, "compatible", 1, (void **)&compatible);
cdev = device_add_child(parent, NULL, -1);
if (cdev != NULL) {
- dinfo = malloc(sizeof(*dinfo), M_NEXUS, M_WAITOK);
+ dinfo = malloc(sizeof(*dinfo), M_NEXUS, 0);
dinfo->ndi_node = node;
dinfo->ndi_name = name;
dinfo->ndi_device_type = type;
diff --git a/sys/powerpc/psim/iobus.c b/sys/powerpc/psim/iobus.c
index 3428125..21534b3 100644
--- a/sys/powerpc/psim/iobus.c
+++ b/sys/powerpc/psim/iobus.c
@@ -215,7 +215,7 @@ iobus_attach(device_t dev)
cdev = device_add_child(dev, NULL, -1);
if (cdev != NULL) {
- dinfo = malloc(sizeof(*dinfo), M_IOBUS, M_WAITOK);
+ dinfo = malloc(sizeof(*dinfo), M_IOBUS, 0);
memset(dinfo, 0, sizeof(*dinfo));
resource_list_init(&dinfo->id_resources);
dinfo->id_node = child;
diff --git a/sys/security/mac/mac_framework.c b/sys/security/mac/mac_framework.c
index e9d9eeb..b4df06f 100644
--- a/sys/security/mac/mac_framework.c
+++ b/sys/security/mac/mac_framework.c
@@ -758,7 +758,7 @@ mac_init_pipe(struct pipe *pipe)
{
struct label *label;
- label = malloc(sizeof(struct label), M_MACPIPELABEL, M_ZERO|M_WAITOK);
+ label = malloc(sizeof(struct label), M_MACPIPELABEL, M_ZERO);
pipe->pipe_label = label;
pipe->pipe_peer->pipe_label = label;
mac_init_pipe_label(label);
@@ -1323,7 +1323,7 @@ mac_execve_enter(struct image_params *imgp, struct mac *mac_p,
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -2727,16 +2727,16 @@ mac_ioctl_ifnet_get(struct ucred *cred, struct ifreq *ifr,
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_ifnet_label(&ifnet->if_label, elements,
- buffer, mac.m_buflen, M_WAITOK);
+ buffer, mac.m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac.m_string, strlen(buffer)+1);
@@ -2763,7 +2763,7 @@ mac_ioctl_ifnet_set(struct ucred *cred, struct ifreq *ifr,
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -2839,14 +2839,14 @@ mac_setsockopt_label_set(struct ucred *cred, struct socket *so,
if (error)
return (error);
- buffer = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac->m_buflen, M_MACTEMP, 0);
error = copyinstr(mac->m_string, buffer, mac->m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
return (error);
}
- mac_init_socket_label(&intlabel, M_WAITOK);
+ mac_init_socket_label(&intlabel, 0);
error = mac_internalize_socket_label(&intlabel, buffer);
free(buffer, M_MACTEMP);
if (error) {
@@ -2893,16 +2893,16 @@ mac_getsockopt_label_get(struct ucred *cred, struct socket *so,
if (error)
return (error);
- elements = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac->m_buflen, M_MACTEMP, 0);
error = copyinstr(mac->m_string, elements, mac->m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac->m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_socket_label(&so->so_label, elements,
- buffer, mac->m_buflen, M_WAITOK);
+ buffer, mac->m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac->m_string, strlen(buffer)+1);
@@ -2923,16 +2923,16 @@ mac_getsockopt_peerlabel_get(struct ucred *cred, struct socket *so,
if (error)
return (error);
- elements = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac->m_buflen, M_MACTEMP, 0);
error = copyinstr(mac->m_string, elements, mac->m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac->m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_socket_peer_label(&so->so_peerlabel,
- elements, buffer, mac->m_buflen, M_WAITOK);
+ elements, buffer, mac->m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac->m_string, strlen(buffer)+1);
@@ -3040,7 +3040,7 @@ __mac_get_pid(struct thread *td, struct __mac_get_pid_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
@@ -3048,9 +3048,9 @@ __mac_get_pid(struct thread *td, struct __mac_get_pid_args *uap)
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_cred_label(&tcred->cr_label, elements,
- buffer, mac.m_buflen, M_WAITOK);
+ buffer, mac.m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac.m_string, strlen(buffer)+1);
@@ -3078,16 +3078,16 @@ __mac_get_proc(struct thread *td, struct __mac_get_proc_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_cred_label(&td->td_ucred->cr_label,
- elements, buffer, mac.m_buflen, M_WAITOK);
+ elements, buffer, mac.m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac.m_string, strlen(buffer)+1);
@@ -3117,7 +3117,7 @@ __mac_set_proc(struct thread *td, struct __mac_set_proc_args *uap)
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -3194,14 +3194,14 @@ __mac_get_fd(struct thread *td, struct __mac_get_fd_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
mtx_lock(&Giant); /* VFS */
error = fget(td, uap->fd, &fp);
if (error)
@@ -3241,12 +3241,12 @@ __mac_get_fd(struct thread *td, struct __mac_get_fd_args *uap)
case DTYPE_VNODE:
if (error == 0)
error = mac_externalize_vnode_label(&intlabel,
- elements, buffer, mac.m_buflen, M_WAITOK);
+ elements, buffer, mac.m_buflen, 0);
mac_destroy_vnode_label(&intlabel);
break;
case DTYPE_PIPE:
error = mac_externalize_pipe_label(&intlabel, elements,
- buffer, mac.m_buflen, M_WAITOK);
+ buffer, mac.m_buflen, 0);
mac_destroy_pipe_label(&intlabel);
break;
default:
@@ -3284,14 +3284,14 @@ __mac_get_file(struct thread *td, struct __mac_get_file_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
mtx_lock(&Giant); /* VFS */
NDINIT(&nd, LOOKUP, LOCKLEAF | FOLLOW, UIO_USERSPACE, uap->path_p,
td);
@@ -3302,7 +3302,7 @@ __mac_get_file(struct thread *td, struct __mac_get_file_args *uap)
mac_init_vnode_label(&intlabel);
mac_copy_vnode_label(&nd.ni_vp->v_label, &intlabel);
error = mac_externalize_vnode_label(&intlabel, elements, buffer,
- mac.m_buflen, M_WAITOK);
+ mac.m_buflen, 0);
NDFREE(&nd, 0);
mac_destroy_vnode_label(&intlabel);
@@ -3339,14 +3339,14 @@ __mac_get_link(struct thread *td, struct __mac_get_link_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
mtx_lock(&Giant); /* VFS */
NDINIT(&nd, LOOKUP, LOCKLEAF | NOFOLLOW, UIO_USERSPACE, uap->path_p,
td);
@@ -3357,7 +3357,7 @@ __mac_get_link(struct thread *td, struct __mac_get_link_args *uap)
mac_init_vnode_label(&intlabel);
mac_copy_vnode_label(&nd.ni_vp->v_label, &intlabel);
error = mac_externalize_vnode_label(&intlabel, elements, buffer,
- mac.m_buflen, M_WAITOK);
+ mac.m_buflen, 0);
NDFREE(&nd, 0);
mac_destroy_vnode_label(&intlabel);
@@ -3396,7 +3396,7 @@ __mac_set_fd(struct thread *td, struct __mac_set_fd_args *uap)
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -3482,7 +3482,7 @@ __mac_set_file(struct thread *td, struct __mac_set_file_args *uap)
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -3538,7 +3538,7 @@ __mac_set_link(struct thread *td, struct __mac_set_link_args *uap)
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
diff --git a/sys/security/mac/mac_internal.h b/sys/security/mac/mac_internal.h
index e9d9eeb..b4df06f 100644
--- a/sys/security/mac/mac_internal.h
+++ b/sys/security/mac/mac_internal.h
@@ -758,7 +758,7 @@ mac_init_pipe(struct pipe *pipe)
{
struct label *label;
- label = malloc(sizeof(struct label), M_MACPIPELABEL, M_ZERO|M_WAITOK);
+ label = malloc(sizeof(struct label), M_MACPIPELABEL, M_ZERO);
pipe->pipe_label = label;
pipe->pipe_peer->pipe_label = label;
mac_init_pipe_label(label);
@@ -1323,7 +1323,7 @@ mac_execve_enter(struct image_params *imgp, struct mac *mac_p,
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -2727,16 +2727,16 @@ mac_ioctl_ifnet_get(struct ucred *cred, struct ifreq *ifr,
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_ifnet_label(&ifnet->if_label, elements,
- buffer, mac.m_buflen, M_WAITOK);
+ buffer, mac.m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac.m_string, strlen(buffer)+1);
@@ -2763,7 +2763,7 @@ mac_ioctl_ifnet_set(struct ucred *cred, struct ifreq *ifr,
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -2839,14 +2839,14 @@ mac_setsockopt_label_set(struct ucred *cred, struct socket *so,
if (error)
return (error);
- buffer = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac->m_buflen, M_MACTEMP, 0);
error = copyinstr(mac->m_string, buffer, mac->m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
return (error);
}
- mac_init_socket_label(&intlabel, M_WAITOK);
+ mac_init_socket_label(&intlabel, 0);
error = mac_internalize_socket_label(&intlabel, buffer);
free(buffer, M_MACTEMP);
if (error) {
@@ -2893,16 +2893,16 @@ mac_getsockopt_label_get(struct ucred *cred, struct socket *so,
if (error)
return (error);
- elements = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac->m_buflen, M_MACTEMP, 0);
error = copyinstr(mac->m_string, elements, mac->m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac->m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_socket_label(&so->so_label, elements,
- buffer, mac->m_buflen, M_WAITOK);
+ buffer, mac->m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac->m_string, strlen(buffer)+1);
@@ -2923,16 +2923,16 @@ mac_getsockopt_peerlabel_get(struct ucred *cred, struct socket *so,
if (error)
return (error);
- elements = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac->m_buflen, M_MACTEMP, 0);
error = copyinstr(mac->m_string, elements, mac->m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac->m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_socket_peer_label(&so->so_peerlabel,
- elements, buffer, mac->m_buflen, M_WAITOK);
+ elements, buffer, mac->m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac->m_string, strlen(buffer)+1);
@@ -3040,7 +3040,7 @@ __mac_get_pid(struct thread *td, struct __mac_get_pid_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
@@ -3048,9 +3048,9 @@ __mac_get_pid(struct thread *td, struct __mac_get_pid_args *uap)
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_cred_label(&tcred->cr_label, elements,
- buffer, mac.m_buflen, M_WAITOK);
+ buffer, mac.m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac.m_string, strlen(buffer)+1);
@@ -3078,16 +3078,16 @@ __mac_get_proc(struct thread *td, struct __mac_get_proc_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_cred_label(&td->td_ucred->cr_label,
- elements, buffer, mac.m_buflen, M_WAITOK);
+ elements, buffer, mac.m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac.m_string, strlen(buffer)+1);
@@ -3117,7 +3117,7 @@ __mac_set_proc(struct thread *td, struct __mac_set_proc_args *uap)
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -3194,14 +3194,14 @@ __mac_get_fd(struct thread *td, struct __mac_get_fd_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
mtx_lock(&Giant); /* VFS */
error = fget(td, uap->fd, &fp);
if (error)
@@ -3241,12 +3241,12 @@ __mac_get_fd(struct thread *td, struct __mac_get_fd_args *uap)
case DTYPE_VNODE:
if (error == 0)
error = mac_externalize_vnode_label(&intlabel,
- elements, buffer, mac.m_buflen, M_WAITOK);
+ elements, buffer, mac.m_buflen, 0);
mac_destroy_vnode_label(&intlabel);
break;
case DTYPE_PIPE:
error = mac_externalize_pipe_label(&intlabel, elements,
- buffer, mac.m_buflen, M_WAITOK);
+ buffer, mac.m_buflen, 0);
mac_destroy_pipe_label(&intlabel);
break;
default:
@@ -3284,14 +3284,14 @@ __mac_get_file(struct thread *td, struct __mac_get_file_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
mtx_lock(&Giant); /* VFS */
NDINIT(&nd, LOOKUP, LOCKLEAF | FOLLOW, UIO_USERSPACE, uap->path_p,
td);
@@ -3302,7 +3302,7 @@ __mac_get_file(struct thread *td, struct __mac_get_file_args *uap)
mac_init_vnode_label(&intlabel);
mac_copy_vnode_label(&nd.ni_vp->v_label, &intlabel);
error = mac_externalize_vnode_label(&intlabel, elements, buffer,
- mac.m_buflen, M_WAITOK);
+ mac.m_buflen, 0);
NDFREE(&nd, 0);
mac_destroy_vnode_label(&intlabel);
@@ -3339,14 +3339,14 @@ __mac_get_link(struct thread *td, struct __mac_get_link_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
mtx_lock(&Giant); /* VFS */
NDINIT(&nd, LOOKUP, LOCKLEAF | NOFOLLOW, UIO_USERSPACE, uap->path_p,
td);
@@ -3357,7 +3357,7 @@ __mac_get_link(struct thread *td, struct __mac_get_link_args *uap)
mac_init_vnode_label(&intlabel);
mac_copy_vnode_label(&nd.ni_vp->v_label, &intlabel);
error = mac_externalize_vnode_label(&intlabel, elements, buffer,
- mac.m_buflen, M_WAITOK);
+ mac.m_buflen, 0);
NDFREE(&nd, 0);
mac_destroy_vnode_label(&intlabel);
@@ -3396,7 +3396,7 @@ __mac_set_fd(struct thread *td, struct __mac_set_fd_args *uap)
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -3482,7 +3482,7 @@ __mac_set_file(struct thread *td, struct __mac_set_file_args *uap)
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -3538,7 +3538,7 @@ __mac_set_link(struct thread *td, struct __mac_set_link_args *uap)
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
diff --git a/sys/security/mac/mac_net.c b/sys/security/mac/mac_net.c
index e9d9eeb..b4df06f 100644
--- a/sys/security/mac/mac_net.c
+++ b/sys/security/mac/mac_net.c
@@ -758,7 +758,7 @@ mac_init_pipe(struct pipe *pipe)
{
struct label *label;
- label = malloc(sizeof(struct label), M_MACPIPELABEL, M_ZERO|M_WAITOK);
+ label = malloc(sizeof(struct label), M_MACPIPELABEL, M_ZERO);
pipe->pipe_label = label;
pipe->pipe_peer->pipe_label = label;
mac_init_pipe_label(label);
@@ -1323,7 +1323,7 @@ mac_execve_enter(struct image_params *imgp, struct mac *mac_p,
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -2727,16 +2727,16 @@ mac_ioctl_ifnet_get(struct ucred *cred, struct ifreq *ifr,
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_ifnet_label(&ifnet->if_label, elements,
- buffer, mac.m_buflen, M_WAITOK);
+ buffer, mac.m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac.m_string, strlen(buffer)+1);
@@ -2763,7 +2763,7 @@ mac_ioctl_ifnet_set(struct ucred *cred, struct ifreq *ifr,
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -2839,14 +2839,14 @@ mac_setsockopt_label_set(struct ucred *cred, struct socket *so,
if (error)
return (error);
- buffer = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac->m_buflen, M_MACTEMP, 0);
error = copyinstr(mac->m_string, buffer, mac->m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
return (error);
}
- mac_init_socket_label(&intlabel, M_WAITOK);
+ mac_init_socket_label(&intlabel, 0);
error = mac_internalize_socket_label(&intlabel, buffer);
free(buffer, M_MACTEMP);
if (error) {
@@ -2893,16 +2893,16 @@ mac_getsockopt_label_get(struct ucred *cred, struct socket *so,
if (error)
return (error);
- elements = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac->m_buflen, M_MACTEMP, 0);
error = copyinstr(mac->m_string, elements, mac->m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac->m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_socket_label(&so->so_label, elements,
- buffer, mac->m_buflen, M_WAITOK);
+ buffer, mac->m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac->m_string, strlen(buffer)+1);
@@ -2923,16 +2923,16 @@ mac_getsockopt_peerlabel_get(struct ucred *cred, struct socket *so,
if (error)
return (error);
- elements = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac->m_buflen, M_MACTEMP, 0);
error = copyinstr(mac->m_string, elements, mac->m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac->m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_socket_peer_label(&so->so_peerlabel,
- elements, buffer, mac->m_buflen, M_WAITOK);
+ elements, buffer, mac->m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac->m_string, strlen(buffer)+1);
@@ -3040,7 +3040,7 @@ __mac_get_pid(struct thread *td, struct __mac_get_pid_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
@@ -3048,9 +3048,9 @@ __mac_get_pid(struct thread *td, struct __mac_get_pid_args *uap)
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_cred_label(&tcred->cr_label, elements,
- buffer, mac.m_buflen, M_WAITOK);
+ buffer, mac.m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac.m_string, strlen(buffer)+1);
@@ -3078,16 +3078,16 @@ __mac_get_proc(struct thread *td, struct __mac_get_proc_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_cred_label(&td->td_ucred->cr_label,
- elements, buffer, mac.m_buflen, M_WAITOK);
+ elements, buffer, mac.m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac.m_string, strlen(buffer)+1);
@@ -3117,7 +3117,7 @@ __mac_set_proc(struct thread *td, struct __mac_set_proc_args *uap)
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -3194,14 +3194,14 @@ __mac_get_fd(struct thread *td, struct __mac_get_fd_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
mtx_lock(&Giant); /* VFS */
error = fget(td, uap->fd, &fp);
if (error)
@@ -3241,12 +3241,12 @@ __mac_get_fd(struct thread *td, struct __mac_get_fd_args *uap)
case DTYPE_VNODE:
if (error == 0)
error = mac_externalize_vnode_label(&intlabel,
- elements, buffer, mac.m_buflen, M_WAITOK);
+ elements, buffer, mac.m_buflen, 0);
mac_destroy_vnode_label(&intlabel);
break;
case DTYPE_PIPE:
error = mac_externalize_pipe_label(&intlabel, elements,
- buffer, mac.m_buflen, M_WAITOK);
+ buffer, mac.m_buflen, 0);
mac_destroy_pipe_label(&intlabel);
break;
default:
@@ -3284,14 +3284,14 @@ __mac_get_file(struct thread *td, struct __mac_get_file_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
mtx_lock(&Giant); /* VFS */
NDINIT(&nd, LOOKUP, LOCKLEAF | FOLLOW, UIO_USERSPACE, uap->path_p,
td);
@@ -3302,7 +3302,7 @@ __mac_get_file(struct thread *td, struct __mac_get_file_args *uap)
mac_init_vnode_label(&intlabel);
mac_copy_vnode_label(&nd.ni_vp->v_label, &intlabel);
error = mac_externalize_vnode_label(&intlabel, elements, buffer,
- mac.m_buflen, M_WAITOK);
+ mac.m_buflen, 0);
NDFREE(&nd, 0);
mac_destroy_vnode_label(&intlabel);
@@ -3339,14 +3339,14 @@ __mac_get_link(struct thread *td, struct __mac_get_link_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
mtx_lock(&Giant); /* VFS */
NDINIT(&nd, LOOKUP, LOCKLEAF | NOFOLLOW, UIO_USERSPACE, uap->path_p,
td);
@@ -3357,7 +3357,7 @@ __mac_get_link(struct thread *td, struct __mac_get_link_args *uap)
mac_init_vnode_label(&intlabel);
mac_copy_vnode_label(&nd.ni_vp->v_label, &intlabel);
error = mac_externalize_vnode_label(&intlabel, elements, buffer,
- mac.m_buflen, M_WAITOK);
+ mac.m_buflen, 0);
NDFREE(&nd, 0);
mac_destroy_vnode_label(&intlabel);
@@ -3396,7 +3396,7 @@ __mac_set_fd(struct thread *td, struct __mac_set_fd_args *uap)
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -3482,7 +3482,7 @@ __mac_set_file(struct thread *td, struct __mac_set_file_args *uap)
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -3538,7 +3538,7 @@ __mac_set_link(struct thread *td, struct __mac_set_link_args *uap)
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
diff --git a/sys/security/mac/mac_pipe.c b/sys/security/mac/mac_pipe.c
index e9d9eeb..b4df06f 100644
--- a/sys/security/mac/mac_pipe.c
+++ b/sys/security/mac/mac_pipe.c
@@ -758,7 +758,7 @@ mac_init_pipe(struct pipe *pipe)
{
struct label *label;
- label = malloc(sizeof(struct label), M_MACPIPELABEL, M_ZERO|M_WAITOK);
+ label = malloc(sizeof(struct label), M_MACPIPELABEL, M_ZERO);
pipe->pipe_label = label;
pipe->pipe_peer->pipe_label = label;
mac_init_pipe_label(label);
@@ -1323,7 +1323,7 @@ mac_execve_enter(struct image_params *imgp, struct mac *mac_p,
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -2727,16 +2727,16 @@ mac_ioctl_ifnet_get(struct ucred *cred, struct ifreq *ifr,
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_ifnet_label(&ifnet->if_label, elements,
- buffer, mac.m_buflen, M_WAITOK);
+ buffer, mac.m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac.m_string, strlen(buffer)+1);
@@ -2763,7 +2763,7 @@ mac_ioctl_ifnet_set(struct ucred *cred, struct ifreq *ifr,
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -2839,14 +2839,14 @@ mac_setsockopt_label_set(struct ucred *cred, struct socket *so,
if (error)
return (error);
- buffer = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac->m_buflen, M_MACTEMP, 0);
error = copyinstr(mac->m_string, buffer, mac->m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
return (error);
}
- mac_init_socket_label(&intlabel, M_WAITOK);
+ mac_init_socket_label(&intlabel, 0);
error = mac_internalize_socket_label(&intlabel, buffer);
free(buffer, M_MACTEMP);
if (error) {
@@ -2893,16 +2893,16 @@ mac_getsockopt_label_get(struct ucred *cred, struct socket *so,
if (error)
return (error);
- elements = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac->m_buflen, M_MACTEMP, 0);
error = copyinstr(mac->m_string, elements, mac->m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac->m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_socket_label(&so->so_label, elements,
- buffer, mac->m_buflen, M_WAITOK);
+ buffer, mac->m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac->m_string, strlen(buffer)+1);
@@ -2923,16 +2923,16 @@ mac_getsockopt_peerlabel_get(struct ucred *cred, struct socket *so,
if (error)
return (error);
- elements = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac->m_buflen, M_MACTEMP, 0);
error = copyinstr(mac->m_string, elements, mac->m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac->m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_socket_peer_label(&so->so_peerlabel,
- elements, buffer, mac->m_buflen, M_WAITOK);
+ elements, buffer, mac->m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac->m_string, strlen(buffer)+1);
@@ -3040,7 +3040,7 @@ __mac_get_pid(struct thread *td, struct __mac_get_pid_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
@@ -3048,9 +3048,9 @@ __mac_get_pid(struct thread *td, struct __mac_get_pid_args *uap)
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_cred_label(&tcred->cr_label, elements,
- buffer, mac.m_buflen, M_WAITOK);
+ buffer, mac.m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac.m_string, strlen(buffer)+1);
@@ -3078,16 +3078,16 @@ __mac_get_proc(struct thread *td, struct __mac_get_proc_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_cred_label(&td->td_ucred->cr_label,
- elements, buffer, mac.m_buflen, M_WAITOK);
+ elements, buffer, mac.m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac.m_string, strlen(buffer)+1);
@@ -3117,7 +3117,7 @@ __mac_set_proc(struct thread *td, struct __mac_set_proc_args *uap)
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -3194,14 +3194,14 @@ __mac_get_fd(struct thread *td, struct __mac_get_fd_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
mtx_lock(&Giant); /* VFS */
error = fget(td, uap->fd, &fp);
if (error)
@@ -3241,12 +3241,12 @@ __mac_get_fd(struct thread *td, struct __mac_get_fd_args *uap)
case DTYPE_VNODE:
if (error == 0)
error = mac_externalize_vnode_label(&intlabel,
- elements, buffer, mac.m_buflen, M_WAITOK);
+ elements, buffer, mac.m_buflen, 0);
mac_destroy_vnode_label(&intlabel);
break;
case DTYPE_PIPE:
error = mac_externalize_pipe_label(&intlabel, elements,
- buffer, mac.m_buflen, M_WAITOK);
+ buffer, mac.m_buflen, 0);
mac_destroy_pipe_label(&intlabel);
break;
default:
@@ -3284,14 +3284,14 @@ __mac_get_file(struct thread *td, struct __mac_get_file_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
mtx_lock(&Giant); /* VFS */
NDINIT(&nd, LOOKUP, LOCKLEAF | FOLLOW, UIO_USERSPACE, uap->path_p,
td);
@@ -3302,7 +3302,7 @@ __mac_get_file(struct thread *td, struct __mac_get_file_args *uap)
mac_init_vnode_label(&intlabel);
mac_copy_vnode_label(&nd.ni_vp->v_label, &intlabel);
error = mac_externalize_vnode_label(&intlabel, elements, buffer,
- mac.m_buflen, M_WAITOK);
+ mac.m_buflen, 0);
NDFREE(&nd, 0);
mac_destroy_vnode_label(&intlabel);
@@ -3339,14 +3339,14 @@ __mac_get_link(struct thread *td, struct __mac_get_link_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
mtx_lock(&Giant); /* VFS */
NDINIT(&nd, LOOKUP, LOCKLEAF | NOFOLLOW, UIO_USERSPACE, uap->path_p,
td);
@@ -3357,7 +3357,7 @@ __mac_get_link(struct thread *td, struct __mac_get_link_args *uap)
mac_init_vnode_label(&intlabel);
mac_copy_vnode_label(&nd.ni_vp->v_label, &intlabel);
error = mac_externalize_vnode_label(&intlabel, elements, buffer,
- mac.m_buflen, M_WAITOK);
+ mac.m_buflen, 0);
NDFREE(&nd, 0);
mac_destroy_vnode_label(&intlabel);
@@ -3396,7 +3396,7 @@ __mac_set_fd(struct thread *td, struct __mac_set_fd_args *uap)
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -3482,7 +3482,7 @@ __mac_set_file(struct thread *td, struct __mac_set_file_args *uap)
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -3538,7 +3538,7 @@ __mac_set_link(struct thread *td, struct __mac_set_link_args *uap)
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
diff --git a/sys/security/mac/mac_process.c b/sys/security/mac/mac_process.c
index e9d9eeb..b4df06f 100644
--- a/sys/security/mac/mac_process.c
+++ b/sys/security/mac/mac_process.c
@@ -758,7 +758,7 @@ mac_init_pipe(struct pipe *pipe)
{
struct label *label;
- label = malloc(sizeof(struct label), M_MACPIPELABEL, M_ZERO|M_WAITOK);
+ label = malloc(sizeof(struct label), M_MACPIPELABEL, M_ZERO);
pipe->pipe_label = label;
pipe->pipe_peer->pipe_label = label;
mac_init_pipe_label(label);
@@ -1323,7 +1323,7 @@ mac_execve_enter(struct image_params *imgp, struct mac *mac_p,
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -2727,16 +2727,16 @@ mac_ioctl_ifnet_get(struct ucred *cred, struct ifreq *ifr,
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_ifnet_label(&ifnet->if_label, elements,
- buffer, mac.m_buflen, M_WAITOK);
+ buffer, mac.m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac.m_string, strlen(buffer)+1);
@@ -2763,7 +2763,7 @@ mac_ioctl_ifnet_set(struct ucred *cred, struct ifreq *ifr,
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -2839,14 +2839,14 @@ mac_setsockopt_label_set(struct ucred *cred, struct socket *so,
if (error)
return (error);
- buffer = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac->m_buflen, M_MACTEMP, 0);
error = copyinstr(mac->m_string, buffer, mac->m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
return (error);
}
- mac_init_socket_label(&intlabel, M_WAITOK);
+ mac_init_socket_label(&intlabel, 0);
error = mac_internalize_socket_label(&intlabel, buffer);
free(buffer, M_MACTEMP);
if (error) {
@@ -2893,16 +2893,16 @@ mac_getsockopt_label_get(struct ucred *cred, struct socket *so,
if (error)
return (error);
- elements = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac->m_buflen, M_MACTEMP, 0);
error = copyinstr(mac->m_string, elements, mac->m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac->m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_socket_label(&so->so_label, elements,
- buffer, mac->m_buflen, M_WAITOK);
+ buffer, mac->m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac->m_string, strlen(buffer)+1);
@@ -2923,16 +2923,16 @@ mac_getsockopt_peerlabel_get(struct ucred *cred, struct socket *so,
if (error)
return (error);
- elements = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac->m_buflen, M_MACTEMP, 0);
error = copyinstr(mac->m_string, elements, mac->m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac->m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_socket_peer_label(&so->so_peerlabel,
- elements, buffer, mac->m_buflen, M_WAITOK);
+ elements, buffer, mac->m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac->m_string, strlen(buffer)+1);
@@ -3040,7 +3040,7 @@ __mac_get_pid(struct thread *td, struct __mac_get_pid_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
@@ -3048,9 +3048,9 @@ __mac_get_pid(struct thread *td, struct __mac_get_pid_args *uap)
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_cred_label(&tcred->cr_label, elements,
- buffer, mac.m_buflen, M_WAITOK);
+ buffer, mac.m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac.m_string, strlen(buffer)+1);
@@ -3078,16 +3078,16 @@ __mac_get_proc(struct thread *td, struct __mac_get_proc_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_cred_label(&td->td_ucred->cr_label,
- elements, buffer, mac.m_buflen, M_WAITOK);
+ elements, buffer, mac.m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac.m_string, strlen(buffer)+1);
@@ -3117,7 +3117,7 @@ __mac_set_proc(struct thread *td, struct __mac_set_proc_args *uap)
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -3194,14 +3194,14 @@ __mac_get_fd(struct thread *td, struct __mac_get_fd_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
mtx_lock(&Giant); /* VFS */
error = fget(td, uap->fd, &fp);
if (error)
@@ -3241,12 +3241,12 @@ __mac_get_fd(struct thread *td, struct __mac_get_fd_args *uap)
case DTYPE_VNODE:
if (error == 0)
error = mac_externalize_vnode_label(&intlabel,
- elements, buffer, mac.m_buflen, M_WAITOK);
+ elements, buffer, mac.m_buflen, 0);
mac_destroy_vnode_label(&intlabel);
break;
case DTYPE_PIPE:
error = mac_externalize_pipe_label(&intlabel, elements,
- buffer, mac.m_buflen, M_WAITOK);
+ buffer, mac.m_buflen, 0);
mac_destroy_pipe_label(&intlabel);
break;
default:
@@ -3284,14 +3284,14 @@ __mac_get_file(struct thread *td, struct __mac_get_file_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
mtx_lock(&Giant); /* VFS */
NDINIT(&nd, LOOKUP, LOCKLEAF | FOLLOW, UIO_USERSPACE, uap->path_p,
td);
@@ -3302,7 +3302,7 @@ __mac_get_file(struct thread *td, struct __mac_get_file_args *uap)
mac_init_vnode_label(&intlabel);
mac_copy_vnode_label(&nd.ni_vp->v_label, &intlabel);
error = mac_externalize_vnode_label(&intlabel, elements, buffer,
- mac.m_buflen, M_WAITOK);
+ mac.m_buflen, 0);
NDFREE(&nd, 0);
mac_destroy_vnode_label(&intlabel);
@@ -3339,14 +3339,14 @@ __mac_get_link(struct thread *td, struct __mac_get_link_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
mtx_lock(&Giant); /* VFS */
NDINIT(&nd, LOOKUP, LOCKLEAF | NOFOLLOW, UIO_USERSPACE, uap->path_p,
td);
@@ -3357,7 +3357,7 @@ __mac_get_link(struct thread *td, struct __mac_get_link_args *uap)
mac_init_vnode_label(&intlabel);
mac_copy_vnode_label(&nd.ni_vp->v_label, &intlabel);
error = mac_externalize_vnode_label(&intlabel, elements, buffer,
- mac.m_buflen, M_WAITOK);
+ mac.m_buflen, 0);
NDFREE(&nd, 0);
mac_destroy_vnode_label(&intlabel);
@@ -3396,7 +3396,7 @@ __mac_set_fd(struct thread *td, struct __mac_set_fd_args *uap)
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -3482,7 +3482,7 @@ __mac_set_file(struct thread *td, struct __mac_set_file_args *uap)
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -3538,7 +3538,7 @@ __mac_set_link(struct thread *td, struct __mac_set_link_args *uap)
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
diff --git a/sys/security/mac/mac_syscalls.c b/sys/security/mac/mac_syscalls.c
index e9d9eeb..b4df06f 100644
--- a/sys/security/mac/mac_syscalls.c
+++ b/sys/security/mac/mac_syscalls.c
@@ -758,7 +758,7 @@ mac_init_pipe(struct pipe *pipe)
{
struct label *label;
- label = malloc(sizeof(struct label), M_MACPIPELABEL, M_ZERO|M_WAITOK);
+ label = malloc(sizeof(struct label), M_MACPIPELABEL, M_ZERO);
pipe->pipe_label = label;
pipe->pipe_peer->pipe_label = label;
mac_init_pipe_label(label);
@@ -1323,7 +1323,7 @@ mac_execve_enter(struct image_params *imgp, struct mac *mac_p,
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -2727,16 +2727,16 @@ mac_ioctl_ifnet_get(struct ucred *cred, struct ifreq *ifr,
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_ifnet_label(&ifnet->if_label, elements,
- buffer, mac.m_buflen, M_WAITOK);
+ buffer, mac.m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac.m_string, strlen(buffer)+1);
@@ -2763,7 +2763,7 @@ mac_ioctl_ifnet_set(struct ucred *cred, struct ifreq *ifr,
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -2839,14 +2839,14 @@ mac_setsockopt_label_set(struct ucred *cred, struct socket *so,
if (error)
return (error);
- buffer = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac->m_buflen, M_MACTEMP, 0);
error = copyinstr(mac->m_string, buffer, mac->m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
return (error);
}
- mac_init_socket_label(&intlabel, M_WAITOK);
+ mac_init_socket_label(&intlabel, 0);
error = mac_internalize_socket_label(&intlabel, buffer);
free(buffer, M_MACTEMP);
if (error) {
@@ -2893,16 +2893,16 @@ mac_getsockopt_label_get(struct ucred *cred, struct socket *so,
if (error)
return (error);
- elements = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac->m_buflen, M_MACTEMP, 0);
error = copyinstr(mac->m_string, elements, mac->m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac->m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_socket_label(&so->so_label, elements,
- buffer, mac->m_buflen, M_WAITOK);
+ buffer, mac->m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac->m_string, strlen(buffer)+1);
@@ -2923,16 +2923,16 @@ mac_getsockopt_peerlabel_get(struct ucred *cred, struct socket *so,
if (error)
return (error);
- elements = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac->m_buflen, M_MACTEMP, 0);
error = copyinstr(mac->m_string, elements, mac->m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac->m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_socket_peer_label(&so->so_peerlabel,
- elements, buffer, mac->m_buflen, M_WAITOK);
+ elements, buffer, mac->m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac->m_string, strlen(buffer)+1);
@@ -3040,7 +3040,7 @@ __mac_get_pid(struct thread *td, struct __mac_get_pid_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
@@ -3048,9 +3048,9 @@ __mac_get_pid(struct thread *td, struct __mac_get_pid_args *uap)
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_cred_label(&tcred->cr_label, elements,
- buffer, mac.m_buflen, M_WAITOK);
+ buffer, mac.m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac.m_string, strlen(buffer)+1);
@@ -3078,16 +3078,16 @@ __mac_get_proc(struct thread *td, struct __mac_get_proc_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_cred_label(&td->td_ucred->cr_label,
- elements, buffer, mac.m_buflen, M_WAITOK);
+ elements, buffer, mac.m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac.m_string, strlen(buffer)+1);
@@ -3117,7 +3117,7 @@ __mac_set_proc(struct thread *td, struct __mac_set_proc_args *uap)
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -3194,14 +3194,14 @@ __mac_get_fd(struct thread *td, struct __mac_get_fd_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
mtx_lock(&Giant); /* VFS */
error = fget(td, uap->fd, &fp);
if (error)
@@ -3241,12 +3241,12 @@ __mac_get_fd(struct thread *td, struct __mac_get_fd_args *uap)
case DTYPE_VNODE:
if (error == 0)
error = mac_externalize_vnode_label(&intlabel,
- elements, buffer, mac.m_buflen, M_WAITOK);
+ elements, buffer, mac.m_buflen, 0);
mac_destroy_vnode_label(&intlabel);
break;
case DTYPE_PIPE:
error = mac_externalize_pipe_label(&intlabel, elements,
- buffer, mac.m_buflen, M_WAITOK);
+ buffer, mac.m_buflen, 0);
mac_destroy_pipe_label(&intlabel);
break;
default:
@@ -3284,14 +3284,14 @@ __mac_get_file(struct thread *td, struct __mac_get_file_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
mtx_lock(&Giant); /* VFS */
NDINIT(&nd, LOOKUP, LOCKLEAF | FOLLOW, UIO_USERSPACE, uap->path_p,
td);
@@ -3302,7 +3302,7 @@ __mac_get_file(struct thread *td, struct __mac_get_file_args *uap)
mac_init_vnode_label(&intlabel);
mac_copy_vnode_label(&nd.ni_vp->v_label, &intlabel);
error = mac_externalize_vnode_label(&intlabel, elements, buffer,
- mac.m_buflen, M_WAITOK);
+ mac.m_buflen, 0);
NDFREE(&nd, 0);
mac_destroy_vnode_label(&intlabel);
@@ -3339,14 +3339,14 @@ __mac_get_link(struct thread *td, struct __mac_get_link_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
mtx_lock(&Giant); /* VFS */
NDINIT(&nd, LOOKUP, LOCKLEAF | NOFOLLOW, UIO_USERSPACE, uap->path_p,
td);
@@ -3357,7 +3357,7 @@ __mac_get_link(struct thread *td, struct __mac_get_link_args *uap)
mac_init_vnode_label(&intlabel);
mac_copy_vnode_label(&nd.ni_vp->v_label, &intlabel);
error = mac_externalize_vnode_label(&intlabel, elements, buffer,
- mac.m_buflen, M_WAITOK);
+ mac.m_buflen, 0);
NDFREE(&nd, 0);
mac_destroy_vnode_label(&intlabel);
@@ -3396,7 +3396,7 @@ __mac_set_fd(struct thread *td, struct __mac_set_fd_args *uap)
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -3482,7 +3482,7 @@ __mac_set_file(struct thread *td, struct __mac_set_file_args *uap)
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -3538,7 +3538,7 @@ __mac_set_link(struct thread *td, struct __mac_set_link_args *uap)
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
diff --git a/sys/security/mac/mac_system.c b/sys/security/mac/mac_system.c
index e9d9eeb..b4df06f 100644
--- a/sys/security/mac/mac_system.c
+++ b/sys/security/mac/mac_system.c
@@ -758,7 +758,7 @@ mac_init_pipe(struct pipe *pipe)
{
struct label *label;
- label = malloc(sizeof(struct label), M_MACPIPELABEL, M_ZERO|M_WAITOK);
+ label = malloc(sizeof(struct label), M_MACPIPELABEL, M_ZERO);
pipe->pipe_label = label;
pipe->pipe_peer->pipe_label = label;
mac_init_pipe_label(label);
@@ -1323,7 +1323,7 @@ mac_execve_enter(struct image_params *imgp, struct mac *mac_p,
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -2727,16 +2727,16 @@ mac_ioctl_ifnet_get(struct ucred *cred, struct ifreq *ifr,
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_ifnet_label(&ifnet->if_label, elements,
- buffer, mac.m_buflen, M_WAITOK);
+ buffer, mac.m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac.m_string, strlen(buffer)+1);
@@ -2763,7 +2763,7 @@ mac_ioctl_ifnet_set(struct ucred *cred, struct ifreq *ifr,
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -2839,14 +2839,14 @@ mac_setsockopt_label_set(struct ucred *cred, struct socket *so,
if (error)
return (error);
- buffer = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac->m_buflen, M_MACTEMP, 0);
error = copyinstr(mac->m_string, buffer, mac->m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
return (error);
}
- mac_init_socket_label(&intlabel, M_WAITOK);
+ mac_init_socket_label(&intlabel, 0);
error = mac_internalize_socket_label(&intlabel, buffer);
free(buffer, M_MACTEMP);
if (error) {
@@ -2893,16 +2893,16 @@ mac_getsockopt_label_get(struct ucred *cred, struct socket *so,
if (error)
return (error);
- elements = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac->m_buflen, M_MACTEMP, 0);
error = copyinstr(mac->m_string, elements, mac->m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac->m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_socket_label(&so->so_label, elements,
- buffer, mac->m_buflen, M_WAITOK);
+ buffer, mac->m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac->m_string, strlen(buffer)+1);
@@ -2923,16 +2923,16 @@ mac_getsockopt_peerlabel_get(struct ucred *cred, struct socket *so,
if (error)
return (error);
- elements = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac->m_buflen, M_MACTEMP, 0);
error = copyinstr(mac->m_string, elements, mac->m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac->m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_socket_peer_label(&so->so_peerlabel,
- elements, buffer, mac->m_buflen, M_WAITOK);
+ elements, buffer, mac->m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac->m_string, strlen(buffer)+1);
@@ -3040,7 +3040,7 @@ __mac_get_pid(struct thread *td, struct __mac_get_pid_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
@@ -3048,9 +3048,9 @@ __mac_get_pid(struct thread *td, struct __mac_get_pid_args *uap)
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_cred_label(&tcred->cr_label, elements,
- buffer, mac.m_buflen, M_WAITOK);
+ buffer, mac.m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac.m_string, strlen(buffer)+1);
@@ -3078,16 +3078,16 @@ __mac_get_proc(struct thread *td, struct __mac_get_proc_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_cred_label(&td->td_ucred->cr_label,
- elements, buffer, mac.m_buflen, M_WAITOK);
+ elements, buffer, mac.m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac.m_string, strlen(buffer)+1);
@@ -3117,7 +3117,7 @@ __mac_set_proc(struct thread *td, struct __mac_set_proc_args *uap)
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -3194,14 +3194,14 @@ __mac_get_fd(struct thread *td, struct __mac_get_fd_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
mtx_lock(&Giant); /* VFS */
error = fget(td, uap->fd, &fp);
if (error)
@@ -3241,12 +3241,12 @@ __mac_get_fd(struct thread *td, struct __mac_get_fd_args *uap)
case DTYPE_VNODE:
if (error == 0)
error = mac_externalize_vnode_label(&intlabel,
- elements, buffer, mac.m_buflen, M_WAITOK);
+ elements, buffer, mac.m_buflen, 0);
mac_destroy_vnode_label(&intlabel);
break;
case DTYPE_PIPE:
error = mac_externalize_pipe_label(&intlabel, elements,
- buffer, mac.m_buflen, M_WAITOK);
+ buffer, mac.m_buflen, 0);
mac_destroy_pipe_label(&intlabel);
break;
default:
@@ -3284,14 +3284,14 @@ __mac_get_file(struct thread *td, struct __mac_get_file_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
mtx_lock(&Giant); /* VFS */
NDINIT(&nd, LOOKUP, LOCKLEAF | FOLLOW, UIO_USERSPACE, uap->path_p,
td);
@@ -3302,7 +3302,7 @@ __mac_get_file(struct thread *td, struct __mac_get_file_args *uap)
mac_init_vnode_label(&intlabel);
mac_copy_vnode_label(&nd.ni_vp->v_label, &intlabel);
error = mac_externalize_vnode_label(&intlabel, elements, buffer,
- mac.m_buflen, M_WAITOK);
+ mac.m_buflen, 0);
NDFREE(&nd, 0);
mac_destroy_vnode_label(&intlabel);
@@ -3339,14 +3339,14 @@ __mac_get_link(struct thread *td, struct __mac_get_link_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
mtx_lock(&Giant); /* VFS */
NDINIT(&nd, LOOKUP, LOCKLEAF | NOFOLLOW, UIO_USERSPACE, uap->path_p,
td);
@@ -3357,7 +3357,7 @@ __mac_get_link(struct thread *td, struct __mac_get_link_args *uap)
mac_init_vnode_label(&intlabel);
mac_copy_vnode_label(&nd.ni_vp->v_label, &intlabel);
error = mac_externalize_vnode_label(&intlabel, elements, buffer,
- mac.m_buflen, M_WAITOK);
+ mac.m_buflen, 0);
NDFREE(&nd, 0);
mac_destroy_vnode_label(&intlabel);
@@ -3396,7 +3396,7 @@ __mac_set_fd(struct thread *td, struct __mac_set_fd_args *uap)
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -3482,7 +3482,7 @@ __mac_set_file(struct thread *td, struct __mac_set_file_args *uap)
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -3538,7 +3538,7 @@ __mac_set_link(struct thread *td, struct __mac_set_link_args *uap)
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
diff --git a/sys/security/mac/mac_vfs.c b/sys/security/mac/mac_vfs.c
index e9d9eeb..b4df06f 100644
--- a/sys/security/mac/mac_vfs.c
+++ b/sys/security/mac/mac_vfs.c
@@ -758,7 +758,7 @@ mac_init_pipe(struct pipe *pipe)
{
struct label *label;
- label = malloc(sizeof(struct label), M_MACPIPELABEL, M_ZERO|M_WAITOK);
+ label = malloc(sizeof(struct label), M_MACPIPELABEL, M_ZERO);
pipe->pipe_label = label;
pipe->pipe_peer->pipe_label = label;
mac_init_pipe_label(label);
@@ -1323,7 +1323,7 @@ mac_execve_enter(struct image_params *imgp, struct mac *mac_p,
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -2727,16 +2727,16 @@ mac_ioctl_ifnet_get(struct ucred *cred, struct ifreq *ifr,
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_ifnet_label(&ifnet->if_label, elements,
- buffer, mac.m_buflen, M_WAITOK);
+ buffer, mac.m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac.m_string, strlen(buffer)+1);
@@ -2763,7 +2763,7 @@ mac_ioctl_ifnet_set(struct ucred *cred, struct ifreq *ifr,
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -2839,14 +2839,14 @@ mac_setsockopt_label_set(struct ucred *cred, struct socket *so,
if (error)
return (error);
- buffer = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac->m_buflen, M_MACTEMP, 0);
error = copyinstr(mac->m_string, buffer, mac->m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
return (error);
}
- mac_init_socket_label(&intlabel, M_WAITOK);
+ mac_init_socket_label(&intlabel, 0);
error = mac_internalize_socket_label(&intlabel, buffer);
free(buffer, M_MACTEMP);
if (error) {
@@ -2893,16 +2893,16 @@ mac_getsockopt_label_get(struct ucred *cred, struct socket *so,
if (error)
return (error);
- elements = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac->m_buflen, M_MACTEMP, 0);
error = copyinstr(mac->m_string, elements, mac->m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac->m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_socket_label(&so->so_label, elements,
- buffer, mac->m_buflen, M_WAITOK);
+ buffer, mac->m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac->m_string, strlen(buffer)+1);
@@ -2923,16 +2923,16 @@ mac_getsockopt_peerlabel_get(struct ucred *cred, struct socket *so,
if (error)
return (error);
- elements = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac->m_buflen, M_MACTEMP, 0);
error = copyinstr(mac->m_string, elements, mac->m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac->m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_socket_peer_label(&so->so_peerlabel,
- elements, buffer, mac->m_buflen, M_WAITOK);
+ elements, buffer, mac->m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac->m_string, strlen(buffer)+1);
@@ -3040,7 +3040,7 @@ __mac_get_pid(struct thread *td, struct __mac_get_pid_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
@@ -3048,9 +3048,9 @@ __mac_get_pid(struct thread *td, struct __mac_get_pid_args *uap)
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_cred_label(&tcred->cr_label, elements,
- buffer, mac.m_buflen, M_WAITOK);
+ buffer, mac.m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac.m_string, strlen(buffer)+1);
@@ -3078,16 +3078,16 @@ __mac_get_proc(struct thread *td, struct __mac_get_proc_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
error = mac_externalize_cred_label(&td->td_ucred->cr_label,
- elements, buffer, mac.m_buflen, M_WAITOK);
+ elements, buffer, mac.m_buflen, 0);
if (error == 0)
error = copyout(buffer, mac.m_string, strlen(buffer)+1);
@@ -3117,7 +3117,7 @@ __mac_set_proc(struct thread *td, struct __mac_set_proc_args *uap)
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -3194,14 +3194,14 @@ __mac_get_fd(struct thread *td, struct __mac_get_fd_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
mtx_lock(&Giant); /* VFS */
error = fget(td, uap->fd, &fp);
if (error)
@@ -3241,12 +3241,12 @@ __mac_get_fd(struct thread *td, struct __mac_get_fd_args *uap)
case DTYPE_VNODE:
if (error == 0)
error = mac_externalize_vnode_label(&intlabel,
- elements, buffer, mac.m_buflen, M_WAITOK);
+ elements, buffer, mac.m_buflen, 0);
mac_destroy_vnode_label(&intlabel);
break;
case DTYPE_PIPE:
error = mac_externalize_pipe_label(&intlabel, elements,
- buffer, mac.m_buflen, M_WAITOK);
+ buffer, mac.m_buflen, 0);
mac_destroy_pipe_label(&intlabel);
break;
default:
@@ -3284,14 +3284,14 @@ __mac_get_file(struct thread *td, struct __mac_get_file_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
mtx_lock(&Giant); /* VFS */
NDINIT(&nd, LOOKUP, LOCKLEAF | FOLLOW, UIO_USERSPACE, uap->path_p,
td);
@@ -3302,7 +3302,7 @@ __mac_get_file(struct thread *td, struct __mac_get_file_args *uap)
mac_init_vnode_label(&intlabel);
mac_copy_vnode_label(&nd.ni_vp->v_label, &intlabel);
error = mac_externalize_vnode_label(&intlabel, elements, buffer,
- mac.m_buflen, M_WAITOK);
+ mac.m_buflen, 0);
NDFREE(&nd, 0);
mac_destroy_vnode_label(&intlabel);
@@ -3339,14 +3339,14 @@ __mac_get_link(struct thread *td, struct __mac_get_link_args *uap)
if (error)
return (error);
- elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ elements = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL);
if (error) {
free(elements, M_MACTEMP);
return (error);
}
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, M_ZERO);
mtx_lock(&Giant); /* VFS */
NDINIT(&nd, LOOKUP, LOCKLEAF | NOFOLLOW, UIO_USERSPACE, uap->path_p,
td);
@@ -3357,7 +3357,7 @@ __mac_get_link(struct thread *td, struct __mac_get_link_args *uap)
mac_init_vnode_label(&intlabel);
mac_copy_vnode_label(&nd.ni_vp->v_label, &intlabel);
error = mac_externalize_vnode_label(&intlabel, elements, buffer,
- mac.m_buflen, M_WAITOK);
+ mac.m_buflen, 0);
NDFREE(&nd, 0);
mac_destroy_vnode_label(&intlabel);
@@ -3396,7 +3396,7 @@ __mac_set_fd(struct thread *td, struct __mac_set_fd_args *uap)
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -3482,7 +3482,7 @@ __mac_set_file(struct thread *td, struct __mac_set_file_args *uap)
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
@@ -3538,7 +3538,7 @@ __mac_set_link(struct thread *td, struct __mac_set_link_args *uap)
if (error)
return (error);
- buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
+ buffer = malloc(mac.m_buflen, M_MACTEMP, 0);
error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
if (error) {
free(buffer, M_MACTEMP);
diff --git a/sys/security/mac_biba/mac_biba.c b/sys/security/mac_biba/mac_biba.c
index f9db7dd..67cb05b 100644
--- a/sys/security/mac_biba/mac_biba.c
+++ b/sys/security/mac_biba/mac_biba.c
@@ -505,7 +505,7 @@ static void
mac_biba_init_label(struct label *label)
{
- SLOT(label) = biba_alloc(M_WAITOK);
+ SLOT(label) = biba_alloc(0);
}
static int
diff --git a/sys/security/mac_bsdextended/mac_bsdextended.c b/sys/security/mac_bsdextended/mac_bsdextended.c
index ba357ff..9231125 100644
--- a/sys/security/mac_bsdextended/mac_bsdextended.c
+++ b/sys/security/mac_bsdextended/mac_bsdextended.c
@@ -164,7 +164,7 @@ sysctl_rule(SYSCTL_HANDLER_ARGS)
if (rules[index] == NULL) {
/* printf("addition\n"); */
MALLOC(ruleptr, struct mac_bsdextended_rule *,
- sizeof(*ruleptr), M_MACBSDEXTENDED, M_WAITOK |
+ sizeof(*ruleptr), M_MACBSDEXTENDED,
M_ZERO);
*ruleptr = temprule;
rules[index] = ruleptr;
diff --git a/sys/security/mac_lomac/mac_lomac.c b/sys/security/mac_lomac/mac_lomac.c
index 483fca1..0e796fd 100644
--- a/sys/security/mac_lomac/mac_lomac.c
+++ b/sys/security/mac_lomac/mac_lomac.c
@@ -621,7 +621,7 @@ static void
mac_lomac_init_label(struct label *label)
{
- SLOT(label) = lomac_alloc(M_WAITOK);
+ SLOT(label) = lomac_alloc(0);
}
static int
@@ -640,7 +640,7 @@ mac_lomac_init_proc_label(struct label *label)
{
PSLOT(label) = malloc(sizeof(struct mac_lomac_proc), M_MACLOMAC,
- M_ZERO | M_WAITOK);
+ M_ZERO);
mtx_init(&PSLOT(label)->mtx, "MAC/Lomac proc lock", NULL, MTX_DEF);
}
diff --git a/sys/security/mac_mls/mac_mls.c b/sys/security/mac_mls/mac_mls.c
index f82993d..3948c49 100644
--- a/sys/security/mac_mls/mac_mls.c
+++ b/sys/security/mac_mls/mac_mls.c
@@ -470,7 +470,7 @@ static void
mac_mls_init_label(struct label *label)
{
- SLOT(label) = mls_alloc(M_WAITOK);
+ SLOT(label) = mls_alloc(0);
}
static int
diff --git a/sys/sparc64/ebus/ebus.c b/sys/sparc64/ebus/ebus.c
index 42d78c8..7147060 100644
--- a/sys/sparc64/ebus/ebus.c
+++ b/sys/sparc64/ebus/ebus.c
@@ -371,7 +371,7 @@ ebus_setup_dinfo(struct ebus_softc *sc, phandle_t node, char *name)
u_int64_t start;
int nreg, nintr, i;
- edi = malloc(sizeof(*edi), M_DEVBUF, M_ZERO | M_WAITOK);
+ edi = malloc(sizeof(*edi), M_DEVBUF, M_ZERO);
if (edi == NULL)
return (NULL);
resource_list_init(&edi->edi_rl);
diff --git a/sys/sparc64/pci/ofw_pci.c b/sys/sparc64/pci/ofw_pci.c
index 3787a00..3875a29 100644
--- a/sys/sparc64/pci/ofw_pci.c
+++ b/sys/sparc64/pci/ofw_pci.c
@@ -94,7 +94,7 @@ ofw_pci_orb_callback(phandle_t node, u_int8_t *pintptr, int pintsz,
bcopy(pregptr, &preg, sizeof(preg));
intr = (OFW_PCI_PHYS_HI_DEVICE(preg.phys_hi) + pintr + 3) %
4 + 1;
- *rintr = malloc(sizeof(intr), M_OFWPROP, M_WAITOK);
+ *rintr = malloc(sizeof(intr), M_OFWPROP, 0);
bcopy(&intr, *rintr, sizeof(intr));
*terminate = 0;
return (sizeof(intr));
@@ -134,7 +134,7 @@ ofw_pci_alloc_busno(phandle_t node)
om = pci_bus_map;
pci_bus_map_sz = n + PCI_BUS_MAP_INC;
pci_bus_map = malloc(sizeof(*pci_bus_map) * pci_bus_map_sz,
- M_DEVBUF, M_WAITOK | M_ZERO);
+ M_DEVBUF, M_ZERO);
if (om != NULL) {
bcopy(om, pci_bus_map, sizeof(*om) * osz);
free(om, M_DEVBUF);
diff --git a/sys/sparc64/pci/psycho.c b/sys/sparc64/pci/psycho.c
index 30205c8..9b32b95 100644
--- a/sys/sparc64/pci/psycho.c
+++ b/sys/sparc64/pci/psycho.c
@@ -611,7 +611,7 @@ psycho_attach(device_t dev)
*/
if (INTVEC(mr) != 0x7e6 && INTVEC(mr) != 0x7e7 &&
INTVEC(mr) != 0) {
- sclr = malloc(sizeof(*sclr), M_DEVBUF, M_WAITOK);
+ sclr = malloc(sizeof(*sclr), M_DEVBUF, 0);
sclr->psc_sc = sc;
sclr->psc_clr = clr;
intr_setup(PIL_LOW, intr_fast, INTVEC(mr),
diff --git a/sys/sparc64/sbus/sbus.c b/sys/sparc64/sbus/sbus.c
index 16b846b..d76efb5 100644
--- a/sys/sparc64/sbus/sbus.c
+++ b/sys/sparc64/sbus/sbus.c
@@ -480,7 +480,7 @@ sbus_setup_dinfo(struct sbus_softc *sc, phandle_t node, char *name)
u_int32_t base, iv, *intr;
int i, nreg, nintr, slot, rslot;
- sdi = malloc(sizeof(*sdi), M_DEVBUF, M_ZERO | M_WAITOK);
+ sdi = malloc(sizeof(*sdi), M_DEVBUF, M_ZERO);
if (sdi == NULL)
return (NULL);
resource_list_init(&sdi->sdi_rl);
diff --git a/sys/sparc64/sparc64/bus_machdep.c b/sys/sparc64/sparc64/bus_machdep.c
index 5180823..e63a844 100644
--- a/sys/sparc64/sparc64/bus_machdep.c
+++ b/sys/sparc64/sparc64/bus_machdep.c
@@ -610,7 +610,7 @@ nexus_dmamem_alloc(bus_dma_tag_t pdmat, bus_dma_tag_t ddmat, void **vaddr,
if ((ddmat->dt_maxsize <= PAGE_SIZE)) {
*vaddr = malloc(ddmat->dt_maxsize, M_DEVBUF,
- (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK);
+ (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : 0);
} else {
/*
* XXX: Use contigmalloc until it is merged into this facility
@@ -618,7 +618,7 @@ nexus_dmamem_alloc(bus_dma_tag_t pdmat, bus_dma_tag_t ddmat, void **vaddr,
* allocations yet though.
*/
*vaddr = contigmalloc(ddmat->dt_maxsize, M_DEVBUF,
- (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK,
+ (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : 0,
0ul, ddmat->dt_lowaddr,
ddmat->dt_alignment ? ddmat->dt_alignment : 1UL,
ddmat->dt_boundary);
diff --git a/sys/sparc64/sparc64/counter.c b/sys/sparc64/sparc64/counter.c
index 19bffef..d90b89f 100644
--- a/sys/sparc64/sparc64/counter.c
+++ b/sys/sparc64/sparc64/counter.c
@@ -83,8 +83,8 @@ sparc64_counter_init(bus_space_tag_t tag, bus_space_handle_t handle,
bus_space_write_8(tag, handle, offset + CTR_CT1 + CTR_LIMIT,
COUNTER_MASK);
/* Register as a time counter. */
- tc = malloc(sizeof(*tc), M_DEVBUF, M_WAITOK);
- sc = malloc(sizeof(*sc), M_DEVBUF, M_WAITOK);
+ tc = malloc(sizeof(*tc), M_DEVBUF, 0);
+ sc = malloc(sizeof(*sc), M_DEVBUF, 0);
sc->sc_tag = tag;
sc->sc_handle = handle;
sc->sc_offset = offset + CTR_CT0;
diff --git a/sys/sparc64/sparc64/iommu.c b/sys/sparc64/sparc64/iommu.c
index af033bf..2fc7865 100644
--- a/sys/sparc64/sparc64/iommu.c
+++ b/sys/sparc64/sparc64/iommu.c
@@ -677,7 +677,7 @@ iommu_dvmamem_alloc(bus_dma_tag_t pt, bus_dma_tag_t dt, struct iommu_state *is,
if ((error = sparc64_dmamem_alloc_map(dt, mapp)) != 0)
return (error);
if ((*vaddr = malloc(dt->dt_maxsize, M_IOMMU,
- (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK)) == NULL) {
+ (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : 0)) == NULL) {
error = ENOMEM;
sparc64_dmamem_free_map(dt, *mapp);
return (error);
diff --git a/sys/sparc64/sparc64/mem.c b/sys/sparc64/sparc64/mem.c
index cb20e6a..1edb50e 100644
--- a/sys/sparc64/sparc64/mem.c
+++ b/sys/sparc64/sparc64/mem.c
@@ -150,7 +150,7 @@ mmrw(dev_t dev, struct uio *uio, int flags)
case 0:
/* mem (physical memory) */
if (buf == NULL) {
- buf = malloc(PAGE_SIZE, M_DEVBUF, M_WAITOK);
+ buf = malloc(PAGE_SIZE, M_DEVBUF, 0);
if (buf == NULL) {
error = ENOMEM;
break;
diff --git a/sys/sparc64/sparc64/nexus.c b/sys/sparc64/sparc64/nexus.c
index cf70ced..0a1ee91 100644
--- a/sys/sparc64/sparc64/nexus.c
+++ b/sys/sparc64/sparc64/nexus.c
@@ -234,7 +234,7 @@ nexus_probe(device_t dev)
}
cdev = device_add_child(dev, NULL, -1);
if (cdev != NULL) {
- dinfo = malloc(sizeof(*dinfo), M_NEXUS, M_WAITOK);
+ dinfo = malloc(sizeof(*dinfo), M_NEXUS, 0);
dinfo->ndi_node = child;
dinfo->ndi_name = name;
dinfo->ndi_device_type = type;
diff --git a/sys/sparc64/sparc64/ofw_bus.c b/sys/sparc64/sparc64/ofw_bus.c
index 605a347..3d5736e 100644
--- a/sys/sparc64/sparc64/ofw_bus.c
+++ b/sys/sparc64/sparc64/ofw_bus.c
@@ -108,7 +108,7 @@ ofw_bus_find_intr(u_int8_t *intr, int intrsz, u_int8_t *regs, int physsz,
int i, rsz, tsz;
rsz = -1;
- ref = malloc(physsz + intrsz, M_TEMP, M_WAITOK);
+ ref = malloc(physsz + intrsz, M_TEMP, 0);
if (imapmsk != NULL) {
for (i = 0; i < physsz; i++)
ref[i] = regs[i] & imapmsk[i];
@@ -131,7 +131,7 @@ ofw_bus_find_intr(u_int8_t *intr, int intrsz, u_int8_t *regs, int physsz,
KASSERT(i >= physsz + intrsz + sizeof(parent) +
pintrsz, ("ofw_bus_find_intr: truncated map"));
if (bcmp(ref, mptr, physsz + intrsz) == 0) {
- *result = malloc(pintrsz, M_OFWPROP, M_WAITOK);
+ *result = malloc(pintrsz, M_OFWPROP, 0);
bcopy(mptr + physsz + intrsz + sizeof(parent),
*result, pintrsz);
rsz = pintrsz;
@@ -177,7 +177,7 @@ ofw_bus_route_intr(phandle_t node, int intrp, obr_callback_t *cb)
} else {
ic = intrp;
isz = sizeof(ic);
- intr = malloc(isz, M_OFWPROP, M_WAITOK);
+ intr = malloc(isz, M_OFWPROP, 0);
bcopy(&ic, intr, isz);
}
/*
diff --git a/sys/sparc64/sparc64/sys_machdep.c b/sys/sparc64/sparc64/sys_machdep.c
index 34be95a..4a0b51e 100644
--- a/sys/sparc64/sparc64/sys_machdep.c
+++ b/sys/sparc64/sparc64/sys_machdep.c
@@ -117,7 +117,7 @@ sparc_utrap_install(struct thread *td, char *args)
if (ua.type != UTH_NOCHANGE) {
if (ut == NULL) {
ut = malloc(sizeof *ut, M_SUBPROC,
- M_WAITOK | M_ZERO);
+ M_ZERO);
ut->ut_refcnt = 1;
td->td_proc->p_md.md_utrap = ut;
}
diff --git a/sys/sys/malloc.h b/sys/sys/malloc.h
index f610439..57b3071 100644
--- a/sys/sys/malloc.h
+++ b/sys/sys/malloc.h
@@ -46,8 +46,9 @@
/*
* flags to malloc.
*/
-#define M_WAITOK 0x0000
+#ifndef M_NOWAIT
#define M_NOWAIT 0x0001 /* do not block */
+#endif /* M_NOWAIT */
#define M_USE_RESERVE 0x0002 /* can alloc out of reserve memory */
#define M_ZERO 0x0004 /* bzero the allocation */
#define M_NOVM 0x0008 /* don't ask VM for pages */
diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h
index 0ad8664..a66c1fb 100644
--- a/sys/sys/mbuf.h
+++ b/sys/sys/mbuf.h
@@ -263,13 +263,13 @@ struct mbstat {
/*
* Flags specifying how an allocation should be made.
- * M_DONTWAIT means "don't block if nothing is available" whereas
- * M_TRYWAIT means "block for mbuf_wait ticks at most if nothing is
+ * M_NOWAIT means "don't block if nothing is available" whereas
+ * 0 means "block for mbuf_wait ticks at most if nothing is
* available."
*/
-#define M_DONTWAIT 1
-#define M_TRYWAIT 0
-#define M_WAIT M_TRYWAIT /* XXX: Deprecated. */
+#ifndef M_NOWAIT /* malloc.h also defines this. */
+#define M_NOWAIT 0x0001
+#endif
#ifdef _KERNEL
/*-
@@ -404,7 +404,7 @@ struct mbstat {
#define M_COPYALL 1000000000
/* Compatibility with 4.3. */
-#define m_copy(m, o, l) m_copym((m), (o), (l), M_DONTWAIT)
+#define m_copy(m, o, l) m_copym((m), (o), (l), M_NOWAIT)
extern int max_datalen; /* MHLEN - max_hdr */
extern int max_hdr; /* Largest link + protocol header */
diff --git a/sys/sys/posix4.h b/sys/sys/posix4.h
index b17e927..033c1ec 100644
--- a/sys/sys/posix4.h
+++ b/sys/sys/posix4.h
@@ -56,7 +56,7 @@ int SC (struct thread *td, struct SC##_args *uap) \
MALLOC_DECLARE(M_P31B);
-#define p31b_malloc(SIZE) malloc((SIZE), M_P31B, M_WAITOK)
+#define p31b_malloc(SIZE) malloc((SIZE), M_P31B, 0)
#define p31b_free(P) free((P), M_P31B)
int p31b_proc(struct proc *, pid_t, struct proc **);
diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h
index 6b22cfd..6b715f2 100644
--- a/sys/sys/socketvar.h
+++ b/sys/sys/socketvar.h
@@ -253,7 +253,7 @@ struct xsocket {
* Returns error without lock if sleep is interrupted.
*/
#define sblock(sb, wf) ((sb)->sb_flags & SB_LOCK ? \
- (((wf) == M_WAITOK) ? sb_lock(sb) : EWOULDBLOCK) : \
+ (((wf) == 0) ? sb_lock(sb) : EWOULDBLOCK) : \
((sb)->sb_flags |= SB_LOCK), 0)
/* release lock on sockbuf sb */
diff --git a/sys/ufs/ffs/ffs_inode.c b/sys/ufs/ffs/ffs_inode.c
index ed4e04c..7af8b69 100644
--- a/sys/ufs/ffs/ffs_inode.c
+++ b/sys/ufs/ffs/ffs_inode.c
@@ -573,7 +573,7 @@ ffs_indirtrunc(ip, lbn, dbn, lastbn, level, countp)
else
bap2 = (ufs2_daddr_t *)bp->b_data;
if (lastbn != -1) {
- MALLOC(copy, caddr_t, fs->fs_bsize, M_TEMP, M_WAITOK);
+ MALLOC(copy, caddr_t, fs->fs_bsize, M_TEMP, 0);
bcopy((caddr_t)bp->b_data, copy, (u_int)fs->fs_bsize);
for (i = last + 1; i < NINDIR(fs); i++)
BAP(ip, i) = 0;
diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c
index 7fe373d..b26d10b 100644
--- a/sys/ufs/ffs/ffs_snapshot.c
+++ b/sys/ufs/ffs/ffs_snapshot.c
@@ -269,7 +269,7 @@ restart:
* the suspension period.
*/
len = howmany(fs->fs_ncg, NBBY);
- MALLOC(fs->fs_active, int *, len, M_DEVBUF, M_WAITOK);
+ MALLOC(fs->fs_active, int *, len, M_DEVBUF, 0);
bzero(fs->fs_active, len);
for (cg = 0; cg < fs->fs_ncg; cg++) {
error = UFS_BALLOC(vp, (off_t)(cgtod(fs, cg)) << fs->fs_fshift,
@@ -359,7 +359,7 @@ restart:
size = blkroundup(fs, fs->fs_cssize);
if (fs->fs_contigsumsize > 0)
size += fs->fs_ncg * sizeof(int32_t);
- space = malloc((u_long)size, M_UFSMNT, M_WAITOK);
+ space = malloc((u_long)size, M_UFSMNT, 0);
copy_fs->fs_csp = space;
bcopy(fs->fs_csp, copy_fs->fs_csp, fs->fs_cssize);
(char *)space += fs->fs_cssize;
@@ -473,7 +473,7 @@ loop:
VI_UNLOCK(devvp);
MALLOC(lkp, struct lock *, sizeof(struct lock), M_UFSMNT,
- M_WAITOK);
+ 0);
lockinit(lkp, PVFS, "snaplk", VLKTIMEOUT,
LK_CANRECURSE | LK_NOPAUSE);
VI_LOCK(vp);
@@ -536,7 +536,7 @@ out1:
snaplistsize = fs->fs_ncg + howmany(fs->fs_cssize, fs->fs_bsize) +
FSMAXSNAP + 1 /* superblock */ + 1 /* last block */ + 1 /* size */;
MALLOC(snapblklist, daddr_t *, snaplistsize * sizeof(daddr_t),
- M_UFSMNT, M_WAITOK);
+ M_UFSMNT, 0);
ip->i_snapblklist = &snapblklist[1];
/*
* Expunge the blocks used by the snapshots from the set of
@@ -872,7 +872,7 @@ indiracct_ufs1(snapvp, cancelvp, level, blkno, lbn, rlbn, remblks,
last = howmany(remblks, blksperindir);
if (last > NINDIR(fs))
last = NINDIR(fs);
- MALLOC(bap, ufs1_daddr_t *, fs->fs_bsize, M_DEVBUF, M_WAITOK);
+ MALLOC(bap, ufs1_daddr_t *, fs->fs_bsize, M_DEVBUF, 0);
bcopy(bp->b_data, (caddr_t)bap, fs->fs_bsize);
bqrelse(bp);
error = (*acctfunc)(snapvp, &bap[0], &bap[last], fs,
@@ -1147,7 +1147,7 @@ indiracct_ufs2(snapvp, cancelvp, level, blkno, lbn, rlbn, remblks,
last = howmany(remblks, blksperindir);
if (last > NINDIR(fs))
last = NINDIR(fs);
- MALLOC(bap, ufs2_daddr_t *, fs->fs_bsize, M_DEVBUF, M_WAITOK);
+ MALLOC(bap, ufs2_daddr_t *, fs->fs_bsize, M_DEVBUF, 0);
bcopy(bp->b_data, (caddr_t)bap, fs->fs_bsize);
bqrelse(bp);
error = (*acctfunc)(snapvp, &bap[0], &bap[last], fs,
@@ -1731,7 +1731,7 @@ ffs_snapshot_mount(mp)
VI_UNLOCK(devvp);
MALLOC(lkp, struct lock *, sizeof(struct lock),
- M_UFSMNT, M_WAITOK);
+ M_UFSMNT, 0);
lockinit(lkp, PVFS, "snaplk", VLKTIMEOUT,
LK_CANRECURSE | LK_NOPAUSE);
VI_LOCK(vp);
@@ -1779,7 +1779,7 @@ ffs_snapshot_mount(mp)
return;
}
MALLOC(snapblklist, void *, snaplistsize * sizeof(daddr_t),
- M_UFSMNT, M_WAITOK);
+ M_UFSMNT, 0);
auio.uio_iovcnt = 1;
aiov.iov_base = snapblklist;
aiov.iov_len = snaplistsize * sizeof (daddr_t);
diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c
index 872433d..fcc8929 100644
--- a/sys/ufs/ffs/ffs_softdep.c
+++ b/sys/ufs/ffs/ffs_softdep.c
@@ -96,7 +96,7 @@ static MALLOC_DEFINE(M_MKDIR, "mkdir","New directory");
static MALLOC_DEFINE(M_DIRREM, "dirrem","Directory entry deleted");
static MALLOC_DEFINE(M_NEWDIRBLK, "newdirblk","Unclaimed new directory block");
-#define M_SOFTDEP_FLAGS (M_WAITOK | M_USE_RESERVE)
+#define M_SOFTDEP_FLAGS (M_USE_RESERVE)
#define D_PAGEDEP 0
#define D_INODEDEP 1
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index e29cdb6..203ad03 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -686,9 +686,9 @@ ffs_mountfs(devvp, mp, td)
fs->fs_pendingblocks = 0;
fs->fs_pendinginodes = 0;
}
- ump = malloc(sizeof *ump, M_UFSMNT, M_WAITOK | M_ZERO);
+ ump = malloc(sizeof *ump, M_UFSMNT, M_ZERO);
ump->um_fs = malloc((u_long)fs->fs_sbsize, M_UFSMNT,
- M_WAITOK);
+ 0);
if (fs->fs_magic == FS_UFS1_MAGIC) {
ump->um_fstype = UFS1;
ump->um_balloc = ffs_balloc_ufs1;
@@ -715,7 +715,7 @@ ffs_mountfs(devvp, mp, td)
if (fs->fs_contigsumsize > 0)
size += fs->fs_ncg * sizeof(int32_t);
size += fs->fs_ncg * sizeof(u_int8_t);
- space = malloc((u_long)size, M_UFSMNT, M_WAITOK);
+ space = malloc((u_long)size, M_UFSMNT, 0);
fs->fs_csp = space;
for (i = 0; i < blks; i += fs->fs_frag) {
size = fs->fs_bsize;
@@ -1248,7 +1248,7 @@ ffs_vget(mp, ino, flags, vpp)
* which will cause a panic because ffs_sync() blindly
* dereferences vp->v_data (as well it should).
*/
- ip = uma_zalloc(uma_inode, M_WAITOK);
+ ip = uma_zalloc(uma_inode, 0);
/* Allocate a new vnode/inode. */
error = getnewvnode("ufs", mp, ffs_vnodeop_p, &vp);
@@ -1315,9 +1315,9 @@ ffs_vget(mp, ino, flags, vpp)
return (error);
}
if (ip->i_ump->um_fstype == UFS1)
- ip->i_din1 = uma_zalloc(uma_ufs1, M_WAITOK);
+ ip->i_din1 = uma_zalloc(uma_ufs1, 0);
else
- ip->i_din2 = uma_zalloc(uma_ufs2, M_WAITOK);
+ ip->i_din2 = uma_zalloc(uma_ufs2, 0);
ffs_load_inode(bp, ip, fs, ino);
if (DOINGSOFTDEP(vp))
softdep_load_inodeblock(ip);
diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c
index 626b156..6213a49 100644
--- a/sys/ufs/ffs/ffs_vnops.c
+++ b/sys/ufs/ffs/ffs_vnops.c
@@ -1382,7 +1382,7 @@ ffs_rdextattr(u_char **p, struct vnode *vp, struct thread *td, int extra)
dp = ip->i_din2;
easize = dp->di_extsize;
- eae = malloc(easize + extra, M_TEMP, M_WAITOK);
+ eae = malloc(easize + extra, M_TEMP, 0);
liovec.iov_base = eae;
liovec.iov_len = easize;
@@ -1707,7 +1707,7 @@ vop_setextattr {
ealength += eapad1 + ealen + eapad2;
}
- eae = malloc(ip->i_ea_len + ealength, M_TEMP, M_WAITOK);
+ eae = malloc(ip->i_ea_len + ealength, M_TEMP, 0);
bcopy(ip->i_ea_area, eae, ip->i_ea_len);
easize = ip->i_ea_len;
diff --git a/sys/ufs/ufs/ufs_dirhash.c b/sys/ufs/ufs/ufs_dirhash.c
index f2d3a70..27d32ef 100644
--- a/sys/ufs/ufs/ufs_dirhash.c
+++ b/sys/ufs/ufs/ufs_dirhash.c
@@ -187,7 +187,7 @@ ufsdirhash_build(struct inode *ip)
goto fail;
for (i = 0; i < narrays; i++) {
if ((dh->dh_hash[i] = uma_zalloc(ufsdirhash_zone,
- M_WAITOK)) == NULL)
+ 0)) == NULL)
goto fail;
for (j = 0; j < DH_NBLKOFF; j++)
dh->dh_hash[i][j] = DIRHASH_EMPTY;
diff --git a/sys/ufs/ufs/ufs_extattr.c b/sys/ufs/ufs/ufs_extattr.c
index 3d999b1..57d30e7 100644
--- a/sys/ufs/ufs/ufs_extattr.c
+++ b/sys/ufs/ufs/ufs_extattr.c
@@ -254,7 +254,7 @@ ufs_extattr_lookup(struct vnode *start_dvp, int lockparent, char *dirname,
cnp.cn_flags |= LOCKPARENT;
cnp.cn_thread = td;
cnp.cn_cred = td->td_ucred;
- cnp.cn_pnbuf = uma_zalloc(namei_zone, M_WAITOK);
+ cnp.cn_pnbuf = uma_zalloc(namei_zone, 0);
cnp.cn_nameptr = cnp.cn_pnbuf;
error = copystr(dirname, cnp.cn_pnbuf, MAXPATHLEN,
(size_t *) &cnp.cn_namelen);
@@ -383,7 +383,7 @@ ufs_extattr_iterate_directory(struct ufsmount *ump, struct vnode *dvp,
if (dvp->v_type != VDIR)
return (ENOTDIR);
- MALLOC(dirbuf, char *, DIRBLKSIZ, M_TEMP, M_WAITOK);
+ MALLOC(dirbuf, char *, DIRBLKSIZ, M_TEMP, 0);
auio.uio_iov = &aiov;
auio.uio_iovcnt = 1;
@@ -594,7 +594,7 @@ ufs_extattr_enable(struct ufsmount *ump, int attrnamespace,
return (EINVAL);
MALLOC(attribute, struct ufs_extattr_list_entry *,
- sizeof(struct ufs_extattr_list_entry), M_UFS_EXTATTR, M_WAITOK);
+ sizeof(struct ufs_extattr_list_entry), M_UFS_EXTATTR, 0);
if (attribute == NULL)
return (ENOMEM);
diff --git a/sys/ufs/ufs/ufs_quota.c b/sys/ufs/ufs/ufs_quota.c
index 2582412..683c6bd 100644
--- a/sys/ufs/ufs/ufs_quota.c
+++ b/sys/ufs/ufs/ufs_quota.c
@@ -822,7 +822,7 @@ dqget(vp, id, ump, type, dqp)
desireddquot += DQUOTINC;
if (numdquot < desireddquot) {
dq = (struct dquot *)malloc(sizeof *dq, M_DQUOT,
- M_WAITOK | M_ZERO);
+ M_ZERO);
numdquot++;
} else {
if ((dq = TAILQ_FIRST(&dqfreelist)) == NULL) {
diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c
index af65b36..de56eec 100644
--- a/sys/ufs/ufs/ufs_vnops.c
+++ b/sys/ufs/ufs/ufs_vnops.c
@@ -368,7 +368,7 @@ ufs_access(ap)
#ifdef UFS_ACL
if ((vp->v_mount->mnt_flag & MNT_ACLS) != 0) {
- MALLOC(acl, struct acl *, sizeof(*acl), M_ACL, M_WAITOK);
+ MALLOC(acl, struct acl *, sizeof(*acl), M_ACL, 0);
len = sizeof(*acl);
error = VOP_GETACL(vp, ACL_TYPE_ACCESS, acl, ap->a_cred,
ap->a_td);
@@ -1442,8 +1442,8 @@ ufs_mkdir(ap)
#ifdef UFS_ACL
acl = dacl = NULL;
if ((dvp->v_mount->mnt_flag & MNT_ACLS) != 0) {
- MALLOC(acl, struct acl *, sizeof(*acl), M_ACL, M_WAITOK);
- MALLOC(dacl, struct acl *, sizeof(*dacl), M_ACL, M_WAITOK);
+ MALLOC(acl, struct acl *, sizeof(*acl), M_ACL, 0);
+ MALLOC(dacl, struct acl *, sizeof(*dacl), M_ACL, 0);
/*
* Retrieve default ACL from parent, if any.
@@ -1845,7 +1845,7 @@ ufs_readdir(ap)
auio.uio_iovcnt = 1;
auio.uio_segflg = UIO_SYSSPACE;
aiov.iov_len = count;
- MALLOC(dirbuf, caddr_t, count, M_TEMP, M_WAITOK);
+ MALLOC(dirbuf, caddr_t, count, M_TEMP, 0);
aiov.iov_base = dirbuf;
error = VOP_READ(ap->a_vp, &auio, 0, ap->a_cred);
if (error == 0) {
@@ -1889,7 +1889,7 @@ ufs_readdir(ap)
dp = (struct dirent *)((caddr_t) dp + dp->d_reclen))
ncookies++;
MALLOC(cookies, u_long *, ncookies * sizeof(u_long), M_TEMP,
- M_WAITOK);
+ 0);
for (dp = dpStart, cookiep = cookies;
dp < dpEnd;
dp = (struct dirent *)((caddr_t) dp + dp->d_reclen)) {
@@ -2422,7 +2422,7 @@ ufs_makeinode(mode, dvp, vpp, cnp)
#ifdef UFS_ACL
acl = NULL;
if ((dvp->v_mount->mnt_flag & MNT_ACLS) != 0) {
- MALLOC(acl, struct acl *, sizeof(*acl), M_ACL, M_WAITOK);
+ MALLOC(acl, struct acl *, sizeof(*acl), M_ACL, 0);
/*
* Retrieve default ACL for parent, if any.
diff --git a/sys/vm/device_pager.c b/sys/vm/device_pager.c
index e7acedc..a0cf528 100644
--- a/sys/vm/device_pager.c
+++ b/sys/vm/device_pager.c
@@ -266,7 +266,7 @@ dev_pager_getfake(paddr)
{
vm_page_t m;
- m = uma_zalloc(fakepg_zone, M_WAITOK);
+ m = uma_zalloc(fakepg_zone, 0);
m->flags = PG_BUSY | PG_FICTITIOUS;
m->valid = VM_PAGE_BITS_ALL;
diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c
index 0fb5d22..58568a2 100644
--- a/sys/vm/swap_pager.c
+++ b/sys/vm/swap_pager.c
@@ -337,7 +337,7 @@ swap_pager_swap_init()
*/
for (n = 1; n < n2 / 8; n *= 2)
;
- swhash = malloc(sizeof(struct swblock *) * n, M_VMPGDATA, M_WAITOK | M_ZERO);
+ swhash = malloc(sizeof(struct swblock *) * n, M_VMPGDATA, M_ZERO);
swhash_mask = n - 1;
}
diff --git a/sys/vm/uma.h b/sys/vm/uma.h
index 769d81a..988b79f 100644
--- a/sys/vm/uma.h
+++ b/sys/vm/uma.h
@@ -209,7 +209,7 @@ void uma_zdestroy(uma_zone_t zone);
*
* Returns:
* A non null pointer to an initialized element from the zone is
- * garanteed if the wait flag is M_WAITOK, otherwise a null pointer may be
+ * garanteed if the wait flag is not M_NOWAIT, otherwise null may be
* returned if the zone is empty or the ctor failed.
*/
diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c
index 044112d..ef43fc2 100644
--- a/sys/vm/uma_core.c
+++ b/sys/vm/uma_core.c
@@ -354,7 +354,7 @@ hash_alloc(struct uma_hash *hash)
} else {
alloc = sizeof(hash->uh_slab_hash[0]) * UMA_HASH_SIZE_INIT;
hash->uh_slab_hash = uma_zalloc_internal(hashzone, NULL,
- M_WAITOK);
+ 0);
hash->uh_hashsize = UMA_HASH_SIZE_INIT;
}
if (hash->uh_slab_hash) {
@@ -1300,7 +1300,7 @@ uma_zcreate(char *name, size_t size, uma_ctor ctor, uma_dtor dtor,
args.align = align;
args.flags = flags;
- return (uma_zalloc_internal(zones, &args, M_WAITOK));
+ return (uma_zalloc_internal(zones, &args, 0));
}
/* See uma.h */
@@ -1326,7 +1326,7 @@ uma_zalloc_arg(uma_zone_t zone, void *udata, int flags)
if (!(flags & M_NOWAIT)) {
KASSERT(curthread->td_intr_nesting_level == 0,
- ("malloc(M_WAITOK) in interrupt context"));
+ ("malloc without M_NOWAIT in interrupt context"));
WITNESS_SLEEP(1, NULL);
}
@@ -1609,7 +1609,7 @@ done:
* Arguments
* zone The zone to alloc for.
* udata The data to be passed to the constructor.
- * flags M_WAITOK, M_NOWAIT, M_ZERO.
+ * flags M_NOWAIT, M_ZERO.
*
* Returns
* NULL if there is no memory and M_NOWAIT is set
@@ -1964,7 +1964,7 @@ uma_prealloc(uma_zone_t zone, int items)
slabs++;
while (slabs > 0) {
- slab = slab_zalloc(zone, M_WAITOK);
+ slab = slab_zalloc(zone, 0);
LIST_INSERT_HEAD(&zone->uz_free_slab, slab, us_link);
slabs--;
}
@@ -2074,7 +2074,7 @@ sysctl_vm_zone(SYSCTL_HANDLER_ARGS)
cnt++;
mtx_unlock(&uma_mtx);
MALLOC(tmpbuf, char *, (cnt == 0 ? 1 : cnt) * linesize,
- M_TEMP, M_WAITOK);
+ M_TEMP, 0);
len = snprintf(tmpbuf, linesize,
"\nITEM SIZE LIMIT USED FREE REQUESTS\n\n");
if (cnt == 0)
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index f1f5b51..6d52a80 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -255,7 +255,7 @@ vmspace_alloc(min, max)
struct vmspace *vm;
GIANT_REQUIRED;
- vm = uma_zalloc(vmspace_zone, M_WAITOK);
+ vm = uma_zalloc(vmspace_zone, 0);
CTR1(KTR_VM, "vmspace_alloc: %p", vm);
_vm_map_init(&vm->vm_map, min, max);
pmap_pinit(vmspace_pmap(vm));
@@ -513,7 +513,7 @@ vm_map_create(pmap_t pmap, vm_offset_t min, vm_offset_t max)
{
vm_map_t result;
- result = uma_zalloc(mapzone, M_WAITOK);
+ result = uma_zalloc(mapzone, 0);
CTR1(KTR_VM, "vm_map_create: %p", result);
_vm_map_init(result, min, max);
result->pmap = pmap;
@@ -572,7 +572,7 @@ vm_map_entry_create(vm_map_t map)
if (map->system_map)
new_entry = uma_zalloc(kmapentzone, M_NOWAIT);
else
- new_entry = uma_zalloc(mapentzone, M_WAITOK);
+ new_entry = uma_zalloc(mapentzone, 0);
if (new_entry == NULL)
panic("vm_map_entry_create: kernel resources exhausted");
return (new_entry);
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c
index 1959cd3..f00499f 100644
--- a/sys/vm/vm_object.c
+++ b/sys/vm/vm_object.c
@@ -353,7 +353,7 @@ vm_object_allocate_wait(objtype_t type, vm_pindex_t size, int flags)
vm_object_t
vm_object_allocate(objtype_t type, vm_pindex_t size)
{
- return(vm_object_allocate_wait(type, size, M_WAITOK));
+ return(vm_object_allocate_wait(type, size, 0));
}
OpenPOWER on IntegriCloud