linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dan Streetman <ddstreet@ieee.org>
To: kbuild test robot <fengguang.wu@intel.com>
Cc: kbuild-all@01.org, Andrew Morton <akpm@linux-foundation.org>,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: [linux-next:master 6299/6518] mm/zswap.c:759:1: warning: '__zswap_param_set' uses dynamic stack allocation
Date: Fri, 7 Aug 2015 15:02:34 -0400	[thread overview]
Message-ID: <CALZtONBF7UbyFO5VD3RH4G58_WJb+4bQSiGKZoKgbka19eGXXg@mail.gmail.com> (raw)
In-Reply-To: <201508070924.YNOeybcV%fengguang.wu@intel.com>

On Thu, Aug 6, 2015 at 9:59 PM, kbuild test robot
<fengguang.wu@intel.com> wrote:
> tree:   git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   c6b169e6ffb962068153bd92b0c4ecbd731a122f
> commit: e2e60954eae9929a982d12b6ff24a91b37822f34 [6299/6518] zswap: change zpool/compressor at runtime
> config: s390-allyesconfig (attached as .config)
> reproduce:
>   wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
>   chmod +x ~/bin/make.cross
>   git checkout e2e60954eae9929a982d12b6ff24a91b37822f34
>   # save the attached .config to linux build tree
>   make.cross ARCH=s390
>
> All warnings (new ones prefixed by >>):
>
>    mm/zswap.c: In function '__zswap_param_set':
>>> mm/zswap.c:759:1: warning: '__zswap_param_set' uses dynamic stack allocation

ugh, ok.  It really should be fine, but I'll send a patch to use a
static-sized array instead; we know it's never more than 64 bytes.


>     }
>     ^
>
> vim +/__zswap_param_set +759 mm/zswap.c
>
>    743                   * list; if it's new (and empty) then it'll be removed and
>    744                   * destroyed by the put after we drop the lock
>    745                   */
>    746                  list_add_tail_rcu(&pool->list, &zswap_pools);
>    747                  put_pool = pool;
>    748          }
>    749
>    750          spin_unlock(&zswap_pools_lock);
>    751
>    752          /* drop the ref from either the old current pool,
>    753           * or the new pool we failed to add
>    754           */
>    755          if (put_pool)
>    756                  zswap_pool_put(put_pool);
>    757
>    758          return ret;
>  > 759  }
>    760
>    761  static int zswap_compressor_param_set(const char *val,
>    762                                        const struct kernel_param *kp)
>    763  {
>    764          return __zswap_param_set(val, kp, zswap_zpool_type, NULL);
>    765  }
>    766
>    767  static int zswap_zpool_param_set(const char *val,
>
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2015-08-07 19:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-07  1:59 kbuild test robot
2015-08-07 19:02 ` Dan Streetman [this message]

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=CALZtONBF7UbyFO5VD3RH4G58_WJb+4bQSiGKZoKgbka19eGXXg@mail.gmail.com \
    --to=ddstreet@ieee.org \
    --cc=akpm@linux-foundation.org \
    --cc=fengguang.wu@intel.com \
    --cc=kbuild-all@01.org \
    --cc=linux-mm@kvack.org \
    /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