Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1091101ybi; Wed, 19 Jun 2019 13:20:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqxwAwa/2PMGayHW8si88+v0/BZ2S5RETa3LaQk4WXD+6n5n1A6S6W9xTF9RUTLtmktqf42x X-Received: by 2002:a63:1516:: with SMTP id v22mr9641506pgl.204.1560975613212; Wed, 19 Jun 2019 13:20:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560975613; cv=none; d=google.com; s=arc-20160816; b=qRXr6ApPgYIALKIuySAKp3LxX0WQbryWT9yenhQSNUYzvfPBerrDhAEsmY1YpZxnCv SuvSn75ReoiKWMfh7LzqkqFnddLstf+WXW9xQsYI/4TKtkreqDGQ8Q9u7WIFLa6yONMd jOBrmESskeLwy/Pi/o0498FcdReyXm6RdNuWKCHG3gZs25CHhYwOVoMPR21MguqlFAgh hE8YdopxbLOhUUr5hEzImijTCJ3+1i/34k49odm1NBFUNlEzfOFLHXAMiEc2Rnvk5DJ1 ZHcmcXOMIdhPm6MQWA1l+BXKPau4ZSLiSq+OmsqmvIqwqodu9AVBcxLLJJcPapypVW7c rhww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=n4o9KHjteD0X7vZVgJ2oF1E0UsD9yipbTpV2ud7BvPU=; b=iZpwMP+D3maqOorm1aBm1WPuh+Ge00s7RNfwY14xjf928e2Z7RKLnhOpzq9PJ5QNkE 356IFO37wx8SE2qCF5GrGTxoEqBf7gmxvolzEKkhHdoSHtuR4AiW+z3ThDZAVrKCzZn8 aMOY2QkUdJDXVv9IpnZ6CcRBjc115+H4Y1qGhQly6i9l93I/YMpivxth0ezOEGqoLk0x YANhEIy9uk2Jzx9rq0p3shc9Zko3RlrNC/w7wv+JoB2735HqSW+N/k125yXIF9aKPvzb lUxkSZiQ2CE5fBL5XZz8rC0UT1Iki9YfJiOMj7uHHJeLHo2RMU7k23xRRUGiJ/R2r/Jl C+sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hNed1zLU; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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.19.57; Wed, 19 Jun 2019 13:20:13 -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=@kernel.org header.s=default header.b=hNed1zLU; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730314AbfFSUTD (ORCPT + 99 others); Wed, 19 Jun 2019 16:19:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:33998 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726143AbfFSUTC (ORCPT ); Wed, 19 Jun 2019 16:19:02 -0400 Received: from localhost (unknown [69.71.4.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C2631214AF; Wed, 19 Jun 2019 20:19:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560975542; bh=80B2TtmwQpbrKV8W76fkvhLKo/iXWe4+FylQEUWo+Pk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hNed1zLU1lLuRKIsDPHhY7BXxwO8StzG5o+6G+NVAEfP+5d2oSUAzuQFKWF+3D2s9 PgywgPAFis+wlH/fKBtGzqay1BoJxujVFMgst/6fr+NqknMqV0URAEC65ibwccp6Y/ XN2aZ15al23nObRm/YUyZmUKlE4G97GI66Rvn6JQ= Date: Wed, 19 Jun 2019 15:19:00 -0500 From: Bjorn Helgaas To: Kirill Smelkov Cc: Julia Lawall , 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) Message-ID: <20190619201859.GA197717@google.com> References: <20190619162713.GA19859@deco.navytux.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190619162713.GA19859@deco.navytux.spb.ru> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? > > 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); > >