Skip to content

Commit

Permalink
efi: Update stale locking comment for struct efivars
Browse files Browse the repository at this point in the history
The comment describing how struct efivars->lock is used hasn't been
updated in sync with the code. Fix it.

Reported-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Mike Waychison <mikew@google.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
  • Loading branch information
Matt Fleming committed Jul 18, 2014
1 parent f383d00 commit 82f990a
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions include/linux/efi.h
Original file line number Diff line number Diff line change
Expand Up @@ -1040,12 +1040,8 @@ struct efivar_operations {
struct efivars {
/*
* ->lock protects two things:
* 1) ->list - adds, removals, reads, writes
* 2) ops.[gs]et_variable() calls.
* It must not be held when creating sysfs entries or calling kmalloc.
* ops.get_next_variable() is only called from register_efivars()
* or efivar_update_sysfs_entries(),
* which is protected by the BKL, so that path is safe.
* 1) efivarfs_list and efivars_sysfs_list
* 2) ->ops calls
*/
spinlock_t lock;
struct kset *kset;
Expand Down

0 comments on commit 82f990a

Please sign in to comment.