Skip to content

ipv6: Fix suspicious RCU usage in route hardware flags notification

Ido Schimmel netdev 1 version Applied

Status from this message: This series was applied to netdev/net.git (main)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 4 repliesApplied 2/2

Patches in v1 All 2 applied

#Subject and filesSizeRepliesApplied
1/2ipv6: Hold RCU when emitting route hardware flags notificationnet/ipv6/route.c+6 -12 repliesApplied
2/2selftests: netdevsim: Add FIB notification tests for nexthop objectstools/testing/selftests/drivers/net/netdevsim/fib_notifications.sh+66 -02 repliesApplied

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchEric DumazetDavid Ahern
1/2R-b R-b
2/2R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH net 0/2] ipv6: Fix suspicious RCU usage in route hardware flags notification

fib6_info_hw_flags_set() is called by drivers to update the hardware flags of an IPv6 route and to emit a notification when fib_notify_on_flag_change is set. Drivers call it from process context without RTNL or RCU, so when the route uses a nexthop object, building the notification triggers suspicious RCU usage splats.

Patch #1 fixes the problem by holding RCU while building the notification.

Patch #2 adds IPv4 and IPv6 test cases for routes that use nexthop objects. Without patch #1, the IPv6 one triggers the splats.

Ido Schimmel (2):
ipv6: Hold RCU when emitting route hardware flags notification
selftests: netdevsim: Add FIB notification tests for nexthop objects

 net/ipv6/route.c                              |  7 +-
 .../net/netdevsim/fib_notifications.sh        | 66 +++++++++++++++++++
 2 files changed, 72 insertions(+), 1 deletion(-)
Signature · 1 line
2.56.0