Hello. On 14-07-2011 11:11, River Wang wrote:
Hi Guys: I met a bug in drivers/net/usb/hso.c used in my tablet. Here is the patch.
Unfortunately the patchw as spoiled by your mail client...
============================================================ From: Wang Zhi<zhi.wang@xxxxxxxxxxxxx> Date: Thu, 14 Jul 2011 15:01:51 +0800 Subject: [PATCH]: USB: NET: Fix invalid memory free on the USB disconnetion path in HSO Driver (drivers/net/usb/hso.c) This issue is located at hso_free_net_device(). Pointers named hso_net and hso_net->net point to a memory block which is allocated by alloc_etherdev(). So when free_netdev() get called, hso_net and hso_net->net is invalid.
Signed-off-by: Wang Zhi<zhi.wang@xxxxxxxxxxxxx> --- hso.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index 387ca43..304fe78 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c @@ -2421,10 +2421,8 @@ static void hso_free_net_device(struct hso_device *hso_dev)
The patch is line wrapped.
remove_net_device(hso_net->parent); - if (hso_net->net) { + if (hso_net->net)
All tabs have been replaced by spaces. WBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html