Fix gif_output() so that GIF_UNLOCK() is performed only in case
we have locked the softc. PR: kern/98298 Submitted by: Eugene Grosbein
This commit is contained in:
parent
f420242b2b
commit
6e86062956
@ -412,6 +412,7 @@ gif_output(ifp, m, dst, rt)
|
|||||||
|
|
||||||
if (!(ifp->if_flags & IFF_UP) ||
|
if (!(ifp->if_flags & IFF_UP) ||
|
||||||
sc->gif_psrc == NULL || sc->gif_pdst == NULL) {
|
sc->gif_psrc == NULL || sc->gif_pdst == NULL) {
|
||||||
|
GIF_UNLOCK(sc);
|
||||||
m_freem(m);
|
m_freem(m);
|
||||||
error = ENETDOWN;
|
error = ENETDOWN;
|
||||||
goto end;
|
goto end;
|
||||||
@ -453,13 +454,12 @@ gif_output(ifp, m, dst, rt)
|
|||||||
default:
|
default:
|
||||||
m_freem(m);
|
m_freem(m);
|
||||||
error = ENETDOWN;
|
error = ENETDOWN;
|
||||||
goto end;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GIF_UNLOCK(sc);
|
||||||
end:
|
end:
|
||||||
if (error)
|
if (error)
|
||||||
ifp->if_oerrors++;
|
ifp->if_oerrors++;
|
||||||
GIF_UNLOCK(sc);
|
|
||||||
return (error);
|
return (error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user