Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F172515457
D59822.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
998 B
Referenced Files
None
Subscribers
None
D59822.diff
View Options
diff --git a/sys/fs/cuse/cuse.c b/sys/fs/cuse/cuse.c
--- a/sys/fs/cuse/cuse.c
+++ b/sys/fs/cuse/cuse.c
@@ -1666,6 +1666,16 @@
cuse_cmd_lock(pccmd);
while (uio->uio_resid != 0) {
+ /*
+ * The uiomove() below does not step past an iovec it has
+ * just emptied, so do it here, to avoid an infinite loop
+ * where we are requesting zero-byte transfers.
+ */
+ if (uio->uio_iov->iov_len == 0) {
+ uio->uio_iov++;
+ uio->uio_iovcnt--;
+ continue;
+ }
if (uio->uio_iov->iov_len > CUSE_LENGTH_MAX) {
error = ENOMEM;
break;
@@ -1754,6 +1764,16 @@
cuse_cmd_lock(pccmd);
while (uio->uio_resid != 0) {
+ /*
+ * The uiomove() below does not step past an iovec it has
+ * just emptied, so do it here, to avoid an infinite loop
+ * where we are requesting zero-byte transfers.
+ */
+ if (uio->uio_iov->iov_len == 0) {
+ uio->uio_iov++;
+ uio->uio_iovcnt--;
+ continue;
+ }
if (uio->uio_iov->iov_len > CUSE_LENGTH_MAX) {
error = ENOMEM;
break;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Sep 19, 11:43 PM (6 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39245531
Default Alt Text
D59822.diff (998 B)
Attached To
Mode
D59822: cuse: Fix hang on readv(2) and writev(2) with multiple iovecs
Attached
Detach File
Event Timeline
Log In to Comment