Commit afec62c
flow_dissector: use RCU protection to fetch dev_net()
__skb_flow_dissect() can be called from arbitrary contexts.
It must extend its RCU protection section to include
the call to dev_net(), which can become dev_net_rcu().
This makes sure the net structure can not disappear under us.
Fixes: 9b52e3f ("flow_dissector: handle no-skb use case")
Signed-off-by: Eric Dumazet <[email protected]>
Reviewed-by: Kuniyuki Iwashima <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>1 parent 4b8474a commit afec62c
1 file changed
+11
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1108 | 1108 | | |
1109 | 1109 | | |
1110 | 1110 | | |
| 1111 | + | |
| 1112 | + | |
1111 | 1113 | | |
1112 | 1114 | | |
1113 | 1115 | | |
1114 | | - | |
| 1116 | + | |
1115 | 1117 | | |
1116 | 1118 | | |
1117 | 1119 | | |
| |||
1122 | 1124 | | |
1123 | 1125 | | |
1124 | 1126 | | |
1125 | | - | |
1126 | 1127 | | |
1127 | 1128 | | |
1128 | 1129 | | |
| |||
1150 | 1151 | | |
1151 | 1152 | | |
1152 | 1153 | | |
1153 | | - | |
1154 | | - | |
1155 | | - | |
1156 | | - | |
1157 | | - | |
1158 | | - | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
1159 | 1160 | | |
1160 | | - | |
1161 | | - | |
1162 | 1161 | | |
1163 | 1162 | | |
| 1163 | + | |
| 1164 | + | |
1164 | 1165 | | |
1165 | 1166 | | |
1166 | 1167 | | |
| |||
0 commit comments