linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@mellanox.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Christian Benvenuti <benve@cisco.com>,
	Nelson Escobar <neescoba@cisco.com>,
	Parvi Kaustubhi <pkaustub@cisco.com>,
	Doug Ledford <dledford@redhat.com>,
	Leon Romanovsky <leon@kernel.org>,
	Gal Pressman <galpress@amazon.com>,
	Parav Pandit <parav@mellanox.com>,
	Davidlohr Bueso <dave@stgolabs.net>,
	Kamal Heib <kamalheib1@gmail.com>,
	Florian Westphal <fw@strlen.de>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] usnic: avoid overly large buffers on stack
Date: Thu, 12 Sep 2019 13:47:37 +0000	[thread overview]
Message-ID: <20190912134722.GA26019@mellanox.com> (raw)
In-Reply-To: <20190906155730.2750200-1-arnd@arndb.de>

On Fri, Sep 06, 2019 at 05:57:17PM +0200, Arnd Bergmann wrote:
> It's never a good idea to put a 1000-byte buffer on the kernel
> stack. The compiler warns about this instance when usnic_ib_log_vf()
> gets inlined into usnic_ib_pci_probe():
> 
> drivers/infiniband/hw/usnic/usnic_ib_main.c:543:12: error: stack frame size of 1044 bytes in function 'usnic_ib_pci_probe' [-Werror,-Wframe-larger-than=]
> 
> As this is only called for debugging purposes in the setup path,
> it's trivial to convert to a dynamic allocation.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/infiniband/hw/usnic/usnic_ib_main.c | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)

Applied to for-next, thanks

Jason

      reply	other threads:[~2019-09-12 13:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-06 15:57 [PATCH] usnic: avoid overly large buffers on stack Arnd Bergmann
2019-09-12 13:47 ` Jason Gunthorpe [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=20190912134722.GA26019@mellanox.com \
    --to=jgg@mellanox.com \
    --cc=arnd@arndb.de \
    --cc=benve@cisco.com \
    --cc=dave@stgolabs.net \
    --cc=dledford@redhat.com \
    --cc=fw@strlen.de \
    --cc=galpress@amazon.com \
    --cc=kamalheib1@gmail.com \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=neescoba@cisco.com \
    --cc=parav@mellanox.com \
    --cc=pkaustub@cisco.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).