Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1654956 > unrolled thread
| Started by | Jia-Ju Bai <baijiaju1990@163.com> |
|---|---|
| First post | 2017-06-01 11:20 +0200 |
| Last post | 2017-06-01 15:20 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[BUG] ntb: Sleep in interrupt handling Jia-Ju Bai <baijiaju1990@163.com> - 2017-06-01 11:20 +0200
RE: [BUG] ntb: Sleep in interrupt handling "Allen Hubbe" <Allen.Hubbe@dell.com> - 2017-06-01 15:20 +0200
| From | Jia-Ju Bai <baijiaju1990@163.com> |
|---|---|
| Date | 2017-06-01 11:20 +0200 |
| Subject | [BUG] ntb: Sleep in interrupt handling |
| Message-ID | <tNuqR-EJ-9@gated-at.bofh.it> |
According to ntb_transport.c, the driver may sleep in interrupt handling.
The function call path is:
ntb_transport_rxc_db (tasklet_init indicates it handles interrupt)
ntb_process_rxc
ntb_async_rx
ntb_async_rx_submit
schedule_timeout --> may sleep
This bug is found by my static analysis tool and my code review.
I hope to fix it, but I do not have a good solution.
Thanks,
Jia-Ju Bai
[toc] | [next] | [standalone]
| From | "Allen Hubbe" <Allen.Hubbe@dell.com> |
|---|---|
| Date | 2017-06-01 15:20 +0200 |
| Message-ID | <tNyb7-32h-5@gated-at.bofh.it> |
| In reply to | #1654956 |
From: Jia-Ju Bai > According to ntb_transport.c, the driver may sleep in interrupt handling. > The function call path is: > ntb_transport_rxc_db (tasklet_init indicates it handles interrupt) > ntb_process_rxc > ntb_async_rx > ntb_async_rx_submit > schedule_timeout --> may sleep > > This bug is found by my static analysis tool and my code review. > I hope to fix it, but I do not have a good solution. Thanks! There is a recovery path if ntb_async_tx_submit fails. It will do the transmission with memcpy instead of dma. So, rather than retry in ntb_async_tx_submit, just fail to the recovery path. Basically, replace the whole for(retries) loop with just txd = prep(); Would you like to work on the patch? > > Thanks, > Jia-Ju Bai
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web