Commit edd55b4
Drivers: hv: mshv_vtl: remove duplicate misc_deregister() in module exit
mshv_vtl_exit() calls misc_deregister(&mshv_vtl_sint_dev) and
misc_deregister(&mshv_vtl_low) twice. The first pair (added when the
TDX APIC handling code was introduced) is redundant: the same
deregistrations are performed again a few lines below, in the order
that mirrors the registration sequence in mshv_vtl_init().
Calling misc_deregister() twice on the same struct miscdevice is not
safe -- it ends up doing list_del() twice on the device's misc_list
node, corrupting the global list and yielding 'list_del corruption'
splats on rmmod (or any module exit path).
Drop the redundant calls so each device is deregistered exactly once,
in the reverse order of registration.
Fixes: 06eb1e3 ("mshv_vtl/tdx: Handle some APIC functionality in kernel")
Signed-off-by: Naman Jain <namjain@linux.microsoft.com>1 parent 30661be commit edd55b4
1 file changed
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4098 | 4098 | | |
4099 | 4099 | | |
4100 | 4100 | | |
4101 | | - | |
4102 | | - | |
4103 | 4101 | | |
4104 | 4102 | | |
4105 | 4103 | | |
| |||
0 commit comments