From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: "Mika Penttilä" <mika.penttila@nextfour.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
"linux-bluetooth@vger.kernel.org"
<linux-bluetooth@vger.kernel.org>
Subject: Re: [PATCH] bluetooth, regression: MSG_TRUNC fixes
Date: Tue, 30 Aug 2016 11:23:30 +0300 [thread overview]
Message-ID: <CABBYNZLtFB9HWXs_Z+CsHJ9pP=NZ_rm8bhx5ng5Cu_LtHJu2kA@mail.gmail.com> (raw)
In-Reply-To: <9f92cebe-284c-47b1-1e7d-1ed6581b20f4@nextfour.com>
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
prev parent reply other threads:[~2016-08-30 8:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-24 10:13 [PATCH] bluetooth, regression: MSG_TRUNC fixes Mika Penttilä
2016-08-30 8:23 ` Luiz Augusto von Dentz [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CABBYNZLtFB9HWXs_Z+CsHJ9pP=NZ_rm8bhx5ng5Cu_LtHJu2kA@mail.gmail.com' \
--to=luiz.dentz@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.penttila@nextfour.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).