[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM_iQpWxZj8JPOfrQQzhhe=T+Z8-DHk5w+6ccUhTvYAv9Wz8kA@mail.gmail.com>
Date: Wed, 19 Apr 2017 14:32:27 -0700
From: Cong Wang <xiyou.wangcong@...il.com>
To: Wolfgang Bumiller <w.bumiller@...xmox.com>
Cc: Jamal Hadi Salim <jhs@...atatu.com>,
Linux Kernel Network Developers <netdev@...r.kernel.org>,
"David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH v2 net 2/2] net sched actions: decrement module refcount earlier
On Wed, Apr 19, 2017 at 8:03 AM, Wolfgang Bumiller
<w.bumiller@...xmox.com> wrote:
>> On April 19, 2017 at 1:32 PM Jamal Hadi Salim <jhs@...atatu.com> wrote:
>> My suggestion:
>> If we move the cookie allocation before init we can save it and
>> only when init succeeds do we attach it to the action, otherwise
>> we free it on error path.
>
> Shouldn't the old code have freed an old a->act_cookie as well before
> replacing it then? nla_memdup_cookie() starts off by assigning a->act_cookie.
>
Yeah. Looks even better, we can totally avoid rollback the action modification
rollback on failure.
Powered by blists - more mailing lists