Re: [PATCH] freezer: fix freeze timeout on exec

From: kbuild test robot
Date: Sun Nov 11 2018 - 04:50:53 EST


Hi Chanho,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v4.20-rc1 next-20181109]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Chanho-Min/freezer-fix-freeze-timeout-on-exec/20181111-171200
config: i386-randconfig-x070-201845 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386

All warnings (new ones prefixed by >>):

In file included from arch/x86/include/asm/atomic.h:5:0,
from include/linux/atomic.h:7,
from include/linux/crypto.h:20,
from arch/x86/kernel/asm-offsets.c:9:
include/linux/freezer.h: In function 'try_to_freeze_unsafe':
include/linux/freezer.h:64:30: error: dereferencing pointer to incomplete type 'struct signal_struct'
if (unlikely(current->signal->flags & SIGNAL_GROUP_EXIT))
^
include/linux/compiler.h:58:30: note: in definition of macro '__trace_if'
if (__builtin_constant_p(!!(cond)) ? !!(cond) : \
^~~~
>> include/linux/freezer.h:64:2: note: in expansion of macro 'if'
if (unlikely(current->signal->flags & SIGNAL_GROUP_EXIT))
^~
include/linux/compiler.h:48:24: note: in expansion of macro '__branch_check__'
# define unlikely(x) (__branch_check__(x, 0, __builtin_constant_p(x)))
^~~~~~~~~~~~~~~~
include/linux/freezer.h:64:6: note: in expansion of macro 'unlikely'
if (unlikely(current->signal->flags & SIGNAL_GROUP_EXIT))
^~~~~~~~
include/linux/freezer.h:64:40: error: 'SIGNAL_GROUP_EXIT' undeclared (first use in this function)
if (unlikely(current->signal->flags & SIGNAL_GROUP_EXIT))
^
include/linux/compiler.h:58:30: note: in definition of macro '__trace_if'
if (__builtin_constant_p(!!(cond)) ? !!(cond) : \
^~~~
>> include/linux/freezer.h:64:2: note: in expansion of macro 'if'
if (unlikely(current->signal->flags & SIGNAL_GROUP_EXIT))
^~
include/linux/compiler.h:48:24: note: in expansion of macro '__branch_check__'
# define unlikely(x) (__branch_check__(x, 0, __builtin_constant_p(x)))
^~~~~~~~~~~~~~~~
include/linux/freezer.h:64:6: note: in expansion of macro 'unlikely'
if (unlikely(current->signal->flags & SIGNAL_GROUP_EXIT))
^~~~~~~~
include/linux/freezer.h:64:40: note: each undeclared identifier is reported only once for each function it appears in
if (unlikely(current->signal->flags & SIGNAL_GROUP_EXIT))
^
include/linux/compiler.h:58:30: note: in definition of macro '__trace_if'
if (__builtin_constant_p(!!(cond)) ? !!(cond) : \
^~~~
>> include/linux/freezer.h:64:2: note: in expansion of macro 'if'
if (unlikely(current->signal->flags & SIGNAL_GROUP_EXIT))
^~
include/linux/compiler.h:48:24: note: in expansion of macro '__branch_check__'
# define unlikely(x) (__branch_check__(x, 0, __builtin_constant_p(x)))
^~~~~~~~~~~~~~~~
include/linux/freezer.h:64:6: note: in expansion of macro 'unlikely'
if (unlikely(current->signal->flags & SIGNAL_GROUP_EXIT))
^~~~~~~~
make[2]: *** [arch/x86/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [sub-make] Error 2

vim +/if +64 include/linux/freezer.h

50
51 /*
52 * DO NOT ADD ANY NEW CALLERS OF THIS FUNCTION
53 * If try_to_freeze causes a lockdep warning it means the caller may deadlock
54 */
55 static inline bool try_to_freeze_unsafe(void)
56 {
57 might_sleep();
58 if (likely(!freezing(current)))
59 return false;
60 /*
61 * we are going to call do_exit() really soon,
62 * we have a pending SIGKILL
63 */
> 64 if (unlikely(current->signal->flags & SIGNAL_GROUP_EXIT))
65 return false;
66 return __refrigerator(false);
67 }
68

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip