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  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:	Mon, 18 Aug 2008 11:25:16 +1000
From:	Herbert Xu <herbert@...dor.apana.org.au>
To:	David Miller <davem@...emloft.net>
Cc:	jarkao2@...il.com, netdev@...r.kernel.org
Subject: Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().

On Sun, Aug 17, 2008 at 04:03:29PM -0700, David Miller wrote:
> 
> I thought about it some more, but there is still the dev_queue_xmit()
> context that can have a reference to the old qdisc, be about to take
> the qdisc lock and feed packets into it's ->enqueue().
> 
> That's why we need the RCU destruction still.  dev_deactivate() really
> doesn't clear out all references to the qdisc fully.
> 
> It might be a better approach to work on making that simply not matter,
> and just rely on RCU or similar to defer destruction and any real state
> changes internally to the qdisc tree will simply use the root qdisc's
> lock to block out enqueue/dequeue/requeue calls.
> 
> In that kind of scheme dev_deactivate() just sets the RCU pointer and
> doesn't sit around waiting for anything.

Well one of the advantages of it being synchronous is that the
driver may be relying on this so that it knows all transmissions
have ceased in dev_close.  If we stick with RCU then drivers would
have to implement their own synchronisation anyway.

So what's the issue with dev_queue_xmit? That should be taken care
of by something like rcu_barrier_bh, no?

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
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