summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/os
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2019-01-28 12:21:37 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2019-01-28 12:21:37 +0000
commit5e68991d1f557ace62cb01ef7bcc9d481c3e387e (patch)
tree9ef57d333192ac3fb65e2706bb83a156c6a8a7b8 /usr/src/uts/common/os
parent5d687f5a37b08ffb3af39f1fc475eba83078c761 (diff)
parent31b6814e52e5d603c18d8d2143eb2a8a660249c8 (diff)
downloadillumos-joyent-5e68991d1f557ace62cb01ef7bcc9d481c3e387e.tar.gz
[illumos-gate merge]
commit 31b6814e52e5d603c18d8d2143eb2a8a660249c8 10134 mv needs smatch fixes commit 15fce0f9f2cee745ed42c791e89598e7a98173e0 10092 sysevent_evc_control() dereferences pointer before checking for NULL commit 3ef9594a05a9067b6ca7b4ccac5e926e8b47bac4 10265 uts: gfx_vgatext use block cursor for vgatext commit 0ff6ce5f6c4d72f12ff85f6a2a1460cbbd999c97 10238 loader: Simplify code using new n2s,s2n and getenvn words commit b18a8f641b21ebb3d94dc00253c79fe5f777cefb 10199 loader: vbe should use bio_alloc for edid info commit 9e362ff653a258810887a7dd0f8edc820c89967f 10122 beadm buffer over-run commit 41b6e724de1043eab7300fb94485e9deb31e27b5 10191 strsubs: cast between incompatible function types commit a62da1123960b933e937122d1665cd6355545eab 7509 ::dtrace can yield no output
Diffstat (limited to 'usr/src/uts/common/os')
-rw-r--r--usr/src/uts/common/os/evchannels.c8
-rw-r--r--usr/src/uts/common/os/strsubr.c17
2 files changed, 20 insertions, 5 deletions
diff --git a/usr/src/uts/common/os/evchannels.c b/usr/src/uts/common/os/evchannels.c
index 092dd42f2e..f2ca732594 100644
--- a/usr/src/uts/common/os/evchannels.c
+++ b/usr/src/uts/common/os/evchannels.c
@@ -23,6 +23,10 @@
*/
/*
+ * Copyright (c) 2018, Joyent, Inc.
+ */
+
+/*
* This file contains the source of the general purpose event channel extension
* to the sysevent framework. This implementation is made up mainly of four
* layers of functionality: the event queues (evch_evq_*()), the handling of
@@ -1976,7 +1980,7 @@ int
sysevent_evc_control(evchan_t *scp, int cmd, ...)
{
va_list ap;
- evch_chan_t *chp = ((evch_bind_t *)scp)->bd_channel;
+ evch_chan_t *chp;
uint32_t *chlenp;
uint32_t chlen;
uint32_t ochlen;
@@ -1986,6 +1990,8 @@ sysevent_evc_control(evchan_t *scp, int cmd, ...)
return (EINVAL);
}
+ chp = ((evch_bind_t *)scp)->bd_channel;
+
va_start(ap, cmd);
mutex_enter(&chp->ch_mutex);
switch (cmd) {
diff --git a/usr/src/uts/common/os/strsubr.c b/usr/src/uts/common/os/strsubr.c
index 959e5576f0..21de784e1b 100644
--- a/usr/src/uts/common/os/strsubr.c
+++ b/usr/src/uts/common/os/strsubr.c
@@ -362,7 +362,8 @@ static void esballoc_mblk_free(mblk_t *);
* for passthru read and write queues
*/
-static void pass_wput(queue_t *, mblk_t *);
+static int pass_rput(queue_t *, mblk_t *);
+static int pass_wput(queue_t *, mblk_t *);
static queue_t *link_addpassthru(stdata_t *);
static void link_rempassthru(queue_t *);
@@ -376,7 +377,7 @@ struct module_info passthru_info = {
};
struct qinit passthru_rinit = {
- (int (*)())putnext,
+ pass_rput,
NULL,
NULL,
NULL,
@@ -386,7 +387,7 @@ struct qinit passthru_rinit = {
};
struct qinit passthru_winit = {
- (int (*)()) pass_wput,
+ pass_wput,
NULL,
NULL,
NULL,
@@ -7815,12 +7816,19 @@ strsetuio(stdata_t *stp)
stp->sd_struiordq = wrq ? _RD(wrq) : 0;
}
+static int
+pass_rput(queue_t *q, mblk_t *mp)
+{
+ putnext(q, mp);
+ return (0);
+}
+
/*
* pass_wput, unblocks the passthru queues, so that
* messages can arrive at muxs lower read queue, before
* I_LINK/I_UNLINK is acked/nacked.
*/
-static void
+static int
pass_wput(queue_t *q, mblk_t *mp)
{
syncq_t *sq;
@@ -7829,6 +7837,7 @@ pass_wput(queue_t *q, mblk_t *mp)
if (sq->sq_flags & SQ_BLOCKED)
unblocksq(sq, SQ_BLOCKED, 0);
putnext(q, mp);
+ return (0);
}
/*