From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Cc: DRI Development <dri-devel@lists.freedesktop.org>,
LKML <linux-kernel@vger.kernel.org>,
Daniel Vetter <daniel.vetter@ffwll.ch>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jslaby@suse.cz>,
David Herrmann <dh.herrmann@gmail.com>
Subject: [PATCH] vt: Fix replacement console check when unbinding
Date: Fri, 6 Jun 2014 11:43:01 +0200 [thread overview]
Message-ID: <1402047781-7241-1-git-send-email-daniel.vetter@ffwll.ch> (raw)
In-Reply-To: <1401980308-5116-1-git-send-email-daniel.vetter@ffwll.ch>
I don't fully understand the magic of the vt register/unregister
logic, but apparently everything but the inital console (as set
in the conswitchp pointer) is marked with FLAG_MODULE. Which means
if something unregistered the boot vt driver (e.g. i915.ko kicking
out vga_con) there's nothing left when trying to unbind e.g. fbcon
through sysfs.
But in most cases have the dummy console hanging around besides the
boot console, so this test is fairly dubious. What we actually want is
simply a different console than the one we want to unbind.
v2: Correct the commit message to clarify that the dummy console isn't
always around, but only in most cases (David).
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.cz>
Cc: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
drivers/tty/vt/vt.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index 3ad0b61e35b4..ea600f482eeb 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -3155,8 +3155,7 @@ int do_unbind_con_driver(const struct consw *csw, int first, int last, int deflt
for (i = 0; i < MAX_NR_CON_DRIVER; i++) {
con_back = ®istered_con_driver[i];
- if (con_back->con &&
- !(con_back->flag & CON_DRIVER_FLAG_MODULE)) {
+ if (con_back->con && con_back->con != csw) {
defcsw = con_back->con;
retval = 0;
break;
--
1.8.1.4
prev parent reply other threads:[~2014-06-06 9:43 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-05 14:58 [PATCH 1/5] " Daniel Vetter
2014-06-05 14:58 ` [PATCH 2/5] vt: Fix up unregistration of vt drivers Daniel Vetter
2014-06-06 7:24 ` David Herrmann
2014-06-06 7:56 ` Daniel Vetter
2014-06-06 8:47 ` David Herrmann
2014-06-06 9:40 ` Daniel Vetter
2014-06-06 15:51 ` Greg Kroah-Hartman
2014-06-06 20:21 ` [Intel-gfx] " Daniel Vetter
2014-06-05 14:58 ` [PATCH 3/5] vt: Don't ignore unbind errors in vt_unbind Daniel Vetter
2014-06-06 7:13 ` David Herrmann
2014-06-05 14:58 ` [PATCH 4/5] drm/i915: Fixup global gtt cleanup Daniel Vetter
2014-06-06 13:22 ` Imre Deak
2014-06-05 14:58 ` [PATCH 5/5] drm/i915: Kick out vga console Daniel Vetter
2014-06-06 7:28 ` David Herrmann
2014-06-06 7:47 ` Daniel Vetter
2014-06-06 15:20 ` Daniel Vetter
2014-06-09 13:22 ` Tomi Valkeinen
[not found] ` <1602327.OGkKxHtt2b@grover>
2014-06-29 3:55 ` Ed Tomlinson
2014-06-30 6:59 ` Chris Wilson
2014-06-30 8:19 ` David Herrmann
2014-07-01 13:51 ` Ed Tomlinson
2014-07-07 8:48 ` [Intel-gfx] " Daniel Vetter
2014-07-07 10:45 ` Ed Tomlinson
2014-07-07 12:26 ` Daniel Vetter
2014-07-08 2:53 ` Ed Tomlinson
2014-07-08 8:10 ` Daniel Vetter
2014-07-07 10:59 ` Ed Tomlinson
2014-06-06 7:16 ` [PATCH 1/5] vt: Fix replacement console check when unbinding David Herrmann
2014-06-06 7:49 ` Daniel Vetter
2014-06-06 9:43 ` Daniel Vetter [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1402047781-7241-1-git-send-email-daniel.vetter@ffwll.ch \
--to=daniel.vetter@ffwll.ch \
--cc=dh.herrmann@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®