From: Sascha Wildner Date: Wed, 7 Mar 2012 18:19:33 +0000 (+0100) Subject: kernel: Add a few forgotten crit_exit()s and fix a wrong crit_enter(). X-Git-Tag: v3.0.2~13 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/f24cc5bb1e32c82cdf067a14ffa90b686e3c29ab kernel: Add a few forgotten crit_exit()s and fix a wrong crit_enter(). --- diff --git a/sys/dev/misc/dcons/dcons_os.c b/sys/dev/misc/dcons/dcons_os.c index 261a39f7b2..8fcd3afffb 100644 --- a/sys/dev/misc/dcons/dcons_os.c +++ b/sys/dev/misc/dcons/dcons_os.c @@ -367,6 +367,7 @@ dcons_tty_start(struct tty *tp) crit_enter(); if (tp->t_state & (TS_TIMEOUT | TS_TTSTOP)) { ttwwakeup(tp); + crit_exit(); lwkt_reltoken(&tty_token); return; } diff --git a/sys/dev/netif/sr/if_sr.c b/sys/dev/netif/sr/if_sr.c index 1999147fd9..5d8f0dda69 100644 --- a/sys/dev/netif/sr/if_sr.c +++ b/sys/dev/netif/sr/if_sr.c @@ -2587,7 +2587,7 @@ ngsr_watchdog_frame(void * arg) crit_enter(); if (sc->running == 0) { - crit_enter(); + crit_exit(); return; /* if we are not running let timeouts die */ } /* diff --git a/sys/dev/serial/rp/rp.c b/sys/dev/serial/rp/rp.c index 355c80d4bf..711697655a 100644 --- a/sys/dev/serial/rp/rp.c +++ b/sys/dev/serial/rp/rp.c @@ -1519,6 +1519,7 @@ rpparam(struct tty *tp, struct termios *t) ospeed = ttspeedtab(t->c_ispeed, baud_table); if(ospeed < 0 || t->c_ispeed != t->c_ospeed) { + crit_exit(); lwkt_reltoken(&tty_token); return(EINVAL); } @@ -1532,6 +1533,7 @@ rpparam(struct tty *tp, struct termios *t) if(t->c_ospeed == 0) { sClrDTR(cp); + crit_exit(); lwkt_reltoken(&tty_token); return(0); } diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c index 8f3a93f42e..00f6d52536 100644 --- a/sys/netinet/sctputil.c +++ b/sys/netinet/sctputil.c @@ -936,6 +936,7 @@ sctp_timeout_handler(void *t) sctp_pegs[SCTP_TIMERS_EXP]++; if (inp == NULL) { + crit_exit(); return; } diff --git a/sys/netproto/atm/uni/uniarp_vcm.c b/sys/netproto/atm/uni/uniarp_vcm.c index 0f919e4d21..f22da5827c 100644 --- a/sys/netproto/atm/uni/uniarp_vcm.c +++ b/sys/netproto/atm/uni/uniarp_vcm.c @@ -24,7 +24,6 @@ * notice must be reproduced on all copies. * * @(#) $FreeBSD: src/sys/netatm/uni/uniarp_vcm.c,v 1.5 2000/01/17 20:49:55 mks Exp $ - * @(#) $DragonFly: src/sys/netproto/atm/uni/uniarp_vcm.c,v 1.6 2006/01/14 13:36:39 swildner Exp $ */ /* @@ -487,6 +486,7 @@ uniarp_svcactive(struct ipvcc *ivp) atm_cm_release(ivp->iv_arpconn, &uniarp_cause); ivp->iv_arpconn = NULL; } + crit_exit(); return (err); }