Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F150634216
D43200.id131885.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
902 B
Referenced Files
None
Subscribers
None
D43200.id131885.diff
View Options
diff --git a/sys/dev/netmap/netmap_kern.h b/sys/dev/netmap/netmap_kern.h
--- a/sys/dev/netmap/netmap_kern.h
+++ b/sys/dev/netmap/netmap_kern.h
@@ -2450,8 +2450,19 @@
#define CSB_READ(csb, field, r) (get_user(r, &csb->field))
#define CSB_WRITE(csb, field, v) (put_user(v, &csb->field))
#else /* ! linux */
-#define CSB_READ(csb, field, r) (r = fuword32(&csb->field))
-#define CSB_WRITE(csb, field, v) (suword32(&csb->field, v))
+#define CSB_READ(csb, field, r) do { \
+ int32_t v __diagused; \
+ \
+ v = fuword32(&csb->field); \
+ KASSERT(v != -1, ("%s: fuword32 failed", __func__)); \
+ r = v; \
+} while (0)
+#define CSB_WRITE(csb, field, v) do { \
+ int error __diagused; \
+ \
+ error = suword32(&csb->field, v); \
+ KASSERT(error == 0, ("%s: suword32 failed", __func__)); \
+} while (0)
#endif /* ! linux */
/* some macros that may not be defined */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 3, 11:41 PM (22 m, 13 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30785769
Default Alt Text
D43200.id131885.diff (902 B)
Attached To
Mode
D43200: netmap: Ignore errors in CSB_WRITE()
Attached
Detach File
Event Timeline
Log In to Comment