rtl8187: Fix crash on unload when using SLUB debug
authorHerton Ronaldo Krzesinski <herton@mandriva.com.br>
Sun, 14 Dec 2008 18:18:09 +0000 (12:18 -0600)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 19 Dec 2008 20:23:20 +0000 (15:23 -0500)
commitd85882273367e98aecb9ff11a9d76515a6d37131
treefd9afecba19c3765ba77455b498b1af5c3241286
parent0a5ec96ad68516582023a877aceff9db7636d141
rtl8187: Fix crash on unload when using SLUB debug

Reported-by: Hin-Tak Leung <htl10@users.sourceforge.net>
After the code was modified to use urb anchors ("rtl8187: Use usb anchor
facilities to manage urbs"), rtl8187 began generating an intermittent GPF
on shutdown when using SLUB with debugging enabled. Furthermore, rebooting
the system with a ping running caused a GPF every time. There are two problems:
(1) incorrect locking in the rtl8187_rx_cb() routine, a pre-existing bug that
apparently had not been triggered before, and (2) duplicate freeing of receive
skbs that was probably introduced with the change to anchors.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rtl818x/rtl8187_dev.c