]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
staging: slicoss: Fix possible reuse of freed memory in timer function
authorKirill Tkhai <tkhai@yandex.ru>
Mon, 10 Feb 2014 18:36:23 +0000 (22:36 +0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Feb 2014 20:37:27 +0000 (12:37 -0800)
Do not call kfree() till timer function is finished.

[This was found using grep. Compiled tested only]

Signed-off-by: Kirill Tkhai <tkhai@yandex.ru>
CC: Joe Perches <joe@perches.com>
CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/slicoss/slicoss.c

index 1426ca49bfe824e16c7a8695c0738dd62212b0ea..e0de4979e1cba75f10ce75f7d26076def1bc2d4f 100644 (file)
@@ -2970,7 +2970,7 @@ static void slic_card_cleanup(struct sliccard *card)
 {
        if (card->loadtimerset) {
                card->loadtimerset = 0;
-               del_timer(&card->loadtimer);
+               del_timer_sync(&card->loadtimer);
        }
 
        slic_debug_card_destroy(card);