diff options
author | Toomas Soome <tsoome@FreeBSD.org> | 2021-01-24 18:59:36 +0000 |
---|---|---|
committer | Toomas Soome <tsoome@FreeBSD.org> | 2021-01-26 23:07:03 +0000 |
commit | 93ebd6307efeb95a29bc614edd0c67c2af850e98 (patch) | |
tree | 36b703f4b089e0af00e0a1ea3fbabbd40c0dfd3d | |
parent | 7a731da592fae9a75278b2d4139d03d7ef6ba84a (diff) | |
download | src-93ebd6307efeb95a29bc614edd0c67c2af850e98.tar.gz src-93ebd6307efeb95a29bc614edd0c67c2af850e98.zip |
vt: panic while changing vt font
Set refcount for loader provided font to 1 to prevent this font
from being released (so we can reset to default).
PR: 252833
-rw-r--r-- | sys/dev/vt/vt_core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c index 2352ed823424..ac89d8635e78 100644 --- a/sys/dev/vt/vt_core.c +++ b/sys/dev/vt/vt_core.c @@ -1528,6 +1528,8 @@ parse_font_info(struct font_info *fi) ptr = roundup2(ptr, 8); vfp = &vt_font_loader; + /* This is default font, set refcount 1 to disable removal. */ + vfp->vf_refcount = 1; vfp->vf_height = fi->fi_height; vfp->vf_width = fi->fi_width; for (unsigned i = 0; i < VFNT_MAPS; i++) { |