s390/zcrypt: Fix zcrypt suspend/resume behavior
The device suspend call triggers all ap devices to fetch potentially available response messages from the queues. Therefore the corresponding zcrypt device, that is allocated asynchronously after ap device probing, needs to be fully prepared. This race condition could lead to uninitialized response buffers while trying to read from the queues. Introduce a new callback within the ap layer to get noticed when a zcrypt device is fully prepared. Additional checks prevent reading from devices that are not fully prepared. 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:

committed by
Martin Schwidefsky

parent
4475aeb8b7
commit
d6d86c57d7
@@ -262,6 +262,7 @@ void ap_queue_message(struct ap_device *ap_dev, struct ap_message *ap_msg);
|
||||
void ap_cancel_message(struct ap_device *ap_dev, struct ap_message *ap_msg);
|
||||
void ap_flush_queue(struct ap_device *ap_dev);
|
||||
void ap_bus_force_rescan(void);
|
||||
void ap_device_init_reply(struct ap_device *ap_dev, struct ap_message *ap_msg);
|
||||
|
||||
int ap_module_init(void);
|
||||
void ap_module_exit(void);
|
||||
|
Reference in New Issue
Block a user