netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Jakub Kicinski <jakub.kicinski@netronome.com>, davem@davemloft.net
Cc: jiri@resnulli.us, roopa@cumulusnetworks.com,
	christian.brauner@ubuntu.com, netdev@vger.kernel.org,
	oss-drivers@netronome.com
Subject: Re: [PATCH net-next 2/2] rtnetlink: avoid frame size warning in rtnl_newlink()
Date: Wed, 28 Nov 2018 10:53:47 -0700	[thread overview]
Message-ID: <3c9b50e3-a233-9120-16eb-20fa1a264751@gmail.com> (raw)
In-Reply-To: <20181128063231.12907-3-jakub.kicinski@netronome.com>

On 11/27/18 11:32 PM, Jakub Kicinski wrote:
> Standard kernel compilation produces the following warning:
> 
> net/core/rtnetlink.c: In function ‘rtnl_newlink’:
> net/core/rtnetlink.c:3232:1: warning: the frame size of 1288 bytes is larger than 1024 bytes [-Wframe-larger-than=]
>  }
>   ^
> 
> This should not really be an issue, as rtnl_newlink() stack is
> generally quite shallow.
> 
> Fix the warning by allocating attributes with kmalloc() in a wrapper
> and passing it down to rtnl_newlink(), avoiding complexities on error
> paths.
> 
> Alternatively we could kmalloc() some structure within rtnl_newlink(),
> slave attributes look like a good candidate.  In practice it adds to
> already rather high complexity and length of the function.
> 
> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
> ---
>  net/core/rtnetlink.c | 20 +++++++++++++++++---
>  1 file changed, 17 insertions(+), 3 deletions(-)
> 

Reviewed-by: David Ahern <dsahern@gmail.com>

  reply	other threads:[~2018-11-29  4:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-28  6:32 [PATCH net-next 0/2] rtnetlink: avoid a warning in rtnl_newlink() Jakub Kicinski
2018-11-28  6:32 ` [PATCH net-next 1/2] rtnetlink: remove a level of indentation " Jakub Kicinski
2018-11-28 17:53   ` David Ahern
2018-11-28  6:32 ` [PATCH net-next 2/2] rtnetlink: avoid frame size warning " Jakub Kicinski
2018-11-28 17:53   ` David Ahern [this message]
2018-11-28 17:52 ` [PATCH net-next 0/2] rtnetlink: avoid a " David Ahern
2018-11-30 21:34 ` David Miller

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=3c9b50e3-a233-9120-16eb-20fa1a264751@gmail.com \
    --to=dsahern@gmail.com \
    --cc=christian.brauner@ubuntu.com \
    --cc=davem@davemloft.net \
    --cc=jakub.kicinski@netronome.com \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.org \
    --cc=oss-drivers@netronome.com \
    --cc=roopa@cumulusnetworks.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).