diff options
author | Willem de Bruijn <willemb@google.com> | 2017-08-03 16:29:38 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-08-03 21:37:29 -0700 |
commit | 3ece782693c4b64d588dd217868558ab9a19bfe7 (patch) | |
tree | c18f48b0b880177bd081d3f365ce296b6f96f777 /arch/mn10300 | |
parent | 98ba0bd5505dcbb90322a4be07bcfe6b8a18c73f (diff) | |
download | linux-stable-3ece782693c4b64d588dd217868558ab9a19bfe7.tar.gz linux-stable-3ece782693c4b64d588dd217868558ab9a19bfe7.tar.bz2 linux-stable-3ece782693c4b64d588dd217868558ab9a19bfe7.zip |
sock: skb_copy_ubufs support for compound pages
Refine skb_copy_ubufs to support compound pages. With upcoming TCP
zerocopy sendmsg, such fragments may appear.
The existing code replaces each page one for one. Splitting each
compound page into an independent number of regular pages can result
in exceeding limit MAX_SKB_FRAGS if data is not exactly page aligned.
Instead, fill all destination pages but the last to PAGE_SIZE.
Split the existing alloc + copy loop into separate stages:
1. compute bytelength and minimum number of pages to store this.
2. allocate
3. copy, filling each page except the last to PAGE_SIZE bytes
4. update skb frag array
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/mn10300')
0 files changed, 0 insertions, 0 deletions