diff options
author | Pramod Batni <Pramod.Batni@Sun.COM> | 2010-07-07 02:21:35 -0700 |
---|---|---|
committer | Pramod Batni <Pramod.Batni@Sun.COM> | 2010-07-07 02:21:35 -0700 |
commit | d5493db7e14e61d7910d92d1316d079110a327ef (patch) | |
tree | ccd85aa4de818c96e5e2b130df96544a3c394071 /usr/src | |
parent | 665923daaf9b7b5ee8ba9b9f1937776cf0f499db (diff) | |
download | illumos-gate-d5493db7e14e61d7910d92d1316d079110a327ef.tar.gz |
6893273 panic in fss_newpri() when scheduling class was changed
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/uts/common/disp/fss.c | 11 | ||||
-rw-r--r-- | usr/src/uts/common/disp/fx.c | 11 | ||||
-rw-r--r-- | usr/src/uts/common/disp/ts.c | 11 |
3 files changed, 21 insertions, 12 deletions
diff --git a/usr/src/uts/common/disp/fss.c b/usr/src/uts/common/disp/fss.c index b051974669..62301d65d8 100644 --- a/usr/src/uts/common/disp/fss.c +++ b/usr/src/uts/common/disp/fss.c @@ -20,8 +20,7 @@ */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved. */ #include <sys/types.h> @@ -1615,13 +1614,12 @@ fss_forkret(kthread_t *t, kthread_t *ct) * process does not disappear before we set it running. */ mutex_enter(&cp->p_lock); - mutex_exit(&pidlock); continuelwps(cp); mutex_exit(&cp->p_lock); mutex_enter(&pp->p_lock); + mutex_exit(&pidlock); continuelwps(pp); - mutex_exit(&pp->p_lock); thread_lock(t); @@ -1645,6 +1643,11 @@ fss_forkret(kthread_t *t, kthread_t *ct) setfrontdq(t); thread_unlock(t); + /* + * Safe to drop p_lock now since it is safe to change + * the scheduling class after this point. + */ + mutex_exit(&pp->p_lock); swtch(); } diff --git a/usr/src/uts/common/disp/fx.c b/usr/src/uts/common/disp/fx.c index dd6295074c..7e3607526b 100644 --- a/usr/src/uts/common/disp/fx.c +++ b/usr/src/uts/common/disp/fx.c @@ -20,8 +20,7 @@ */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved. */ #include <sys/types.h> @@ -658,13 +657,12 @@ fx_forkret(kthread_t *t, kthread_t *ct) * the process does not disappear before we set it running. */ mutex_enter(&cp->p_lock); - mutex_exit(&pidlock); continuelwps(cp); mutex_exit(&cp->p_lock); mutex_enter(&pp->p_lock); + mutex_exit(&pidlock); continuelwps(pp); - mutex_exit(&pp->p_lock); thread_lock(t); fxpp = (fxproc_t *)(t->t_cldata); @@ -673,6 +671,11 @@ fx_forkret(kthread_t *t, kthread_t *ct) THREAD_TRANSITION(t); fx_setrun(t); thread_unlock(t); + /* + * Safe to drop p_lock now since it is safe to change + * the scheduling class after this point. + */ + mutex_exit(&pp->p_lock); swtch(); } diff --git a/usr/src/uts/common/disp/ts.c b/usr/src/uts/common/disp/ts.c index e8d1565276..05605be7f0 100644 --- a/usr/src/uts/common/disp/ts.c +++ b/usr/src/uts/common/disp/ts.c @@ -20,8 +20,7 @@ */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved. */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ @@ -739,13 +738,12 @@ ts_forkret(kthread_t *t, kthread_t *ct) * the process does not disappear before we set it running. */ mutex_enter(&cp->p_lock); - mutex_exit(&pidlock); continuelwps(cp); mutex_exit(&cp->p_lock); mutex_enter(&pp->p_lock); + mutex_exit(&pidlock); continuelwps(pp); - mutex_exit(&pp->p_lock); thread_lock(t); tspp = (tsproc_t *)(t->t_cldata); @@ -759,6 +757,11 @@ ts_forkret(kthread_t *t, kthread_t *ct) THREAD_TRANSITION(t); ts_setrun(t); thread_unlock(t); + /* + * Safe to drop p_lock now since since it is safe to change + * the scheduling class after this point. + */ + mutex_exit(&pp->p_lock); swtch(); } |