diff mbox series

[v1,net-next] af_bluetooth: Don't hold sk_peer_lock in bt_sock_alloc().

Message ID 20240128104027.18868-1-kuniyu@amazon.com (mailing list archive)
State New, archived
Headers show
Series [v1,net-next] af_bluetooth: Don't hold sk_peer_lock in bt_sock_alloc(). | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/CheckPatch success CheckPatch PASS
tedd_an/GitLint fail WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search 1: T3 Title has trailing punctuation (.): "[v1,net-next] af_bluetooth: Don't hold sk_peer_lock in bt_sock_alloc()."
tedd_an/SubjectPrefix fail "Bluetooth: " prefix is not specified in the subject
tedd_an/BuildKernel success BuildKernel PASS
tedd_an/CheckAllWarning success CheckAllWarning PASS
tedd_an/CheckSparse warning CheckSparse WARNING net/bluetooth/af_bluetooth.c:221:25: warning: context imbalance in 'bt_accept_enqueue' - different lock contexts for basic block
tedd_an/CheckSmatch success CheckSparse PASS
tedd_an/BuildKernel32 success BuildKernel32 PASS
tedd_an/TestRunnerSetup success TestRunnerSetup PASS
tedd_an/TestRunner_l2cap-tester success TestRunner PASS
tedd_an/TestRunner_iso-tester success TestRunner PASS
tedd_an/TestRunner_bnep-tester success TestRunner PASS
tedd_an/TestRunner_mgmt-tester success TestRunner PASS
tedd_an/TestRunner_rfcomm-tester success TestRunner PASS
tedd_an/TestRunner_sco-tester success TestRunner PASS
tedd_an/TestRunner_ioctl-tester success TestRunner PASS
tedd_an/TestRunner_mesh-tester success TestRunner PASS
tedd_an/TestRunner_smp-tester success TestRunner PASS
tedd_an/TestRunner_userchan-tester success TestRunner PASS
tedd_an/IncrementalBuild success Incremental Build PASS

Commit Message

Kuniyuki Iwashima Jan. 28, 2024, 10:40 a.m. UTC
In bt_sock_alloc(), we need not lock sk_peer_lock because sk has
not been published to anywhere.

Let's not hold sk_peer_lock in bt_sock_alloc().

Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
---
 net/bluetooth/af_bluetooth.c | 2 --
 1 file changed, 2 deletions(-)

Comments

bluez.test.bot@gmail.com Jan. 28, 2024, 11:29 a.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=820613

---Test result---

Test Summary:
CheckPatch                    PASS      0.42 seconds
GitLint                       FAIL      0.47 seconds
SubjectPrefix                 FAIL      0.36 seconds
BuildKernel                   PASS      27.60 seconds
CheckAllWarning               PASS      30.33 seconds
CheckSparse                   WARNING   35.86 seconds
CheckSmatch                   PASS      98.25 seconds
BuildKernel32                 PASS      26.91 seconds
TestRunnerSetup               PASS      431.49 seconds
TestRunner_l2cap-tester       PASS      23.33 seconds
TestRunner_iso-tester         PASS      51.28 seconds
TestRunner_bnep-tester        PASS      6.88 seconds
TestRunner_mgmt-tester        PASS      159.22 seconds
TestRunner_rfcomm-tester      PASS      11.06 seconds
TestRunner_sco-tester         PASS      14.50 seconds
TestRunner_ioctl-tester       PASS      12.40 seconds
TestRunner_mesh-tester        PASS      8.80 seconds
TestRunner_smp-tester         PASS      9.87 seconds
TestRunner_userchan-tester    PASS      7.34 seconds
IncrementalBuild              PASS      26.72 seconds

Details
##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
[v1,net-next] af_bluetooth: Don't hold sk_peer_lock in bt_sock_alloc().

WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search
1: T3 Title has trailing punctuation (.): "[v1,net-next] af_bluetooth: Don't hold sk_peer_lock in bt_sock_alloc()."
##############################
Test: SubjectPrefix - FAIL
Desc: Check subject contains "Bluetooth" prefix
Output:
"Bluetooth: " prefix is not specified in the subject
##############################
Test: CheckSparse - WARNING
Desc: Run sparse tool with linux kernel
Output:
net/bluetooth/af_bluetooth.c:221:25: warning: context imbalance in 'bt_accept_enqueue' - different lock contexts for basic block


---
Regards,
Linux Bluetooth
diff mbox series

Patch

diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c
index b93464ac3517..6588654429ae 100644
--- a/net/bluetooth/af_bluetooth.c
+++ b/net/bluetooth/af_bluetooth.c
@@ -159,10 +159,8 @@  struct sock *bt_sock_alloc(struct net *net, struct socket *sock,
 
 	/* Init peer information so it can be properly monitored */
 	if (!kern) {
-		spin_lock(&sk->sk_peer_lock);
 		sk->sk_peer_pid  = get_pid(task_tgid(current));
 		sk->sk_peer_cred = get_current_cred();
-		spin_unlock(&sk->sk_peer_lock);
 	}
 
 	return sk;