Browse Source

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>
Luiz Augusto von Dentz 9 years ago
parent
commit
4f34228b67
1 changed files with 1 additions and 1 deletions
  1. 1 1
      net/bluetooth/hci_sock.c

+ 1 - 1
net/bluetooth/hci_sock.c

@@ -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;