Commit b2250b4
alinux: sched: Fix per-cgroup idle accounting deadlock
fix #29692432
seqcount assumes that writers are already exclusive, so it saves extra
locking. However this critial section protected by idle_seqcount can
be entered twice if an interrupt tries to wake up a task on this cpu.
Once race caused by interrupt is avoided, writers are exclusive. So
seqlock is unnecessary, and local_irq_save + seqcount is enough.
Fixes: 61e5885 ("alinux: sched: Introduce per-cgroup idle accounting")
Signed-off-by: Yihao Wu <wuyihao@linux.alibaba.com>
Acked-by: Shanpei Chen <shanpeic@linux.alibaba.com>1 parent e0b245f commit b2250b4
1 file changed
Lines changed: 12 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
599 | 599 | | |
600 | 600 | | |
601 | 601 | | |
| 602 | + | |
| 603 | + | |
602 | 604 | | |
603 | 605 | | |
604 | 606 | | |
605 | 607 | | |
606 | | - | |
| 608 | + | |
607 | 609 | | |
608 | 610 | | |
609 | | - | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
610 | 614 | | |
611 | 615 | | |
612 | 616 | | |
| |||
620 | 624 | | |
621 | 625 | | |
622 | 626 | | |
| 627 | + | |
| 628 | + | |
623 | 629 | | |
624 | 630 | | |
625 | 631 | | |
626 | 632 | | |
627 | 633 | | |
628 | 634 | | |
629 | | - | |
| 635 | + | |
630 | 636 | | |
631 | 637 | | |
632 | 638 | | |
633 | 639 | | |
634 | 640 | | |
635 | | - | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
636 | 644 | | |
637 | 645 | | |
638 | 646 | | |
| |||
0 commit comments