Re: [PATCH] mmc: block: check mmc_blk_get() in the sysfs callbacks

From: shao.mingyin

Date: Sun Nov 29 2026 - 06:16:00 EST


Hi Ulf,

> How did you reproduce this? Did you verify this on HW?

The report was based on code inspection. I couldn't reproduce the
failure, and I didn't test on physical hardware. In arm64 QEMU with
sdhci-pci and an emulated SD card, reads and writes on already-open
force_ro descriptors returned -ENODEV after removal on both the
baseline and patched kernels. The QEMU test covered force_ro on SD.

I missed the ordering in mmc_blk_remove_req(). It calls del_gendisk()
before dropping the driver's reference to mmc_blk_data. During
del_gendisk(), device_del() removes the attribute group. Kernfs
prevents new callbacks and waits for those already in progress.
The same teardown applies to the eMMC boot disks.

I'm withdrawing the patch.

Thanks,
Shao