Skip to content

align IPv4 teardown with IPv6 and fix driver regressions

Yuyang Huang linux-wireless lkml netdev 1 version Applied

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

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest3 patches 2 repliesApplied 3/3

Changes in v2 from the cover letter

- Split the original single patch into a 3-patch series.
- Patch 1: Teach prestera to ignore duplicate RIF destruction events when the RIF is already gone, rather than returning -EEXIST and aborting the chain.
- Patch 2: Fix mac80211 to use the valid ifa->ifa_dev from the event argument instead of looking it up via the netdevice.
- Patch 3: The original change to clear dev->ip_ptr early.

Patches in v2 All 3 applied

#Subject and filesSizeRepliesApplied
1/3net: prestera: ignore duplicate RIF destruction eventsdrivers/net/ethernet/marvell/prestera/prestera_router.c+2 -41 replyApplied
2/3wifi: mac80211: use ifa_dev from event argumentnet/mac80211/main.c+1 -30 repliesApplied
3/3net: ipv4: clear dev->ip_ptr before destroying inetdevnet/ipv4/devinet.c+2 -21 replyApplied

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchIdo SchimmelElad Nachman
1/3A-b
2/3
3/3R-b

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

Read the v2 thread

Cover letter [PATCH net-next v2 0/3] align IPv4 teardown with IPv6 and fix driver regressions

This series aligns the IPv4 address teardown sequence with IPv6 by clearing dev->ip_ptr early in inetdev_destroy() before freeing the multicast list and individual IP addresses. This prevents RCU readers from accessing a partially destroyed in_device structure.

However, clearing dev->ip_ptr early causes __in_dev_get_rtnl() to return NULL during the notifier loop in inetdev_destroy(). This causes regressions in some drivers (prestera and mac80211) that use this lookup helper in their inetaddr notifier callbacks.

To prevent regressions and maintain bisectability, this series first fixes the affected drivers (Patch 1 and 2) before applying the core IPv4 change (Patch 3).

An audit was performed on all other registered inetaddr and inet6addr notifier listeners, and no other drivers were found to be affected.

Change in v2:
- Split the original single patch into a 3-patch series.
- Patch 1: Teach prestera to ignore duplicate RIF destruction events when the RIF is already gone, rather than returning -EEXIST and aborting the chain.
- Patch 2: Fix mac80211 to use the valid ifa->ifa_dev from the event argument instead of looking it up via the netdevice.
- Patch 3: The original change to clear dev->ip_ptr early.

Yuyang Huang (3):
net: prestera: ignore duplicate RIF destruction events
wifi: mac80211: use ifa_dev from event argument
net: ipv4: clear dev->ip_ptr before destroying inetdev

 drivers/net/ethernet/marvell/prestera/prestera_router.c | 6 ++----
 net/ipv4/devinet.c                                      | 4 ++--
 net/mac80211/main.c                                     | 4 +---
 3 files changed, 5 insertions(+), 9 deletions(-)
Signature · 1 line
2.55.0.795.g602f6c329a-goog