linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Arthur Kiyanovski <akiyano@amazon.com>,
	"David S. Miller" <davem@davemloft.net>,
	Sasha Levin <sashal@kernel.org>
Subject: [PATCH 4.19 042/118] net: ena: fix crash during failed resume from hibernation
Date: Tue, 11 Dec 2018 16:41:01 +0100	[thread overview]
Message-ID: <20181211151645.937797291@linuxfoundation.org> (raw)
In-Reply-To: <20181211151644.216668863@linuxfoundation.org>

4.19-stable review patch.  If anyone has any objections, please let me know.

------------------

[ Upstream commit e76ad21d070f79e566ac46ce0b0584c3c93e1b43 ]

During resume from hibernation if ena_restore_device fails,
ena_com_dev_reset() is called, and uses the readless read mechanism,
which was already destroyed by the call to
ena_com_mmio_reg_read_request_destroy(). This causes a NULL pointer
reference.

In this commit we switch the call order of the above two functions
to avoid this crash.

Fixes: d7703ddbd7c9 ("net: ena: fix rare bug when failed restart/resume is followed by driver removal")
Signed-off-by: Arthur Kiyanovski <akiyano@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c
index d906293ce07d..4b73131a0f20 100644
--- a/drivers/net/ethernet/amazon/ena/ena_netdev.c
+++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c
@@ -2627,8 +2627,8 @@ err_device_destroy:
 	ena_com_abort_admin_commands(ena_dev);
 	ena_com_wait_for_abort_completion(ena_dev);
 	ena_com_admin_destroy(ena_dev);
-	ena_com_mmio_reg_read_request_destroy(ena_dev);
 	ena_com_dev_reset(ena_dev, ENA_REGS_RESET_DRIVER_INVALID_STATE);
+	ena_com_mmio_reg_read_request_destroy(ena_dev);
 err:
 	clear_bit(ENA_FLAG_DEVICE_RUNNING, &adapter->flags);
 	clear_bit(ENA_FLAG_ONGOING_RESET, &adapter->flags);
-- 
2.19.1




  parent reply	other threads:[~2018-12-11 16:02 UTC|newest]

