]> git.karo-electronics.de Git - karo-tx-linux.git/commit
staging: slicoss: fix use-after-free bug in slic_entry_remove
authorDavid Matlack <dmatlack@google.com>
Tue, 6 May 2014 04:02:37 +0000 (21:02 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 May 2014 11:08:34 +0000 (20:08 +0900)
commitdedabbbcb5ed7c75664b4ca66a525c09fe6acf12
tree6b2256b633748408299942c92539f4bac510ac72
parent0783c636d1872123b68522b5afb257917c3d5aa9
staging: slicoss: fix use-after-free bug in slic_entry_remove

This patch fixes a use-after-free bug that causes a null pointer
dereference in slic_entry_halt.

Since unregister_netdev() will ultimately call slic_entry_halt (the
net_device ndo_stop() virtual function for this device), we should
call it before freeing the memory used by slic_entry_halt.

Signed-off-by: David Matlack <dmatlack@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/slicoss/slicoss.c