Print this page
9249 System crash dump to NVME not working
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Reviewed by: Rick McNeal <rick.mcneal@nexenta.com>
Reviewed by: Ryan Zezeski <rpz@joyent.com>

*** 22,32 **** /* * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ ! #pragma ident "%Z%%M% %I% %E% SMI" /* * This file contains the semaphore operations. */ --- 22,34 ---- /* * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ ! /* ! * Copyright 2018 Nexenta Systems, Inc. All rights reserved. ! */ /* * This file contains the semaphore operations. */
*** 225,243 **** sema_p(ksema_t *sp) { sema_impl_t *s; disp_lock_t *sqlp; s = (sema_impl_t *)sp; sqlp = &SQHASH(s)->sq_lock; disp_lock_enter(sqlp); ASSERT(s->s_count >= 0); while (s->s_count == 0) { - if (panicstr) { - disp_lock_exit(sqlp); - return; - } thread_lock_high(curthread); SEMA_BLOCK(s, sqlp); thread_unlock_nopreempt(curthread); swtch(); disp_lock_enter(sqlp); --- 227,245 ---- sema_p(ksema_t *sp) { sema_impl_t *s; disp_lock_t *sqlp; + /* no-op during panic */ + if (panicstr) + return; + s = (sema_impl_t *)sp; sqlp = &SQHASH(s)->sq_lock; disp_lock_enter(sqlp); ASSERT(s->s_count >= 0); while (s->s_count == 0) { thread_lock_high(curthread); SEMA_BLOCK(s, sqlp); thread_unlock_nopreempt(curthread); swtch(); disp_lock_enter(sqlp);
*** 331,347 **** { sema_impl_t *s; kthread_t *sq, *tp; disp_lock_t *sqlp; s = (sema_impl_t *)sp; sqlp = &SQHASH(s)->sq_lock; disp_lock_enter(sqlp); - if (panicstr) { - disp_lock_exit(sqlp); - return; - } s->s_count++; sq = s->s_slpq; if (sq != NULL) { tp = sq; ASSERT(THREAD_LOCK_HELD(tp)); --- 333,349 ---- { sema_impl_t *s; kthread_t *sq, *tp; disp_lock_t *sqlp; + /* no-op during panic */ + if (panicstr) + return; + s = (sema_impl_t *)sp; sqlp = &SQHASH(s)->sq_lock; disp_lock_enter(sqlp); s->s_count++; sq = s->s_slpq; if (sq != NULL) { tp = sq; ASSERT(THREAD_LOCK_HELD(tp));
*** 371,380 **** --- 373,386 ---- sema_impl_t *s; sleepq_head_t *sqh; int gotit = 0; + /* no-op during panic */ + if (panicstr) + return (1); + s = (sema_impl_t *)sp; sqh = SQHASH(s); disp_lock_enter(&sqh->sq_lock); if (s->s_count > 0) { s->s_count--;
*** 387,398 **** int sema_held(ksema_t *sp) { sema_impl_t *s; ! ! s = (sema_impl_t *)sp; if (panicstr) return (1); ! else return (s->s_count <= 0); } --- 393,404 ---- int sema_held(ksema_t *sp) { sema_impl_t *s; ! /* no-op during panic */ if (panicstr) return (1); ! ! s = (sema_impl_t *)sp; return (s->s_count <= 0); }