mbox series

[net,0/4] Avoid using WARN_ON() on allocation failure in device_rename()

Message ID 20250325141723.499850-1-i.abramov@mt-integration.ru (mailing list archive)
Headers show
Series Avoid using WARN_ON() on allocation failure in device_rename() | expand

Message

Ivan Abramov March 25, 2025, 2:17 p.m. UTC
This patch series is based on
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/ and is
intended for the generic netdev maintainers, as it affects multiple
networking subsystems.

There are a couple of Syzkaller reports about WARN_ON() being triggered
by failed device_rename().

They are triggered by fuzzer's fault injection and subsequent allocation
failure in kstrdup(). Failure of kstrdup() in device_rename() should not
lead to WARN_ON(), so means to avoid it are introduced in this series.

If it is possible to reverse the changes done prior to failed
device_rename(), do that. Otherwise ignore -ENOMEM return code in
WARN_ON().

Ivan Abramov (4):
  ieee802154: Restore initial state on failed device_rename() in
    cfg802154_switch_netns()
  ieee802154: Avoid calling WARN_ON() on -ENOMEM in
    cfg802154_pernet_exit()
  cfg80211: Avoid calling WARN_ON() on -ENOMEM in
    cfg80211_switch_netns()
  net: Avoid calling WARN_ON() on -ENOMEM in
    __dev_change_net_namespace()

 net/core/dev.c        |  2 +-
 net/ieee802154/core.c | 51 ++++++++++++++++++++++++-------------------
 net/wireless/core.c   |  2 +-
 3 files changed, 31 insertions(+), 24 deletions(-)

Comments

Jakub Kicinski March 25, 2025, 9:39 p.m. UTC | #1
On Tue, 25 Mar 2025 17:17:19 +0300 Ivan Abramov wrote:
> This patch series is based on
> https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/ and is
> intended for the generic netdev maintainers, as it affects multiple
> networking subsystems.

But there is no dependency between the patches, AFAICT.
Please send them individually to the respective maintainers.