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
| ||
|
Message-ID: <1286181729.18293.8.camel@edumazet-laptop> Date: Mon, 04 Oct 2010 10:42:09 +0200 From: Eric Dumazet <eric.dumazet@...il.com> To: Jarek Poplawski <jarkao2@...il.com> Cc: hadi@...erus.ca, David Miller <davem@...emloft.net>, netdev <netdev@...r.kernel.org> Subject: Re: [PATCH net-next V3] net: dynamic ingress_queue allocation Le dimanche 03 octobre 2010 à 11:42 +0200, Jarek Poplawski a écrit : > I'd consider rcu_dereference_rtnl(). Btw, technically qdisc_lookup() > doesn't require rtnl, and there was time it was used without it > (on xmit path). Hmm, for me, rcu_dereference_rtnl() is a bit lazy. Either we are a reader and should use rcu_dereference(), or a writer and RTNL should be held. Mixing two conditions in a "super macro" is a workaround that we used to promptly shutup some lockdep splats. Real fix would be to use strict lockdep conditions, because this better documents the code and the locking invariants. BTW, rtnl_dereference() should be changed to use rcu_dereference_protected() instead of rcu_dereference_check() : If RTBL is held, there is no need to force a barrier. > I think you should also add a comment here why this rcu is used, and > that it changes only once in dev's liftime. > This comment was needed in the previous version of the patch, with the smb_wmb() barrier. Now I switched to regular rcu use, nothing prevents us to change dev->ingress_queue in flight. Of course there is no current interest doing so. -- 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