[Regression] Partition not removed after removing the memory cards from card reader since kernel 5.9.0-rc3+
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
HWE Next |
Fix Released
|
Undecided
|
Unassigned | ||
linux (Ubuntu) |
Fix Released
|
High
|
Chris Chiu | ||
Focal |
Invalid
|
Undecided
|
Unassigned | ||
Hirsute |
Fix Released
|
High
|
Chris Chiu | ||
linux-oem-5.10 (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
High
|
Chris Chiu | ||
Hirsute |
Invalid
|
Undecided
|
Unassigned |
Bug Description
[SRU Justification]
[Impact]
Memory card removal event can not be reflected via uevent on some card
readers Ex. Realtek card readers 0bda:0328 and 0bda:0158. Thus the file
browser still see the ghost disk even it's already removed.
[Fix]
Found the commit 6540fbf6b643 in 5.9.0-rc3 introduce this regression.
Fix it by making sure the partition scan will never be skipped for each
vfs_open until the partition scan is really done
[Test]
Verified on the Realtek card reader 0bda:0328 on Dell Precision 7820
and the external Realtek usb interface card reader 0bda:0158.
Insert the SD card in the card reader
$ udevadm monitor
Remove the SD card and check the udevadm monitor output
KERNEL[188.377042] change /devices/
UDEV [188.383261] remove /devices/
KERNEL[188.390887] change /devices/
UDEV [188.396012] remove /devices/
The remove event should be observed from the output messages. On the
affected card reader, only change event would be observed.
[Where problem could occur]
These kind of card readers doesn't send remove event of scsi_disk and
scsi_device like others so they only depend on the block subsystem to
detect the media change and relect the removal event by partition scan.
The behavior related to media removal is changed after 5.9.0-rc3.
The remove event is not able to be correcly reflected since then, the
device node of the media will remain there until next card insertion.
========== Original Bug Description ==========
Ubuntu version: 20.10
Kernel: 5.10.0-1013-oem
Card reader: Realtek Card Reader (0bda:0328 and 0bda:0158)
Summary
=======
After upgrading to kernel 5.9.0-rc3 or later, the device node for the partitions on the memory cards will not disappear after removing the memory cards. This is confusing to the user level applications like File Browser since the partition label will remain there for a long time.
Steps to reproduce
==================
1. Upgrade to kernel later than 5.9.0-rc3
2. Plug the external card reader and insert the formatted memory card
3. Verify if the memory card mounted and visible on File Browser
4. Remove the memory card from the card reader
5. Verify if the mounted memory card removed from the File Browser
Expected results
================
The mounted memory card identifier should be disappear after remove the memory card
Actual results
==============
The partition label of the memory card exists for a long time.
---
ProblemType: Bug
ApportVersion: 2.20.11-0ubuntu50
Architecture: amd64
AudioDevicesInUse:
USER PID ACCESS COMMAND
/dev/snd/
/dev/snd/
CasperMD5CheckR
CurrentDesktop: ubuntu:GNOME
DistroRelease: Ubuntu 20.10
InstallationDate: Installed on 2021-03-22 (0 days ago)
InstallationMedia: Ubuntu 20.10 "Groovy Gorilla" - Release amd64 (20201022)
MachineType: ASUSTeK COMPUTER INC. ZenBook UX434IQ_UX434IQ
Package: linux (not installed)
ProcFB: 0 amdgpudrmfb
ProcKernelCmdLine: BOOT_IMAGE=
ProcVersionSign
RelatedPackageV
linux-
linux-
linux-firmware 1.190
Tags: groovy
Uname: Linux 5.10.0-14-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin lxd plugdev sambashare sudo
_MarkForUpload: True
dmi.bios.date: 02/26/2020
dmi.bios.release: 5.16
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: UX434IQ_UX434IQ.203
dmi.board.
dmi.board.name: UX434IQ
dmi.board.vendor: ASUSTeK COMPUTER INC.
dmi.board.version: 1.0
dmi.chassis.
dmi.chassis.type: 10
dmi.chassis.vendor: ASUSTeK COMPUTER INC.
dmi.chassis.
dmi.modalias: dmi:bvnAmerican
dmi.product.family: ZenBook
dmi.product.name: ZenBook UX434IQ_UX434IQ
dmi.product.
dmi.sys.vendor: ASUSTeK COMPUTER INC.
CVE References
tags: | added: oem-priority originate-from-1917413 somerville |
tags: |
added: focal removed: groovy oem-priority originate-from-1917413 somerville |
tags: | added: groovy |
tags: | added: originate-from-1917413 |
tags: | added: oem-priority somerville |
Changed in linux (Ubuntu): | |
status: | Fix Committed → In Progress |
Changed in linux-oem-5.10 (Ubuntu Hirsute): | |
status: | New → Invalid |
Changed in linux-oem-5.10 (Ubuntu Focal): | |
status: | New → In Progress |
Changed in linux (Ubuntu Hirsute): | |
importance: | Undecided → High |
Changed in linux-oem-5.10 (Ubuntu Focal): | |
importance: | Undecided → High |
assignee: | nobody → Chris Chiu (mschiu77) |
Changed in linux (Ubuntu Focal): | |
status: | New → Invalid |
description: | updated |
description: | updated |
description: | updated |
Changed in linux-oem-5.10 (Ubuntu Focal): | |
status: | In Progress → Fix Committed |
Changed in hwe-next: | |
status: | New → Fix Released |
apport information