efi: Use a file local lock for efivars
authorSylvain Chouleur <sylvain.chouleur@intel.com>
Fri, 15 Jul 2016 19:36:29 +0000 (21:36 +0200)
committerMatt Fleming <matt@codeblueprint.co.uk>
Fri, 9 Sep 2016 15:08:41 +0000 (16:08 +0100)
commit217b27d4671a0a3f34147f1b341683d36b7457db
tree0a862c4f0829553ca238482d2c3f383e349d25e2
parent2ead3084e3fc37d42f379cca8753b458d8f9ba25
efi: Use a file local lock for efivars

This patch replaces the spinlock in the efivars struct with a single lock
for the whole vars.c file.  The goal of this lock is to protect concurrent
calls to efi variable services, registering and unregistering. This allows
us to register new efivars operations without having in-progress call.

Signed-off-by: Sylvain Chouleur <sylvain.chouleur@intel.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Sylvain Chouleur <sylvain.chouleur@gmail.com>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
drivers/firmware/efi/vars.c
include/linux/efi.h