View | Details | Raw Unified | Return to bug 191306
Collapse All | Expand All

(-)sys/dev/vt/vt_core.c (-5 / +4 lines)
Lines 616-622 Link Here
616
	case KBDIO_UNLOADING:
616
	case KBDIO_UNLOADING:
617
		mtx_lock(&Giant);
617
		mtx_lock(&Giant);
618
		vd->vd_keyboard = -1;
618
		vd->vd_keyboard = -1;
619
		kbd_release(kbd, (void *)&vd->vd_keyboard);
619
		kbd_release(kbd, vd);
620
		mtx_unlock(&Giant);
620
		mtx_unlock(&Giant);
621
		return (0);
621
		return (0);
622
	default:
622
	default:
Lines 1773-1783 Link Here
1773
				return (EINVAL);
1773
				return (EINVAL);
1774
			}
1774
			}
1775
			i = kbd_allocate(kbd->kb_name, kbd->kb_unit,
1775
			i = kbd_allocate(kbd->kb_name, kbd->kb_unit,
1776
			    (void *)&vd->vd_keyboard, vt_kbdevent, vd);
1776
			    vd, vt_kbdevent, vd);
1777
			if (i >= 0) {
1777
			if (i >= 0) {
1778
				if (vd->vd_keyboard != -1) {
1778
				if (vd->vd_keyboard != -1) {
1779
					kbd_release(kbd,
1779
					kbd_release(kbd, vd);
1780
					    (void *)&vd->vd_keyboard);
1781
				}
1780
				}
1782
				kbd = kbd_get_keyboard(i);
1781
				kbd = kbd_get_keyboard(i);
1783
				vd->vd_keyboard = i;
1782
				vd->vd_keyboard = i;
Lines 1799-1805 Link Here
1799
				mtx_unlock(&Giant);
1798
				mtx_unlock(&Giant);
1800
				return (EINVAL);
1799
				return (EINVAL);
1801
			}
1800
			}
1802
			error = kbd_release(kbd, (void *)&vd->vd_keyboard);
1801
			error = kbd_release(kbd, vd);
1803
			if (error == 0) {
1802
			if (error == 0) {
1804
				vd->vd_keyboard = -1;
1803
				vd->vd_keyboard = -1;
1805
			}
1804
			}

Return to bug 191306