diff options
author | dchagin <dchagin@FreeBSD.org> | 2015-05-24 16:14:41 +0000 |
---|---|---|
committer | dchagin <dchagin@FreeBSD.org> | 2015-05-24 16:14:41 +0000 |
commit | f5eca4c95705929d25f9548a80b5041730c2186f (patch) | |
tree | b9f3eef56bef3f255bf956afdccd66fca35702b1 /sys/compat/linux/linux_uid16.c | |
parent | 8628fb1e0f34fc0ba285bde3d8bb9b2ee08f340e (diff) | |
download | FreeBSD-src-f5eca4c95705929d25f9548a80b5041730c2186f.zip FreeBSD-src-f5eca4c95705929d25f9548a80b5041730c2186f.tar.gz |
Where possible we will use M_LINUX malloc(9) type.
Move M_FUTEX defines to the linux_common.ko.
Differential Revision: https://reviews.freebsd.org/D1077
Reviewed by: emaste
Diffstat (limited to 'sys/compat/linux/linux_uid16.c')
-rw-r--r-- | sys/compat/linux/linux_uid16.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/compat/linux/linux_uid16.c b/sys/compat/linux/linux_uid16.c index 8c7c760..8aa728c 100644 --- a/sys/compat/linux/linux_uid16.c +++ b/sys/compat/linux/linux_uid16.c @@ -171,12 +171,12 @@ linux_setgroups16(struct thread *td, struct linux_setgroups16_args *args) LIN_SDT_PROBE1(uid16, linux_setgroups16, return, EINVAL); return (EINVAL); } - linux_gidset = malloc(ngrp * sizeof(*linux_gidset), M_TEMP, M_WAITOK); + linux_gidset = malloc(ngrp * sizeof(*linux_gidset), M_LINUX, M_WAITOK); error = copyin(args->gidset, linux_gidset, ngrp * sizeof(l_gid16_t)); if (error) { LIN_SDT_PROBE1(uid16, linux_setgroups16, copyin_error, error); LIN_SDT_PROBE1(uid16, linux_setgroups16, return, error); - free(linux_gidset, M_TEMP); + free(linux_gidset, M_LINUX); return (error); } newcred = crget(); @@ -218,7 +218,7 @@ linux_setgroups16(struct thread *td, struct linux_setgroups16_args *args) crfree(oldcred); error = 0; out: - free(linux_gidset, M_TEMP); + free(linux_gidset, M_LINUX); LIN_SDT_PROBE1(uid16, linux_setgroups16, return, error); return (error); @@ -259,14 +259,14 @@ linux_getgroups16(struct thread *td, struct linux_getgroups16_args *args) ngrp = 0; linux_gidset = malloc(bsd_gidsetsz * sizeof(*linux_gidset), - M_TEMP, M_WAITOK); + M_LINUX, M_WAITOK); while (ngrp < bsd_gidsetsz) { linux_gidset[ngrp] = bsd_gidset[ngrp + 1]; ngrp++; } error = copyout(linux_gidset, args->gidset, ngrp * sizeof(l_gid16_t)); - free(linux_gidset, M_TEMP); + free(linux_gidset, M_LINUX); if (error) { LIN_SDT_PROBE1(uid16, linux_getgroups16, copyout_error, error); LIN_SDT_PROBE1(uid16, linux_getgroups16, return, error); |