Date: Thu, 3 Mar 2005 13:48:14 -0500 From: Jung-uk Kim <jkim@niksun.com> To: Bill Paul <wpaul@freebsd.org> Cc: src-committers@freebsd.org Subject: Re: cvs commit: src/sys/net80211 ieee80211_ioctl.c Message-ID: <200503031348.14325.jkim@niksun.com> In-Reply-To: <200503031735.j23HZ5hv094849@repoman.freebsd.org> References: <200503031735.j23HZ5hv094849@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday 03 March 2005 12:35 pm, Bill Paul wrote: > wpaul 2005-03-03 17:35:05 UTC > > FreeBSD src repository > > Modified files: > sys/net80211 ieee80211_ioctl.c > Log: > Recently, it was reported to me that you could provoke a double > fault panic with the NDISulator if you did "ifconfig ndis0 > 10.0.0.1/24," whereas "ifconfig ndis0 10.0.0.1/24 up" worked fine. > The double fault was caused by the ifconfig thread running out of > kernel stack space. (This was partly due to the NDIsulator using a > couple of big buffers on the stack, but even after fixing that the > double fault persisted.) > > It turns out that ndis_init() is called in both cases, but in the > first case the code path passes through ieee80211_ioctl(), and it > turns out ieee80211_ioctl() consumes a whopping 2400 bytes of stack > space. Apparently, gcc -O2 causes the ieee80211_ioctl_get80211() > routine to be inlined into ieee80211_ioctl(), and for some reason > which I do not fully understand, this causes ieee80211_ioctl() to > consume an extra 2K of stack space. > > To prevent this overly agressive optimization, > ieee80211_ioctl_get80211() is now declared with __attribute__ > ((noinline)). With this change, ieee80211_ioctl() now only reserves > about 200 bytes of stack instead of 2400. > > Revision Changes Path > 1.19 +19 -0 src/sys/net80211/ieee80211_ioctl.c Check this commit: http://docs.freebsd.org/cgi/mid.cgi?200503022133.j22LXTih011115 and this comment: http://docs.freebsd.org/cgi/mid.cgi?20050303161436.0cczcopocg84g4ks Thanks, Jung-uk Kim
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200503031348.14325.jkim>