diff options
author | Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com> | 2015-04-30 09:36:48 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2015-05-13 03:57:29 -0400 |
commit | f60b8d449d850ae4aa3ee4fdaefec6b7882c92f7 (patch) | |
tree | 4f58fdbfc2fd3fbc8b27e22de124604b05b53d1f /drivers/s390 | |
parent | b9b4b1cef156e6b403b26ea4cb6d0caf4850e05c (diff) |
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>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/crypto/ap_bus.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c index 6e506a88f43e..3ba611419759 100644 --- a/drivers/s390/crypto/ap_bus.c +++ b/drivers/s390/crypto/ap_bus.c | |||
@@ -1950,7 +1950,7 @@ static void ap_reset_domain(void) | |||
1950 | { | 1950 | { |
1951 | int i; | 1951 | int i; |
1952 | 1952 | ||
1953 | if (ap_domain_index != -1) | 1953 | if ((ap_domain_index != -1) && (ap_test_config_domain(ap_domain_index))) |
1954 | for (i = 0; i < AP_DEVICES; i++) | 1954 | for (i = 0; i < AP_DEVICES; i++) |
1955 | ap_reset_queue(AP_MKQID(i, ap_domain_index)); | 1955 | ap_reset_queue(AP_MKQID(i, ap_domain_index)); |
1956 | } | 1956 | } |
@@ -2095,7 +2095,6 @@ void ap_module_exit(void) | |||
2095 | hrtimer_cancel(&ap_poll_timer); | 2095 | hrtimer_cancel(&ap_poll_timer); |
2096 | destroy_workqueue(ap_work_queue); | 2096 | destroy_workqueue(ap_work_queue); |
2097 | tasklet_kill(&ap_tasklet); | 2097 | tasklet_kill(&ap_tasklet); |
2098 | root_device_unregister(ap_root_device); | ||
2099 | while ((dev = bus_find_device(&ap_bus_type, NULL, NULL, | 2098 | while ((dev = bus_find_device(&ap_bus_type, NULL, NULL, |
2100 | __ap_match_all))) | 2099 | __ap_match_all))) |
2101 | { | 2100 | { |
@@ -2104,6 +2103,7 @@ void ap_module_exit(void) | |||
2104 | } | 2103 | } |
2105 | for (i = 0; ap_bus_attrs[i]; i++) | 2104 | for (i = 0; ap_bus_attrs[i]; i++) |
2106 | bus_remove_file(&ap_bus_type, ap_bus_attrs[i]); | 2105 | bus_remove_file(&ap_bus_type, ap_bus_attrs[i]); |
2106 | root_device_unregister(ap_root_device); | ||
2107 | bus_unregister(&ap_bus_type); | 2107 | bus_unregister(&ap_bus_type); |
2108 | unregister_reset_call(&ap_reset_call); | 2108 | unregister_reset_call(&ap_reset_call); |
2109 | if (ap_using_interrupts()) | 2109 | if (ap_using_interrupts()) |