From: kernel test robot <lkp@intel.com>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Ingo Molnar <mingo@kernel.org>
Subject: arch/x86/platform/efi/efi_64.c:857:18: sparse: sparse: context imbalance in 'efi_thunk_set_variable_nonblocking' - wrong count at exit
Date: Mon, 10 Aug 2020 10:50:19 +0800 [thread overview]
Message-ID: <202008101015.vKcGbCrO%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3486 bytes --]
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 <lkp@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.biesheuvel@linaro.org>
:::::: CC: Ingo Molnar <mingo@kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34247 bytes --]
reply other threads:[~2020-08-10 2:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202008101015.vKcGbCrO%lkp@intel.com \
--to=lkp@intel.com \
--cc=ardb@kernel.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®