[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202103160807.JLJ4NOSP-lkp@intel.com>
Date: Tue, 16 Mar 2021 08:36:17 +0800
From: kernel test robot <lkp@...el.com>
To: Zi Yan <zi.yan@...t.com>, linux-mm@...ck.org
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
linux-kselftest@...r.kernel.org,
"Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Linux Memory Management List <linux-mm@...ck.org>,
Shuah Khan <skhan@...uxfoundation.org>,
John Hubbard <jhubbard@...dia.com>,
Sandipan Das <sandipan@...ux.ibm.com>,
David Hildenbrand <david@...hat.com>
Subject: Re: [PATCH v4 1/2] mm: huge_memory: a new debugfs interface for
splitting THP tests.
Hi Zi,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on kselftest/next]
[also build test WARNING on linux/master linus/master v5.12-rc3]
[cannot apply to hnaz-linux-mm/master next-20210315]
[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/0day-ci/linux/commits/Zi-Yan/mm-huge_memory-a-new-debugfs-interface-for-splitting-THP-tests/20210316-043528
base: https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git next
config: i386-randconfig-m021-20210315 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
smatch warnings:
mm/huge_memory.c:3086 split_huge_pages_write() warn: sscanf doesn't return error codes
vim +3086 mm/huge_memory.c
3051
3052 static ssize_t split_huge_pages_write(struct file *file, const char __user *buf,
3053 size_t count, loff_t *ppops)
3054 {
3055 static DEFINE_MUTEX(mutex);
3056 ssize_t ret;
3057 char input_buf[80]; /* hold pid, start_vaddr, end_vaddr */
3058 int pid;
3059 unsigned long vaddr_start, vaddr_end;
3060
3061 ret = mutex_lock_interruptible(&mutex);
3062 if (ret)
3063 return ret;
3064
3065 ret = -EFAULT;
3066
3067 memset(input_buf, 0, 80);
3068 if (copy_from_user(input_buf, buf, min_t(size_t, count, 80)))
3069 goto out;
3070
3071 input_buf[79] = '\0';
3072 ret = sscanf(input_buf, "%d,0x%lx,0x%lx", &pid, &vaddr_start, &vaddr_end);
3073 if (ret == 1 && pid == 1) {
3074 split_huge_pages_all();
3075 ret = strlen(input_buf);
3076 goto out;
3077 } else if (ret != 3) {
3078 ret = -EINVAL;
3079 goto out;
3080 }
3081
3082 if (!split_huge_pages_pid(pid, vaddr_start, vaddr_end))
3083 ret = strlen(input_buf);
3084 out:
3085 mutex_unlock(&mutex);
> 3086 return ret;
3087
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (32434 bytes)
Powered by blists - more mailing lists