diff options
author | glebius <glebius@FreeBSD.org> | 2006-06-02 14:10:52 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2006-06-02 14:10:52 +0000 |
commit | af1a25ba5db8fd9673694a6dd9f8bea6a54b676b (patch) | |
tree | 6823a2beec666571495a62c087061e52983d0cac /sys/net/if_gif.c | |
parent | f2806f2f0aa36877ecb9f8d0feabe6e28663c436 (diff) | |
download | FreeBSD-src-af1a25ba5db8fd9673694a6dd9f8bea6a54b676b.zip FreeBSD-src-af1a25ba5db8fd9673694a6dd9f8bea6a54b676b.tar.gz |
Fix gif_output() so that GIF_UNLOCK() is performed only in case
we have locked the softc.
PR: kern/98298
Submitted by: Eugene Grosbein
Diffstat (limited to 'sys/net/if_gif.c')
-rw-r--r-- | sys/net/if_gif.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/if_gif.c b/sys/net/if_gif.c index c67f62d..9301e17 100644 --- a/sys/net/if_gif.c +++ b/sys/net/if_gif.c @@ -412,6 +412,7 @@ gif_output(ifp, m, dst, rt) if (!(ifp->if_flags & IFF_UP) || sc->gif_psrc == NULL || sc->gif_pdst == NULL) { + GIF_UNLOCK(sc); m_freem(m); error = ENETDOWN; goto end; @@ -453,13 +454,12 @@ gif_output(ifp, m, dst, rt) default: m_freem(m); error = ENETDOWN; - goto end; } + GIF_UNLOCK(sc); end: if (error) ifp->if_oerrors++; - GIF_UNLOCK(sc); return (error); } |