linux/net/sunrpc
Jeff Layton c9233eb7b0 sunrpc: add sv_maxconn field to svc_serv (try #3)
svc_check_conn_limits() attempts to prevent denial of service attacks
by having the service close old connections once it reaches a
threshold. This threshold is based on the number of threads in the
service:

	(serv->sv_nrthreads + 3) * 20

Once we reach this, we drop the oldest connections and a printk pops
to warn the admin that they should increase the number of threads.

Increasing the number of threads isn't an option however for services
like lockd. We don't want to eliminate this check entirely for such
services but we need some way to increase this limit.

This patch adds a sv_maxconn field to the svc_serv struct. When it's
set to 0, we use the current method to calculate the max number of
connections. RPC services can then set this on an as-needed basis.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Acked-by: Neil Brown <neilb@suse.de>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2009-01-06 11:53:47 -05:00
..
auth_gss rpc: add service field to new upcall 2008-12-23 16:19:56 -05:00
xprtrdma rpc/rdma: goto instead of copypaste 2008-12-14 23:19:48 -08:00
auth_generic.c SUNRPC: Fix a performance regression in the RPC authentication code 2008-11-20 13:17:40 -08:00
auth_null.c
auth_unix.c SUNRPC: Use GFP_NOFS when allocating credentials 2008-07-09 12:08:48 -04:00
auth.c Merge branch 'devel' into next 2008-12-30 16:51:43 -05:00
cache.c sunrpc: assign PDE->data before gluing PDE into /proc tree 2008-05-02 02:44:36 -07:00
clnt.c Merge branch 'devel' into next 2008-12-30 16:51:43 -05:00
Makefile
rpc_pipe.c zero i_uid/i_gid on inode allocation 2009-01-05 11:54:28 -05:00
rpcb_clnt.c net: replace NIPQUAD() in net/*/ 2008-10-31 00:54:56 -07:00
sched.c SUNRPC: Remove the BKL from the callback functions 2008-07-15 18:10:57 -04:00
socklib.c
stats.c sunrpc: assign PDE->data before gluing PDE into /proc tree 2008-05-02 02:44:36 -07:00
sunrpc_syms.c
svc_xprt.c sunrpc: add sv_maxconn field to svc_serv (try #3) 2009-01-06 11:53:47 -05:00
svc.c SUNRPC: Fix up svc_unregister() 2008-09-29 18:13:40 -04:00
svcauth_unix.c net: replace NIPQUAD() in net/*/ 2008-10-31 00:54:56 -07:00
svcauth.c
svcsock.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2008-12-15 20:03:50 -08:00
sysctl.c sunrpc: fix possible overrun on read of /proc/sys/sunrpc/transports 2008-09-01 14:24:24 -04:00
timer.c
xdr.c SUNRPC: Convert the xdr helpers and rpc_pipefs to EXPORT_SYMBOL_GPL 2008-12-23 15:21:31 -05:00
xprt.c sunrpc: do not pin sunrpc module in the memory 2008-10-07 18:14:54 -04:00
xprtsock.c sunrpc: Fix build warning due to typo in %pI4 format changes. 2008-11-02 23:57:06 -08:00