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
This commit is contained in:
Toomas Soome 2021-01-24 20:59:36 +02:00
parent 7a731da592
commit 93ebd6307e

View File

@ -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++) {