Commit 4bfee93
Desnes Nunes
usb: typec: fusb302: fix scheduling while atomic when using virtio-gpio
JIRA: https://issues.redhat.com/browse/RHEL-122021
Conflicts:
* Avoiding 3646730 ("usb: typec: tcpm/fusb302: Convert to i2c's
.probe_new()") that changes the parameters of fusb302_probe() function.
The probe_new function pointer was purged completely upstream.
commit 1c2d81b
Author: Yongbo Zhang <giraffesnn123@gmail.com>
Date: Mon, 26 May 2025 12:34:33 +0800
When the gpio irqchip connected to a slow bus(e.g., i2c bus or virtio
bus), calling disable_irq_nosync() in top-half ISR handler will trigger
the following kernel BUG:
BUG: scheduling while atomic: RenderEngine/253/0x00010002
...
Call trace:
dump_backtrace+0x0/0x1c8
show_stack+0x1c/0x2c
dump_stack_lvl+0xdc/0x12c
dump_stack+0x1c/0x64
__schedule_bug+0x64/0x80
schedule_debug+0x98/0x118
__schedule+0x68/0x704
schedule+0xa0/0xe8
schedule_timeout+0x38/0x124
wait_for_common+0xa4/0x134
wait_for_completion+0x1c/0x2c
_virtio_gpio_req+0xf8/0x198
virtio_gpio_irq_bus_sync_unlock+0x94/0xf0
__irq_put_desc_unlock+0x50/0x54
disable_irq_nosync+0x64/0x94
fusb302_irq_intn+0x24/0x84
__handle_irq_event_percpu+0x84/0x278
handle_irq_event+0x64/0x14c
handle_level_irq+0x134/0x1d4
generic_handle_domain_irq+0x40/0x68
virtio_gpio_event_vq+0xb0/0x130
vring_interrupt+0x7c/0x90
vm_interrupt+0x88/0xd8
__handle_irq_event_percpu+0x84/0x278
handle_irq_event+0x64/0x14c
handle_fasteoi_irq+0x110/0x210
__handle_domain_irq+0x80/0xd0
gic_handle_irq+0x78/0x154
el0_irq_naked+0x60/0x6c
This patch replaces request_irq() with devm_request_threaded_irq() to
avoid the use of disable_irq_nosync().
Signed-off-by: Yongbo Zhang <giraffesnn123@gmail.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20250526043433.673097-1-giraffesnn123@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Desnes Nunes <desnesn@redhat.com>1 parent 7dca038 commit 4bfee93
1 file changed
+4
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1477 | 1477 | | |
1478 | 1478 | | |
1479 | 1479 | | |
1480 | | - | |
1481 | | - | |
1482 | | - | |
1483 | 1480 | | |
1484 | 1481 | | |
1485 | 1482 | | |
| |||
1622 | 1619 | | |
1623 | 1620 | | |
1624 | 1621 | | |
1625 | | - | |
1626 | 1622 | | |
1627 | 1623 | | |
1628 | 1624 | | |
| |||
1748 | 1744 | | |
1749 | 1745 | | |
1750 | 1746 | | |
1751 | | - | |
1752 | | - | |
1753 | | - | |
| 1747 | + | |
| 1748 | + | |
| 1749 | + | |
| 1750 | + | |
1754 | 1751 | | |
1755 | 1752 | | |
1756 | 1753 | | |
| |||
1775 | 1772 | | |
1776 | 1773 | | |
1777 | 1774 | | |
1778 | | - | |
1779 | 1775 | | |
1780 | 1776 | | |
1781 | 1777 | | |
| |||
0 commit comments