Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F178131555
D7316.1796064621.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
832 B
Referenced Files
None
Subscribers
None
D7316.1796064621.diff
View Options
Index: head/sys/dev/hyperv/vmbus/hv_ring_buffer.c
===================================================================
--- head/sys/dev/hyperv/vmbus/hv_ring_buffer.c
+++ head/sys/dev/hyperv/vmbus/hv_ring_buffer.c
@@ -339,8 +339,12 @@
mtx_lock_spin(&rbr->rxbr_lock);
+ /*
+ * The requested data and the 64bits channel packet
+ * offset should be there at least.
+ */
bytesAvailToRead = vmbus_rxbr_avail(rbr);
- if (bytesAvailToRead < dlen) {
+ if (bytesAvailToRead < dlen + sizeof(uint64_t)) {
mtx_unlock_spin(&rbr->rxbr_lock);
return (EAGAIN);
}
@@ -366,7 +370,7 @@
mtx_lock_spin(&rbr->rxbr_lock);
bytes_avail_to_read = vmbus_rxbr_avail(rbr);
- if (bytes_avail_to_read < dlen) {
+ if (bytes_avail_to_read < dlen + offset + sizeof(prev_indices)) {
mtx_unlock_spin(&rbr->rxbr_lock);
return (EAGAIN);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 30, 6:50 PM (16 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42110359
Default Alt Text
D7316.1796064621.diff (832 B)
Attached To
Mode
D7316: hyperv/vmbus: Strigent RX bufring data length checks.
Attached
Detach File
Event Timeline