[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM_iQpW9E8UWDCVbqDqZ7pkjh5kTEO7W_=2Qk_aRUP4HMXypRQ@mail.gmail.com>
Date: Fri, 24 Feb 2017 09:58:21 -0800
From: Cong Wang <xiyou.wangcong@...il.com>
To: Roman Mashak <mrv@...atatu.com>
Cc: David Miller <davem@...emloft.net>,
Linux Kernel Network Developers <netdev@...r.kernel.org>,
Jamal Hadi Salim <jhs@...atatu.com>
Subject: Re: [PATCH net 1/1] net sched actions: decrement module reference
count after table flush.
On Fri, Feb 24, 2017 at 8:00 AM, Roman Mashak <mrv@...atatu.com> wrote:
> When tc actions are loaded as a module and no actions have been installed,
> flushing them would result in actions removed from the memory, but modules
> reference count not being decremented, so that the modules would not be
> unloaded.
>
> Following is example with GACT action:
>
> % sudo modprobe act_gact
> % lsmod
> Module Size Used by
> act_gact 16384 0
> %
> % sudo tc actions ls action gact
> %
> % sudo tc actions flush action gact
> % lsmod
> Module Size Used by
> act_gact 16384 1
> % sudo tc actions flush action gact
> % lsmod
> Module Size Used by
> act_gact 16384 2
> % sudo rmmod act_gact
> rmmod: ERROR: Module act_gact is in use
> ....
>
> After the fix:
> % lsmod
> Module Size Used by
> act_gact 16384 0
> %
> % sudo tc actions add action pass index 1
> % sudo tc actions add action pass index 2
> % sudo tc actions add action pass index 3
> % lsmod
> Module Size Used by
> act_gact 16384 3
> %
> % sudo tc actions flush action gact
> % lsmod
> Module Size Used by
> act_gact 16384 0
> %
> % sudo tc actions flush action gact
> % lsmod
> Module Size Used by
> act_gact 16384 0
> % sudo rmmod act_gact
> % lsmod
> Module Size Used by
> %
>
> Signed-off-by: Roman Mashak <mrv@...atatu.com>
> Signed-off-by: Jamal Hadi Salim <jhs@...atatu.com>
Fixes commit f97017cdefefdb6a0e19266024b0c6f9fd411eeb ?
Acked-by: Cong Wang <xiyou.wangcong@...il.com>
Powered by blists - more mailing lists