Thread overview: 132+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-11 15:40 [PATCH 4.19 000/118] 4.19.9-stable review Greg Kroah-Hartman
2018-12-11 15:40 ` [PATCH 4.19 001/118] media: vicodec: lower minimum height to 360 Greg Kroah-Hartman
2018-12-11 15:40 ` [PATCH 4.19 002/118] media: cec: check for non-OK/NACK conditions while claiming a LA Greg Kroah-Hartman
2018-12-11 15:40 ` [PATCH 4.19 003/118] media: omap3isp: Unregister media device as first Greg Kroah-Hartman
2018-12-11 15:40 ` [PATCH 4.19 004/118] media: ipu3-cio2: Unregister device nodes first, then release resources Greg Kroah-Hartman
2018-12-11 15:40 ` [PATCH 4.19 005/118] iommu/vt-d: Fix NULL pointer dereference in prq_event_thread() Greg Kroah-Hartman
2018-12-11 15:40 ` [PATCH 4.19 006/118] brcmutil: really fix decoding channel info for 160 MHz bandwidth Greg Kroah-Hartman
2018-12-11 15:40 ` [PATCH 4.19 007/118] mt76: fix building without CONFIG_LEDS_CLASS Greg Kroah-Hartman
2018-12-11 15:40 ` [PATCH 4.19 008/118] iommu/ipmmu-vmsa: Fix crash on early domain free Greg Kroah-Hartman
2018-12-11 15:40 ` [PATCH 4.19 009/118] scsi: ufs: Fix hynix ufs bug with quirk on hi36xx SoC Greg Kroah-Hartman
2018-12-17  8:24   ` Kyuho Choi
2018-12-17  8:30     ` Greg Kroah-Hartman
2018-12-11 15:40 ` [PATCH 4.19 010/118] can: ucan: remove set but not used variable udev Greg Kroah-Hartman
2018-12-11 15:40 ` [PATCH 4.19 011/118] can: rcar_can: Fix erroneous registration Greg Kroah-Hartman
2018-12-11 15:40 ` [PATCH 4.19 012/118] test_firmware: fix error return getting clobbered Greg Kroah-Hartman
2018-12-11 15:40 ` [PATCH 4.19 013/118] HID: input: Ignore battery reported by Symbol DS4308 Greg Kroah-Hartman
2018-12-11 15:40 ` [PATCH 4.19 014/118] batman-adv: Use explicit tvlv padding for ELP packets Greg Kroah-Hartman
2018-12-11 15:40 ` [PATCH 4.19 015/118] batman-adv: Expand merged fragment buffer for full packet Greg Kroah-Hartman
2018-12-11 15:40 ` [PATCH 4.19 016/118] amd/iommu: Fix Guest Virtual APIC Log Tail Address Register Greg Kroah-Hartman
2018-12-11 15:40 ` [PATCH 4.19 017/118] bnx2x: Assign unique DMAE channel number for FW DMAE transactions Greg Kroah-Hartman
2018-12-11 15:40 ` [PATCH 4.19 018/118] qed: Fix PTT leak in qed_drain() Greg Kroah-Hartman
2018-12-11 15:40 ` [PATCH 4.19 019/118] qed: Fix overriding offload_tc by protocols without APP TLV Greg Kroah-Hartman
2018-12-11 15:40 ` [PATCH 4.19 020/118] qed: Fix rdma_info structure allocation Greg Kroah-Hartman
2018-12-11 15:40 ` [PATCH 4.19 021/118] qed: Fix reading wrong value in loop condition Greg Kroah-Hartman
2018-12-11 15:40 ` [PATCH 4.19 022/118] usb: dwc2: pci: Fix an error code in probe Greg Kroah-Hartman
2018-12-11 15:40 ` [PATCH 4.19 023/118] Revert "usb: gadget: ffs: Fix BUG when userland exits with submitted AIO transfers" Greg Kroah-Hartman
2018-12-11 15:40 ` [PATCH 4.19 024/118] s390/ism: clear dmbe_mask bit before SMC IRQ handling Greg Kroah-Hartman
2018-12-11 15:40 ` [PATCH 4.19 025/118] nvme-fc: resolve io failures during connect Greg Kroah-Hartman
2018-12-11 15:40 ` [PATCH 4.19 026/118] bnxt_en: Fix filling time in bnxt_fill_coredump_record() Greg Kroah-Hartman
2018-12-11 15:40 ` [PATCH 4.19 027/118] drm/amdgpu: Add amdgpu "max bpc" connector property (v2) Greg Kroah-Hartman
2018-12-11 15:40 ` [PATCH 4.19 028/118] drm/amd/display: Support " Greg Kroah-Hartman
2018-12-11 15:40 ` [PATCH 4.19 029/118] net/mlx4_core: Zero out lkey field in SW2HW_MPT fw command Greg Kroah-Hartman
2018-12-11 15:40 ` [PATCH 4.19 030/118] net/mlx4_core: Fix uninitialized variable compilation warning Greg Kroah-Hartman
2018-12-11 15:40 ` [PATCH 4.19 031/118] net/mlx4: Fix UBSAN warning of signed integer overflow Greg Kroah-Hartman
2018-12-11 15:40 ` [PATCH 4.19 032/118] drivers/net/ethernet/qlogic/qed/qed_rdma.h: fix typo Greg Kroah-Hartman
2018-12-11 15:40 ` [PATCH 4.19 033/118] gpio: pxa: fix legacy non pinctrl aware builds again Greg Kroah-Hartman
2018-12-11 15:40 ` [PATCH 4.19 034/118] gpio: mockup: fix indicated direction Greg Kroah-Hartman
2018-12-11 15:40 ` [PATCH 4.19 035/118] tc-testing: tdc.py: ignore errors when decoding stdout/stderr Greg Kroah-Hartman
2018-12-11 15:40 ` [PATCH 4.19 036/118] tc-testing: tdc.py: Guard against lack of returncode in executed command Greg Kroah-Hartman
2018-12-11 15:40 ` [PATCH 4.19 037/118] mtd: rawnand: qcom: Namespace prefix some commands Greg Kroah-Hartman
2018-12-11 15:40 ` [PATCH 4.19 038/118] cpufreq: ti-cpufreq: Only register platform_device when supported Greg Kroah-Hartman
2018-12-11 15:40 ` [PATCH 4.19 039/118] Revert "HID: uhid: use strlcpy() instead of strncpy()" Greg Kroah-Hartman
2018-12-11 15:40 ` [PATCH 4.19 040/118] HID: multitouch: Add pointstick support for Cirque Touchpad Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 041/118] mtd: spi-nor: Fix Cadence QSPI page fault kernel panic Greg Kroah-Hartman
2018-12-11 15:41 ` Greg Kroah-Hartman [this message]
2018-12-11 15:41 ` [PATCH 4.19 043/118] NFSv4: Fix a NFSv4 state manager deadlock Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 044/118] qed: Fix bitmap_weight() check Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 045/118] qed: Fix QM getters to always return a valid pq Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 046/118] net/ibmnvic: Fix deadlock problem in reset Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 047/118] riscv: fix warning in arch/riscv/include/asm/module.h Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 048/118] net: faraday: ftmac100: remove netif_running(netdev) check before disabling interrupts Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 049/118] iommu/vt-d: Use memunmap to free memremap Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 050/118] NFSv4.2 copy do not allocate memory under the lock Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 051/118] flexfiles: use per-mirror specified stateid for IO Greg Kroah-Hartman
2018-12-11 18:49   ` Mkrtchyan, Tigran
2018-12-12  7:06     ` Greg Kroah-Hartman
2018-12-14  7:12       ` Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 052/118] ibmvnic: Fix RX queue buffer cleanup Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 053/118] ibmvnic: Update driver queues after change in ring size support Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 054/118] team: no need to do team_notify_peers or team_mcast_rejoin when disabling port Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 055/118] net: amd: add missing of_node_put() Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 056/118] usb: quirk: add no-LPM quirk on SanDisk Ultra Flair device Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 057/118] usb: appledisplay: Add 27" Apple Cinema Display Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 058/118] USB: check usb_get_extra_descriptor for proper size Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 059/118] USB: serial: console: fix reported terminal settings Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 060/118] ALSA: usb-audio: Add SMSL D1 to quirks for native DSD support Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 061/118] ALSA: usb-audio: Fix UAF decrement if card has no live interfaces in card.c Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 062/118] ALSA: hda: Add support for AMD Stoney Ridge Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 063/118] ALSA: pcm: Fix starvation on down_write_nonblock() Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 064/118] ALSA: pcm: Call snd_pcm_unlink() conditionally at closing Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 065/118] ALSA: pcm: Fix interval evaluation with openmin/max Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 066/118] ALSA: hda/realtek - Fix speaker output regression on Thinkpad T570 Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 067/118] ALSA: hda/realtek: ALC286 mic and headset-mode fixups for Acer Aspire U27-880 Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 068/118] ALSA: hda/realtek - Add support for Acer Aspire C24-860 headset mic Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 069/118] ALSA: hda/realtek: Fix mic issue on Acer AIO Veriton Z4660G Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 070/118] ALSA: hda/realtek: Fix mic issue on Acer AIO Veriton Z4860G/Z6860G Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 071/118] media: gspca: fix frame overflow error Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 072/118] media: vicodec: fix memchr() kernel oops Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 073/118] media: dvb-pll: fix tuner frequency ranges Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 074/118] media: dvb-pll: dont re-validate tuner frequencies Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 075/118] Revert "mfd: cros_ec: Use devm_kzalloc for private data" Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 076/118] parisc: Enable -ffunction-sections for modules on 32-bit kernel Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 077/118] virtio/s390: avoid race on vcdev->config Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 078/118] virtio/s390: fix race in ccw_io_helper() Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 079/118] vhost/vsock: fix use-after-free in network stack callers Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 080/118] arm64: hibernate: Avoid sending cross-calling with interrupts disabled Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 081/118] SUNRPC: Fix leak of krb5p encode pages Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 082/118] dmaengine: dw: Fix FIFO size for Intel Merrifield Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 083/118] Revert "dmaengine: imx-sdma: Use GFP_NOWAIT for dma allocations" Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 084/118] Revert "dmaengine: imx-sdma: alloclate bd memory from dma pool" Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 085/118] dmaengine: imx-sdma: implement channel termination via worker Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 086/118] dmaengine: imx-sdma: use GFP_NOWAIT for dma descriptor allocations Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 087/118] dmaengine: cppi41: delete channel from pending list when stop channel Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 088/118] ARM: 8806/1: kprobes: Fix false positive with FORTIFY_SOURCE Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 089/118] xhci: workaround CSS timeout on AMD SNPS 3.0 xHC Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 090/118] xhci: Prevent U1/U2 link pm states if exit latency is too long Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 091/118] arm64: dts: rockchip: remove vdd_log from rock960 to fix a stability issues Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 092/118] Revert "x86/e820: put !E820_TYPE_RAM regions into memblock.reserved" Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 093/118] cifs: Fix separator when building path from dentry Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 094/118] staging: rtl8712: Fix possible buffer overrun Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 095/118] Revert commit ef9209b642f "staging: rtl8723bs: Fix indenting errors and an off-by-one mistake in core/rtw_mlme_ext.c" Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 096/118] crypto: do not free algorithm before using Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 097/118] drm/amdgpu: update mc firmware image for polaris12 variants Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 098/118] drm/lease: Send a distinct uevent Greg Kroah-Hartman
2018-12-11 16:14   ` Keith Packard
2018-12-11 15:41 ` [PATCH 4.19 099/118] drm/msm: Move fence put to where failure occurs Greg Kroah-Hartman
2018-12-11 15:41 ` [PATCH 4.19 100/118] drm/amdgpu/gmc8: update MC firmware for polaris Greg Kroah-Hartman
2018-12-11 15:42 ` [PATCH 4.19 101/118] drm/amdgpu/gmc8: always load MC firmware in the driver Greg Kroah-Hartman
2018-12-11 15:42 ` [PATCH 4.19 102/118] drm/i915: Downgrade Gen9 Plane WM latency error Greg Kroah-Hartman
2018-12-11 15:42 ` [PATCH 4.19 103/118] kprobes/x86: Fix instruction patching corruption when copying more than one RIP-relative instruction Greg Kroah-Hartman
2018-12-11 15:42 ` [PATCH 4.19 104/118] x86/efi: Allocate e820 buffer before calling efi_exit_boot_service Greg Kroah-Hartman
2018-12-11 15:42 ` [PATCH 4.19 105/118] Drivers: hv: vmbus: Offload the handling of channels to two workqueues Greg Kroah-Hartman
2018-12-11 15:42 ` [PATCH 4.19 106/118] tty: serial: 8250_mtk: always resume the device in probe Greg Kroah-Hartman
2018-12-11 15:42 ` [PATCH 4.19 107/118] tty: do not set TTY_IO_ERROR flag if console port Greg Kroah-Hartman
2018-12-11 15:42 ` [PATCH 4.19 108/118] gnss: sirf: fix activation retry handling Greg Kroah-Hartman
2018-12-11 15:42 ` [PATCH 4.19 109/118] kgdboc: fix KASAN global-out-of-bounds bug in param_set_kgdboc_var() Greg Kroah-Hartman
2018-12-11 15:42 ` [PATCH 4.19 110/118] libnvdimm, pfn: Pad pfn namespaces relative to other regions Greg Kroah-Hartman
2018-12-11 15:42 ` [PATCH 4.19 111/118] cfg80211: Fix busy loop regression in ieee80211_ie_split_ric() Greg Kroah-Hartman
2018-12-11 15:42 ` [PATCH 4.19 112/118] mac80211_hwsim: Timer should be initialized before device registered Greg Kroah-Hartman
2018-12-11 15:42 ` [PATCH 4.19 113/118] mac80211: fix GFP_KERNEL under tasklet context Greg Kroah-Hartman
2018-12-11 15:42 ` [PATCH 4.19 114/118] mac80211: Clear beacon_int in ieee80211_do_stop Greg Kroah-Hartman
2018-12-11 15:42 ` [PATCH 4.19 115/118] mac80211: ignore tx status for PS stations in ieee80211_tx_status_ext Greg Kroah-Hartman
2018-12-11 15:42 ` [PATCH 4.19 116/118] mac80211: fix reordering of buffered broadcast packets Greg Kroah-Hartman
2018-12-11 15:42 ` [PATCH 4.19 117/118] mac80211: ignore NullFunc frames in the duplicate detection Greg Kroah-Hartman
2018-12-11 15:42 ` [PATCH 4.19 118/118] HID: quirks: fix RetroUSB.com devices Greg Kroah-Hartman
2018-12-11 21:33 ` [PATCH 4.19 000/118] 4.19.9-stable review kernelci.org bot
2018-12-12  0:03 ` shuah
2018-12-12  7:05   ` Greg Kroah-Hartman
2018-12-12  6:17 ` Naresh Kamboju
2018-12-12  9:19   ` Greg Kroah-Hartman
2018-12-12 18:50 ` Guenter Roeck
2018-12-13  8:05   ` Greg Kroah-Hartman

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=20181211151645.937797291@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=akiyano@amazon.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).