waitqueue is initialized on every call to notify_for_subsystem.
This leads to stability issue if one thread is waiting for completion
and another thread re-initializes it.
Waitqueue is initialized only in probe function.
CRs-Fixed:
2197181
Change-Id: I3509a7c4a197c727b2025c1aeb6a35690c3c8501
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
* only modified during setup.
*/
atomic_set(&responses_remaining, ss_info->notify_list_len);
- init_waitqueue_head(&waitqueue);
notifications_successful = true;
list_for_each_entry(ss_leaf_entry, &ss_info->notify_list,
ss_info->cb_data = NULL;
spin_lock_init(&ss_info->link_up_lock);
spin_lock_init(&ss_info->cb_lock);
-
+ init_waitqueue_head(&waitqueue);
nb = kmalloc(sizeof(struct restart_notifier_block), GFP_KERNEL);
if (!nb) {
GLINK_SSR_ERR("<SSR> %s: Could not allocate notifier block\n",