All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: net/mptcp/ctrl.c:140 proc_available_schedulers() warn: (struct ctl_table)->procname cannot be NULL. Expression : tbl.procname
Date: Sun, 23 Jun 2024 21:48:15 +0800	[thread overview]
Message-ID: <202406232124.bIt3ZmFi-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Gregory Detal <gregory.detal@gmail.com>
CC: mptcp@lists.linux.dev
CC: matthieu.baerts@tessares.net
CC: Jakub Kicinski <kuba@kernel.org>
CC: Mat Martineau <martineau@kernel.org>
CC: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   5f583a3162ffd9f7999af76b8ab634ce2dac9f90
commit: 73c900aa3660dae2050af456d1031d098ab4cb1d mptcp: add net.mptcp.available_schedulers
date:   6 weeks ago
:::::: branch date: 15 hours ago
:::::: commit date: 6 weeks ago
config: x86_64-randconfig-161-20240623 (https://download.01.org/0day-ci/archive/20240623/202406232124.bIt3ZmFi-lkp@intel.com/config)
compiler: gcc-11 (Ubuntu 11.4.0-4ubuntu1) 11.4.0

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202406232124.bIt3ZmFi-lkp@intel.com/

New smatch warnings:
net/mptcp/ctrl.c:140 proc_available_schedulers() warn: (struct ctl_table)->procname cannot be NULL. Expression : tbl.procname
net/mptcp/ctrl.c:140 proc_available_schedulers() warn: (struct ctl_table)->proc_handler cannot be NULL. Expression : tbl.proc_handler

Old smatch warnings:
net/mptcp/ctrl.c:121 proc_scheduler() warn: (struct ctl_table)->procname cannot be NULL. Expression : tbl.procname
net/mptcp/ctrl.c:121 proc_scheduler() warn: (struct ctl_table)->proc_handler cannot be NULL. Expression : tbl.proc_handler

vim +140 net/mptcp/ctrl.c

6963c508fd7ab6 Gregory Detal 2024-05-06  135  
73c900aa3660da Gregory Detal 2024-05-13  136  static int proc_available_schedulers(struct ctl_table *ctl,
73c900aa3660da Gregory Detal 2024-05-13  137  				     int write, void *buffer,
73c900aa3660da Gregory Detal 2024-05-13  138  				     size_t *lenp, loff_t *ppos)
73c900aa3660da Gregory Detal 2024-05-13  139  {
73c900aa3660da Gregory Detal 2024-05-13 @140  	struct ctl_table tbl = { .maxlen = MPTCP_SCHED_BUF_MAX, };
73c900aa3660da Gregory Detal 2024-05-13  141  	int ret;
73c900aa3660da Gregory Detal 2024-05-13  142  
73c900aa3660da Gregory Detal 2024-05-13  143  	tbl.data = kmalloc(tbl.maxlen, GFP_USER);
73c900aa3660da Gregory Detal 2024-05-13  144  	if (!tbl.data)
73c900aa3660da Gregory Detal 2024-05-13  145  		return -ENOMEM;
73c900aa3660da Gregory Detal 2024-05-13  146  
73c900aa3660da Gregory Detal 2024-05-13  147  	mptcp_get_available_schedulers(tbl.data, MPTCP_SCHED_BUF_MAX);
73c900aa3660da Gregory Detal 2024-05-13  148  	ret = proc_dostring(&tbl, write, buffer, lenp, ppos);
73c900aa3660da Gregory Detal 2024-05-13  149  	kfree(tbl.data);
73c900aa3660da Gregory Detal 2024-05-13  150  
73c900aa3660da Gregory Detal 2024-05-13  151  	return ret;
73c900aa3660da Gregory Detal 2024-05-13  152  }
73c900aa3660da Gregory Detal 2024-05-13  153  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2024-06-23 13:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202406232124.bIt3ZmFi-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=error27@gmail.com \
    --cc=oe-kbuild@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.