Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp645703yba; Sat, 13 Apr 2019 09:52:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqxIK1TymNqB5S3X2SooOJCyn0JxhVXTuaIDpJ9fXPCD9XisLSTCGfJJwR5nEaUdv4tHSrri X-Received: by 2002:a17:902:184:: with SMTP id b4mr44073555plb.26.1555174355255; Sat, 13 Apr 2019 09:52:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555174355; cv=none; d=google.com; s=arc-20160816; b=TZk/GoHWZU/l++vQznybTvV0K5IDkPUDPWEwc3OuvBM3FO+AVgdPZdR4p7ZtRf4OFN qi4+W2rlp/2BCq4teSQvihcGdKYynjBl2l21VWEjXiRGs/UTkUDAVDXQhr0Rmco8xaio 4mYUeABHJRFlxAtOppGDIklc+CV94vHD6llg7LuJ8rF8cvfAQUyiv5SMomXWOLPYGlMx eYjjnIv+AqmXgxIcsIwPlhkSwipHr27xOY7S+hHJZRuduEdRAeGF53+vS6A9fMZNG6Md s+B9srateX3BSvI5+dzVont38n55M6foVriG2FMUWb08aEeAcxzEsKCzH1++VxCcUYHw RmHg== 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:message-id :subject:cc:to:from:date; bh=DCl1FRK9zNElt6Vp+GKB/cFbaz/EwSLl9Uc9wNT7ifQ=; b=GeAonIa/T8AfE4XQzephaqwGjVW6ekPaAb3XpUxsdfH623SjldXzp4SSsxG7+QME3u KWYuSQZZfX9Ip7CFhakJOJ8ySMQcFrPUYMY8UyL74CpjopimleJ58Kt/Gp2+xAgLn6zF 6HgJ0LnbKFq8a1LmNbXemNKi9TBi0Xl5v5IWfsFuDum+xG0PINxPhuRYhwPEUIy9Kgjs J9goYFH6nua4jMAQ8rT3LROQ7aPfNU97gYCxLPCyrvfF95DNsrpwhDmhWu60D1g5GOwM Ejc7AOOAMsaXhHALeJJqQJK8zX1gN9dpKJwIvnA77DAB6PnWIf5+pk5cbuq8MjEChiWW IDWg== 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 bc1si40136083plb.55.2019.04.13.09.52.18; Sat, 13 Apr 2019 09:52:35 -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 S1727324AbfDMQvA (ORCPT + 99 others); Sat, 13 Apr 2019 12:51:00 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:2633 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726998AbfDMQvA (ORCPT ); Sat, 13 Apr 2019 12:51:00 -0400 X-IronPort-AV: E=Sophos;i="5.60,346,1549926000"; d="scan'208";a="302789478" Received: from abo-75-106-68.mrs.modulonet.fr (HELO hadrien) ([85.68.106.75]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Apr 2019 18:50:57 +0200 Date: Sat, 13 Apr 2019 18:50:57 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Sebastian Andrzej Siewior cc: kbuild-all@01.org, Kurt Schwemmer , Logan Gunthorpe , Bjorn Helgaas , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Kirill Smelkov Subject: [PATCH] pci/switchtec: fix stream_open.cocci warnings (fwd) Message-ID: 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 Hello, Kirill will explain about this issue. 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);