From: Prarit Bhargava <prarit@sgi.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: Virtual Console Hotplug Leads to OOM
Date: Fri, 01 Apr 2005 13:42:51 +0000 [thread overview]
Message-ID: <424D4FDB.3050803@sgi.com> (raw)
In-Reply-To: <424AD41F.1040309@sgi.com>
Greg,
Thanks for the reply.
Greg KH wrote:
>>If you run the tty2_test which opens and closes ttys (attached to this
>>email) you'll see THOUSANDS of hotplug events. After running for 1
>>minute on a 16p ia64 I had well over 4000 hotplug events.
>>
>>
>
>Guess you need a faster machine, my little x86-64 had way more than that :)
>
>
(sheepish grin) I did put a few sleeps in there so I could actually read
the output streaming out :)
>
>
>>If we're unlucky enough to fall below the low-water memory point at the
>>same time tty2_test is spawning, the OOM-killer starts up. Memory is
>>taken up by the hotplug events ... and we're off into the weeds.
>>
>>
>
>Yup.
>
>
No offense, but I'm not sure we should be so cavalier on this issue --
I'm pointing out that we have a potential fork bomb within the kernel.
Aside from that, I'm think that hotplug is more of a victim here than
the cause. I'm also noticing that on this machine with 100,000
outstanding task_structs, approximately 99,000 of them are hotplug
task_structs. Something is definately very wrong here. These should
have been reaped. These tasks are not in the pid table but are left
lying around on the task_struct list.
>
>
>>The issue with the virtual console code is that it uses the class_simple
>>library. This is a problem as the library pre-defines a global kset
>>parent as class_obj (or at least AFAICT). This parent is used by ALL
>>subsystems using the class_simple, not just the virtual console subsystem.
>>
>>
>
>If you look at the -mm tree, class_simple is now gone.
>
>
Will do. Was there some signifigant reason for removing class_simple?
(Just curious ...)
>
>
>>This parent has a pointer to allow hotplug slot operations for all it's
>>children (including the virtual consoles). IMO zero-ing this pointer
>>out is not a valid option as this would break hotplug op's for many
>>other subystems.
>>
>>
>
>Very true.
>
>
>
>>** I did notice that the class struct has it's own hotplug value --
>>can/should this be used to override the parent's hotplug operations? **
>>
>>
>
>Why would you want to override this? We need those hotplug events. All
>this means is that an admin better be careful who he lets have access to
>the tty group :)
>
>
Absolutely correct -- but on some machines the group can be uucp ...
which could *potentially* cause a security hole. The tty2_test is
(very) contrived but still ... it should be something we're aware of as
it could cause problems on machines at critical stress points.
>thanks,
>
>greg k-h
>
>
>
-------------------------------------------------------
This SF.net email is sponsored by Demarc:
A global provider of Threat Management Solutions.
Download our HomeAdmin security software for free today!
http://www.demarc.com/info/Sentarus/hamr30
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
prev parent reply other threads:[~2005-04-01 13:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-30 16:30 Virtual Console Hotplug Leads to OOM Prarit Bhargava
2005-03-30 16:31 ` Prarit Bhargava
2005-04-01 0:17 ` Greg KH
2005-04-01 13:42 ` Prarit Bhargava [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=424D4FDB.3050803@sgi.com \
--to=prarit@sgi.com \
--cc=linux-hotplug@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;
as well as URLs for NNTP newsgroup(s).