All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bluetooth, regression: MSG_TRUNC fixes
@ 2016-08-24 10:13 Mika Penttilä
  2016-08-30  8:23   ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 3+ messages in thread
From: Mika Penttilä @ 2016-08-24 10:13 UTC (permalink / raw)
  To: LKML, linux-bluetooth

Recent 4.8-rc changes to bluetooth MSG_TRUNC handling introduced regression; pairing finishes
but connecting profiles not. 

With the below fixes to MSG_TRUNC handling the connection is established normally.

--Mika


Signed-off-by: Mika Penttilä <mika.penttila@nextfour.com>
---

diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c
index ece45e0..0b5f729 100644
--- a/net/bluetooth/af_bluetooth.c
+++ b/net/bluetooth/af_bluetooth.c
@@ -250,7 +250,7 @@ int bt_sock_recvmsg(struct socket *sock, struct msghdr *msg, siz
 
        skb_free_datagram(sk, skb);
 
-       if (msg->msg_flags & MSG_TRUNC)
+       if (flags & MSG_TRUNC)
                copied = skblen;
 
        return err ? : copied;
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c
index 6ef8a01..96f04b7 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
 
        skb_free_datagram(sk, skb);
 
-       if (msg->msg_flags & MSG_TRUNC)
+       if (flags & MSG_TRUNC)
                copied = skblen;
 
        return err ? : copied;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] bluetooth, regression: MSG_TRUNC fixes
  2016-08-24 10:13 [PATCH] bluetooth, regression: MSG_TRUNC fixes Mika Penttilä
@ 2016-08-30  8:23   ` Luiz Augusto von Dentz
  0 siblings, 0 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2016-08-30  8:23 UTC (permalink / raw)
  To: Mika Penttilä; +Cc: LKML, linux-bluetooth

Hi Mika,

On Wed, Aug 24, 2016 at 1:13 PM, Mika Penttilä
<mika.penttila@nextfour.com> wrote:
> Recent 4.8-rc changes to bluetooth MSG_TRUNC handling introduced regression; pairing finishes
> but connecting profiles not.
>
> With the below fixes to MSG_TRUNC handling the connection is established normally.
>
> --Mika
>
>
> Signed-off-by: Mika Penttilä <mika.penttila@nextfour.com>
> ---
>
> diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c
> index ece45e0..0b5f729 100644
> --- a/net/bluetooth/af_bluetooth.c
> +++ b/net/bluetooth/af_bluetooth.c
> @@ -250,7 +250,7 @@ int bt_sock_recvmsg(struct socket *sock, struct msghdr *msg, siz
>
>         skb_free_datagram(sk, skb);
>
> -       if (msg->msg_flags & MSG_TRUNC)
> +       if (flags & MSG_TRUNC)
>                 copied = skblen;
>
>         return err ? : copied;
> diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c
> index 6ef8a01..96f04b7 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
>
>         skb_free_datagram(sk, skb);
>
> -       if (msg->msg_flags & MSG_TRUNC)
> +       if (flags & MSG_TRUNC)
>                 copied = skblen;
>
>         return err ? : copied;
> --

I believe similar patches already went to bluetooth-next so it should
be in the way if not already merged.

-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] bluetooth, regression: MSG_TRUNC fixes
@ 2016-08-30  8:23   ` Luiz Augusto von Dentz
  0 siblings, 0 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2016-08-30  8:23 UTC (permalink / raw)
  To: Mika Penttilä; +Cc: LKML, linux-bluetooth

Hi Mika,

On Wed, Aug 24, 2016 at 1:13 PM, Mika Penttil=C3=A4
<mika.penttila@nextfour.com> wrote:
> Recent 4.8-rc changes to bluetooth MSG_TRUNC handling introduced regressi=
on; pairing finishes
> but connecting profiles not.
>
> With the below fixes to MSG_TRUNC handling the connection is established =
normally.
>
> --Mika
>
>
> Signed-off-by: Mika Penttil=C3=A4 <mika.penttila@nextfour.com>
> ---
>
> diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c
> index ece45e0..0b5f729 100644
> --- a/net/bluetooth/af_bluetooth.c
> +++ b/net/bluetooth/af_bluetooth.c
> @@ -250,7 +250,7 @@ int bt_sock_recvmsg(struct socket *sock, struct msghd=
r *msg, siz
>
>         skb_free_datagram(sk, skb);
>
> -       if (msg->msg_flags & MSG_TRUNC)
> +       if (flags & MSG_TRUNC)
>                 copied =3D skblen;
>
>         return err ? : copied;
> diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c
> index 6ef8a01..96f04b7 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, st=
ruct msghdr
>
>         skb_free_datagram(sk, skb);
>
> -       if (msg->msg_flags & MSG_TRUNC)
> +       if (flags & MSG_TRUNC)
>                 copied =3D skblen;
>
>         return err ? : copied;
> --

I believe similar patches already went to bluetooth-next so it should
be in the way if not already merged.

--=20
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-08-30  8:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-24 10:13 [PATCH] bluetooth, regression: MSG_TRUNC fixes Mika Penttilä
2016-08-30  8:23 ` Luiz Augusto von Dentz
2016-08-30  8:23   ` Luiz Augusto von Dentz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.