Frank Li
b0ea155fa4
mmc: cqhci: Fix random crash when remove mmc module/card
commit f06391c45e83f9a731045deb23df7cc3814fd795 upstream.
[ 6684.493350] Unable to handle kernel paging request at virtual address ffff800011c5b0f0
[ 6684.498531] mmc0: card 0001 removed
[ 6684.501556] Mem abort info:
[ 6684.509681] ESR = 0x96000047
[ 6684.512786] EC = 0x25: DABT (current EL), IL = 32 bits
[ 6684.518394] SET = 0, FnV = 0
[ 6684.521707] EA = 0, S1PTW = 0
[ 6684.524998] Data abort info:
[ 6684.528236] ISV = 0, ISS = 0x00000047
[ 6684.532986] CM = 0, WnR = 1
[ 6684.536129] swapper pgtable: 4k pages, 48-bit VAs, pgdp=0000000081b22000
[ 6684.543923] [ffff800011c5b0f0] pgd=00000000bffff003, p4d=00000000bffff003, pud=00000000bfffe003, pmd=00000000900e1003, pte=0000000000000000
[ 6684.557915] Internal error: Oops: 96000047 [#1] PREEMPT SMP
[ 6684.564240] Modules linked in: sdhci_esdhc_imx(-) sdhci_pltfm sdhci cqhci mmc_block mmc_core fsl_jr_uio caam_jr caamkeyblob_desc caamhash_desc caamalg_desc crypto_engine rng_core authenc libdes crct10dif_ce flexcan can_dev caam error [last unloaded: mmc_core]
[ 6684.587281] CPU: 0 PID: 79138 Comm: kworker/0:3H Not tainted 5.10.9-01410-g3ba33182767b-dirty #10
[ 6684.596160] Hardware name: Freescale i.MX8DXL EVK (DT)
[ 6684.601320] Workqueue: kblockd blk_mq_run_work_fn
[ 6684.606094] pstate: 40000005 (nZcv daif -PAN -UAO -TCO BTYPE=--)
[ 6684.612286] pc : cqhci_request+0x148/0x4e8 [cqhci]
^GMessage from syslogd@ at Thu Jan 1 01:51:24 1970 ...[ 6684.617085] lr : cqhci_request+0x314/0x4e8 [cqhci]
[ 6684.626734] sp : ffff80001243b9f0
[ 6684.630049] x29: ffff80001243b9f0 x28: ffff00002c3dd000
[ 6684.635367] x27: 0000000000000001 x26: 0000000000000001
[ 6684.640690] x25: ffff00002c451000 x24: 000000000000000f
[ 6684.646007] x23: ffff000017e71c80 x22: ffff00002c451000
[ 6684.651326] x21: ffff00002c0f3550 x20: ffff00002c0f3550
[ 6684.656651] x19: ffff000017d46880 x18: ffff00002cea1500
[ 6684.661977] x17: 0000000000000000 x16: 0000000000000000
[ 6684.667294] x15: 000001ee628e3ed1 x14: 0000000000000278
[ 6684.672610] x13: 0000000000000001 x12: 0000000000000001
[ 6684.677927] x11: 0000000000000000 x10: 0000000000000000
[ 6684.683243] x9 : 000000000000002b x8 : 0000000000001000
[ 6684.688560] x7 : 0000000000000010 x6 : ffff00002c0f3678
[ 6684.693886] x5 : 000000000000000f x4 : ffff800011c5b000
[ 6684.699211] x3 : 000000000002d988 x2 : 0000000000000008
[ 6684.704537] x1 : 00000000000000f0 x0 : 0002d9880008102f
[ 6684.709854] Call trace:
[ 6684.712313] cqhci_request+0x148/0x4e8 [cqhci]
[ 6684.716803] mmc_cqe_start_req+0x58/0x68 [mmc_core]
[ 6684.721698] mmc_blk_mq_issue_rq+0x460/0x810 [mmc_block]
[ 6684.727018] mmc_mq_queue_rq+0x118/0x2b0 [mmc_block]
The problem occurs when cqhci_request() get called after cqhci_disable() as
it leads to access of allocated memory that has already been freed. Let's
fix the problem by calling cqhci_disable() a bit later in the remove path.
Signed-off-by: Frank Li <[email protected]>
Diagnosed-by: Adrian Hunter <[email protected]>
Acked-by: Adrian Hunter <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Fixes: f690f4409d ("mmc: mmc: Enable CQE's")
Cc: [email protected]
Signed-off-by: Ulf Hansson <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
2021-03-17 17:03:48 +01:00 |
| .. |
|
accessibility
|
|
|
|
acpi
|
ACPI: video: Add DMI quirk for GIGABYTE GB-BXBT-2807
|
2021-03-11 14:06:50 +01:00 |
|
amba
|
amba: Fix resource leak for drivers without .remove
|
2021-03-04 10:26:32 +01:00 |
|
android
|
binder: add flag to clear buffer on txn complete
|
2020-12-30 11:51:35 +01:00 |
|
ata
|
ata: ahci_brcm: Add back regulators management
|
2021-03-04 10:26:23 +01:00 |
|
atm
|
atm: idt77252: call pci_disable_device() on error path
|
2021-01-12 20:16:11 +01:00 |
|
auxdisplay
|
auxdisplay: ht16k33: Fix refresh rate handling
|
2021-03-04 10:26:30 +01:00 |
|
base
|
software node: Fix node registration
|
2021-03-17 17:03:48 +01:00 |
|
bcma
|
|
|
|
block
|
rsxx: Return -EFAULT if copy_to_user() fails
|
2021-03-09 11:09:39 +01:00 |
|
bluetooth
|
Bluetooth: hci_h5: Set HCI_QUIRK_SIMULTANEOUS_DISCOVERY for btrtl
|
2021-03-07 12:20:44 +01:00 |
|
bus
|
bus: fsl-mc: fix error return code in fsl_mc_object_allocate()
|
2020-12-30 11:51:23 +01:00 |
|
cdrom
|
|
|
|
char
|
tpm, tpm_tis: Decorate tpm_get_timeouts() with request_locality()
|
2021-03-09 11:09:36 +01:00 |
|
clk
|
clk: aspeed: Fix APLL calculate formula from ast2600-A2
|
2021-03-04 10:26:34 +01:00 |
|
clocksource
|
clocksource/drivers/mxs_timer: Add missing semicolon when DEBUG is defined
|
2021-03-04 10:26:29 +01:00 |
|
connector
|
|
|
|
counter
|
|
|
|
cpufreq
|
cpufreq: intel_pstate: Get per-CPU max freq via MSR_HWP_CAPABILITIES if available
|
2021-03-04 10:26:50 +01:00 |
|
cpuidle
|
|
|
|
crypto
|
crypto: sun4i-ss - initialize need_fallback
|
2021-03-04 10:26:45 +01:00 |
|
dax
|
device-dax/core: Fix memory leak when rmmod dax.ko
|
2020-12-30 11:51:46 +01:00 |
|
dca
|
|
|
|
devfreq
|
|
|
|
dio
|
|
|
|
dma
|
dmaengine: hsu: disable spurious interrupt
|
2021-03-04 10:26:28 +01:00 |
|
dma-buf
|
dmabuf: fix use-after-free of dmabuf's file->f_inode
|
2021-01-12 20:16:23 +01:00 |
|
edac
|
EDAC/amd64: Fix PCI component registration
|
2020-12-30 11:51:36 +01:00 |
|
eisa
|
|
|
|
extcon
|
extcon: max77693: Fix modalias string
|
2020-12-30 11:51:24 +01:00 |
|
firewire
|
|
|
|
firmware
|
firmware: imx: select SOC_BUS to fix firmware build
|
2021-02-03 23:25:59 +01:00 |
|
fpga
|
|
|
|
fsi
|
|
|
|
gnss
|
|
|
|
gpio
|
gpio: pcf857x: Fix missing first interrupt
|
2021-03-04 10:26:49 +01:00 |
|
gpu
|
qxl: Fix uninitialised struct field head.surface_id
|
2021-03-17 17:03:39 +01:00 |
|
greybus
|
|
|
|
hid
|
HID: logitech-dj: add support for the new lightspeed connection iteration
|
2021-03-17 17:03:43 +01:00 |
|
hsi
|
HSI: Fix PM usage counter unbalance in ssi_hw_init
|
2021-03-04 10:26:26 +01:00 |
|
hv
|
Drivers: hv: vmbus: Avoid use-after-free in vmbus_onoffer_rescind()
|
2021-03-04 10:26:24 +01:00 |
|
hwmon
|
hwmon: (pwm-fan) Ensure that calculation doesn't discard big period values
|
2021-01-19 18:26:15 +01:00 |
|
hwspinlock
|
|
|
|
hwtracing
|
stm class: Fix module init return on allocation failure
|
2021-01-27 11:47:50 +01:00 |
|
i2c
|
i2c: rcar: optimize cacheline to minimize HW race condition
|
2021-03-17 17:03:41 +01:00 |
|
i3c
|
i3c master: fix missing destroy_workqueue() on error in i3c_master_register
|
2021-01-06 14:48:40 +01:00 |
|
ide
|
scsi: ide: Do not set the RQF_PREEMPT flag for sense requests
|
2021-01-12 20:16:09 +01:00 |
|
idle
|
|
|
|
iio
|
iio: ad5504: Fix setting power-down state
|
2021-01-27 11:47:48 +01:00 |
|
infiniband
|
IB/mlx5: Add missing error code
|
2021-03-09 11:09:38 +01:00 |
|
input
|
Input: applespi - don't wait for responses to commands indefinitely.
|
2021-03-17 17:03:44 +01:00 |
|
interconnect
|
|
|
|
iommu
|
iommu/amd: Fix performance counter initialization
|
2021-03-17 17:03:43 +01:00 |
|
ipack
|
|
|
|
irqchip
|
irqchip/mips-cpu: Set IPI domain parent chip
|
2021-01-27 11:47:49 +01:00 |
|
isdn
|
misdn: dsp: select CONFIG_BITREVERSE
|
2021-01-19 18:26:15 +01:00 |
|
leds
|
leds: trigger: fix potential deadlock with libata
|
2021-02-03 23:25:58 +01:00 |
|
lightnvm
|
lightnvm: fix memory leak when submit fails
|
2021-01-27 11:47:53 +01:00 |
|
macintosh
|
|
|
|
mailbox
|
|
|
|
mcb
|
|
|
|
md
|
dm table: fix zoned iterate_devices based device capability checks
|
2021-03-11 14:06:49 +01:00 |
|
media
|
media: rc: compile rc-cec.c into rc-core
|
2021-03-17 17:03:40 +01:00 |
|
memory
|
memory: ti-aemif: Drop child node when jumping out loop
|
2021-03-04 10:26:14 +01:00 |
|
memstick
|
|
|
|
message
|
|
|
|
mfd
|
mfd: wm831x-auxadc: Prevent use after free in wm831x_auxadc_read_irq()
|
2021-03-04 10:26:33 +01:00 |
|
misc
|
misc: eeprom_93xx46: Add quirk to support Microchip 93LC46B eeprom
|
2021-03-11 14:06:50 +01:00 |
|
mmc
|
mmc: cqhci: Fix random crash when remove mmc module/card
|
2021-03-17 17:03:48 +01:00 |
|
mtd
|
mtd: spi-nor: hisi-sfc: Put child node np on error path
|
2021-03-04 10:26:48 +01:00 |
|
mux
|
|
|
|
net
|
i40e: Fix memory leak in i40e_probe
|
2021-03-17 17:03:44 +01:00 |
|
nfc
|
nfc: s3fwrn5: Release the nfc firmware
|
2020-12-30 11:51:26 +01:00 |
|
ntb
|
|
|
|
nubus
|
|
|
|
nvdimm
|
libnvdimm/dimm: Avoid race between probe and available_slots_show()
|
2021-02-10 09:25:30 +01:00 |
|
nvme
|
nvme-pci: add quirks for Lexar 256GB SSD
|
2021-03-11 14:06:51 +01:00 |
|
nvmem
|
nvmem: core: skip child nodes not matching binding
|
2021-03-04 10:26:37 +01:00 |
|
of
|
of/fdt: Make sure no-map does not remove already reserved regions
|
2021-03-04 10:26:28 +01:00 |
|
opp
|
|
|
|
oprofile
|
|
|
|
parisc
|
|
|
|
parport
|
|
|
|
pci
|
PCI: Fix pci_register_io_range() memory leak
|
2021-03-17 17:03:44 +01:00 |
|
pcmcia
|
|
|
|
perf
|
|
|
|
phy
|
phy: rockchip-emmc: emmc_phy_init() always return 0
|
2021-03-04 10:26:36 +01:00 |
|
pinctrl
|
pinctrl: ingenic: Fix JZ4760 support
|
2021-01-27 11:47:52 +01:00 |
|
platform
|
Platform: OLPC: Fix probe error handling
|
2021-03-17 17:03:42 +01:00 |
|
pnp
|
|
|
|
power
|
power: reset: at91-sama5d2_shdwc: fix wkupdbc mask
|
2021-03-04 10:26:28 +01:00 |
|
powercap
|
|
|
|
pps
|
|
|
|
ps3
|
powerpc/ps3: use dma_mapping_error()
|
2020-12-30 11:51:26 +01:00 |
|
ptp
|
|
|
|
pwm
|
pwm: rockchip: rockchip_pwm_probe(): Remove superfluous clk_unprepare()
|
2021-03-04 10:26:36 +01:00 |
|
rapidio
|
|
|
|
ras
|
|
|
|
regulator
|
regulator: qcom-rpmh: fix pm8009 ldo7
|
2021-03-04 10:26:34 +01:00 |
|
remoteproc
|
remoteproc: qcom: Fix potential NULL dereference in adsp_init_mmio()
|
2020-12-30 11:51:24 +01:00 |
|
reset
|
|
|
|
rpmsg
|
|
|
|
rtc
|
rtc: s5m: select REGMAP_I2C
|
2021-03-04 10:26:29 +01:00 |
|
s390
|
s390/dasd: fix hanging IO request during DASD driver unbind
|
2021-03-17 17:03:48 +01:00 |
|
sbus
|
|
|
|
scsi
|
scsi: libiscsi: Fix iscsi_prep_scsi_cmd_pdu() error handling
|
2021-03-17 17:03:45 +01:00 |
|
sfi
|
|
|
|
sh
|
|
|
|
siox
|
|
|
|
slimbus
|
|
|
|
soc
|
soc: aspeed: snoop: Add clock control logic
|
2021-03-04 10:26:16 +01:00 |
|
soundwire
|
soundwire: cadence: fix ACK/NAK handling
|
2021-03-04 10:26:36 +01:00 |
|
spi
|
spi: stm32: make spurious and overrun interrupts visible
|
2021-03-17 17:03:42 +01:00 |
|
spmi
|
spmi: spmi-pmic-arb: Fix hw_irq overflow
|
2021-03-04 10:26:49 +01:00 |
|
ssb
|
|
|
|
staging
|
staging: bcm2835-audio: Replace unsafe strcpy() with strscpy()
|
2021-03-07 12:20:45 +01:00 |
|
target
|
scsi: target: core: Prevent underflow for service actions
|
2021-03-17 17:03:45 +01:00 |
|
tc
|
|
|
|
tee
|
tee: optee: replace might_sleep with cond_resched
|
2021-02-03 23:25:58 +01:00 |
|
thermal
|
thermal/drivers/cpufreq_cooling: Update cpufreq_state only if state has changed
|
2021-01-06 14:48:35 +01:00 |
|
thunderbolt
|
|
|
|
tty
|
vt/consolemap: do font sum unsigned
|
2021-03-07 12:20:44 +01:00 |
|
uio
|
|
|
|
usb
|
USB: serial: mos7720: fix error code in mos7720_write()
|
2021-03-04 10:26:42 +01:00 |
|
vfio
|
vfio/type1: Use follow_pte()
|
2021-03-04 10:26:38 +01:00 |
|
vhost
|
vhost_net: fix ubuf refcount incorrectly when sendmsg fails
|
2021-01-12 20:16:16 +01:00 |
|
video
|
udlfb: Fix memory leak in dlfb_usb_probe
|
2021-03-07 12:20:42 +01:00 |
|
virt
|
virt: vbox: Do not use wait_event_interruptible when called from kernel context
|
2021-03-04 10:26:10 +01:00 |
|
virtio
|
virtio_ring: Fix two use after free bugs
|
2020-12-30 11:51:29 +01:00 |
|
visorbus
|
|
|
|
vlynq
|
|
|
|
vme
|
|
|
|
w1
|
|
|
|
watchdog
|
watchdog: mei_wdt: request stop on unregister
|
2021-03-04 10:26:47 +01:00 |
|
xen
|
xen-scsiback: don't "handle" error by BUG()
|
2021-02-23 15:02:26 +01:00 |
|
zorro
|
|
|
|
Kconfig
|
|
|
|
Makefile
|
|
|