Subject: Re: [PATCH net-next v4] mpls: support for dead routes

From: Robert Shearman <[email-masked]>
Date: Tue, 24 Nov 2015 16:46:59 +0000

On 24/11/15 03:41, roopa wrote:
> On 11/23/15, 6:15 AM, Robert Shearman wrote:
>> On 21/11/15 05:16, Roopa Prabhu wrote:
>>> +        if (!rt_new) {
>>> +            pr_warn("mpls_ifdown: kmemdup failed\n");
>>
>> It isn't safe to leave the current route untouched if the net device is being deleted, since a nexthop will be left holding a stale pointer to it. Perhaps delete the route entirely in that case?
> I would not delete the route. But, Would it be bad modifying rt in that case (ie when rt_new is not possible) ?. It is a remote case..and the side effect being the datapath will not see the changes atomically.

No, that sounds fine to me as long as RCU_INIT_POINTER is used.

Thanks,
Rob