From: Jason Wang Date: Wed, 2 May 2012 03:42:15 +0000 (+0800) Subject: macvtap: zerocopy: validate vectors before building skb X-Git-Tag: v3.5-rc1~109^2~146^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b92946e2919134ebe2a4083e4302236295ea2a73;p=pandora-kernel.git macvtap: zerocopy: validate vectors before building skb 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 Signed-off-by: Michael S. Tsirkin --- Reading git-diff-tree failed