aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristof Provost <kp@FreeBSD.org>2019-04-18 11:37:44 +0000
committerKristof Provost <kp@FreeBSD.org>2019-04-18 11:37:44 +0000
commit1c75b9d2cddfc95b0f03c4db0ef93e3be4705c68 (patch)
tree7556ec17779725d4d5f801523d927e2a9e3c670f
parent40a06c5b290a179b9b110392266d71717691f602 (diff)
downloadsrc-1c75b9d2cddfc95b0f03c4db0ef93e3be4705c68.tar.gz
src-1c75b9d2cddfc95b0f03c4db0ef93e3be4705c68.zip
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. MFC after: 1 week Event: Aberdeen hackathon 2019 Pointed out by: glebius@
Notes
Notes: svn path=/head/; revision=346349
-rw-r--r--sys/netpfil/pf/pf_ioctl.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c
index 42dcb4106e02..1395d9d69f17 100644
--- a/sys/netpfil/pf/pf_ioctl.c
+++ b/sys/netpfil/pf/pf_ioctl.c
@@ -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);