From: Luiz Fernando Capitulino Date: Fri, 12 May 2006 01:34:17 +0000 (-0300) Subject: [PATCH] usbserial: Fixes use-after-free in serial_open(). X-Git-Tag: v2.6.17-rc5~165^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=704936a25bda9bb12e35bb222d5e3f26186dc279;p=pandora-kernel.git [PATCH] usbserial: Fixes use-after-free in serial_open(). If the device is disconnected while serial_open() is executing and either try_module_get() or the device specific open function fails, the kref_put() call in the 'bailout_kref_put' label will free the memory pointed out by 'port'. The subsequent dereferences in the 'bailout_kref_put' label will be invalid. The fix is just to assure kref_put() is called after any 'port' usage. Signed-off-by: Luiz Fernando N. Capitulino Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed