Repository navigation
Commit 9abefcb
can: dev: fix deadlock reported after bus-off
A timer was used to restart after the bus-off state, leading to a
relatively large can_restart() executed in an interrupt context,
which in turn sets up pinctrl. When this happens during system boot,
there is a high probability of grabbing the pinctrl_list_mutex,
which is locked already by the probe() of other device, making the
kernel suspect a deadlock condition [1].
To resolve this issue, the restart_timer is replaced by a delayed
work.
[1] victronenergy/venus#24
Signed-off-by: Sergei Miroshnichenko <sergeimir@emcraft.com>
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>1 parent 7e32b44 commit 9abefcb
2 files changed
Lines changed: 19 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
501 | 502 | | |
502 | 503 | | |
503 | 504 | | |
504 | | - | |
| 505 | + | |
505 | 506 | | |
506 | | - | |
507 | 507 | | |
508 | 508 | | |
509 | 509 | | |
| |||
543 | 543 | | |
544 | 544 | | |
545 | 545 | | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
546 | 554 | | |
547 | 555 | | |
548 | 556 | | |
| |||
556 | 564 | | |
557 | 565 | | |
558 | 566 | | |
559 | | - | |
560 | | - | |
| 567 | + | |
| 568 | + | |
561 | 569 | | |
562 | 570 | | |
563 | 571 | | |
| |||
578 | 586 | | |
579 | 587 | | |
580 | 588 | | |
581 | | - | |
582 | | - | |
| 589 | + | |
| 590 | + | |
583 | 591 | | |
584 | 592 | | |
585 | 593 | | |
| |||
688 | 696 | | |
689 | 697 | | |
690 | 698 | | |
| 699 | + | |
691 | 700 | | |
692 | 701 | | |
693 | 702 | | |
| |||
697 | 706 | | |
698 | 707 | | |
699 | 708 | | |
700 | | - | |
| 709 | + | |
701 | 710 | | |
702 | 711 | | |
703 | 712 | | |
| |||
778 | 787 | | |
779 | 788 | | |
780 | 789 | | |
781 | | - | |
782 | | - | |
783 | 790 | | |
784 | 791 | | |
785 | 792 | | |
| |||
794 | 801 | | |
795 | 802 | | |
796 | 803 | | |
797 | | - | |
| 804 | + | |
798 | 805 | | |
799 | 806 | | |
800 | 807 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
50 | | - | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| |||
0 commit comments