HomeFreeBSD

mmc: Drain the intrhook in mmc_detach()

Description

mmc: Drain the intrhook in mmc_detach()

Buggy SD card drivers may attach and detach a mmc(4) driver instance in
quick succession. In this case mmc(4) must disestablish its intrhook
callback during detach. Thus, this change adds a call to
config_intrhook_drain(), which blocks or does nothing if the intrhook is
running or has already ran (the SD card was plugged in), and
disestablishes the hook if it hasn't ran yet (the SD card was not
plugged in).

PR: 254373
Reviewed by: imp, manu, markj
Sponsored by: The FreeBSD Foundation

(cherry picked from commit d5341d72a11be200e536ac7d8967449a3f521792)

Details

Provenance
yzhong_freebsdfoundation.orgAuthored on Jul 22 2021, 5:16 PM
markjCommitted on Jul 29 2021, 12:11 PM
Parents
rG3afad070bddd: man9: Update guarantees for userspace fetch/store operations
Branches
Unknown
Tags
Unknown