From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932308AbcH3IXg (ORCPT ); Tue, 30 Aug 2016 04:23:36 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:34023 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751989AbcH3IXc (ORCPT ); Tue, 30 Aug 2016 04:23:32 -0400 MIME-Version: 1.0 In-Reply-To: <9f92cebe-284c-47b1-1e7d-1ed6581b20f4@nextfour.com> References: <9f92cebe-284c-47b1-1e7d-1ed6581b20f4@nextfour.com> From: Luiz Augusto von Dentz Date: Tue, 30 Aug 2016 11:23:30 +0300 Message-ID: Subject: Re: [PATCH] bluetooth, regression: MSG_TRUNC fixes To: =?UTF-8?Q?Mika_Penttil=C3=A4?= Cc: LKML , "linux-bluetooth@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id u7U8NeE9027682 Hi Mika, On Wed, Aug 24, 2016 at 1:13 PM, Mika Penttilä 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ä > --- > > 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