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@
This commit is contained in:
parent
40a06c5b29
commit
1c75b9d2cd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=346349
@ -3110,11 +3110,7 @@ pfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td
|
||||
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user