Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Zi Yan <zi.yan@sent.com>, linux-mm@kvack.org
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org,
	"Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Memory Management List <linux-mm@kvack.org>,
	Shuah Khan <skhan@linuxfoundation.org>,
	John Hubbard <jhubbard@nvidia.com>,
	Sandipan Das <sandipan@linux.ibm.com>,
	David Hildenbrand <david@redhat.com>
Subject: Re: [PATCH v4 1/2] mm: huge_memory: a new debugfs interface for splitting THP tests.
Date: Tue, 16 Mar 2021 08:36:17 +0800	[thread overview]
Message-ID: <202103160807.JLJ4NOSP-lkp@intel.com> (raw)
In-Reply-To: <20210315203349.171760-1-zi.yan@sent.com>

[-- Attachment #1: Type: text/plain, Size: 2184 bytes --]

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@intel.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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 32434 bytes --]

  parent reply	other threads:[~2021-03-16  0:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-15 20:33 [PATCH v4 1/2] mm: huge_memory: a new debugfs interface for splitting THP tests Zi Yan
2021-03-15 20:33 ` [PATCH v4 2/2] mm: huge_memory: debugfs for file-backed THP split Zi Yan
2021-03-16 23:18   ` Yang Shi
2021-03-17 15:00     ` Zi Yan
2021-03-17 16:34       ` Yang Shi
2021-03-16  0:36 ` kernel test robot [this message]
2021-03-16  1:10   ` [PATCH v4 1/2] mm: huge_memory: a new debugfs interface for splitting THP tests Zi Yan
2021-03-16 22:23 ` Yang Shi
2021-03-17 14:51   ` Zi Yan

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=202103160807.JLJ4NOSP-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@redhat.com \
    --cc=jhubbard@nvidia.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=sandipan@linux.ibm.com \
    --cc=skhan@linuxfoundation.org \
    --cc=zi.yan@sent.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