Commit 1bba390
rcu/nocb: Fix possible invalid rdp's->nocb_cb_kthread pointer access
In the preparation stage of CPU online, if the corresponding
the rdp's->nocb_cb_kthread does not exist, will be created,
there is a situation where the rdp's rcuop kthreads creation fails,
and then de-offload this CPU's rdp, does not assign this CPU's
rdp->nocb_cb_kthread pointer, but this rdp's->nocb_gp_rdp and
rdp's->rdp_gp->nocb_gp_kthread is still valid.
This will cause the subsequent re-offload operation of this offline
CPU, which will pass the conditional check and the kthread_unpark()
will access invalid rdp's->nocb_cb_kthread pointer.
This commit therefore use rdp's->nocb_gp_kthread instead of
rdp_gp's->nocb_gp_kthread for safety check.
Signed-off-by: Zqiang <[email protected]>
Reviewed-by: Frederic Weisbecker <[email protected]>
Signed-off-by: Neeraj Upadhyay (AMD) <[email protected]>1 parent a33ad03 commit 1bba390
1 file changed
+2
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1146 | 1146 | | |
1147 | 1147 | | |
1148 | 1148 | | |
1149 | | - | |
1150 | 1149 | | |
1151 | 1150 | | |
1152 | 1151 | | |
| |||
1156 | 1155 | | |
1157 | 1156 | | |
1158 | 1157 | | |
1159 | | - | |
| 1158 | + | |
1160 | 1159 | | |
1161 | 1160 | | |
1162 | 1161 | | |
| |||
1166 | 1165 | | |
1167 | 1166 | | |
1168 | 1167 | | |
1169 | | - | |
| 1168 | + | |
1170 | 1169 | | |
1171 | 1170 | | |
1172 | 1171 | | |
| |||
0 commit comments