diff options
author | John Levon <john.levon@joyent.com> | 2018-08-29 14:02:00 +0000 |
---|---|---|
committer | John Levon <john.levon@joyent.com> | 2018-08-29 14:02:00 +0000 |
commit | a90a1259342ecea6f70c0fd7f91981ff1fc9516e (patch) | |
tree | 713278eab996777f87e0e1f3c024bcba4c5285e1 | |
parent | 8c96f987edd0f06bbeca95261948cf4d97f0450c (diff) | |
download | illumos-joyent-RFD96.tar.gz |
self-reviewRFD96
-rw-r--r-- | usr/src/cmd/sgs/elfdump/common/corenote.c | 1 | ||||
-rw-r--r-- | usr/src/lib/libc/port/mapfile-vers | 1 | ||||
-rw-r--r-- | usr/src/lib/libc/port/threads/pthr_attr.c | 1 | ||||
-rw-r--r-- | usr/src/uts/common/exec/elf/elf_notes.c | 4 | ||||
-rw-r--r-- | usr/src/uts/common/fs/proc/prsubr.c | 6 | ||||
-rw-r--r-- | usr/src/uts/common/fs/proc/prvnops.c | 16 |
6 files changed, 16 insertions, 13 deletions
diff --git a/usr/src/cmd/sgs/elfdump/common/corenote.c b/usr/src/cmd/sgs/elfdump/common/corenote.c index b884f6357d..a5ba4e31b8 100644 --- a/usr/src/cmd/sgs/elfdump/common/corenote.c +++ b/usr/src/cmd/sgs/elfdump/common/corenote.c @@ -1430,6 +1430,7 @@ dump_lwpsinfo(note_state_t *state, const char *title) indent_exit(state); } + /* * Output information from psinfo_t structure. */ diff --git a/usr/src/lib/libc/port/mapfile-vers b/usr/src/lib/libc/port/mapfile-vers index 16b9f3d7fc..c2f537f4c9 100644 --- a/usr/src/lib/libc/port/mapfile-vers +++ b/usr/src/lib/libc/port/mapfile-vers @@ -78,6 +78,7 @@ $add amd64 $endif SYMBOL_VERSION ILLUMOS_0.28 { + protected: pthread_attr_getname_np; pthread_attr_setname_np; pthread_getname_np; diff --git a/usr/src/lib/libc/port/threads/pthr_attr.c b/usr/src/lib/libc/port/threads/pthr_attr.c index 95186cfcfc..5c64dd80bc 100644 --- a/usr/src/lib/libc/port/threads/pthr_attr.c +++ b/usr/src/lib/libc/port/threads/pthr_attr.c @@ -83,7 +83,6 @@ pthread_attr_destroy(pthread_attr_t *attr) { if (attr == NULL || attr->__pthread_attrp == NULL) return (EINVAL); - lfree(attr->__pthread_attrp, sizeof (thrattr_t)); attr->__pthread_attrp = NULL; return (0); diff --git a/usr/src/uts/common/exec/elf/elf_notes.c b/usr/src/uts/common/exec/elf/elf_notes.c index 34456ccc1e..53a405b42d 100644 --- a/usr/src/uts/common/exec/elf/elf_notes.c +++ b/usr/src/uts/common/exec/elf/elf_notes.c @@ -526,8 +526,8 @@ write_elfnotes(proc_t *p, int sig, vnode_t *vp, offset_t offset, if (error) goto done; - if (elfnote(vp, &offset, NT_LWPNAME, sizeof (name), - (caddr_t)&name, rlimit, credp) != 0) + if ((error = elfnote(vp, &offset, NT_LWPNAME, sizeof (name), + (caddr_t)&name, rlimit, credp)) != 0) goto done; diff --git a/usr/src/uts/common/fs/proc/prsubr.c b/usr/src/uts/common/fs/proc/prsubr.c index 3631b6df4b..2062970885 100644 --- a/usr/src/uts/common/fs/proc/prsubr.c +++ b/usr/src/uts/common/fs/proc/prsubr.c @@ -21,11 +21,11 @@ /* * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright 2018, Joyent, Inc. + * Copyright 2017, Joyent, Inc. */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ +/* All Rights Reserved */ #include <sys/types.h> #include <sys/t_lock.h> @@ -2702,7 +2702,7 @@ prgetlwpsinfo32(kthread_t *t, lwpsinfo32_t *psp) #define PR_COPY_TIMESPEC(s, d, field) \ TIMESPEC_TO_TIMESPEC32(&d->field, &s->field); -#define PR_COPY_BUF(s, d, field) \ +#define PR_COPY_BUF(s, d, field) \ bcopy(s->field, d->field, sizeof (d->field)); #define PR_IGNORE_FIELD(s, d, field) diff --git a/usr/src/uts/common/fs/proc/prvnops.c b/usr/src/uts/common/fs/proc/prvnops.c index 0492fc4e06..f03dc9a0b1 100644 --- a/usr/src/uts/common/fs/proc/prvnops.c +++ b/usr/src/uts/common/fs/proc/prvnops.c @@ -190,14 +190,14 @@ static prdirent_t lwpiddir[] = { ".." }, { PR_LWPCTL, 3 * sizeof (prdirent_t), sizeof (prdirent_t), "lwpctl" }, - { PR_LWPSTATUS, 4 * sizeof (prdirent_t), sizeof (prdirent_t), + { PR_LWPNAME, 4 * sizeof (prdirent_t), sizeof (prdirent_t), + "lwpname" }, + { PR_LWPSTATUS, 5 * sizeof (prdirent_t), sizeof (prdirent_t), "lwpstatus" }, - { PR_LWPSINFO, 5 * sizeof (prdirent_t), sizeof (prdirent_t), + { PR_LWPSINFO, 6 * sizeof (prdirent_t), sizeof (prdirent_t), "lwpsinfo" }, - { PR_LWPUSAGE, 6 * sizeof (prdirent_t), sizeof (prdirent_t), + { PR_LWPUSAGE, 7 * sizeof (prdirent_t), sizeof (prdirent_t), "lwpusage" }, - { PR_LWPNAME, 7 * sizeof (prdirent_t), sizeof (prdirent_t), - "lwpname" }, { PR_XREGS, 8 * sizeof (prdirent_t), sizeof (prdirent_t), "xregs" }, { PR_TMPLDIR, 9 * sizeof (prdirent_t), sizeof (prdirent_t), @@ -1121,7 +1121,7 @@ pr_read_auxv(prnode_t *pnp, uio_t *uiop) * we have two kinds of LDT structures to export -- one for compatibility * mode, and one for long mode, sigh. * - * For now lets just have a ldt of size 0 for 64-bit processes. + * For now let's just have a ldt of size 0 for 64-bit processes. */ static int pr_read_ldt(prnode_t *pnp, uio_t *uiop) @@ -2911,8 +2911,10 @@ pr_write_lwpname(prnode_t *pnp, uio_t *uiop) lwpname[THREAD_NAME_MAX - 1] = '\0'; - if ((error = prlock(pnp, ZNO)) != 0) + if ((error = prlock(pnp, ZNO)) != 0) { + kmem_free(lwpname, THREAD_NAME_MAX); return (error); + } t = pnp->pr_common->prc_thread; if (t->t_name == NULL) { |