From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6BAEDC31E5E for ; Wed, 19 Jun 2019 19:47:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5136621721 for ; Wed, 19 Jun 2019 19:47:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730134AbfFSTrj (ORCPT ); Wed, 19 Jun 2019 15:47:39 -0400 Received: from ale.deltatee.com ([207.54.116.67]:37110 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726447AbfFSTrj (ORCPT ); Wed, 19 Jun 2019 15:47:39 -0400 Received: from s01061831bf6ec98c.cg.shawcable.net ([68.147.80.180] helo=[192.168.6.132]) by ale.deltatee.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1hdgYT-0003lA-LS; Wed, 19 Jun 2019 13:47:38 -0600 To: Kirill Smelkov , Julia Lawall , Sebastian Andrzej Siewior Cc: Kurt Schwemmer , Bjorn Helgaas , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, kbuild-all@01.org References: <20190619162713.GA19859@deco.navytux.spb.ru> From: Logan Gunthorpe Message-ID: <8ece80ad-d3c9-ac7b-29a5-b8c6f40851af@deltatee.com> Date: Wed, 19 Jun 2019 13:47:35 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.1 MIME-Version: 1.0 In-Reply-To: <20190619162713.GA19859@deco.navytux.spb.ru> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 68.147.80.180 X-SA-Exim-Rcpt-To: kbuild-all@01.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, helgaas@kernel.org, kurt.schwemmer@microsemi.com, bigeasy@linutronix.de, julia.lawall@lip6.fr, kirr@nexedi.com X-SA-Exim-Mail-From: logang@deltatee.com Subject: Re: [PATCH] pci/switchtec: fix stream_open.cocci warnings (fwd) X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-06-19 10:27 a.m., 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? >> 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 This is for the RT tree? The patch in the fixes tag isn't in upstream and I don't understand how this is related to that patch at all. It just looks like the RT tree hasn't picked up the patch which made this change in upstream. I feel like I've seen the change in this patch a bunch of times already and it appears to be correct in rc5 at least... Logan >> 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); >>