From: Alexey Khoroshilov Date: Fri, 28 Mar 2014 20:26:15 +0000 (+0400) Subject: rtl8187: fix use after free on failure path in rtl8187_probe() X-Git-Tag: v3.15-rc1~113^2~18^2^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a31267c30880ebdc73e6815f58c69a665052fab8;p=pandora-kernel.git rtl8187: fix use after free on failure path in rtl8187_probe() If allocation of io_dmabuf fails, rtl8187_probe() calls usb_put_dev(udev) while usb_get_dev(udev) is not called yet. As a result refcnt is decremented incorrectly and usb_dev can be used after memory deallocation. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Acked-by: Larry Finger Signed-off-by: John W. Linville --- Reading git-diff-tree failed