netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] tcp: setsockopt congestion control autoload
@ 2006-10-25 18:08 Stephen Hemminger
  2006-10-25 23:21 ` Patrick McHardy
                   ` (3 more replies)
  0 siblings, 4 replies; 36+ messages in thread
From: Stephen Hemminger @ 2006-10-25 18:08 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev

If user asks for a congestion control type with setsockopt() then it
may be available as a module not included in the kernel already. 
It should be autoloaded if needed.  This is done already when
the default selection is change with sysctl, but not when application
requests via sysctl.

Only reservation is are there any bad security implications from this?

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>

--- orig/net/ipv4/tcp_cong.c	2006-10-25 13:55:34.000000000 -0700
+++ new/net/ipv4/tcp_cong.c	2006-10-25 13:58:39.000000000 -0700
@@ -153,9 +153,19 @@
 
 	rcu_read_lock();
 	ca = tcp_ca_find(name);
+	/* no change asking for existing value */
 	if (ca == icsk->icsk_ca_ops)
 		goto out;
 
+#ifdef CONFIG_KMOD
+	/* not found attempt to autoload module */
+	if (!ca) {
+		rcu_read_unlock();
+		request_module("tcp_%s", name);
+		rcu_read_lock();
+		ca = tcp_ca_find(name);
+	}
+#endif
 	if (!ca)
 		err = -ENOENT;
 

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

end of thread, other threads:[~2006-10-28  3:11 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-25 18:08 [RFC] tcp: setsockopt congestion control autoload Stephen Hemminger
2006-10-25 23:21 ` Patrick McHardy
2006-10-26  5:22 ` Evgeniy Polyakov
2006-10-26 14:34   ` Stephen Hemminger
2006-10-26 14:57     ` Evgeniy Polyakov
2006-10-26 15:23       ` Stephen Hemminger
2006-10-26 17:05         ` Patrick McHardy
2006-10-26 20:55       ` David Miller
2006-10-26 17:29 ` John Heffner
2006-10-26 20:57   ` David Miller
2006-10-26 22:44   ` Hagen Paul Pfeifer
2006-10-26 22:53     ` John Heffner
2006-10-26 23:52     ` [PATCH] Check if user has CAP_NET_ADMIN to change congestion control algorithm Hagen Paul Pfeifer
2006-10-26 23:59       ` Ian McDonald
2006-10-27  0:07         ` David Miller
2006-10-27  0:20           ` Ian McDonald
2006-10-27  0:02       ` David Miller
2006-10-27 10:43         ` Hagen Paul Pfeifer
2006-10-27 14:41           ` Stephen Hemminger
2006-10-27 15:21             ` Hagen Paul Pfeifer
2006-10-27 15:48               ` Stephen Hemminger
2006-10-27 17:30                 ` [PATCH] tcp: don't allow unfair congestion control to be built without warning Stephen Hemminger
2006-10-27 17:43                   ` John Heffner
2006-10-27 17:59                     ` [PATCH] tcp: allow restricting congestion control choices Stephen Hemminger
2006-10-27 21:17                   ` [PATCH] tcp: don't allow unfair congestion control to be built without warning David Miller
2006-10-27 21:24                     ` Stephen Hemminger
2006-10-27 21:37                       ` David Miller
2006-10-27 21:59                         ` Stephen Hemminger
2006-10-27 22:12                           ` David Miller
2006-10-27 22:21                             ` Stephen Hemminger
2006-10-27 22:24                               ` David Miller
2006-10-28  0:48                                 ` Stephen Hemminger
2006-10-28  3:10                                   ` [RFC] tcp: available congetsion control Stephen Hemminger
2006-10-27 21:22             ` [PATCH] Check if user has CAP_NET_ADMIN to change congestion control algorithm David Miller
2006-10-27  1:03       ` Stephen Hemminger
2006-10-27 18:14 ` [PATCH] tcp: setsockopt congestion control autoload Stephen Hemminger

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).