From: kernel test robot <lkp@intel.com>
To: Junwen Wu <wudaemon@163.com>,
akpm@linux-foundation.org, keescook@chromium.org,
adobriyan@gmail.com, fweimer@redhat.com, ddiss@suse.de
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org, Junwen Wu <wudaemon@163.com>
Subject: Re: [PATCH v1] proc: limit schedstate node write operation
Date: Sat, 23 Apr 2022 12:26:14 +0800 [thread overview]
Message-ID: <202204231250.LYIILAXn-lkp@intel.com> (raw)
In-Reply-To: <20220423023104.153004-1-wudaemon@163.com>
Hi Junwen,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on hnaz-mm/master]
[also build test WARNING on kees/for-next/pstore linus/master linux/master v5.18-rc3 next-20220422]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/intel-lab-lkp/linux/commits/Junwen-Wu/proc-limit-schedstate-node-write-operation/20220423-103457
base: https://github.com/hnaz/linux-mm master
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20220423/202204231250.LYIILAXn-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/e7bc039b7c0aa4e9a5bb3ae2340769a451f795db
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Junwen-Wu/proc-limit-schedstate-node-write-operation/20220423-103457
git checkout e7bc039b7c0aa4e9a5bb3ae2340769a451f795db
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross W=1 O=build_dir ARCH=alpha SHELL=/bin/bash fs/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
fs/proc/base.c: In function 'sched_write':
>> fs/proc/base.c:1468:13: warning: 'strcmp' of a string of length 5 and an array of size 5 evaluates to nonzero [-Wstring-compare]
1468 | if (strcmp(ubuf, "reset") == 0) {
| ^~~~~~~~~~~~~~~~~~~~~
vim +/strcmp +1468 fs/proc/base.c
1454
1455 static ssize_t
1456 sched_write(struct file *file, const char __user *buf,
1457 size_t count, loff_t *offset)
1458 {
1459 struct inode *inode = file_inode(file);
1460 struct task_struct *p;
1461 char ubuf[5];
1462
1463 memset(ubuf, 0, sizeof(ubuf));
1464 if (count > 5)
1465 count = 0;
1466 if (copy_from_user(ubuf, buf, count))
1467 return -EFAULT;
> 1468 if (strcmp(ubuf, "reset") == 0) {
1469 p = get_proc_task(inode);
1470 if (!p)
1471 return -ESRCH;
1472 proc_sched_set_task(p);
1473
1474 put_task_struct(p);
1475 }
1476
1477 return count;
1478 }
1479
--
0-DAY CI Kernel Test Service
https://01.org/lkp
WARNING: multiple messages have this Message-ID (diff)
From: Junwen Wu <wudaemon@163.com>
To: lkp@intel.com, Junwen Wu <wudaemon@163.com>,
akpm@linux-foundation.org, keescook@chromium.org,
adobriyan@gmail.com, fweimer@redhat.com, ddiss@suse.de
Cc: kbuild-all@lists.01.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] proc: limit schedstate node write operation
Date: Sun, 24 Apr 2022 15:27:55 +0000 [thread overview]
Message-ID: <202204231250.LYIILAXn-lkp@intel.com> (raw) (raw)
Message-ID: <20220424152755.XlKFOAM1-eaPDq6XDux8UQbPy3XXH1M7hPn9guR1W1Q@z> (raw)
In-Reply-To: <20220423023104.153004-1-wudaemon@163.com>
From: kernel test robot <lkp@intel.com>
>Hi Junwen,
>Thank you for the patch! Perhaps something to improve:
ooh ,I will fix the warning
next prev parent reply other threads:[~2022-04-23 4:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-23 2:31 [PATCH v1] proc: limit schedstate node write operation Junwen Wu
2022-04-23 3:05 ` Matthew Wilcox
2022-04-24 19:23 ` Matthew Wilcox
2022-04-30 13:48 ` Junwen Wu
2022-04-23 4:26 ` kernel test robot [this message]
2022-04-24 15:23 ` Junwen Wu
2022-04-24 15:27 ` Junwen Wu
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=202204231250.LYIILAXn-lkp@intel.com \
--to=lkp@intel.com \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=ddiss@suse.de \
--cc=fweimer@redhat.com \
--cc=kbuild-all@lists.01.org \
--cc=keescook@chromium.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wudaemon@163.com \
/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).