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

Martine Lenders noreply at github.com
Wed May 5 23:03:42 CEST 2021


  Branch: refs/heads/master
  Home:   https://github.com/RIOT-OS/RIOT
  Commit: 4b4eaf3b76e73c17761ce12fb99dd6ceb635bd8d
      https://github.com/RIOT-OS/RIOT/commit/4b4eaf3b76e73c17761ce12fb99dd6ceb635bd8d
  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.


  Commit: 6c48fcd4162840ebd0cb65194ef8bb8da0b01cf7
      https://github.com/RIOT-OS/RIOT/commit/6c48fcd4162840ebd0cb65194ef8bb8da0b01cf7
  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:
  -----------
  Merge pull request #16450 from miri64/gnrc_ipv6_nib/fix/acquire-race

gnrc_ipv6_nib: fix acquire race on gnrc_ipv6_nib_get_next_hop_l2addr()


Compare: https://github.com/RIOT-OS/RIOT/compare/619a444741fa...6c48fcd41628


More information about the commits mailing list