[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202112220904.4XhObpcQ-lkp@intel.com>
Date: Wed, 22 Dec 2021 09:19:00 +0800
From: kernel test robot <lkp@...el.com>
To: "Naveen N. Rao" <naveen.n.rao@...ux.vnet.ibm.com>,
Steven Rostedt <rostedt@...dmis.org>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
bristot@...nel.org, luto@...nel.org
Subject: Re: [PATCH] trace: Fix check for trace_percpu_buffer validity in
get_trace_buf()
Hi "Naveen,
I love your patch! Perhaps something to improve:
[auto build test WARNING on f7f0bb5eaecb1aff9cc8ab13425d43690b71ec44]
url: https://github.com/0day-ci/linux/commits/Naveen-N-Rao/trace-Fix-check-for-trace_percpu_buffer-validity-in-get_trace_buf/20211222-002823
base: f7f0bb5eaecb1aff9cc8ab13425d43690b71ec44
config: x86_64-randconfig-s021-20211219 (https://download.01.org/0day-ci/archive/20211222/202112220904.4XhObpcQ-lkp@intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/0day-ci/linux/commit/95971333cdb4ace06eb41bd7ca1dee65f77487d2
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Naveen-N-Rao/trace-Fix-check-for-trace_percpu_buffer-validity-in-get_trace_buf/20211222-002823
git checkout 95971333cdb4ace06eb41bd7ca1dee65f77487d2
# save the config file to linux build tree
mkdir build_dir
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash kernel/trace/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
sparse warnings: (new ones prefixed by >>)
kernel/trace/trace.c:392:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct trace_export **list @@ got struct trace_export [noderef] __rcu ** @@
kernel/trace/trace.c:392:28: sparse: expected struct trace_export **list
kernel/trace/trace.c:392:28: sparse: got struct trace_export [noderef] __rcu **
kernel/trace/trace.c:406:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct trace_export **list @@ got struct trace_export [noderef] __rcu ** @@
kernel/trace/trace.c:406:33: sparse: expected struct trace_export **list
kernel/trace/trace.c:406:33: sparse: got struct trace_export [noderef] __rcu **
kernel/trace/trace.c:2836:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct event_filter *filter @@ got struct event_filter [noderef] __rcu *filter @@
kernel/trace/trace.c:2836:38: sparse: expected struct event_filter *filter
kernel/trace/trace.c:2836:38: sparse: got struct event_filter [noderef] __rcu *filter
kernel/trace/trace.c:3244:17: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct trace_buffer_struct *buffers @@ got struct trace_buffer_struct [noderef] __percpu * @@
kernel/trace/trace.c:3244:17: sparse: expected struct trace_buffer_struct *buffers
kernel/trace/trace.c:3244:17: sparse: got struct trace_buffer_struct [noderef] __percpu *
>> kernel/trace/trace.c:3248:29: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct trace_buffer_struct [noderef] __percpu *static [toplevel] trace_percpu_buffer @@ got struct trace_buffer_struct *buffers @@
kernel/trace/trace.c:3248:29: sparse: expected struct trace_buffer_struct [noderef] __percpu *static [toplevel] trace_percpu_buffer
kernel/trace/trace.c:3248:29: sparse: got struct trace_buffer_struct *buffers
kernel/trace/trace.c:346:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/trace/trace.c:346:9: sparse: struct trace_export [noderef] __rcu *
kernel/trace/trace.c:346:9: sparse: struct trace_export *
kernel/trace/trace.c:361:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/trace/trace.c:361:9: sparse: struct trace_export [noderef] __rcu *
kernel/trace/trace.c:361:9: sparse: struct trace_export *
vim +3248 kernel/trace/trace.c
07d777fe8c3985 Steven Rostedt 2011-09-22 3236
07d777fe8c3985 Steven Rostedt 2011-09-22 3237 static int alloc_percpu_trace_buffer(void)
07d777fe8c3985 Steven Rostedt 2011-09-22 3238 {
07d777fe8c3985 Steven Rostedt 2011-09-22 3239 struct trace_buffer_struct *buffers;
07d777fe8c3985 Steven Rostedt 2011-09-22 3240
38ce2a9e33db61 Steven Rostedt (VMware 2020-08-06 3241) if (trace_percpu_buffer)
38ce2a9e33db61 Steven Rostedt (VMware 2020-08-06 3242) return 0;
38ce2a9e33db61 Steven Rostedt (VMware 2020-08-06 3243)
07d777fe8c3985 Steven Rostedt 2011-09-22 3244 buffers = alloc_percpu(struct trace_buffer_struct);
24589e3a20876d Steven Rostedt (VMware 2020-01-25 3245) if (MEM_FAIL(!buffers, "Could not allocate percpu trace_printk buffer"))
e2ace001176dc9 Andy Lutomirski 2016-05-26 3246 return -ENOMEM;
07d777fe8c3985 Steven Rostedt 2011-09-22 3247
07d777fe8c3985 Steven Rostedt 2011-09-22 @3248 trace_percpu_buffer = buffers;
07d777fe8c3985 Steven Rostedt 2011-09-22 3249 return 0;
07d777fe8c3985 Steven Rostedt 2011-09-22 3250 }
07d777fe8c3985 Steven Rostedt 2011-09-22 3251
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Powered by blists - more mailing lists