Skip to contentSkip to conversation

Bluetooth: Fix hci_sock_recvmsg when MSG_TRUNC is not set

PATCH In review Luiz Augusto von Dentz 2 participants 2 messages Aug 15, 2016

Subsystems (2)
lore
Share & tools
lore

Luiz Augusto von Dentz

author maintainer
#0 lore raw

PATCH 1/1 Bluetooth: Fix hci_sock_recvmsg when MSG_TRUNC is not set

From: Luiz Augusto von Dentz <[email protected]>

Similar to bt_sock_recvmsg MSG_TRUNC shall be checked using the original flags not msg_flags.

---
 net/bluetooth/hci_sock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/bluetooth/hci_sock.c +1 -1
index 6ef8a01..96f04b7 100644
@@ -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;
Signature · 1 line
2.7.4
maintainer
#1 lore raw

Hi Luiz,

Quoted 7 lines

Similar to bt_sock_recvmsg MSG_TRUNC shall be checked using the original flags not msg_flags.

---
net/bluetooth/hci_sock.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)

patch has been applied to bluetooth-stable tree.

Regards

Marcel