]> git.openfabrics.org - ~emulex/infiniband.git/commit
ipvs: reduce stack usage for sockopt data
authorJulian Anastasov <ja@ssi.bg>
Tue, 2 Sep 2014 21:02:49 +0000 (00:02 +0300)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 9 Sep 2014 14:31:24 +0000 (16:31 +0200)
commit5fcf0cf6073d4adb22e34cd1d14a6318699625a9
treed07020081df5b3657c98b59fc8f0431f8d96f150
parent3045d76070abe725dbb7fd8ff39c27b820d5a7eb
ipvs: reduce stack usage for sockopt data

Use union to reserve the required stack space for sockopt data
which is less than the currently hardcoded value of 128.
Now the tables for commands should be more readable.
The checks added for readability are optimized by compiler,
others warn at compile time if command uses too much
stack or exceeds the storage of set_arglen and get_arglen.

As Dan Carpenter points out, we can run for unprivileged user,
so we can silent some error messages.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
CC: Dan Carpenter <dan.carpenter@oracle.com>
CC: Andrey Utkin <andrey.krieger.utkin@gmail.com>
CC: David Binderman <dcb314@hotmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/ipvs/ip_vs_ctl.c