Skip to content

Commit

Permalink
Bluetooth: Fix hci_sock_recvmsg when MSG_TRUNC is not set
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Luiz Augusto von Dentz authored and Marcel Holtmann committed Aug 25, 2016
1 parent 90a56f7 commit 4f34228
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/bluetooth/hci_sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4f34228

Please sign in to comment.