Commit 2641363
esp: avoid unneeded kmap_atomic call
[ Upstream commit 9bd6b62 ]
esp(6)_output_head uses skb_page_frag_refill to allocate a buffer for
the esp trailer.
It accesses the page with kmap_atomic to handle highmem. But
skb_page_frag_refill can return compound pages, of which
kmap_atomic only maps the first underlying page.
skb_page_frag_refill does not return highmem, because flag
__GFP_HIGHMEM is not set. ESP uses it in the same manner as TCP.
That also does not call kmap_atomic, but directly uses page_address,
in skb_copy_to_page_nocache. Do the same for ESP.
This issue has become easier to trigger with recent kmap local
debugging feature CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP.
Fixes: cac2661 ("esp4: Avoid skb_cow_data whenever possible")
Fixes: 03e2a30 ("esp6: Avoid skb_cow_data whenever possible")
Signed-off-by: Willem de Bruijn <[email protected]>
Acked-by: Steffen Klassert <[email protected]>
Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent 3c64191 commit 2641363
2 files changed
+2
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
443 | 443 | | |
444 | 444 | | |
445 | 445 | | |
446 | | - | |
447 | 446 | | |
448 | 447 | | |
449 | 448 | | |
| |||
485 | 484 | | |
486 | 485 | | |
487 | 486 | | |
488 | | - | |
489 | | - | |
490 | | - | |
| 487 | + | |
491 | 488 | | |
492 | 489 | | |
493 | 490 | | |
494 | | - | |
495 | | - | |
496 | 491 | | |
497 | 492 | | |
498 | 493 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
478 | 478 | | |
479 | 479 | | |
480 | 480 | | |
481 | | - | |
482 | 481 | | |
483 | 482 | | |
484 | 483 | | |
| |||
519 | 518 | | |
520 | 519 | | |
521 | 520 | | |
522 | | - | |
523 | | - | |
524 | | - | |
| 521 | + | |
525 | 522 | | |
526 | 523 | | |
527 | 524 | | |
528 | | - | |
529 | | - | |
530 | 525 | | |
531 | 526 | | |
532 | 527 | | |
| |||
0 commit comments