Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F111606886
D33260.id99448.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
745 B
Referenced Files
None
Subscribers
None
D33260.id99448.diff
View Options
Index: sys/net/if.c
===================================================================
--- sys/net/if.c
+++ sys/net/if.c
@@ -350,7 +350,7 @@
if (__predict_false(idx > V_if_index))
return (NULL);
- return (V_ifindex_table[idx]);
+ return (ck_pr_load_ptr(&V_ifindex_table[idx]));
}
struct ifnet *
@@ -403,7 +403,7 @@
IFNET_WLOCK_ASSERT();
- V_ifindex_table[idx] = NULL;
+ ck_pr_store_ptr(&V_ifindex_table[idx], NULL);
while (V_if_index > 0 &&
V_ifindex_table[V_if_index] == NULL)
V_if_index--;
@@ -413,8 +413,10 @@
ifnet_setbyindex(u_short idx, struct ifnet *ifp)
{
+ IFNET_WLOCK_ASSERT();
+
ifp->if_index = idx;
- V_ifindex_table[idx] = ifp;
+ ck_pr_store_ptr(&V_ifindex_table[idx], ifp);
}
struct ifaddr *
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 6, 10:42 PM (15 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17020926
Default Alt Text
D33260.id99448.diff (745 B)
Attached To
Mode
D33260: ifnet: use ck_pr(3) store & load setting ifnet pointer in ifindex
Attached
Detach File
Event Timeline
Log In to Comment