From: Kirill Smelkov <kirr@nexedi.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Julia Lawall <julia.lawall@lip6.fr>, <kbuild-all@01.org>,
Kurt Schwemmer <kurt.schwemmer@microsemi.com>,
Logan Gunthorpe <logang@deltatee.com>,
Bjorn Helgaas <helgaas@kernel.org>, <linux-pci@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] pci/switchtec: fix stream_open.cocci warnings (fwd)
Date: Mon, 15 Apr 2019 14:55:03 +0000 [thread overview]
Message-ID: <20190415145456.GA15280@deco.navytux.spb.ru> (raw)
In-Reply-To: <20190415143857.kg2dbg3zxsxdktsi@linutronix.de>
Hi Sebastian,
On Mon, Apr 15, 2019 at 04:38:57PM +0200, Sebastian Andrzej Siewior wrote:
> On 2019-04-13 17:00:59 [+0000], Kirill Smelkov wrote:
> > Hello everyone,
> Hi,
>
> > On Sat, Apr 13, 2019 at 06:50:57PM +0200, Julia Lawall wrote:
> > > Hello,
> > >
> > > Kirill will explain about this issue.
> >
> > pci/switchtec switching to stream_open is already queued to merge
> > window and it was acked by Logan Gunthorpe:
> >
> > https://lore.kernel.org/lkml/CAHk-=wgqgN5j1ZWnyVLqqoyU=CCWTYOko3MDyU8L_5e21KvHAg@mail.gmail.com/
> > https://lab.nexedi.com/kirr/linux/commit/edaeb4101860
> >
> > ( there are too many Cc's in that patch and email with it and reply-all to
> > it did not get into mailing list probably due to being considered as spam )
> >
> > stream_open.cocci was issuing only warning for pci/switchtec, but after
> > 8a29a3bae2a2 ("pci/switchtec: Don't use completion's wait queue") they
> > started to use wait_even_* inside read method and, since
> > stream_open.cocci considers wait_event_* as blocking the warning became
> > error. Previously it was completions there, but I added support for wait
> > events only for simplicity.
>
> why is wait_event_interruptible() treated differently compared to
> wait_for_completion_interruptible()?
No particular reason. I just taught stream_open.cocci to consider
only "wait_event_*" as blocking:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/coccinelle/api/stream_open.cocci?h=v5.1-rc5#n35
based on original /proc/xen/xenbus deadlock:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/xen/xenbus/xenbus_dev_frontend.c?h=v5.1-rc5#n135
https://git.kernel.org/linus/581d21a2d02a
We can extend "a function that blocks" rule to cover other kernel
primitives.
For the reference: the deadlock scenario is described in
https://git.kernel.org/linus/10dce8af3422
Kirill
next prev parent reply other threads:[~2019-04-15 15:10 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-13 16:50 Julia Lawall
2019-04-13 16:56 ` Logan Gunthorpe
2019-04-13 17:01 ` Kirill Smelkov
2019-04-15 14:38 ` Sebastian Andrzej Siewior
2019-04-15 14:55 ` Kirill Smelkov [this message]
2019-04-15 15:20 ` Sebastian Andrzej Siewior
2019-04-15 15:41 ` Kirill Smelkov
2019-04-17 21:54 ` Bjorn Helgaas
2019-04-18 5:31 ` Julia Lawall
2019-04-18 10:38 ` Kirill Smelkov
2019-04-18 12:37 ` Bjorn Helgaas
2019-04-18 14:42 ` Kirill Smelkov
[not found] <alpine.DEB.2.20.1906191227430.3726@hadrien>
2019-06-19 16:27 ` Kirill Smelkov
2019-06-19 19:47 ` Logan Gunthorpe
2019-06-19 20:19 ` Bjorn Helgaas
2019-06-19 20:21 ` Julia Lawall
2019-06-20 7:01 ` kirr
2019-06-21 16:42 ` Sebastian Andrzej Siewior
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=20190415145456.GA15280@deco.navytux.spb.ru \
--to=kirr@nexedi.com \
--cc=bigeasy@linutronix.de \
--cc=helgaas@kernel.org \
--cc=julia.lawall@lip6.fr \
--cc=kbuild-all@01.org \
--cc=kurt.schwemmer@microsemi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=logang@deltatee.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®