diff options
author | Patrick Mooney <pmooney@pfmooney.com> | 2018-07-27 12:18:00 +0000 |
---|---|---|
committer | Patrick Mooney <pmooney@pfmooney.com> | 2018-07-30 14:52:23 +0000 |
commit | 84b3dff9b0680a7c2e5ce7f1066fedc9ef036560 (patch) | |
tree | 73e7b681549edfa352f7a57c8a6012ab0210302a /usr/src | |
parent | 1d0338f3f33eec2ed45ec5a6cae30c399a3ef769 (diff) | |
download | illumos-joyent-84b3dff9b0680a7c2e5ce7f1066fedc9ef036560.tar.gz |
OS-7096 installctx needs kpreempt_disable protection
Reviewed by: John Levon <john.levon@joyent.com>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/uts/common/disp/thread.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/usr/src/uts/common/disp/thread.c b/usr/src/uts/common/disp/thread.c index 2cd11a0bce..af000bf4f1 100644 --- a/usr/src/uts/common/disp/thread.c +++ b/usr/src/uts/common/disp/thread.c @@ -1068,7 +1068,12 @@ installctx( * form a loop of the ctxops in newest-to-oldest order. The 'prev' * pointers form a loop in the reverse direction, where t_ctx->prev is * the oldest entry associated with the thread. + * + * The protection of kpreempt_disable is required to safely perform the + * list insertion, since there are inconsistent states between some of + * the pointer assignments. */ + kpreempt_disable(); if (t->t_ctx == NULL) { ctx->next = ctx; ctx->prev = ctx; @@ -1081,6 +1086,7 @@ installctx( tail->next = ctx; } t->t_ctx = ctx; + kpreempt_enable(); } /* |