Blob Blame History Raw
From: Takashi Iwai <tiwai@suse.de>
Subject: kABI workaround for bt_accept_enqueue() change
Patch-mainline: Never, kABI fix
References: bsc#1051510

The patch
  patches.drivers/Bluetooth-Fix-locking-in-bt_accept_enqueue-for-BH-co.patch
introduced a new argument bt_accept_enqueue().  Rename it and provide
the old function as is for kABI compatibility.

Signed-off-by: Takashi Iwai <tiwai@suse.de>

---
 include/net/bluetooth/bluetooth.h |    3 ++-
 net/bluetooth/af_bluetooth.c      |    8 +++++++-
 net/bluetooth/l2cap_sock.c        |    2 +-
 net/bluetooth/rfcomm/sock.c       |    2 +-
 net/bluetooth/sco.c               |    2 +-
 5 files changed, 12 insertions(+), 5 deletions(-)

--- a/include/net/bluetooth/bluetooth.h
+++ b/include/net/bluetooth/bluetooth.h
@@ -273,7 +273,8 @@ int  bt_sock_ioctl(struct socket *sock,
 int  bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo);
 int  bt_sock_wait_ready(struct sock *sk, unsigned long flags);
 
-void bt_accept_enqueue(struct sock *parent, struct sock *sk, bool bh);
+void bt_accept_enqueue(struct sock *parent, struct sock *sk); /* for SLE15 kABI compatibility */
+void __bt_accept_enqueue(struct sock *parent, struct sock *sk, bool bh);
 void bt_accept_unlink(struct sock *sk);
 struct sock *bt_accept_dequeue(struct sock *parent, struct socket *newsock);
 
--- a/net/bluetooth/af_bluetooth.c
+++ b/net/bluetooth/af_bluetooth.c
@@ -154,7 +154,7 @@ void bt_sock_unlink(struct bt_sock_list
 }
 EXPORT_SYMBOL(bt_sock_unlink);
 
-void bt_accept_enqueue(struct sock *parent, struct sock *sk, bool bh)
+void __bt_accept_enqueue(struct sock *parent, struct sock *sk, bool bh)
 {
 	BT_DBG("parent %p, sk %p", parent, sk);
 
@@ -175,6 +175,12 @@ void bt_accept_enqueue(struct sock *pare
 
 	parent->sk_ack_backlog++;
 }
+EXPORT_SYMBOL(__bt_accept_enqueue);
+
+void bt_accept_enqueue(struct sock *parent, struct sock *sk)
+{
+	__bt_accept_enqueue(parent, sk, false);
+}
 EXPORT_SYMBOL(bt_accept_enqueue);
 
 /* Calling function must hold the sk lock.
--- a/net/bluetooth/l2cap_sock.c
+++ b/net/bluetooth/l2cap_sock.c
@@ -1252,7 +1252,7 @@ static struct l2cap_chan *l2cap_sock_new
 
 	l2cap_sock_init(sk, parent);
 
-	bt_accept_enqueue(parent, sk, false);
+	__bt_accept_enqueue(parent, sk, false);
 
 	release_sock(parent);
 
--- a/net/bluetooth/rfcomm/sock.c
+++ b/net/bluetooth/rfcomm/sock.c
@@ -987,7 +987,7 @@ int rfcomm_connect_ind(struct rfcomm_ses
 	rfcomm_pi(sk)->channel = channel;
 
 	sk->sk_state = BT_CONFIG;
-	bt_accept_enqueue(parent, sk, true);
+	__bt_accept_enqueue(parent, sk, true);
 
 	/* Accept connection and return socket DLC */
 	*d = rfcomm_pi(sk)->dlc;
--- a/net/bluetooth/sco.c
+++ b/net/bluetooth/sco.c
@@ -193,7 +193,7 @@ static void __sco_chan_add(struct sco_co
 	conn->sk = sk;
 
 	if (parent)
-		bt_accept_enqueue(parent, sk, true);
+		__bt_accept_enqueue(parent, sk, true);
 }
 
 static int sco_chan_add(struct sco_conn *conn, struct sock *sk,