Commit dc7d7b6
vxlan: Add RCU read-side critical sections in the Tx path
[ Upstream commit 804b09b ]
The Tx path does not run from an RCU read-side critical section which
makes the current lockless accesses to FDB entries invalid. As far as I
am aware, this has not been a problem in practice, but traces will be
generated once we transition the FDB lookup to rhashtable_lookup().
Add rcu_read_{lock,unlock}() around the handling of FDB entries in the
Tx path. Remove the RCU read-side critical section from vxlan_xmit_nh()
as now the function is always called from an RCU read-side critical
section.
Reviewed-by: Petr Machata <[email protected]>
Signed-off-by: Ido Schimmel <[email protected]>
Link: https://patch.msgid.link/[email protected]
Reviewed-by: Nikolay Aleksandrov <[email protected]>
Signed-off-by: Paolo Abeni <[email protected]>
Stable-dep-of: 1f5d2fd ("vxlan: Fix NPD in {arp,neigh}_reduce() when using nexthop objects")
Signed-off-by: Sasha Levin <[email protected]>
(cherry picked from commit 02bebe7d0483dc25a4ec230ab67d01433def7f00)
Signed-off-by: Harshit Mogalapalli <[email protected]>1 parent 416fc40 commit dc7d7b6
1 file changed
+8
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1909 | 1909 | | |
1910 | 1910 | | |
1911 | 1911 | | |
| 1912 | + | |
1912 | 1913 | | |
1913 | 1914 | | |
1914 | 1915 | | |
1915 | 1916 | | |
| 1917 | + | |
1916 | 1918 | | |
1917 | 1919 | | |
| 1920 | + | |
1918 | 1921 | | |
1919 | 1922 | | |
1920 | 1923 | | |
| |||
2632 | 2635 | | |
2633 | 2636 | | |
2634 | 2637 | | |
2635 | | - | |
2636 | 2638 | | |
2637 | | - | |
2638 | | - | |
| 2639 | + | |
2639 | 2640 | | |
2640 | | - | |
2641 | 2641 | | |
2642 | | - | |
2643 | 2642 | | |
2644 | 2643 | | |
2645 | 2644 | | |
| |||
2766 | 2765 | | |
2767 | 2766 | | |
2768 | 2767 | | |
| 2768 | + | |
2769 | 2769 | | |
2770 | 2770 | | |
2771 | 2771 | | |
| |||
2788 | 2788 | | |
2789 | 2789 | | |
2790 | 2790 | | |
2791 | | - | |
| 2791 | + | |
2792 | 2792 | | |
2793 | 2793 | | |
2794 | 2794 | | |
| |||
2813 | 2813 | | |
2814 | 2814 | | |
2815 | 2815 | | |
| 2816 | + | |
| 2817 | + | |
2816 | 2818 | | |
2817 | 2819 | | |
2818 | 2820 | | |
| |||
0 commit comments