When listener unregister thread wakes up due to some system signals,
but not because ioctl_cnt <=1, it should return directly, instead of
continuing to remove listener list entry, which will lead kernel panic
when another listener receive thread accesses this freed entry.
Change-Id: I6ff97c56867d008232d7c50b22b372b0856c8dff
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
atomic_read(&data->ioctl_count) <= 1)) {
pr_err("Interrupted from abort\n");
ret = -ERESTARTSYS;
- break;
+ return ret;
}
}