From: Kirill Smelkov <kirr@nexedi.com>
To: Julia Lawall <julia.lawall@lip6.fr>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
<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: Sat, 13 Apr 2019 17:01:00 +0000 [thread overview]
Message-ID: <20190413170056.GA11293@deco.navytux.spb.ru> (raw)
In-Reply-To: <alpine.DEB.2.21.1904131849350.2536@hadrien>
Hello everyone,
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.
I can handle pci/switchtec switching via big nonseekable_open ->
stream_open change at next merge window, or, alternatively please feel
free to switch pci/switchtec now on its own. The change is correct - I
was manually reviewing all changes that stream_open.cocci produces and
pci/switchtec was there.
Kirill
> julia
>
> ---------- Forwarded message ----------
> Date: Sat, 13 Apr 2019 11:22:51 +0800
> From: kbuild test robot <lkp@intel.com>
> To: kbuild@01.org
> Cc: Julia Lawall <julia.lawall@lip6.fr>
> Subject: [PATCH] pci/switchtec: fix stream_open.cocci warnings
>
> CC: kbuild-all@01.org
> TO: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> CC: Kurt Schwemmer <kurt.schwemmer@microsemi.com>
> CC: Logan Gunthorpe <logang@deltatee.com>
> CC: Bjorn Helgaas <helgaas@kernel.org>
> CC: linux-pci@vger.kernel.org
> CC: linux-kernel@vger.kernel.org
>
> From: kbuild test robot <lkp@intel.com>
>
> drivers/pci/switch/switchtec.c:395:1-17: ERROR: switchtec_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.
>
> Generated by: scripts/coccinelle/api/stream_open.cocci
>
> Fixes: 8a29a3bae2a2 ("pci/switchtec: Don't use completion's wait queue")
> Signed-off-by: kbuild test robot <lkp@intel.com>
> ---
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git linux-5.0.y-rt-rebase
> head: 794c294ae4483c240429c25a0d18e272e92c94de
> commit: 8a29a3bae2a2dfb0116cd8791d9700515d6e765e [154/311] pci/switchtec: Don't use completion's wait queue
> :::::: branch date: 7 hours ago
> :::::: commit date: 7 hours ago
>
> Please take the patch only if it's a positive warning. Thanks!
>
> switchtec.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/drivers/pci/switch/switchtec.c
> +++ b/drivers/pci/switch/switchtec.c
> @@ -392,7 +392,7 @@ static int switchtec_dev_open(struct ino
> return PTR_ERR(stuser);
>
> filp->private_data = stuser;
> - nonseekable_open(inode, filp);
> + stream_open(inode, filp);
>
> dev_dbg(&stdev->dev, "%s: %p\n", __func__, stuser);
next prev parent reply other threads:[~2019-04-13 17:24 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 [this message]
2019-04-15 14:38 ` Sebastian Andrzej Siewior
2019-04-15 14:55 ` Kirill Smelkov
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=20190413170056.GA11293@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®