From patchwork Sat Apr 13 16:50:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 10899525 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EF4C0186D for ; Sat, 13 Apr 2019 16:51:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9FE9B28B35 for ; Sat, 13 Apr 2019 16:51:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 90CE028B4F; Sat, 13 Apr 2019 16:51:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 127FC28B35 for ; Sat, 13 Apr 2019 16:51:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727256AbfDMQvA (ORCPT ); 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 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Logan Gunthorpe private_data = stuser; - nonseekable_open(inode, filp); + stream_open(inode, filp); dev_dbg(&stdev->dev, "%s: %p\n", __func__, stuser);