Commit fbec4e7
soc: fsl: qbman: Use raw spinlock for cgr_lock
smp_call_function always runs its callback in hard IRQ context, even on
PREEMPT_RT, where spinlocks can sleep. So we need to use a raw spinlock
for cgr_lock to ensure we aren't waiting on a sleeping task.
Although this bug has existed for a while, it was not apparent until
commit ef2a8d5 ("net: dpaa: Adjust queue depth on rate change")
which invokes smp_call_function_single via qman_update_cgr_safe every
time a link goes up or down.
Fixes: 96f413f ("soc/fsl/qbman: fix issue in qman_delete_cgr_safe()")
CC: stable@vger.kernel.org
Reported-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Closes: https://lore.kernel.org/all/20230323153935.nofnjucqjqnz34ej@skbuf/
Reported-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Closes: https://lore.kernel.org/linux-arm-kernel/87wmsyvclu.fsf@pengutronix.de/
Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
Reviewed-by: Camelia Groza <camelia.groza@nxp.com>
Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent 584c2a9 commit fbec4e7
1 file changed
Lines changed: 14 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
991 | 991 | | |
992 | 992 | | |
993 | 993 | | |
994 | | - | |
| 994 | + | |
995 | 995 | | |
996 | 996 | | |
997 | 997 | | |
| |||
1281 | 1281 | | |
1282 | 1282 | | |
1283 | 1283 | | |
1284 | | - | |
| 1284 | + | |
1285 | 1285 | | |
1286 | 1286 | | |
1287 | 1287 | | |
| |||
1456 | 1456 | | |
1457 | 1457 | | |
1458 | 1458 | | |
1459 | | - | |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
| 1462 | + | |
1460 | 1463 | | |
1461 | 1464 | | |
1462 | 1465 | | |
1463 | | - | |
| 1466 | + | |
1464 | 1467 | | |
1465 | 1468 | | |
1466 | 1469 | | |
| |||
1476 | 1479 | | |
1477 | 1480 | | |
1478 | 1481 | | |
1479 | | - | |
| 1482 | + | |
1480 | 1483 | | |
1481 | 1484 | | |
1482 | 1485 | | |
| |||
2440 | 2443 | | |
2441 | 2444 | | |
2442 | 2445 | | |
2443 | | - | |
| 2446 | + | |
2444 | 2447 | | |
2445 | 2448 | | |
2446 | 2449 | | |
| |||
2477 | 2480 | | |
2478 | 2481 | | |
2479 | 2482 | | |
2480 | | - | |
| 2483 | + | |
2481 | 2484 | | |
2482 | 2485 | | |
2483 | 2486 | | |
| |||
2512 | 2515 | | |
2513 | 2516 | | |
2514 | 2517 | | |
2515 | | - | |
| 2518 | + | |
2516 | 2519 | | |
2517 | 2520 | | |
2518 | 2521 | | |
| |||
2537 | 2540 | | |
2538 | 2541 | | |
2539 | 2542 | | |
2540 | | - | |
| 2543 | + | |
2541 | 2544 | | |
2542 | 2545 | | |
2543 | 2546 | | |
| |||
2577 | 2580 | | |
2578 | 2581 | | |
2579 | 2582 | | |
2580 | | - | |
| 2583 | + | |
2581 | 2584 | | |
2582 | | - | |
| 2585 | + | |
2583 | 2586 | | |
2584 | 2587 | | |
2585 | 2588 | | |
| |||
0 commit comments