summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2018-09-18 10:52:15 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2018-09-18 10:52:15 +0000
commit08ed30b08319fab99ae1fcd27f76a5fb17250478 (patch)
tree078f639eb7a07ebfdcf6d0a4f65c7f993c060127
parentebfb5dddf666da3e36893ef431711e6b14ed52c0 (diff)
parent2ee857385108d299b716b075df1220fdc893b20b (diff)
downloadillumos-joyent-08ed30b08319fab99ae1fcd27f76a5fb17250478.tar.gz
[illumos-gate merge]
commit 2ee857385108d299b716b075df1220fdc893b20b 9675 memory leak from cpupart_create commit 09b2abb464ff7bbef397718b20686211ee1f1ddb 9635 we should enable user after creation with zfs tests
-rw-r--r--usr/src/test/zfs-tests/include/commands.cfg2
-rw-r--r--usr/src/test/zfs-tests/include/libtest.shlib1
-rw-r--r--usr/src/test/zfs-tests/tests/functional/delegate/zfs_allow_001_pos.ksh1
-rw-r--r--usr/src/test/zfs-tests/tests/functional/privilege/setup.ksh1
-rw-r--r--usr/src/uts/common/disp/cpupart.c6
5 files changed, 5 insertions, 6 deletions
diff --git a/usr/src/test/zfs-tests/include/commands.cfg b/usr/src/test/zfs-tests/include/commands.cfg
index c9097f0fc2..3b21caafb6 100644
--- a/usr/src/test/zfs-tests/include/commands.cfg
+++ b/usr/src/test/zfs-tests/include/commands.cfg
@@ -76,10 +76,10 @@ export USR_BIN_FILES='awk
od
pack
pagesize
+ passwd
pax
pfexec
pgrep
- pkginfo
pkill
ppriv
print
diff --git a/usr/src/test/zfs-tests/include/libtest.shlib b/usr/src/test/zfs-tests/include/libtest.shlib
index 61c4f97d70..6e7f5210a1 100644
--- a/usr/src/test/zfs-tests/include/libtest.shlib
+++ b/usr/src/test/zfs-tests/include/libtest.shlib
@@ -1869,6 +1869,7 @@ function add_user #<group_name> <user_name> <basedir>
fi
log_must useradd -g $gname -d $basedir/$uname -m $uname
+ log_must passwd -N $uname
return 0
}
diff --git a/usr/src/test/zfs-tests/tests/functional/delegate/zfs_allow_001_pos.ksh b/usr/src/test/zfs-tests/tests/functional/delegate/zfs_allow_001_pos.ksh
index 23db028b25..9d69d84124 100644
--- a/usr/src/test/zfs-tests/tests/functional/delegate/zfs_allow_001_pos.ksh
+++ b/usr/src/test/zfs-tests/tests/functional/delegate/zfs_allow_001_pos.ksh
@@ -68,6 +68,7 @@ log_note "Create a user called 'everyone'."
if ! id everyone > /dev/null 2>&1; then
user_added="TRUE"
log_must useradd everyone
+ log_must passwd -N everyone
fi
for dtst in $DATASETS ; do
log_must zfs allow everyone $perms $dtst
diff --git a/usr/src/test/zfs-tests/tests/functional/privilege/setup.ksh b/usr/src/test/zfs-tests/tests/functional/privilege/setup.ksh
index 3c946d21f2..aa5f0aeb73 100644
--- a/usr/src/test/zfs-tests/tests/functional/privilege/setup.ksh
+++ b/usr/src/test/zfs-tests/tests/functional/privilege/setup.ksh
@@ -60,6 +60,7 @@ done
log_must mkdir -p /export/home/$ZFS_USER
log_must useradd -c "ZFS Privileges Test User" -d /export/home/$ZFS_USER $ZFS_USER
+log_must passwd -N $ZFS_USER
echo $ZFS_USER > /tmp/zfs-privs-test-user.txt
echo $USES_NIS > /tmp/zfs-privs-test-nis.txt
diff --git a/usr/src/uts/common/disp/cpupart.c b/usr/src/uts/common/disp/cpupart.c
index 4ddc568187..123776a123 100644
--- a/usr/src/uts/common/disp/cpupart.c
+++ b/usr/src/uts/common/disp/cpupart.c
@@ -22,6 +22,7 @@
* Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
*
* Copyright 2018 Joyent, Inc.
+ * Copyright (c) 2017 by Delphix. All rights reserved.
*/
#include <sys/types.h>
@@ -823,15 +824,10 @@ cpupart_create(psetid_t *psid)
ASSERT(pool_lock_held());
pp = kmem_zalloc(sizeof (cpupart_t), KM_SLEEP);
- pp->cp_nlgrploads = lgrp_plat_max_lgrps();
- pp->cp_lgrploads = kmem_zalloc(sizeof (lpl_t) * pp->cp_nlgrploads,
- KM_SLEEP);
mutex_enter(&cpu_lock);
if (cp_numparts == cp_max_numparts) {
mutex_exit(&cpu_lock);
- kmem_free(pp->cp_lgrploads, sizeof (lpl_t) * pp->cp_nlgrploads);
- pp->cp_lgrploads = NULL;
kmem_free(pp, sizeof (cpupart_t));
return (ENOMEM);
}