after discussions with beck deraadt kettenis.
-/* $OpenBSD: cd.c,v 1.213 2013/11/01 17:36:19 krw Exp $ */
+/* $OpenBSD: cd.c,v 1.214 2014/07/12 18:50:25 tedu Exp $ */
/* $NetBSD: cd.c,v 1.100 1997/04/02 02:29:30 mycroft Exp $ */
/*
lp = malloc(sizeof(*lp), M_TEMP, M_WAITOK);
cdgetdisklabel(dev, sc, lp, 0);
bcopy(lp, sc->sc_dk.dk_label, sizeof(*lp));
- free(lp, M_TEMP);
+ free(lp, M_TEMP, 0);
break;
case DIOCGPDINFO:
-/* $OpenBSD: ch.c,v 1.46 2011/06/17 00:00:51 matthew Exp $ */
+/* $OpenBSD: ch.c,v 1.47 2014/07/12 18:50:25 tedu Exp $ */
/* $NetBSD: ch.c,v 1.26 1997/02/21 22:06:52 thorpej Exp $ */
/*
if (data != NULL)
dma_free(data, size);
if (user_data != NULL)
- free(user_data, M_DEVBUF);
+ free(user_data, M_DEVBUF, 0);
return (error);
}
-/* $OpenBSD: mpath.c,v 1.35 2014/05/01 10:25:44 jsg Exp $ */
+/* $OpenBSD: mpath.c,v 1.36 2014/07/12 18:50:25 tedu Exp $ */
/*
* Copyright (c) 2009 David Gwynne <dlg@openbsd.org>
M_WAITOK | M_CANFAIL | M_ZERO);
if (g == NULL) {
if (newdev) {
- free(d, M_DEVBUF);
+ free(d, M_DEVBUF, 0);
sc->sc_devs[target] = NULL;
}
mtx_leave(&d->d_mtx);
if (g != NULL)
- free(g, M_DEVBUF);
+ free(g, M_DEVBUF, 0);
scsi_xsh_del(&p->p_xsh);
-/* $OpenBSD: safte.c,v 1.48 2011/06/15 01:10:05 dlg Exp $ */
+/* $OpenBSD: safte.c,v 1.49 2014/07/12 18:50:25 tedu Exp $ */
/*
* Copyright (c) 2005 David Gwynne <dlg@openbsd.org>
printf("%s: unable to register update task\n",
DEVNAME(sc));
sc->sc_nsensors = sc->sc_ntemps = 0;
- free(sc->sc_sensors, M_DEVBUF);
+ free(sc->sc_sensors, M_DEVBUF, 0);
} else {
for (i = 0; i < sc->sc_nsensors; i++)
sensor_attach(&sc->sc_sensordev,
for (i = 0; i < sc->sc_nsensors; i++)
sensor_detach(&sc->sc_sensordev,
&sc->sc_sensors[i].se_sensor);
- free(sc->sc_sensors, M_DEVBUF);
+ free(sc->sc_sensors, M_DEVBUF, 0);
}
if (sc->sc_encbuf != NULL)
-/* $OpenBSD: scsiconf.c,v 1.187 2014/04/22 07:29:11 dlg Exp $ */
+/* $OpenBSD: scsiconf.c,v 1.188 2014/07/12 18:50:25 tedu Exp $ */
/* $NetBSD: scsiconf.c,v 1.57 1996/05/02 01:09:01 neil Exp $ */
/*
/* 3. if its using the openings io allocator, clean it up */
if (ISSET(link->flags, SDEV_OWN_IOPL)) {
scsi_iopool_destroy(link->pool);
- free(link->pool, M_DEVBUF);
+ free(link->pool, M_DEVBUF, 0);
}
/* 4. free up its state in the adapter */
if (link->id != NULL)
devid_free(link->id);
scsi_remove_link(sc, link);
- free(link, M_DEVBUF);
+ free(link, M_DEVBUF, 0);
return (0);
}
devid_free(sc_link->id);
bad:
if (ISSET(sc_link->flags, SDEV_OWN_IOPL))
- free(sc_link->pool, M_DEVBUF);
+ free(sc_link->pool, M_DEVBUF, 0);
if (scsi->adapter_link->adapter->dev_free != NULL)
scsi->adapter_link->adapter->dev_free(sc_link);
free:
- free(sc_link, M_DEVBUF);
+ free(sc_link, M_DEVBUF, 0);
return (rslt);
}
sizeof(link->inqdata.vendor) + sizeof(link->inqdata.product) + len,
id);
- free(id, M_TEMP);
+ free(id, M_TEMP, 0);
free:
dma_free(pg, pglen);
devid_free(struct devid *d)
{
if (--d->d_refcount == 0)
- free(d, M_DEVBUF);
+ free(d, M_DEVBUF, 0);
}
-/* $OpenBSD: sd.c,v 1.254 2014/07/10 19:13:55 mpi Exp $ */
+/* $OpenBSD: sd.c,v 1.255 2014/07/12 18:50:25 tedu Exp $ */
/* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */
/*-
lp = malloc(sizeof(*lp), M_TEMP, M_WAITOK);
sdgetdisklabel(dev, sc, lp, 0);
bcopy(lp, sc->sc_dk.dk_label, sizeof(*lp));
- free(lp, M_TEMP);
+ free(lp, M_TEMP, 0);
goto exit;
case DIOCGPDINFO:
-/* $OpenBSD: ses.c,v 1.51 2011/03/17 21:30:24 deraadt Exp $ */
+/* $OpenBSD: ses.c,v 1.52 2014/07/12 18:50:25 tedu Exp $ */
/*
* Copyright (c) 2005 David Gwynne <dlg@openbsd.org>
sensor = TAILQ_FIRST(&sc->sc_sensors);
TAILQ_REMOVE(&sc->sc_sensors, sensor,
se_entry);
- free(sensor, M_DEVBUF);
+ free(sensor, M_DEVBUF, 0);
}
} else {
TAILQ_FOREACH(sensor, &sc->sc_sensors, se_entry)
while (!TAILQ_EMPTY(&sc->sc_slots)) {
slot = TAILQ_FIRST(&sc->sc_slots);
TAILQ_REMOVE(&sc->sc_slots, slot, sl_entry);
- free(slot, M_DEVBUF);
+ free(slot, M_DEVBUF, 0);
}
}
#endif
while (!TAILQ_EMPTY(&sc->sc_slots)) {
slot = TAILQ_FIRST(&sc->sc_slots);
TAILQ_REMOVE(&sc->sc_slots, slot, sl_entry);
- free(slot, M_DEVBUF);
+ free(slot, M_DEVBUF, 0);
}
}
#endif
sensor = TAILQ_FIRST(&sc->sc_sensors);
sensor_detach(&sc->sc_sensordev, &sensor->se_sensor);
TAILQ_REMOVE(&sc->sc_sensors, sensor, se_entry);
- free(sensor, M_DEVBUF);
+ free(sensor, M_DEVBUF, 0);
}
}
while (!TAILQ_EMPTY(&sc->sc_slots)) {
slot = TAILQ_FIRST(&sc->sc_slots);
TAILQ_REMOVE(&sc->sc_slots, slot, sl_entry);
- free(slot, M_DEVBUF);
+ free(slot, M_DEVBUF, 0);
}
#endif
while (!TAILQ_EMPTY(&sc->sc_sensors)) {
sensor = TAILQ_FIRST(&sc->sc_sensors);
TAILQ_REMOVE(&sc->sc_sensors, sensor, se_entry);
- free(sensor, M_DEVBUF);
+ free(sensor, M_DEVBUF, 0);
}
return (1);
}
-/* $OpenBSD: tmpfs_mem.c,v 1.3 2014/07/08 17:19:26 deraadt Exp $ */
+/* $OpenBSD: tmpfs_mem.c,v 1.4 2014/07/12 18:50:25 tedu Exp $ */
/* $NetBSD: tmpfs_mem.c,v 1.4 2011/05/24 01:09:47 rmind Exp $ */
/*
KASSERT(sz > 0 && sz <= 1024);
tmpfs_mem_decr(mp, sz);
- free(str, M_TEMP);
+ free(str, M_TEMP, 0);
}
int
-/* $OpenBSD: tmpfs_vfsops.c,v 1.3 2013/12/14 18:01:52 espie Exp $ */
+/* $OpenBSD: tmpfs_vfsops.c,v 1.4 2014/07/12 18:50:25 tedu Exp $ */
/* $NetBSD: tmpfs_vfsops.c,v 1.52 2011/09/27 01:10:43 christos Exp $ */
/*
tmpfs_mntmem_destroy(tmp);
/* mutex_destroy(&tmp->tm_lock); */
/* kmem_free(tmp, sizeof(*tmp)); */
- free(tmp, M_MISCFSMNT);
+ free(tmp, M_MISCFSMNT, 0);
mp->mnt_data = NULL;
return 0;