diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2016-08-15 09:02:20 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2016-08-25 14:58:47 -0400 |
commit | 4f34228b67246ae3b3ab1dc33b980c77c0650ef4 (patch) | |
tree | b644046272d04e166febcc1870eb8f05cc9cd6d0 | |
parent | 90a56f72edb088c678083c32d05936c7c8d9a948 (diff) |
Bluetooth: Fix hci_sock_recvmsg when MSG_TRUNC is not set
Similar to bt_sock_recvmsg MSG_TRUNC shall be checked using the original
flags not msg_flags.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
-rw-r--r-- | net/bluetooth/hci_sock.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c index 6ef8a01a9ad4..96f04b7b9556 100644 --- a/net/bluetooth/hci_sock.c +++ b/net/bluetooth/hci_sock.c | |||
@@ -1091,7 +1091,7 @@ static int hci_sock_recvmsg(struct socket *sock, struct msghdr *msg, | |||
1091 | 1091 | ||
1092 | skb_free_datagram(sk, skb); | 1092 | skb_free_datagram(sk, skb); |
1093 | 1093 | ||
1094 | if (msg->msg_flags & MSG_TRUNC) | 1094 | if (flags & MSG_TRUNC) |
1095 | copied = skblen; | 1095 | copied = skblen; |
1096 | 1096 | ||
1097 | return err ? : copied; | 1097 | return err ? : copied; |