mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-05 22:28:00 +00:00
s390/zcrypt: Fix invalid domain handling during ap module unload
Added domain checking to prevent reset failures caused by invalid domains. Corrected removal sequence of bus attributes and device. Reviewed-by: Harald Freudenberger <freude@linux.vnet.ibm.com> Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
parent
b9b4b1cef1
commit
f60b8d449d
1 changed files with 2 additions and 2 deletions
|
@ -1950,7 +1950,7 @@ static void ap_reset_domain(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (ap_domain_index != -1)
|
if ((ap_domain_index != -1) && (ap_test_config_domain(ap_domain_index)))
|
||||||
for (i = 0; i < AP_DEVICES; i++)
|
for (i = 0; i < AP_DEVICES; i++)
|
||||||
ap_reset_queue(AP_MKQID(i, ap_domain_index));
|
ap_reset_queue(AP_MKQID(i, ap_domain_index));
|
||||||
}
|
}
|
||||||
|
@ -2095,7 +2095,6 @@ void ap_module_exit(void)
|
||||||
hrtimer_cancel(&ap_poll_timer);
|
hrtimer_cancel(&ap_poll_timer);
|
||||||
destroy_workqueue(ap_work_queue);
|
destroy_workqueue(ap_work_queue);
|
||||||
tasklet_kill(&ap_tasklet);
|
tasklet_kill(&ap_tasklet);
|
||||||
root_device_unregister(ap_root_device);
|
|
||||||
while ((dev = bus_find_device(&ap_bus_type, NULL, NULL,
|
while ((dev = bus_find_device(&ap_bus_type, NULL, NULL,
|
||||||
__ap_match_all)))
|
__ap_match_all)))
|
||||||
{
|
{
|
||||||
|
@ -2104,6 +2103,7 @@ void ap_module_exit(void)
|
||||||
}
|
}
|
||||||
for (i = 0; ap_bus_attrs[i]; i++)
|
for (i = 0; ap_bus_attrs[i]; i++)
|
||||||
bus_remove_file(&ap_bus_type, ap_bus_attrs[i]);
|
bus_remove_file(&ap_bus_type, ap_bus_attrs[i]);
|
||||||
|
root_device_unregister(ap_root_device);
|
||||||
bus_unregister(&ap_bus_type);
|
bus_unregister(&ap_bus_type);
|
||||||
unregister_reset_call(&ap_reset_call);
|
unregister_reset_call(&ap_reset_call);
|
||||||
if (ap_using_interrupts())
|
if (ap_using_interrupts())
|
||||||
|
|
Loading…
Add table
Reference in a new issue