]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Avoid possible lock leaking.
authorAndrey V. Elsukov <ae@FreeBSD.org>
Mon, 29 Jul 2019 12:55:48 +0000 (12:55 +0000)
committerAndrey V. Elsukov <ae@FreeBSD.org>
Mon, 29 Jul 2019 12:55:48 +0000 (12:55 +0000)
commitd4e6a529595dc4ace5be06a3fe9db4e05ebfd4eb
tree86468b802f49223dd5779cd68f55294a5c8375cc
parent0ce33c042eadaeaea077554adf2c50b7ff94788e
Avoid possible lock leaking.

After r343619 ipfw uses own locking for packets flow. PULLUP_LEN() macro
is used in ipfw_chk() to make m_pullup(). When m_pullup() fails, it just
returns via `goto pullup_failed`. There are two places where PULLUP_LEN()
is called with IPFW_PF_RLOCK() held.

Add PULLUP_LEN_LOCKED() macro to use in these places to be able release
the lock, when m_pullup() fails.

Sponsored by: Yandex LLC
sys/netpfil/ipfw/ip_fw2.c