From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Lukas Wunner <lukas@wunner.de>,
Oleksij Rempel <o.rempel@pengutronix.de>,
Ferry Toth <fntoth@gmail.com>, Oliver Neukum <oneukum@suse.com>,
Martyn Welch <martyn.welch@collabora.com>,
Andrew Lunn <andrew@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
Sasha Levin <sashal@kernel.org>,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
steve.glendinning@shawell.net, UNGLinuxDriver@microchip.com,
linux@rempel-privat.de, colin.king@intel.com,
paskripkin@gmail.com, linux-usb@vger.kernel.org,
netdev@vger.kernel.org
Subject: [PATCH AUTOSEL 5.15 082/109] usbnet: Run unregister_netdev() before unbind() again
Date: Mon, 30 May 2022 09:37:58 -0400 [thread overview]
Message-ID: <20220530133825.1933431-82-sashal@kernel.org> (raw)
In-Reply-To: <20220530133825.1933431-1-sashal@kernel.org>
From: Lukas Wunner <lukas@wunner.de>
[ Upstream commit d1408f6b4dd78fb1b9e26bcf64477984e5f85409 ]
Commit 2c9d6c2b871d ("usbnet: run unbind() before unregister_netdev()")
sought to fix a use-after-free on disconnect of USB Ethernet adapters.
It turns out that a different fix is necessary to address the issue:
https://lore.kernel.org/netdev/18b3541e5372bc9b9fc733d422f4e698c089077c.1650177997.git.lukas@wunner.de/
So the commit was not necessary.
The commit made binding and unbinding of USB Ethernet asymmetrical:
Before, usbnet_probe() first invoked the ->bind() callback and then
register_netdev(). usbnet_disconnect() mirrored that by first invoking
unregister_netdev() and then ->unbind().
Since the commit, the order in usbnet_disconnect() is reversed and no
longer mirrors usbnet_probe().
One consequence is that a PHY disconnected (and stopped) in ->unbind()
is afterwards stopped once more by unregister_netdev() as it closes the
netdev before unregistering. That necessitates a contortion in ->stop()
because the PHY may only be stopped if it hasn't already been
disconnected.
Reverting the commit allows making the call to phy_stop() unconditional
in ->stop().
Tested-by: Oleksij Rempel <o.rempel@pengutronix.de> # LAN9514/9512/9500
Tested-by: Ferry Toth <fntoth@gmail.com> # LAN9514
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Acked-by: Oliver Neukum <oneukum@suse.com>
Cc: Martyn Welch <martyn.welch@collabora.com>
Cc: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/usb/asix_devices.c | 6 +-----
drivers/net/usb/smsc95xx.c | 3 +--
drivers/net/usb/usbnet.c | 6 +++---
3 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/drivers/net/usb/asix_devices.c b/drivers/net/usb/asix_devices.c
index bd8f8619ad6f..396505396a2e 100644
--- a/drivers/net/usb/asix_devices.c
+++ b/drivers/net/usb/asix_devices.c
@@ -799,11 +799,7 @@ static int ax88772_stop(struct usbnet *dev)
{
struct asix_common_private *priv = dev->driver_priv;
- /* On unplugged USB, we will get MDIO communication errors and the
- * PHY will be set in to PHY_HALTED state.
- */
- if (priv->phydev->state != PHY_HALTED)
- phy_stop(priv->phydev);
+ phy_stop(priv->phydev);
return 0;
}
diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c
index eb0d325e92b7..4e39e4345084 100644
--- a/drivers/net/usb/smsc95xx.c
+++ b/drivers/net/usb/smsc95xx.c
@@ -1217,8 +1217,7 @@ static int smsc95xx_start_phy(struct usbnet *dev)
static int smsc95xx_stop(struct usbnet *dev)
{
- if (dev->net->phydev)
- phy_stop(dev->net->phydev);
+ phy_stop(dev->net->phydev);
return 0;
}
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index a33d7fb82a00..af2bbaff2478 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -1614,9 +1614,6 @@ void usbnet_disconnect (struct usb_interface *intf)
xdev->bus->bus_name, xdev->devpath,
dev->driver_info->description);
- if (dev->driver_info->unbind)
- dev->driver_info->unbind(dev, intf);
-
net = dev->net;
unregister_netdev (net);
@@ -1624,6 +1621,9 @@ void usbnet_disconnect (struct usb_interface *intf)
usb_scuttle_anchored_urbs(&dev->deferred);
+ if (dev->driver_info->unbind)
+ dev->driver_info->unbind(dev, intf);
+
usb_kill_urb(dev->interrupt);
usb_free_urb(dev->interrupt);
kfree(dev->padding_pkt);
--
2.35.1
next prev parent reply other threads:[~2022-05-30 14:18 UTC|newest]
Thread overview: 111+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-30 13:36 [PATCH AUTOSEL 5.15 001/109] iommu/vt-d: Add RPLS to quirk list to skip TE disabling Sasha Levin
2022-05-30 13:36 ` [PATCH AUTOSEL 5.15 002/109] drm/vmwgfx: validate the screen formats Sasha Levin
2022-05-30 13:36 ` [PATCH AUTOSEL 5.15 003/109] drm/virtio: fix NULL pointer dereference in virtio_gpu_conn_get_modes Sasha Levin
2022-05-30 13:36 ` [PATCH AUTOSEL 5.15 004/109] selftests/bpf: Fix vfs_link kprobe definition Sasha Levin
2022-05-30 13:36 ` [PATCH AUTOSEL 5.15 005/109] selftests/bpf: Fix parsing of prog types in UAPI hdr for bpftool sync Sasha Levin
2022-05-30 13:36 ` [PATCH AUTOSEL 5.15 006/109] mwifiex: add mutex lock for call in mwifiex_dfs_chan_sw_work_queue Sasha Levin
2022-05-30 13:36 ` [PATCH AUTOSEL 5.15 007/109] b43legacy: Fix assigning negative value to unsigned variable Sasha Levin
2022-05-30 13:36 ` [PATCH AUTOSEL 5.15 008/109] b43: " Sasha Levin
2022-05-30 13:36 ` [PATCH AUTOSEL 5.15 009/109] ipw2x00: Fix potential NULL dereference in libipw_xmit() Sasha Levin
2022-05-30 13:36 ` [PATCH AUTOSEL 5.15 010/109] ipv6: fix locking issues with loops over idev->addr_list Sasha Levin
2022-05-30 13:36 ` [PATCH AUTOSEL 5.15 011/109] fbcon: Consistently protect deferred_takeover with console_lock() Sasha Levin
2022-05-30 13:36 ` [PATCH AUTOSEL 5.15 012/109] x86/platform/uv: Update TSC sync state for UV5 Sasha Levin
2022-05-30 13:36 ` [PATCH AUTOSEL 5.15 013/109] ACPICA: Avoid cache flush inside virtual machines Sasha Levin
2022-05-30 13:36 ` [PATCH AUTOSEL 5.15 014/109] mac80211: minstrel_ht: fix where rate stats are stored (fixes debugfs output) Sasha Levin
2022-05-30 13:36 ` [PATCH AUTOSEL 5.15 015/109] drm/komeda: return early if drm_universal_plane_init() fails Sasha Levin
2022-05-30 13:36 ` [PATCH AUTOSEL 5.15 016/109] drm/amd/display: Disabling Z10 on DCN31 Sasha Levin
2022-05-30 13:36 ` [PATCH AUTOSEL 5.15 017/109] rcu-tasks: Fix race in schedule and flush work Sasha Levin
2022-05-30 13:36 ` [PATCH AUTOSEL 5.15 018/109] rcu: Make TASKS_RUDE_RCU select IRQ_WORK Sasha Levin
2022-05-30 13:36 ` [PATCH AUTOSEL 5.15 019/109] sfc: ef10: Fix assigning negative value to unsigned variable Sasha Levin
2022-05-30 13:36 ` [PATCH AUTOSEL 5.15 020/109] ALSA: jack: Access input_dev under mutex Sasha Levin
2022-05-30 13:36 ` [PATCH AUTOSEL 5.15 021/109] rtw88: 8821c: fix debugfs rssi value Sasha Levin
2022-05-30 13:36 ` [PATCH AUTOSEL 5.15 022/109] spi: spi-rspi: Remove setting {src,dst}_{addr,addr_width} based on DMA direction Sasha Levin
2022-05-30 13:36 ` [PATCH AUTOSEL 5.15 023/109] tools/power turbostat: fix ICX DRAM power numbers Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 024/109] scsi: lpfc: Move cfg_log_verbose check before calling lpfc_dmp_dbg() Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 025/109] scsi: lpfc: Fix SCSI I/O completion and abort handler deadlock Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 026/109] scsi: lpfc: Fix call trace observed during I/O with CMF enabled Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 027/109] cpuidle: PSCI: Improve support for suspend-to-RAM for PSCI OSI mode Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 028/109] drm/amd/pm: fix double free in si_parse_power_table() Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 029/109] ASoC: rsnd: care default case on rsnd_ssiu_busif_err_status_clear() Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 030/109] ASoC: rsnd: care return value from rsnd_node_fixed_index() Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 031/109] ath9k: fix QCA9561 PA bias level Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 032/109] media: venus: hfi: avoid null dereference in deinit Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 033/109] media: pci: cx23885: Fix the error handling in cx23885_initdev() Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 034/109] media: cx25821: Fix the warning when removing the module Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 035/109] md/bitmap: don't set sb values if can't pass sanity check Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 036/109] mmc: jz4740: Apply DMA engine limits to maximum segment size Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 037/109] drivers: mmc: sdhci_am654: Add the quirk to set TESTCD bit Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 038/109] drm/sun4i: Add support for D1 TCONs Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 039/109] scsi: megaraid: Fix error check return value of register_chrdev() Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 040/109] drm/amdgpu/sdma: Fix incorrect calculations of the wptr of the doorbells Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 041/109] scsi: ufs: Use pm_runtime_resume_and_get() instead of pm_runtime_get_sync() Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 042/109] scsi: lpfc: Fix resource leak in lpfc_sli4_send_seq_to_ulp() Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 043/109] ath11k: disable spectral scan during spectral deinit Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 044/109] arm64/sme: Add ID_AA64SMFR0_EL1 to __read_sysreg_by_encoding() Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 045/109] ASoC: Intel: bytcr_rt5640: Add quirk for the HP Pro Tablet 408 Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 046/109] drm/plane: Move range check for format_count earlier Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 047/109] drm/amd/pm: fix the compile warning Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 048/109] ath10k: skip ath10k_halt during suspend for driver state RESTARTING Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 049/109] arm64: compat: Do not treat syscall number as ESR_ELx for a bad syscall Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 050/109] drm: msm: fix error check return value of irq_of_parse_and_map() Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 051/109] scsi: target: tcmu: Fix possible data corruption Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 052/109] ipv6: Don't send rs packets to the interface of ARPHRD_TUNNEL Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 053/109] net/mlx5: fs, delete the FTE when there are no rules attached to it Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 054/109] ASoC: dapm: Don't fold register value changes into notifications Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 055/109] mlxsw: spectrum_dcb: Do not warn about priority changes Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 056/109] mlxsw: Treat LLDP packets as control Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 057/109] drm/amdgpu/psp: move PSP memory alloc from hw_init to sw_init Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 058/109] drm/amdgpu/ucode: Remove firmware load type check in amdgpu_ucode_free_bo Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 059/109] regulator: mt6315: Enforce regulator-compatible, not name Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 060/109] HID: bigben: fix slab-out-of-bounds Write in bigben_probe Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 061/109] of: Support more than one crash kernel regions for kexec -s Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 062/109] ASoC: tscs454: Add endianness flag in snd_soc_component_driver Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 063/109] scsi: lpfc: Alter FPIN stat accounting logic Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 064/109] net: remove two BUG() from skb_checksum_help() Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 065/109] s390/preempt: disable __preempt_count_add() optimization for PROFILE_ALL_BRANCHES Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 066/109] perf/amd/ibs: Cascade pmu init functions' return value Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 067/109] sched/core: Avoid obvious double update_rq_clock warning Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 068/109] spi: stm32-qspi: Fix wait_cmd timeout in APM mode Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 069/109] dma-debug: change allocation mode from GFP_NOWAIT to GFP_ATIOMIC Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 070/109] ACPI: PM: Block ASUS B1400CEAE from suspend to idle by default Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 071/109] ipmi:ssif: Check for NULL msg when handling events and messages Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 072/109] ipmi: Fix pr_fmt to avoid compilation issues Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 073/109] rtlwifi: Use pr_warn instead of WARN_ONCE Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 074/109] mt76: mt7921: accept rx frames with non-standard VHT MCS10-11 Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 075/109] mt76: fix encap offload ethernet type check Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 076/109] media: rga: fix possible memory leak in rga_probe Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 077/109] media: coda: limit frame interval enumeration to supported encoder frame sizes Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 078/109] media: hantro: HEVC: unconditionnaly set pps_{cb/cr}_qp_offset values Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 079/109] media: ccs-core.c: fix failure to call clk_disable_unprepare Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 080/109] media: imon: reorganize serialization Sasha Levin
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 081/109] media: cec-adap.c: fix is_configuring state Sasha Levin
2022-05-30 13:37 ` Sasha Levin [this message]
2022-05-30 13:37 ` [PATCH AUTOSEL 5.15 083/109] init: call time_init() before rand_initialize() Sasha Levin
2022-05-30 13:38 ` [PATCH AUTOSEL 5.15 084/109] openrisc: start CPU timer early in boot Sasha Levin
2022-05-30 13:38 ` [PATCH AUTOSEL 5.15 085/109] nvme-pci: fix a NULL pointer dereference in nvme_alloc_admin_tags Sasha Levin
2022-05-30 13:38 ` [PATCH AUTOSEL 5.15 086/109] ASoC: rt5645: Fix errorenous cleanup order Sasha Levin
2022-05-30 13:38 ` [PATCH AUTOSEL 5.15 087/109] nbd: Fix hung on disconnect request if socket is closed before Sasha Levin
2022-05-30 13:38 ` [PATCH AUTOSEL 5.15 088/109] drm/amd/pm: update smartshift powerboost calc for smu12 Sasha Levin
2022-05-30 13:38 ` [PATCH AUTOSEL 5.15 089/109] drm/amd/pm: update smartshift powerboost calc for smu13 Sasha Levin
2022-05-30 13:38 ` [PATCH AUTOSEL 5.15 090/109] net: phy: micrel: Allow probing without .driver_data Sasha Levin
2022-05-30 13:38 ` [PATCH AUTOSEL 5.15 091/109] media: exynos4-is: Fix compile warning Sasha Levin
2022-05-30 13:38 ` [PATCH AUTOSEL 5.15 092/109] media: hantro: Stop using H.264 parameter pic_num Sasha Levin
2022-05-30 13:38 ` [PATCH AUTOSEL 5.15 093/109] ASoC: max98357a: remove dependency on GPIOLIB Sasha Levin
2022-05-30 13:38 ` [PATCH AUTOSEL 5.15 094/109] ASoC: rt1015p: " Sasha Levin
2022-05-30 13:38 ` [PATCH AUTOSEL 5.15 095/109] ACPI: CPPC: Assume no transition latency if no PCCT Sasha Levin
2022-05-30 13:38 ` [PATCH AUTOSEL 5.15 096/109] nvme: set non-mdts limits in nvme_scan_work Sasha Levin
2022-05-30 13:38 ` [PATCH AUTOSEL 5.15 097/109] can: mcp251xfd: silence clang's -Wunaligned-access warning Sasha Levin
2022-05-30 13:38 ` [PATCH AUTOSEL 5.15 098/109] x86/microcode: Add explicit CPU vendor dependency Sasha Levin
2022-05-30 13:38 ` [PATCH AUTOSEL 5.15 099/109] net: ipa: ignore endianness if there is no header Sasha Levin
2022-05-30 13:38 ` [PATCH AUTOSEL 5.15 100/109] ARM: 9201/1: spectre-bhb: rely on linker to emit cross-section literal loads Sasha Levin
2022-05-30 13:52 ` Ard Biesheuvel
2022-05-30 13:38 ` [PATCH AUTOSEL 5.15 101/109] m68k: atari: Make Atari ROM port I/O write macros return void Sasha Levin
2022-05-30 13:38 ` [PATCH AUTOSEL 5.15 102/109] hwmon: Make chip parameter for with_info API mandatory Sasha Levin
2022-05-30 14:29 ` Guenter Roeck
2022-05-30 13:38 ` [PATCH AUTOSEL 5.15 103/109] rxrpc: Return an error to sendmsg if call failed Sasha Levin
2022-05-30 13:38 ` [PATCH AUTOSEL 5.15 104/109] rxrpc, afs: Fix selection of abort codes Sasha Levin
2022-05-30 13:38 ` [PATCH AUTOSEL 5.15 105/109] afs: Adjust ACK interpretation to try and cope with NAT Sasha Levin
2022-05-30 13:38 ` [PATCH AUTOSEL 5.15 106/109] eth: tg3: silence the GCC 12 array-bounds warning Sasha Levin
2022-05-30 13:38 ` [PATCH AUTOSEL 5.15 107/109] char: tpm: cr50_i2c: Suppress duplicated error message in .remove() Sasha Levin
2022-05-30 13:38 ` [PATCH AUTOSEL 5.15 108/109] selftests/bpf: fix btf_dump/btf_dump due to recent clang change Sasha Levin
2022-05-30 13:38 ` [PATCH AUTOSEL 5.15 109/109] gfs2: use i_lock spin_lock for inode qadata Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220530133825.1933431-82-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew@lunn.ch \
--cc=colin.king@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fntoth@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux@rempel-privat.de \
--cc=lukas@wunner.de \
--cc=martyn.welch@collabora.com \
--cc=netdev@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
--cc=oneukum@suse.com \
--cc=pabeni@redhat.com \
--cc=paskripkin@gmail.com \
--cc=stable@vger.kernel.org \
--cc=steve.glendinning@shawell.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox