]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
memstick: Skip allocating card when removing host
authorKai-Heng Feng <kai.heng.feng@canonical.com>
Fri, 25 Sep 2020 08:49:51 +0000 (16:49 +0800)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 9 Nov 2020 13:48:08 +0000 (14:48 +0100)
commitbafb4a30443a4fcefe9c3026847403529cb350a8
treec23aa39a3b7c2a0db218b54046404c8c845184d8
parent23d058d872ae81dd10600eca239fc39176b98e22
memstick: Skip allocating card when removing host

BugLink: https://bugs.launchpad.net/bugs/1900632
commit 62c59a8786e6bb75569cee91dab66e9da3ff4b68 upstream.

After commit 6827ca573c03 ("memstick: rtsx_usb_ms: Support runtime power
management"), removing module rtsx_usb_ms will be stuck.

The deadlock is caused by powering on and powering off at the same time,
the former one is when memstick_check() is flushed, and the later is called
by memstick_remove_host().

Soe let's skip allocating card to prevent this issue.

Fixes: 6827ca573c03 ("memstick: rtsx_usb_ms: Support runtime power management")
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Link: https://lore.kernel.org/r/20200925084952.13220-1-kai.heng.feng@canonical.com
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Ian May <ian.may@canonical.com>
drivers/memstick/core/memstick.c
include/linux/memstick.h