On Mon, 4 Aug 2008, Krzysztof Oledzki wrote:nd=20 =2E =20 =20 And the winner is... 9043476f726802f4b00c96d0c4f418dde48d1304: [PATCH] sanitize proc_sysctl * keep references to ctl_table_head and ctl_table in /proc/sys inodes * grab the former during operations, use the latter for access to entry if that succeeds * have ->d_compare() check if table should be seen for one who does lookup; that allows us to avoid flipping inodes - if we have the same name resol= ve to different things, we'll just keep several dentries and ->d_compare() will reject the wrong ones. * have ->lookup() and ->readdir() scan the table of our inode first, then walk all ctl_table_header and scan ->attached_by for those that are attached to our directory. * implement ->getattr(). * get rid of insane amounts of tree-walking * get rid of the need to know dentry in ->permission() and of the contortio= ns induced by that. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> With this patch "sysctl -a|grep net.netfilter" shows only=20 net.netfilter.nf_conntrack_generic_timeout and=20 net.netfilter.nf_conntrack_acct, both are duplicate btw: # sysctl -a 2>/dev/null|grep netf net.ipv4.netfilter.ip_conntrack_generic_timeout =3D 600 net.netfilter.nf_conntrack_generic_timeout =3D 600 net.netfilter.nf_conntrack_acct =3D 1 net.netfilter.nf_conntrack_generic_timeout =3D 600 net.netfilter.nf_conntrack_acct =3D 1 Without that commit I get full sysctl tree: # sysctl -a 2>/dev/null|grep netf net.ipv4.netfilter.ip_conntrack_generic_timeout =3D 600 net.netfilter.nf_conntrack_generic_timeout =3D 600 net.netfilter.nf_conntrack_acct =3D 1 net.netfilter.nf_conntrack_max =3D 32768 net.netfilter.nf_conntrack_count =3D 0 net.netfilter.nf_conntrack_buckets =3D 8192 net.netfilter.nf_conntrack_checksum =3D 1 net.netfilter.nf_conntrack_log_invalid =3D 0 net.netfilter.nf_conntrack_expect_max =3D 128 And of course no WARNING at unloading as it comes from that patch=20 directly: - for (i =3D 1; table && (i <=3D depth); i++) { - ancestor =3D proc_sys_ancestor(dentry, i); - table =3D proc_sys_lookup_table_one(table, &ancestor->d_nam= e); - if (table) - table =3D table->child; + if (table && !table->child) { + WARN_ON(1); + goto out; } OK, how we should proceed next? Is sysctl API misused somewhere in the=20 netfilter code and/or in my 584015727a3b88b46602b20077b46cd04f8b4ab3=20 patch? Or maybe 9043476f726802f4b00c96d0c4f418dde48d1304 commit is buggy? Best regards, =09=09=09=09Krzysztof Ol=EAdzki
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
| Jeff Garzik | Re: fallocate-implementation-on-i86-x86_64-and-powerpc.patch |
git: | |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Arjan van de Ven | Re: [GIT]: Networking |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| Natalie Protasevich | [BUG] New Kernel Bugs |
