2022-08-03 17:26:23

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: [PATCH] Bluetooth: ISO: Fix iso_sock_getsockopt for BT_DEFER_SETUP

From: Luiz Augusto von Dentz <[email protected]>

BT_DEFER_SETUP shall be considered valid for all states except for
BT_CONNECTED as it is also used when initiated a connection rather then
only for BT_BOUND and BT_LISTEN.

Fixes: ccf74f2390d6 ("Bluetooth: Add BTPROTO_ISO socket type")
Signed-off-by: Luiz Augusto von Dentz <[email protected]>
---
net/bluetooth/iso.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/bluetooth/iso.c b/net/bluetooth/iso.c
index 70c2dd30cb13..015d1b41bc32 100644
--- a/net/bluetooth/iso.c
+++ b/net/bluetooth/iso.c
@@ -1251,7 +1251,7 @@ static int iso_sock_getsockopt(struct socket *sock, int level, int optname,

switch (optname) {
case BT_DEFER_SETUP:
- if (sk->sk_state != BT_BOUND && sk->sk_state != BT_LISTEN) {
+ if (sk->sk_state == BT_CONNECTED) {
err = -EINVAL;
break;
}
--
2.37.1



2022-08-03 18:14:03

by bluez.test.bot

[permalink] [raw]
Subject: RE: Bluetooth: ISO: Fix iso_sock_getsockopt for BT_DEFER_SETUP

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=665135

---Test result---

Test Summary:
CheckPatch PASS 1.69 seconds
GitLint PASS 1.04 seconds
SubjectPrefix PASS 0.86 seconds
BuildKernel PASS 32.87 seconds
BuildKernel32 PASS 28.42 seconds
Incremental Build with patchesPASS 41.15 seconds
TestRunner: Setup PASS 477.39 seconds
TestRunner: l2cap-tester PASS 17.13 seconds
TestRunner: bnep-tester PASS 6.41 seconds
TestRunner: mgmt-tester PASS 98.63 seconds
TestRunner: rfcomm-tester PASS 9.64 seconds
TestRunner: sco-tester PASS 9.45 seconds
TestRunner: smp-tester PASS 9.38 seconds
TestRunner: userchan-tester PASS 6.53 seconds



---
Regards,
Linux Bluetooth

2022-08-04 00:10:50

by patchwork-bot+bluetooth

[permalink] [raw]
Subject: Re: [PATCH] Bluetooth: ISO: Fix iso_sock_getsockopt for BT_DEFER_SETUP

Hello:

This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <[email protected]>:

On Wed, 3 Aug 2022 10:20:06 -0700 you wrote:
> From: Luiz Augusto von Dentz <[email protected]>
>
> BT_DEFER_SETUP shall be considered valid for all states except for
> BT_CONNECTED as it is also used when initiated a connection rather then
> only for BT_BOUND and BT_LISTEN.
>
> Fixes: ccf74f2390d6 ("Bluetooth: Add BTPROTO_ISO socket type")
> Signed-off-by: Luiz Augusto von Dentz <[email protected]>
>
> [...]

Here is the summary with links:
- Bluetooth: ISO: Fix iso_sock_getsockopt for BT_DEFER_SETUP
https://git.kernel.org/bluetooth/bluetooth-next/c/8a3fd9bb4fac

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html