Re: [PATCH] net/sched: reset block pointer in tcf_block_put()

2017-08-15 Thread Konstantin Khlebnikov
On 15.08.2017 00:15, Cong Wang wrote: On Mon, Aug 14, 2017 at 5:59 AM, Konstantin Khlebnikov wrote: This should work, I suppose. But this approach requires careful review for all qdisc, mine is completely mechanical. Well, we don't have many classful qdisc's. Your patch actually touches m

Re: [PATCH] net/sched: reset block pointer in tcf_block_put()

2017-08-14 Thread Cong Wang
On Mon, Aug 14, 2017 at 5:59 AM, Konstantin Khlebnikov wrote: > > This should work, I suppose. > > But this approach requires careful review for all qdisc, mine is completely > mechanical. Well, we don't have many classful qdisc's. Your patch actually touches more qdisc's than mine, because you c

Re: [PATCH] net/sched: reset block pointer in tcf_block_put()

2017-08-14 Thread Konstantin Khlebnikov
On 12.08.2017 00:38, Cong Wang wrote: On Fri, Aug 11, 2017 at 1:36 PM, Konstantin Khlebnikov wrote: On 11.08.2017 23:18, Cong Wang wrote: On Thu, Aug 10, 2017 at 2:31 AM, Konstantin Khlebnikov wrote: In previous API tcf_destroy_chain() could be called several times and some schedulers

Re: [PATCH] net/sched: reset block pointer in tcf_block_put()

2017-08-11 Thread Cong Wang
On Fri, Aug 11, 2017 at 1:36 PM, Konstantin Khlebnikov wrote: > > > On 11.08.2017 23:18, Cong Wang wrote: >> >> On Thu, Aug 10, 2017 at 2:31 AM, Konstantin Khlebnikov >> wrote: >>> >>> In previous API tcf_destroy_chain() could be called several times and >>> some schedulers like hfsc and atm use

Re: [PATCH] net/sched: reset block pointer in tcf_block_put()

2017-08-11 Thread David Miller
From: Cong Wang Date: Fri, 11 Aug 2017 14:06:31 -0700 > On Fri, Aug 11, 2017 at 1:32 PM, Florian Westphal wrote: >> Cong Wang wrote: >>> On Thu, Aug 10, 2017 at 2:31 AM, Konstantin Khlebnikov >>> wrote: >>> > In previous API tcf_destroy_chain() could be called several times and >>> > some sche

Re: [PATCH] net/sched: reset block pointer in tcf_block_put()

2017-08-11 Thread Cong Wang
On Fri, Aug 11, 2017 at 1:32 PM, Florian Westphal wrote: > Cong Wang wrote: >> On Thu, Aug 10, 2017 at 2:31 AM, Konstantin Khlebnikov >> wrote: >> > In previous API tcf_destroy_chain() could be called several times and >> > some schedulers like hfsc and atm use that. In new API tcf_block_put() >

Re: [PATCH] net/sched: reset block pointer in tcf_block_put()

2017-08-11 Thread Konstantin Khlebnikov
On 11.08.2017 23:18, Cong Wang wrote: On Thu, Aug 10, 2017 at 2:31 AM, Konstantin Khlebnikov wrote: In previous API tcf_destroy_chain() could be called several times and some schedulers like hfsc and atm use that. In new API tcf_block_put() frees block but leaves stale pointer, second call wi

Re: [PATCH] net/sched: reset block pointer in tcf_block_put()

2017-08-11 Thread Florian Westphal
Cong Wang wrote: > On Thu, Aug 10, 2017 at 2:31 AM, Konstantin Khlebnikov > wrote: > > In previous API tcf_destroy_chain() could be called several times and > > some schedulers like hfsc and atm use that. In new API tcf_block_put() > > frees block but leaves stale pointer, second call will free i

Re: [PATCH] net/sched: reset block pointer in tcf_block_put()

2017-08-11 Thread Cong Wang
On Thu, Aug 10, 2017 at 2:31 AM, Konstantin Khlebnikov wrote: > In previous API tcf_destroy_chain() could be called several times and > some schedulers like hfsc and atm use that. In new API tcf_block_put() > frees block but leaves stale pointer, second call will free it once again. Which call pa

[PATCH] net/sched: reset block pointer in tcf_block_put()

2017-08-10 Thread Konstantin Khlebnikov
In previous API tcf_destroy_chain() could be called several times and some schedulers like hfsc and atm use that. In new API tcf_block_put() frees block but leaves stale pointer, second call will free it once again. This patch fixes such double-frees. Signed-off-by: Konstantin Khlebnikov Fixes: