diff options
| author | Dan McDonald <danmcd@mnx.io> | 2022-10-06 16:30:23 -0400 |
|---|---|---|
| committer | Dan McDonald <danmcd@mnx.io> | 2022-10-06 16:30:23 -0400 |
| commit | 1facf1a43ecaaa0225b7c9d134732d342b607d8d (patch) | |
| tree | 626b6d6248eed9f098ebff96fc86b76c43356093 /usr/src/common | |
| parent | 714b0bb56eb9690c26e204fd05fadb02bf82e0b7 (diff) | |
| parent | dd03b475cb030673a110ddade24162f09801d116 (diff) | |
| download | illumos-joyent-1facf1a43ecaaa0225b7c9d134732d342b607d8d.tar.gz | |
[illumos-gate merge]
commit dd03b475cb030673a110ddade24162f09801d116
14991 Large AMD microcode does not load at boot
14994 Panic on microcode update with UFS boot archive
14995 misleading messages on microcode update failure
14996 Restructure ucode data Makefiles
15003 Corrupt AMD microcode equivalence-table not properly handled
Diffstat (limited to 'usr/src/common')
| -rw-r--r-- | usr/src/common/fs/ufsops.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/usr/src/common/fs/ufsops.c b/usr/src/common/fs/ufsops.c index 2b6d1c5a05..00110a200d 100644 --- a/usr/src/common/fs/ufsops.c +++ b/usr/src/common/fs/ufsops.c @@ -23,6 +23,7 @@ * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. * Copyright (c) 2016 by Delphix. All rights reserved. + * Copyright 2022 Oxide Computer Company */ #include <sys/types.h> @@ -34,6 +35,7 @@ #include <sys/sysmacros.h> #include <sys/bootvfs.h> #include <sys/filep.h> +#include <sys/kmem.h> #ifdef _BOOT #include "../common/util.h" @@ -761,6 +763,17 @@ bufs_close(int fd) cf_close(filep); bkmem_free((char *)filep, sizeof (fileid_t)); + /* + * Some files are opened and closed in early boot, for example + * when doing a microcode update on the boot CPU. In that case + * the inode cache will contain memory allocated from boot + * pages, which will be invalid once kmem is initialised. + * Until kmem is ready, clear the inode cache when closing a + * file. + */ + if (kmem_ready == 0) + free_cache(); + return (0); } else { /* Big problem */ |
