kernel: Add a few more missing crit_exit()s.
authorSascha Wildner <saw@online.de>
Fri, 13 Jun 2014 09:15:00 +0000 (11:15 +0200)
committerSascha Wildner <saw@online.de>
Fri, 13 Jun 2014 09:15:24 +0000 (11:15 +0200)
sys/netinet/ip_input.c
sys/netinet/sctp_output.c
sys/netproto/ipsec/xform_ah.c

index 8682e19..ae30b42 100644 (file)
@@ -924,6 +924,7 @@ ours:
                        /* XXX error stat??? */
                        error = EINVAL;
 DPRINTF(("ip_input: no SP, packet discarded\n"));/*XXX*/
+                       crit_exit();
                        goto bad;
                }
                crit_exit();
index d690300..177599d 100644 (file)
@@ -9544,8 +9544,10 @@ sctp_copy_it_in(struct sctp_inpcb *inp,
        /* lock the socket buf */
        SOCKBUF_LOCK(&so->so_snd);
        error = ssb_lock(&so->so_snd, SBLOCKWAIT(flags));
-       if (error)
+       if (error) {
+               crit_exit();
                goto out_locked;
+       }
 
        /* will it ever fit ? */
        if (sndlen > so->so_snd.ssb_hiwat) {
@@ -9582,6 +9584,7 @@ sctp_copy_it_in(struct sctp_inpcb *inp,
                        if (flags & (MSG_FNONBLOCKING|MSG_DONTWAIT)) {
                                /* Non-blocking io in place */
                                error = EWOULDBLOCK;
+                               crit_exit();
                                goto release;
                        }
                        inp->sctp_tcb_at_block = (void *)stcb;
@@ -9599,6 +9602,7 @@ sctp_copy_it_in(struct sctp_inpcb *inp,
                                /* Should I really unlock ? */
                                SCTP_INP_RUNLOCK(inp);
                                error = EFAULT;
+                               crit_exit();
                                goto out_locked;
                        }
                        SCTP_TCB_LOCK(stcb);
index f92e7ab..512211a 100644 (file)
@@ -770,8 +770,11 @@ ah_input_cb(struct cryptop *crp)
                if (sav->tdb_cryptoid != 0)
                        sav->tdb_cryptoid = crp->crp_sid;
 
-               if (crp->crp_etype == EAGAIN)
-                       return crypto_dispatch(crp);
+               if (crp->crp_etype == EAGAIN) {
+                       error = crypto_dispatch(crp);
+                       crit_exit();
+                       return(error);
+               }
 
                ahstat.ahs_noxform++;
                DPRINTF(("ah_input_cb: crypto error %d\n", crp->crp_etype));