[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20161006074452.436577009@linuxfoundation.org>
Date: Thu, 6 Oct 2016 10:28:42 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Sudeep Holla <sudeep.holla@....com>,
Lee Jones <lee.jones@...aro.org>,
Jassi Brar <jaswinder.singh@...aro.org>
Subject: [PATCH 4.7 086/141] mailbox: mailbox-test: set tdev->signal to NULL after freeing
4.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sudeep Holla <sudeep.holla@....com>
commit 9ef3c5112139cc5c5666ee096e05bc1e00e94015 upstream.
tdev->signal is not set NULL after it's freed. This will cause random
exceptions when the stale pointer is accessed after tdev->signal is
freed. Also, since tdev->signal allocation is skipped the next time
it's written, this leads to continuous fault finally leading to the
total death of the system.
Fixes: d1c2f87c9a8f ("mailbox: mailbox-test: Prevent memory leak")
Signed-off-by: Sudeep Holla <sudeep.holla@....com>
Acked-by: Lee Jones <lee.jones@...aro.org>
Signed-off-by: Jassi Brar <jaswinder.singh@...aro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/mailbox/mailbox-test.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/mailbox/mailbox-test.c
+++ b/drivers/mailbox/mailbox-test.c
@@ -133,6 +133,7 @@ static ssize_t mbox_test_message_write(s
out:
kfree(tdev->signal);
kfree(tdev->message);
+ tdev->signal = NULL;
return ret < 0 ? ret : count;
}
Powered by blists - more mailing lists