* [PATCH BlueZ v2] device: Clear pending_flags on error
@ 2025-01-28 11:56 Ludovico de Nittis
2025-01-28 13:23 ` [BlueZ,v2] " bluez.test.bot
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Ludovico de Nittis @ 2025-01-28 11:56 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Ludovico de Nittis
If setting WakeAllowed, or the device privacy, fails, we may end up in a
situation where `pending_flags` is still set to some `DEVICE_FLAG_*`
values, for example from `device_set_wake_allowed()` or
`adapter_set_device_flags()`.
This can confuse further requests because they'll assume that there is
still a pending request in progress.
---
src/adapter.c | 1 +
src/device.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/src/adapter.c b/src/adapter.c
index 5d4117a49..3eb343cbc 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -5580,6 +5580,7 @@ static void set_device_privacy_complete(uint8_t status, uint16_t length,
if (status != MGMT_STATUS_SUCCESS) {
error("Set device flags return status: %s",
mgmt_errstr(status));
+ btd_device_set_pending_flags(dev, 0);
return;
}
diff --git a/src/device.c b/src/device.c
index e8bff718c..3c2337198 100644
--- a/src/device.c
+++ b/src/device.c
@@ -1575,6 +1575,7 @@ static void set_wake_allowed_complete(uint8_t status, uint16_t length,
dev->wake_id = -1U;
}
dev->pending_wake_allowed = FALSE;
+ dev->pending_flags = 0;
return;
}
--
2.48.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* RE: [BlueZ,v2] device: Clear pending_flags on error
2025-01-28 11:56 [PATCH BlueZ v2] device: Clear pending_flags on error Ludovico de Nittis
@ 2025-01-28 13:23 ` bluez.test.bot
2025-02-14 11:22 ` [PATCH BlueZ v2] " Ludovico de Nittis
2025-02-14 16:00 ` patchwork-bot+bluetooth
2 siblings, 0 replies; 5+ messages in thread
From: bluez.test.bot @ 2025-01-28 13:23 UTC (permalink / raw)
To: linux-bluetooth, ludovico.denittis
[-- Attachment #1: Type: text/plain, Size: 1260 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=928815
---Test result---
Test Summary:
CheckPatch PENDING 0.31 seconds
GitLint PENDING 0.39 seconds
BuildEll PASS 20.10 seconds
BluezMake PASS 1497.09 seconds
MakeCheck PASS 12.96 seconds
MakeDistcheck PASS 157.10 seconds
CheckValgrind PASS 211.54 seconds
CheckSmatch PASS 269.38 seconds
bluezmakeextell PASS 97.18 seconds
IncrementalBuild PENDING 0.41 seconds
ScanBuild PASS 853.18 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] 5+ messages in thread
* Re: [PATCH BlueZ v2] device: Clear pending_flags on error
2025-01-28 11:56 [PATCH BlueZ v2] device: Clear pending_flags on error Ludovico de Nittis
2025-01-28 13:23 ` [BlueZ,v2] " bluez.test.bot
@ 2025-02-14 11:22 ` Ludovico de Nittis
2025-02-14 15:28 ` Luiz Augusto von Dentz
2025-02-14 16:00 ` patchwork-bot+bluetooth
2 siblings, 1 reply; 5+ messages in thread
From: Ludovico de Nittis @ 2025-02-14 11:22 UTC (permalink / raw)
To: linux-bluetooth; +Cc: ludovico.denittis
What do you think about this patch? I saw that this was still pending
while my other related ones have been merged. I'm not sure if you'd like
some changes or if it simply fell through the cracks.
Regards,
Ludovico de Nittis
On 1/28/25 12:56 PM, Ludovico de Nittis wrote:
> If setting WakeAllowed, or the device privacy, fails, we may end up in a
> situation where `pending_flags` is still set to some `DEVICE_FLAG_*`
> values, for example from `device_set_wake_allowed()` or
> `adapter_set_device_flags()`.
>
> This can confuse further requests because they'll assume that there is
> still a pending request in progress.
> ---
> src/adapter.c | 1 +
> src/device.c | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/src/adapter.c b/src/adapter.c
> index 5d4117a49..3eb343cbc 100644
> --- a/src/adapter.c
> +++ b/src/adapter.c
> @@ -5580,6 +5580,7 @@ static void set_device_privacy_complete(uint8_t status, uint16_t length,
> if (status != MGMT_STATUS_SUCCESS) {
> error("Set device flags return status: %s",
> mgmt_errstr(status));
> + btd_device_set_pending_flags(dev, 0);
> return;
> }
>
> diff --git a/src/device.c b/src/device.c
> index e8bff718c..3c2337198 100644
> --- a/src/device.c
> +++ b/src/device.c
> @@ -1575,6 +1575,7 @@ static void set_wake_allowed_complete(uint8_t status, uint16_t length,
> dev->wake_id = -1U;
> }
> dev->pending_wake_allowed = FALSE;
> + dev->pending_flags = 0;
> return;
> }
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH BlueZ v2] device: Clear pending_flags on error
2025-02-14 11:22 ` [PATCH BlueZ v2] " Ludovico de Nittis
@ 2025-02-14 15:28 ` Luiz Augusto von Dentz
0 siblings, 0 replies; 5+ messages in thread
From: Luiz Augusto von Dentz @ 2025-02-14 15:28 UTC (permalink / raw)
To: Ludovico de Nittis; +Cc: linux-bluetooth
Hi Ludovico,
On Fri, Feb 14, 2025 at 6:26 AM Ludovico de Nittis
<ludovico.denittis@collabora.com> wrote:
>
> What do you think about this patch? I saw that this was still pending
> while my other related ones have been merged. I'm not sure if you'd like
> some changes or if it simply fell through the cracks.
Let me check if it is not on patchwork, anyway you can always resend
when this happens.
> Regards,
> Ludovico de Nittis
>
> On 1/28/25 12:56 PM, Ludovico de Nittis wrote:
> > If setting WakeAllowed, or the device privacy, fails, we may end up in a
> > situation where `pending_flags` is still set to some `DEVICE_FLAG_*`
> > values, for example from `device_set_wake_allowed()` or
> > `adapter_set_device_flags()`.
> >
> > This can confuse further requests because they'll assume that there is
> > still a pending request in progress.
> > ---
> > src/adapter.c | 1 +
> > src/device.c | 1 +
> > 2 files changed, 2 insertions(+)
> >
> > diff --git a/src/adapter.c b/src/adapter.c
> > index 5d4117a49..3eb343cbc 100644
> > --- a/src/adapter.c
> > +++ b/src/adapter.c
> > @@ -5580,6 +5580,7 @@ static void set_device_privacy_complete(uint8_t status, uint16_t length,
> > if (status != MGMT_STATUS_SUCCESS) {
> > error("Set device flags return status: %s",
> > mgmt_errstr(status));
> > + btd_device_set_pending_flags(dev, 0);
> > return;
> > }
> >
> > diff --git a/src/device.c b/src/device.c
> > index e8bff718c..3c2337198 100644
> > --- a/src/device.c
> > +++ b/src/device.c
> > @@ -1575,6 +1575,7 @@ static void set_wake_allowed_complete(uint8_t status, uint16_t length,
> > dev->wake_id = -1U;
> > }
> > dev->pending_wake_allowed = FALSE;
> > + dev->pending_flags = 0;
> > return;
> > }
> >
>
>
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH BlueZ v2] device: Clear pending_flags on error
2025-01-28 11:56 [PATCH BlueZ v2] device: Clear pending_flags on error Ludovico de Nittis
2025-01-28 13:23 ` [BlueZ,v2] " bluez.test.bot
2025-02-14 11:22 ` [PATCH BlueZ v2] " Ludovico de Nittis
@ 2025-02-14 16:00 ` patchwork-bot+bluetooth
2 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+bluetooth @ 2025-02-14 16:00 UTC (permalink / raw)
To: Ludovico de Nittis; +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, 28 Jan 2025 12:56:59 +0100 you wrote:
> If setting WakeAllowed, or the device privacy, fails, we may end up in a
> situation where `pending_flags` is still set to some `DEVICE_FLAG_*`
> values, for example from `device_set_wake_allowed()` or
> `adapter_set_device_flags()`.
>
> This can confuse further requests because they'll assume that there is
> still a pending request in progress.
>
> [...]
Here is the summary with links:
- [BlueZ,v2] device: Clear pending_flags on error
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=264bf951f2d6
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] 5+ messages in thread
end of thread, other threads:[~2025-02-14 16:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-28 11:56 [PATCH BlueZ v2] device: Clear pending_flags on error Ludovico de Nittis
2025-01-28 13:23 ` [BlueZ,v2] " bluez.test.bot
2025-02-14 11:22 ` [PATCH BlueZ v2] " Ludovico de Nittis
2025-02-14 15:28 ` Luiz Augusto von Dentz
2025-02-14 16:00 ` 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).