mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* vc: create vcs(a) devices for consoles
@ 2009-07-18 15:34 Kay Sievers
  2009-07-18 16:01 ` Greg KH
  0 siblings, 1 reply; 6+ messages in thread
From: Kay Sievers @ 2009-07-18 15:34 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel, Gerardo Exequiel Pozzi

From: Kay Sievers <kay.sievers@vrfy.org>
Subject: vc: create vcs(a) devices for consoles

The buffer for the consoles are unconditionally allocated at
con_init() time, which miss the creation of the vcs(a) devices.

Since 2.6.30, these devices are no longer created at open()
and removed on close(), but controlled by the lifetime of the
buffers.

Reported-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
Tested-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
Cc: stable@kernel.org
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
---

 drivers/char/vc_screen.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/drivers/char/vc_screen.c
+++ b/drivers/char/vc_screen.c
@@ -495,11 +495,15 @@ void vcs_remove_sysfs(int index)
 
 int __init vcs_init(void)
 {
+	unsigned int i;
+
 	if (register_chrdev(VCS_MAJOR, "vcs", &vcs_fops))
 		panic("unable to get major %d for vcs device", VCS_MAJOR);
 	vc_class = class_create(THIS_MODULE, "vc");
 
 	device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 0), NULL, "vcs");
 	device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 128), NULL, "vcsa");
+	for (i = 0; i < MIN_NR_CONSOLES; i++)
+		vcs_make_sysfs(i);
 	return 0;
 }



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-07-18 22:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-18 15:34 vc: create vcs(a) devices for consoles Kay Sievers
2009-07-18 16:01 ` Greg KH
2009-07-18 16:12   ` Kay Sievers
2009-07-18 16:19     ` Samuel Thibault
2009-07-18 18:32       ` Nicolas Pitre
2009-07-18 22:32     ` Greg KH

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®