* [PATCH] char: xillybus: use stream_open for stream semantics
@ 2026-10-31 8:36 mdshahid03
0 siblings, 0 replies; only message in thread
From: mdshahid03 @ 2026-10-31 8:36 UTC (permalink / raw)
To: eli.billauer; +Cc: arnd, gregkh, linux-kernel, Mohammad Shahid
From: Mohammad Shahid <mdshahid03@gmail.com>
The Xillybus uses nonseekable_open() in xillybus_open()
for non-seekable channels. However,its read and write
callbacks maintain their own buffer positions and do not
use the file position passed by VFS.
Use stream_open() to mark these channels as streams and
disable unnecessary file position handling,allowing read
and write operations to run concurrently.
This issue is reported by stream_open.cocci script as a
potential deadlock between read and write operations.
Signed-off-by: Mohammad Shahid <mdshahid03@gmail.com>
---
drivers/char/xillybus/xillybus_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/char/xillybus/xillybus_core.c b/drivers/char/xillybus/xillybus_core.c
index 7189c6d97e7d..92c526e84572 100644
--- a/drivers/char/xillybus/xillybus_core.c
+++ b/drivers/char/xillybus/xillybus_core.c
@@ -1607,7 +1607,7 @@ static int xillybus_open(struct inode *inode, struct file *filp)
mutex_unlock(&channel->wr_mutex);
if (!rc && (!channel->seekable))
- return nonseekable_open(inode, filp);
+ return stream_open(inode, filp);
return rc;
}
--
2.43.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-31 8:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-31 8:36 [PATCH] char: xillybus: use stream_open for stream semantics mdshahid03
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®