From: Alexey Khoroshilov Date: Thu, 14 Aug 2014 23:00:06 +0000 (+0400) Subject: at76c50x-usb: fix use after free on failure path in at76_probe() X-Git-Tag: fixes-for-v3.18-merge-window~162^2~32^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=29e20aa6c6aff35c81d4da2e2cd516dadb569061;p=pandora-kernel.git at76c50x-usb: fix use after free on failure path in at76_probe() After commit 174beab7d445 ("at76c50x-usb: Don't perform DMA from stack memory") at76_delete_device() and usb_put_dev() are called both if at76_init_new_device() fails in at76_probe(). But at76_delete_device() does usb_put_dev(priv->dev) itself that means double usb_put_dev(). The patch avoids the problem by moving usb_put_dev() from at76_delete_device() to at76_disconnect(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Signed-off-by: John W. Linville --- Reading git-diff-tree failed