diff mbox series

linux-next: build failure after merge of the bluetooth tree

Message ID 20200727134433.1c4ea34e@canb.auug.org.au
State Not Applicable
Delegated to: David Miller
Headers show
Series linux-next: build failure after merge of the bluetooth tree | expand

Commit Message

Stephen Rothwell July 27, 2020, 3:44 a.m. UTC
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 <sfr@canb.auug.org.au>
Date: Mon, 27 Jul 2020 13:41:30 +1000
Subject: [PATCH] Bluetooth: fix for introduction of sockptr_t

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 net/bluetooth/sco.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Christoph Hellwig July 27, 2020, 5:22 a.m. UTC | #1
The fixup looks good to me, thanks.
Alain Michaud July 27, 2020, 1:28 p.m. UTC | #2
Same here, thanks for the fix!


On Mon, Jul 27, 2020 at 1:22 AM Christoph Hellwig <hch@lst.de> wrote:
>
> The fixup looks good to me, thanks.
diff mbox series

Patch

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;
 		}