diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-06-03 09:46:28 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-06-07 16:26:34 -0700 |
commit | c05cdb1b864f548c0c3d8ae3b51264e6739a69b1 (patch) | |
tree | 47eea1f60be0c0f7cfe57a0a594e6a606c37eea9 /include/linux | |
parent | 1b5acd292336da029535de010af568533df9b665 (diff) |
netlink: allow large data transfers from user-space
I can hit ENOBUFS in the sendmsg() path with a large batch that is
composed of many netlink messages. Here that limit is 8 MBytes of
skbuff data area as kmalloc does not manage to get more than that.
While discussing atomic rule-set for nftables with Patrick McHardy,
we decided to put all rule-set updates that need to be applied
atomically in one single batch to simplify the existing approach.
However, as explained above, the existing netlink code limits us
to a maximum of ~20000 rules that fit in one single batch without
hitting ENOBUFS. iptables does not have such limitation as it is
using vmalloc.
This patch adds netlink_alloc_large_skb() which is only used in
the netlink_sendmsg() path. It uses alloc_skb if the memory
requested is <= one memory page, that should be the common case
for most subsystems, else vmalloc for higher memory allocations.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions