linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Matt Mullins <mmullins@fb.com>
Cc: kbuild-all@01.org, ast@kernel.org, daniel@iogearbox.net,
	netdev@vger.kernel.org, kernel-team@fb.com,
	Matt Mullins <mmullins@fb.com>, Jessica Yu <jeyu@kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ingo Molnar <mingo@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH bpf-next] bpf: support raw tracepoints in modules
Date: Sat, 17 Nov 2018 05:55:00 +0800	[thread overview]
Message-ID: <201811170557.4EtvwhsA%fengguang.wu@intel.com> (raw)
In-Reply-To: <20181109220632.3944136-1-mmullins@fb.com>

Hi Matt,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on bpf-next/master]

url:    https://github.com/0day-ci/linux/commits/Matt-Mullins/bpf-support-raw-tracepoints-in-modules/20181110-144839
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master

smatch warnings:
kernel/trace/bpf_trace.c:1284 bpf_event_notify() error: potential null dereference 'btm'.  (kzalloc returns null)

vim +/btm +1284 kernel/trace/bpf_trace.c

  1269	
  1270	#ifdef CONFIG_MODULES
  1271	int bpf_event_notify(struct notifier_block *nb, unsigned long op, void *module)
  1272	{
  1273		struct bpf_trace_module *btm, *tmp;
  1274		struct module *mod = module;
  1275	
  1276		if (mod->num_bpf_raw_events == 0)
  1277			return 0;
  1278	
  1279		mutex_lock(&bpf_module_mutex);
  1280	
  1281		switch (op) {
  1282		case MODULE_STATE_COMING:
  1283			btm = kzalloc(sizeof(*btm), GFP_KERNEL);
> 1284			btm->module = module;
  1285			list_add(&btm->list, &bpf_trace_modules);
  1286			break;
  1287		case MODULE_STATE_GOING:
  1288			list_for_each_entry_safe(btm, tmp, &bpf_trace_modules, list) {
  1289				if (btm->module == module) {
  1290					list_del(&btm->list);
  1291					kfree(btm);
  1292					break;
  1293				}
  1294			}
  1295			break;
  1296		}
  1297	
  1298		mutex_unlock(&bpf_module_mutex);
  1299	
  1300		return 0;
  1301	}
  1302	

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

      parent reply	other threads:[~2018-11-16 21:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-09 22:06 [PATCH bpf-next] bpf: support raw tracepoints in modules Matt Mullins
2018-11-12 20:05 ` Martin Lau
2018-11-16 21:55 ` kbuild test robot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201811170557.4EtvwhsA%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=jeyu@kernel.org \
    --cc=kbuild-all@01.org \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=mmullins@fb.com \
    --cc=netdev@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).