Commit 13a4362
bpf, vsock: Invoke proto::close on close()
commit 135ffc7becc82cfb84936ae133da7969220b43b2 upstream.
vsock defines a BPF callback to be invoked when close() is called. However,
this callback is never actually executed. As a result, a closed vsock
socket is not automatically removed from the sockmap/sockhash.
Introduce a dummy vsock_close() and make vsock_release() call proto::close.
Note: changes in __vsock_release() look messy, but it's only due to indent
level reduction and variables xmas tree reorder.
Fixes: 634f1a7 ("vsock: support sockmap")
Signed-off-by: Michal Luczaj <[email protected]>
Reviewed-by: Stefano Garzarella <[email protected]>
Reviewed-by: Luigi Leonardi <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexei Starovoitov <[email protected]>
Acked-by: John Fastabend <[email protected]>
[LL: There is no sockmap support for this kernel version. This patch has
been backported because it helps reduce conflicts on future backports]
Signed-off-by: Luigi Leonardi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent effac69 commit 13a4362
1 file changed
+40
-27
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| 119 | + | |
119 | 120 | | |
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
123 | 124 | | |
124 | 125 | | |
| 126 | + | |
125 | 127 | | |
126 | 128 | | |
127 | 129 | | |
| |||
803 | 805 | | |
804 | 806 | | |
805 | 807 | | |
806 | | - | |
807 | | - | |
808 | | - | |
809 | | - | |
810 | | - | |
811 | | - | |
| 808 | + | |
| 809 | + | |
812 | 810 | | |
813 | | - | |
814 | | - | |
815 | | - | |
816 | | - | |
817 | | - | |
818 | | - | |
| 811 | + | |
| 812 | + | |
819 | 813 | | |
820 | | - | |
821 | | - | |
822 | | - | |
823 | | - | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
824 | 820 | | |
825 | | - | |
826 | | - | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
827 | 825 | | |
828 | | - | |
| 826 | + | |
| 827 | + | |
829 | 828 | | |
830 | | - | |
831 | | - | |
832 | | - | |
833 | | - | |
834 | | - | |
| 829 | + | |
835 | 830 | | |
836 | | - | |
837 | | - | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
838 | 835 | | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
839 | 839 | | |
840 | 840 | | |
841 | 841 | | |
| |||
912 | 912 | | |
913 | 913 | | |
914 | 914 | | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
915 | 922 | | |
916 | 923 | | |
917 | | - | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
918 | 931 | | |
919 | 932 | | |
920 | 933 | | |
| |||
0 commit comments