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 <[email protected]>
---
net/bluetooth/af_bluetooth.c | 2 --
1 file changed, 2 deletions(-)
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;
--
2.30.2
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