)]}'
{
  "commit": "5a4431ff4fa71ddbd61d405dffbe2a425612bcf5",
  "tree": "796b7401dc60dee1b429ad3002b26110aa33f1e5",
  "parents": [
    "39f139ecd7771ab1fb802a134a4ac4b260c1da2c"
  ],
  "author": {
    "name": "Eric Dumazet",
    "email": "edumazet@kernel.org",
    "time": "Thu Nov 19 08:22:55 2026 +0100"
  },
  "committer": {
    "name": "Jakub Kicinski",
    "email": "kuba@kernel.org",
    "time": "Sat Nov 21 10:58:13 2026 -0800"
  },
  "message": "tap: detach queues from the NETDEV_UNREGISTER notifier\n\ntap_del_queues() is currently called from the macvtap and ipvtap\ndellink handlers. Two things in this area only work because\ntap_open() runs under RTNL, which a following patch removes:\n\n1) Not all unregistrations go through dellink. If register_netdevice()\n   fails after the NETDEV_REGISTER notifier created the char device,\n   or if macvlan_common_newlink() / ipvlan_link_new() fail after\n   register_netdevice(), the device is unregistered without\n   tap_del_queues() being called. Nothing can open the char device in\n   this window today, because RTNL is held from the minor allocation\n   to its release.\n\n2) tap_del_queues() sets tap-\u003enumvtaps to MAX_TAP_QUEUES to \"guarantee\n   that any future tap_set_queue will fail\", but since commit\n   815f236d6227 (\"macvtap: add TUNSETQUEUE ioctl\") tap_set_queue()\n   tests tap-\u003enumqueues, which is zero at this point. A later\n   tap_set_queue() would succeed and write to tap-\u003etaps[MAX_TAP_QUEUES],\n   one element past the array. Again, this can not happen today since\n   the minor is released in the same RTNL section.\n\nCall tap_del_queues() from the NETDEV_UNREGISTER notifier instead, so\nthat every unregistration path is covered. The notifier is also invoked\nwhen the device moves to another netns, in which case the queues must\nstay attached: only act when the device is really being unregistered.\n\nReplace the numvtaps trick with an explicit tap-\u003edead flag, tested in\ntap_set_queue().\n\nNo functional change intended: none of the above is reachable as long\nas tap_open() holds RTNL. These issues were found by code inspection,\nwith the help of an AI coding assistant, while looking at RTNL removal\nin tap. They were not triggered.\n\nSigned-off-by: Eric Dumazet \u003cedumazet@kernel.org\u003e\nReviewed-by: Willem de Bruijn \u003cwillemb@google.com\u003e\nLink: https://patch.msgid.link/20261119072258.3157902-2-edumazet@kernel.org\nSigned-off-by: Jakub Kicinski \u003ckuba@kernel.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "66c949d9426103edea10b2580f096f399f139f4f",
      "old_mode": 33188,
      "old_path": "drivers/net/ipvlan/ipvtap.c",
      "new_id": "d17daa1040967a1d80cede5d740d957204fe1186",
      "new_mode": 33188,
      "new_path": "drivers/net/ipvlan/ipvtap.c"
    },
    {
      "type": "modify",
      "old_id": "cc975dfb738051cd43d70e6b95d7499400e345aa",
      "old_mode": 33188,
      "old_path": "drivers/net/macvtap.c",
      "new_id": "3e88ca35cff2f9c755f8aff694e1c4ca83566741",
      "new_mode": 33188,
      "new_path": "drivers/net/macvtap.c"
    },
    {
      "type": "modify",
      "old_id": "0f3ad8fd6ab66003093d2aedd4d7e7a6c4f882e9",
      "old_mode": 33188,
      "old_path": "drivers/net/tap.c",
      "new_id": "ded0be1dfdd1e3123acb08e75aa9a874c9e949b5",
      "new_mode": 33188,
      "new_path": "drivers/net/tap.c"
    },
    {
      "type": "modify",
      "old_id": "553552fa635c3e1e53d1a63c203d32e4c4fd5a4f",
      "old_mode": 33188,
      "old_path": "include/linux/if_tap.h",
      "new_id": "e9c4c9272585cdb14cf0ea7ea7d96acc3e8964b7",
      "new_mode": 33188,
      "new_path": "include/linux/if_tap.h"
    }
  ]
}
