Commit 7e8b88e
mptcp: consolidate passive msk socket initialization
When the msk socket is cloned at MPC handshake time, a few
fields are initialized in a racy way outside mptcp_sk_clone()
and the msk socket lock.
The above is due historical reasons: before commit a88d009
("mptcp: simplify subflow_syn_recv_sock()") as the first subflow socket
carrying all the needed date was not available yet at msk creation
time
We can now refactor the code moving the missing initialization bit
under the socket lock, removing the init race and avoiding some
code duplication.
This will also simplify the next patch, as all msk->first write
access are now under the msk socket lock.
Fixes: 0397c6d ("mptcp: keep unaccepted MPC subflow into join list")
Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent 5b82572 commit 7e8b88e
3 files changed
Lines changed: 33 additions & 38 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3038 | 3038 | | |
3039 | 3039 | | |
3040 | 3040 | | |
3041 | | - | |
| 3041 | + | |
3042 | 3042 | | |
3043 | 3043 | | |
3044 | 3044 | | |
| |||
3115 | 3115 | | |
3116 | 3116 | | |
3117 | 3117 | | |
3118 | | - | |
3119 | | - | |
3120 | | - | |
| 3118 | + | |
| 3119 | + | |
| 3120 | + | |
| 3121 | + | |
3121 | 3122 | | |
3122 | 3123 | | |
3123 | 3124 | | |
| |||
3149 | 3150 | | |
3150 | 3151 | | |
3151 | 3152 | | |
3152 | | - | |
3153 | | - | |
3154 | | - | |
3155 | 3153 | | |
| 3154 | + | |
| 3155 | + | |
| 3156 | + | |
| 3157 | + | |
| 3158 | + | |
| 3159 | + | |
| 3160 | + | |
| 3161 | + | |
| 3162 | + | |
| 3163 | + | |
| 3164 | + | |
| 3165 | + | |
| 3166 | + | |
| 3167 | + | |
| 3168 | + | |
| 3169 | + | |
| 3170 | + | |
| 3171 | + | |
| 3172 | + | |
| 3173 | + | |
| 3174 | + | |
| 3175 | + | |
| 3176 | + | |
3156 | 3177 | | |
3157 | 3178 | | |
3158 | 3179 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
616 | 616 | | |
617 | 617 | | |
618 | 618 | | |
619 | | - | |
620 | 619 | | |
621 | 620 | | |
622 | 621 | | |
| |||
686 | 685 | | |
687 | 686 | | |
688 | 687 | | |
689 | | - | |
690 | | - | |
691 | | - | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
692 | 692 | | |
693 | 693 | | |
694 | 694 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
815 | 815 | | |
816 | 816 | | |
817 | 817 | | |
818 | | - | |
| 818 | + | |
819 | 819 | | |
820 | 820 | | |
821 | 821 | | |
822 | 822 | | |
823 | | - | |
824 | | - | |
825 | | - | |
826 | | - | |
827 | | - | |
828 | | - | |
829 | | - | |
830 | | - | |
831 | | - | |
832 | | - | |
833 | | - | |
834 | | - | |
835 | | - | |
836 | | - | |
837 | | - | |
838 | 823 | | |
839 | | - | |
840 | | - | |
841 | | - | |
842 | | - | |
843 | | - | |
844 | | - | |
845 | | - | |
846 | | - | |
847 | | - | |
848 | | - | |
849 | | - | |
850 | 824 | | |
851 | 825 | | |
852 | 826 | | |
| |||
0 commit comments