Whamcloud - gitweb
LU-13783 libcfs: add cfs_kallsyms_lookup_name()
authorJian Yu <yujian@whamcloud.com>
Tue, 11 May 2021 06:51:33 +0000 (23:51 -0700)
committerLi Xi <lixi@ddn.com>
Tue, 18 May 2021 01:47:20 +0000 (01:47 +0000)
commit0188b3e75d232759081b05027e349e425677201a
tree7c3b0906c00d2d6895e6401734aaea675ee25863
parentf291b83db91518740dd29a37aa6d1681b9d85adc
LU-13783 libcfs: add cfs_kallsyms_lookup_name()

The inline kallsyms_lookup_name() added by
commit d7249d9d70a caused the following failures:

libcfs/include/libcfs/linux/linux-misc.h:150:21:
error: conflicting types for ‘kallsyms_lookup_name’
  150 | static inline void *kallsyms_lookup_name(char *func)
      |                     ^~~~~~~~~~~~~~~~~~~~

include/linux/kallsyms.h:76:15:
note: previous declaration of ‘kallsyms_lookup_name’ was here
   76 | unsigned long kallsyms_lookup_name(const char *name);
      |               ^~~~~~~~~~~~~~~~~~~~

This patch removes the inline kallsyms_lookup_name() definition
from linux-misc.h and adds cfs_kallsyms_lookup_name() to wrap
kallsyms_lookup_name() if it is exported or return NULL in case of
kallsyms_lookup_name() is not exported.

Lustre-change: https://review.whamcloud.com/43296
Lustre-commit: 783002035ae9612b5b0aa80f2342a2ee9e81c374

Fixes: d7249d9d70a ("LU-13783 libcfs: provide fallback kallsyms_lookup_name()")
Change-Id: I4b2d4499948a8586b48db68484491ec76c3a609d
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/43648
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
libcfs/include/libcfs/linux/linux-misc.h
libcfs/libcfs/debug.c
libcfs/libcfs/linux/linux-prim.c
lustre/llite/vvp_dev.c
lustre/llite/vvp_io.c
lustre/osd-ldiskfs/osd_handler.c