All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Ido Schimmel <idosch@mellanox.com>, David Ahern <dsahern@kernel.org>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH v3 net-next 1/3] ipv4: Move cached routes to fib_nh_common
Date: Tue, 30 Apr 2019 08:27:23 -0600	[thread overview]
Message-ID: <822f60dd-a206-827e-ad26-b867ffd2e507@gmail.com> (raw)
In-Reply-To: <20190430064033.GA20104@splinter>

On 4/30/19 12:40 AM, Ido Schimmel wrote:
> On Mon, Apr 29, 2019 at 09:16:17AM -0700, David Ahern wrote:
>>  /* Release a nexthop info record */
>> @@ -491,9 +491,15 @@ int fib_nh_common_init(struct fib_nh_common *nhc, struct nlattr *encap,
>>  		       u16 encap_type, void *cfg, gfp_t gfp_flags,
>>  		       struct netlink_ext_ack *extack)
>>  {
>> +	int err;
>> +
>> +	nhc->nhc_pcpu_rth_output = alloc_percpu_gfp(struct rtable __rcu *,
>> +						    gfp_flags);
>> +	if (!nhc->nhc_pcpu_rth_output)
>> +		return -ENOMEM;
>> +
>>  	if (encap) {
>>  		struct lwtunnel_state *lwtstate;
>> -		int err;
>>  
>>  		if (encap_type == LWTUNNEL_ENCAP_NONE) {
>>  			NL_SET_ERR_MSG(extack, "LWT encap type not specified");
> 
> Failure here will leak 'nhc->nhc_pcpu_rth_output'
> 

ugh, thanks for catching that.


  reply	other threads:[~2019-04-30 14:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-29 16:16 [PATCH v3 net-next 0/3] ipv4: Move location of pcpu route cache and exceptions David Ahern
2019-04-29 16:16 ` [PATCH v3 net-next 1/3] ipv4: Move cached routes to fib_nh_common David Ahern
2019-04-30  6:40   ` Ido Schimmel
2019-04-30 14:27     ` David Ahern [this message]
2019-04-29 16:16 ` [PATCH v3 net-next 2/3] ipv4: Pass fib_nh_common to rt_cache_route David Ahern
2019-04-30  6:56   ` Ido Schimmel
2019-04-29 16:16 ` [PATCH v3 net-next 3/3] ipv4: Move exception bucket to nh_common David Ahern
2019-04-30  7:17   ` Ido Schimmel

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=822f60dd-a206-827e-ad26-b867ffd2e507@gmail.com \
    --to=dsahern@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=idosch@mellanox.com \
    --cc=netdev@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.