aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2015-04-17 16:34:18 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-18 11:01:08 -0400
commit1f5014d6a77513fa7cefe30eb7791d5856c04384 (patch)
treeeabace3c7c92ce8572e933eb7e5e65f99d6c5aa0 /net/bluetooth
parent7505256626b0b3d11ea5a3ec1a89046d07c3c366 (diff)
Bluetooth: hidp: Fix regression with older userspace and flags validation
While it is not used by newer userspace anymore, the older userspace was utilizing HIDP_VIRTUAL_CABLE_UNPLUG and HIDP_BOOT_PROTOCOL_MODE flags when adding a new HIDP connection. The flags validation is important, but we can not break older userspace and with that allow providing these flags even if newer userspace does not use them anymore. Reported-and-tested-by: Jörg Otte <jrg.otte@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/hidp/core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c
index a05b9dbf14c9..9070dfd6b4ad 100644
--- a/net/bluetooth/hidp/core.c
+++ b/net/bluetooth/hidp/core.c
@@ -1313,7 +1313,8 @@ int hidp_connection_add(struct hidp_connadd_req *req,
1313 struct socket *ctrl_sock, 1313 struct socket *ctrl_sock,
1314 struct socket *intr_sock) 1314 struct socket *intr_sock)
1315{ 1315{
1316 u32 valid_flags = 0; 1316 u32 valid_flags = BIT(HIDP_VIRTUAL_CABLE_UNPLUG) |
1317 BIT(HIDP_BOOT_PROTOCOL_MODE);
1317 struct hidp_session *session; 1318 struct hidp_session *session;
1318 struct l2cap_conn *conn; 1319 struct l2cap_conn *conn;
1319 struct l2cap_chan *chan; 1320 struct l2cap_chan *chan;