]> rtime.felk.cvut.cz Git - lisovros/linux_canprio.git/commit
Bluetooth: fix oops in l2cap_connect_req
authorNathan Holstein <nathan.holstein@gmail.com>
Fri, 15 Oct 2010 15:54:02 +0000 (11:54 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 22 Nov 2010 19:03:01 +0000 (11:03 -0800)
commit8f836cca356e9b42c52a160bd945aad5e7173691
tree4e5ffb59d22a73842c4673341e25f4fd9be5beae
parent5fbc4fbbb742cfb69aaf9b83512d650a601c4788
Bluetooth: fix oops in l2cap_connect_req

commit d793fe8caa3911e6a1e826b45d4ee00d250cdec8 upstream.

In error cases when the ACL is insecure or we fail to allocate a new
struct sock, we jump to the "response" label.  If so, "sk" will be
null and the kernel crashes.

Signed-off-by: Nathan Holstein <nathan.holstein@gmail.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/bluetooth/l2cap.c