All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix randconfig build error and code bug
       [not found] <202011041829.KUaqiCq1-lkp () intel ! com>
@ 2020-11-05 11:43 ` yaoaili126
  2020-11-06 19:34   ` James Morse
  2020-11-10 20:34     ` kernel test robot
  0 siblings, 2 replies; 4+ messages in thread
From: yaoaili126 @ 2020-11-05 11:43 UTC (permalink / raw)
  To: rjw, lenb, tony.luck, bp, james.morse
  Cc: linux-acpi, linux-edac, yangfeng1, CHENGUOMIN, yaoaili

From: Aili Yao <yaoaili@kingsoft.com>

CONFIG_ACPI_APEI is not sufficient for ghes module global function
replace it with CONFIG_ACPI_APEI_GHES.

When gen_pool_alloc fails in ghes_in_mce_cper_entry_check, we still need
to try other cper table to get it cleaned even we are likely to get another
allocation fail.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Aili Yao <yaoaili@kingsoft.com>
---
 arch/x86/kernel/cpu/mce/internal.h | 6 +++++-
 drivers/acpi/apei/ghes.c           | 4 ++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/cpu/mce/internal.h b/arch/x86/kernel/cpu/mce/internal.h
index 1c79b32fcaa9..1fdf8ac45372 100644
--- a/arch/x86/kernel/cpu/mce/internal.h
+++ b/arch/x86/kernel/cpu/mce/internal.h
@@ -70,7 +70,6 @@ int apei_write_mce(struct mce *m);
 ssize_t apei_read_mce(struct mce *m, u64 *record_id);
 int apei_check_mce(void);
 int apei_clear_mce(u64 record_id);
-extern int ghes_in_mce_cper_entry_check(void);
 #else
 static inline int apei_write_mce(struct mce *m)
 {
@@ -88,6 +87,11 @@ static inline int apei_clear_mce(u64 record_id)
 {
 	return -EINVAL;
 }
+#endif
+
+#ifdef CONFIG_ACPI_APEI_GHES
+extern int ghes_in_mce_cper_entry_check(void);
+#else
 static inline int ghes_in_mce_cper_entry_check(void)
 {
 	return 0;
diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index ba3140d74f75..8baa19c6b625 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -1131,7 +1131,7 @@ int ghes_in_mce_cper_entry_check(void)
 			/* Going to panic, No need to keep the error. */
 			ghes_clear_estatus(ghes, &tmp_header, buf_paddr, fixmap_idx);
 			ret = -ENOMEM;
-			goto done;
+			continue;
 		}
 
 		estatus_node->ghes = ghes;
@@ -1157,7 +1157,7 @@ int ghes_in_mce_cper_entry_check(void)
 		gen_pool_free(ghes_estatus_pool, (unsigned long)estatus_node,
 		      node_len);
 	}
-done:
+
 	rcu_read_unlock();
 	atomic_dec(&ghes_in_nmi);
 	return ret;

base-commit: b11831c841cb8046a9e01300f5d91985c293e045
-- 
2.18.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix randconfig build error and code bug
  2020-11-05 11:43 ` [PATCH] Fix randconfig build error and code bug yaoaili126
@ 2020-11-06 19:34   ` James Morse
  2020-11-10 20:34     ` kernel test robot
  1 sibling, 0 replies; 4+ messages in thread
From: James Morse @ 2020-11-06 19:34 UTC (permalink / raw)
  To: yaoaili126, rjw, lenb, tony.luck, bp
  Cc: linux-acpi, linux-edac, yangfeng1, CHENGUOMIN, yaoaili

Hello,

On 05/11/2020 11:43, yaoaili126@163.com wrote:
> From: Aili Yao <yaoaili@kingsoft.com>
> 
> CONFIG_ACPI_APEI is not sufficient for ghes module global function
> replace it with CONFIG_ACPI_APEI_GHES.
> 
> When gen_pool_alloc fails in ghes_in_mce_cper_entry_check, we still need
> to try other cper table to get it cleaned even we are likely to get another
> allocation fail.

This applies on top of your previous patches. It doesn't make sense in isolation.

When this happens its normal to post a 'v2' of your patch with the issue fixed.
If you only just posted the first version, then it is best to wait a little to give
reviewers a chance (multiple versions posted on the same day is too much). In this case
its good to reply to the build-robots' message saying how you've fixed it locally...


I think we need to find out whether your firmware supports GHES_ASSIST before we make
changes here...


Thanks,

