Prevent DCI clients' task structs from being deallocated to provide
diag driver a chance to clean up its dci client list. Also update
dci client list pid reference count properly to prevent any resource
leakage.
Bug:
68726653
Change-Id: I31c61442a48ac263fd9ff341f6c29db8ace90952
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
if (!list_empty(&entry->track))
list_del(&entry->track);
driver->num_dci_client--;
+
+ put_task_struct(entry->client);
+ entry->client = NULL;
/*
* Clear the client's log and event masks, update the cumulative
* masks and send the masks to peripherals
#include <linux/sched.h>
#include <linux/ratelimit.h>
#include <linux/timer.h>
+#include <linux/sched.h>
#include <linux/platform_device.h>
#include <linux/msm_mhi.h>
#ifdef CONFIG_DIAG_OVER_USB