Source-Changes-HG archive

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

[src/trunk]: src/sys/kern pool(9): Fix default PR_NOALIGN for large pool caches.



details:   https://anonhg.NetBSD.org/src/rev/59912a58dcf3
branches:  trunk
changeset: 1029152:59912a58dcf3
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Fri Dec 24 00:13:53 2021 +0000

description:
pool(9): Fix default PR_NOALIGN for large pool caches.

Was broken in recent change to separate some pool cache flags from
pool flags.

Fixes crash in zfs.

diffstat:

 sys/kern/subr_pool.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (35 lines):

diff -r 72e2887c051c -r 59912a58dcf3 sys/kern/subr_pool.c
--- a/sys/kern/subr_pool.c      Thu Dec 23 20:08:07 2021 +0000
+++ b/sys/kern/subr_pool.c      Fri Dec 24 00:13:53 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: subr_pool.c,v 1.279 2021/12/22 16:57:28 thorpej Exp $  */
+/*     $NetBSD: subr_pool.c,v 1.280 2021/12/24 00:13:53 riastradh Exp $        */
 
 /*
  * Copyright (c) 1997, 1999, 2000, 2002, 2007, 2008, 2010, 2014, 2015, 2018,
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.279 2021/12/22 16:57:28 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.280 2021/12/24 00:13:53 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -2110,7 +2110,7 @@
        pool_cache_t pc1;
        struct cpu_info *ci;
        struct pool *pp;
-       unsigned int ppflags = flags;
+       unsigned int ppflags;
 
        pp = &pc->pc_pool;
        if (palloc == NULL && ipl == IPL_NONE) {
@@ -2123,6 +2123,7 @@
                        palloc = &pool_allocator_nointr;
        }
 
+       ppflags = flags;
        if (ctor == NULL) {
                ctor = NO_CTOR;
        }



Home | Main Index | Thread Index | Old Index