[PATCH] pci/switchtec: fix stream_open.cocci warnings (fwd)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

Kirill will explain about this issue.

julia

---------- Forwarded message ----------
Date: Sat, 13 Apr 2019 11:22:51 +0800
From: kbuild test robot <lkp@xxxxxxxxx>
To: kbuild@xxxxxx
Cc: Julia Lawall <julia.lawall@xxxxxxx>
Subject: [PATCH] pci/switchtec: fix stream_open.cocci warnings

CC: kbuild-all@xxxxxx
TO: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
CC: Kurt Schwemmer <kurt.schwemmer@xxxxxxxxxxxxx>
CC: Logan Gunthorpe <logang@xxxxxxxxxxxx>
CC: Bjorn Helgaas <helgaas@xxxxxxxxxx>
CC: linux-pci@xxxxxxxxxxxxxxx
CC: linux-kernel@xxxxxxxxxxxxxxx

From: kbuild test robot <lkp@xxxxxxxxx>

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 <lkp@xxxxxxxxx>
---

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);




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux