lkml.org 
[lkml]   [2018]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] locking/rwsem: Add DEBUG_RWSEMS to look for lock/unlock mismatches
Hi Waiman,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on tip/locking/core]
[also build test ERROR on v4.16-rc7 next-20180326]
[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/Waiman-Long/locking-rwsem-Add-DEBUG_RWSEMS-to-look-for-lock-unlock-mismatches/20180327-151310
config: i386-allmodconfig (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 error/warnings (new ones prefixed by >>):

In file included from include/linux/kernel.h:10:0,
from kernel/locking/rwsem.c:9:
kernel/locking/rwsem.c: In function 'up_read_non_owner':
>> kernel/locking/rwsem.c:217:23: error: implicit declaration of function 'RWSEM_WRITER_OWNED'; did you mean 'RWSEM_READER_OWNED'? [-Werror=implicit-function-declaration]
DEBUG_RWSEMS_WARN_ON(RWSEM_WRITER_OWNED(sem->owner));
^
include/linux/compiler.h:77:42: note: in definition of macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
>> kernel/locking/rwsem.h:20:33: note: in expansion of macro 'DEBUG_LOCKS_WARN_ON'
#define DEBUG_RWSEMS_WARN_ON(c) DEBUG_LOCKS_WARN_ON(c)
^~~~~~~~~~~~~~~~~~~
>> kernel/locking/rwsem.c:217:2: note: in expansion of macro 'DEBUG_RWSEMS_WARN_ON'
DEBUG_RWSEMS_WARN_ON(RWSEM_WRITER_OWNED(sem->owner));
^~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors

vim +217 kernel/locking/rwsem.c

214
215 void up_read_non_owner(struct rw_semaphore *sem)
216 {
> 217 DEBUG_RWSEMS_WARN_ON(RWSEM_WRITER_OWNED(sem->owner));
218 __up_read(sem);
219 }
220

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2018-03-27 13:25    [W:0.059 / U:3.856 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site