Commit 3f77c3d
pds_core: make wait_context part of q_info
Make the wait_context a full part of the q_info struct rather
than a stack variable that goes away after pdsc_adminq_post()
is done so that the context is still available after the wait
loop has given up.
There was a case where a slow development firmware caused
the adminq request to time out, but then later the FW finally
finished the request and sent the interrupt. The handler tried
to complete_all() the completion context that had been created
on the stack in pdsc_adminq_post() but no longer existed.
This caused bad pointer usage, kernel crashes, and much wailing
and gnashing of teeth.
Fixes: 01ba61b ("pds_core: Add adminq processing and commands")
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://patch.msgid.link/20250421174606.3892-5-shannon.nelson@amd.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent f9559d8 commit 3f77c3d
3 files changed
Lines changed: 18 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | 8 | | |
14 | 9 | | |
15 | 10 | | |
| |||
109 | 104 | | |
110 | 105 | | |
111 | 106 | | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
116 | 111 | | |
117 | 112 | | |
118 | 113 | | |
| |||
162 | 157 | | |
163 | 158 | | |
164 | 159 | | |
165 | | - | |
166 | | - | |
| 160 | + | |
167 | 161 | | |
168 | 162 | | |
169 | 163 | | |
| |||
205 | 199 | | |
206 | 200 | | |
207 | 201 | | |
208 | | - | |
209 | 202 | | |
210 | 203 | | |
| 204 | + | |
211 | 205 | | |
212 | 206 | | |
213 | 207 | | |
| |||
231 | 225 | | |
232 | 226 | | |
233 | 227 | | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | 228 | | |
239 | 229 | | |
240 | 230 | | |
241 | 231 | | |
242 | 232 | | |
243 | 233 | | |
| 234 | + | |
244 | 235 | | |
245 | 236 | | |
246 | 237 | | |
| |||
250 | 241 | | |
251 | 242 | | |
252 | 243 | | |
253 | | - | |
254 | | - | |
| 244 | + | |
255 | 245 | | |
256 | 246 | | |
257 | 247 | | |
258 | 248 | | |
259 | 249 | | |
| 250 | + | |
260 | 251 | | |
261 | 252 | | |
262 | 253 | | |
263 | 254 | | |
264 | 255 | | |
265 | | - | |
266 | | - | |
| 256 | + | |
267 | 257 | | |
268 | 258 | | |
269 | 259 | | |
| |||
292 | 282 | | |
293 | 283 | | |
294 | 284 | | |
295 | | - | |
296 | | - | |
| 285 | + | |
| 286 | + | |
297 | 287 | | |
| 288 | + | |
| 289 | + | |
298 | 290 | | |
299 | 291 | | |
300 | 292 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | | - | |
| 170 | + | |
171 | 171 | | |
| 172 | + | |
| 173 | + | |
172 | 174 | | |
173 | 175 | | |
174 | 176 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| |||
0 commit comments