When notifying protocol components of an event on an in6pcb, use the

result of the notify() function to decide if we need to unlock the
in6pcb or not, rather than always unlocking.  Otherwise, we may unlock
and already unlocked in6pcb.

Reported by:	kuriyama, Gordon Bergling <gbergling at 0xfce3.net>
Tested by:	kuriyama, Gordon Bergling <gbergling at 0xfce3.net>
Discussed with:	mdodd
This commit is contained in:
Robert Watson 2004-08-21 17:38:48 +00:00
parent e6ccd70936
commit 5a0192650e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=134121

View File

@ -705,9 +705,11 @@ in6_pcbnotify(pcbinfo, dst, fport_arg, src, lport_arg, cmd, cmdarg, notify)
}
do_notify:
if (notify)
(*notify)(inp, errno);
INP_UNLOCK(inp);
if (notify) {
if ((*notify)(inp, errno))
INP_UNLOCK(inp);
} else
INP_UNLOCK(inp);
}
INP_INFO_WUNLOCK(pcbinfo);
splx(s);