platform/x86/intel/vsec: Use mutex for ida_alloc() and ida_free()
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Tue, 7 Feb 2023 12:58:21 +0000 (04:58 -0800)
committerHans de Goede <hdegoede@redhat.com>
Fri, 10 Feb 2023 16:21:02 +0000 (17:21 +0100)
commit9a90ea7d378486aa358330dafc7e8c3b27de4d84
tree3f3edc490edc1ea7fdb84dec122f4b9b1ee551d0
parentbe1ca8ae66851ba6a8131c15e7f9c85430315f57
platform/x86/intel/vsec: Use mutex for ida_alloc() and ida_free()

ID alloc and free functions don't have in built protection for parallel
invocation of ida_alloc() and ida_free(). With the current flow in the
vsec driver, there is no such scenario. But add mutex protection for
potential future changes.

Suggested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Link: https://lore.kernel.org/r/20230207125821.3837799-1-srinivas.pandruvada@linux.intel.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/intel/vsec.c