[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20150105.161725.1765207203472571760.davem@davemloft.net>
Date: Mon, 05 Jan 2015 16:17:25 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: simon.horman@...ronome.com
Cc: john.fastabend@...il.com, netdev@...r.kernel.org
Subject: Re: [PATCH/RFC rocker-net-next 1/6] net: flow: Cancel innermost
nested attribute first
From: Simon Horman <simon.horman@...ronome.com>
Date: Mon, 5 Jan 2015 15:50:05 +0900
> Cancel innermost nested attribute first on error when putting flow actions.
>
> Signed-off-by: Simon Horman <simon.horman@...ronome.com>
>
> ---
>
> Its unclear to me if this makes any difference.
> But it seems more logical to me.
Hmmm. Be careful here. nla_nest_cancel() is just rolling back
the length of the SKB to right before the netlink attribute being
given as the cancellation point.
So you really have to cancel attributes in exactly the reverse order
in which they were added. Otherwise we'll make a trim call with a
negative adjustment that actually expands the SKB past an already
cancelled attribute.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists