From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <30265095a0469cb45b5a4fa81d5a0cf9@rei2.9hal> Date: Thu, 21 Feb 2013 16:40:59 +0100 From: cinap_lenrek@gmx.de To: 9fans@9fans.net MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] netif stat bug Topicbox-Message-UUID: 1c8e5880-ead8-11e9-9d60-3106f5b1d025 stating the "stats" and "ifstats" files in a ethernet tree that has no active connections can cause the kernel to go into endless loop or returns wrong stat data. the bug is in port/netif.c in the netifgen() function: - if(t == N2ndqid || t == Ncloneqid || t == Naddrqid){ + if(t == N2ndqid || t == Ncloneqid || t == Naddrqid || t == Nstatqid || t == Nifstatqid){ the problem is subtile and comes from the dual use of the gen functions for generating tree enumeration and stating. maybe it would be a good idea to make devstat() error out after a million iterations just instead of looping forever to make this easier to diagnose? this is the same class of bug that was discovered in the devdraw device some time ago. it would be a good idea to audit other devices for these kind of bugs while being at it. -- cinap