Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1093732ybi; Wed, 19 Jun 2019 13:23:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqyAjddUG+lcMokkHqrA2L7/CzwsvJnyjUt2HInp7vRGGmPyU4R1mfSSQFQLYJV1IY82+LNn X-Received: by 2002:a17:902:26c:: with SMTP id 99mr124586998plc.215.1560975810061; Wed, 19 Jun 2019 13:23:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560975810; cv=none; d=google.com; s=arc-20160816; b=XR2eChI4QAb6Hy77uTA4SjDBOJe8R4XzCxF+lWj0I8nMceoVIXKFqSLTfEXlG8dGas G5c33WPVkxx++klGh3G4AGHAEb0U9bbGkz7dwEX+pjnuIGXX9MSHhQrzLgOnM+9IN/7C JE3p7YtC5J/a/+ifH8QZQe2HlPFWrxZAbqF2qEa2cBAAUT0CsqpCsWIyp+Xu9fXhrvOU UZVzEY4dtIdYaH8WRdVCDVANIU3oGxtIE9I6Gns+cV98DhgCmKLrZ3FOcld/TD/Badyi J+QhiILtJvRAAKbBd6q7ZEnp28GFF773ozLMfS6h+MllEMyK3Wp/+utjjtnSUYdEMkfp LFgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=qa8FHXYUn7TOo3tPCyjWd1wQOVgitSD9rFgw64On2RQ=; b=PUCNy/Tbt+ERHhixjG5lnmxcJ0/jm/e1/CD3gVehA8+kx40PzjROUjtKJ4V7dZWx8z ifVsDjkW/T7LzbhnxGJZFFzMMjJ0pDD6rQAOdnNRLlrJBKAVKGIf/Er4ZEMtba9OvhZw zf1GYpzszU4gv08hp0fUAX2V+2SaB41+jG6CkmFW3RAbgnRAoOCMbUoDao/fUkYFG/q7 UCeHRPyOkao2mniRB3bznoFAM/XSPI3J1iUeZ6SBTy/FfjnB//An1Gr0vAvsBdH3Xkgn a5Jd+C36D+lbt7w6mEdmHSnxSXYlWRODdn5Ib3elKgaA5Km3274DnrMBv8x+MlEsLMKp 3bNg== ARC-Authentication-Results: i=1; mx.google.com; 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 b96si7621146pjc.0.2019.06.19.13.23.14; Wed, 19 Jun 2019 13:23:30 -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; 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 S1730196AbfFSUWF (ORCPT + 99 others); Wed, 19 Jun 2019 16:22:05 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:64834 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726143AbfFSUWF (ORCPT ); Wed, 19 Jun 2019 16:22:05 -0400 X-IronPort-AV: E=Sophos;i="5.63,394,1557180000"; d="scan'208";a="309906047" Received: from abo-12-105-68.mrs.modulonet.fr (HELO hadrien) ([85.68.105.12]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Jun 2019 22:22:00 +0200 Date: Wed, 19 Jun 2019 22:21:59 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Bjorn Helgaas cc: Kirill Smelkov , Sebastian Andrzej Siewior , Kurt Schwemmer , Logan Gunthorpe , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, kbuild-all@01.org Subject: Re: [PATCH] pci/switchtec: fix stream_open.cocci warnings (fwd) In-Reply-To: <20190619201859.GA197717@google.com> Message-ID: References: <20190619162713.GA19859@deco.navytux.spb.ru> <20190619201859.GA197717@google.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 19 Jun 2019, Bjorn Helgaas wrote: > On Wed, Jun 19, 2019 at 04:27:52PM +0000, Kirill Smelkov wrote: > > Hi Julia, everyone. > > > > On Wed, Jun 19, 2019 at 12:28:47PM +0200, Julia Lawall wrote: > > > Hi, > > > > > > Can you forward this patch to the people below if you think it is > > > appropriate? > > > > Yes, this patch is appropriate. It was actually part of > > git.kernel.org/linus/c5bf68fe0c86 . It should be safe, (and desirable as > > it removes a chance for deadlock) to apply it. > > > > Sebastian, Kurt, Logan, Bjorn, please consider picking it up. > > I don't get it. This appeared in v5.2-rc1 as c5bf68fe0c86 ("*: convert > stream-like files from nonseekable_open -> stream_open"), so it looks like > this is already done. What would you like me to do with it? Somehow 0-day got a hold of it... If there is nothing to do, just ignore it. thanks, julia > > > > Could I tell the kbuild people to add you to the CC list for > > > this semantic patch? > > > > Yes, sure. Please feel free to add me to CC list for stream_open.cocci > > related patches. > > > > Kirill > > > > > > > thanks, > > > julia > > > > > > ---------- Forwarded message ---------- > > > Date: Wed, 19 Jun 2019 18:23:18 +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: a3a1e895d4fa ("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: 31cc76d5590f5e60c2f26f029e40bc7d0441d93f > > > commit: a3a1e895d4fa0508e11ac9107ace883a5b2a4d3b [171/305] pci/switchtec: Don't use completion's wait queue > > > :::::: branch date: 6 days ago > > > :::::: commit date: 6 days 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); > > > >