Commit 83c9030
bpf: Simplify bpf_timer_cancel()
Remove lock from the bpf_timer_cancel() helper. The lock does not
protect from concurrent modification of the bpf_async_cb data fields as
those are modified in the callback without locking.
Use guard(rcu)() instead of pair of explicit lock()/unlock().
Acked-by: Kumar Kartikeya Dwivedi <[email protected]>
Acked-by: Andrii Nakryiko <[email protected]>
Signed-off-by: Mykyta Yatsenko <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexei Starovoitov <[email protected]>1 parent 8bb1e32 commit 83c9030
1 file changed
+11
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1471 | 1471 | | |
1472 | 1472 | | |
1473 | 1473 | | |
1474 | | - | |
| 1474 | + | |
1475 | 1475 | | |
1476 | 1476 | | |
1477 | 1477 | | |
1478 | 1478 | | |
1479 | 1479 | | |
1480 | 1480 | | |
1481 | 1481 | | |
1482 | | - | |
1483 | | - | |
1484 | | - | |
1485 | | - | |
1486 | | - | |
1487 | | - | |
1488 | | - | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
1489 | 1488 | | |
1490 | 1489 | | |
1491 | 1490 | | |
1492 | 1491 | | |
1493 | 1492 | | |
1494 | 1493 | | |
1495 | 1494 | | |
1496 | | - | |
1497 | | - | |
| 1495 | + | |
1498 | 1496 | | |
1499 | 1497 | | |
1500 | 1498 | | |
| |||
1517 | 1515 | | |
1518 | 1516 | | |
1519 | 1517 | | |
1520 | | - | |
1521 | | - | |
| 1518 | + | |
| 1519 | + | |
1522 | 1520 | | |
1523 | 1521 | | |
1524 | 1522 | | |
1525 | | - | |
1526 | | - | |
1527 | 1523 | | |
1528 | 1524 | | |
1529 | 1525 | | |
1530 | | - | |
| 1526 | + | |
1531 | 1527 | | |
1532 | 1528 | | |
1533 | | - | |
1534 | 1529 | | |
1535 | 1530 | | |
1536 | 1531 | | |
| |||
0 commit comments