audk/EmbeddedPkg/Universal/MmcDxe
Laszlo Ersek e1b59e085a EmbeddedPkg/Universal/MmcDxe: "fix" CloseProtocol() call in BindingStop()
The 3rd and 4th parameters of the CloseProtocol() call are wrong.

Given that we're not dissociating a child controller from a parent
controller (= closing a BY_CHILD_CONTROLLER open), but closing a BY_DRIVER
open, the 4th parameter (ControllerHandle) should equal the 1st parameter
(Handle).

It's unclear why this code hasn't crashed before.

Note that the patch doesn't fix the underlying driver model bug. I don't
understand what the loop in MmcDriverBindingStop() attempts to do. Is this
driver supposed to be a bus driver? It seems to create new handles, and to
append device path nodes. But it doesn't set up proper parent/child
protocol opens, and it doesn't close them.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2019-10-09 09:40:09 +02:00
..
ComponentName.c EmbeddedPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:57:58 -07:00
Diagnostics.c EmbeddedPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:57:58 -07:00
Mmc.c EmbeddedPkg/Universal/MmcDxe: "fix" CloseProtocol() call in BindingStop() 2019-10-09 09:40:09 +02:00
Mmc.h EmbeddedPkg: Fix various typos 2019-07-04 12:21:04 +01:00
MmcBlockIo.c EmbeddedPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:57:58 -07:00
MmcDebug.c EmbeddedPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:57:58 -07:00
MmcDxe.inf EmbeddedPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:57:58 -07:00
MmcIdentification.c EmbeddedPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:57:58 -07:00