Commit c295160
net: hns3: fix debugfs concurrency issue between kfree buffer and read
Now in hns3_dbg_uninit(), there may be concurrency between
kfree buffer and read, it may result in memory error.
Moving debugfs_remove_recursive() in front of kfree buffer to ensure
they don't happen at the same time.
Fixes: 5e69ea7 ("net: hns3: refactor the debugfs process")
Signed-off-by: Hao Chen <chenhao418@huawei.com>
Signed-off-by: Jijie Shao <shaojijie@huawei.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>1 parent efccf65 commit c295160
1 file changed
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1415 | 1415 | | |
1416 | 1416 | | |
1417 | 1417 | | |
1418 | | - | |
1419 | 1418 | | |
1420 | 1419 | | |
| 1420 | + | |
1421 | 1421 | | |
1422 | 1422 | | |
1423 | 1423 | | |
1424 | 1424 | | |
1425 | 1425 | | |
1426 | 1426 | | |
1427 | 1427 | | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
1428 | 1431 | | |
1429 | 1432 | | |
1430 | 1433 | | |
1431 | 1434 | | |
1432 | 1435 | | |
1433 | 1436 | | |
1434 | 1437 | | |
1435 | | - | |
1436 | | - | |
1437 | 1438 | | |
1438 | 1439 | | |
1439 | 1440 | | |
| |||
0 commit comments