diff options
author | qingli <qingli@FreeBSD.org> | 2006-02-09 21:29:02 +0000 |
---|---|---|
committer | qingli <qingli@FreeBSD.org> | 2006-02-09 21:29:02 +0000 |
commit | 83f9969904378d0bb0045b398039161dee556e6f (patch) | |
tree | a0dfa0d88417091b26f191abf7273efa2c6b9e44 /sys/netinet/tcp_syncache.c | |
parent | c815be8735284197586f5ee78af1015fb14fe8fa (diff) | |
download | FreeBSD-src-83f9969904378d0bb0045b398039161dee556e6f.zip FreeBSD-src-83f9969904378d0bb0045b398039161dee556e6f.tar.gz |
Set the M_ZERO flag when calling uma_zalloc() to allocate a syncache entry.
Reviewed by: andre, glebius
MFC after: 3 days
Diffstat (limited to 'sys/netinet/tcp_syncache.c')
-rw-r--r-- | sys/netinet/tcp_syncache.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index 9e161d03..f156133 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -255,8 +255,7 @@ syncache_init(void) * older one. */ tcp_syncache.zone = uma_zcreate("syncache", sizeof(struct syncache), - NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, - UMA_ZONE_NOFREE | UMA_ZONE_ZINIT); + NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); uma_zone_set_max(tcp_syncache.zone, tcp_syncache.cache_limit); tcp_syncache.cache_limit -= 1; } @@ -883,7 +882,7 @@ syncache_add(inc, to, th, sop, m) return (1); } - sc = uma_zalloc(tcp_syncache.zone, M_NOWAIT); + sc = uma_zalloc(tcp_syncache.zone, M_NOWAIT | M_ZERO); if (sc == NULL) { /* * The zone allocator couldn't provide more entries. @@ -905,7 +904,7 @@ syncache_add(inc, to, th, sop, m) } sc->sc_tp->ts_recent = ticks; syncache_drop(sc, NULL); - sc = uma_zalloc(tcp_syncache.zone, M_NOWAIT); + sc = uma_zalloc(tcp_syncache.zone, M_NOWAIT | M_ZERO); if (sc == NULL) { if (ipopts) (void) m_free(ipopts); @@ -1379,7 +1378,7 @@ syncookie_lookup(inc, th, so) return (NULL); data = data >> SYNCOOKIE_WNDBITS; - sc = uma_zalloc(tcp_syncache.zone, M_NOWAIT); + sc = uma_zalloc(tcp_syncache.zone, M_NOWAIT | M_ZERO); if (sc == NULL) return (NULL); /* |