Page MenuHomeFreeBSD

pf: use M_WAITOK where possible
ClosedPublic

Authored by kp on Wed, Jun 9, 5:00 PM.

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
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

kp requested review of this revision.Wed, Jun 9, 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.Wed, Jun 9, 7:21 PM
This revision was automatically updated to reflect the committed changes.