Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp670057yba; Sat, 13 Apr 2019 10:26:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqzHEUdbqrcOcK12+gUWGlUKBmuaNezuTSFRkK8IeR9fUGnHUSjA7H/OdDYmaA5iybz0t/05 X-Received: by 2002:a63:1548:: with SMTP id 8mr56587901pgv.277.1555176374052; Sat, 13 Apr 2019 10:26:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555176374; cv=none; d=google.com; s=arc-20160816; b=sX/y9D9UUQU2bVGDfS2u+79LjXrRFQ0yiG7kYm9zrN/CMzlHVEK6UYUgDqfCzyCMmR ekkHsN9OTZtr/hWV5hR9oZcrXb5s4L7HOVK5ivIlyIFOtTgdNAa5PNQS45wW0WbFwPOC Zd9YRgFShuIG7Do6Ui41AnHl0/WUgwmRAwA6r0Hfb/PY9JRM3s4L0HDTnssAx3NYlL/d Gth8yKfw+Qz0YA+kt/aO1f2m73rDFg183o7du8ZkwML0Uxf2XYHkBJHjvw6Z6vBgPhfw gduVkWYX9nSvxCw36XqmMTT1QMdpj30FqRWV3mEJt6eopF3qVKKYVTIjFZbDKiWRg06c HApg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :date:in-reply-to:references:message-id:cc:to:subject:from :dkim-signature:dkim-signature; bh=xGZrTYz6TLSvmvz29N6wq5H2asSjQwMgO6zBIVD6hNM=; b=C0JjuQDxWekcJZhsFJn7U+Hf+1JG3s20AJbwp0FjTtPAOaWytyiKLV8RAhjSHczvge K5IpQyHhO1mj7qJN16/FhKcunNcOaNGjR00ekbhMmE/BAQUt6jdRMl4d2jhMAmflDPSh /de2yuhl/eZU7DLNOGjpTAFwfbJl8FU62HTFZajzqArOaMlPLUR/8/hsaVv8fDxuOhe1 ox/p2VuYIN4Q82FR6LKb4IFuS3SaZQFoQtF4ablI6PTypf3lZuxxJxTdOZ8J1T3FGsuQ W4sboWuIkml10R9fJ4ihLJNRiGT1X9DuTKH36PEjV2Ecg7BGZ8mLXGjH82s9couZlIKN RF8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nexedi.com header.s=mandrill header.b=hb+JmiKv; dkim=pass header.i=@mandrillapp.com header.s=mandrill header.b=WZEzwXqE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 44si25983781plc.134.2019.04.13.10.25.58; Sat, 13 Apr 2019 10:26:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nexedi.com header.s=mandrill header.b=hb+JmiKv; dkim=pass header.i=@mandrillapp.com header.s=mandrill header.b=WZEzwXqE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728674AbfDMRYv (ORCPT + 99 others); Sat, 13 Apr 2019 13:24:51 -0400 Received: from mail18.wdc04.mandrillapp.com ([205.201.139.18]:4245 "EHLO mail18.wdc04.mandrillapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728660AbfDMRYt (ORCPT ); Sat, 13 Apr 2019 13:24:49 -0400 X-Greylist: delayed 905 seconds by postgrey-1.27 at vger.kernel.org; Sat, 13 Apr 2019 13:24:48 EDT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=mandrill; d=nexedi.com; h=From:Subject:To:Cc:Message-Id:References:In-Reply-To:Date:MIME-Version:Content-Type:Content-Transfer-Encoding; i=kirr@nexedi.com; bh=xGZrTYz6TLSvmvz29N6wq5H2asSjQwMgO6zBIVD6hNM=; b=hb+JmiKv5KZdNWZL94U4wAxILt/fTaM377m4sX9X3b7bW+xc4OsCwQoIZR7AnlTr9bUPLu81PbWt ZHqCypByVv/jN8iYCNh8WnMDWFVv2VSKL+oQxg8FwzfiDqjNqU/SkCfC2tR35lIVfPvDl09EmXce /hIdClUvlBNLNQqK3Ak= Received: from pmta08.mandrill.prod.suw01.rsglab.com (127.0.0.1) by mail18.wdc04.mandrillapp.com id hm8dm01jvmgv for ; Sat, 13 Apr 2019 17:01:00 +0000 (envelope-from ) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandrillapp.com; i=@mandrillapp.com; q=dns/txt; s=mandrill; t=1555174860; h=From : Subject : To : Cc : Message-Id : References : In-Reply-To : Date : MIME-Version : Content-Type : Content-Transfer-Encoding : From : Subject : Date : X-Mandrill-User : List-Unsubscribe; bh=xGZrTYz6TLSvmvz29N6wq5H2asSjQwMgO6zBIVD6hNM=; b=WZEzwXqESmNCNoApFpwdNIxnRggE7oCWhQ9r3vxSLQisGqUWjOT55s5diX2Ylq6wNacauP oINZ2dMCMLMy8movoHD0Ms4uOG0wWZG2viwsvAaHHI/Wo+K1mVW9+pErI1i6jDE5nTslQ73k G+URIkvDVPa7/jc7ytyx1SEoqwj3E= From: Kirill Smelkov Subject: Re: [PATCH] pci/switchtec: fix stream_open.cocci warnings (fwd) Received: from [87.98.221.171] by mandrillapp.com id 5e827bb363bd4698a09627fe436bcf3d; Sat, 13 Apr 2019 17:01:00 +0000 To: Julia Lawall Cc: Sebastian Andrzej Siewior , , Kurt Schwemmer , Logan Gunthorpe , Bjorn Helgaas , , Message-Id: <20190413170056.GA11293@deco.navytux.spb.ru> References: In-Reply-To: X-Report-Abuse: Please forward a copy of this message, including all headers, to abuse@mandrill.com X-Report-Abuse: You can also report abuse here: http://mandrillapp.com/contact/abuse?id=31050260.5e827bb363bd4698a09627fe436bcf3d X-Mandrill-User: md_31050260 Date: Sat, 13 Apr 2019 17:01:00 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > To: kbuild@01.org > Cc: Julia Lawall > Subject: [PATCH] pci/switchtec: fix stream_open.cocci warnings > > CC: kbuild-all@01.org > TO: Sebastian Andrzej Siewior > CC: Kurt Schwemmer > CC: Logan Gunthorpe > CC: Bjorn Helgaas > CC: linux-pci@vger.kernel.org > CC: linux-kernel@vger.kernel.org > > From: kbuild test robot > > 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 > --- > > 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);