Commit 4e06c33
firmware: qcom: scm: request the waitqueue irq *after* initializing SCM
commit 7ab36b5 upstream.
There's a subtle race in the SCM driver: we assign the __scm pointer
before requesting the waitqueue interrupt. Assigning __scm marks the SCM
API as ready to accept calls. It's possible that a user makes a call
right after we set __scm and the firmware raises an interrupt before the
driver's ready to service it. Move the __scm assignment after we request
the interrupt.
This has the added benefit of allowing us to drop the goto label.
Reviewed-by: Konrad Dybcio <[email protected]>
Signed-off-by: Bartosz Golaszewski <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Bjorn Andersson <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent bcd1479 commit 4e06c33
1 file changed
Lines changed: 14 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2276 | 2276 | | |
2277 | 2277 | | |
2278 | 2278 | | |
| 2279 | + | |
| 2280 | + | |
| 2281 | + | |
| 2282 | + | |
| 2283 | + | |
| 2284 | + | |
| 2285 | + | |
| 2286 | + | |
| 2287 | + | |
| 2288 | + | |
| 2289 | + | |
| 2290 | + | |
2279 | 2291 | | |
2280 | 2292 | | |
2281 | 2293 | | |
2282 | 2294 | | |
2283 | | - | |
| 2295 | + | |
| 2296 | + | |
2284 | 2297 | | |
2285 | 2298 | | |
2286 | 2299 | | |
2287 | | - | |
2288 | | - | |
2289 | | - | |
2290 | | - | |
2291 | | - | |
2292 | | - | |
2293 | | - | |
2294 | | - | |
2295 | | - | |
2296 | | - | |
2297 | | - | |
2298 | | - | |
2299 | | - | |
2300 | | - | |
2301 | | - | |
2302 | 2300 | | |
2303 | 2301 | | |
2304 | 2302 | | |
| |||
2328 | 2326 | | |
2329 | 2327 | | |
2330 | 2328 | | |
2331 | | - | |
2332 | | - | |
2333 | | - | |
2334 | | - | |
2335 | | - | |
2336 | | - | |
2337 | 2329 | | |
2338 | 2330 | | |
2339 | 2331 | | |
| |||
0 commit comments