[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f1630c6d-0ac9-929f-d2f6-c739cd19fb22@gmail.com>
Date: Wed, 28 Nov 2018 10:52:53 -0700
From: David Ahern <dsahern@...il.com>
To: Jakub Kicinski <jakub.kicinski@...ronome.com>, davem@...emloft.net
Cc: jiri@...nulli.us, roopa@...ulusnetworks.com,
christian.brauner@...ntu.com, netdev@...r.kernel.org,
oss-drivers@...ronome.com
Subject: Re: [PATCH net-next 0/2] rtnetlink: avoid a warning in rtnl_newlink()
On 11/27/18 11:32 PM, Jakub Kicinski wrote:
> Hi!
>
> I've been hoping for some time that someone more competent would fix
> the stack frame size warning in rtnl_newlink(), but looks like I'll
> have to take a stab at it myself :) That's the only warning I see
> in most of my builds.
Somehow my CONFIG_FRAME_WARN got set to 2048 in all of my config files,
so I don't see the warning.
>
> First patch refactors away a somewhat surprising if (1) code block.
> Reindentation will most likely cause cherry-pick problems but OTOH
> rtnl_newlink() doesn't seem to be changed often, so perhaps we can
> risk it in the name of cleaner code?
The unnecessary indentation with the if(1) has always annoyed me. I like
the cleanup, but strictly speaking if Dave objects patch 2 can be done
without it.
>
> Second patch fixes the warning in simplest possible way. I was
> pondering if there is any more clever solution, but I can't see it..
> rtnl_newlink() is quite long with a lot of possible execution paths
> so doing memory allocations half way through leads to very ugly
> results.
Seems like a reasonable first step and in time slave_attr can follow
suit. Those are the 2 high runners for stack usage.
Powered by blists - more mailing lists