lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 13 Aug 2008 06:53:03 +0000
From:	Jarek Poplawski <jarkao2@...il.com>
To:	David Miller <davem@...emloft.net>
Cc:	herbert@...dor.apana.org.au, netdev@...r.kernel.org
Subject: Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().

On Tue, Aug 12, 2008 at 11:16:33PM -0700, David Miller wrote:
> From: Jarek Poplawski <jarkao2@...il.com>
> Date: Wed, 13 Aug 2008 06:13:17 +0000
> 
> > On Tue, Aug 12, 2008 at 10:11:03PM -0700, David Miller wrote:
> > > So, just like one of Jarek's patches, we should simply change
> > > dev_queue->qdisc into dev_queue->qdisc_sleeping and that should
> > > take care of the bulk of the issues.
> > > 
> > > Shouldn't it?
> > 
> > If we don't change anything in __netif_schedule() I doubt it's enough.
> > And if this old way of waiting for "outstanding qdisc-less" calls was
> > really needed we should probably wait for both qdisc and qdisc_sleeping
> > then.
> 
> I think if we check both RUNNING and SCHED bits, we'll be OK.
> 
> > > Hmmm... maybe we have to sample __QDISC_STATE_SCHED too.
> > 
> > We could probably even think of using this flag napi_disable() way.
> 
> Here (in dev_deactivate), ->qdisc is going to now be &noop_qdisc or
> similar.  Asynchronous contexts can run into that thing as much as
> they want :-)

Thats why I still think a "common" RCU with rcu_dereference() (from
dev_queue pointer) in net_tx_action() should be enough: after
synchronize_rcu() in dev_deactivate() we are sure any qdisc_run(),
from dev_queue_xmit() or net_tx_action() can only see and lock
noop_qdisc. Any activities on qdisc_sleeping can't happen so no
need to wait for this. There could be some skbs enqueued just before
synchronize, and they could be ->reset() and ->destroy() just after,
even without rcu_call().

Otherwise, I think you would better send some code example with these
flags, so we could be sure there is no misunderstanding around this.

Jarek P.
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