diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2008-06-14 02:22:14 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2008-06-14 02:22:14 +0000 |
commit | bb2c2a417d86aa1eeade1222d6db1a3a8a54f340 (patch) | |
tree | 58dd015d014d912f313ca7f48c27ec602c79e2bf /sys/net/pf_osfp.c | |
parent | 3ef0de937273e699c3ea303f18ffeee1468a4ec2 (diff) |
pool_get()s not in interrupt context should not be PR_NOWAIT, but
PR_WAITOK | PR_LIMITFAIL. from discussion with art. ok ryan claudio thib
Diffstat (limited to 'sys/net/pf_osfp.c')
-rw-r--r-- | sys/net/pf_osfp.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/net/pf_osfp.c b/sys/net/pf_osfp.c index 57344e155fc..75f33032e1a 100644 --- a/sys/net/pf_osfp.c +++ b/sys/net/pf_osfp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_osfp.c,v 1.14 2008/06/12 18:17:01 henning Exp $ */ +/* $OpenBSD: pf_osfp.c,v 1.15 2008/06/14 02:22:13 henning Exp $ */ /* * Copyright (c) 2003 Mike Frantzen <frantzen@w4g.org> @@ -366,10 +366,12 @@ pf_osfp_add(struct pf_osfp_ioctl *fpioc) if (PF_OSFP_ENTRY_EQ(entry, &fpioc->fp_os)) return (EEXIST); } - if ((entry = pool_get(&pf_osfp_entry_pl, PR_NOWAIT)) == NULL) + if ((entry = pool_get(&pf_osfp_entry_pl, + PR_WAITOK|PR_LIMITFAIL)) == NULL) return (ENOMEM); } else { - if ((fp = pool_get(&pf_osfp_pl, PR_NOWAIT)) == NULL) + if ((fp = pool_get(&pf_osfp_pl, + PR_WAITOK|PR_LIMITFAIL)) == NULL) return (ENOMEM); memset(fp, 0, sizeof(*fp)); fp->fp_tcpopts = fpioc->fp_tcpopts; @@ -381,7 +383,8 @@ pf_osfp_add(struct pf_osfp_ioctl *fpioc) fp->fp_wscale = fpioc->fp_wscale; fp->fp_ttl = fpioc->fp_ttl; SLIST_INIT(&fp->fp_oses); - if ((entry = pool_get(&pf_osfp_entry_pl, PR_NOWAIT)) == NULL) { + if ((entry = pool_get(&pf_osfp_entry_pl, + PR_WAITOK|PR_LIMITFAIL)) == NULL) { pool_put(&pf_osfp_pl, fp); return (ENOMEM); } |