netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] rtnetlink: avoid a warning in rtnl_newlink()
@ 2018-11-28  6:32 Jakub Kicinski
  2018-11-28  6:32 ` [PATCH net-next 1/2] rtnetlink: remove a level of indentation " Jakub Kicinski
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Jakub Kicinski @ 2018-11-28  6:32 UTC (permalink / raw)
  To: davem
  Cc: dsahern, jiri, roopa, christian.brauner, netdev, oss-drivers,
	Jakub Kicinski

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.

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?

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.

Jakub Kicinski (2):
  rtnetlink: remove a level of indentation in rtnl_newlink()
  rtnetlink: avoid frame size warning in rtnl_newlink()

 net/core/rtnetlink.c | 331 ++++++++++++++++++++++---------------------
 1 file changed, 170 insertions(+), 161 deletions(-)

-- 
2.17.1

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-12-01  8:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2018-11-28 17:52 ` [PATCH net-next 0/2] rtnetlink: avoid a " David Ahern
2018-11-30 21:34 ` David Miller

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).