From: mdshahid03@gmail.com
To: eli.billauer@gmail.com
Cc: arnd@arndb.de, gregkh@linuxfoundation.org,
linux-kernel@vger.kernel.org,
Mohammad Shahid <mdshahid03@gmail.com>
Subject: [PATCH] char: xillybus: use stream_open for stream semantics
Date: Sat, 31 Oct 2026 14:06:10 +0530 [thread overview]
Message-ID: <20261031083610.87160-1-mdshahid03@gmail.com> (raw)
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
reply other threads:[~2026-10-31 8:36 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261031083610.87160-1-mdshahid03@gmail.com \
--to=mdshahid03@gmail.com \
--cc=arnd@arndb.de \
--cc=eli.billauer@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®