2019-04-18 04:13:10

by Stotland, Inga

[permalink] [raw]
Subject: [PATCH BlueZ] mesh: Fix network information cleanup

This fixes issues caused by accessing invalidated entries of nets
queue that were left around when removing network info in
mesh_net_detach()
---
mesh/net.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/mesh/net.c b/mesh/net.c
index b173e1c09..9b1fbd81e 100644
--- a/mesh/net.c
+++ b/mesh/net.c
@@ -3120,6 +3120,7 @@ struct mesh_io *mesh_net_detach(struct mesh_net *net)
mesh_io_deregister_recv_cb(io, MESH_IO_FILTER_NET);

net->io = NULL;
+ l_queue_remove(nets, net);

return io;
}
--
2.17.2



2019-04-19 18:28:51

by Gix, Brian

[permalink] [raw]
Subject: Re: [PATCH BlueZ] mesh: Fix network information cleanup

Patch Applied

On Wed, 2019-04-17 at 21:13 -0700, Inga Stotland wrote:
> This fixes issues caused by accessing invalidated entries of nets
> queue that were left around when removing network info in
> mesh_net_detach()
> ---
> mesh/net.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/mesh/net.c b/mesh/net.c
> index b173e1c09..9b1fbd81e 100644
> --- a/mesh/net.c
> +++ b/mesh/net.c
> @@ -3120,6 +3120,7 @@ struct mesh_io *mesh_net_detach(struct mesh_net *net)
> mesh_io_deregister_recv_cb(io, MESH_IO_FILTER_NET);
>
> net->io = NULL;
> + l_queue_remove(nets, net);
>
> return io;
> }