* [PATCH BlueZ] gobex: Fix abort for SRM operation
@ 2025-10-09 7:11 Frédéric Danis
2025-10-09 8:56 ` [BlueZ] " bluez.test.bot
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Frédéric Danis @ 2025-10-09 7:11 UTC (permalink / raw)
To: linux-bluetooth
The OBEX Abort operation currently triggers an OBEX session
which prevents further OBEX operations:
obexd[327475]: obexd/client/transfer.c:obc_transfer_register()
0x50e000001380 registered
/org/bluez/obex/client/session0/transfer0
obexd[327475]: obexd/client/session.c:obc_session_ref() 0x50c0000010c0:
ref=3
obexd[327475]: obexd/client/session.c:obc_session_ref() 0x50c0000010c0:
ref=4
obexd[327475]: obexd/client/session.c:session_process_transfer()
Transfer(0x50e000001380) started
obexd[327475]: obexd/client/session.c:obc_session_unref() 0x50c0000010c0:
ref=3
obexd[327475]: Transfer(0x50e000001380) Error: Transfer cancelled by user
obexd[327475]: obexd/client/session.c:obc_session_ref() 0x50c0000010c0:
ref=4
obexd[327475]: obexd/client/transfer.c:obc_transfer_unregister()
0x50e000001380 unregistered
/org/bluez/obex/client/session0/transfer0
obexd[327475]: obexd/client/transfer.c:obc_transfer_free() 0x50e000001380
obexd[327475]: obexd/client/session.c:obc_session_unref() 0x50c0000010c0:
ref=3
obexd[327475]: obexd/client/session.c:obc_session_unref() 0x50c0000010c0:
ref=2
obexd[327475]: Unknown header offset for opcode 0x10
obexd[327475]: obexd/client/session.c:obc_session_shutdown()
0x50c0000010c0
obexd[327475]: obexd/client/session.c:obc_session_ref() 0x50c0000010c0:
ref=3
obexd[327475]: obexd/client/pbap.c:pbap_remove()
/org/bluez/obex/client/session0
obexd[327475]: obexd/client/session.c:obc_session_unref() 0x50c0000010c0:
ref=2
obexd[327475]: obexd/client/session.c:obc_session_unref() 0x50c0000010c0:
ref=1
obexd[327475]: obexd/client/session.c:session_unregistered()
Session(0x50c0000010c0) unregistered
/org/bluez/obex/client/session0
obexd[327475]: obexd/client/session.c:obc_session_unref() 0x50c0000010c0:
ref=0
As its highest bit is always set to 1, and so its value located after
G_OBEX_RSP_CONTINUE, the G_OBEX_OP_ABORT is part of the operations
constants.
This has been tested for PBAP and BIP-AVRCP with Android 15 and 16.
---
gobex/gobex.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gobex/gobex.c b/gobex/gobex.c
index 0e33ececf..df80d79f3 100644
--- a/gobex/gobex.c
+++ b/gobex/gobex.c
@@ -382,7 +382,7 @@ static void check_srm_final(GObex *obex, guint8 op)
case G_OBEX_OP_CONNECT:
return;
default:
- if (op <= G_OBEX_RSP_CONTINUE)
+ if (op <= G_OBEX_RSP_CONTINUE || op == G_OBEX_OP_ABORT)
return;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* RE: [BlueZ] gobex: Fix abort for SRM operation 2025-10-09 7:11 [PATCH BlueZ] gobex: Fix abort for SRM operation Frédéric Danis @ 2025-10-09 8:56 ` bluez.test.bot 2025-10-09 15:53 ` [PATCH BlueZ] " Luiz Augusto von Dentz 2025-10-09 19:40 ` patchwork-bot+bluetooth 2 siblings, 0 replies; 6+ messages in thread From: bluez.test.bot @ 2025-10-09 8:56 UTC (permalink / raw) To: linux-bluetooth, frederic.danis [-- Attachment #1: Type: text/plain, Size: 1262 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=1009611 ---Test result--- Test Summary: CheckPatch PENDING 0.29 seconds GitLint PENDING 0.30 seconds BuildEll PASS 18.02 seconds BluezMake PASS 4218.86 seconds MakeCheck PASS 19.77 seconds MakeDistcheck PASS 173.56 seconds CheckValgrind PASS 229.21 seconds CheckSmatch PASS 270.76 seconds bluezmakeextell PASS 123.13 seconds IncrementalBuild PENDING 0.38 seconds ScanBuild PASS 838.78 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] 6+ messages in thread
* Re: [PATCH BlueZ] gobex: Fix abort for SRM operation 2025-10-09 7:11 [PATCH BlueZ] gobex: Fix abort for SRM operation Frédéric Danis 2025-10-09 8:56 ` [BlueZ] " bluez.test.bot @ 2025-10-09 15:53 ` Luiz Augusto von Dentz 2025-10-09 15:58 ` Frédéric Danis 2025-10-09 19:40 ` patchwork-bot+bluetooth 2 siblings, 1 reply; 6+ messages in thread From: Luiz Augusto von Dentz @ 2025-10-09 15:53 UTC (permalink / raw) To: Frédéric Danis; +Cc: linux-bluetooth Hi Frederic, On Thu, Oct 9, 2025 at 3:13 AM Frédéric Danis <frederic.danis@collabora.com> wrote: > > The OBEX Abort operation currently triggers an OBEX session > which prevents further OBEX operations: > > obexd[327475]: obexd/client/transfer.c:obc_transfer_register() > 0x50e000001380 registered > /org/bluez/obex/client/session0/transfer0 > obexd[327475]: obexd/client/session.c:obc_session_ref() 0x50c0000010c0: > ref=3 > obexd[327475]: obexd/client/session.c:obc_session_ref() 0x50c0000010c0: > ref=4 > obexd[327475]: obexd/client/session.c:session_process_transfer() > Transfer(0x50e000001380) started > obexd[327475]: obexd/client/session.c:obc_session_unref() 0x50c0000010c0: > ref=3 > obexd[327475]: Transfer(0x50e000001380) Error: Transfer cancelled by user > obexd[327475]: obexd/client/session.c:obc_session_ref() 0x50c0000010c0: > ref=4 > obexd[327475]: obexd/client/transfer.c:obc_transfer_unregister() > 0x50e000001380 unregistered > /org/bluez/obex/client/session0/transfer0 > obexd[327475]: obexd/client/transfer.c:obc_transfer_free() 0x50e000001380 > obexd[327475]: obexd/client/session.c:obc_session_unref() 0x50c0000010c0: > ref=3 > obexd[327475]: obexd/client/session.c:obc_session_unref() 0x50c0000010c0: > ref=2 > obexd[327475]: Unknown header offset for opcode 0x10 > obexd[327475]: obexd/client/session.c:obc_session_shutdown() > 0x50c0000010c0 > obexd[327475]: obexd/client/session.c:obc_session_ref() 0x50c0000010c0: > ref=3 > obexd[327475]: obexd/client/pbap.c:pbap_remove() > /org/bluez/obex/client/session0 > obexd[327475]: obexd/client/session.c:obc_session_unref() 0x50c0000010c0: > ref=2 > obexd[327475]: obexd/client/session.c:obc_session_unref() 0x50c0000010c0: > ref=1 > obexd[327475]: obexd/client/session.c:session_unregistered() > Session(0x50c0000010c0) unregistered > /org/bluez/obex/client/session0 > obexd[327475]: obexd/client/session.c:obc_session_unref() 0x50c0000010c0: > ref=0 > > As its highest bit is always set to 1, and so its value located after > G_OBEX_RSP_CONTINUE, the G_OBEX_OP_ABORT is part of the operations > constants. > > This has been tested for PBAP and BIP-AVRCP with Android 15 and 16. > --- > gobex/gobex.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gobex/gobex.c b/gobex/gobex.c > index 0e33ececf..df80d79f3 100644 > --- a/gobex/gobex.c > +++ b/gobex/gobex.c > @@ -382,7 +382,7 @@ static void check_srm_final(GObex *obex, guint8 op) > case G_OBEX_OP_CONNECT: > return; > default: > - if (op <= G_OBEX_RSP_CONTINUE) > + if (op <= G_OBEX_RSP_CONTINUE || op == G_OBEX_OP_ABORT) Let's move it to a case statement as it was done with G_OBEX_OP_CONNECT. > return; > } > > -- > 2.43.0 > > -- Luiz Augusto von Dentz ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH BlueZ] gobex: Fix abort for SRM operation 2025-10-09 15:53 ` [PATCH BlueZ] " Luiz Augusto von Dentz @ 2025-10-09 15:58 ` Frédéric Danis 2025-10-09 17:15 ` Luiz Augusto von Dentz 0 siblings, 1 reply; 6+ messages in thread From: Frédéric Danis @ 2025-10-09 15:58 UTC (permalink / raw) To: Luiz Augusto von Dentz; +Cc: linux-bluetooth Hi Luiz, On 09/10/2025 17:53, Luiz Augusto von Dentz wrote: > Hi Frederic, > > On Thu, Oct 9, 2025 at 3:13 AM Frédéric Danis > <frederic.danis@collabora.com> wrote: >> The OBEX Abort operation currently triggers an OBEX session >> which prevents further OBEX operations: >> >> obexd[327475]: obexd/client/transfer.c:obc_transfer_register() >> 0x50e000001380 registered >> /org/bluez/obex/client/session0/transfer0 >> obexd[327475]: obexd/client/session.c:obc_session_ref() 0x50c0000010c0: >> ref=3 >> obexd[327475]: obexd/client/session.c:obc_session_ref() 0x50c0000010c0: >> ref=4 >> obexd[327475]: obexd/client/session.c:session_process_transfer() >> Transfer(0x50e000001380) started >> obexd[327475]: obexd/client/session.c:obc_session_unref() 0x50c0000010c0: >> ref=3 >> obexd[327475]: Transfer(0x50e000001380) Error: Transfer cancelled by user >> obexd[327475]: obexd/client/session.c:obc_session_ref() 0x50c0000010c0: >> ref=4 >> obexd[327475]: obexd/client/transfer.c:obc_transfer_unregister() >> 0x50e000001380 unregistered >> /org/bluez/obex/client/session0/transfer0 >> obexd[327475]: obexd/client/transfer.c:obc_transfer_free() 0x50e000001380 >> obexd[327475]: obexd/client/session.c:obc_session_unref() 0x50c0000010c0: >> ref=3 >> obexd[327475]: obexd/client/session.c:obc_session_unref() 0x50c0000010c0: >> ref=2 >> obexd[327475]: Unknown header offset for opcode 0x10 >> obexd[327475]: obexd/client/session.c:obc_session_shutdown() >> 0x50c0000010c0 >> obexd[327475]: obexd/client/session.c:obc_session_ref() 0x50c0000010c0: >> ref=3 >> obexd[327475]: obexd/client/pbap.c:pbap_remove() >> /org/bluez/obex/client/session0 >> obexd[327475]: obexd/client/session.c:obc_session_unref() 0x50c0000010c0: >> ref=2 >> obexd[327475]: obexd/client/session.c:obc_session_unref() 0x50c0000010c0: >> ref=1 >> obexd[327475]: obexd/client/session.c:session_unregistered() >> Session(0x50c0000010c0) unregistered >> /org/bluez/obex/client/session0 >> obexd[327475]: obexd/client/session.c:obc_session_unref() 0x50c0000010c0: >> ref=0 >> >> As its highest bit is always set to 1, and so its value located after >> G_OBEX_RSP_CONTINUE, the G_OBEX_OP_ABORT is part of the operations >> constants. >> >> This has been tested for PBAP and BIP-AVRCP with Android 15 and 16. >> --- >> gobex/gobex.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/gobex/gobex.c b/gobex/gobex.c >> index 0e33ececf..df80d79f3 100644 >> --- a/gobex/gobex.c >> +++ b/gobex/gobex.c >> @@ -382,7 +382,7 @@ static void check_srm_final(GObex *obex, guint8 op) >> case G_OBEX_OP_CONNECT: >> return; >> default: >> - if (op <= G_OBEX_RSP_CONTINUE) >> + if (op <= G_OBEX_RSP_CONTINUE || op == G_OBEX_OP_ABORT) > Let's move it to a case statement as it was done with G_OBEX_OP_CONNECT. The case for G_OBEX_OP_CONNECT is switched from obex->srm->op, while the test for G_OBEX_OP_ABORT is done on the op function parameter. I don't think it's useful to create a switch here. > >> return; >> } >> >> -- >> 2.43.0 >> >> > -- Frédéric Danis Senior Software Engineer Collabora Ltd. Platinum Building, St John's Innovation Park, Cambridge CB4 0DS, United Kingdom Registered in England & Wales, no. 5513718 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH BlueZ] gobex: Fix abort for SRM operation 2025-10-09 15:58 ` Frédéric Danis @ 2025-10-09 17:15 ` Luiz Augusto von Dentz 0 siblings, 0 replies; 6+ messages in thread From: Luiz Augusto von Dentz @ 2025-10-09 17:15 UTC (permalink / raw) To: Frédéric Danis; +Cc: linux-bluetooth Hi Frederic, On Thu, Oct 9, 2025 at 11:58 AM Frédéric Danis <frederic.danis@collabora.com> wrote: > > Hi Luiz, > > On 09/10/2025 17:53, Luiz Augusto von Dentz wrote: > > Hi Frederic, > > > > On Thu, Oct 9, 2025 at 3:13 AM Frédéric Danis > > <frederic.danis@collabora.com> wrote: > >> The OBEX Abort operation currently triggers an OBEX session > >> which prevents further OBEX operations: > >> > >> obexd[327475]: obexd/client/transfer.c:obc_transfer_register() > >> 0x50e000001380 registered > >> /org/bluez/obex/client/session0/transfer0 > >> obexd[327475]: obexd/client/session.c:obc_session_ref() 0x50c0000010c0: > >> ref=3 > >> obexd[327475]: obexd/client/session.c:obc_session_ref() 0x50c0000010c0: > >> ref=4 > >> obexd[327475]: obexd/client/session.c:session_process_transfer() > >> Transfer(0x50e000001380) started > >> obexd[327475]: obexd/client/session.c:obc_session_unref() 0x50c0000010c0: > >> ref=3 > >> obexd[327475]: Transfer(0x50e000001380) Error: Transfer cancelled by user > >> obexd[327475]: obexd/client/session.c:obc_session_ref() 0x50c0000010c0: > >> ref=4 > >> obexd[327475]: obexd/client/transfer.c:obc_transfer_unregister() > >> 0x50e000001380 unregistered > >> /org/bluez/obex/client/session0/transfer0 > >> obexd[327475]: obexd/client/transfer.c:obc_transfer_free() 0x50e000001380 > >> obexd[327475]: obexd/client/session.c:obc_session_unref() 0x50c0000010c0: > >> ref=3 > >> obexd[327475]: obexd/client/session.c:obc_session_unref() 0x50c0000010c0: > >> ref=2 > >> obexd[327475]: Unknown header offset for opcode 0x10 > >> obexd[327475]: obexd/client/session.c:obc_session_shutdown() > >> 0x50c0000010c0 > >> obexd[327475]: obexd/client/session.c:obc_session_ref() 0x50c0000010c0: > >> ref=3 > >> obexd[327475]: obexd/client/pbap.c:pbap_remove() > >> /org/bluez/obex/client/session0 > >> obexd[327475]: obexd/client/session.c:obc_session_unref() 0x50c0000010c0: > >> ref=2 > >> obexd[327475]: obexd/client/session.c:obc_session_unref() 0x50c0000010c0: > >> ref=1 > >> obexd[327475]: obexd/client/session.c:session_unregistered() > >> Session(0x50c0000010c0) unregistered > >> /org/bluez/obex/client/session0 > >> obexd[327475]: obexd/client/session.c:obc_session_unref() 0x50c0000010c0: > >> ref=0 > >> > >> As its highest bit is always set to 1, and so its value located after > >> G_OBEX_RSP_CONTINUE, the G_OBEX_OP_ABORT is part of the operations > >> constants. > >> > >> This has been tested for PBAP and BIP-AVRCP with Android 15 and 16. > >> --- > >> gobex/gobex.c | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> > >> diff --git a/gobex/gobex.c b/gobex/gobex.c > >> index 0e33ececf..df80d79f3 100644 > >> --- a/gobex/gobex.c > >> +++ b/gobex/gobex.c > >> @@ -382,7 +382,7 @@ static void check_srm_final(GObex *obex, guint8 op) > >> case G_OBEX_OP_CONNECT: > >> return; > >> default: > >> - if (op <= G_OBEX_RSP_CONTINUE) > >> + if (op <= G_OBEX_RSP_CONTINUE || op == G_OBEX_OP_ABORT) > > Let's move it to a case statement as it was done with G_OBEX_OP_CONNECT. > The case for G_OBEX_OP_CONNECT is switched from obex->srm->op, while the > test for G_OBEX_OP_ABORT is done on the op function parameter. > I don't think it's useful to create a switch here. My bad, I didn't pay attention to what opcode it was tested in the switch statement. > > > >> return; > >> } > >> > >> -- > >> 2.43.0 > >> > >> > > > > -- > Frédéric Danis > Senior Software Engineer > > Collabora Ltd. > Platinum Building, St John's Innovation Park, Cambridge CB4 0DS, United Kingdom > Registered in England & Wales, no. 5513718 > -- Luiz Augusto von Dentz ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH BlueZ] gobex: Fix abort for SRM operation 2025-10-09 7:11 [PATCH BlueZ] gobex: Fix abort for SRM operation Frédéric Danis 2025-10-09 8:56 ` [BlueZ] " bluez.test.bot 2025-10-09 15:53 ` [PATCH BlueZ] " Luiz Augusto von Dentz @ 2025-10-09 19:40 ` patchwork-bot+bluetooth 2 siblings, 0 replies; 6+ messages in thread From: patchwork-bot+bluetooth @ 2025-10-09 19:40 UTC (permalink / raw) To: =?utf-8?b?RnLDqWTDqXJpYyBEYW5pcyA8ZnJlZGVyaWMuZGFuaXNAY29sbGFib3JhLmNvbT4=?= Cc: linux-bluetooth Hello: This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>: On Thu, 9 Oct 2025 09:11:59 +0200 you wrote: > The OBEX Abort operation currently triggers an OBEX session > which prevents further OBEX operations: > > obexd[327475]: obexd/client/transfer.c:obc_transfer_register() > 0x50e000001380 registered > /org/bluez/obex/client/session0/transfer0 > obexd[327475]: obexd/client/session.c:obc_session_ref() 0x50c0000010c0: > ref=3 > obexd[327475]: obexd/client/session.c:obc_session_ref() 0x50c0000010c0: > ref=4 > obexd[327475]: obexd/client/session.c:session_process_transfer() > Transfer(0x50e000001380) started > obexd[327475]: obexd/client/session.c:obc_session_unref() 0x50c0000010c0: > ref=3 > obexd[327475]: Transfer(0x50e000001380) Error: Transfer cancelled by user > obexd[327475]: obexd/client/session.c:obc_session_ref() 0x50c0000010c0: > ref=4 > obexd[327475]: obexd/client/transfer.c:obc_transfer_unregister() > 0x50e000001380 unregistered > /org/bluez/obex/client/session0/transfer0 > obexd[327475]: obexd/client/transfer.c:obc_transfer_free() 0x50e000001380 > obexd[327475]: obexd/client/session.c:obc_session_unref() 0x50c0000010c0: > ref=3 > obexd[327475]: obexd/client/session.c:obc_session_unref() 0x50c0000010c0: > ref=2 > obexd[327475]: Unknown header offset for opcode 0x10 > obexd[327475]: obexd/client/session.c:obc_session_shutdown() > 0x50c0000010c0 > obexd[327475]: obexd/client/session.c:obc_session_ref() 0x50c0000010c0: > ref=3 > obexd[327475]: obexd/client/pbap.c:pbap_remove() > /org/bluez/obex/client/session0 > obexd[327475]: obexd/client/session.c:obc_session_unref() 0x50c0000010c0: > ref=2 > obexd[327475]: obexd/client/session.c:obc_session_unref() 0x50c0000010c0: > ref=1 > obexd[327475]: obexd/client/session.c:session_unregistered() > Session(0x50c0000010c0) unregistered > /org/bluez/obex/client/session0 > obexd[327475]: obexd/client/session.c:obc_session_unref() 0x50c0000010c0: > ref=0 > > [...] Here is the summary with links: - [BlueZ] gobex: Fix abort for SRM operation https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=273bf9cec70d 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] 6+ messages in thread
end of thread, other threads:[~2025-10-09 19:40 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-10-09 7:11 [PATCH BlueZ] gobex: Fix abort for SRM operation Frédéric Danis 2025-10-09 8:56 ` [BlueZ] " bluez.test.bot 2025-10-09 15:53 ` [PATCH BlueZ] " Luiz Augusto von Dentz 2025-10-09 15:58 ` Frédéric Danis 2025-10-09 17:15 ` Luiz Augusto von Dentz 2025-10-09 19:40 ` 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