Commit f8a3db4
vdpa/mlx5: Fix double release of debugfs entry
The error path in setup_driver deletes the debugfs entry but doesn't
clear the pointer. During .dev_del the invalid pointer will be released
again causing a crash.
This patch fixes the issue by always clearing the debugfs entry in
mlx5_vdpa_remove_debugfs. Also, stop removing the debugfs entry in
.dev_del op: the debugfs entry is already handled within the
setup_driver/teardown_driver scope.
Cc: [email protected]
Fixes: f0417e7 ("vdpa/mlx5: Add and remove debugfs in setup/teardown driver")
Signed-off-by: Dragos Tatulea <[email protected]>
Reviewed-by: Gal Pressman <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Acked-by: Jason Wang <[email protected]>1 parent fab7f25 commit f8a3db4
3 files changed
+6
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
| 149 | + | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
| 152 | + | |
152 | 153 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2713 | 2713 | | |
2714 | 2714 | | |
2715 | 2715 | | |
2716 | | - | |
| 2716 | + | |
2717 | 2717 | | |
2718 | 2718 | | |
2719 | 2719 | | |
| |||
2727 | 2727 | | |
2728 | 2728 | | |
2729 | 2729 | | |
2730 | | - | |
2731 | | - | |
| 2730 | + | |
2732 | 2731 | | |
2733 | 2732 | | |
2734 | 2733 | | |
| |||
3489 | 3488 | | |
3490 | 3489 | | |
3491 | 3490 | | |
3492 | | - | |
3493 | | - | |
3494 | 3491 | | |
3495 | 3492 | | |
3496 | 3493 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| |||
0 commit comments