Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2/linux Zero-initialize idr cache.



details:   https://anonhg.NetBSD.org/src/rev/6592ddcb4f77
branches:  trunk
changeset: 366256:6592ddcb4f77
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 14:15:45 2018 +0000

description:
Zero-initialize idr cache.

diffstat:

 sys/external/bsd/drm2/linux/linux_idr.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 7728db80f3cb -r 6592ddcb4f77 sys/external/bsd/drm2/linux/linux_idr.c
--- a/sys/external/bsd/drm2/linux/linux_idr.c   Mon Aug 27 14:15:35 2018 +0000
+++ b/sys/external/bsd/drm2/linux/linux_idr.c   Mon Aug 27 14:15:45 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_idr.c,v 1.8 2018/08/27 14:14:42 riastradh Exp $  */
+/*     $NetBSD: linux_idr.c,v 1.9 2018/08/27 14:15:45 riastradh Exp $  */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_idr.c,v 1.8 2018/08/27 14:14:42 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_idr.c,v 1.9 2018/08/27 14:15:45 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -265,7 +265,7 @@
                /* lwp_setspecific must be sleepable.  */
                if (!ISSET(gfp, __GFP_WAIT))
                        return;
-               cache = kmem_alloc(sizeof(*cache), kmflag);
+               cache = kmem_zalloc(sizeof(*cache), kmflag);
                if (cache == NULL)
                        return;
                lwp_setspecific(idr_cache_key, cache);



Home | Main Index | Thread Index | Old Index