From: Eric Schwarz <eas@sw-optimization.com>
To: Chengfeng Ye <dg573847474@gmail.com>
Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
christophe.jaillet@wanadoo.fr, vkoul@kernel.org,
logang@deltatee.com
Subject: Re: [PATCH v2] dmaengine: plx_dma: Fix potential deadlock on &plxdev->ring_lock
Date: Tue, 29 Aug 2023 13:05:41 +0200 [thread overview]
Message-ID: <b3be5738-8c40-bb82-296f-aa401d1fc1df@sw-optimization.com> (raw)
In-Reply-To: <CAAo+4rWW67VSpdwo_dstqAb-FiKeoK3YmaNgiX7vXBerqEWBkA@mail.gmail.com>
Hello Chengfeng,
Am 29.08.2023 um 05:10 schrieb Chengfeng Ye:
> Hi Eric,
>
> Thank you for your interest in it.
Thanks for getting back to me.
> For a dynamic detection solution, then the answer is yes.
> Lockdep, which should be enabled by CONFIG_DEBUG_SPINLOCK,
> has the ability to detect such deadlocks. But the problem is that the detection
> requires input and exact thread interleaving to trigger the bug, otherwise
> the bugs would be buried and cannot be detected.
>
> For static analysis, I think the answer is no. Smatch, like other
> static deadlock detection algorithms in CBMC[1] and Infer[2], should be
> designed to reason thread interaction but not interrupts, which requires
> new algorithms that I am working on.
Will you publish your work later on e.g. on github?
Actually maybe it would even make sense to integrate your work into
scripts/checkpatch.pl of the Linux kernel (or the like).
Basically if a patch to be committed fails locking it should not be
committed anyway.
IMHO the quality standard one could expect from the code should always
be the same. So adding it to a mandatory check procedure (script which
must be executed before committing patches) and/or to "0-DAY CI Kernel
Test Service" [5] would definitely be worth a thought.
> Besides, may I ask a question that I have sent some patches[3][4] weeks
> ago, but have not yet got a reply. Would reviewers check the patches
> later or should I ping them again?
You never have a guarantee who will when review your patch on the
mailing list. It is kind of best effort based system mainly of volunteers.
Just give people a bit of time since it is currently also holiday time.
You may ping the maintainer of the subsystem when some time has passed
since he is responsible for the patches to be administered.
BTW, I think you already pinged indirectly w/ your e-mail.
> [1] http://www.cprover.org/deadlock-detection/
> [2] https://github.com/facebook/infer
> [3] https://lore.kernel.org/lkml/20230726062313.77121-1-dg573847474@gmail.com/
> [4] https://lore.kernel.org/lkml/20230726051727.64088-1-dg573847474@gmail.com/
[5] https://github.com/intel/lkp-tests/wiki
Cheers
Eric
prev parent reply other threads:[~2023-08-29 11:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-29 17:59 Chengfeng Ye
2023-07-30 23:50 ` Logan Gunthorpe
2023-08-28 16:18 ` Eric Schwarz
2023-08-29 3:10 ` Chengfeng Ye
2023-08-29 11:05 ` Eric Schwarz [this message]
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=b3be5738-8c40-bb82-296f-aa401d1fc1df@sw-optimization.com \
--to=eas@sw-optimization.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=dg573847474@gmail.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=logang@deltatee.com \
--cc=vkoul@kernel.org \
/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®