summaryrefslogtreecommitdiff
path: root/net/bluetooth/cmtp/core.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-01-19 07:06:01 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-01-19 07:06:01 +0800
commit0e08365f0b487279f1698e079e08d526fb4f24de (patch)
treef1a95e06617e7bcf3c7e4e90f4010d04565f68f9 /net/bluetooth/cmtp/core.c
parent1d97869198a36dfc2920abd5776d91767fbead63 (diff)
parentec6f34e5b552fb0a52e6aae1a5afbbb1605cc6cc (diff)
Merge 3.19-rc5 into usb-next
We want the usb fixes in this branch as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/bluetooth/cmtp/core.c')
-rw-r--r--net/bluetooth/cmtp/core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bluetooth/cmtp/core.c b/net/bluetooth/cmtp/core.c
index 67fe5e84e68f..278a194e6af4 100644
--- a/net/bluetooth/cmtp/core.c
+++ b/net/bluetooth/cmtp/core.c
@@ -334,6 +334,9 @@ int cmtp_add_connection(struct cmtp_connadd_req *req, struct socket *sock)
BT_DBG("");
+ if (!l2cap_is_socket(sock))
+ return -EBADFD;
+
session = kzalloc(sizeof(struct cmtp_session), GFP_KERNEL);
if (!session)
return -ENOMEM;