[PATCH v2 0/3] Service ref counting refactoring

Jukka Rissanen jukka.rissanen at linux.intel.com
Tue Jan 17 04:11:36 PST 2012


Hi all,

this is the second version to fix network ref counting in service.

Patrik noticed some problems in patch #3 so I fixed it (do not unref
network in disconnect so that we can reconnect to service later).

Daniel had some worries about the patchset but I am convinced that we
need to do something and these patches fixes the issues I am seeing
in valgrind (free memory access in service.c because the network is
already freed by network plugin). So I am resubmitting the patch for
review and comments.

One way to trigger the ref/unref issues is like this:
- have connman running and connected to ethernet
- test/test-connman disable ethernet
- test/test-connman enable ethernet
- test/set-ipv6-method ethernet_xxxxxxxx_cable auto

The set-ipv6-method might not be relevant here but it also exercises
the DHCPv6 subsystem. In my setup I have DHCPv6 up and running which
helped to see the issue in service.


Cheers,
Jukka


Jukka Rissanen (3):
  service: Add ref counting debug
  service: Refactor the service unref function.
  service: Properly ref/unref the network.

 src/connman.h  |    2 -
 src/provider.c |    7 ++---
 src/service.c  |   64 ++++++++++++++++++++++---------------------------------
 3 files changed, 29 insertions(+), 44 deletions(-)



More information about the connman mailing list