]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r350413:
authorAndrey V. Elsukov <ae@FreeBSD.org>
Tue, 17 Dec 2019 09:46:00 +0000 (09:46 +0000)
committerAndrey V. Elsukov <ae@FreeBSD.org>
Tue, 17 Dec 2019 09:46:00 +0000 (09:46 +0000)
commit7641aaaa395f1a072b06b600daf16daa8636565f
treeaf7ddac8d7732ff6bd121cebfb915960e911545a
parent82db17e139f53fc1f52678fa33c5a9077f7095ae
MFC r350413:
  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

  NOTE: since r343619 was not merged, this commit is mostly NOP, but
  it is needed to reduce code difference between stable and head/.
sys/netpfil/ipfw/ip_fw2.c