Date: Wed, 17 Feb 2010 15:39:31 +0000 (UTC) From: Luigi Rizzo <luigi@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r204006 - user/luigi/ipfw3-head/sys/netinet/ipfw Message-ID: <201002171539.o1HFdVqs083997@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: luigi Date: Wed Feb 17 15:39:31 2010 New Revision: 204006 URL: http://svn.freebsd.org/changeset/base/204006 Log: use M_NOWAIT when allocating memory with a lock held Submitted by: Riccardo Panicucci Modified: user/luigi/ipfw3-head/sys/netinet/ipfw/ip_fw_sockopt.c Modified: user/luigi/ipfw3-head/sys/netinet/ipfw/ip_fw_sockopt.c ============================================================================== --- user/luigi/ipfw3-head/sys/netinet/ipfw/ip_fw_sockopt.c Wed Feb 17 15:37:04 2010 (r204005) +++ user/luigi/ipfw3-head/sys/netinet/ipfw/ip_fw_sockopt.c Wed Feb 17 15:39:31 2010 (r204006) @@ -115,7 +115,8 @@ get_map(struct ip_fw_chain *chain, int e int i; i = chain->n_rules + extra; - map = malloc(i * sizeof(struct ip_fw *), M_IPFW, M_WAITOK); + map = malloc(i * sizeof(struct ip_fw *), M_IPFW, + locked ? M_NOWAIT : M_WAITOK); if (map == NULL) { printf("%s: cannot allocate map\n", __FUNCTION__); return NULL;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201002171539.o1HFdVqs083997>