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>
This commit is contained in:
Luiz Augusto von Dentz 2016-08-15 16:02:20 +03:00 committed by Marcel Holtmann
parent 90a56f72ed
commit 4f34228b67

View File

@ -1091,7 +1091,7 @@ static int hci_sock_recvmsg(struct socket *sock, struct msghdr *msg,
skb_free_datagram(sk, skb);
if (msg->msg_flags & MSG_TRUNC)
if (flags & MSG_TRUNC)
copied = skblen;
return err ? : copied;