linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <edumazet@google.com>
To: kernel test robot <lkp@intel.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	 kbuild-all@lists.01.org,
	Linux Memory Management List <linux-mm@kvack.org>,
	 linux-kernel <linux-kernel@vger.kernel.org>,
	syzbot <syzkaller@googlegroups.com>,
	 "Huang, Ying" <ying.huang@intel.com>,
	Mel Gorman <mgorman@suse.de>
Subject: Re: [PATCH] mm/mempolicy: do not allow illegal MPOL_F_NUMA_BALANCING | MPOL_LOCAL in mbind()
Date: Fri, 1 Oct 2021 14:52:35 -0700	[thread overview]
Message-ID: <CANn89iKP5D2CvVg28-FmPsJ7U9uLuBy-UtunS=arhKSwf0H=gg@mail.gmail.com> (raw)
In-Reply-To: <202110020437.tn6NOlcO-lkp@intel.com>

On Fri, Oct 1, 2021 at 1:25 PM kernel test robot <lkp@intel.com> wrote:
>
> Hi Eric,
>
> I love your patch! Perhaps something to improve:
>
> [auto build test WARNING on hnaz-mm/master]
>
> url:    https://github.com/0day-ci/linux/commits/Eric-Dumazet/mm-mempolicy-do-not-allow-illegal-MPOL_F_NUMA_BALANCING-MPOL_LOCAL-in-mbind/20211002-015054
> base:   https://github.com/hnaz/linux-mm master
> config: ia64-defconfig (attached as .config)
> compiler: ia64-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/0day-ci/linux/commit/fe87354835a4bf5cad6d885f0ba558c767fee6f1
>         git remote add linux-review https://github.com/0day-ci/linux
>         git fetch --no-tags linux-review Eric-Dumazet/mm-mempolicy-do-not-allow-illegal-MPOL_F_NUMA_BALANCING-MPOL_LOCAL-in-mbind/20211002-015054
>         git checkout fe87354835a4bf5cad6d885f0ba558c767fee6f1
>         # save the attached .config to linux build tree
>         mkdir build_dir
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=ia64 SHELL=/bin/bash
>
> 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 >>):
>
>    mm/mempolicy.c: In function 'sanitize_mpol_flags':
> >> mm/mempolicy.c:1452:26: warning: comparison between pointer and integer
>     1452 |                 if (mode != MPOL_BIND)
>          |                          ^~

Oh well, last minute changes, and indeed my compiler warned me while I
was away :/

mm/mempolicy.c:1452:12: warning: comparison between pointer and
integer ('int *' and 'int') [-Wpointer-integer-compare]
                if (mode != MPOL_BIND)
                    ~~~~ ^  ~~~~~~~~~

I am sending a v2, thanks.

>
>
> vim +1452 mm/mempolicy.c
>
>   1440
>   1441  /* Basic parameter sanity check used by both mbind() and set_mempolicy() */
>   1442  static inline int sanitize_mpol_flags(int *mode, unsigned short *flags)
>   1443  {
>   1444          *flags = *mode & MPOL_MODE_FLAGS;
>   1445          *mode &= ~MPOL_MODE_FLAGS;
>   1446
>   1447          if ((unsigned int)(*mode) >=  MPOL_MAX)
>   1448                  return -EINVAL;
>   1449          if ((*flags & MPOL_F_STATIC_NODES) && (*flags & MPOL_F_RELATIVE_NODES))
>   1450                  return -EINVAL;
>   1451          if (*flags & MPOL_F_NUMA_BALANCING) {
> > 1452                  if (mode != MPOL_BIND)
>   1453                          return -EINVAL;
>   1454                  *flags |= (MPOL_F_MOF | MPOL_F_MORON);
>   1455          }
>   1456          return 0;
>   1457  }
>   1458
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org


  reply	other threads:[~2021-10-01 21:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-01 17:49 [PATCH] mm/mempolicy: do not allow illegal MPOL_F_NUMA_BALANCING | MPOL_LOCAL in mbind() Eric Dumazet
2021-10-01 20:24 ` kernel test robot
2021-10-01 21:52   ` Eric Dumazet [this message]
2021-10-08  5:25 ` Dongliang Mu
2021-10-08 16:20   ` Eric Dumazet
2021-10-11 10:22 ` Mel Gorman

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='CANn89iKP5D2CvVg28-FmPsJ7U9uLuBy-UtunS=arhKSwf0H=gg@mail.gmail.com' \
    --to=edumazet@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=eric.dumazet@gmail.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=mgorman@suse.de \
    --cc=syzkaller@googlegroups.com \
    --cc=ying.huang@intel.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).