[PW_SID:1126083] [1/2] Bluetooth: L2CAP: avoid maybe-return-locked and add locking annotations#426
[PW_SID:1126083] [1/2] Bluetooth: L2CAP: avoid maybe-return-locked and add locking annotations#426BluezTestBot wants to merge 2 commits into
Conversation
Replace the maybe-return-locked behavior of l2cap_get_chan_by_scid/dcid() by doing locking in the caller after NULL check. This allows the static context analysis to handle this. No functional change intended. Add context analysis annotations related to l2cap_chan_lock/unlock(). Signed-off-by: Pauli Virtanen <pav@iki.fi>
Remove context analysis suppression for include/net/bluetooth/*, now that previous commits have resolved the warnings. Signed-off-by: Pauli Virtanen <pav@iki.fi>
|
CheckPatch |
|
VerifyFixes |
|
VerifySignedoff |
|
GitLint |
|
SubjectPrefix |
|
BuildKernel |
|
CheckAllWarning |
|
CheckSparse |
|
BuildKernel32 |
|
CheckKernelLLVM |
|
TestRunnerSetup |
|
TestRunner_l2cap-tester |
|
TestRunner_iso-tester |
|
TestRunner_bnep-tester |
|
TestRunner_mgmt-tester |
|
TestRunner_rfcomm-tester |
|
TestRunner_sco-tester |
|
TestRunner_ioctl-tester |
|
TestRunner_mesh-tester |
|
TestRunner_smp-tester |
|
TestRunner_userchan-tester |
|
TestRunner_6lowpan-tester |
|
IncrementalBuild |
Replace the maybe-return-locked behavior of
l2cap_get_chan_by_scid/dcid() by doing locking in the caller after NULL
check. This allows the static context analysis to handle this. No
functional change intended.
Add context analysis annotations related to l2cap_chan_lock/unlock().
Signed-off-by: Pauli Virtanen pav@iki.fi
Notes:
Possibly the l2cap_ops::alloc_skb callback should have generally
__must_hold(&chan->lock) and not just in l2cap_sock.c
include/net/bluetooth/l2cap.h | 2 ++
net/bluetooth/l2cap_core.c | 25 +++++++++++++++++--------
net/bluetooth/l2cap_sock.c | 1 +
3 files changed, 20 insertions(+), 8 deletions(-)