Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jesse/openvswitch
Jesse Gross says: ==================== [GIT net-next] Open vSwitch Open vSwitch changes for net-next/3.14. Highlights are: * Performance improvements in the mechanism to get packets to userspace using memory mapped netlink and skb zero copy where appropriate. * Per-cpu flow stats in situations where flows are likely to be shared across CPUs. Standard flow stats are used in other situations to save memory and allocation time. * A handful of code cleanups and rationalization. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -1773,6 +1773,9 @@ struct sk_buff *netlink_alloc_skb(struct sock *ssk, unsigned int size,
|
||||
if (ring->pg_vec == NULL)
|
||||
goto out_put;
|
||||
|
||||
if (ring->frame_size - NL_MMAP_HDRLEN < size)
|
||||
goto out_put;
|
||||
|
||||
skb = alloc_skb_head(gfp_mask);
|
||||
if (skb == NULL)
|
||||
goto err1;
|
||||
@@ -1782,6 +1785,7 @@ struct sk_buff *netlink_alloc_skb(struct sock *ssk, unsigned int size,
|
||||
if (ring->pg_vec == NULL)
|
||||
goto out_free;
|
||||
|
||||
/* check again under lock */
|
||||
maxlen = ring->frame_size - NL_MMAP_HDRLEN;
|
||||
if (maxlen < size)
|
||||
goto out_free;
|
||||
|
||||
Reference in New Issue
Block a user