Linux-RDMA Archive on lore.kernel.org
 help / color / 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
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 index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-06 15:57 Arnd Bergmann
2019-09-12 13:47 ` Jason Gunthorpe [this message]

Reply instructions:

You may reply publically 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

Linux-RDMA Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-rdma/0 linux-rdma/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-rdma linux-rdma/ https://lore.kernel.org/linux-rdma \
		linux-rdma@vger.kernel.org linux-rdma@archiver.kernel.org
	public-inbox-index linux-rdma


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-rdma


AGPL code for this site: git clone https://public-inbox.org/ public-inbox