linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 net-next] af_bluetooth: Don't hold sk_peer_lock in bt_sock_alloc().
@ 2024-01-28 10:40 Kuniyuki Iwashima
  2024-01-28 11:29 ` [v1,net-next] " bluez.test.bot
  0 siblings, 1 reply; 2+ messages in thread
From: Kuniyuki Iwashima @ 2024-01-28 10:40 UTC (permalink / raw)
  To: Marcel Holtmann, Johan Hedberg, Luiz Augusto von Dentz
  Cc: Kuniyuki Iwashima, Kuniyuki Iwashima, linux-bluetooth

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(-)

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* RE: [v1,net-next] af_bluetooth: Don't hold sk_peer_lock in bt_sock_alloc().
  2024-01-28 10:40 [PATCH v1 net-next] af_bluetooth: Don't hold sk_peer_lock in bt_sock_alloc() Kuniyuki Iwashima
@ 2024-01-28 11:29 ` bluez.test.bot
  0 siblings, 0 replies; 2+ messages in thread
From: bluez.test.bot @ 2024-01-28 11:29 UTC (permalink / raw)
  To: linux-bluetooth, kuniyu

[-- Attachment #1: Type: text/plain, Size: 2460 bytes --]

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-01-28 11:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-28 10:40 [PATCH v1 net-next] af_bluetooth: Don't hold sk_peer_lock in bt_sock_alloc() Kuniyuki Iwashima
2024-01-28 11:29 ` [v1,net-next] " bluez.test.bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).