Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153416922
D56371.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
731 B
Referenced Files
None
Subscribers
None
D56371.id.diff
View Options
diff --git a/sys/compat/linuxkpi/common/include/linux/kfifo.h b/sys/compat/linuxkpi/common/include/linux/kfifo.h
--- a/sys/compat/linuxkpi/common/include/linux/kfifo.h
+++ b/sys/compat/linuxkpi/common/include/linux/kfifo.h
@@ -89,7 +89,7 @@
(_kf)->head[(_kf)->last] = (_e); \
(_kf)->count++; \
(_kf)->last++; \
- if ((_kf)->last > (_kf)->total) \
+ if ((_kf)->last >= (_kf)->total) \
(_kf)->last = 0; \
_rc = true; \
} \
@@ -107,7 +107,7 @@
*(_e) = (_kf)->head[(_kf)->first]; \
(_kf)->count--; \
(_kf)->first++; \
- if ((_kf)->first > (_kf)->total) \
+ if ((_kf)->first >= (_kf)->total) \
(_kf)->first = 0; \
_rc = true; \
} \
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Apr 22, 1:24 AM (36 m, 18 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31445343
Default Alt Text
D56371.id.diff (731 B)
Attached To
Mode
D56371: linuxkpi: Fix an off-by-one error in the kfifo implementation
Attached
Detach File
Event Timeline
Log In to Comment