From: Logan Gunthorpe <logang@deltatee.com>
To: Chengfeng Ye <dg573847474@gmail.com>
Cc: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
vkoul@kernel.org, Yunbo Yu <yuyunbo519@gmail.com>,
dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dmaengine: plx_dma: Fix potential deadlock on &plxdev->ring_lock
Date: Thu, 27 Jul 2023 09:31:12 -0600 [thread overview]
Message-ID: <bc09cdb8-f349-0eae-8624-457d85d768d4@deltatee.com> (raw)
In-Reply-To: <CAAo+4rW_rTsY=TpxZwO8yHB5gFkRKyTvy6kQ-eeiY0vg4+fuYg@mail.gmail.com>
On 7/27/23 00:48, Chengfeng Ye wrote:
> Hi Logan and Christophe,
>
> Thanks much for the reply and reminder, and yes, spin_lock_bh() should
> be better.
>
> When I wrote the patch I thought the spin_lock_bh() cannot be nested,
> and afraid that if some outside callers called .dma_tx_status() callback
> with softirq already disable, then spin_unlock_bh() would unintentionally
> re-enable softirq(). spin_lock_irqsave() is always safer in general thus I
> used it.
>
> But I just check the document [1] about these API and found that _bh()
> can be nested. Then use spin_lock_bh() should be better due to
> performance concern.
>
>
>> So perhaps we should just revert 1d05a0bdb420?
> Then for this one I think revert 1d05a0bdb420 should be enough. May I
> ask to revert that patch, should I do anything further? (like sending
> a new patch).
Yes, I think you can just send a revert patch explaining the reasoning
further in a commit message.
Thanks,
Logan
next prev parent reply other threads:[~2023-07-27 15:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-26 10:48 Chengfeng Ye
2023-07-26 10:58 ` Chengfeng Ye
2023-07-26 15:57 ` Logan Gunthorpe
2023-07-26 21:00 ` Christophe JAILLET
2023-07-26 21:10 ` Logan Gunthorpe
2023-07-27 6:48 ` Chengfeng Ye
2023-07-27 9:45 ` Eric Schwarz
2023-07-27 14:34 ` Chengfeng Ye
2023-07-27 15:31 ` Logan Gunthorpe [this message]
2023-07-29 18:01 ` Chengfeng Ye
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=bc09cdb8-f349-0eae-8624-457d85d768d4@deltatee.com \
--to=logang@deltatee.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=dg573847474@gmail.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vkoul@kernel.org \
--cc=yuyunbo519@gmail.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
all inboxes | Powered by JetHome®