diff options
author | David S. Miller <davem@davemloft.net> | 2019-02-18 02:48:43 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-02-18 02:48:43 +0300 |
commit | 254a1a2b2c2eb4332e9f8d73f7cd35b97abc6493 (patch) | |
tree | 1ff1c631dd480f88ed716d02d858bba7530726d6 /include | |
parent | e09c6a4ec1bb9ed73b4157b69c261e408d875b0f (diff) | |
parent | 3bed3cc4156eedf652b4df72bdb35d4f1a2a739d (diff) | |
download | linux-254a1a2b2c2eb4332e9f8d73f7cd35b97abc6493.tar.xz |
Merge branch 'netdev-page_frag_alloc-fixes'
Alexander Duyck says:
====================
Address recent issues found in netdev page_frag_alloc usage
This patch set addresses a couple of issues that I had pointed out to Jann
Horn in response to a recent patch submission.
The first issue is that I wanted to avoid the need to read/modify/write the
size value in order to generate the value for pagecnt_bias. Instead we can
just use a fixed constant which reduces the need for memory read operations
and the overall number of instructions to update the pagecnt bias values.
The other, and more important issue is, that apparently we were letting tun
access the napi_alloc_cache indirectly through netdev_alloc_frag and as a
result letting it create unaligned accesses via unaligned allocations. In
order to prevent this I have added a call to SKB_DATA_ALIGN for the fragsz
field so that we will keep the offset in the napi_alloc_cache
SMP_CACHE_BYTES aligned.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions