[riot-commits] [RIOT-OS/RIOT] e5a952: gnrc_ipv6_nib: fix acquire race on gnrc_ipv6_nib_g...

Martine Lenders noreply at github.com
Thu May 6 08:11:18 CEST 2021


  Branch: refs/heads/2021.04-branch
  Home:   https://github.com/RIOT-OS/RIOT
  Commit: e5a95229c4c8a98fd4f4039cb889d97b12c1f230
      https://github.com/RIOT-OS/RIOT/commit/e5a95229c4c8a98fd4f4039cb889d97b12c1f230
  Author: Martine Lenders <m.lenders at fu-berlin.de>
  Date:   2021-05-05 (Wed, 05 May 2021)

  Changed paths:
    M sys/net/gnrc/network_layer/ipv6/nib/nib.c

  Log Message:
  -----------
  gnrc_ipv6_nib: fix acquire race on gnrc_ipv6_nib_get_next_hop_l2addr()

When two threads use `gnrc_ipv6_nib_get_next_hop_l2addr()` to determine
a next hop (e.g. when there is both an IPv6 sender and a 6LoWPAN
fragment forwarder), a race condition may happen, where one thread
acquires the NIB and the other acquires the network interface resulting
in a deadlock. By releasing the NIB (if acquired) before trying to
acquire the network interface and re-acquiring the NIB after the network
interface is acquired, this is fixed.

(cherry picked from commit 4b4eaf3b76e73c17761ce12fb99dd6ceb635bd8d)


  Commit: cdb41a94bfc2d5b4f715f8e90aead3db1e0ee065
      https://github.com/RIOT-OS/RIOT/commit/cdb41a94bfc2d5b4f715f8e90aead3db1e0ee065
  Author: Martine Lenders <m.lenders at fu-berlin.de>
  Date:   2021-05-06 (Thu, 06 May 2021)

  Changed paths:
    M sys/net/gnrc/network_layer/ipv6/nib/nib.c

  Log Message:
  -----------
  Merge pull request #16452 from miri64/backport/2021.04/gnrc_ipv6_nib/fix/acquire-race

gnrc_ipv6_nib: fix acquire race on gnrc_ipv6_nib_get_next_hop_l2addr() [backport 2021.04]


Compare: https://github.com/RIOT-OS/RIOT/compare/bca350acfb9b...cdb41a94bfc2


More information about the commits mailing list