* [PATCH BlueZ] mesh: Zero out config node struct before initializing
@ 2020-12-02 21:11 Inga Stotland
2020-12-02 21:26 ` [BlueZ] " bluez.test.bot
2020-12-04 18:11 ` [PATCH BlueZ] " Gix, Brian
0 siblings, 2 replies; 3+ messages in thread
From: Inga Stotland @ 2020-12-02 21:11 UTC (permalink / raw)
To: linux-bluetooth; +Cc: brian.gix, Inga Stotland
This memsets all the fields of mesh_db_node to zero prior to intializing
some fields in mesh_config_node struct and creating a brand new node
configuration. Just a precaution against having uninitialized items.
---
mesh/node.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mesh/node.c b/mesh/node.c
index 35293e0f0..4bc11309b 100644
--- a/mesh/node.c
+++ b/mesh/node.c
@@ -856,6 +856,8 @@ static void convert_node_to_storage(struct mesh_node *node,
{
const struct l_queue_entry *entry;
+ memset(db_node, 0, sizeof(struct mesh_config_node));
+
db_node->cid = node->comp.cid;
db_node->pid = node->comp.pid;
db_node->vid = node->comp.vid;
--
2.26.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [BlueZ] mesh: Zero out config node struct before initializing
2020-12-02 21:11 [PATCH BlueZ] mesh: Zero out config node struct before initializing Inga Stotland
@ 2020-12-02 21:26 ` bluez.test.bot
2020-12-04 18:11 ` [PATCH BlueZ] " Gix, Brian
1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2020-12-02 21:26 UTC (permalink / raw)
To: linux-bluetooth, inga.stotland
[-- Attachment #1: Type: text/plain, Size: 557 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=394959
---Test result---
##############################
Test: CheckPatch - PASS
##############################
Test: CheckGitLint - PASS
##############################
Test: CheckBuild - PASS
##############################
Test: MakeCheck - PASS
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH BlueZ] mesh: Zero out config node struct before initializing
2020-12-02 21:11 [PATCH BlueZ] mesh: Zero out config node struct before initializing Inga Stotland
2020-12-02 21:26 ` [BlueZ] " bluez.test.bot
@ 2020-12-04 18:11 ` Gix, Brian
1 sibling, 0 replies; 3+ messages in thread
From: Gix, Brian @ 2020-12-04 18:11 UTC (permalink / raw)
To: linux-bluetooth, Stotland, Inga
Applied
On Wed, 2020-12-02 at 13:11 -0800, Inga Stotland wrote:
> This memsets all the fields of mesh_db_node to zero prior to intializing
> some fields in mesh_config_node struct and creating a brand new node
> configuration. Just a precaution against having uninitialized items.
> ---
> mesh/node.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/mesh/node.c b/mesh/node.c
> index 35293e0f0..4bc11309b 100644
> --- a/mesh/node.c
> +++ b/mesh/node.c
> @@ -856,6 +856,8 @@ static void convert_node_to_storage(struct mesh_node *node,
> {
> const struct l_queue_entry *entry;
>
> + memset(db_node, 0, sizeof(struct mesh_config_node));
> +
> db_node->cid = node->comp.cid;
> db_node->pid = node->comp.pid;
> db_node->vid = node->comp.vid;
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-12-04 18:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-02 21:11 [PATCH BlueZ] mesh: Zero out config node struct before initializing Inga Stotland
2020-12-02 21:26 ` [BlueZ] " bluez.test.bot
2020-12-04 18:11 ` [PATCH BlueZ] " Gix, Brian
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.