efi_loader: open protocol information
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Sat, 1 Jun 2019 18:15:10 +0000 (20:15 +0200)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Sat, 1 Jun 2019 20:40:23 +0000 (22:40 +0200)
When a protocol is opened the open protocol information must be updated.
The key fields of the open protocol information records are ImageHandle,
ControllerHandle, and Attributes.

Consider the Attributes field when determining if an open protocol
information record has to be updated or a new one has to be created.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
lib/efi_loader/efi_boottime.c

index 481f9b9d3e7036b9a1d7a6c5eeece5b9ba033ed1..1a0e09807ac4cb4d5ef27f1c50c0e04d08f39dd4 100644 (file)
@@ -2684,7 +2684,8 @@ disconnect_next:
        /* Find existing entry */
        list_for_each_entry(item, &handler->open_infos, link) {
                if (item->info.agent_handle == agent_handle &&
-                   item->info.controller_handle == controller_handle)
+                   item->info.controller_handle == controller_handle &&
+                   item->info.attributes == attributes)
                        match = &item->info;
        }
        /* None found, create one */