James

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix randconfig build error and code bug
  2020-11-05 11:43 ` [PATCH] Fix randconfig build error and code bug yaoaili126
@ 2020-11-10 20:34     ` kernel test robot
  2020-11-10 20:34     ` kernel test robot
  1 sibling, 0 replies; 4+ messages in thread
From: kernel test robot @ 2020-11-10 20:34 UTC (permalink / raw)
  To: yaoaili126, rjw, lenb, tony.luck, bp, james.morse
  Cc: kbuild-all, clang-built-linux, linux-acpi, linux-edac, yangfeng1,
	CHENGUOMIN, yaoaili

[-- Attachment #1: Type: text/plain, Size: 3057 bytes --]

Hi,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on b11831c841cb8046a9e01300f5d91985c293e045]

url:    https://github.com/0day-ci/linux/commits/yaoaili126-163-com/Fix-randconfig-build-error-and-code-bug/20201105-222108
base:    b11831c841cb8046a9e01300f5d91985c293e045
config: x86_64-randconfig-a015-20201110 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 4d81c8adb6ed9840257f6cb6b93f60856d422a15)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://github.com/0day-ci/linux/commit/d1203fe379a2190e7ff5d40a30465bea2c98a47f
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review yaoaili126-163-com/Fix-randconfig-build-error-and-code-bug/20201105-222108
        git checkout d1203fe379a2190e7ff5d40a30465bea2c98a47f
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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

All errors (new ones prefixed by >>):

   In file included from arch/x86/kernel/cpu/mce/apei.c:27:
>> arch/x86/kernel/cpu/mce/internal.h:95:19: error: static declaration of 'ghes_in_mce_cper_entry_check' follows non-static declaration
   static inline int ghes_in_mce_cper_entry_check(void)
                     ^
   include/acpi/ghes.h:130:5: note: previous declaration is here
   int ghes_in_mce_cper_entry_check(void);
       ^
   1 error generated.

vim +/ghes_in_mce_cper_entry_check +95 arch/x86/kernel/cpu/mce/internal.h

d1203fe379a2190 arch/x86/kernel/cpu/mce/internal.h        Aili Yao        2020-11-05   91  
d1203fe379a2190 arch/x86/kernel/cpu/mce/internal.h        Aili Yao        2020-11-05   92  #ifdef CONFIG_ACPI_APEI_GHES
d1203fe379a2190 arch/x86/kernel/cpu/mce/internal.h        Aili Yao        2020-11-05   93  extern int ghes_in_mce_cper_entry_check(void);
d1203fe379a2190 arch/x86/kernel/cpu/mce/internal.h        Aili Yao        2020-11-05   94  #else
b11831c841cb804 arch/x86/kernel/cpu/mce/internal.h        Aili Yao        2020-11-03  @95  static inline int ghes_in_mce_cper_entry_check(void)
b11831c841cb804 arch/x86/kernel/cpu/mce/internal.h        Aili Yao        2020-11-03   96  {
b11831c841cb804 arch/x86/kernel/cpu/mce/internal.h        Aili Yao        2020-11-03   97  	return 0;
b11831c841cb804 arch/x86/kernel/cpu/mce/internal.h        Aili Yao        2020-11-03   98  }
482908b49ebfa45 arch/x86/kernel/cpu/mcheck/mce-internal.h Huang Ying      2010-05-18   99  #endif
a79da38494ec23f arch/x86/kernel/cpu/mcheck/mce-internal.h Borislav Petkov 2015-08-12  100  

---
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: 31809 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix randconfig build error and code bug
@ 2020-11-10 20:34     ` kernel test robot
  0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2020-11-10 20:34 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3111 bytes --]

Hi,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on b11831c841cb8046a9e01300f5d91985c293e045]

url:    https://github.com/0day-ci/linux/commits/yaoaili126-163-com/Fix-randconfig-build-error-and-code-bug/20201105-222108
base:    b11831c841cb8046a9e01300f5d91985c293e045
config: x86_64-randconfig-a015-20201110 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 4d81c8adb6ed9840257f6cb6b93f60856d422a15)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://github.com/0day-ci/linux/commit/d1203fe379a2190e7ff5d40a30465bea2c98a47f
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review yaoaili126-163-com/Fix-randconfig-build-error-and-code-bug/20201105-222108
        git checkout d1203fe379a2190e7ff5d40a30465bea2c98a47f
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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

All errors (new ones prefixed by >>):

   In file included from arch/x86/kernel/cpu/mce/apei.c:27:
>> arch/x86/kernel/cpu/mce/internal.h:95:19: error: static declaration of 'ghes_in_mce_cper_entry_check' follows non-static declaration
   static inline int ghes_in_mce_cper_entry_check(void)
                     ^
   include/acpi/ghes.h:130:5: note: previous declaration is here
   int ghes_in_mce_cper_entry_check(void);
       ^
   1 error generated.

vim +/ghes_in_mce_cper_entry_check +95 arch/x86/kernel/cpu/mce/internal.h

d1203fe379a2190 arch/x86/kernel/cpu/mce/internal.h        Aili Yao        2020-11-05   91  
d1203fe379a2190 arch/x86/kernel/cpu/mce/internal.h        Aili Yao        2020-11-05   92  #ifdef CONFIG_ACPI_APEI_GHES
d1203fe379a2190 arch/x86/kernel/cpu/mce/internal.h        Aili Yao        2020-11-05   93  extern int ghes_in_mce_cper_entry_check(void);
d1203fe379a2190 arch/x86/kernel/cpu/mce/internal.h        Aili Yao        2020-11-05   94  #else
b11831c841cb804 arch/x86/kernel/cpu/mce/internal.h        Aili Yao        2020-11-03  @95  static inline int ghes_in_mce_cper_entry_check(void)
b11831c841cb804 arch/x86/kernel/cpu/mce/internal.h        Aili Yao        2020-11-03   96  {
b11831c841cb804 arch/x86/kernel/cpu/mce/internal.h        Aili Yao        2020-11-03   97  	return 0;
b11831c841cb804 arch/x86/kernel/cpu/mce/internal.h        Aili Yao        2020-11-03   98  }
482908b49ebfa45 arch/x86/kernel/cpu/mcheck/mce-internal.h Huang Ying      2010-05-18   99  #endif
a79da38494ec23f arch/x86/kernel/cpu/mcheck/mce-internal.h Borislav Petkov 2015-08-12  100  

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 31809 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-11-10 20:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <202011041829.KUaqiCq1-lkp () intel ! com>
2020-11-05 11:43 ` [PATCH] Fix randconfig build error and code bug yaoaili126
2020-11-06 19:34   ` James Morse
2020-11-10 20:34   ` kernel test robot
2020-11-10 20:34     ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.