Commit bf4ea58
arp: Convert ioctl(SIOCGARP) to RCU.
ioctl(SIOCGARP) holds rtnl_lock() to get netdev by __dev_get_by_name()
and copy dev->name safely and calls neigh_lookup() later, which looks
up a neighbour entry under RCU.
Let's replace __dev_get_by_name() with dev_get_by_name_rcu() and strscpy()
with netdev_copy_name() to avoid locking rtnl_lock().
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Link: https://lore.kernel.org/r/20240430015813.71143-8-kuniyu@amazon.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent 0840556 commit bf4ea58
1 file changed
Lines changed: 18 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1003 | 1003 | | |
1004 | 1004 | | |
1005 | 1005 | | |
1006 | | - | |
| 1006 | + | |
| 1007 | + | |
1007 | 1008 | | |
1008 | 1009 | | |
1009 | 1010 | | |
1010 | | - | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
1011 | 1015 | | |
1012 | 1016 | | |
1013 | 1017 | | |
| |||
1028 | 1032 | | |
1029 | 1033 | | |
1030 | 1034 | | |
1031 | | - | |
| 1035 | + | |
1032 | 1036 | | |
1033 | 1037 | | |
1034 | 1038 | | |
| |||
1166 | 1170 | | |
1167 | 1171 | | |
1168 | 1172 | | |
1169 | | - | |
| 1173 | + | |
1170 | 1174 | | |
1171 | 1175 | | |
1172 | 1176 | | |
| |||
1188 | 1192 | | |
1189 | 1193 | | |
1190 | 1194 | | |
1191 | | - | |
| 1195 | + | |
1192 | 1196 | | |
1193 | 1197 | | |
1194 | 1198 | | |
| |||
1287 | 1291 | | |
1288 | 1292 | | |
1289 | 1293 | | |
1290 | | - | |
1291 | | - | |
1292 | 1294 | | |
1293 | 1295 | | |
| 1296 | + | |
1294 | 1297 | | |
| 1298 | + | |
1295 | 1299 | | |
1296 | 1300 | | |
| 1301 | + | |
1297 | 1302 | | |
| 1303 | + | |
1298 | 1304 | | |
1299 | 1305 | | |
| 1306 | + | |
1300 | 1307 | | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
1301 | 1312 | | |
1302 | 1313 | | |
1303 | 1314 | | |
1304 | | - | |
1305 | | - | |
1306 | | - | |
1307 | 1315 | | |
1308 | 1316 | | |
1309 | 1317 | | |
| |||
0 commit comments