From owner-freebsd-bugs@freebsd.org Sun Oct 9 10:35:01 2016 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9864CC077C8 for ; Sun, 9 Oct 2016 10:35:01 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D3F8D58 for ; Sun, 9 Oct 2016 10:35:01 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u99AZ1It038043 for ; Sun, 9 Oct 2016 10:35:01 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 213334] vtterm_cngrab is broken on kms-enabled systems Date: Sun, 09 Oct 2016 10:35:01 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: avg@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Oct 2016 10:35:01 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D213334 Bug ID: 213334 Summary: vtterm_cngrab is broken on kms-enabled systems Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: avg@FreeBSD.org This stack trace tells it all: (kgdb) bt #0 doadump (textdump=3D1) at pcpu.h:222 #1 0xffffffff80a424a5 in kern_reboot (howto=3D) at /usr/src/sys/kern/kern_shutdown.c:366 #2 0xffffffff80a42a7b in vpanic (fmt=3D, ap=3D) at /usr/src/sys/kern/kern_shutdown.c:759 #3 0xffffffff80a428b6 in kassert_panic (fmt=3D) at /usr/src/sys/kern/kern_shutdown.c:649 #4 0xffffffff80a1f4ae in malloc (size=3D1712, mtp=3D0xffffffff8309c6a0, fl= ags=3D257) at /usr/src/sys/kern/kern_malloc.c:475 #5 0xffffffff8306b71a in drm_crtc_helper_set_config (set=3D) at /usr/src/sys/modules/drm2/drm2/../../../dev/drm2/drm_crtc_helper.c= :596 #6 0xffffffff83071fae in vt_kms_postswitch (arg=3D) at /usr/src/sys/modules/drm2/drm2/../../../dev/drm2/drm_fb_helper.c:344 #7 0xffffffff808d4b5b in vt_window_switch (vw=3D0xffffffff818e1400) at /usr/src/sys/dev/vt/vt_core.c:540 #8 0xffffffff808d2620 in vtterm_cngrab (tm=3D) at /usr/src/sys/dev/vt/vt_core.c:1465 #9 0xffffffff809e8872 in cngrab () at /usr/src/sys/kern/kern_cons.c:368 #10 0xffffffff80a841e9 in kdb_trap (type=3D, code=3D, tf=3D) at /usr/src/sys/kern/subr_kdb.c= :651 #11 0xffffffff81003732 in nmi_call_kdb (cpu=3D0, type=3D19, code=3D, frame=3D0xffffffff81d73d50, do_panic=3Dfalse) at /usr/src/sys/x86/x86/cpu_machdep.c:547 #12 0xffffffff8100f32f in nmi_call_kdb_smp (type=3D0, code=3D0, frame=3D0x0, do_panic=3D) at /usr/src/sys/x86/x86/mp_x86.c:1228 #13 0xffffffff8100375c in nmi_handle_intr (type=3D0, code=3D0, frame=3D0x0, panic=3D) at /usr/src/sys/x86/x86/cpu_machdep.c:564 #14 0xffffffff80eb57f6 in trap (frame=3D0xffffffff81d73d50) at /usr/src/sys/amd64/amd64/trap.c:547 #15 0xffffffff80e96603 in nmi_calltrap () at /usr/src/sys/amd64/amd64/exception.S:510 #16 0xffffffff81003216 in acpi_cpu_c1 () at /usr/src/sys/x86/x86/cpu_machdep.c:130 Previous frame inner to this frame (corrupt stack?) cngrab() can be called from all kinds of contexts and it should be able to handle that. Unfortunately, if a KMS-enabled graphics driver is used, then vt_kms_postswitch() calls drm code that can only work in an unrestricted context. It can not work in an interrupt (including NMI context). --=20 You are receiving this mail because: You are the assignee for the bug.=