From: Vinod Koul <vkoul@kernel.org>
To: dmaengine@vger.kernel.org, Rex Zhang <rex.zhang@intel.com>
Cc: dave.jiang@intel.com, fenghua.yu@intel.com
Subject: Re: [PATCH] dmaengine: idxd: Move dma_free_coherent() out of spinlocked context
Date: Thu, 21 Dec 2023 22:00:18 +0530 [thread overview]
Message-ID: <170317621828.683420.16623455086024041056.b4-ty@kernel.org> (raw)
In-Reply-To: <20231212022158.358619-2-rex.zhang@intel.com>
On Tue, 12 Dec 2023 10:21:58 +0800, Rex Zhang wrote:
> Task may be rescheduled within dma_free_coherent(). So dma_free_coherent()
> can't be called between spin_lock() and spin_unlock() to avoid Call Trace:
> Call Trace:
> <TASK>
> dump_stack_lvl+0x37/0x50
> __might_resched+0x16a/0x1c0
> vunmap+0x2c/0x70
> __iommu_dma_free+0x96/0x100
> idxd_device_evl_free+0xd5/0x100 [idxd]
> device_release_driver_internal+0x197/0x200
> unbind_store+0xa1/0xb0
> kernfs_fop_write_iter+0x120/0x1c0
> vfs_write+0x2d3/0x400
> ksys_write+0x63/0xe0
> do_syscall_64+0x44/0xa0
> entry_SYSCALL_64_after_hwframe+0x6e/0xd8
> Move it out of the context.
>
> [...]
Applied, thanks!
[1/1] dmaengine: idxd: Move dma_free_coherent() out of spinlocked context
commit: e271c0ba3f919c48e90c64b703538fbb7865cb63
Best regards,
--
~Vinod
next prev parent reply other threads:[~2023-12-21 16:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-12 2:21 [PATCH] dmaengine: idxd: Move dma_free_coherent() out of spinlocked context Rex Zhang
2023-12-12 2:21 ` Rex Zhang
2023-12-21 16:30 ` Vinod Koul [this message]
2023-12-12 15:37 ` Lijun Pan
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=170317621828.683420.16623455086024041056.b4-ty@kernel.org \
--to=vkoul@kernel.org \
--cc=dave.jiang@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=fenghua.yu@intel.com \
--cc=rex.zhang@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox