diff mbox series

Bluetooth: ISO: Fix iso_sock_getsockopt for BT_DEFER_SETUP

Message ID 20220803172006.2951684-1-luiz.dentz@gmail.com (mailing list archive)
State Accepted
Commit 8a3fd9bb4fac67ad5d44d6540c7ac20004767076
Headers show
Series Bluetooth: ISO: Fix iso_sock_getsockopt for BT_DEFER_SETUP | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/checkpatch success Checkpatch PASS
tedd_an/gitlint success Gitlint PASS
tedd_an/subjectprefix success PASS
tedd_an/buildkernel success Build Kernel PASS
tedd_an/buildkernel32 success Build Kernel32 PASS
tedd_an/incremental_build success Pass
tedd_an/testrunnersetup success Test Runner Setup PASS
tedd_an/testrunnerl2cap-tester success Total: 40, Passed: 40 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnerbnep-tester success Total: 1, Passed: 1 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnermgmt-tester success Total: 494, Passed: 494 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnerrfcomm-tester success Total: 10, Passed: 10 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnersco-tester success Total: 12, Passed: 12 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnersmp-tester success Total: 8, Passed: 8 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunneruserchan-tester success Total: 4, Passed: 4 (100.0%), Failed: 0, Not Run: 0

Commit Message

Luiz Augusto von Dentz Aug. 3, 2022, 5:20 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

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 <luiz.von.dentz@intel.com>
---
 net/bluetooth/iso.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

bluez.test.bot@gmail.com Aug. 3, 2022, 6:09 p.m. UTC | #1
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
patchwork-bot+bluetooth@kernel.org Aug. 4, 2022, 12:10 a.m. UTC | #2
Hello:

This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Wed,  3 Aug 2022 10:20:06 -0700 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> 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 <luiz.von.dentz@intel.com>
> 
> [...]

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!
diff mbox series

Patch

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