diff options
| author | Vevek Venkatesan <vevekv@codeaurora.org> | 2017-07-10 15:09:39 +0530 |
|---|---|---|
| committer | Vevek Venkatesan <vevekv@codeaurora.org> | 2017-07-26 20:25:38 +0530 |
| commit | fc375bad6a4b62a755d57d63bcea5b9b78c62385 (patch) | |
| tree | fb3db11cd60da93cb9a724d84afcae9a87a9b659 /drivers/input/misc | |
| parent | 9f462e8a2b950650297e36fb77171ac5a7a433a2 (diff) | |
input: misc: hbtp_input: fix memory corruption in list_del_entry
Fix memory corruption in the hbtp_input driver by adding
complete in the release routine to resolve the Kernel crash
in __list_del_entry corruption.
Signed-off-by: Vevek Venkatesan <vevekv@codeaurora.org>
Change-Id: I764923317f720137bfd4e7adfc6bf763a36911c3
Diffstat (limited to 'drivers/input/misc')
| -rw-r--r-- | drivers/input/misc/hbtp_input.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/input/misc/hbtp_input.c b/drivers/input/misc/hbtp_input.c index 56f2732334db..30da797a85dc 100644 --- a/drivers/input/misc/hbtp_input.c +++ b/drivers/input/misc/hbtp_input.c @@ -249,6 +249,10 @@ static int hbtp_input_release(struct inode *inode, struct file *file) return -ENOTTY; } hbtp->count--; + if (!completion_done(&hbtp->power_suspend_sig)) + complete(&hbtp->power_suspend_sig); + if (!completion_done(&hbtp->power_resume_sig)) + complete(&hbtp->power_resume_sig); if (hbtp->power_sig_enabled) hbtp->power_sig_enabled = false; mutex_unlock(&hbtp->mutex); |
