diff options
author | Jason Wang <jasowang@redhat.com> | 2012-05-02 11:42:15 +0800 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2012-07-25 04:11:04 +0100 |
commit | 1be535a022a9c0b9a55cab2993ee29e05c4ead0b (patch) | |
tree | 281e5a7565778755dce6508733bb5a56d96aef35 /virt | |
parent | cc64214d05941d09bb9f80051a1949a7223b8ab7 (diff) |
macvtap: zerocopy: validate vectors before building skb
commit b92946e2919134ebe2a4083e4302236295ea2a73 upstream.
There're several reasons that the vectors need to be validated:
- Return error when caller provides vectors whose num is greater than UIO_MAXIOV.
- Linearize part of skb when userspace provides vectors grater than MAX_SKB_FRAGS.
- Return error when userspace provides vectors whose total length may exceed
- MAX_SKB_FRAGS * PAGE_SIZE.
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'virt')
0 files changed, 0 insertions, 0 deletions