public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: David Ahern <dsa@cumulusnetworks.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next] net: vrf: Create FIB tables on link create
Date: Wed, 4 May 2016 22:29:36 -0600	[thread overview]
Message-ID: <572ACC30.8080604@cumulusnetworks.com> (raw)
In-Reply-To: <20160505.002448.1005276153595006235.davem@davemloft.net>

On 5/4/16 10:24 PM, David Miller wrote:
> From: David Ahern <dsa@cumulusnetworks.com>
> Date: Wed,  4 May 2016 21:18:07 -0700
>
>> @@ -372,9 +372,13 @@ static int vrf_rt6_create(struct net_device *dev)
>>   	if (!rt6)
>>   		goto out;
>>
>> -	rt6->dst.output	= vrf_output6;
>> -	rt6->rt6i_table = fib6_get_table(net, vrf->tb_id);
>>   	dst_hold(&rt6->dst);
>> +
>> +	rt6->rt6i_table = fib6_new_table(net, vrf->tb_id);
>> +	if (!rt6->rt6i_table)
>> +		goto out;
>> +
>> +	rt6->dst.output	= vrf_output6;
>>   	vrf->rt6 = rt6;
>>   	rc = 0;
>>   out:
>
> This leaks rt6.
>

Indeed. That fact was lost by follow on patches which fix the ordering.

      reply	other threads:[~2016-05-05  4:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-05  4:18 [PATCH net-next] net: vrf: Create FIB tables on link create David Ahern
2016-05-05  4:24 ` David Miller
2016-05-05  4:29   ` David Ahern [this message]

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=572ACC30.8080604@cumulusnetworks.com \
    --to=dsa@cumulusnetworks.com \
    --cc=davem@davemloft.net \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox