Commit 9574867
committed
MINOR: muxes: enforce thread-safety for private idle conns
When a backend connnection becomes idle, muxes must activate some
protection to mark future access on it as dangerous. Indeed, once a
connection is inserted in an idle list, it may be manipulated by another
thread, either via takeover or scheduled for purging.
Private idle connections are stored into a session instead of the server
tree. They are never subject to a takeover for reuse or purge mechanism.
As such, currently they do not require the same level of protection.
However, a new patch will introduce support for private idle connections
purging. Thus, the purpose of this patch is to ensure protection is
activated as well now.
TASK_F_USR1 was already set on them as an anticipation for such need.
Only some extra operations were missing, most notably xprt_set_idle()
invokation. Also, return path of muxes detach operation is adjusted to
ensure such connection are never accessed after insertion.1 parent b18b5e2 commit 9574867
4 files changed
+32
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3748 | 3748 | | |
3749 | 3749 | | |
3750 | 3750 | | |
| 3751 | + | |
3751 | 3752 | | |
3752 | 3753 | | |
3753 | 3754 | | |
3754 | 3755 | | |
3755 | 3756 | | |
3756 | 3757 | | |
3757 | 3758 | | |
| 3759 | + | |
| 3760 | + | |
| 3761 | + | |
| 3762 | + | |
| 3763 | + | |
| 3764 | + | |
| 3765 | + | |
3758 | 3766 | | |
3759 | 3767 | | |
3760 | 3768 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1151 | 1151 | | |
1152 | 1152 | | |
1153 | 1153 | | |
| 1154 | + | |
| 1155 | + | |
1154 | 1156 | | |
1155 | 1157 | | |
1156 | 1158 | | |
1157 | 1159 | | |
1158 | 1160 | | |
1159 | 1161 | | |
1160 | 1162 | | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
1161 | 1169 | | |
1162 | 1170 | | |
1163 | 1171 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5558 | 5558 | | |
5559 | 5559 | | |
5560 | 5560 | | |
| 5561 | + | |
5561 | 5562 | | |
5562 | 5563 | | |
5563 | 5564 | | |
5564 | 5565 | | |
5565 | 5566 | | |
5566 | 5567 | | |
5567 | 5568 | | |
| 5569 | + | |
| 5570 | + | |
| 5571 | + | |
| 5572 | + | |
| 5573 | + | |
| 5574 | + | |
| 5575 | + | |
5568 | 5576 | | |
5569 | 5577 | | |
5570 | 5578 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3005 | 3005 | | |
3006 | 3006 | | |
3007 | 3007 | | |
| 3008 | + | |
3008 | 3009 | | |
3009 | 3010 | | |
3010 | 3011 | | |
3011 | 3012 | | |
3012 | 3013 | | |
3013 | 3014 | | |
3014 | 3015 | | |
| 3016 | + | |
| 3017 | + | |
| 3018 | + | |
| 3019 | + | |
| 3020 | + | |
| 3021 | + | |
| 3022 | + | |
3015 | 3023 | | |
3016 | 3024 | | |
3017 | 3025 | | |
| |||
0 commit comments