Page MenuHomeFreeBSD

D59822.diff
No OneTemporary

D59822.diff

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

Mime Type
text/plain
Expires
Sat, Sep 19, 8:48 PM (3 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39245531
Default Alt Text
D59822.diff (998 B)

Event Timeline