]> git.hungrycats.org Git - linux/commit
mailbox: mailbox-test: set tdev->signal to NULL after freeing
authorSudeep Holla <sudeep.holla@arm.com>
Tue, 24 May 2016 16:12:04 +0000 (17:12 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Oct 2016 13:21:23 +0000 (15:21 +0200)
commit609442ec9a188e665da4897c6eace09a5afab791
tree9445aba97034237093157ad73a19ba4ba3ecd2bd
parentb2c866c3d4bfa785fc082f0e3bd71317f231242c
mailbox: mailbox-test: set tdev->signal to NULL after freeing

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@arm.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mailbox/mailbox-test.c