)]}'
{
  "commit": "a1b98e3b4fb8d3338bbefa2f5b78eb7248af5520",
  "tree": "5747c29303f2ba0dad7c5107bfa8250468f92dcb",
  "parents": [
    "e41e9c5324922cfc2259b13551224c6ce51073ae"
  ],
  "author": {
    "name": "Nicolas Dichtel",
    "email": "nicolas.dichtel@6wind.com",
    "time": "Thu Apr 23 00:06:45 2020 +0200"
  },
  "committer": {
    "name": "Greg Kroah-Hartman",
    "email": "gregkh@linuxfoundation.org",
    "time": "Wed Jun 03 08:19:44 2020 +0200"
  },
  "message": "xfrm interface: fix oops when deleting a x-netns interface\n\ncommit c95c5f58b35ef995f66cb55547eee6093ab5fcb8 upstream.\n\nHere is the steps to reproduce the problem:\nip netns add foo\nip netns add bar\nip -n foo link add xfrmi0 type xfrm dev lo if_id 42\nip -n foo link set xfrmi0 netns bar\nip netns del foo\nip netns del bar\n\nWhich results to:\n[  186.686395] general protection fault, probably for non-canonical address 0x6b6b6b6b6b6b6bd3: 0000 [#1] SMP PTI\n[  186.687665] CPU: 7 PID: 232 Comm: kworker/u16:2 Not tainted 5.6.0+ #1\n[  186.688430] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014\n[  186.689420] Workqueue: netns cleanup_net\n[  186.689903] RIP: 0010:xfrmi_dev_uninit+0x1b/0x4b [xfrm_interface]\n[  186.690657] Code: 44 f6 ff ff 31 c0 5b 5d 41 5c 41 5d 41 5e c3 48 8d 8f c0 08 00 00 8b 05 ce 14 00 00 48 8b 97 d0 08 00 00 48 8b 92 c0 0e 00 00 \u003c48\u003e 8b 14 c2 48 8b 02 48 85 c0 74 19 48 39 c1 75 0c 48 8b 87 c0 08\n[  186.692838] RSP: 0018:ffffc900003b7d68 EFLAGS: 00010286\n[  186.693435] RAX: 000000000000000d RBX: ffff8881b0f31000 RCX: ffff8881b0f318c0\n[  186.694334] RDX: 6b6b6b6b6b6b6b6b RSI: 0000000000000246 RDI: ffff8881b0f31000\n[  186.695190] RBP: ffffc900003b7df0 R08: ffff888236c07740 R09: 0000000000000040\n[  186.696024] R10: ffffffff81fce1b8 R11: 0000000000000002 R12: ffffc900003b7d80\n[  186.696859] R13: ffff8881edcc6a40 R14: ffff8881a1b6e780 R15: ffffffff81ed47c8\n[  186.697738] FS:  0000000000000000(0000) GS:ffff888237dc0000(0000) knlGS:0000000000000000\n[  186.698705] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033\n[  186.699408] CR2: 00007f2129e93148 CR3: 0000000001e0a000 CR4: 00000000000006e0\n[  186.700221] Call Trace:\n[  186.700508]  rollback_registered_many+0x32b/0x3fd\n[  186.701058]  ? __rtnl_unlock+0x20/0x3d\n[  186.701494]  ? arch_local_irq_save+0x11/0x17\n[  186.702012]  unregister_netdevice_many+0x12/0x55\n[  186.702594]  default_device_exit_batch+0x12b/0x150\n[  186.703160]  ? prepare_to_wait_exclusive+0x60/0x60\n[  186.703719]  cleanup_net+0x17d/0x234\n[  186.704138]  process_one_work+0x196/0x2e8\n[  186.704652]  worker_thread+0x1a4/0x249\n[  186.705087]  ? cancel_delayed_work+0x92/0x92\n[  186.705620]  kthread+0x105/0x10f\n[  186.706000]  ? __kthread_bind_mask+0x57/0x57\n[  186.706501]  ret_from_fork+0x35/0x40\n[  186.706978] Modules linked in: xfrm_interface nfsv3 nfs_acl auth_rpcgss nfsv4 nfs lockd grace fscache sunrpc button parport_pc parport serio_raw evdev pcspkr loop ext4 crc16 mbcache jbd2 crc32c_generic 8139too ide_cd_mod cdrom ide_gd_mod ata_generic ata_piix libata scsi_mod piix psmouse i2c_piix4 ide_core 8139cp i2c_core mii floppy\n[  186.710423] ---[ end trace 463bba18105537e5 ]---\n\nThe problem is that x-netns xfrm interface are not removed when the link\nnetns is removed. This causes later this oops when thoses interfaces are\nremoved.\n\nLet\u0027s add a handler to remove all interfaces related to a netns when this\nnetns is removed.\n\nFixes: f203b76d7809 (\"xfrm: Add virtual xfrm interfaces\")\nReported-by: Christophe Gouault \u003cchristophe.gouault@6wind.com\u003e\nSigned-off-by: Nicolas Dichtel \u003cnicolas.dichtel@6wind.com\u003e\nSigned-off-by: Steffen Klassert \u003csteffen.klassert@secunet.com\u003e\nSigned-off-by: Greg Kroah-Hartman \u003cgregkh@linuxfoundation.org\u003e\n\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "317fe9c92932b92d6c472c951157d26f154c0236",
      "old_mode": 33188,
      "old_path": "net/xfrm/xfrm_interface.c",
      "new_id": "6f00f88adab9088a9149f499da30a4378ca3f058",
      "new_mode": 33188,
      "new_path": "net/xfrm/xfrm_interface.c"
    }
  ]
}
