Page MenuHomeFreeBSD

pf: use M_WAITOK where possible
ClosedPublic

Authored by kp on Jun 9 2021, 5:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jan 25, 12:39 AM
Unknown Object (File)
Fri, Jan 24, 2:06 AM
Unknown Object (File)
Wed, Jan 22, 5:23 PM
Unknown Object (File)
Tue, Dec 31, 12:18 AM
Unknown Object (File)
Dec 15 2024, 1:43 AM
Unknown Object (File)
Dec 14 2024, 10:06 PM
Unknown Object (File)
Dec 14 2024, 8:50 AM
Unknown Object (File)
Dec 12 2024, 9:34 AM

Details

Summary

In the ioctl path use M_WAITOK allocations whereever possible. These are
less sensitive to memory pressure, and ioctl requests have no hard
deadlines.

MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kp requested review of this revision.Jun 9 2021, 5:00 PM
sys/netpfil/pf/pf_ioctl.c
3774–3775

These NULL checks are dead code now with M_WAITOK.

Assume you meant to include only the sys/netpfil/pf/pf_ioctl.c changes?

Assume you meant to include only the sys/netpfil/pf/pf_ioctl.c changes?

Gha, yes. I had a few local, uncommitted, changes, and apparently git-arc picked those up as well. And then helpfully removed them from my tree.

  • Remove unrelated changes
  • Don't check for NULL after M_WAITOK
donner added a subscriber: donner.

As far as I can check, all those changes are outside of the hold lock, so this is fine.

This revision is now accepted and ready to land.Jun 9 2021, 7:21 PM
This revision was automatically updated to reflect the committed changes.