Commit aba0e90
devlink: Hold devlink lock on health reporter dump get
Devlink health dump get callback should take devlink lock as any other
devlink callback. Otherwise, since devlink_mutex was removed, this
callback is not protected from a race of the reporter being destroyed
while handling the callback.
Add devlink lock to the callback and to any call for
devlink_health_do_dump(). This should be safe as non of the drivers dump
callback implementation takes devlink lock.
As devlink lock is added to any callback of dump, the reporter dump_lock
is now redundant and can be removed.
Fixes: d3efc2a ("net: devlink: remove devlink_mutex")
Signed-off-by: Moshe Shemesh <moshe@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Link: https://lore.kernel.org/r/1696510216-189379-1-git-send-email-moshe@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent c4d4919 commit aba0e90
1 file changed
Lines changed: 16 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | 61 | | |
63 | 62 | | |
64 | 63 | | |
| |||
125 | 124 | | |
126 | 125 | | |
127 | 126 | | |
128 | | - | |
129 | 127 | | |
130 | 128 | | |
131 | 129 | | |
| |||
226 | 224 | | |
227 | 225 | | |
228 | 226 | | |
229 | | - | |
230 | 227 | | |
231 | 228 | | |
232 | 229 | | |
| |||
625 | 622 | | |
626 | 623 | | |
627 | 624 | | |
628 | | - | |
| 625 | + | |
629 | 626 | | |
630 | 627 | | |
631 | | - | |
| 628 | + | |
632 | 629 | | |
633 | 630 | | |
634 | 631 | | |
| |||
1262 | 1259 | | |
1263 | 1260 | | |
1264 | 1261 | | |
1265 | | - | |
| 1262 | + | |
1266 | 1263 | | |
1267 | 1264 | | |
1268 | 1265 | | |
| |||
1272 | 1269 | | |
1273 | 1270 | | |
1274 | 1271 | | |
1275 | | - | |
1276 | 1272 | | |
1277 | 1273 | | |
1278 | | - | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
1279 | 1278 | | |
1280 | 1279 | | |
1281 | 1280 | | |
| |||
1284 | 1283 | | |
1285 | 1284 | | |
1286 | 1285 | | |
| 1286 | + | |
1287 | 1287 | | |
1288 | 1288 | | |
1289 | | - | |
| 1289 | + | |
1290 | 1290 | | |
1291 | 1291 | | |
1292 | 1292 | | |
1293 | | - | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
1294 | 1297 | | |
| 1298 | + | |
1295 | 1299 | | |
1296 | | - | |
1297 | 1300 | | |
1298 | 1301 | | |
1299 | 1302 | | |
| |||
1309 | 1312 | | |
1310 | 1313 | | |
1311 | 1314 | | |
1312 | | - | |
| 1315 | + | |
| 1316 | + | |
1313 | 1317 | | |
1314 | 1318 | | |
1315 | 1319 | | |
| |||
1326 | 1330 | | |
1327 | 1331 | | |
1328 | 1332 | | |
1329 | | - | |
1330 | 1333 | | |
1331 | | - | |
1332 | 1334 | | |
1333 | 1335 | | |
1334 | 1336 | | |
| |||
0 commit comments