+ efi-add-lock-annotations-for-efi_call_phys_prelog-and-efi_call_phys_epilog.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     efi: add lock annotations for efi_call_phys_prelog and efi_call_phys_epilog

has been added to the -mm tree.  Its filename is

     efi-add-lock-annotations-for-efi_call_phys_prelog-and-efi_call_phys_epilog.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: efi: add lock annotations for efi_call_phys_prelog and efi_call_phys_epilog
From: Josh Triplett <josht@xxxxxxxxxx>

The functions efi_call_phys_prelog and efi_call_phys_epilog in
arch/i386/kernel/efi.c wrap the spinlock efi_rt_lock: efi_call_phys_prelog
returns with the lock held, and efi_call_phys_epilog releases the lock
without acquiring it.  Add lock annotations to these two functions so that
sparse can check callers for lock pairing, and so that sparse will not
complain about these functions since they intentionally use locks in this
manner.

Signed-off-by: Josh Triplett <josh@xxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 arch/i386/kernel/efi.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff -puN arch/i386/kernel/efi.c~efi-add-lock-annotations-for-efi_call_phys_prelog-and-efi_call_phys_epilog arch/i386/kernel/efi.c
--- a/arch/i386/kernel/efi.c~efi-add-lock-annotations-for-efi_call_phys_prelog-and-efi_call_phys_epilog
+++ a/arch/i386/kernel/efi.c
@@ -65,7 +65,7 @@ static unsigned long efi_rt_eflags;
 static DEFINE_SPINLOCK(efi_rt_lock);
 static pgd_t efi_bak_pg_dir_pointer[2];
 
-static void efi_call_phys_prelog(void)
+static void efi_call_phys_prelog(void) __acquires(efi_rt_lock)
 {
 	unsigned long cr4;
 	unsigned long temp;
@@ -109,7 +109,7 @@ static void efi_call_phys_prelog(void)
 	load_gdt(cpu_gdt_descr);
 }
 
-static void efi_call_phys_epilog(void)
+static void efi_call_phys_epilog(void) __releases(efi_rt_lock)
 {
 	unsigned long cr4;
 	struct Xgt_desc_struct *cpu_gdt_descr = &per_cpu(cpu_gdt_descr, 0);
_

Patches currently in -mm which might be from josht@xxxxxxxxxx are

release-dentry_lock-in-an-error-path-of-nfs_path.patch
remove-incorrect-unlock_kernel-from-allocation.patch
remove-incorrect-unlock_kernel-from-failure-path-in.patch
add-entry-for-efs-filesystem-to-maintainers-as-orphan.patch
ufs-remove-incorrect-unlock_kernel-from-failure-path-in-ufs_symlink.patch
efi-add-lock-annotations-for-efi_call_phys_prelog-and-efi_call_phys_epilog.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux