tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   fc80c51fd4b23ec007e88d4c688f2cac1b8648e7
commit: ea5e1919b44f09fce72d919fbb87f9611fc700a6 efi/x86: Simplify mixed mode 
call wrapper
date:   7 months ago
config: x86_64-randconfig-s031-20200810 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.2-118-ge1578773-dirty
        git checkout ea5e1919b44f09fce72d919fbb87f9611fc700a6
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <l...@intel.com>


sparse warnings: (new ones prefixed by >>)

>> arch/x86/platform/efi/efi_64.c:857:18: sparse: sparse: context imbalance in 
>> 'efi_thunk_set_variable_nonblocking' - wrong count at exit
   arch/x86/platform/efi/efi_64.c:960:1: sparse: sparse: context imbalance in 
'efi_thunk_query_variable_info_nonblocking' - different lock contexts for basic 
block

vim +/efi_thunk_set_variable_nonblocking +857 arch/x86/platform/efi/efi_64.c

83a0a2ea0b9919 Ard Biesheuvel 2018-07-20  839  
83a0a2ea0b9919 Ard Biesheuvel 2018-07-20  840  static efi_status_t
83a0a2ea0b9919 Ard Biesheuvel 2018-07-20  841  
efi_thunk_set_variable_nonblocking(efi_char16_t *name, efi_guid_t *vendor,
83a0a2ea0b9919 Ard Biesheuvel 2018-07-20  842                              u32 
attr, unsigned long data_size,
83a0a2ea0b9919 Ard Biesheuvel 2018-07-20  843                              void 
*data)
83a0a2ea0b9919 Ard Biesheuvel 2018-07-20  844  {
83a0a2ea0b9919 Ard Biesheuvel 2018-07-20  845   u32 phys_name, phys_vendor, 
phys_data;
83a0a2ea0b9919 Ard Biesheuvel 2018-07-20  846   efi_status_t status;
83a0a2ea0b9919 Ard Biesheuvel 2018-07-20  847   unsigned long flags;
83a0a2ea0b9919 Ard Biesheuvel 2018-07-20  848  
83a0a2ea0b9919 Ard Biesheuvel 2018-07-20  849   if 
(!spin_trylock_irqsave(&efi_runtime_lock, flags))
83a0a2ea0b9919 Ard Biesheuvel 2018-07-20  850           return EFI_NOT_READY;
83a0a2ea0b9919 Ard Biesheuvel 2018-07-20  851  
83a0a2ea0b9919 Ard Biesheuvel 2018-07-20  852   phys_name = 
virt_to_phys_or_null_size(name, efi_name_size(name));
83a0a2ea0b9919 Ard Biesheuvel 2018-07-20  853   phys_vendor = 
virt_to_phys_or_null(vendor);
83a0a2ea0b9919 Ard Biesheuvel 2018-07-20  854   phys_data = 
virt_to_phys_or_null_size(data, data_size);
83a0a2ea0b9919 Ard Biesheuvel 2018-07-20  855  
83a0a2ea0b9919 Ard Biesheuvel 2018-07-20  856   /* If data_size is > 
sizeof(u32) we've got problems */
83a0a2ea0b9919 Ard Biesheuvel 2018-07-20 @857   status = 
efi_thunk(set_variable, phys_name, phys_vendor,
83a0a2ea0b9919 Ard Biesheuvel 2018-07-20  858                      attr, 
data_size, phys_data);
83a0a2ea0b9919 Ard Biesheuvel 2018-07-20  859  
83a0a2ea0b9919 Ard Biesheuvel 2018-07-20  860   
spin_unlock_irqrestore(&efi_runtime_lock, flags);
83a0a2ea0b9919 Ard Biesheuvel 2018-07-20  861  
4f9dbcfc40299d Matt Fleming   2014-01-10  862   return status;
4f9dbcfc40299d Matt Fleming   2014-01-10  863  }
4f9dbcfc40299d Matt Fleming   2014-01-10  864  

:::::: The code at line 857 was first introduced by commit
:::::: 83a0a2ea0b991927e42984be220329e776ce7137 efi/x86: Prevent reentrant 
firmware calls in mixed mode

:::::: TO: Ard Biesheuvel <ard.biesheu...@linaro.org>
:::::: CC: Ingo Molnar <mi...@kernel.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org

Attachment: .config.gz
Description: application/gzip

Reply via email to