2020-07-27 03:47:47

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build failure after merge of the bluetooth tree

Hi all,

After merging the bluetooth tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:

net/bluetooth/sco.c: In function 'sco_sock_setsockopt':
net/bluetooth/sco.c:862:3: error: cannot convert to a pointer type
862 | if (get_user(opt, (u32 __user *)optval)) {
| ^~
net/bluetooth/sco.c:862:3: error: cannot convert to a pointer type
net/bluetooth/sco.c:862:3: error: cannot convert to a pointer type

Caused by commit

00398e1d5183 ("Bluetooth: Add support for BT_PKT_STATUS CMSG data for SCO connections")

interacting with commit

a7b75c5a8c41 ("net: pass a sockptr_t into ->setsockopt")

from the net-next tree.

I have applied the following merge fix patch:

From: Stephen Rothwell <[email protected]>
Date: Mon, 27 Jul 2020 13:41:30 +1000
Subject: [PATCH] Bluetooth: fix for introduction of sockptr_t

Signed-off-by: Stephen Rothwell <[email protected]>
---
net/bluetooth/sco.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c
index 6e6b03844a2a..dcf7f96ff417 100644
--- a/net/bluetooth/sco.c
+++ b/net/bluetooth/sco.c
@@ -859,7 +859,7 @@ static int sco_sock_setsockopt(struct socket *sock, int level, int optname,
break;

case BT_PKT_STATUS:
- if (get_user(opt, (u32 __user *)optval)) {
+ if (copy_from_sockptr(&opt, optval, sizeof(u32))) {
err = -EFAULT;
break;
}
--
2.27.0

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2020-07-27 05:25:48

by Christoph Hellwig

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the bluetooth tree

The fixup looks good to me, thanks.

2020-07-27 13:53:50

by Alain Michaud

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the bluetooth tree

Same here, thanks for the fix!


On Mon, Jul 27, 2020 at 1:22 AM Christoph Hellwig <[email protected]> wrote:
>
> The fixup looks good to me, thanks.