Date: Fri, 9 Oct 2009 23:38:09 +0000 (UTC) From: Ermal Luçi <eri@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r197916 - user/eri/pf45/head/sys/contrib/pf/net Message-ID: <200910092338.n99Nc9pA066455@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: eri Date: Fri Oct 9 23:38:08 2009 New Revision: 197916 URL: http://svn.freebsd.org/changeset/base/197916 Log: * Add to initialization/destroy some new pools used in pf(4) * Fix a panic related to trying to allocate memory with M_WAITOK whith the lock held in pf(4) osfp code. Modified: user/eri/pf45/head/sys/contrib/pf/net/pf_ioctl.c user/eri/pf45/head/sys/contrib/pf/net/pf_osfp.c Modified: user/eri/pf45/head/sys/contrib/pf/net/pf_ioctl.c ============================================================================== --- user/eri/pf45/head/sys/contrib/pf/net/pf_ioctl.c Fri Oct 9 23:04:15 2009 (r197915) +++ user/eri/pf45/head/sys/contrib/pf/net/pf_ioctl.c Fri Oct 9 23:38:08 2009 (r197916) @@ -272,7 +272,8 @@ static struct cdevsw pf_cdevsw = { init_zone_var(void) { pf_src_tree_pl = pf_rule_pl = NULL; - pf_state_pl = pf_altq_pl = pf_pooladdr_pl = NULL; + pf_state_pl = pf_state_key_pl = pf_state_item_pl = NULL; + pf_altq_pl = pf_pooladdr_pl = NULL; pf_frent_pl = pf_frag_pl = pf_cache_pl = pf_cent_pl = NULL; pf_state_scrub_pl = NULL; pfr_ktable_pl = pfr_kentry_pl = NULL; @@ -284,6 +285,8 @@ static struct cdevsw pf_cdevsw = { UMA_DESTROY(pf_src_tree_pl); UMA_DESTROY(pf_rule_pl); UMA_DESTROY(pf_state_pl); + UMA_DESTROY(pf_state_key_pl); + UMA_DESTROY(pf_state_item_pl); UMA_DESTROY(pf_altq_pl); UMA_DESTROY(pf_pooladdr_pl); UMA_DESTROY(pf_frent_pl); @@ -306,6 +309,8 @@ int UMA_CREATE(pf_src_tree_pl,struct pf_src_node, "pfsrctrpl"); UMA_CREATE(pf_rule_pl, struct pf_rule, "pfrulepl"); UMA_CREATE(pf_state_pl, struct pf_state, "pfstatepl"); + UMA_CREATE(pf_state_key_pl, struct pf_state, "pfstatekeypl"); + UMA_CREATE(pf_state_item_pl, struct pf_state, "pfstateitempl"); UMA_CREATE(pf_altq_pl, struct pf_altq, "pfaltqpl"); UMA_CREATE(pf_pooladdr_pl, struct pf_pooladdr, "pfpooladdrpl"); UMA_CREATE(pfr_ktable_pl, struct pfr_ktable, "pfrktable"); Modified: user/eri/pf45/head/sys/contrib/pf/net/pf_osfp.c ============================================================================== --- user/eri/pf45/head/sys/contrib/pf/net/pf_osfp.c Fri Oct 9 23:04:15 2009 (r197915) +++ user/eri/pf45/head/sys/contrib/pf/net/pf_osfp.c Fri Oct 9 23:38:08 2009 (r197916) @@ -410,7 +410,7 @@ pf_osfp_add(struct pf_osfp_ioctl *fpioc) } if ((entry = pool_get(&pf_osfp_entry_pl, #ifdef __FreeBSD__ - PR_WAITOK)) == NULL) + PR_NOWAIT)) == NULL) #else PR_WAITOK|PR_LIMITFAIL)) == NULL) #endif @@ -418,7 +418,7 @@ pf_osfp_add(struct pf_osfp_ioctl *fpioc) } else { if ((fp = pool_get(&pf_osfp_pl, #ifdef __FreeBSD__ - PR_WAITOK)) == NULL) + PR_NOWAIT)) == NULL) #else PR_WAITOK|PR_LIMITFAIL)) == NULL) #endif @@ -435,7 +435,7 @@ pf_osfp_add(struct pf_osfp_ioctl *fpioc) SLIST_INIT(&fp->fp_oses); if ((entry = pool_get(&pf_osfp_entry_pl, #ifdef __FreeBSD__ - PR_WAITOK)) == NULL) { + PR_NOWAIT)) == NULL) { #else PR_WAITOK|PR_LIMITFAIL)) == NULL) { #endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910092338.n99Nc9pA066455>