From: "Allen Hubbe" <Allen.Hubbe@dell.com>
To: 'Jia-Ju Bai' <baijiaju1990@163.com>,
jdmason@kudzu.us, dave.jiang@intel.com
Cc: linux-ntb@googlegroups.com, 'LKML' <linux-kernel@vger.kernel.org>
Subject: RE: [BUG] ntb: Sleep in interrupt handling
Date: Thu, 1 Jun 2017 09:00:32 -0400 [thread overview]
Message-ID: <000001d2dad7$0e4eba30$2aec2e90$@dell.com> (raw)
In-Reply-To: <592FDBC4.9000406@163.com>
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
WARNING: multiple messages have this Message-ID (diff)
From: "Allen Hubbe" <Allen.Hubbe@dell.com>
To: "'Jia-Ju Bai'" <baijiaju1990@163.com>, <jdmason@kudzu.us>,
<dave.jiang@intel.com>
Cc: <linux-ntb@googlegroups.com>, "'LKML'" <linux-kernel@vger.kernel.org>
Subject: RE: [BUG] ntb: Sleep in interrupt handling
Date: Thu, 1 Jun 2017 09:00:32 -0400 [thread overview]
Message-ID: <000001d2dad7$0e4eba30$2aec2e90$@dell.com> (raw)
In-Reply-To: <592FDBC4.9000406@163.com>
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
next prev parent reply other threads:[~2017-06-01 13:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-01 9:17 [BUG] ntb: Sleep in interrupt handling Jia-Ju Bai
2017-06-01 13:00 ` Allen Hubbe [this message]
2017-06-01 13:00 ` Allen Hubbe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='000001d2dad7$0e4eba30$2aec2e90$@dell.com' \
--to=allen.hubbe@dell.com \
--cc=baijiaju1990@163.com \
--cc=dave.jiang@intel.com \
--cc=jdmason@kudzu.us \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-ntb@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.