Commit 1f3a090
net: openvswitch: introduce common code for flushing flows
To avoid some issues, for example RCU usage warning and double free,
we should flush the flows under ovs_lock. This patch refactors
table_instance_destroy and introduces table_instance_flow_flush
which can be invoked by __dp_destroy or ovs_flow_tbl_flush.
Fixes: 50b0e61 ("net: openvswitch: fix possible memleak on destroy flow-table")
Reported-by: Johan Knöös <jknoos@google.com>
Reported-at: https://mail.openvswitch.org/pipermail/ovs-discuss/2020-August/050489.html
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Reviewed-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent 88fd1cb commit 1f3a090
3 files changed
+27
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1756 | 1756 | | |
1757 | 1757 | | |
1758 | 1758 | | |
| 1759 | + | |
1759 | 1760 | | |
1760 | 1761 | | |
1761 | 1762 | | |
| |||
1774 | 1775 | | |
1775 | 1776 | | |
1776 | 1777 | | |
1777 | | - | |
| 1778 | + | |
| 1779 | + | |
| 1780 | + | |
| 1781 | + | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
| 1785 | + | |
1778 | 1786 | | |
1779 | 1787 | | |
1780 | 1788 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
473 | 473 | | |
474 | 474 | | |
475 | 475 | | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
480 | 480 | | |
481 | 481 | | |
482 | 482 | | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | 483 | | |
488 | | - | |
| 484 | + | |
489 | 485 | | |
490 | 486 | | |
491 | 487 | | |
| |||
497 | 493 | | |
498 | 494 | | |
499 | 495 | | |
500 | | - | |
| 496 | + | |
501 | 497 | | |
502 | 498 | | |
| 499 | + | |
503 | 500 | | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
512 | 506 | | |
513 | 507 | | |
514 | 508 | | |
| |||
523 | 517 | | |
524 | 518 | | |
525 | 519 | | |
526 | | - | |
| 520 | + | |
527 | 521 | | |
528 | 522 | | |
529 | 523 | | |
| |||
641 | 635 | | |
642 | 636 | | |
643 | 637 | | |
644 | | - | |
| 638 | + | |
| 639 | + | |
645 | 640 | | |
646 | 641 | | |
647 | 642 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
108 | 111 | | |
109 | 112 | | |
0 commit comments