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)
Mon, Feb 24, 12:29 PM
Unknown Object (File)
Tue, Feb 11, 3:24 PM
Unknown Object (File)
Wed, Feb 5, 4:17 PM
Unknown Object (File)
Wed, Feb 5, 7:39 AM
Unknown Object (File)
Jan 28 2025, 11:59 PM
Unknown Object (File)
Jan 27 2025, 2:31 PM
Unknown Object (File)
Jan 25 2025, 12:39 AM
Unknown Object (File)
Jan 24 2025, 2:06 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.