Commit 6ffe8c7
uprobes: simplify xol_take_insn_slot() and its caller
The do / while (slot_nr >= UINSNS_PER_PAGE) loop in xol_take_insn_slot()
makes no sense, the checked condition is always true. Change this code
to use the "for (;;)" loop, this way we do not need to change slot_nr if
test_and_set_bit() fails.
Also, kill the unnecessary xol_vaddr != NULL check in xol_get_insn_slot(),
xol_take_insn_slot() never returns NULL.
Signed-off-by: Oleg Nesterov <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Link: https://lore.kernel.org/r/[email protected]1 parent 430af82 commit 6ffe8c7
1 file changed
+4
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1628 | 1628 | | |
1629 | 1629 | | |
1630 | 1630 | | |
1631 | | - | |
1632 | | - | |
| 1631 | + | |
1633 | 1632 | | |
1634 | | - | |
| 1633 | + | |
1635 | 1634 | | |
1636 | 1635 | | |
1637 | 1636 | | |
1638 | 1637 | | |
1639 | | - | |
1640 | | - | |
1641 | 1638 | | |
1642 | 1639 | | |
1643 | 1640 | | |
1644 | | - | |
| 1641 | + | |
1645 | 1642 | | |
1646 | | - | |
1647 | 1643 | | |
1648 | | - | |
1649 | | - | |
| 1644 | + | |
1650 | 1645 | | |
1651 | 1646 | | |
1652 | 1647 | | |
| |||
1663 | 1658 | | |
1664 | 1659 | | |
1665 | 1660 | | |
1666 | | - | |
1667 | | - | |
1668 | | - | |
1669 | 1661 | | |
1670 | 1662 | | |
1671 | | - | |
1672 | 1663 | | |
1673 | 1664 | | |
1674 | 1665 | | |
| |||
0 commit comments