svn commit: r346741 - stable/12/sys/netpfil/pf
Kristof Provost
kp at FreeBSD.org
Fri Apr 26 13:00:23 UTC 2019
Author: kp
Date: Fri Apr 26 13:00:22 2019
New Revision: 346741
URL: https://svnweb.freebsd.org/changeset/base/346741
Log:
MFC r346349:
pf: No need to M_NOWAIT in DIOCRSETTFLAGS
Now that we don't hold a lock during DIOCRSETTFLAGS memory allocation we can
use M_WAITOK.
Pointed out by: glebius@
Modified:
stable/12/sys/netpfil/pf/pf_ioctl.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sys/netpfil/pf/pf_ioctl.c
==============================================================================
--- stable/12/sys/netpfil/pf/pf_ioctl.c Fri Apr 26 12:59:23 2019 (r346740)
+++ stable/12/sys/netpfil/pf/pf_ioctl.c Fri Apr 26 13:00:22 2019 (r346741)
@@ -3110,11 +3110,7 @@ DIOCCHANGEADDR_error:
totlen = io->pfrio_size * sizeof(struct pfr_table);
pfrts = mallocarray(io->pfrio_size, sizeof(struct pfr_table),
- M_TEMP, M_NOWAIT);
- if (pfrts == NULL) {
- error = ENOMEM;
- break;
- }
+ M_TEMP, M_WAITOK);
error = copyin(io->pfrio_buffer, pfrts, totlen);
if (error) {
free(pfrts, M_TEMP);
More information about the svn-src-stable-12
mailing list