linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH BlueZ v1] shared/att: Fix failing to set security level
@ 2024-11-19 16:37 Luiz Augusto von Dentz
  2024-11-19 17:43 ` [BlueZ,v1] " bluez.test.bot
  2024-11-19 18:40 ` [PATCH BlueZ v1] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2024-11-19 16:37 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

bt_att_chan_set_security attempts to set BT_SECURITY without first
checking what is the current security level which may cause errors
since the kernel does actually return -EINVAL when the security doesn't
change.
---
 src/shared/att.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/shared/att.c b/src/shared/att.c
index 4a406f4b91a4..dabbdb4315eb 100644
--- a/src/shared/att.c
+++ b/src/shared/att.c
@@ -727,6 +727,9 @@ static bool bt_att_chan_set_security(struct bt_att_chan *chan, int level)
 {
 	struct bt_security sec;
 
+	if (level == bt_att_chan_get_security(chan))
+		return true;
+
 	if (chan->type == BT_ATT_LOCAL) {
 		chan->sec_level = level;
 		return true;
-- 
2.47.0


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

* RE: [BlueZ,v1] shared/att: Fix failing to set security level
  2024-11-19 16:37 [PATCH BlueZ v1] shared/att: Fix failing to set security level Luiz Augusto von Dentz
@ 2024-11-19 17:43 ` bluez.test.bot
  2024-11-19 18:40 ` [PATCH BlueZ v1] " patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2024-11-19 17:43 UTC (permalink / raw)
  To: linux-bluetooth, luiz.dentz

[-- Attachment #1: Type: text/plain, Size: 1261 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=911015

---Test result---

Test Summary:
CheckPatch                    PENDING   0.25 seconds
GitLint                       PENDING   0.23 seconds
BuildEll                      PASS      21.09 seconds
BluezMake                     PASS      1713.45 seconds
MakeCheck                     PASS      13.66 seconds
MakeDistcheck                 PASS      164.68 seconds
CheckValgrind                 PASS      219.81 seconds
CheckSmatch                   PASS      279.14 seconds
bluezmakeextell               PASS      101.44 seconds
IncrementalBuild              PENDING   0.26 seconds
ScanBuild                     PASS      878.10 seconds

Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:

##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:

##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:



---
Regards,
Linux Bluetooth


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

* Re: [PATCH BlueZ v1] shared/att: Fix failing to set security level
  2024-11-19 16:37 [PATCH BlueZ v1] shared/att: Fix failing to set security level Luiz Augusto von Dentz
  2024-11-19 17:43 ` [BlueZ,v1] " bluez.test.bot
@ 2024-11-19 18:40 ` patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2024-11-19 18:40 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: linux-bluetooth

Hello:

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

On Tue, 19 Nov 2024 11:37:31 -0500 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> bt_att_chan_set_security attempts to set BT_SECURITY without first
> checking what is the current security level which may cause errors
> since the kernel does actually return -EINVAL when the security doesn't
> change.
> 
> [...]

Here is the summary with links:
  - [BlueZ,v1] shared/att: Fix failing to set security level
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=5c65356cae64

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2024-11-19 18:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-19 16:37 [PATCH BlueZ v1] shared/att: Fix failing to set security level Luiz Augusto von Dentz
2024-11-19 17:43 ` [BlueZ,v1] " bluez.test.bot
2024-11-19 18:40 ` [PATCH BlueZ v1] " patchwork-bot+bluetooth

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